@softspark/ai-toolkit 1.3.15 → 1.4.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/CHANGELOG.md CHANGED
@@ -7,6 +7,35 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v1.4.0 — Full Platform Parity: 11 Editors, Directory-Based Rules, --editors Flag (2026-04-09)
11
+
12
+ ### Added
13
+ - **Google Antigravity support** — new editor integration with `.agent/rules/` (6 rule files) and `.agent/workflows/` (13 workflow templates with YAML frontmatter). Full agent/skill catalog parity with other platforms.
14
+ - **Directory-based rules for all editors** — every platform now gets modern directory-based configs in addition to legacy single-file formats:
15
+ - Cursor: `.cursor/rules/*.mdc` with YAML frontmatter (`alwaysApply`, `globs`, `description`)
16
+ - Windsurf: `.windsurf/rules/*.md`
17
+ - Cline: `.cline/rules/*.md`
18
+ - Roo Code: `.roo/rules/*.md` (shared rules for all modes)
19
+ - Augment: `.augment/rules/ai-toolkit-*.md` with `auto_attached` globs per file type
20
+ - Aider: `CONVENTIONS.md` (auto-loaded as read-only context)
21
+ - **`--editors` flag** for `install --local` — selective editor installation:
22
+ - `--editors all` — install all 8 editors
23
+ - `--editors cursor,aider` — install only selected
24
+ - (no flag) — auto-detect from existing project files
25
+ - `update --local` auto-detects editors from existing configs
26
+ - **`--lang` flag** — explicit language selection for rules (`--lang typescript`, `--lang go,python`) with aliases (`go`→`golang`, `c++`→`cpp`, `cs`→`csharp`)
27
+ - **Two-phase language detection** — marker files (package.json, go.mod, etc.) + source file extension scanning (.py, .ts, .go, etc.)
28
+ - **Shared rule content module** (`dir_rules_shared.py`) — all platforms get identical agent/skill catalog, guidelines, and rules from a single source of truth
29
+ - **7 new CLI commands**: `cursor-mdc`, `windsurf-dir-rules`, `cline-dir-rules`, `roo-dir-rules`, `augment-dir-rules`, `conventions-md`, `antigravity-rules`
30
+ - **71 generator tests** — file existence, content verification, user file preservation, idempotency, stale cleanup, cross-platform parity check
31
+
32
+ ### Changed
33
+ - `install --local` now installs only Claude Code configs by default (no editor bloat); editors require `--editors` flag or auto-detect from existing files
34
+ - All directory-based generators use `ai-toolkit-` prefix to prevent overwriting user files
35
+ - Total test count: 377 → 408
36
+
37
+ ---
38
+
10
39
  ## v1.3.15 — Quality Guardrails: Anti-Rationalization, Confidence Scoring, Verification Checklists (2026-04-08)
11
40
 
12
41
  ### Added
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # ai-toolkit
2
2
 
3
- > Professional-grade AI coding toolkit with multi-platform support. Machine-enforced safety, 91 skills, 44 agents, expanded lifecycle hooks, persona presets, experimental opt-in plugin packs, and benchmark tooling — works with Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, and Augment, ready in 60 seconds.
3
+ > Professional-grade AI coding toolkit with multi-platform support. Machine-enforced safety, 91 skills, 44 agents, expanded lifecycle hooks, persona presets, experimental opt-in plugin packs, and benchmark tooling — works with Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, and Google Antigravity, ready in 60 seconds.
4
4
 
