@ryuenn3123/agentic-senior-core 5.6.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.devin-plugin/plugin.json +1 -1
- package/.github/plugin/plugin.json +1 -1
- package/README.md +59 -24
- package/bin/agentic-senior-core.js +10 -0
- package/gemini-extension.json +1 -1
- package/lib/cli/commands/global.mjs +196 -0
- package/package.json +2 -1
- package/plugin.yaml +1 -1
package/README.md
CHANGED
|
@@ -99,7 +99,7 @@ This copies one file to `.devin/rules/agentic-senior-core.md`. For legacy Windsu
|
|
|
99
99
|
asc adapter --windsurf
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
Repeat per project.
|
|
102
|
+
Repeat per project — or install once globally with `asc global --windsurf` (writes `~/.codeium/windsurf/memories/global_rules.md`, applies to all workspaces; skipped if you already have your own global rules file).
|
|
103
103
|
|
|
104
104
|
</details>
|
|
105
105
|
|
|
@@ -110,7 +110,7 @@ Repeat per project.
|
|
|
110
110
|
asc adapter --cline
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
Copies one file to `.clinerules/agentic-senior-core.md`. Repeat per project.
|
|
113
|
+
Copies one file to `.clinerules/agentic-senior-core.md`. Repeat per project — or install once globally with `asc global --cline` (rules land in `~/Documents/Cline/Rules/`, apply to all projects).
|
|
114
114
|
|
|
115
115
|
</details>
|
|
116
116
|
|
|
@@ -121,7 +121,7 @@ Copies one file to `.clinerules/agentic-senior-core.md`. Repeat per project.
|
|
|
121
121
|
asc adapter --copilot
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
Copies one file to `.github/copilot-instructions.md`. Repeat per project.
|
|
124
|
+
Copies one file to `.github/copilot-instructions.md`. Repeat per project — or install once globally with `asc global --copilot` (user-level instructions file in your VS Code profile, applies to all workspaces).
|
|
125
125
|
|
|
126
126
|
</details>
|
|
127
127
|
|
|
@@ -132,7 +132,7 @@ Copies one file to `.github/copilot-instructions.md`. Repeat per project.
|
|
|
132
132
|
asc adapter --kiro
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
Copies one file to `.kiro/steering/agentic-senior-core.md`. Repeat per project.
|
|
135
|
+
Copies one file to `.kiro/steering/agentic-senior-core.md`. Repeat per project. A global option exists (`asc global --kiro` → `~/.kiro/steering/`), but some Kiro builds have known bugs loading global steering — prefer the per-project adapter if rules are not picked up.
|
|
136
136
|
|
|
137
137
|
</details>
|
|
138
138
|
|
|
@@ -165,7 +165,7 @@ Copies one file to `.zed/rules/agentic-senior-core.md`. Zed also reads `AGENTS.m
|
|
|
165
165
|
asc adapter --aider
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
Copies one file to `CONVENTIONS.md` at project root. Aider reads this automatically. Repeat per project.
|
|
168
|
+
Copies one file to `CONVENTIONS.md` at project root. Aider reads this automatically. Repeat per project — or set it once globally in `~/.aider.conf.yml` with an absolute path into the npm package (`read: <npm root -g>/@ryuenn3123/agentic-senior-core/CONVENTIONS.md`). That pointer auto-updates with `npm update -g`.
|
|
169
169
|
|
|
170
170
|
</details>
|
|
171
171
|
|
|
@@ -176,7 +176,7 @@ Copies one file to `CONVENTIONS.md` at project root. Aider reads this automatica
|
|
|
176
176
|
asc adapter --kilocode
|
|
177
177
|
```
|
|
178
178
|
|
|
179
|
-
Copies one file to `.kilocode/rules/agentic-senior-core.md`. Repeat per project.
|
|
179
|
+
Copies one file to `.kilocode/rules/agentic-senior-core.md`. Repeat per project — or install once globally with `asc global --kilocode`. On Kilo v7+, the zero-maintenance option is pointing the `instructions:` array in `~/.config/kilo/kilo.jsonc` at the rules file inside the npm package (auto-updates with `npm update -g`).
|
|
180
180
|
|
|
181
181
|
</details>
|
|
182
182
|
|
|
@@ -187,7 +187,7 @@ Copies one file to `.kilocode/rules/agentic-senior-core.md`. Repeat per project.
|
|
|
187
187
|
asc adapter --roo
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
Copies one file to `.roo/rules/agentic-senior-core.md`. Repeat per project.
|
|
190
|
+
Copies one file to `.roo/rules/agentic-senior-core.md`. Repeat per project — or install once globally with `asc global --roo` (`~/.roo/rules/`). Note: Roo Code was discontinued in May 2026; support is kept for existing installs.
|
|
191
191
|
|
|
192
192
|
</details>
|
|
193
193
|
|
|
@@ -198,7 +198,7 @@ Copies one file to `.roo/rules/agentic-senior-core.md`. Repeat per project.
|
|
|
198
198
|
asc adapter --openhands
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
Copies one file to `.openhands/microagents/agentic-senior-core.md`. Repeat per project.
|
|
201
|
+
Copies one file to `.openhands/microagents/agentic-senior-core.md`. Repeat per project — or install once globally with `asc global --openhands` (`~/.openhands/microagents/`, loaded in all conversations for CLI/headless/dev modes; Docker runs need the directory mounted).
|
|
202
202
|
|
|
203
203
|
</details>
|
|
204
204
|
|
|
@@ -227,7 +227,13 @@ Antigravity IDE reads it automatically with `trigger: always_on`.
|
|
|
227
227
|
|
|
228
228
|
**Option B -- global plugin (all projects):**
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
One command (works on all platforms):
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
asc global --antigravity
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Or copy the plugin bundle manually to Antigravity's global plugin directory:
|
|
231
237
|
|
|
232
238
|
```powershell
|
|
233
239
|
# Windows (PowerShell)
|
|
@@ -246,7 +252,7 @@ cp -r "$(npm root -g)/@ryuenn3123/agentic-senior-core/.agents/plugins/agentic-se
|
|
|
246
252
|
|
|
247
253
|
The plugin bundle includes rules, skills (`/asc-review`, `/asc-audit`, `/asc-refactor`, `/asc-reference`, `/asc-debt`), and `plugin.json`.
|
|
248
254
|
|
|
249
|
-
> Note: `npm update -g` refreshes the npm package only. The global plugin copy does not auto-update -- re-run
|
|
255
|
+
> Note: `npm update -g` refreshes the npm package only. The global plugin copy does not auto-update -- re-run `asc global --antigravity` after each update.
|
|
250
256
|
|
|
251
257
|
</details>
|
|
252
258
|
|
|
@@ -280,7 +286,35 @@ Generates adapter files for Cursor, Devin Desktop, Windsurf, Cline, Copilot, Kir
|
|
|
280
286
|
</details>
|
|
281
287
|
|
|
282
288
|
**Terminal agents** (Claude Code, Codex, Gemini, Copilot CLI) = install once, always-on, zero per-project files.
|
|
283
|
-
**IDE agents**
|
|
289
|
+
**IDE agents** = one file per project via `asc adapter`, or install once globally via `asc global` (below).
|
|
290
|
+
|
|
291
|
+
### Global install (all projects, zero project files)
|
|
292
|
+
|
|
293
|
+
Most IDE tools also support user-level rules that apply to **every project** — no files in any repo root. One command installs them all:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
asc global --all
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
| Tool | Global location | Notes |
|
|
300
|
+
|------|----------------|-------|
|
|
301
|
+
| Google Antigravity IDE | `~/.gemini/config/plugins/agentic-senior-core/` | Full plugin bundle: rules + skills, always-on |
|
|
302
|
+
| Cline | `~/Documents/Cline/Rules/` | Toggleable in the Cline rules panel |
|
|
303
|
+
| Kilo Code | `~/.kilocode/rules/` | Or point `instructions:` in `~/.config/kilo/kilo.jsonc` at the npm package path — that variant auto-updates |
|
|
304
|
+
| Kiro | `~/.kiro/steering/` | Some builds have global-steering loading bugs; fall back to `asc adapter --kiro` |
|
|
305
|
+
| OpenHands | `~/.openhands/microagents/` | CLI/headless/dev modes; Docker runs need the mount |
|
|
306
|
+
| Windsurf / Devin Desktop | `~/.codeium/windsurf/memories/global_rules.md` | 6,000-char global limit (ASC rules fit); skipped if you already have your own file |
|
|
307
|
+
| GitHub Copilot (VS Code) | VS Code profile `prompts/` folder | Installed as a user `*.instructions.md` with `applyTo: '**'` |
|
|
308
|
+
| Roo Code | `~/.roo/rules/` | Roo Code was discontinued May 2026; kept for existing installs |
|
|
309
|
+
|
|
310
|
+
Tools without a global rules **file** (manual one-time setup instead):
|
|
311
|
+
|
|
312
|
+
- **Cursor** — Settings → Rules → User Rules: paste the contents of `AGENTS.md` (plain text field; a global rules directory is still a Cursor feature request).
|
|
313
|
+
- **Zed** — Rules Library in the Agent Panel: create a rule from `AGENTS.md` and mark it as default (paper clip icon).
|
|
314
|
+
- **Continue** — add a rules block to the global `config.yaml`.
|
|
315
|
+
- **Aider** — add `read: <absolute path to npm package>/CONVENTIONS.md` in `~/.aider.conf.yml`. This is a live pointer: it auto-updates with `npm update -g`, no re-copy ever.
|
|
316
|
+
|
|
317
|
+
Global rules load first; per-project adapter files (if present) take precedence on conflicts in every tool that supports both.
|
|
284
318
|
|
|
285
319
|
### Updating
|
|
286
320
|
|
|
@@ -290,7 +324,7 @@ Already installed? Just update the global package:
|
|
|
290
324
|
npm update -g @ryuenn3123/agentic-senior-core
|
|
291
325
|
```
|
|
292
326
|
|
|
293
|
-
Terminal agent plugins pick up the new version automatically on next session.
|
|
327
|
+
Terminal agent plugins pick up the new version automatically on next session. Global installs and IDE adapter files are static copies — after updating, re-run `asc global --all` once and `asc adapter --all` in each project that uses per-project files. (Aider's `read:` pointer and Kilo's `kilo.jsonc` path variant auto-update — nothing to re-run.)
|
|
294
328
|
|
|
295
329
|
---
|
|
296
330
|
|
|
@@ -327,20 +361,20 @@ Input validation at trust boundaries, parameterized queries, auth checks, error
|
|
|
327
361
|
| Hermes | Terminal agent | Plugin registration | No |
|
|
328
362
|
| OpenCode | Terminal agent | Auto-detected | No |
|
|
329
363
|
| OpenClaw | Terminal agent | Auto-detected | No |
|
|
330
|
-
| Antigravity IDE | IDE |
|
|
364
|
+
| Antigravity IDE | IDE | `asc global --antigravity` | No (global) |
|
|
331
365
|
| Antigravity CLI | Terminal agent | `agy plugin install` | No |
|
|
332
|
-
| Cursor | IDE | `asc adapter --cursor` | Yes (1 file) |
|
|
366
|
+
| Cursor | IDE | `asc adapter --cursor` | Yes (1 file) — or paste User Rules once |
|
|
333
367
|
| Devin Desktop | IDE | `asc adapter --devin` | Yes (1 file) |
|
|
334
|
-
| Windsurf (legacy) | IDE | `asc
|
|
335
|
-
| Cline | VS Code ext | `asc
|
|
336
|
-
| GitHub Copilot | VS Code ext | `asc
|
|
337
|
-
| Kiro | IDE | `asc adapter --kiro` | Yes (1 file) |
|
|
338
|
-
| Continue | VS Code ext | `asc adapter --continue` | Yes (1 file) |
|
|
339
|
-
| Zed | IDE | `asc adapter --zed` | Yes (1 file) |
|
|
340
|
-
| Aider | Terminal agent | `asc adapter --aider` | Yes (1 file) |
|
|
341
|
-
| Kilo Code | VS Code ext | `asc
|
|
342
|
-
| Roo Code | VS Code ext | `asc
|
|
343
|
-
| OpenHands | Agent | `asc
|
|
368
|
+
| Windsurf (legacy) | IDE | `asc global --windsurf` | No (global) — or `asc adapter --windsurf` |
|
|
369
|
+
| Cline | VS Code ext | `asc global --cline` | No (global) — or `asc adapter --cline` |
|
|
370
|
+
| GitHub Copilot | VS Code ext | `asc global --copilot` | No (global) — or `asc adapter --copilot` |
|
|
371
|
+
| Kiro | IDE | `asc adapter --kiro` | Yes (1 file) — global via `asc global --kiro` (buggy in some builds) |
|
|
372
|
+
| Continue | VS Code ext | `asc adapter --continue` | Yes (1 file) — or global config.yaml rules |
|
|
373
|
+
| Zed | IDE | `asc adapter --zed` | Yes (1 file) — or default rule in Rules Library |
|
|
374
|
+
| Aider | Terminal agent | `asc adapter --aider` | Yes (1 file) — or `read:` pointer in `~/.aider.conf.yml` |
|
|
375
|
+
| Kilo Code | VS Code ext | `asc global --kilocode` | No (global) — or `asc adapter --kilocode` |
|
|
376
|
+
| Roo Code | VS Code ext | `asc global --roo` | No (global) — discontinued May 2026 |
|
|
377
|
+
| OpenHands | Agent | `asc global --openhands` | No (global) — or `asc adapter --openhands` |
|
|
344
378
|
|
|
345
379
|
---
|
|
346
380
|
|
|
@@ -363,6 +397,7 @@ Available on plugin hosts (Claude Code, Codex, Gemini CLI):
|
|
|
363
397
|
|
|
364
398
|
```bash
|
|
365
399
|
asc adapter [--cursor|--devin|--windsurf|--cline|--copilot|--kiro|--continue|--zed|--aider|--kilocode|--roo|--openhands|--all]
|
|
400
|
+
asc global [--antigravity|--cline|--kilocode|--kiro|--openhands|--windsurf|--copilot|--roo|--all]
|
|
366
401
|
asc uninstall [--dry-run]
|
|
367
402
|
asc clean [--dry-run]
|
|
368
403
|
asc status
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Commands:
|
|
6
6
|
* adapter Generate instruction-tier adapter files for IDEs without plugin support
|
|
7
|
+
* global Install rules to user-level (global) locations, applies to all projects
|
|
7
8
|
* uninstall Remove ASC adapter files from the current project
|
|
8
9
|
* clean Remove v4 per-project artifacts (.agent-context/, bridge files)
|
|
9
10
|
* status Show detected IDEs and install hints
|
|
@@ -25,10 +26,13 @@ function printUsage() {
|
|
|
25
26
|
console.log('Plugin install (always-on, no per-project files):');
|
|
26
27
|
console.log(' Claude Code: /plugin marketplace add fatidaprilian/Agentic-Senior-Core');
|
|
27
28
|
console.log(' Codex CLI: codex plugins install agentic-senior-core\n');
|
|
29
|
+
console.log('Global install (all projects, zero project files):');
|
|
30
|
+
console.log(' asc global --antigravity --cline --kilocode --kiro --openhands --windsurf --copilot --all\n');
|
|
28
31
|
console.log('Adapter install (one file per project):');
|
|
29
32
|
console.log(' asc adapter --cursor --devin --cline --copilot --kiro --continue --zed --aider --kilocode --roo --openhands --windsurf --all\n');
|
|
30
33
|
console.log('Commands:');
|
|
31
34
|
console.log(' adapter Generate instruction-tier adapter files');
|
|
35
|
+
console.log(' global Install rules to user-level (global) locations');
|
|
32
36
|
console.log(' uninstall Remove ASC adapter files from this project');
|
|
33
37
|
console.log(' clean Remove v4 per-project artifacts');
|
|
34
38
|
console.log(' status Show detected IDEs and install hints');
|
|
@@ -57,6 +61,12 @@ async function main() {
|
|
|
57
61
|
return;
|
|
58
62
|
}
|
|
59
63
|
|
|
64
|
+
if (commandArgument === 'global') {
|
|
65
|
+
const { runGlobalCommand } = await import('../lib/cli/commands/global.mjs');
|
|
66
|
+
await runGlobalCommand(commandArguments);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
60
70
|
if (commandArgument === 'uninstall') {
|
|
61
71
|
const { runUninstallCommand } = await import('../lib/cli/commands/uninstall.mjs');
|
|
62
72
|
await runUninstallCommand(commandArguments);
|
package/gemini-extension.json
CHANGED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
7
|
+
const currentDirectoryPath = path.dirname(currentFilePath);
|
|
8
|
+
const REPOSITORY_ROOT = path.resolve(currentDirectoryPath, '..', '..', '..');
|
|
9
|
+
const HOME = os.homedir();
|
|
10
|
+
|
|
11
|
+
const ASC_MARKER = '# Agentic Senior Core';
|
|
12
|
+
|
|
13
|
+
function vscodeUserPromptsDirectory() {
|
|
14
|
+
if (process.platform === 'win32') {
|
|
15
|
+
return path.join(process.env.APPDATA ?? path.join(HOME, 'AppData', 'Roaming'), 'Code', 'User', 'prompts');
|
|
16
|
+
}
|
|
17
|
+
if (process.platform === 'darwin') {
|
|
18
|
+
return path.join(HOME, 'Library', 'Application Support', 'Code', 'User', 'prompts');
|
|
19
|
+
}
|
|
20
|
+
return path.join(HOME, '.config', 'Code', 'User', 'prompts');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const GLOBAL_TARGETS = {
|
|
24
|
+
antigravity: {
|
|
25
|
+
label: 'Google Antigravity IDE',
|
|
26
|
+
kind: 'directory',
|
|
27
|
+
sourcePath: '.agents/plugins/agentic-senior-core',
|
|
28
|
+
targetPath: () => path.join(HOME, '.gemini', 'config', 'plugins', 'agentic-senior-core'),
|
|
29
|
+
note: 'Full plugin bundle (rules + skills), always-on in every project.',
|
|
30
|
+
},
|
|
31
|
+
cline: {
|
|
32
|
+
label: 'Cline',
|
|
33
|
+
kind: 'file',
|
|
34
|
+
sourcePath: '.clinerules/agentic-senior-core.md',
|
|
35
|
+
targetPath: () => path.join(HOME, 'Documents', 'Cline', 'Rules', 'agentic-senior-core.md'),
|
|
36
|
+
note: 'Toggleable in the Cline rules panel.',
|
|
37
|
+
},
|
|
38
|
+
roo: {
|
|
39
|
+
label: 'Roo Code',
|
|
40
|
+
kind: 'file',
|
|
41
|
+
sourcePath: '.roo/rules/agentic-senior-core.md',
|
|
42
|
+
targetPath: () => path.join(HOME, '.roo', 'rules', 'agentic-senior-core.md'),
|
|
43
|
+
note: 'Roo Code was discontinued in May 2026; kept for existing installs.',
|
|
44
|
+
},
|
|
45
|
+
kilocode: {
|
|
46
|
+
label: 'Kilo Code',
|
|
47
|
+
kind: 'file',
|
|
48
|
+
sourcePath: '.kilocode/rules/agentic-senior-core.md',
|
|
49
|
+
targetPath: () => path.join(HOME, '.kilocode', 'rules', 'agentic-senior-core.md'),
|
|
50
|
+
note: 'Kilo v7+: prefer adding the file path to the instructions array in ~/.config/kilo/kilo.jsonc (auto-updates with npm).',
|
|
51
|
+
},
|
|
52
|
+
kiro: {
|
|
53
|
+
label: 'Kiro',
|
|
54
|
+
kind: 'file',
|
|
55
|
+
sourcePath: '.kiro/steering/agentic-senior-core.md',
|
|
56
|
+
targetPath: () => path.join(HOME, '.kiro', 'steering', 'agentic-senior-core.md'),
|
|
57
|
+
note: 'Global steering has known loading bugs in some Kiro builds; fall back to asc adapter --kiro if rules are not picked up.',
|
|
58
|
+
},
|
|
59
|
+
openhands: {
|
|
60
|
+
label: 'OpenHands',
|
|
61
|
+
kind: 'file',
|
|
62
|
+
sourcePath: '.openhands/microagents/agentic-senior-core.md',
|
|
63
|
+
targetPath: () => path.join(HOME, '.openhands', 'microagents', 'agentic-senior-core.md'),
|
|
64
|
+
note: 'Works in CLI/headless/dev modes. Docker runs need the directory mounted.',
|
|
65
|
+
},
|
|
66
|
+
windsurf: {
|
|
67
|
+
label: 'Windsurf / Devin Desktop',
|
|
68
|
+
kind: 'guarded-file',
|
|
69
|
+
sourcePath: '.windsurf/rules/agentic-senior-core.md',
|
|
70
|
+
targetPath: () => path.join(HOME, '.codeium', 'windsurf', 'memories', 'global_rules.md'),
|
|
71
|
+
note: 'Single global file (6,000 char limit). Skipped if you already have your own global_rules.md.',
|
|
72
|
+
},
|
|
73
|
+
copilot: {
|
|
74
|
+
label: 'GitHub Copilot (VS Code)',
|
|
75
|
+
kind: 'copilot-user-instructions',
|
|
76
|
+
sourcePath: '.github/copilot-instructions.md',
|
|
77
|
+
targetPath: () => path.join(vscodeUserPromptsDirectory(), 'agentic-senior-core.instructions.md'),
|
|
78
|
+
note: 'Installs into the VS Code default profile. Other profiles need their own copy.',
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const MANUAL_TARGETS = [
|
|
83
|
+
{ label: 'Cursor', hint: 'Settings > Rules > User Rules: paste the contents of AGENTS.md (plain text only, no global rules file support).' },
|
|
84
|
+
{ label: 'Zed', hint: 'Rules Library (Agent Panel): create a rule from AGENTS.md and mark it as default (paper clip icon).' },
|
|
85
|
+
{ label: 'Continue', hint: 'Global config.yaml: add a rules block referencing AGENTS.md content.' },
|
|
86
|
+
{ label: 'Aider', hint: `~/.aider.conf.yml: add "read: ${path.join(REPOSITORY_ROOT, 'CONVENTIONS.md')}" (absolute path auto-updates with npm).` },
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
async function pathExists(filePath) {
|
|
90
|
+
try {
|
|
91
|
+
await fs.access(filePath);
|
|
92
|
+
return true;
|
|
93
|
+
} catch {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async function installGlobalTarget(targetKey) {
|
|
99
|
+
const target = GLOBAL_TARGETS[targetKey];
|
|
100
|
+
const sourcePath = path.join(REPOSITORY_ROOT, target.sourcePath);
|
|
101
|
+
const targetPath = target.targetPath();
|
|
102
|
+
|
|
103
|
+
if (!(await pathExists(sourcePath))) {
|
|
104
|
+
console.error(` ${target.label}: source not found (${sourcePath}) ... FAIL`);
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (target.kind === 'directory') {
|
|
109
|
+
await fs.mkdir(path.dirname(targetPath), { recursive: true });
|
|
110
|
+
await fs.cp(sourcePath, targetPath, { recursive: true, force: true });
|
|
111
|
+
console.log(` ${target.label}: ${targetPath} ... OK`);
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (target.kind === 'guarded-file') {
|
|
116
|
+
if (await pathExists(targetPath)) {
|
|
117
|
+
const existingContent = await fs.readFile(targetPath, 'utf8');
|
|
118
|
+
if (!existingContent.startsWith(ASC_MARKER)) {
|
|
119
|
+
console.log(` ${target.label}: existing ${path.basename(targetPath)} found (not ASC) ... SKIPPED`);
|
|
120
|
+
console.log(' Append the contents of AGENTS.md manually to keep your own rules.');
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
await fs.mkdir(path.dirname(targetPath), { recursive: true });
|
|
125
|
+
await fs.copyFile(sourcePath, targetPath);
|
|
126
|
+
console.log(` ${target.label}: ${targetPath} ... OK`);
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (target.kind === 'copilot-user-instructions') {
|
|
131
|
+
const rulesContent = await fs.readFile(sourcePath, 'utf8');
|
|
132
|
+
const instructionsContent = `---\napplyTo: '**'\n---\n\n${rulesContent}`;
|
|
133
|
+
await fs.mkdir(path.dirname(targetPath), { recursive: true });
|
|
134
|
+
await fs.writeFile(targetPath, instructionsContent);
|
|
135
|
+
console.log(` ${target.label}: ${targetPath} ... OK`);
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
await fs.mkdir(path.dirname(targetPath), { recursive: true });
|
|
140
|
+
await fs.copyFile(sourcePath, targetPath);
|
|
141
|
+
console.log(` ${target.label}: ${targetPath} ... OK`);
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function printGlobalUsage() {
|
|
146
|
+
console.log('Agentic Senior Core -- Global Install\n');
|
|
147
|
+
console.log('Installs rules to user-level locations. Applies to ALL projects, zero project files.\n');
|
|
148
|
+
console.log('Usage: asc global [--antigravity] [--cline] [--kilocode] [--kiro] [--openhands] [--windsurf] [--copilot] [--roo] [--all]\n');
|
|
149
|
+
console.log('Available targets:');
|
|
150
|
+
for (const [key, target] of Object.entries(GLOBAL_TARGETS)) {
|
|
151
|
+
console.log(` --${key.padEnd(12)} ${target.label.padEnd(28)} -> ${target.targetPath()}`);
|
|
152
|
+
}
|
|
153
|
+
console.log('\nManual setup (no global rules file support):');
|
|
154
|
+
for (const manual of MANUAL_TARGETS) {
|
|
155
|
+
console.log(` ${manual.label.padEnd(10)} ${manual.hint}`);
|
|
156
|
+
}
|
|
157
|
+
console.log('\nNote: these are static copies. After npm update -g, re-run asc global to refresh.');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export async function runGlobalCommand(commandArguments) {
|
|
161
|
+
const requestedTargets = [];
|
|
162
|
+
|
|
163
|
+
for (const argument of commandArguments) {
|
|
164
|
+
if (argument === '--all') {
|
|
165
|
+
requestedTargets.push(...Object.keys(GLOBAL_TARGETS));
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const targetKey = argument.replace(/^--/, '');
|
|
170
|
+
if (GLOBAL_TARGETS[targetKey]) {
|
|
171
|
+
requestedTargets.push(targetKey);
|
|
172
|
+
} else if (argument.startsWith('--')) {
|
|
173
|
+
console.error(`Unknown option: ${argument}`);
|
|
174
|
+
console.log(`Available targets: ${Object.keys(GLOBAL_TARGETS).map(k => `--${k}`).join(', ')}, --all`);
|
|
175
|
+
process.exit(1);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (requestedTargets.length === 0) {
|
|
180
|
+
printGlobalUsage();
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
console.log('Agentic Senior Core -- Installing global rules\n');
|
|
185
|
+
|
|
186
|
+
let successCount = 0;
|
|
187
|
+
for (const targetKey of requestedTargets) {
|
|
188
|
+
const success = await installGlobalTarget(targetKey);
|
|
189
|
+
if (success) successCount++;
|
|
190
|
+
const note = GLOBAL_TARGETS[targetKey].note;
|
|
191
|
+
if (note) console.log(` ${note}`);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
console.log(`\n${successCount}/${requestedTargets.length} global target(s) installed.`);
|
|
195
|
+
console.log('Static copies do not auto-update: re-run asc global after npm update -g.');
|
|
196
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryuenn3123/agentic-senior-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Universal AI coding rules. Write code like a staff engineer, not a junior.",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"bin/",
|
|
13
13
|
"lib/cli/commands/adapter.mjs",
|
|
14
|
+
"lib/cli/commands/global.mjs",
|
|
14
15
|
"lib/cli/commands/clean.mjs",
|
|
15
16
|
"lib/cli/commands/uninstall.mjs",
|
|
16
17
|
"lib/cli/commands/status.mjs",
|
package/plugin.yaml
CHANGED