@softspark/ai-toolkit 2.0.2 → 2.1.1

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +143 -774
  3. package/app/ARCHITECTURE.md +1 -1
  4. package/app/plugins/README.md +6 -2
  5. package/app/skills/plugin-creator/SKILL.md +3 -4
  6. package/bin/ai-toolkit.js +34 -10
  7. package/kb/procedures/maintenance-sop.md +64 -16
  8. package/kb/procedures/release-preparation-sop.md +4 -2
  9. package/kb/procedures/release-verification-sop.md +15 -13
  10. package/kb/reference/architecture-overview.md +44 -5
  11. package/kb/reference/claude-ecosystem-expansion-foundations.md +4 -4
  12. package/kb/reference/cli-reference.md +135 -0
  13. package/kb/reference/codex-cli-compatibility.md +136 -0
  14. package/kb/reference/comparison.md +29 -0
  15. package/kb/reference/extension-api.md +23 -6
  16. package/kb/reference/global-install-model.md +62 -5
  17. package/kb/reference/mcp-editor-compatibility.md +62 -0
  18. package/kb/reference/mcp-templates.md +32 -6
  19. package/kb/reference/plugin-pack-conventions.md +22 -21
  20. package/kb/reference/skills-catalog.md +27 -5
  21. package/kb/reference/unique-features.md +213 -0
  22. package/llms-full.txt +903 -84
  23. package/llms.txt +5 -0
  24. package/package.json +6 -5
  25. package/scripts/codex_skill_adapter.py +295 -0
  26. package/scripts/dir_rules_shared.py +46 -7
  27. package/scripts/generate_agents_md.py +13 -0
  28. package/scripts/generate_antigravity.py +2 -1
  29. package/scripts/generate_augment_rules.py +2 -1
  30. package/scripts/generate_cline_rules.py +13 -3
  31. package/scripts/generate_codex.py +105 -0
  32. package/scripts/generate_codex_hooks.py +78 -0
  33. package/scripts/generate_codex_rules.py +52 -0
  34. package/scripts/generate_cursor_mdc.py +2 -1
  35. package/scripts/generate_roo_rules.py +2 -1
  36. package/scripts/generate_windsurf_rules.py +2 -1
  37. package/scripts/generator_base.py +15 -0
  38. package/scripts/install_steps/ai_tools.py +83 -4
  39. package/scripts/mcp_editors.py +340 -0
  40. package/scripts/mcp_manager.py +125 -13
  41. package/scripts/plugin.py +745 -301
  42. package/scripts/plugin_schema.py +16 -1
package/llms-full.txt CHANGED
@@ -27,6 +27,9 @@
27
27
  - [CI Integration](kb/reference/ci-integration.md)
28
28
  - [Claude Ecosystem Benchmark Snapshot](kb/reference/claude-ecosystem-benchmark-snapshot.md)
29
29
  - [Claude Ecosystem Expansion Foundations](kb/reference/claude-ecosystem-expansion-foundations.md)
30
+ - [CLI Reference](kb/reference/cli-reference.md)
31
+ - [AI Toolkit - Codex CLI Compatibility](kb/reference/codex-cli-compatibility.md)
32
+ - [Ecosystem Comparison](kb/reference/comparison.md)
30
33
  - [Plan: Competitive Features — ai-toolkit](kb/reference/competitive-features-implementation.md)
31
34
  - [Distribution Model](kb/reference/distribution-model.md)
32
35
  - [Enterprise Config Inheritance Guide](kb/reference/enterprise-config-guide.md)
@@ -38,6 +41,7 @@
38
41
  - [Language Plugin Packs](kb/reference/language-packs.md)
39
42
  - [Language Rules System](kb/reference/language-rules.md)
40
43
  - [Manifest-Driven Install System](kb/reference/manifest-install.md)
44
+ - [MCP Editor Compatibility](kb/reference/mcp-editor-compatibility.md)
41
45
  - [MCP Server Templates](kb/reference/mcp-templates.md)
42
46
  - [Merge-Friendly Install Model](kb/reference/merge-friendly-install-model.md)
43
47
  - [Plugin Pack Conventions](kb/reference/plugin-pack-conventions.md)
@@ -47,6 +51,7 @@
47
51
  - [Skills Unification Model](kb/reference/skills-unification.md)
48
52
  - [Usage Statistics](kb/reference/stats.md)
49
53
  - [Config Sync](kb/reference/sync.md)
54
+ - [Unique Features & Differentiators](kb/reference/unique-features.md)
50
55
  - [Troubleshooting](kb/troubleshooting/README.md)
51
56
 
52
57
  ## Skills
@@ -111,7 +116,7 @@
111
116
  - **persona**: Switch engineering persona at runtime: backend-lead, frontend-lead, devops-eng, junior-dev
112
117
  - **plan**: Plan implementation with tasks and success criteria
113
118
  - **plan-writing**: Loaded when user asks to write an implementation plan or pre-mortem
114
- - **plugin-creator**: Creates experimental opt-in Claude Code plugin packs with manifests, conventions, and optional module scaffolding
119
+ - **plugin-creator**: Creates experimental opt-in plugin packs with manifests, conventions, and optional module scaffolding for Claude and Codex runtimes
115
120
  - **pr**: Create pull requests with pre-flight validation
116
121
  - **prd-to-issues**: Break a PRD into independently-grabbable GitHub issues using vertical slices with HITL/AFK tagging and dependency ordering. Use when user wants to convert a PRD to issues, create tickets, or break down a PRD into work items.
117
122
  - **prd-to-plan**: Convert a PRD into a phased implementation plan using tracer-bullet vertical slices. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions tracer bullets.
@@ -3120,9 +3125,9 @@ title: "SOP: Claude Toolkit Maintenance"
3120
3125
  category: procedures
3121
3126
  service: ai-toolkit
3122
3127
  tags: [sop, maintenance, agents, skills, install]
3123
- version: "1.4.2"
3128
+ version: "1.4.4"
3124
3129
  created: "2026-03-23"
3125
- last_updated: "2026-04-10"
3130
+ last_updated: "2026-04-13"
3126
3131
  description: "Standard operating procedures for installing, maintaining, and evolving the ai-toolkit."
3127
3132
  ---
3128
3133
 
@@ -3151,7 +3156,7 @@ ai-toolkit install --local --editors all # all supported editor
3151
3156
  ai-toolkit install --local --editors cursor,aider # specific editors only
3152
3157
  ```
3153
3158
 
3154
- Supported editors: `cursor`, `windsurf`, `cline`, `roo`, `aider`, `augment`, `copilot`, `antigravity`.
3159
+ Supported editors: `cursor`, `windsurf`, `cline`, `roo`, `aider`, `augment`, `copilot`, `antigravity`, `codex`.
3155
3160
 
3156
3161
  To restrict which language rules are injected, use `--lang`:
3157
3162
 
@@ -3311,22 +3316,22 @@ Use `PreToolUse` for blocking validations, `PostToolUse` for non-blocking feedba
3311
3316
  ## Managing Plugins
3312
3317
 
3313
3318
  ```bash
3314
- ai-toolkit plugin list # show available packs
3315
- ai-toolkit plugin install <name> # install a single pack
3316
- ai-toolkit plugin install --all # install all 11 packs
3317
- ai-toolkit plugin update <name> # update a pack (preserves data)
3318
- ai-toolkit plugin update --all # update all installed packs
3319
- ai-toolkit plugin clean <name> # prune data older than 90 days
3319
+ ai-toolkit plugin list # show available packs
3320
+ ai-toolkit plugin install --editor claude <name> # install for Claude global target
3321
+ ai-toolkit plugin install --editor codex <name> # install for Codex global target
3322
+ ai-toolkit plugin install --editor all --all # install all 11 packs for both runtimes
3323
+ ai-toolkit plugin update --editor all --all # re-apply all installed packs after toolkit updates
3324
+ ai-toolkit plugin clean <name> # prune data older than 90 days
3320
3325
  ai-toolkit plugin clean <name> --days 30 # custom retention
3321
- ai-toolkit plugin remove <name> # remove a pack
3322
- ai-toolkit plugin status # show installed packs with data stats
3326
+ ai-toolkit plugin remove --editor codex <name> # remove from one runtime only
3327
+ ai-toolkit plugin status --editor all # show installed packs with runtime details
3323
3328
  ```
3324
3329
 
3325
- Install copies hooks/scripts, verifies agents+skills are linked, merges hooks into `settings.json`, and runs init scripts. Update removes and reinstalls from current source (data preserved). Clean prunes old plugin data. Remove reverses install but leaves data intact. Core agents/skills are never removed.
3330
+ Install copies hooks/scripts, verifies agents+skills are linked, merges hooks into the selected runtime config, and runs init scripts. For Codex, the selected runtime is the global `HOME` layer (`~/AGENTS.md`, `~/.agents/`, `~/.codex/hooks.json`). Update removes and reinstalls from current source while preserving plugin data. Clean prunes old plugin data. Remove reverses install for the selected runtime but leaves plugin data intact. Core agents/skills are never removed.
3326
3331
 
3327
3332
  Memory-pack auto-prunes observations older than 90 days on every session end (configurable via `MEMORY_RETENTION_DAYS`).
3328
3333
 
3329
- State tracked in `~/.softspark/ai-toolkit/plugins.json`.
3334
+ State is tracked per runtime in `~/.softspark/ai-toolkit/plugins.json`. After every `ai-toolkit update`, also run `ai-toolkit plugin update --editor all --all` if plugin packs are installed.
3330
3335
 
3331
3336
  ## Adding a KB Document
3332
3337
 
@@ -3346,6 +3351,51 @@ Follow the `documentation-standards` knowledge skill (`app/skills/documentation-
3346
3351
  2. `chmod +x` the script
3347
3352
  3. Reference: `` python3 ${CLAUDE_SKILL_DIR}/scripts/script.py . ``
3348
3353
 
3354
+ ## Cross-Editor Verification (Mandatory)
3355
+
3356
+ **Every addition — skill, hook, MCP template, agent, rule — MUST be verified against all supported editors before merge.**
3357
+
3358
+ This toolkit targets 10 platforms. Each has its own config format, file path conventions, and runtime capabilities. A feature that works in Claude Code may silently break in Cursor, Codex, or Copilot if the editor's official spec diverges.
3359
+
3360
+ ### Verification checklist
3361
+
3362
+ When adding or modifying any toolkit component:
3363
+
3364
+ 1. **Check official docs** — before implementing, fetch the editor's current documentation (web search or Context7) to confirm the config format, file path, and feature support haven't changed
3365
+ 2. **Validate output format** — ensure the generated file matches what the editor expects (JSON schema, TOML structure, MDC frontmatter, directory naming)
3366
+ 3. **Test scope rules** — verify project-local vs global behavior matches the editor's own scope model
3367
+ 4. **Confirm feature parity** — if the feature relies on runtime primitives (hooks, MCP, agent delegation), check whether the target editor supports them; document gaps in `kb/reference/` if not
3368
+
3369
+ ### Editor documentation sources
3370
+
3371
+ | Editor | Where to verify |
3372
+ |--------|----------------|
3373
+ | Claude Code | `docs.anthropic.com/claude-code` |
3374
+ | Cursor | `docs.cursor.com` |
3375
+ | Windsurf | `docs.codeium.com/windsurf` |
3376
+ | GitHub Copilot | `docs.github.com/copilot` |
3377
+ | Gemini CLI | `github.com/google-gemini/gemini-cli` |
3378
+ | Cline | `github.com/cline/cline` |
3379
+ | Roo Code | `github.com/RooVetGit/Roo-Code` |
3380
+ | Aider | `aider.chat` |
3381
+ | Augment | `docs.augmentcode.com` |
3382
+ | Codex CLI | `github.com/openai/codex` |
3383
+ | Google Antigravity | `developers.google.com/project-idx` |
3384
+
3385
+ ### When to do this
3386
+
3387
+ - Adding a new skill → verify it renders correctly for Codex `.agents/skills/` and all directory-based editors
3388
+ - Adding a new hook → verify event name is valid in Claude and check `.codex/hooks.json` compatibility
3389
+ - Adding a new MCP template → verify it installs correctly for all 8 native adapters (`mcp_editors.py`)
3390
+ - Modifying generator output → check that every editor-specific generator still produces valid output
3391
+ - Adding a new editor → verify ALL existing features render correctly for the new target
3392
+
3393
+ ### Anti-pattern
3394
+
3395
+ Do NOT assume an editor's format based on memory or past behavior. Editors ship breaking changes to their config surfaces. Always verify against current official docs before implementation.
3396
+
3397
+ ---
3398
+
3349
3399
  ## Quality Checks