5
5
  [![CI](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
7
  [![Skills](https://img.shields.io/badge/skills-91-brightgreen)](app/skills/)
8
8
  [![Agents](https://img.shields.io/badge/agents-44-blue)](app/agents/)
9
- [![Tests](https://img.shields.io/badge/tests-377%20passing-success)](tests/)
9
+ [![Tests](https://img.shields.io/badge/tests-408%20passing-success)](tests/)
10
10
 
11
11
  ---
12
12
 
@@ -112,20 +112,21 @@ Replaces all symlinks with real files, inlines rules into CLAUDE.md, copies cons
112
112
 
113
113
  ## Platform Support
114
114
 
115
- | Platform | Config File | How | Scope |
116
- |----------|------------|-----|-------|
115
+ | Platform | Config Files | How | Scope |
116
+ |----------|-------------|-----|-------|
117
117
  | Claude Code | `~/.claude/` | `ai-toolkit install` | global |
118
- | Cursor | `~/.cursor/rules` | `ai-toolkit install` | global |
119
- | Windsurf | `~/.codeium/windsurf/memories/global_rules.md` | `ai-toolkit install` | global |
118
+ | Cursor | `~/.cursor/rules` + `.cursor/rules/*.mdc` | `ai-toolkit install` / `--local` | global + project |
119
+ | Windsurf | `~/.codeium/.../global_rules.md` + `.windsurf/rules/*.md` | `ai-toolkit install` / `--local` | global + project |
120
120
  | Gemini CLI | `~/.gemini/GEMINI.md` | `ai-toolkit install` | global |
121
121
  | GitHub Copilot | `.github/copilot-instructions.md` | `ai-toolkit install --local` | project |
122
- | Cline | `.clinerules` | `ai-toolkit install --local` | project |
123
- | Roo Code | `.roomodes` | `ai-toolkit install --local` | project |
124
- | Aider | `.aider.conf.yml` | `ai-toolkit install --local` | project |
125
- | Augment | `.augment/rules/ai-toolkit.md` | `ai-toolkit install --local` | project |
122
+ | Cline | `.clinerules` + `.cline/rules/*.md` | `ai-toolkit install --local` | project |
123
+ | Roo Code | `.roomodes` + `.roo/rules/*.md` | `ai-toolkit install --local` | project |
124
+ | Aider | `.aider.conf.yml` + `CONVENTIONS.md` | `ai-toolkit install --local` | project |
125
+ | Augment | `.augment/rules/ai-toolkit-*.md` | `ai-toolkit install --local` | project |
126
+ | Google Antigravity | `.agent/rules/*.md` + `.agent/workflows/*.md` | `ai-toolkit install --local` | project |
126
127
  | Codex / OpenCode | `AGENTS.md` | `ai-toolkit agents-md` | project |
127
128
 
128
- > **Note:** Claude Code remains the primary platform with full feature support (agents, lifecycle hooks, safety constitution). Other platforms receive a distilled ruleset generated from the same source. For editors lacking native bash lifecycle hooks, `--local` installs a Git hooks fallback (`.git/hooks/pre-commit`) to enforce quality gates pre-commit.
129
+ > **Note:** Claude Code is always installed (primary platform with full feature support). Other editors are installed on demand with `--editors <list>` or auto-detected from existing project files. All platforms receive the same agent/skill catalog, guidelines, and rules. For editors lacking native bash lifecycle hooks, `--local` installs a Git hooks fallback (`.git/hooks/pre-commit`) to enforce quality gates pre-commit.
129
130
 
130
131
  ---
131
132
 
@@ -523,7 +524,7 @@ ai-toolkit install --local --lang typescript # explicit language selection
523
524
  ai-toolkit install --local --lang go,python # multiple languages
524
525
  ```
525
526
 
526
- `--local` automatically detects languages (via package.json, go.mod, Cargo.toml, etc.) no need for `--auto-detect`. Rules are injected into `CLAUDE.md` and auto-updated on `ai-toolkit update --local`.
527
+ `--local` automatically detects languages using two-phase detection: config markers (package.json, go.mod, Cargo.toml, etc.) plus source file extension scanning (.py, .ts, .go, etc.). `--lang` accepts aliases (`go`, `c++`, `cs`). Rules are injected into `CLAUDE.md` and auto-updated on `ai-toolkit update --local`.
527
528
 
528
529
  ---
529
530
 
@@ -759,7 +760,14 @@ Usage: ai-toolkit <command> [options]
759
760
  | `cline-rules` | Generate `.clinerules` in current dir |
760
761
  | `roo-modes` | Generate `.roomodes` in current dir |
761
762
  | `aider-conf` | Generate `.aider.conf.yml` in current dir |
762
- | `augment-rules` | Generate `.augment/rules/ai-toolkit.md` in current dir |
763
+ | `conventions-md` | Generate `CONVENTIONS.md` for Aider (auto-loaded) |
764
+ | `augment-rules` | Generate `.augment/rules/ai-toolkit.md` (legacy single file) |
765
+ | `augment-dir-rules` | Generate `.augment/rules/ai-toolkit-*.md` (recommended) |
766
+ | `cursor-mdc` | Generate `.cursor/rules/*.mdc` for Cursor (recommended) |
767
+ | `windsurf-dir-rules` | Generate `.windsurf/rules/*.md` for Windsurf |
768
+ | `cline-dir-rules` | Generate `.cline/rules/*.md` for Cline |
769
+ | `roo-dir-rules` | Generate `.roo/rules/*.md` for Roo Code |
770
+ | `antigravity-rules` | Generate `.agent/rules/` and `.agent/workflows/` for Google Antigravity |
763
771
  | `agents-md` | Regenerate `AGENTS.md` from agent definitions |
764
772
  | `llms-txt` | Generate `llms.txt` and `llms-full.txt` |
765
773
  | `generate-all` | Generate all platform configs at once |
@@ -772,11 +780,12 @@ ai-toolkit install --only agents,hooks # apply only listed components
772
780
  ai-toolkit install --skip hooks # skip listed components
773
781
  ai-toolkit install --profile minimal # profile preset: minimal | standard | strict
774
782
  ai-toolkit install --persona backend-lead # persona preset: backend-lead | frontend-lead | devops-eng | junior-dev
775
- ai-toolkit install --local # also set up project-local configs (CLAUDE.md, settings, constitution, Copilot, Cline, Roo, Aider, Git Hooks, MCP Defaults)
776
- ai-toolkit update --local # re-apply + refresh project-local configs
783
+ ai-toolkit install --local # Claude Code only (CLAUDE.md, settings, constitution, language rules)
784
+ ai-toolkit install --local --editors all # Claude Code + all editors (Cursor, Windsurf, Cline, Roo, Aider, Augment, Copilot, Antigravity)
785
+ ai-toolkit install --local --editors cursor,aider # Claude Code + specific editors
786
+ ai-toolkit update --local # re-apply; auto-detects editors from existing project files
777
787
  ai-toolkit install --list # dry-run: show what would be applied
778
788
  ai-toolkit install --modules core,agents,rules-typescript # selective module install
779
- ai-toolkit install --local # auto-detects language, installs matching rules
780
789
  ai-toolkit install --lang typescript # explicit language for rules install
781
790
  ```
782
791
 
package/bin/ai-toolkit.js CHANGED
@@ -76,17 +76,24 @@ const COMMANDS = {
76
76
  mcp: 'Manage MCP server templates (list, show, add, remove)',
77
77
  plugin: 'Manage plugin packs (install, remove, update, clean, list, status)',
78
78
  sync: 'Sync config to/from GitHub Gist (--export, --push, --pull, --import)',
79
- 'cursor-rules': 'Generate .cursorrules for Cursor IDE',
80
- 'windsurf-rules': 'Generate .windsurfrules for Windsurf',
79
+ 'cursor-rules': 'Generate .cursorrules for Cursor IDE (legacy)',
80
+ 'cursor-mdc': 'Generate .cursor/rules/*.mdc for Cursor IDE (recommended)',
81
+ 'windsurf-rules': 'Generate .windsurfrules for Windsurf (legacy)',
82
+ 'windsurf-dir-rules': 'Generate .windsurf/rules/*.md for Windsurf (recommended)',
81
83
  'copilot-instructions': 'Generate .github/copilot-instructions.md',
82
84
  'gemini-md': 'Generate GEMINI.md for Gemini CLI',
83
- 'cline-rules': 'Generate .clinerules for Cline',
85
+ 'cline-rules': 'Generate .clinerules for Cline (legacy)',
86
+ 'cline-dir-rules': 'Generate .cline/rules/*.md for Cline (recommended)',
84
87
  'roo-modes': 'Generate .roomodes for Roo Code',
88
+ 'roo-dir-rules': 'Generate .roo/rules/*.md shared rules for Roo Code',
85
89
  'aider-conf': 'Generate .aider.conf.yml for Aider',
86
- 'augment-rules': 'Generate .augment/rules/ai-toolkit.md for Augment',
90
+ 'conventions-md': 'Generate CONVENTIONS.md for Aider (auto-loaded)',
91
+ 'augment-rules': 'Generate .augment/rules/ai-toolkit.md for Augment (legacy)',
92
+ 'augment-dir-rules': 'Generate .augment/rules/ai-toolkit-*.md for Augment (recommended)',
93
+ 'antigravity-rules': 'Generate .agent/rules/ and .agent/workflows/ for Google Antigravity',
87
94
  'agents-md': 'Regenerate AGENTS.md from agent definitions',
88
95
  'llms-txt': 'Generate llms.txt and llms-full.txt',
89
- 'generate-all': 'Generate all platform configs at once (agents, cursor, windsurf, copilot, gemini, cline, roo, aider, augment, llms)',
96
+ 'generate-all': 'Generate all platform configs at once (agents, cursor, windsurf, copilot, gemini, cline, roo, aider, augment, antigravity, llms)',
90
97
  help: 'Show this help message',
91
98
  };
92
99
 
@@ -191,6 +198,9 @@ function showHelp() {
191
198
  console.log(' --local Also set up project-local configs (CLAUDE.md, settings, constitution, copilot, cline, roo, aider, git hooks)');
192
199
  console.log(' --profile <p> Install profile: minimal (agents+skills), standard (default), strict (all+git hooks)');
193
200
  console.log(' --modules <list> Install specific modules (e.g. core,agents,rules-typescript)');
201
+ console.log(' --lang <list> Explicitly select language rules (e.g. typescript, go,python)');
202
+ console.log(' --editors <list> Install editor configs: cursor,windsurf,cline,roo,aider,augment,copilot,antigravity (or "all")');
203
+ console.log(' Default with --local: auto-detect from existing project files');
194
204
  console.log(' --auto-detect Detect project languages and install matching rule modules');
195
205
  console.log(' --list, --dry-run Dry-run: show what would be applied');
196
206
  console.log('\nOptions for create:');
@@ -372,6 +382,17 @@ function handleGenerateAll(_args) {
372
382
  for (const gen of Object.values(GENERATORS)) {
373
383
  writeGeneratorOutput(gen);
374
384
  }
385
+ // Directory-based generators (multi-file output)
386
+ run(scriptPath('generate_antigravity.py'), [CWD]);
387
+ run(scriptPath('generate_cursor_mdc.py'), [CWD]);
388
+ run(scriptPath('generate_windsurf_rules.py'), [CWD]);
389
+ run(scriptPath('generate_cline_rules.py'), [CWD]);
390
+ run(scriptPath('generate_roo_rules.py'), [CWD]);
391
+ run(scriptPath('generate_augment_rules.py'), [CWD]);
392
+ // Single-file generators
393
+ const conventionsOut = runGenerator('generate_conventions.py');
394
+ fs.writeFileSync(path.join(CWD, 'CONVENTIONS.md'), conventionsOut);
395
+ console.log('Generated: CONVENTIONS.md');
375
396
  generateLlmsTxt();
376
397
  }
377
398
 
@@ -429,6 +450,13 @@ const SPECIAL_HANDLERS = {
429
450
  'inject-hook': handleInjectHook,
430
451
  'remove-hook': handleRemoveHook,
431
452
  'llms-txt': (_args) => generateLlmsTxt(),
453
+ 'antigravity-rules': (_args) => run(scriptPath('generate_antigravity.py'), [CWD]),
454
+ 'cursor-mdc': (_args) => run(scriptPath('generate_cursor_mdc.py'), [CWD]),
455
+ 'windsurf-dir-rules': (_args) => run(scriptPath('generate_windsurf_rules.py'), [CWD]),
456
+ 'cline-dir-rules': (_args) => run(scriptPath('generate_cline_rules.py'), [CWD]),
457
+ 'roo-dir-rules': (_args) => run(scriptPath('generate_roo_rules.py'), [CWD]),
458
+ 'conventions-md': (_args) => { const out = runGenerator('generate_conventions.py'); fs.writeFileSync(path.join(CWD, 'CONVENTIONS.md'), out); console.log('Generated: CONVENTIONS.md'); },
459
+ 'augment-dir-rules': (_args) => run(scriptPath('generate_augment_rules.py'), [CWD]),
432
460
  'generate-all': handleGenerateAll,
433
461
  };
434
462
 
@@ -0,0 +1,283 @@
1
+ ---
2
+ title: "SOP: Release Verification"
3
+ category: procedures
4
+ service: ai-toolkit
5
+ tags: [sop, verification, release, smoke-test, install, update, qa]
6
+ version: "1.1.0"
7
+ created: "2026-04-08"
8
+ last_updated: "2026-04-08"
9
+ description: "End-to-end smoke test after installing or updating @softspark/ai-toolkit — verifies CLI, install, doctor, validation, tests, and eject from user perspective."
10
+ ---
11
+
12
+ # SOP: Release Verification
13
+
14
+ End-to-end smoke test after installing or updating `@softspark/ai-toolkit`.
15
+ Verifies all critical paths from the user's perspective.
16
+
17
+ **Use this SOP when:**
18
+ - After `npm install -g @softspark/ai-toolkit@latest`
19
+ - After `ai-toolkit update`
20
+ - Before tagging a new version (`git tag`)
21
+ - Before publishing to npm (`npm publish`)
22
+ - As a smoke test in CI/CD
23
+
24
+ **Prerequisites:**
25
+ - Node.js >= 18, Python 3, `bats`, git
26
+ - `@softspark/ai-toolkit` installed globally
27
+
28
+ **Time:** 10-15 minutes (full), 2 minutes (quick checklist)
29
+
30
+ ---
31
+
32
+ ## Quick Checklist (TL;DR)
33
+
34
+ 9 commands — if all pass, the release is ready:
35
+
36
+ ```bash
37
+ # Pre-commit (Phase 0)
38
+ python3 scripts/generate_agents_md.py > AGENTS.md # 1. Regenerate artifacts
39
+ python3 scripts/generate_llms_txt.py > llms.txt # 2. Regenerate llms.txt
40
+ python3 scripts/validate.py --strict # 3. Validation passed?
41
+ npm test # 4. All tests passed?
42
+
43
+ # Post-install verification (Phases 1-7)
44
+ ai-toolkit --version # 5. Version OK?
45
+ ai-toolkit status # 6. Status OK?
46
+ ai-toolkit doctor # 7. Health check passed?
47
+ ai-toolkit install --dry-run # 8. Global install OK?
48
+ python3 scripts/audit_skills.py --ci # 9. Security audit clean?
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Phase 0: Pre-Commit & Pre-Push (2 min)
54
+
55
+ Run these commands **before every commit and push to main**. CI validates
56
+ counts but does NOT auto-regenerate — you must do it locally.
57
+
58
+ ```bash
59
+ # 1. Regenerate generated artifacts
60
+ python3 scripts/generate_agents_md.py > AGENTS.md
61
+ python3 scripts/generate_llms_txt.py > llms.txt
62
+ python3 scripts/generate_llms_txt.py --full > llms-full.txt
63
+
64
+ # 2. Validate everything (catches stale counts, missing assets)
65
+ python3 scripts/validate.py --strict
66
+
67
+ # 3. Security audit
68
+ python3 scripts/audit_skills.py --ci
69
+
70
+ # 4. Run tests
71
+ npm test
72
+
73
+ # 5. Stage and commit
74
+ git add AGENTS.md llms.txt llms-full.txt
75
+ git add -p # stage your other changes
76
+ git commit -m "feat: your change description"
77
+ ```
78
+
79
+ **Why local?** Branch protection on `main` requires PRs and status checks.
80
+ CI cannot push directly to `main`, so generated artifacts must be committed
81
+ by the developer as part of their PR.
82
+
83
+ **One-liner (copy-paste):**
84
+ ```bash
85
+ python3 scripts/generate_agents_md.py > AGENTS.md && python3 scripts/generate_llms_txt.py > llms.txt && python3 scripts/generate_llms_txt.py --full > llms-full.txt && python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci && npm test
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Phase 1: CLI & Version (1 min)
91
+
92
+ ```bash
93
+ ai-toolkit --version
94
+ ai-toolkit --help
95
+ which ai-toolkit
96
+ ```
97
+
98
+ **Verify:**
99
+ - [ ] `--version` returns correct semver (e.g., `1.4.0`)
100
+ - [ ] `--help` displays full command list without errors
101
+ - [ ] `which` points to global npm bin path
102
+
103
+ ---
104
+
105
+ ## Phase 2: Global Install & Status (2 min)
106
+
107
+ ```bash
108
+ ai-toolkit install --dry-run
109
+ ai-toolkit status
110
+ ```
111
+
112
+ **Verify `--dry-run`:**
113
+ - [ ] Agents >= 40
114
+ - [ ] Skills >= 80
115
+ - [ ] Hooks merged into settings.json
116
+ - [ ] "Other AI Tools" section lists cursor, windsurf, gemini, augment (antigravity via --local)
117
+
118
+ **Verify `status`:**
119
+ - [ ] Version matches expected
120
+ - [ ] Profile: minimal/standard/strict
121
+ - [ ] Modules: list of installed modules
122
+ - [ ] Latest: up to date / update available
123
+
124
+ ---
125
+
126
+ ## Phase 3: Doctor Health Check (1 min)
127
+
128
+ ```bash
129
+ ai-toolkit doctor
130
+ ```
131
+
132
+ **Expected sections (all OK):**
133
+ - Environment: node, bash, python3, bats
134
+ - Global Install: .claude exists, agents/skills symlinks (0 broken), settings.json hooks
135
+ - Hook Scripts: all present and executable
136
+ - Hook Configuration: 12 events registered
137
+ - Generated Artifacts: AGENTS.md, llms.txt, llms-full.txt
138
+ - Planned Assets: plugin.json, benchmarks, plugin packs
139
+ - Benchmark Freshness: < 30 days
140
+ - Stale Rules: all healthy
141
+
142
+ **Verify:**
143
+ - [ ] `Errors: 0 | Warnings: 0`
144
+ - [ ] `HEALTH CHECK PASSED`
145
+
146
+ If doctor detects problems: `ai-toolkit doctor --fix` auto-repairs
147
+ (broken symlinks, non-executable hooks, missing scripts, missing llms-full.txt).
148
+
149
+ ---
150
+
151
+ ## Phase 4: Local Install (2 min)
152
+
153
+ ```bash
154
+ mkdir -p /tmp/ai-toolkit-verify && cd /tmp/ai-toolkit-verify
155
+ git init -q
156
+ ai-toolkit install --local --editors all --dry-run
157
+ cd - && rm -rf /tmp/ai-toolkit-verify
158
+ ```
159
+
160
+ **Verify "Project-local" section:**
161
+ - [ ] Would create: CLAUDE.md
162
+ - [ ] Would create: .claude/settings.local.json
163
+ - [ ] Would inject: .claude/constitution.md
164
+ - [ ] Editors: all 8 listed (copilot, cursor, windsurf, cline, roo, aider, augment, antigravity)
165
+ - [ ] Would generate configs for each editor (legacy + directory-based)
166
+ - [ ] Would install: .git/hooks/pre-commit
167
+ - [ ] Would inject language rules (auto-detected)
168
+
169
+ **Also test auto-detect (no --editors flag):**
170
+ ```bash
171
+ ai-toolkit install --local --dry-run
172
+ # → Editors: none (empty project has no existing configs)
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Phase 5: Validation & Security Audit (3 min)
178
+
179
+ ```bash
180
+ python3 scripts/validate.py --strict
181
+ python3 scripts/audit_skills.py --ci
182
+ ```
183
+
184
+ **Verify validate.py:**
185
+ - [ ] Agents >= 40, Skills >= 80, Tests >= 350
186
+ - [ ] Hook events: 12, Hook scripts: >= 20
187
+ - [ ] Plugin packs >= 10, KB documents >= 20
188
+ - [ ] `Errors: 0 | Warnings: 0` → `VALIDATION PASSED`
189
+
190
+ **Verify audit_skills.py:**
191
+ - [ ] `HIGH: 0` (MUST be zero — CI fails otherwise)
192
+ - [ ] `WARN: 0`
193
+ - [ ] `INFO: N` (acceptable — broad-access skills: orchestrate, swarm, teams)
194
+
195
+ ---
196
+
197
+ ## Phase 6: Tests (3-5 min)
198
+
199
+ ```bash
200
+ npm test
201
+ ```
202
+
203
+ **Verify:**
204
+ - [ ] Bats runs tests in parallel (4 jobs)
205
+ - [ ] All `ok` — zero `not ok`
206
+ - [ ] Groups: agents, autodetect, cli, generators, guards, hooks, inject,
207
+ install, kb, mcp, readme, profiles, uninstall, validate
208
+
209
+ **Key test areas:**
210
+ - Guards: rm -rf, DROP TABLE, git push --force blocked
211
+ - Install: idempotent, profiles, --only/--skip, orphan cleanup
212
+ - Eject: real files (not symlinks), inlined rules
213
+ - Uninstall: removes toolkit, preserves user content
214
+
215
+ ---
216
+
217
+ ## Phase 7: Eject (1 min)
218
+
219
+ ```bash
220
+ mkdir -p /tmp/ai-toolkit-eject-test
221
+ cd /tmp/ai-toolkit-eject-test
222
+ ai-toolkit eject
223
+ cd - && rm -rf /tmp/ai-toolkit-eject-test
224
+ ```
225
+
226
+ **Verify:**
227
+ - [ ] Agents copied as real files (not symlinks)
228
+ - [ ] Skills copied as real directories
229
+ - [ ] Rules inlined into CLAUDE.md
230
+ - [ ] constitution.md and ARCHITECTURE.md copied
231
+
232
+ ---
233
+
234
+ ## Troubleshooting
235
+
236
+ ### `ai-toolkit: command not found`
237
+
238
+ ```bash
239
+ npm install -g @softspark/ai-toolkit
240
+ # or check PATH:
241
+ export PATH="$(npm config get prefix)/bin:$PATH"
242
+ ```
243
+
244
+ ### Doctor: broken symlinks
245
+
246
+ ```bash
247
+ ai-toolkit doctor --fix # auto-repair
248
+ ai-toolkit update # or full re-install
249
+ ```
250
+
251
+ ### Tests fail: missing bats
252
+
253
+ ```bash
254
+ brew install bats-core # macOS
255
+ npm install -g bats # cross-platform
256
+ ```
257
+
258
+ ### validate.py: stale counts
259
+
260
+ README badges don't match the current agents/skills/tests counts.
261
+ Update README.md and re-run.
262
+
263
+ ### Eject: missing skills
264
+
265
+ ```bash
266
+ ai-toolkit update # re-link missing symlinks
267
+ ai-toolkit eject /tmp/test # retry
268
+ ```
269
+
270
+ ---
271
+
272
+ ## Success Criteria
273
+
274
+ | Area | Criterion |
275
+ |------|-----------|
276
+ | CLI | `--version` correct, `--help` full list, `status` current |
277
+ | Health | `doctor`: 0 errors, 0 warnings, PASSED |
278
+ | Install | `--dry-run` correct counts, `--local` all configs |
279
+ | Quality | `validate.py --strict`: PASSED |
280
+ | Security | `audit_skills.py --ci`: 0 HIGH |
281
+ | Tests | `npm test`: N/N passed, 0 failures |
282
+ | Eject | Standalone .claude/ with real files |
283
+ | Guards | Destructive commands blocked |
@@ -3,7 +3,7 @@ title: "AI Toolkit - Architecture Overview"
3
3
  category: reference
4
4
  service: ai-toolkit
5
5
  tags: [architecture, overview, design, structure]
6
- version: "1.3.15"
6
+ version: "1.4.0"
7
7
  created: "2026-03-23"
8
8
  last_updated: "2026-04-08"
9
9
  description: "Architecture of ai-toolkit: directory layout, global install model, skill tiers, and integration with projects."
@@ -13,7 +13,7 @@ description: "Architecture of ai-toolkit: directory layout, global install model
13
13
 
14
14
  ## Purpose
15
15
 
16
- Shared, project-agnostic AI development toolkit for Claude Code (and compatible assistants like Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, and Augment). Provides specialized agents, skills (slash commands + knowledge), expanded lifecycle hooks, persona presets, and experimental opt-in plugin packs that teams can adopt separately from the default global install.
16
+ Shared, project-agnostic AI development toolkit for Claude Code (and compatible assistants like Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, and Google Antigravity). Provides specialized agents, skills (slash commands + knowledge), expanded lifecycle hooks, persona presets, and experimental opt-in plugin packs that teams can adopt separately from the default global install.
17
17
 
18
18
  ## Design Principles
19
19
 
@@ -103,14 +103,19 @@ Machine (global) Project (local)
103
103
 
104
104
  **`ai-toolkit update`** — re-apply after `npm install -g @softspark/ai-toolkit@latest` or after `add-rule` / `remove-rule`. Same as `install` but semantically correct for update flows.
105
105
 
106
- **`ai-toolkit install --local`** (or `update --local`) — run per project, creates `CLAUDE.md` template + `.claude/settings.local.json` (only if missing, initialized with MCP defaults), and injects `constitution.md` + Copilot + Cline + Roo Code + Aider configs into local `.claude/` (preserves existing user content). Installs `--local` git hooks as a fallback for quality gates. Hooks are global-only not merged into project settings.
106
+ **`ai-toolkit install --local`** — run per project. Always installs Claude Code configs (CLAUDE.md, settings.local.json, constitution.md, language rules). Editor configs are opt-in via `--editors`:
107
+ - `--editors all` — install all 8 editors (Cursor, Windsurf, Cline, Roo, Aider, Augment, Copilot, Antigravity)
108
+ - `--editors cursor,aider` — install only selected editors
109
+ - (no flag) — auto-detect from existing project files; `update --local` picks up whatever editors already have configs
110
+
111
+ Each editor gets both legacy single-file format (for backwards compat) and new directory-based format (`.cursor/rules/*.mdc`, `.windsurf/rules/*.md`, `.cline/rules/*.md`, `.roo/rules/*.md`, `.augment/rules/ai-toolkit-*.md`, `.agent/rules/*.md`, `CONVENTIONS.md`). Hooks are global-only — not merged into project settings.
107
112
 
108
113
  ## CLI Commands
109
114
 
110
115
  | Command | Target | What it does |
111
116
  |---------|--------|-------------|
112
117
  | `install` | `~/.claude/` | First-time: per-file symlinks + JSON merge + marker injection + rules |
113
- | `install --local` | `./` | Also set up project-local: `CLAUDE.md` + `settings.local.json` + constitution + Copilot + Cline + Roo + Aider + Git Hooks (hooks stay global-only) |
118
+ | `install --local` | `./` | Claude Code configs + editors via `--editors` (auto-detect or explicit) |
114
119
  | `update` | `~/.claude/` | Re-apply after npm update or after add-rule/remove-rule |
115
120
  | `update --local` | `./` | Re-apply + refresh project-local configs |
116
121
  | `uninstall` | `~/.claude/` | Strips toolkit components (preserves user content) |
@@ -120,13 +125,20 @@ Machine (global) Project (local)
120
125
  | `doctor` | toolkit | Install health, hooks, benchmark freshness, and artifact drift diagnostics |
121
126
  | `benchmark-ecosystem` | toolkit | Benchmark snapshot for official Claude Code and external ecosystem repos |
122
127
  | `evaluate` | toolkit | Skill quality report |
123
- | `cursor-rules` | `./` | Generates `.cursorrules` |
124
- | `windsurf-rules` | `./` | Generates `.windsurfrules` |
128
+ | `cursor-rules` | `./` | Generates `.cursorrules` (legacy) |
129
+ | `cursor-mdc` | `./` | Generates `.cursor/rules/*.mdc` (recommended) |
130
+ | `windsurf-rules` | `./` | Generates `.windsurfrules` (legacy) |
131
+ | `windsurf-dir-rules` | `./` | Generates `.windsurf/rules/*.md` |
125
132
  | `copilot-instructions` | `./` | Generates `.github/copilot-instructions.md` |
126
133
  | `gemini-md` | `./` | Generates `GEMINI.md` |
127
- | `cline-rules` | `./` | Generates `.clinerules` |
134
+ | `cline-rules` | `./` | Generates `.clinerules` (legacy) |
135
+ | `cline-dir-rules` | `./` | Generates `.cline/rules/*.md` |
128
136
  | `roo-modes` | `./` | Generates `.roomodes` |
137
+ | `roo-dir-rules` | `./` | Generates `.roo/rules/*.md` |
129
138
  | `aider-conf` | `./` | Generates `.aider.conf.yml` |
139
+ | `conventions-md` | `./` | Generates `CONVENTIONS.md` (Aider auto-loaded) |
140
+ | `augment-dir-rules` | `./` | Generates `.augment/rules/ai-toolkit-*.md` |
141
+ | `antigravity-rules` | `./` | Generates `.agent/rules/` + `.agent/workflows/` |
130
142
  | `agents-md` | toolkit | Regenerates `AGENTS.md` |
131
143
  | `llms-txt` | `./` | Generates `llms.txt` |
132
144
  | `generate-all` | `./` | Generates all platform configs at once |