@ryuenn3123/agentic-senior-core 5.8.1 → 5.8.3
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/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +7 -6
- package/.agents/rules/agentic-senior-core.md +7 -6
- package/.claude-plugin/plugin.json +1 -1
- package/.clinerules/agentic-senior-core.md +7 -4
- package/.codex-plugin/plugin.json +1 -1
- package/.continue/rules/agentic-senior-core.md +7 -4
- package/.cursor/rules/agentic-senior-core.mdc +7 -4
- package/.devin/rules/agentic-senior-core.md +7 -4
- package/.devin-plugin/plugin.json +1 -1
- package/.github/copilot-instructions.md +7 -4
- package/.github/plugin/plugin.json +1 -1
- package/.kilocode/rules/agentic-senior-core.md +7 -4
- package/.kiro/steering/agentic-senior-core.md +7 -4
- package/.openhands/microagents/agentic-senior-core.md +7 -4
- package/.roo/rules/agentic-senior-core.md +7 -4
- package/.windsurf/rules/agentic-senior-core.md +7 -4
- package/.zed/rules/agentic-senior-core.md +7 -4
- package/AGENTS.md +7 -6
- package/CONVENTIONS.md +7 -4
- package/README.md +8 -19
- package/gemini-extension.json +1 -1
- package/lib/cli/commands/global.mjs +77 -4
- package/package.json +1 -1
- package/plugin.yaml +1 -1
|
@@ -55,14 +55,15 @@ Before writing any code, stop at the first step that holds:
|
|
|
55
55
|
- Distinguish client errors (4xx) from server errors (5xx).
|
|
56
56
|
- Surface every operational error with context. Empty catch blocks mask production issues.
|
|
57
57
|
|
|
58
|
-
For domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience), use `/asc-reference`.
|
|
59
|
-
|
|
60
58
|
## Workflow
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
Recognize the scenario and offer the matching command — user decides
|
|
61
|
+
whether to invoke it. Skip this for trivial edits.
|
|
62
|
+
|
|
63
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
64
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
65
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
66
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
66
67
|
|
|
67
68
|
## Response Style
|
|
68
69
|
|
|
@@ -55,14 +55,15 @@ Before writing any code, stop at the first step that holds:
|
|
|
55
55
|
- Distinguish client errors (4xx) from server errors (5xx).
|
|
56
56
|
- Surface every operational error with context. Empty catch blocks mask production issues.
|
|
57
57
|
|
|
58
|
-
For domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience), use `/asc-reference`.
|
|
59
|
-
|
|
60
58
|
## Workflow
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
Recognize the scenario and offer the matching command — user decides
|
|
61
|
+
whether to invoke it. Skip this for trivial edits.
|
|
62
|
+
|
|
63
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
64
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
65
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
66
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
66
67
|
|
|
67
68
|
## Response Style
|
|
68
69
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
|
@@ -93,10 +93,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
93
93
|
|
|
94
94
|
## Workflow
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
Recognize the scenario and offer the matching command — user decides
|
|
97
|
+
whether to invoke it. Skip this for trivial edits.
|
|
98
|
+
|
|
99
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
100
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
101
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
102
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
100
103
|
|
|
101
104
|
## Response Style
|
|
102
105
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
package/AGENTS.md
CHANGED
|
@@ -50,14 +50,15 @@ Before writing any code, stop at the first step that holds:
|
|
|
50
50
|
- Distinguish client errors (4xx) from server errors (5xx).
|
|
51
51
|
- Surface every operational error with context. Empty catch blocks mask production issues.
|
|
52
52
|
|
|
53
|
-
For domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience), use `/asc-reference`.
|
|
54
|
-
|
|
55
53
|
## Workflow
|
|
56
54
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
Recognize the scenario and offer the matching command — user decides
|
|
56
|
+
whether to invoke it. Skip this for trivial edits.
|
|
57
|
+
|
|
58
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
59
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
60
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
61
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
61
62
|
|
|
62
63
|
## Response Style
|
|
63
64
|
|
package/CONVENTIONS.md
CHANGED
|
@@ -88,10 +88,13 @@ Before writing any code, stop at the first step that holds:
|
|
|
88
88
|
|
|
89
89
|
## Workflow
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
Recognize the scenario and offer the matching command — user decides
|
|
92
|
+
whether to invoke it. Skip this for trivial edits.
|
|
93
|
+
|
|
94
|
+
- Domain-specific rules (Testing, API Design, Database, Frontend, Infrastructure, Resilience) → `/asc-reference`
|
|
95
|
+
- New project from scratch → `/asc-new-project` (define/spec gate before implementation)
|
|
96
|
+
- Non-trivial feature in an existing codebase → `/asc-add-feature` (research/plan gate before implementation)
|
|
97
|
+
- Refactor spanning multiple files or changing architecture → `/asc-refactor` (classifies scope, gates on high-level changes)
|
|
95
98
|
|
|
96
99
|
## Response Style
|
|
97
100
|
|
package/README.md
CHANGED
|
@@ -227,7 +227,7 @@ cp "$(npm root -g)/@ryuenn3123/agentic-senior-core/.agents/rules/agentic-senior-
|
|
|
227
227
|
|
|
228
228
|
Antigravity IDE reads it automatically with `trigger: always_on`.
|
|
229
229
|
|
|
230
|
-
**Option B -- global
|
|
230
|
+
**Option B -- global install (all projects):**
|
|
231
231
|
|
|
232
232
|
One command (works on all platforms):
|
|
233
233
|
|
|
@@ -235,26 +235,15 @@ One command (works on all platforms):
|
|
|
235
235
|
asc global --antigravity
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
This installs:
|
|
239
|
+
- **Skills** (`/asc-review`, `/asc-audit`, `/asc-refactor`, `/asc-reference`, `/asc-debt`, etc.) → `~/.gemini/config/skills/` (one folder per skill)
|
|
240
|
+
- **Rules** → `~/.gemini/GEMINI.md` (appended if you already have content; ASC section is replaced on re-runs)
|
|
239
241
|
|
|
240
|
-
|
|
241
|
-
# Windows (PowerShell)
|
|
242
|
-
Copy-Item -Recurse -Force "$env:APPDATA\npm\node_modules\@ryuenn3123\agentic-senior-core\.agents\plugins\agentic-senior-core" "$env:USERPROFILE\.gemini\config\plugins\agentic-senior-core"
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
```cmd
|
|
246
|
-
:: Windows (cmd.exe)
|
|
247
|
-
xcopy /E /I /Y "%APPDATA%\npm\node_modules\@ryuenn3123\agentic-senior-core\.agents\plugins\agentic-senior-core" "%USERPROFILE%\.gemini\config\plugins\agentic-senior-core"
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
```bash
|
|
251
|
-
# macOS / Linux
|
|
252
|
-
cp -r "$(npm root -g)/@ryuenn3123/agentic-senior-core/.agents/plugins/agentic-senior-core" ~/.gemini/config/plugins/
|
|
253
|
-
```
|
|
242
|
+
If you previously installed to `~/.gemini/config/plugins/agentic-senior-core/` (v5.8.2 or earlier), the old path is cleaned up automatically.
|
|
254
243
|
|
|
255
|
-
|
|
244
|
+
> Note: `npm update -g` refreshes the npm package only. The global copy does not auto-update -- re-run `asc global --antigravity` after each update.
|
|
256
245
|
|
|
257
|
-
>
|
|
246
|
+
> **WSL / dual-environment:** `asc global --antigravity` writes to the HOME directory of the current environment. If you use both Windows native and WSL, run it separately in each terminal. The same applies to `agy plugin install` for Antigravity CLI.
|
|
258
247
|
|
|
259
248
|
</details>
|
|
260
249
|
|
|
@@ -300,7 +289,7 @@ asc global --all
|
|
|
300
289
|
|
|
301
290
|
| Tool | Global location | Notes |
|
|
302
291
|
|------|----------------|-------|
|
|
303
|
-
| Google Antigravity IDE | `~/.gemini/config/
|
|
292
|
+
| Google Antigravity IDE | `~/.gemini/config/skills/` + `~/.gemini/GEMINI.md` | Skills + rules, always-on |
|
|
304
293
|
| Cline | `~/Documents/Cline/Rules/` | Toggleable in the Cline rules panel |
|
|
305
294
|
| Kilo Code | `~/.kilocode/rules/` | Or point `instructions:` in `~/.config/kilo/kilo.jsonc` at the npm package path — that variant auto-updates |
|
|
306
295
|
| Kiro | `~/.kiro/steering/` | Some builds have global-steering loading bugs; fall back to `asc adapter --kiro` |
|
package/gemini-extension.json
CHANGED
|
@@ -20,13 +20,18 @@ function vscodeUserPromptsDirectory() {
|
|
|
20
20
|
return path.join(HOME, '.config', 'Code', 'User', 'prompts');
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const OLD_ANTIGRAVITY_PLUGIN_PATH = path.join(HOME, '.gemini', 'config', 'plugins', 'agentic-senior-core');
|
|
24
|
+
|
|
23
25
|
const GLOBAL_TARGETS = {
|
|
24
26
|
antigravity: {
|
|
25
27
|
label: 'Google Antigravity IDE',
|
|
26
|
-
kind: '
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
kind: 'antigravity-ide',
|
|
29
|
+
skillsSourcePath: '.agents/plugins/agentic-senior-core/skills',
|
|
30
|
+
rulesSourcePath: '.agents/rules/agentic-senior-core.md',
|
|
31
|
+
skillsTargetDir: () => path.join(HOME, '.gemini', 'config', 'skills'),
|
|
32
|
+
rulesTargetPath: () => path.join(HOME, '.gemini', 'GEMINI.md'),
|
|
33
|
+
targetPath: () => `${path.join(HOME, '.gemini', 'config', 'skills')}${path.sep} + GEMINI.md`,
|
|
34
|
+
note: 'Skills in ~/.gemini/config/skills/, rules in ~/.gemini/GEMINI.md. Always-on in every project.',
|
|
30
35
|
},
|
|
31
36
|
cline: {
|
|
32
37
|
label: 'Cline',
|
|
@@ -97,6 +102,11 @@ async function pathExists(filePath) {
|
|
|
97
102
|
|
|
98
103
|
async function installGlobalTarget(targetKey) {
|
|
99
104
|
const target = GLOBAL_TARGETS[targetKey];
|
|
105
|
+
|
|
106
|
+
if (target.kind === 'antigravity-ide') {
|
|
107
|
+
return await installAntigravityIde(target);
|
|
108
|
+
}
|
|
109
|
+
|
|
100
110
|
const sourcePath = path.join(REPOSITORY_ROOT, target.sourcePath);
|
|
101
111
|
const targetPath = target.targetPath();
|
|
102
112
|
|
|
@@ -142,6 +152,69 @@ async function installGlobalTarget(targetKey) {
|
|
|
142
152
|
return true;
|
|
143
153
|
}
|
|
144
154
|
|
|
155
|
+
async function installAntigravityIde(target) {
|
|
156
|
+
const skillsSource = path.join(REPOSITORY_ROOT, target.skillsSourcePath);
|
|
157
|
+
const rulesSource = path.join(REPOSITORY_ROOT, target.rulesSourcePath);
|
|
158
|
+
const skillsTargetDir = target.skillsTargetDir();
|
|
159
|
+
const rulesTargetPath = target.rulesTargetPath();
|
|
160
|
+
|
|
161
|
+
if (!(await pathExists(skillsSource))) {
|
|
162
|
+
console.error(` ${target.label}: skills source not found (${skillsSource}) ... FAIL`);
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
if (!(await pathExists(rulesSource))) {
|
|
166
|
+
console.error(` ${target.label}: rules source not found (${rulesSource}) ... FAIL`);
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Copy each skill folder flat into ~/.gemini/config/skills/<skill-name>/
|
|
171
|
+
const skillFolders = await fs.readdir(skillsSource, { withFileTypes: true });
|
|
172
|
+
const skillNames = skillFolders.filter(entry => entry.isDirectory()).map(entry => entry.name);
|
|
173
|
+
|
|
174
|
+
await fs.mkdir(skillsTargetDir, { recursive: true });
|
|
175
|
+
for (const skillName of skillNames) {
|
|
176
|
+
const source = path.join(skillsSource, skillName);
|
|
177
|
+
const destination = path.join(skillsTargetDir, skillName);
|
|
178
|
+
await fs.cp(source, destination, { recursive: true, force: true });
|
|
179
|
+
}
|
|
180
|
+
console.log(` ${target.label}: ${skillNames.length} skills -> ${skillsTargetDir} ... OK`);
|
|
181
|
+
|
|
182
|
+
// Append rules to ~/.gemini/GEMINI.md (guarded: replace ASC section if present, append if not)
|
|
183
|
+
const rulesContent = await fs.readFile(rulesSource, 'utf8');
|
|
184
|
+
// Strip frontmatter (trigger: always_on) — GEMINI.md is always loaded, no frontmatter needed
|
|
185
|
+
const rulesBody = rulesContent.replace(/^---[\s\S]*?---\n*/, '');
|
|
186
|
+
// rulesBody already starts with '# Agentic Senior Core' which matches ASC_MARKER
|
|
187
|
+
const ascSection = `\n\n${rulesBody.trim()}\n`;
|
|
188
|
+
|
|
189
|
+
await fs.mkdir(path.dirname(rulesTargetPath), { recursive: true });
|
|
190
|
+
|
|
191
|
+
if (await pathExists(rulesTargetPath)) {
|
|
192
|
+
const existingContent = await fs.readFile(rulesTargetPath, 'utf8');
|
|
193
|
+
if (existingContent.includes(ASC_MARKER)) {
|
|
194
|
+
// Replace existing ASC section (from marker to end-of-file or next top-level heading)
|
|
195
|
+
const markerIndex = existingContent.indexOf(ASC_MARKER);
|
|
196
|
+
const beforeAsc = existingContent.substring(0, markerIndex).trimEnd();
|
|
197
|
+
await fs.writeFile(rulesTargetPath, beforeAsc + ascSection);
|
|
198
|
+
console.log(` ${target.label}: rules updated in ${rulesTargetPath} ... OK`);
|
|
199
|
+
} else {
|
|
200
|
+
// Append to existing content
|
|
201
|
+
await fs.writeFile(rulesTargetPath, existingContent.trimEnd() + ascSection);
|
|
202
|
+
console.log(` ${target.label}: rules appended to ${rulesTargetPath} ... OK`);
|
|
203
|
+
}
|
|
204
|
+
} else {
|
|
205
|
+
await fs.writeFile(rulesTargetPath, ascSection.trimStart());
|
|
206
|
+
console.log(` ${target.label}: rules -> ${rulesTargetPath} ... OK`);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Clean up old plugin path if it exists
|
|
210
|
+
if (await pathExists(OLD_ANTIGRAVITY_PLUGIN_PATH)) {
|
|
211
|
+
await fs.rm(OLD_ANTIGRAVITY_PLUGIN_PATH, { recursive: true, force: true });
|
|
212
|
+
console.log(` ${target.label}: cleaned up old path ${OLD_ANTIGRAVITY_PLUGIN_PATH}`);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
|
|
145
218
|
function printGlobalUsage() {
|
|
146
219
|
console.log('Agentic Senior Core -- Global Install\n');
|
|
147
220
|
console.log('Installs rules to user-level locations. Applies to ALL projects, zero project files.\n');
|
package/package.json
CHANGED
package/plugin.yaml
CHANGED