3350
3400
 
3351
3401
  ```bash
@@ -3371,14 +3421,17 @@ ai-toolkit benchmark-ecosystem --offline # benchmark snapshot
3371
3421
  Changes propagate instantly to all machines via symlinks. After any change:
3372
3422
 
3373
3423
  ```bash
3374
- npm run generate:all # FIRST: regenerate AGENTS.md, llms.txt, all platform configs
3424
+ npm run generate:all # FIRST: regenerate AGENTS.md, Codex rules, llms.txt, and platform configs
3375
3425
  scripts/validate.py # then validate — must pass before commit
3376
3426
  npm test # then test — must pass before commit
3377
3427
  ```
3378
3428
 
3379
3429
  Run `generate:all` before validate and test so that generated artifacts are current when
3380
- the metadata contract tests run. Committing without regenerating first causes artifact
3381
- drift and fails CI.
3430
+ the metadata contract tests run. Directory-based rule generators now use ownership-aware
3431
+ cleanup: repo regeneration manages only standard generated files, while `install/update`
3432
+ manages standard, language, and custom overlays together. That keeps regeneration safe
3433
+ without leaving stale standard artifacts behind. Committing without regenerating first
3434
+ causes artifact drift and fails CI.
3382
3435
 
3383
3436
  ## Release Checklist
3384
3437
 
@@ -3463,7 +3516,7 @@ service: ai-toolkit
3463
3516
  tags: [sop, release, version, publish, changelog, semver]
3464
3517
  version: "1.5.0"
3465
3518
  created: "2026-04-10"
3466
- last_updated: "2026-04-10"
3519
+ last_updated: "2026-04-13"
3467
3520
  description: "Step-by-step checklist for preparing a new ai-toolkit release — version sync, changelog, artifact regeneration, validation, and tagging. Run BEFORE every git tag."
3468
3521
  ---
3469
3522
 
@@ -3496,6 +3549,7 @@ python3 scripts/sync_version.py X.Y.Z # if script exists, else manual
3496
3549
  # 3. Write CHANGELOG.md entry
3497
3550
  # 4. Regenerate artifacts
3498
3551
  python3 scripts/generate_agents_md.py > AGENTS.md
3552
+ python3 scripts/generate_codex_rules.py .
3499
3553
  python3 scripts/generate_llms_txt.py > llms.txt
3500
3554
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
3501
3555
 
@@ -3619,6 +3673,7 @@ Add entry at the top of `CHANGELOG.md` (after the header, before previous releas
3619
3673
 
3620
3674
  ```bash
3621
3675
  python3 scripts/generate_agents_md.py > AGENTS.md
3676
+ python3 scripts/generate_codex_rules.py .
3622
3677
  python3 scripts/generate_llms_txt.py > llms.txt
3623
3678
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
3624
3679
  ```
@@ -3726,7 +3781,7 @@ git push origin --delete vX.Y.Z
3726
3781
  | 5 | `package-lock.json` | `npm install --package-lock-only` | Matches target |
3727
3782
  | 6 | Count sync | Check `package.json` description, README | `validate.py` passes |
3728
3783
  | 7 | CHANGELOG.md | Add release entry | Entry exists for vX.Y.Z |
3729
- | 8 | Regenerate artifacts | `generate_agents_md.py`, `generate_llms_txt.py` | No unexpected diff |
3784
+ | 8 | Regenerate artifacts | `generate_agents_md.py`, `generate_codex_rules.py`, `generate_llms_txt.py` | No unexpected diff |
3730
3785
  | 9 | Validate | `validate.py --strict` | 0 errors, 0 warnings |
3731
3786
  | 10 | Security audit | `audit_skills.py --ci` | 0 HIGH |
3732
3787
  | 11 | Tests | `npm test` | All pass |
@@ -3745,7 +3800,7 @@ service: ai-toolkit
3745
3800
  tags: [sop, verification, release, smoke-test, install, update, qa]
3746
3801
  version: "1.1.0"
3747
3802
  created: "2026-04-08"
3748
- last_updated: "2026-04-08"
3803
+ last_updated: "2026-04-13"
3749
3804
  description: "End-to-end smoke test after installing or updating @softspark/ai-toolkit — verifies CLI, install, doctor, validation, tests, and eject from user perspective."
3750
3805
  ---
3751
3806
 
@@ -3771,21 +3826,22 @@ Verifies all critical paths from the user's perspective.
3771
3826
 
3772
3827
  ## Quick Checklist (TL;DR)
3773
3828
 
3774
- 9 commands — if all pass, the release is ready:
3829
+ 10 commands — if all pass, the release is ready:
3775
3830
 
3776
3831
  ```bash
3777
3832
  # Pre-commit (Phase 0)
3778
- python3 scripts/generate_agents_md.py > AGENTS.md # 1. Regenerate artifacts
3779
- python3 scripts/generate_llms_txt.py > llms.txt # 2. Regenerate llms.txt
3780
- python3 scripts/validate.py --strict # 3. Validation passed?
3781
- npm test # 4. All tests passed?
3833
+ python3 scripts/generate_agents_md.py > AGENTS.md # 1. Regenerate AGENTS.md
3834
+ python3 scripts/generate_codex_rules.py . # 2. Refresh standard Codex rules
3835
+ python3 scripts/generate_llms_txt.py > llms.txt # 3. Regenerate llms.txt
3836
+ python3 scripts/validate.py --strict # 4. Validation passed?
3837
+ npm test # 5. All tests passed?
3782
3838
 
3783
3839
  # Post-install verification (Phases 1-7)
3784
- ai-toolkit --version # 5. Version OK?
3785
- ai-toolkit status # 6. Status OK?
3786
- ai-toolkit doctor # 7. Health check passed?
3787
- ai-toolkit install --dry-run # 8. Global install OK?
3788
- python3 scripts/audit_skills.py --ci # 9. Security audit clean?
3840
+ ai-toolkit --version # 6. Version OK?
3841
+ ai-toolkit status # 7. Status OK?
3842
+ ai-toolkit doctor # 8. Health check passed?
3843
+ ai-toolkit install --dry-run # 9. Global install OK?
3844
+ python3 scripts/audit_skills.py --ci # 10. Security audit clean?
3789
3845
  ```
3790
3846
 
3791
3847
  ---
@@ -3798,6 +3854,7 @@ counts but does NOT auto-regenerate — you must do it locally.
3798
3854
  ```bash
3799
3855
  # 1. Regenerate generated artifacts
3800
3856
  python3 scripts/generate_agents_md.py > AGENTS.md
3857
+ python3 scripts/generate_codex_rules.py .
3801
3858
  python3 scripts/generate_llms_txt.py > llms.txt
3802
3859
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
3803
3860
 
@@ -3811,7 +3868,7 @@ python3 scripts/audit_skills.py --ci
3811
3868
  npm test
3812
3869
 
3813
3870
  # 5. Stage and commit
3814
- git add AGENTS.md llms.txt llms-full.txt
3871
+ git add AGENTS.md .agents/rules/ai-toolkit-*.md llms.txt llms-full.txt
3815
3872
  git add -p # stage your other changes
3816
3873
  git commit -m "feat: your change description"
3817
3874
  ```
@@ -3822,7 +3879,7 @@ by the developer as part of their PR.
3822
3879
 
3823
3880
  **One-liner (copy-paste):**
3824
3881
  ```bash
3825
- 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
3882
+ python3 scripts/generate_agents_md.py > AGENTS.md && python3 scripts/generate_codex_rules.py . && 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
3826
3883
  ```
3827
3884
 
3828
3885
  ---
@@ -4383,10 +4440,10 @@ title: "AI Toolkit - Architecture Overview"
4383
4440
  category: reference
4384
4441
  service: ai-toolkit
4385
4442
  tags: [architecture, overview, design, structure]
4386
- version: "1.4.2"
4443
+ version: "1.4.4"
4387
4444
  created: "2026-03-23"
4388
- last_updated: "2026-04-09"
4389
- description: "Architecture of ai-toolkit: directory layout, global install model, skill tiers, and integration with projects."
4445
+ last_updated: "2026-04-13"
4446
+ description: "Architecture of ai-toolkit: directory layout, global install model, editor-aware MCP install, Codex translation layer, skill tiers, and integration with projects."
4390
4447
  ---
4391
4448
 
4392
4449
  # AI Toolkit Architecture
@@ -4485,11 +4542,13 @@ Machine (global) Project (local)
4485
4542
  **`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.
4486
4543
 
4487
4544
  **`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`:
4488
- - `--editors all` — install all 8 editors (Cursor, Windsurf, Cline, Roo, Aider, Augment, Copilot, Antigravity)
4545
+ - `--editors all` — install all 9 editors (Cursor, Windsurf, Cline, Roo, Aider, Augment, Copilot, Antigravity, Codex)
4489
4546
  - `--editors cursor,aider` — install only selected editors
4490
4547
  - (no flag) — auto-detect from existing project files; `update --local` picks up whatever editors already have configs
4491
4548
 
4492
- Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.windsurf/rules/*.md`, `.clinerules/*.md`, `.roo/rules/*.md`, `.augment/rules/ai-toolkit-*.md`, `.agent/rules/*.md`, `CONVENTIONS.md`). Hooks are global-only — not merged into project settings.
4549
+ Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.windsurf/rules/*.md`, `.clinerules/*.md`, `.roo/rules/*.md`, `.augment/rules/ai-toolkit-*.md`, `.agent/rules/*.md`, `CONVENTIONS.md`). Codex local install additionally generates `AGENTS.md`, `.agents/rules/*.md`, `.agents/skills/*`, and `.codex/hooks.json`. Hooks are global-only — not merged into project settings except for editor-native local hook files such as Codex `.codex/hooks.json`. Experimental plugin packs can also layer a global Codex target in `HOME` (`~/AGENTS.md`, `~/.agents/`, `~/.codex/hooks.json`) when installed with `ai-toolkit plugin install --editor codex`.
4550
+
4551
+ If a project already has `.mcp.json`, local install mirrors its `mcpServers` entries into `.claude/settings.local.json` plus any selected editors with project-scoped native MCP files (`.cursor/mcp.json`, `.github/mcp.json`).
4493
4552
 
4494
4553
  ## CLI Commands
4495
4554
 
@@ -4502,6 +4561,8 @@ Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.windsurf/rules
4502
4561
  | `uninstall` | `~/.claude/` | Strips toolkit components (preserves user content) |
4503
4562
  | `add-rule <file>` | `~/.softspark/ai-toolkit/rules/` | Register rule — auto-applied on every `update` |
4504
4563
  | `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/CLAUDE.md` | Unregister rule and remove its block |
4564
+ | `mcp add <name...>` | `./.mcp.json` | Merge canonical MCP template(s) into project config |
4565
+ | `mcp install --editor <name...>` | native editor config | Render MCP template(s) into editor-native config files |
4505
4566
  | `validate` | toolkit | Integrity check |
4506
4567
  | `doctor` | toolkit | Install health, hooks, benchmark freshness, and artifact drift diagnostics |
4507
4568
  | `benchmark-ecosystem` | toolkit | Benchmark snapshot for official Claude Code and external ecosystem repos |
@@ -4520,6 +4581,9 @@ Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.windsurf/rules
4520
4581
  | `conventions-md` | `./` | Generates `CONVENTIONS.md` (Aider auto-loaded) |
4521
4582
  | `augment-dir-rules` | `./` | Generates `.augment/rules/ai-toolkit-*.md` |
4522
4583
  | `antigravity-rules` | `./` | Generates `.agent/rules/` + `.agent/workflows/` |
4584
+ | `codex-md` | `./` | Generates Codex-facing `AGENTS.md` |
4585
+ | `codex-rules` | `./` | Generates `.agents/rules/*.md` |
4586
+ | `codex-hooks` | `./` | Generates `.codex/hooks.json` |
4523
4587
  | `agents-md` | toolkit | Regenerates `AGENTS.md` |
4524
4588
  | `llms-txt` | `./` | Generates `llms.txt` |
4525
4589
  | `generate-all` | `./` | Generates all platform configs at once |
@@ -4571,6 +4635,38 @@ Skills that spawn real parallel agents use:
4571
4635
 
4572
4636
  `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` must be set for Agent Teams (tmux-based) support.
4573
4637
 
4638
+ ### Codex Translation Layer
4639
+
4640
+ Codex does not expose Claude's `Agent`, `Team*`, and `Task*` primitives with the
4641
+ same runtime semantics. To keep the skill catalog aligned, local Codex install
4642
+ uses a translation layer:
4643
+
4644
+ - native Codex-compatible skills are linked directly
4645
+ - Claude-only orchestration skills are emitted as generated wrappers
4646
+ - wrapper guidance maps delegation to `spawn_agent`, `send_input`, `wait_agent`, `close_agent`, and `update_plan`
4647
+
4648
+ Codex therefore receives the full skill catalog, but not the full Claude hook
4649
+ surface or tmux-backed Agent Teams lifecycle. Plugin packs reuse the same
4650
+ translation and hook-compatibility model when targeting the global Codex layer.
4651
+
4652
+ See `kb/reference/codex-cli-compatibility.md` for the detailed mapping.
4653
+
4654
+ ## MCP Rendering Layer
4655
+
4656
+ `.mcp.json` is the canonical project-level template format. ai-toolkit can render that configuration into editor-native MCP files through `scripts/mcp_editors.py`.
4657
+
4658
+ Current native adapters:
4659
+ - Claude Code: `.claude/settings.local.json` and `~/.claude/settings.json`
4660
+ - Cursor: `.cursor/mcp.json` and `~/.cursor/mcp.json`
4661
+ - GitHub Copilot: `.github/mcp.json` and `~/.copilot/mcp-config.json`
4662
+ - Gemini CLI: `.gemini/settings.json` and `~/.gemini/settings.json`
4663
+ - Windsurf: `~/.codeium/windsurf/mcp_config.json`
4664
+ - Cline: `~/.cline/data/settings/cline_mcp_settings.json`
4665
+ - Augment: `~/.augment/settings.json`
4666
+ - Codex CLI: `~/.codex/config.toml`
4667
+
4668
+ See `kb/reference/mcp-editor-compatibility.md` for the support matrix and scope rules.
4669
+
4574
4670
  ## Quality Guardrails
4575
4671
 
4576
4672
  ### Anti-Rationalization Tables
@@ -4921,8 +5017,8 @@ service: ai-toolkit
4921
5017
  tags: [benchmark, claude-code, ecosystem, hooks, plugins, architecture]
4922
5018
  version: "1.0.0"
4923
5019
  created: "2026-03-27"
4924
- last_updated: "2026-04-01"
4925
- description: "Reference summary of the ecosystem signals and implementation foundations adopted in ai-toolkit."
5020
+ last_updated: "2026-04-13"
5021
+ description: "Reference summary of the ecosystem signals and implementation foundations adopted in ai-toolkit, including runtime-aware plugin packaging."
4926
5022
  ---
4927
5023
 
4928
5024
  # Claude Ecosystem Expansion Foundations
@@ -4935,13 +5031,13 @@ This document captures the architectural foundations adopted in `ai-toolkit` aft
4935
5031
  2. official Claude Code patterns,
4936
5032
  3. selected external benchmark repositories.
4937
5033
 
4938
- The outcome is a toolkit that is now positioned as a more modular, Claude-native, benchmark-backed system with stronger lifecycle automation and extension tooling.
5034
+ The outcome is a toolkit that is now positioned as a more modular, Claude-first, benchmark-backed system with stronger lifecycle automation and extension tooling.
4939
5035
 
4940
5036
  ## Implemented Foundations
4941
5037
 
4942
5038
  ### 1. Plugin-oriented structure
4943
5039
 
4944
- `ai-toolkit` now treats plugin packaging as a first-class capability.
5040
+ `ai-toolkit` now treats plugin packaging as a first-class capability, with runtime-aware install surfaces for Claude and optional global Codex layering.
4945
5041
 
4946
5042
  Implemented artifacts:
4947
5043
  - `app/.claude-plugin/plugin.json`
@@ -5019,6 +5115,321 @@ The reference benchmark set is intentionally curated:
5019
5115
 
5020
5116
  ---
5021
5117
 
5118
+ ## kb/reference/cli-reference.md
5119
+
5120
+ ---
5121
+ title: "CLI Reference"
5122
+ category: reference
5123
+ service: ai-toolkit
5124
+ tags: [cli, commands, reference, install, update, plugin, mcp]
5125
+ created: "2026-04-13"
5126
+ last_updated: "2026-04-13"
5127
+ description: "Complete CLI reference for all ai-toolkit commands, options, and flags."
5128
+ ---
5129
+
5130
+ # CLI Reference
5131
+
5132
+ ```
5133
+ Usage: ai-toolkit <command> [options]
5134
+ ```
5135
+
5136
+ ## Core Commands
5137
+
5138
+ | Command | Description |
5139
+ |---------|-------------|
5140
+ | `install` | First-time global install into `~/.claude/` + Cursor, Windsurf, Gemini |
5141
+ | `install --local` | Claude Code configs only; add `--editors all` or `--editors cursor,aider` for other tools |
5142
+ | `update` | Re-apply toolkit after `npm install -g @softspark/ai-toolkit@latest` |
5143
+ | `update --local` | Re-apply + auto-detect editors from existing project files |
5144
+ | `reset --local` | Wipe all project-local configs and recreate from scratch (clean slate) |
5145
+ | `status` | Show installed modules and version |
5146
+ | `uninstall` | Remove toolkit from `~/.claude/` |
5147
+ | `validate` | Verify toolkit integrity (`--strict` for CI-grade, warnings = errors) |
5148
+ | `doctor` | Diagnose install health, hooks, quick-win assets, and artifact drift |
5149
+ | `doctor --fix` | Auto-repair broken symlinks, missing hooks, stale artifacts |
5150
+ | `eject [dir]` | Export standalone config (no symlinks, no toolkit dependency) |
5151
+
5152
+ ## Rule & Hook Injection
5153
+
5154
+ | Command | Description |
5155
+ |---------|-------------|
5156
+ | `add-rule <rule.md> [name]` | Register rule in `~/.softspark/ai-toolkit/rules/` — auto-applied on every `update` |
5157
+ | `remove-rule <name> [dir]` | Unregister rule and remove its block from `CLAUDE.md` |
5158
+ | `inject-hook <file.json>` | Inject external hooks into settings.json (idempotent, `_source` tagged) |
5159
+ | `remove-hook <name>` | Remove injected hooks by source name |
5160
+
5161
+ ## MCP Management
5162
+
5163
+ | Command | Description |
5164
+ |---------|-------------|
5165
+ | `mcp list` | List available MCP server templates (25 templates) |
5166
+ | `mcp editors` | List editors with native MCP config adapters and scopes |
5167
+ | `mcp add <name> [names...]` | Add MCP server template(s) to `.mcp.json` |
5168
+ | `mcp install --editor <name[,..]> [names...]` | Install templates into native editor MCP config |
5169
+ | `mcp show <name>` | Show MCP template config details |
5170
+ | `mcp remove <name>` | Remove MCP server from `.mcp.json` or editor MCP config |
5171
+
5172
+ ## Plugin Management
5173
+
5174
+ | Command | Description |
5175
+ |---------|-------------|
5176
+ | `plugin list` | Show available plugin packs with install status |
5177
+ | `plugin install <name> [--editor claude\|codex\|all]` | Install a plugin pack for selected runtime(s) |
5178
+ | `plugin install --all [--editor claude\|codex\|all]` | Install all 11 plugin packs |
5179
+ | `plugin update <name> [--editor claude\|codex\|all]` | Update a plugin pack (remove + reinstall, preserves data) |
5180
+ | `plugin update --all [--editor claude\|codex\|all]` | Update all installed plugin packs |
5181
+ | `plugin clean <name> [--days N]` | Prune old plugin data (default: 90 days) |
5182
+ | `plugin remove <name> [--editor claude\|codex\|all]` | Remove a plugin pack |
5183
+ | `plugin status [--editor claude\|codex\|all]` | Show installed plugins with runtime-specific details |
5184
+
5185
+ ## Config Inheritance
5186
+
5187
+ | Command | Description |
5188
+ |---------|-------------|
5189
+ | `config validate [path]` | Validate `.softspark-toolkit.json` schema + extends + enforcement |
5190
+ | `config diff [path]` | Show project vs base config differences |
5191
+ | `config init [flags]` | Create `.softspark-toolkit.json` (`--extends`, `--profile`, `--no-extends`) |
5192
+ | `config create-base <name>` | Scaffold base config npm package |
5193
+ | `config check [path]` | CI enforcement gate (exit 0=pass, 1=fail, 2=no config; `--json`) |
5194
+
5195
+ ## Project Registry
5196
+
5197
+ | Command | Description |
5198
+ |---------|-------------|
5199
+ | `projects` | List registered projects |
5200
+ | `projects --prune` | Remove stale (deleted) entries |
5201
+ | `projects remove /path` | Unregister specific project |
5202
+
5203
+ ## Generator Commands
5204
+
5205
+ | Command | Description |
5206
+ |---------|-------------|
5207
+ | `generate-all` | Generate all platform configs at once |
5208
+ | `agents-md` | Regenerate `AGENTS.md` from agent definitions |
5209
+ | `codex-md` | Generate `AGENTS.md` with marker injection for Codex CLI |
5210
+ | `codex-rules` | Generate `.agents/rules/*.md` for Codex CLI |
5211
+ | `codex-hooks` | Generate `.codex/hooks.json` for Codex CLI |
5212
+ | `cursor-rules` | Generate `.cursorrules` (legacy single file) |
5213
+ | `cursor-mdc` | Generate `.cursor/rules/*.mdc` (recommended) |
5214
+ | `windsurf-rules` | Generate `.windsurfrules` (legacy) |
5215
+ | `windsurf-dir-rules` | Generate `.windsurf/rules/*.md` (recommended) |
5216
+ | `copilot-instructions` | Generate `.github/copilot-instructions.md` |
5217
+ | `gemini-md` | Generate `GEMINI.md` for Gemini CLI |
5218
+ | `cline-rules` | Generate `.clinerules` (legacy) |
5219
+ | `cline-dir-rules` | Generate `.clinerules/*.md` (recommended) |
5220
+ | `roo-modes` | Generate `.roomodes` |
5221
+ | `roo-dir-rules` | Generate `.roo/rules/*.md` |
5222
+ | `aider-conf` | Generate `.aider.conf.yml` |
5223
+ | `conventions-md` | Generate `CONVENTIONS.md` for Aider |
5224
+ | `augment-rules` | Generate `.augment/rules/ai-toolkit.md` (legacy) |
5225
+ | `augment-dir-rules` | Generate `.augment/rules/ai-toolkit-*.md` (recommended) |
5226
+ | `antigravity-rules` | Generate `.agent/rules/` and `.agent/workflows/` |
5227
+ | `llms-txt` | Generate `llms.txt` and `llms-full.txt` |
5228
+
5229
+ ## Other Commands
5230
+
5231
+ | Command | Description |
5232
+ |---------|-------------|
5233
+ | `stats` | Show skill usage statistics (`--reset` to clear, `--json` for raw output) |
5234
+ | `benchmark --my-config` | Compare your config vs defaults vs ecosystem |
5235
+ | `benchmark-ecosystem` | Generate ecosystem benchmark snapshot |
5236
+ | `create skill <name>` | Scaffold new skill from template (`--template=linter\|reviewer\|generator\|workflow\|knowledge`) |
5237
+ | `sync` | Config portability via GitHub Gist (`--export`, `--push`, `--pull`, `--import`) |
5238
+ | `compile-slm` | Compile toolkit into minimal SLM system prompt (`--budget`, `--model-size`, `--dry-run`) |
5239
+ | `evaluate` | Run skill evaluation suite |
5240
+
5241
+ ## Install / Update Options
5242
+
5243
+ ```bash
5244
+ ai-toolkit install --only agents,hooks # apply only listed components
5245
+ ai-toolkit install --skip hooks # skip listed components
5246
+ ai-toolkit install --profile minimal # minimal | standard | strict
5247
+ ai-toolkit install --persona backend-lead # backend-lead | frontend-lead | devops-eng | junior-dev
5248
+ ai-toolkit install --local --editors all # Claude Code + all editors
5249
+ ai-toolkit install --local --editors cursor,aider # + specific editors
5250
+ ai-toolkit install --local --lang typescript # explicit language rules
5251
+ ai-toolkit install --modules core,agents,rules-typescript # selective modules
5252
+ ai-toolkit install --list # dry-run: show what would change
5253
+ ai-toolkit update --local # auto-detects editors from existing files
5254
+ ```
5255
+
5256
+ ---
5257
+
5258
+ ## kb/reference/codex-cli-compatibility.md
5259
+
5260
+ ---
5261
+ title: "AI Toolkit - Codex CLI Compatibility"
5262
+ category: reference
5263
+ service: ai-toolkit
5264
+ tags: [codex, compatibility, install, skills, hooks]
5265
+ version: "1.0.0"
5266
+ created: "2026-04-12"
5267
+ last_updated: "2026-04-13"
5268
+ description: "Reference for how ai-toolkit maps Claude-oriented skills, hooks, and plugin packs to Codex CLI."
5269
+ ---
5270
+
5271
+ # AI Toolkit - Codex CLI Compatibility
5272
+
5273
+ ## Summary
5274
+
5275
+ Codex CLI now receives the full `ai-toolkit` skill catalog during local install.
5276
+
5277
+ Native Codex-compatible skills are linked directly into `.agents/skills/`. Skills
5278
+ that depend on Claude-only orchestration primitives are generated as Codex
5279
+ wrappers that preserve the original workflow intent while translating execution
5280
+ to Codex subagents and plan tracking.
5281
+
5282
+ Experimental plugin packs can also target a global Codex surface with
5283
+ `ai-toolkit plugin install --editor codex`, which layers plugin-specific skills,
5284
+ rules, and hooks into `HOME` without changing the project-local core install
5285
+ model.
5286
+
5287
+ ## Local Install Outputs
5288
+
5289
+ `ai-toolkit install --local --editors codex` generates:
5290
+
5291
+ - `AGENTS.md`
5292
+ - `.agents/rules/*.md`
5293
+ - `.agents/skills/*`
5294
+ - `.codex/hooks.json`
5295
+
5296
+ ## Global Plugin Outputs
5297
+
5298
+ `ai-toolkit plugin install --editor codex <pack>` bootstraps or reuses:
5299
+
5300
+ - `~/AGENTS.md`
5301
+ - `~/.agents/rules/*.md`
5302
+ - `~/.agents/skills/*`
5303
+ - `~/.codex/hooks.json`
5304
+
5305
+ Plugin packs only add their own runtime-specific layer on top of the generated
5306
+ Codex base. Shared hook scripts and plugin scripts still live in
5307
+ `~/.softspark/ai-toolkit/`.
5308
+
5309
+ ## Skill Translation Model
5310
+
5311
+ Two delivery modes are used for Codex:
5312
+
5313
+ | Mode | How it is installed | Use case |
5314
+ |------|----------------------|----------|
5315
+ | Native | Symlink to `app/skills/<name>/` | Skills whose `allowed-tools` are already supported in Codex |
5316
+ | Adapted | Generated wrapper directory in `.agents/skills/<name>/` | Skills that rely on Claude-only `Agent`, `Team*`, or `Task*` primitives |
5317
+
5318
+ Adapted skills keep the same support assets (`reference/`, `scripts/`, `assets/`)
5319
+ via symlinks, but rewrite `SKILL.md` to Codex-native guidance.
5320
+
5321
+ ## Claude-to-Codex Tool Mapping
5322
+
5323
+ The adapter rewrites Claude-specific delegation guidance to the closest Codex
5324
+ runtime primitives:
5325
+
5326
+ | Claude-oriented primitive | Codex replacement |
5327
+ |---------------------------|------------------|
5328
+ | `Agent(...)` | `spawn_agent(..., fork_context=True, ...)` |
5329
+ | `SendMessage` | `send_input` |
5330
+ | `TaskCreate` / `TaskList` / `TaskUpdate` | `update_plan` or explicit checklist tracking |
5331
+ | `TaskGet` / `TaskOutput` | `wait_agent` |
5332
+ | `TaskStop` / `TeamDelete` | `close_agent` |
5333
+ | Agent teams | Multiple spawned subagents with explicit file ownership |
5334
+
5335
+ ## Adapted Skill Classes
5336
+
5337
+ The main adapted group is multi-agent orchestration:
5338
+
5339
+ - `/orchestrate`
5340
+ - `/workflow`
5341
+ - `/swarm`
5342
+ - `/teams`
5343
+ - `/subagent-development`
5344
+
5345
+ The adapter also covers skills that previously depended only on Claude's
5346
+ `Agent` primitive, such as:
5347
+
5348
+ - `/tdd`
5349
+ - `/write-a-prd`
5350
+ - `/qa-session`
5351
+ - `/triage-issue`
5352
+ - `/architecture-audit`
5353
+
5354
+ ## Hook Compatibility
5355
+
5356
+ Codex does not expose the full Claude hook event surface. The Codex hook
5357
+ generator emits only the events supported by Codex runtime integration:
5358
+
5359
+ - `SessionStart`
5360
+ - `PreToolUse`
5361
+ - `PostToolUse`
5362
+ - `UserPromptSubmit`
5363
+ - `Stop`
5364
+
5365
+ This means Claude-only events such as `TaskCompleted`, `TeammateIdle`,
5366
+ `SubagentStart`, `SubagentStop`, `PreCompact`, `SessionEnd`, and
5367
+ `Notification` are not available in `.codex/hooks.json`.
5368
+
5369
+ ## Behavioral Limits
5370
+
5371
+ Codex wrappers preserve workflow intent, but not every Claude runtime behavior
5372
+ has a perfect one-to-one equivalent.
5373
+
5374
+ Known limits:
5375
+
5376
+ - No native Codex equivalent of tmux-backed Agent Teams lifecycle events
5377
+ - No separate task object model equivalent to Claude `Task*` APIs
5378
+ - Hook event coverage is narrower than Claude Code
5379
+
5380
+ These are runtime platform limits, not installation defects.
5381
+
5382
+ ## Verification
5383
+
5384
+ The Codex compatibility path is verified by:
5385
+
5386
+ 1. Generator contract tests for `generate_codex.py`
5387
+ 2. Local install tests for `.agents/skills/` and `.codex/hooks.json`
5388
+ 3. Plugin install tests for global Codex rules, hooks, and cleanup paths
5389
+ 4. CLI tests for `codex-md` and `codex-hooks`
5390
+
5391
+ ## Related
5392
+
5393
+ - `kb/reference/skills-catalog.md`
5394
+ - `kb/reference/architecture-overview.md`
5395
+ - `kb/reference/global-install-model.md`
5396
+
5397
+ ---
5398
+
5399
+ ## kb/reference/comparison.md
5400
+
5401
+ ---
5402
+ title: "Ecosystem Comparison"
5403
+ category: reference
5404
+ service: ai-toolkit
5405
+ tags: [comparison, ecosystem, features, alternatives]
5406
+ created: "2026-04-13"
5407
+ last_updated: "2026-04-13"
5408
+ description: "Feature comparison of ai-toolkit vs other Claude Code toolkits and agent frameworks."
5409
+ ---
5410
+
5411
+ # Ecosystem Comparison
5412
+
5413
+ | Feature | ai-toolkit | everything-claude-code | wshobson/agents | ruflo |
5414
+ |---------|---------------|----------------------|-----------------|-------|
5415
+ | Skills | 92 | 100+ | 146 | 20+ |
5416
+ | Agents | 44 | 30+ | 112 | 20+ |
5417
+ | Machine-enforced constitution | **Yes** | No (docs only) | No | No |
5418
+ | Skill-scoped lifecycle hooks | **Yes** | No | No | No |
5419
+ | Effort-based model budgeting | **Yes** | No | No | No |
5420
+ | Test suite | Yes (bats) | Yes (997 tests) | No | Yes |
5421
+ | npm/npx install | Yes | Yes | Yes | Yes |
5422
+ | Cross-tool support | **Cursor, Windsurf, Copilot, Gemini, Cline, Roo, Aider, Augment, Antigravity, Codex** | 5+ tools | Smithery | Limited |
5423
+ | Selective install | Yes | Yes | Yes (72 plugins) | No |
5424
+ | Session persistence | Yes | Yes | No | No |
5425
+ | Architecture notes | **Yes** | No | No | No |
5426
+ | KB/RAG integration | **Yes** | No | No | Yes |
5427
+ | License | MIT | MIT | MIT | MIT |
5428
+
5429
+ For live benchmark data, see the [ecosystem benchmark snapshot](claude-ecosystem-benchmark-snapshot.md).
5430
+
5431
+ ---
5432
+
5022
5433
  ## kb/reference/competitive-features-implementation.md
5023
5434
 
5024
5435
  ---
@@ -6108,11 +6519,11 @@ Run `ai-toolkit update --local` to re-resolve and update the lock file.
6108
6519
  title: "Extension API Reference"
6109
6520
  category: reference
6110
6521
  service: ai-toolkit
6111
- tags: [extension-api, inject-rule, inject-hook, mcp-templates, integration]
6112
- version: "1.3.8"
6522
+ tags: [extension-api, inject-rule, inject-hook, mcp-templates, integration, editors]
6523
+ version: "1.3.9"
6113
6524
  created: "2026-04-07"
6114
- last_updated: "2026-04-07"
6115
- description: "Reference for ai-toolkit's extension API: inject-rule, inject-hook, remove-rule, remove-hook, and mcp template management."
6525
+ last_updated: "2026-04-12"
6526
+ description: "Reference for ai-toolkit's extension API: inject-rule, inject-hook, remove-rule, remove-hook, and editor-aware MCP template management."
6116
6527
  ---
6117
6528
 
6118
6529
  # Extension API Reference
@@ -6133,6 +6544,7 @@ This design is intentional: ai-toolkit is a generic toolkit. Consumers (MCP serv
6133
6544
  | `remove-hook <name>` | `~/.claude/settings.json` | Strip all entries with matching `_source` | Yes |
6134
6545
  | `add-rule <file.md>` | `~/.softspark/ai-toolkit/rules/` | File copy + re-inject all rules on next `update` | Yes |
6135
6546
  | `mcp add <name...>` | `.mcp.json` | Merge `mcpServers` block from template | Yes |
6547
+ | `mcp install --editor <name...>` | Native editor MCP config | Render canonical template into editor format | Yes |
6136
6548
 
6137
6549
  ## inject-rule
6138
6550
 
@@ -6209,7 +6621,7 @@ npx @softspark/ai-toolkit remove-hook my-tool-hooks
6209
6621
 
6210
6622
  The argument is the source name (file stem used during `inject-hook`). If no entries with that source are present, the command exits 0 silently.
6211
6623
 
6212
- ## mcp add
6624
+ ## mcp add / install
6213
6625
 
6214
6626
  Merges one or more MCP server templates from `app/mcp-templates/` into the project's `.mcp.json`.
6215
6627
 
@@ -6217,13 +6629,24 @@ Merges one or more MCP server templates from `app/mcp-templates/` into the proje
6217
6629
  ai-toolkit mcp add github # add a single template
6218
6630
  ai-toolkit mcp add github postgres slack # add multiple at once
6219
6631
  ai-toolkit mcp list # list all available templates
6632
+ ai-toolkit mcp editors # list supported native adapters
6220
6633
  ai-toolkit mcp show github # print a template's JSON
6634
+ ai-toolkit mcp install --editor cursor --scope project github --target .
6635
+ ai-toolkit mcp install --editor codex context7
6221
6636
  ai-toolkit mcp remove github # remove an entry from .mcp.json
6637
+ ai-toolkit mcp remove github --editor cursor --scope project --target .
6222
6638
  ```
6223
6639
 
6224
6640
  **Implementation:** `scripts/mcp_manager.py`.
6225
6641
 
6226
- The `add` command merges the `mcpServers` block from the template into `.mcp.json`. If `.mcp.json` does not exist, it is created. If the server name already exists, the entry is overwritten. See [mcp-templates.md](mcp-templates.md) for the full list of available templates.
6642
+ The `add` command merges the `mcpServers` block from the template into `.mcp.json`. If `.mcp.json` does not exist, it is created. If the server name already exists, the entry is overwritten.
6643
+
6644
+ The `install` command renders the same canonical template into a native editor config format. Supported adapters currently cover:
6645
+ - JSON clients with `mcpServers`: Claude Code, Cursor, Gemini CLI, Windsurf, Cline, Augment
6646
+ - JSON clients with additional required metadata: GitHub Copilot
6647
+ - TOML clients: Codex CLI
6648
+
6649
+ When `install` runs with `--scope project`, ai-toolkit also updates `.mcp.json` so the project-level config remains the source of truth for later sync and local install flows.
6227
6650
 
6228
6651
  ## Architecture
6229
6652
 
@@ -6238,6 +6661,7 @@ The `add` command merges the `mcpServers` block from the template into `.mcp.jso
6238
6661
  │ remove-hook <name> → settings.json │
6239
6662
  │ add-rule <file.md> → rules/ registry │
6240
6663
  │ mcp add <template> → .mcp.json │
6664
+ │ mcp install <template> → editor-native MCP │
6241
6665
  │ │
6242
6666
  │ Idempotent: markers (rules) / _source tags (hooks) │
6243
6667
  │ ai-toolkit NEVER calls external services │
@@ -6263,6 +6687,9 @@ npx @softspark/ai-toolkit inject-hook ./hooks/my-tool-hooks.json
6263
6687
 
6264
6688
  # Add an MCP server template
6265
6689
  npx @softspark/ai-toolkit mcp add github
6690
+
6691
+ # Render the same template into Cursor project config
6692
+ npx @softspark/ai-toolkit mcp install --editor cursor --scope project github --target .
6266
6693
  ```
6267
6694
 
6268
6695
  To uninstall:
@@ -6278,6 +6705,7 @@ All operations are idempotent — safe to run on every install or update.
6278
6705
 
6279
6706
  - [PATH: kb/reference/hooks-catalog.md] — built-in hooks reference
6280
6707
  - [PATH: kb/reference/mcp-templates.md] — available MCP server templates
6708
+ - [PATH: kb/reference/mcp-editor-compatibility.md] — native editor MCP support matrix
6281
6709
  - [PATH: kb/reference/architecture-overview.md] — overall install model
6282
6710
 
6283
6711
  ---
@@ -6288,11 +6716,11 @@ All operations are idempotent — safe to run on every install or update.
6288
6716
  title: "Global Install Model"
6289
6717
  category: reference
6290
6718
  service: ai-toolkit
6291
- tags: [install, global, claude, local-setup]
6292
- version: "1.4.2"
6719
+ tags: [install, global, claude, codex, plugins, local-setup]
6720
+ version: "1.4.4"
6293
6721
  created: "2026-03-26"
6294
- last_updated: "2026-04-09"
6295
- description: "Reference description of the global install target, local project setup, and command responsibilities in ai-toolkit."
6722
+ last_updated: "2026-04-13"
6723
+ description: "Reference description of the global install target, project-local editor setup, global Codex plugin layering, and command responsibilities in ai-toolkit."
6296
6724
  ---
6297
6725
 
6298
6726
  # Global Install Model
@@ -6303,6 +6731,10 @@ description: "Reference description of the global install target, local project
6303
6731
 
6304
6732
  That means one machine-level install provides agents, skills, hooks, and rules to every project without committing toolkit boilerplate into each repository.
6305
6733
 
6734
+ Codex remains project-local for the core toolkit install, but experimental
6735
+ plugin packs can now layer a global Codex target in `HOME` when explicitly
6736
+ installed with `ai-toolkit plugin install --editor codex`.
6737
+
6306
6738
  ## Command Responsibilities
6307
6739
 
6308
6740
  | Command | Target | Purpose |
@@ -6315,6 +6747,11 @@ That means one machine-level install provides agents, skills, hooks, and rules t
6315
6747
  | `ai-toolkit update --local` | current project | refresh project configs; auto-detects editors from existing files |
6316
6748
  | `ai-toolkit add-rule` | `~/.softspark/ai-toolkit/rules/` | register a global rule |
6317
6749
  | `ai-toolkit remove-rule` | `~/.softspark/ai-toolkit/rules/` | unregister a global rule |
6750
+ | `ai-toolkit mcp add <name...>` | current project | merge MCP templates into `.mcp.json` |
6751
+ | `ai-toolkit mcp install --editor <name...>` | editor-native config | render MCP templates into editor-specific config files |
6752
+ | `ai-toolkit plugin install --editor claude|codex|all <name>` | runtime-native config | install plugin pack for selected runtime(s) |
6753
+ | `ai-toolkit plugin update --editor claude|codex|all <name>` | runtime-native config | re-apply plugin pack after toolkit updates |
6754
+ | `ai-toolkit plugin remove --editor claude|codex|all <name>` | runtime-native config | remove plugin pack from selected runtime(s) |
6318
6755
 
6319
6756
  ## Why global install is the default
6320
6757
 
@@ -6325,10 +6762,17 @@ That means one machine-level install provides agents, skills, hooks, and rules t
6325
6762
 
6326
6763
  ## What remains project-local
6327
6764
 
6328
- These files still stay local to a repository:
6765
+ These files still stay local to a repository as part of the core install model:
6329
6766
  - `CLAUDE.md`
6330
6767
  - `.claude/settings.local.json`
6768
+ - `.mcp.json`
6769
+ - `.cursor/mcp.json`
6770
+ - `.github/mcp.json`
6331
6771
  - `.claude/constitution.md`
6772
+ - project `AGENTS.md`
6773
+ - project `.agents/rules/*.md`
6774
+ - project `.agents/skills/*`
6775
+ - project `.codex/hooks.json`
6332
6776
  - `.github/copilot-instructions.md`
6333
6777
  - `.clinerules`
6334
6778
  - `.roomodes`
@@ -6340,10 +6784,51 @@ These files still stay local to a repository:
6340
6784
 
6341
6785
  Hooks do **not** live in project-local settings. They are merged only into global `~/.claude/settings.json`.
6342
6786
 
6787
+ Codex is the exception in terms of file location, not hook ownership: its local
6788
+ `.codex/hooks.json` points to hook scripts already installed globally in
6789
+ `~/.softspark/ai-toolkit/hooks/`.
6790
+
6791
+ ## Codex Local Install Behavior
6792
+
6793
+ `ai-toolkit install --local --editors codex` creates:
6794
+
6795
+ - `AGENTS.md`
6796
+ - `.agents/rules/*.md`
6797
+ - `.agents/skills/*`
6798
+ - `.codex/hooks.json`
6799
+
6800
+ Native Codex-compatible skills are linked directly. Claude-oriented skills that
6801
+ depend on `Agent`, `Team*`, or `Task*` primitives are translated into generated
6802
+ Codex wrappers so the project still receives the full skill catalog.
6803
+
6804
+ ## Codex Global Plugin Layer
6805
+
6806
+ `ai-toolkit plugin install --editor codex <pack>` additionally targets:
6807
+
6808
+ - `~/AGENTS.md`
6809
+ - `~/.agents/rules/*.md`
6810
+ - `~/.agents/skills/*`
6811
+ - `~/.codex/hooks.json`
6812
+
6813
+ This is not the default core install path. It is an explicit, opt-in plugin
6814
+ layer used only for plugin packs. Runtime state is tracked in
6815
+ `~/.softspark/ai-toolkit/plugins.json` per target (`claude`, `codex`).
6816
+
6817
+ ## MCP Local Sync Behavior
6818
+
6819
+ If `.mcp.json` exists in the current project, `ai-toolkit install --local` mirrors its `mcpServers` block into:
6820
+ - `.claude/settings.local.json`
6821
+ - `.cursor/mcp.json` when `--editors cursor` is selected
6822
+ - `.github/mcp.json` when `--editors copilot` is selected
6823
+
6824
+ Global-only editor MCP configs are not written during `install --local`. Use `ai-toolkit mcp install --editor <name...>` for those targets.
6825
+
6343
6826
  ## Related Documents
6344
6827
 
6345
6828
  - `kb/reference/distribution-model.md`
6346
6829
  - `kb/reference/merge-friendly-install-model.md`
6830
+ - `kb/reference/codex-cli-compatibility.md`
6831
+ - `kb/reference/mcp-editor-compatibility.md`
6347
6832
 
6348
6833
  ---
6349
6834
 
@@ -7454,39 +7939,131 @@ No existing install scripts or CI configurations need changes.
7454
7939
 
7455
7940
  ---
7456
7941
 
7942
+ ## kb/reference/mcp-editor-compatibility.md
7943
+
7944
+ ---
7945
+ title: "AI Toolkit - MCP Editor Compatibility"
7946
+ category: reference
7947
+ service: ai-toolkit
7948
+ tags: [mcp, editors, compatibility, codex, cursor]
7949
+ version: "1.0.0"
7950
+ created: "2026-04-12"
7951
+ last_updated: "2026-04-12"
7952
+ description: "Official MCP support matrix and native config targets for editors supported by ai-toolkit."
7953
+ ---
7954
+
7955
+ # MCP Editor Compatibility
7956
+
7957
+ ## Overview
7958
+
7959
+ ai-toolkit keeps `.mcp.json` as the project-level canonical template format and can render that config into native editor MCP files where the editor exposes a stable, documented configuration surface.
7960
+
7961
+ ## Supported Native Adapters
7962
+
7963
+ | Editor | Scope | Native Config Path | Adapter Behavior |
7964
+ |--------|-------|--------------------|------------------|
7965
+ | Claude Code | project + global | `.claude/settings.local.json`, `~/.claude/settings.json` | Merges `mcpServers` while preserving other settings keys |
7966
+ | Cursor | project + global | `.cursor/mcp.json`, `~/.cursor/mcp.json` | Mirrors `mcpServers` directly |
7967
+ | GitHub Copilot | project + global | `.github/mcp.json`, `~/.copilot/mcp-config.json` | Adds Copilot-required `type` and `tools` fields |
7968
+ | Gemini CLI | project + global | `.gemini/settings.json`, `~/.gemini/settings.json` | Merges `mcpServers` into settings JSON |
7969
+ | Windsurf | global | `~/.codeium/windsurf/mcp_config.json` | Global-only JSON config |
7970
+ | Cline | global | `~/.cline/data/settings/cline_mcp_settings.json` | Global-only JSON config |
7971
+ | Augment | global | `~/.augment/settings.json` | Global-only JSON settings file |
7972
+ | Codex CLI | global | `~/.codex/config.toml` | Renders JSON templates as TOML `mcp_servers` tables |
7973
+
7974
+ ## Unsupported for Automatic Install
7975
+
7976
+ These editors are still supported by ai-toolkit for rules and instructions, but ai-toolkit does not currently auto-write MCP config because a stable official file target was not adopted:
7977
+
7978
+ | Editor | Reason |
7979
+ |--------|--------|
7980
+ | Roo Code | MCP support exists, but no verified official file path was adopted in ai-toolkit |
7981
+ | Aider | No verified native MCP config surface was adopted in ai-toolkit |
7982
+ | Google Antigravity | MCP can be configured via UI/import flows, but no stable file target was adopted in ai-toolkit |
7983
+
7984
+ ## CLI
7985
+
7986
+ ```bash
7987
+ ai-toolkit mcp editors
7988
+ ai-toolkit mcp install --editor cursor --scope project github --target .
7989
+ ai-toolkit mcp install --editor codex context7
7990
+ ai-toolkit mcp remove github --editor cursor --scope project --target .
7991
+ ```
7992
+
7993
+ ## Install Flow Integration
7994
+
7995
+ When `.mcp.json` exists in a project, `ai-toolkit install --local` mirrors its servers into:
7996
+ - `.claude/settings.local.json`
7997
+ - `.cursor/mcp.json` when `--editors cursor` is selected
7998
+ - `.github/mcp.json` when `--editors copilot` is selected
7999
+
8000
+ Global-only clients are configured explicitly via `ai-toolkit mcp install --editor ...`.
8001
+
8002
+ ## Related
8003
+
8004
+ - [PATH: kb/reference/mcp-templates.md] — template catalog and CLI
8005
+ - [PATH: kb/reference/extension-api.md] — extension API surface
8006
+
8007
+ ---
8008
+
7457
8009
  ## kb/reference/mcp-templates.md
7458
8010
 
7459
8011
  ---
7460
8012
  title: "MCP Server Templates"
7461
8013
  category: reference
7462
8014
  service: ai-toolkit
7463
- tags: [mcp, templates, servers, configuration]
7464
- version: "1.0.0"
8015
+ tags: [mcp, templates, servers, configuration, editors]
8016
+ version: "1.1.0"
7465
8017
  created: "2026-04-07"
7466
- last_updated: "2026-04-07"
7467
- description: "Reference for 25 MCP server configuration templates: GitHub, PostgreSQL, Slack, Sentry, and more."
8018
+ last_updated: "2026-04-12"
8019
+ description: "Reference for 25 MCP server templates plus native editor MCP installation support."
7468
8020
  ---
7469
8021
 
7470
8022
  # MCP Server Templates
7471
8023
 
7472
8024
  ## Overview
7473
8025
 
7474
- ai-toolkit ships 25 ready-to-use MCP server configuration templates in `app/mcp-templates/`. Each template is a JSON file that defines the `mcpServers` block for a specific service. Templates are merged into the project's `.mcp.json` via the `ai-toolkit mcp` CLI subcommand.
8026
+ ai-toolkit ships 25 ready-to-use MCP server configuration templates in `app/mcp-templates/`. Each template is a JSON file that defines the canonical `mcpServers` block for a specific service. Templates can be merged into the project's `.mcp.json` and rendered into editor-native MCP config files via the `ai-toolkit mcp` CLI subcommand.
7475
8027
 
7476
8028
  ## CLI
7477
8029
 
7478
8030
  ```bash
7479
8031
  ai-toolkit mcp list # List all available templates
8032
+ ai-toolkit mcp editors # List editors with native MCP adapters
7480
8033
  ai-toolkit mcp show <name> # Print a template's JSON config
7481
8034
  ai-toolkit mcp add <name> # Merge a template into .mcp.json
7482
8035
  ai-toolkit mcp add <n1> <n2> # Add multiple templates at once
7483
- ai-toolkit mcp remove <name> # Remove a server entry from .mcp.json
8036
+ ai-toolkit mcp install --editor cursor --scope project github --target .
8037
+ ai-toolkit mcp install --editor codex context7
8038
+ ai-toolkit mcp remove <name> # Remove from .mcp.json or native editor config
7484
8039
  ```
7485
8040
 
7486
8041
  **Implementation:** `scripts/mcp_manager.py`
7487
8042
 
7488
8043
  The `add` command merges the `mcpServers` block from the template into `.mcp.json`. If `.mcp.json` does not exist it is created. If the server name already exists in `.mcp.json`, the entry is overwritten with the template version.
7489
8044
 
8045
+ The `install` command renders the same canonical template into an editor-native config format:
8046
+ - JSON clients with `mcpServers` blocks: Claude Code, Cursor, Gemini CLI, Windsurf, Cline, Augment
8047
+ - JSON clients with additional transport metadata: GitHub Copilot
8048
+ - TOML clients: Codex CLI (`[mcp_servers.<name>]`)
8049
+
8050
+ When `install` runs with `--scope project`, ai-toolkit also updates the project's `.mcp.json` so it remains the source of truth for later syncs.
8051
+
8052
+ ## Editor Support Matrix
8053
+
8054
+ | Editor | Scope | Native Config Path | Notes |
8055
+ |--------|-------|--------------------|-------|
8056
+ | `claude` | project + global | `.claude/settings.local.json`, `~/.claude/settings.json` | Preserves existing hooks and env keys |
8057
+ | `cursor` | project + global | `.cursor/mcp.json`, `~/.cursor/mcp.json` | Mirrors canonical `mcpServers` |
8058
+ | `copilot` | project + global | `.github/mcp.json`, `~/.copilot/mcp-config.json` | Adds `type` and `tools: ["*"]` automatically |
8059
+ | `gemini` | project + global | `.gemini/settings.json`, `~/.gemini/settings.json` | Uses Gemini CLI `mcpServers` format |
8060
+ | `windsurf` | global | `~/.codeium/windsurf/mcp_config.json` | Global-only official config |
8061
+ | `cline` | global | `~/.cline/data/settings/cline_mcp_settings.json` | Global-only official config |
8062
+ | `augment` | global | `~/.augment/settings.json` | Global-only settings file |
8063
+ | `codex` | global | `~/.codex/config.toml` | Rendered as TOML `mcp_servers` tables |
8064
+
8065
+ Project-local `ai-toolkit install --local` also mirrors `.mcp.json` into Claude project settings plus selected project editors that have official repository/workspace MCP files (`cursor`, `copilot`).
8066
+
7490
8067
  ## Template List
7491
8068
 
7492
8069
  | Name | Description | Required Env Vars |
@@ -7566,6 +8143,7 @@ export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_...
7566
8143
 
7567
8144
  - [PATH: kb/reference/extension-api.md] — `mcp add` as part of the extension API
7568
8145
  - [PATH: kb/reference/architecture-overview.md] — overall install model
8146
+ - [PATH: kb/reference/mcp-editor-compatibility.md] — native editor MCP support matrix
7569
8147
 
7570
8148
  ---
7571
8149
 
@@ -7641,15 +8219,15 @@ service: ai-toolkit
7641
8219
  tags: [plugins, plugin-packs, conventions, manifests, hooks, policy-packs]
7642
8220
  version: "1.0.0"
7643
8221
  created: "2026-03-28"
7644
- last_updated: "2026-04-02"
7645
- description: "Conventions for experimental ai-toolkit plugin packs, policy packs, hook packs, and plugin-creator scaffolding."
8222
+ last_updated: "2026-04-13"
8223
+ description: "Conventions for experimental ai-toolkit plugin packs, policy packs, hook packs, and plugin-creator scaffolding across Claude and Codex runtimes."
7646
8224
  ---
7647
8225
 
7648
8226
  # Plugin Pack Conventions
7649
8227
 
7650
8228
  ## Purpose
7651
8229
 
7652
- `ai-toolkit` now includes experimental plugin packs under `app/plugins/` to formalize a Claude Code-compatible plugin direction without changing the default global install surface.
8230
+ `ai-toolkit` now includes experimental plugin packs under `app/plugins/` to formalize a runtime-aware plugin direction for Claude and optional global Codex layering without changing the default core install surface.
7653
8231
 
7654
8232
  ## Pack Types
7655
8233
 
@@ -7709,32 +8287,34 @@ Required keys:
7709
8287
 
7710
8288
  ```bash
7711
8289
  ai-toolkit plugin list # show all 11 packs with install status
7712
- ai-toolkit plugin install <name> # install a single pack
7713
- ai-toolkit plugin install --all # install all 11 packs
7714
- ai-toolkit plugin update <name> # update a pack (remove + reinstall, preserves data)
7715
- ai-toolkit plugin update --all # update all installed packs
8290
+ ai-toolkit plugin install --editor claude <name> # Claude global target
8291
+ ai-toolkit plugin install --editor codex <name> # Codex global target
8292
+ ai-toolkit plugin install --editor all --all # install all 11 packs for both runtimes
8293
+ ai-toolkit plugin update --editor all --all # update all installed packs
7716
8294
  ai-toolkit plugin clean <name> # prune data older than 90 days (default)
7717
8295
  ai-toolkit plugin clean <name> --days 30 # prune data older than 30 days
7718
- ai-toolkit plugin remove <name> # remove a pack
7719
- ai-toolkit plugin remove --all # remove all installed packs
7720
- ai-toolkit plugin status # show installed packs with data stats
8296
+ ai-toolkit plugin remove --editor codex <name> # remove from one runtime only
8297
+ ai-toolkit plugin remove --editor all --all # remove all installed packs everywhere
8298
+ ai-toolkit plugin status --editor all # show installed packs with runtime details
7721
8299
  ```
7722
8300
 
7723
8301
  ### What `plugin install` Does
7724
8302
 
7725
- 1. **Verifies** referenced agents/skills exist in `~/.claude/` (links them from core if missing)
8303
+ 1. **Parses** `--editor claude|codex|all` (default: `claude`)
7726
8304
  2. **Copies** plugin-specific hooks to `~/.softspark/ai-toolkit/hooks/plugin-<pack>-<hook>.sh`
7727
8305
  3. **Copies** plugin-specific scripts to `~/.softspark/ai-toolkit/plugin-scripts/<pack>/`
7728
8306
  4. **Runs** init scripts if present (e.g. `init_db.py` for memory-pack — safe to re-run, preserves data)
7729
- 5. **Merges** plugin hooks into `~/.claude/settings.json` (tagged with `_source: ai-toolkit-plugin-<name>`)
7730
- 6. **Records** installed state to `~/.softspark/ai-toolkit/plugins.json`
8307
+ 5. **Claude target**: links missing agents/skills into `~/.claude/`, injects plugin-local rules into `~/.claude/CLAUDE.md`, and merges plugin hook entries into `~/.claude/settings.json`
8308
+ 6. **Codex target**: bootstraps global Codex assets in `HOME` (`~/AGENTS.md`, `~/.agents/skills`, `~/.agents/rules`, `~/.codex/hooks.json`) and then layers plugin-specific rules/hooks on top
8309
+ 7. **Records** installed state per runtime in `~/.softspark/ai-toolkit/plugins.json`
7731
8310
 
7732
8311
  ### What `plugin update` Does
7733
8312
 
7734
- 1. **Removes** existing plugin hooks, scripts, and settings.json entries (same as `remove`)
8313
+ 1. **Removes** existing plugin runtime entries for the selected editor(s) (same as `remove`)
7735
8314
  2. **Reinstalls** from the current source (same as `install`)
7736
8315
  3. **Preserves plugin data** (e.g. memory-pack SQLite database is never deleted)
7737
- 4. `--all` updates only currently installed packs (not all available)
8316
+ 4. Shared plugin scripts/hooks are kept if another runtime still has the same pack installed
8317
+ 5. `--all` updates only currently installed packs for the selected runtime(s)
7738
8318
 
7739
8319
  ### What `plugin clean` Does
7740
8320
 
@@ -7744,10 +8324,10 @@ ai-toolkit plugin status # show installed packs with data stats
7744
8324
 
7745
8325
  ### What `plugin remove` Does
7746
8326
 
7747
- 1. **Removes** plugin hooks from `~/.softspark/ai-toolkit/hooks/`
7748
- 2. **Removes** plugin scripts from `~/.softspark/ai-toolkit/plugin-scripts/`
7749
- 3. **Strips** plugin hook entries from `settings.json` (by `_source` tag)
7750
- 4. **Updates** `plugins.json` state
8327
+ 1. **Claude target**: strips plugin hook entries from `~/.claude/settings.json` and removes plugin-local rule sections from `~/.claude/CLAUDE.md`
8328
+ 2. **Codex target**: strips plugin hook entries from `~/.codex/hooks.json` and removes `~/.agents/rules/plugin-<pack>-*.md`
8329
+ 3. **Shared assets** (`~/.softspark/ai-toolkit/hooks/plugin-*`, `plugin-scripts/<pack>/`) are removed only when no remaining runtime still uses that pack
8330
+ 4. **Updates** `plugins.json` state per runtime
7751
8331
  5. **Leaves** core agents/skills untouched (they belong to the base install)
7752
8332
  6. **Leaves** plugin data intact (e.g. `memory.db` — use `clean` to prune)
7753
8333
 
@@ -7755,7 +8335,7 @@ ai-toolkit plugin status # show installed packs with data stats
7755
8335
 
7756
8336
  - **Auto-retention**: `session-summary.sh` hook auto-prunes observations older than 90 days on every session end (configurable via `MEMORY_RETENTION_DAYS` env var)
7757
8337
  - **Manual clean**: `ai-toolkit plugin clean memory-pack --days 30`
7758
- - **Status**: `ai-toolkit plugin status` shows DB size, observation count, date range
8338
+ - **Status**: `ai-toolkit plugin status --editor claude|codex|all` shows runtime-specific install details plus DB size, observation count, and date range where relevant
7759
8339
 
7760
8340
  ## Current Experimental Packs
7761
8341
 
@@ -7785,7 +8365,6 @@ ai-toolkit plugin status # show installed packs with data stats
7785
8365
 
7786
8366
  These are intentionally excluded from the default install until explicitly enabled via `ai-toolkit plugin install`.
7787
8367
 
7788
-
7789
8368
  ---
7790
8369
 
7791
8370
  ## kb/reference/quick-wins-implementation-summary.md
@@ -7925,10 +8504,10 @@ title: "AI Toolkit - Skills Catalog"
7925
8504
  category: reference
7926
8505
  service: ai-toolkit
7927
8506
  tags: [skills, domain-knowledge, catalog, task-skills, hybrid-skills]
7928
- version: "1.4.2"
8507
+ version: "1.4.3"
7929
8508
  created: "2026-03-23"
7930
- last_updated: "2026-04-09"
7931
- description: "Complete skills catalog with task, hybrid, and knowledge skills. Includes effort levels, skill-scoped hooks, executable scripts, security auditor, and persona presets."
8509
+ last_updated: "2026-04-12"
8510
+ description: "Complete skills catalog with task, hybrid, and knowledge skills. Includes Codex adaptation notes, effort levels, skill-scoped hooks, executable scripts, security auditor, and persona presets."
7932
8511
  ---
7933
8512
 
7934
8513
  # Skills Catalog
@@ -7995,9 +8574,9 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
7995
8574
  | **docs** | `/docs` | high | Generate/update docs: README, API docs, architecture notes, changelogs (Tier 1 — single agent) |
7996
8575
  | **search** | `/search` | medium | Search knowledge base (MCP tools with local fallback) |
7997
8576
  | **explain** | `/explain` | medium | Explain architecture of a file/module using Mermaid diagrams |
7998
- | **orchestrate** | `/orchestrate` | max | Custom multi-agent parallelism — Tier 3, spawns agents via Agent tool |
8577
+ | **orchestrate** | `/orchestrate` | max | Custom multi-agent parallelism — Tier 3, native in Claude, Codex-adapted to `spawn_agent` workflows |
7999
8578
  | **swarm** | `/swarm` | max | Massive parallelism: map-reduce, consensus, relay — Tier 3 |
8000
- | **workflow** | `/workflow` | max | 15 predefined multi-agent workflow types — Tier 2 |
8579
+ | **workflow** | `/workflow` | max | 15 predefined multi-agent workflow types — Tier 2, Codex-adapted to native subagent orchestration |
8001
8580
  | **instinct-review** | `/instinct-review` | low | Review, curate, and manage learned instincts from past sessions |
8002
8581
  | **teams** | `/teams` | max | Launch pre-configured Agent Teams compositions for common workflows |
8003
8582
  | **write-a-prd** | `/write-a-prd` | high | Create PRD through interactive interview, codebase exploration, and module design |
@@ -8172,6 +8751,28 @@ Step 0 interview before setup — 5 targeted questions to capture undocumented p
8172
8751
  - `allowed-tools: ...` — tools available to the agent when processing this skill
8173
8752
  - `depends-on: skill-a, skill-b` — declares dependencies on other skills (validated by `validate.py`)
8174
8753
 
8754
+ ### Codex CLI Adaptation
8755
+
8756
+ Codex CLI receives the full skill catalog during `ai-toolkit install --local --editors codex`.
8757
+
8758
+ - Native Codex-compatible skills are symlinked directly into `.agents/skills/`
8759
+ - Claude-oriented orchestration skills are generated as Codex wrappers
8760
+ - Adapted wrappers translate `Agent`, `Team*`, and `Task*` guidance to `spawn_agent`, `send_input`, `wait_agent`, `close_agent`, and `update_plan`
8761
+
8762
+ Common adapted skills:
8763
+
8764
+ - `/orchestrate`
8765
+ - `/workflow`
8766
+ - `/swarm`
8767
+ - `/teams`
8768
+ - `/subagent-development`
8769
+ - `/tdd`
8770
+
8771
+ The translated skill content keeps the original support assets (`reference/`,
8772
+ `scripts/`, `assets/`) while replacing Claude-specific runtime instructions.
8773
+
8774
+ See `kb/reference/codex-cli-compatibility.md` for the detailed mapping and hook limits.
8775
+
8175
8776
  ### Skill Dependencies (`depends-on`)
8176
8777
  Skills can declare dependencies on other skills (primarily knowledge skills) for documentation and validation:
8177
8778
  ```yaml
@@ -8439,6 +9040,224 @@ ai-toolkit sync --pull abc123def456 # Use gist ID from first push
8439
9040
 
8440
9041
  ---
8441
9042
 
9043
+ ## kb/reference/unique-features.md
9044
+
9045
+ ---
9046
+ title: "Unique Features & Differentiators"
9047
+ category: reference
9048
+ service: ai-toolkit
9049
+ tags: [features, differentiators, constitution, hooks, security, tdd, memory]
9050
+ created: "2026-04-13"
9051
+ last_updated: "2026-04-13"
9052
+ description: "Detailed description of ai-toolkit's unique features: constitution enforcement, hooks system, security scanning, effort budgeting, quality gates, and more."
9053
+ ---
9054
+
9055
+ # Unique Features & Differentiators
9056
+
9057
+ ## 1. Machine-Enforced Constitution
9058
+
9059
+ Unlike other toolkits that put safety rules in documentation only, ai-toolkit enforces a 5-article constitution via `PreToolUse` hooks. The hook actually **blocks** execution of:
9060
+ - Mass deletion (`rm -rf`, `DROP TABLE`)
9061
+ - Blind overwrites of uncommitted work
9062
+ - Any action that could cause irreversible data loss
9063
+
9064
+ ## 2. Hooks as Executable Scripts
9065
+
9066
+ Hook logic lives in `app/hooks/*.sh` — not inline JSON one-liners. Scripts are copied to `~/.softspark/ai-toolkit/hooks/` on install and referenced from `~/.claude/settings.json`. Easy to read, debug, and extend.
9067
+
9068
+ **12 lifecycle events / 21 global hook entries:**
9069
+
9070
+ | Event | Script | Action |
9071
+ |-------|--------|--------|
9072
+ | SessionStart | `session-start.sh` | MANDATORY rules reminder + session context + instincts |
9073
+ | SessionStart | `mcp-health.sh` | Check MCP server command availability (non-blocking warning) |
9074
+ | SessionStart | `session-context.sh` | Capture environment snapshot to `~/.softspark/ai-toolkit/sessions/current-context.json` |
9075
+ | Notification | `notify-waiting.sh` | Cross-platform desktop notification |
9076
+ | PreToolUse | `guard-destructive.sh` | Block `rm -rf`, `DROP TABLE`, etc. |
9077
+ | PreToolUse | `guard-path.sh` | Block wrong-user path hallucination |
9078
+ | PreToolUse | `guard-config.sh` | Block edits to linter/formatter config files unless explicitly requested |
9079
+ | PreToolUse | `commit-quality.sh` | Advisory validation of git commit messages |
9080
+ | UserPromptSubmit | `user-prompt-submit.sh` | Prompt governance reminder |
9081
+ | UserPromptSubmit | `track-usage.sh` | Record skill invocations to local stats |
9082
+ | PostToolUse | `post-tool-use.sh` | Lightweight validation reminders after edits |
9083
+ | PostToolUse | `governance-capture.sh` | Log security-sensitive operations to JSONL |
9084
+ | Stop | `quality-check.sh` | Multi-language lint (ruff/tsc/phpstan/dart/go) |
9085
+ | Stop | `save-session.sh` | Persist session context for cross-session continuity |
9086
+ | TaskCompleted | `quality-gate.sh` | Block task completion on lint/type errors |
9087
+ | SubagentStart | `subagent-start.sh` | Narrow-scope reminder for spawned subagents |
9088
+ | SubagentStop | `subagent-stop.sh` | Completion checklist for subagent handoff |
9089
+ | PreCompact | `pre-compact.sh` | Smart compaction: prioritized context |
9090
+ | PreCompact | `pre-compact-save.sh` | Save timestamped context backup |
9091
+ | SessionEnd | `session-end.sh` | Persist a session-end handoff note |
9092
+ | TeammateIdle | *(inline)* | Completeness reminder |
9093
+
9094
+ **5 skill-scoped hooks:**
9095
+
9096
+ | Skill | Hook | Action |
9097
+ |-------|------|--------|
9098
+ | `/commit` | Pre | Run linter, block on failure |
9099
+ | `/test` | Post | Coverage check, report threshold |
9100
+ | `/deploy` | Post | Health check, rollback if degraded |
9101
+ | `/migrate` | Pre | Backup verification |
9102
+ | `/rollback` | Post | State verification |
9103
+
9104
+ ## 3. Security Scanning
9105
+
9106
+ Two complementary security tools:
9107
+
9108
+ **`/skill-audit`** — scan skills and agents for code-level risks:
9109
+
9110
+ ```bash
9111
+ /skill-audit # Interactive (Claude remediation)
9112
+ python3 scripts/audit_skills.py --ci # CI mode: exit 1 on HIGH
9113
+ ```
9114
+
9115
+ Detects: `eval()`/`exec()`, hardcoded secrets, permission issues, bash risks.
9116
+
9117
+ **`/cve-scan`** — scan project dependencies for known CVEs:
9118
+
9119
+ ```bash
9120
+ /cve-scan # Auto-detect ecosystems, scan all
9121
+ python3 app/skills/cve-scan/scripts/cve_scan.py # Direct invocation
9122
+ python3 app/skills/cve-scan/scripts/cve_scan.py --json # Machine-readable
9123
+ ```
9124
+
9125
+ Supports: npm, pip, composer, cargo, go, ruby, dart. Uses native audit tools — zero external deps.
9126
+
9127
+ **Severity levels:** HIGH (blocks CI), WARN (should fix), INFO (review)
9128
+
9129
+ ## 4. Effort-Based Model Budgeting
9130
+
9131
+ Every skill declares an effort level used for model token budgeting:
9132
+ - `low` — lint, build, fix (fast, cheap)
9133
+ - `medium` — debug, analyze, ci
9134
+ - `high` — review, plan, refactor, docs
9135
+ - `max` — orchestrate, swarm, workflow
9136
+
9137
+ ## 5. Multi-Language Quality Gates
9138
+
9139
+ The `Stop` hook runs after every response across 5 languages:
9140
+
9141
+ | Language | Lint | Type Check |
9142
+ |----------|------|-----------|
9143
+ | Python | ruff | mypy --strict |
9144
+ | TypeScript | ESLint/tsc | tsc --noEmit |
9145
+ | PHP | phpstan | phpstan |
9146
+ | Dart | dart analyze | dart analyze |
9147
+ | Go | go vet | go vet |
9148
+
9149
+ ## 6. Iron Law Enforcement
9150
+
9151
+ Three skills enforce non-negotiable quality gates with anti-rationalization tables:
9152
+
9153
+ | Skill | Iron Law | What it prevents |
9154
+ |-------|----------|-----------------|
9155
+ | `/tdd` | `NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST` | Code written before test? Delete it. Start over. |
9156
+ | `debugging-tactics` | `NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST` | 4-phase debugging: root cause → pattern → hypothesis → fix. |
9157
+ | `verification-before-completion` | `NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE` | Gate: IDENTIFY → RUN → READ → VERIFY → CLAIM. |
9158
+
9159
+ Additionally, **15 core skills** include `## Common Rationalizations` tables — domain-specific excuses with rebuttals that prevent agent drift.
9160
+
9161
+ ## 7. Confidence Scoring & Self-Evaluation (`/review`)
9162
+
9163
+ The `/review` skill outputs findings with per-issue confidence scores (1-10) and severity classification (critical/major/minor/nit). After completing a review, an LLM-as-Judge self-evaluation pass checks for blind spots: anchoring bias, assumption vs verification, missing unhappy paths, and calibrates confidence scores.
9164
+
9165
+ ## 8. Agent Verification Checklists
9166
+
9167
+ 10 key agents include `## Verification Checklist` — exit criteria that MUST be met before presenting results:
9168
+
9169
+ | Agent | Key exit criteria |
9170
+ |-------|------------------|
9171
+ | `code-reviewer` | Every finding has file:line + evidence, not just opinion |
9172
+ | `security-auditor` | Each finding includes proof-of-concept or exploit path |
9173
+ | `test-engineer` | No empty/placeholder tests, mocks only at boundaries |
9174
+ | `debugger` | Root cause identified, regression test added |
9175
+ | `backend-specialist` | Input validation, error format, query optimization |
9176
+ | `frontend-specialist` | Empty/loading/error states, accessibility, responsive |
9177
+ | `database-architect` | Migration tested on prod-like volume, rollback tested |
9178
+ | `performance-optimizer` | Baseline measured, profiler evidence attached |
9179
+ | `devops-implementer` | Dry run passed, rollback documented, no hardcoded secrets |
9180
+ | `documenter` | Code examples runnable, no placeholders, valid links |
9181
+
9182
+ ## 9. Skill Reference Routing
9183
+
9184
+ 7 core skills include `## Related Skills` sections that suggest logical follow-up skills:
9185
+
9186
+ ```
9187
+ /review → found issues? → /debug, /tdd, /cve-scan, /analyze
9188
+ /debug → bug fixed? → /review, /tdd, /workflow incident-response
9189
+ /plan → approved? → /orchestrate, /write-a-prd, /grill-me
9190
+ ```
9191
+
9192
+ ## 10. Two-Stage Review (`/subagent-development`)
9193
+
9194
+ Per-task review pipeline inspired by [obra/superpowers](https://github.com/obra/superpowers):
9195
+
9196
+ ```
9197
+ Implementer → Spec Compliance Review → Code Quality Review → Next Task
9198
+ ```
9199
+
9200
+ - Implementer reports: `DONE` / `DONE_WITH_CONCERNS` / `NEEDS_CONTEXT` / `BLOCKED`
9201
+ - Spec reviewer: all requirements met, nothing extra, nothing missing
9202
+ - Quality reviewer: SOLID, naming, error handling, tests, security
9203
+
9204
+ ## 11. Ralph Wiggum Loop (`/repeat`)
9205
+
9206
+ Autonomous agent loop with safety controls:
9207
+
9208
+ ```bash
9209
+ /repeat 5m /test # run tests every 5 min until all pass
9210
+ /repeat --iterations 3 /review # max 3 review passes
9211
+ ```
9212
+
9213
+ | Safety Control | Default |
9214
+ |----------------|---------|
9215
+ | Max iterations | 5 |
9216
+ | Circuit breaker | 3 consecutive failures → halt |
9217
+ | Min interval | 1 minute |
9218
+ | Exit detection | DONE / COMPLETE / ALL PASS |
9219
+
9220
+ ## 12. Persistent Memory (`memory-pack` plugin)
9221
+
9222
+ SQLite-based session memory (opt-in plugin pack):
9223
+
9224
+ | Component | Purpose |
9225
+ |-----------|---------|
9226
+ | `observation-capture.sh` | PostToolUse hook — captures tool actions to SQLite |
9227
+ | `session-summary.sh` | Stop hook — AI-compress session observations |
9228
+ | `mem-search` skill | FTS5 full-text search across past sessions |
9229
+ | `<private>` tags | Content between tags stripped before storage |
9230
+ | Progressive disclosure | Summary (~500 tok) → relevant (~2k tok) → full |
9231
+
9232
+ ## 13. Persona Presets
9233
+
9234
+ 4 engineering personas that adjust Claude's communication style per role:
9235
+
9236
+ | Persona | Focus | Key Skills |
9237
+ |---------|-------|------------|
9238
+ | `backend-lead` | System design, scalability, data integrity | `/workflow backend-feature`, `/tdd` |
9239
+ | `frontend-lead` | Component architecture, a11y, Core Web Vitals | `/design-an-interface`, `/review` |
9240
+ | `devops-eng` | IaC, CI/CD, blast radius, rollback safety | `/workflow infrastructure-change`, `/deploy` |
9241
+ | `junior-dev` | Step-by-step explanations, learning focus | `/explain`, `/explore`, `/debug` |
9242
+
9243
+ Persistent via `--persona` at install time, or session-scoped via `/persona` runtime command.
9244
+
9245
+ ## 14. Visual Brainstorming Companion
9246
+
9247
+ Optional browser-based companion for `/write-a-prd` and `/design-an-interface`:
9248
+ - Ephemeral Node.js HTTP server (auto-kills after 30min idle)
9249
+ - Dark theme, responsive, zero external dependencies
9250
+ - Per-question routing: mockups/diagrams → browser, text/conceptual → terminal
9251
+
9252
+ ## 15. KB Integration Protocol
9253
+
9254
+ Agents follow a research-before-action protocol enforced via rules:
9255
+ 1. `smart_query()` or `hybrid_search_kb()` before any technical answer
9256
+ 2. Source citation mandatory (`[PATH: kb/...]`)
9257
+ 3. Strict order: KB → Files → External Docs → General Knowledge
9258
+
9259
+ ---
9260
+
8442
9261
  ## kb/troubleshooting/README.md
8443
9262
 
8444
9263
  ---