@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
@@ -307,7 +307,7 @@ Lead Session (You)
307
307
  ### Language Rules (70 files, 13 languages)
308
308
  `app/rules/` contains per-language coding rules. Supported languages: TypeScript, Python, Go, Rust, Java, Kotlin, Swift, Dart, C#, PHP, C++, Ruby, and common (shared). Auto-detected from project files via `--auto-detect` or selected with `--modules rules-<lang>`.
309
309
 
310
- Language rules are propagated to **all configured editors** — not just Claude. `dir_rules_shared.build_language_rules()` reads `app/rules/<lang>/*.md`, strips frontmatter, and returns combined content per language. Each directory-based generator (Cursor, Windsurf, Cline, Roo, Augment, Antigravity) emits `ai-toolkit-lang-<lang>` files in its native format. Registered custom rules (`~/.softspark/ai-toolkit/rules/`) are similarly propagated as `ai-toolkit-custom-<name>` files via `build_registered_rules()`.
310
+ Language rules are propagated to **all configured editors** — not just Claude. `dir_rules_shared.build_language_rules()` reads `app/rules/<lang>/*.md`, strips frontmatter, and returns combined content per language. Each directory-based generator (Cursor, Windsurf, Cline, Roo, Augment, Antigravity, Codex) emits `ai-toolkit-lang-<lang>` files in its native format. Registered custom rules (`~/.softspark/ai-toolkit/rules/`) are similarly propagated as `ai-toolkit-custom-<name>` files via `build_registered_rules()`.
311
311
 
312
312
  ### Extension API (`inject-hook`)
313
313
  The `inject_section_cli.py` script provides a stable marker-based injection API. Any tool can add sections to `CLAUDE.md`, `constitution.md`, or `ARCHITECTURE.md` without overwriting user content, using `<!-- TOOLKIT:START:<id> -->` / `<!-- TOOLKIT:END:<id> -->` markers.
@@ -5,10 +5,15 @@ Experimental opt-in plugin packs that group existing ai-toolkit assets by domain
5
5
  These packs are **not** installed automatically by `ai-toolkit install` and are **not** part of the default install.
6
6
  They serve three purposes:
7
7
 
8
- 1. formalize a plugin-pack contract compatible with Claude Code plugin manifests,
8
+ 1. formalize a plugin-pack contract for runtime-aware plugin installation,
9
9
  2. provide curated bundles by domain,
10
10
  3. give `plugin-creator` a concrete scaffold to follow.
11
11
 
12
+ Plugin packs can target:
13
+ - Claude global runtime via `ai-toolkit plugin install --editor claude <name>`
14
+ - Codex global plugin layer via `ai-toolkit plugin install --editor codex <name>`
15
+ - both runtimes via `ai-toolkit plugin install --editor all <name>`
16
+
12
17
  Current packs:
13
18
  - `security-pack`
14
19
  - `research-pack`
@@ -16,4 +21,3 @@ Current packs:
16
21
  - `enterprise-pack`
17
22
 
18
23
  See `kb/reference/plugin-pack-conventions.md` for pack rules, validation, and adoption guidance.
19
-
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: plugin-creator
3
- description: "Creates experimental opt-in Claude Code plugin packs with manifests, conventions, and optional module scaffolding"
3
+ description: "Creates experimental opt-in plugin packs with manifests, conventions, and optional module scaffolding for Claude and Codex runtimes"
4
4
  effort: high
5
5
  disable-model-invocation: true
6
6
  argument-hint: "[plugin pack name or domain]"
@@ -11,7 +11,7 @@ allowed-tools: Read, Write, Edit, Bash, Grep, Glob
11
11
 
12
12
  $ARGUMENTS
13
13
 
14
- Create a new experimental opt-in Claude Code plugin pack following ai-toolkit conventions.
14
+ Create a new experimental opt-in plugin pack following ai-toolkit conventions.
15
15
 
16
16
  ## Workflow
17
17
 
@@ -64,7 +64,7 @@ app/plugins/<plugin-name>/
64
64
  - Prefer referencing existing toolkit assets before duplicating them
65
65
  - Pack manifests must be valid JSON with `name`, `description`, `version`, `domain`, `type`, `status`, and `includes`
66
66
  - Optional hooks must be executable and documented in the pack README
67
- - If the pack introduces policy or hook behavior, document install/opt-in semantics clearly, including that the pack is not part of the default install
67
+ - If the pack introduces policy or hook behavior, document install/opt-in semantics clearly, including supported runtimes (`claude`, `codex`, or `all`) and that the pack is not part of the default install
68
68
  - Experimental packs should remain opt-in and must not silently alter default global install behavior
69
69
 
70
70
  ## Validation Checklist
@@ -75,4 +75,3 @@ app/plugins/<plugin-name>/
75
75
  - [ ] Optional hooks are executable and use `#!/bin/bash`
76
76
  - [ ] `scripts/validate.py` passes
77
77
  - [ ] Public docs mention the pack only after the manifest and README exist
78
-
package/bin/ai-toolkit.js CHANGED
@@ -29,6 +29,7 @@ const GENERATORS = {
29
29
  'aider-conf': { script: 'generate_aider_conf.py', dest: '.aider.conf.yml' },
30
30
  'augment-rules': { script: 'generate_augment.py', dest: path.join('.augment', 'rules', 'ai-toolkit.md'), mkdir: '.augment/rules' },
31
31
  'agents-md': { script: 'generate_agents_md.py', dest: 'AGENTS.md' },
32
+ 'codex-md': { script: 'generate_codex.py', dest: 'AGENTS.md' },
32
33
  };
33
34
 
34
35
  // ---------------------------------------------------------------------------
@@ -74,7 +75,7 @@ const COMMANDS = {
74
75
  evaluate: 'Run skill evaluation suite',
75
76
  stats: 'Show skill usage statistics (--reset to clear, --json for raw output)',
76
77
  create: 'Scaffold new skill from template (e.g. create skill my-lint --template=linter)',
77
- mcp: 'Manage MCP server templates (list, show, add, remove)',
78
+ mcp: 'Manage MCP templates and install native editor MCP configs',
78
79
  config: 'Manage config inheritance (validate, diff, init, create-base, check)',
79
80
  projects: 'List and manage registered projects (--prune, remove <path>)',
80
81
  plugin: 'Manage plugin packs (install, remove, update, clean, list, status)',
@@ -94,10 +95,13 @@ const COMMANDS = {
94
95
  'augment-rules': 'Generate .augment/rules/ai-toolkit.md for Augment (legacy)',
95
96
  'augment-dir-rules': 'Generate .augment/rules/ai-toolkit-*.md for Augment (recommended)',
96
97
  'antigravity-rules': 'Generate .agent/rules/ and .agent/workflows/ for Google Antigravity',
98
+ 'codex-md': 'Generate AGENTS.md for OpenAI Codex CLI',
99
+ 'codex-rules': 'Generate .agents/rules/ for OpenAI Codex CLI',
100
+ 'codex-hooks': 'Generate .codex/hooks.json for OpenAI Codex CLI',
97
101
  'agents-md': 'Regenerate AGENTS.md from agent definitions',
98
102
  'compile-slm': 'Compile toolkit into a minimal SLM system prompt (--budget, --model-size, --dry-run)',
99
103
  'llms-txt': 'Generate llms.txt and llms-full.txt',
100
- 'generate-all': 'Generate all platform configs at once (agents, cursor, windsurf, copilot, gemini, cline, roo, aider, augment, antigravity, llms)',
104
+ 'generate-all': 'Generate all platform configs at once (agents, cursor, windsurf, copilot, gemini, cline, roo, aider, augment, antigravity, codex, llms)',
101
105
  help: 'Show this help message',
102
106
  };
103
107
 
@@ -199,11 +203,12 @@ function showHelp() {
199
203
  console.log('\nOptions for install / update:');
200
204
  console.log(' --only <list> Apply only listed components (e.g. agents,hooks,cursor,windsurf,gemini)');
201
205
  console.log(' --skip <list> Skip listed components');
202
- console.log(' --local Also set up project-local configs (CLAUDE.md, settings, constitution, copilot, cline, roo, aider, git hooks)');
206
+ console.log(' --local Also set up project-local configs (CLAUDE.md, settings, constitution, language rules, git hooks)');
203
207
  console.log(' --profile <p> Install profile: minimal (agents+skills), standard (default), strict (all+git hooks)');
208
+ console.log(' --persona <p> Persona preset: backend-lead, frontend-lead, devops-eng, junior-dev');
204
209
  console.log(' --modules <list> Install specific modules (e.g. core,agents,rules-typescript)');
205
210
  console.log(' --lang <list> Explicitly select language rules (e.g. typescript, go,python)');
206
- console.log(' --editors <list> Install editor configs: cursor,windsurf,cline,roo,aider,augment,copilot,antigravity (or "all")');
211
+ console.log(' --editors <list> Install editor configs: cursor,windsurf,cline,roo,aider,augment,copilot,antigravity,codex (or "all")');
207
212
  console.log(' Default with --local: auto-detect from existing project files');
208
213
  console.log(' --auto-detect Detect project languages and install matching rule modules');
209
214
  console.log(' --list, --dry-run Dry-run: show what would be applied');
@@ -230,20 +235,25 @@ function showHelp() {
230
235
  console.log(' <rule-file> Path to .md rule file to register globally');
231
236
  console.log(' [rule-name] Override rule name (default: filename without .md)');
232
237
  console.log('\nOptions for plugin:');
233
- console.log(' install <name> Install a plugin pack (copies hooks, links skills/agents)');
234
- console.log(' install --all Install all available plugin packs');
238
+ console.log(' install <name> Install a plugin pack (--editor claude|codex|all)');
239
+ console.log(' install --all Install all available plugin packs for selected editor(s)');
235
240
  console.log(' update <name> Update a plugin pack (remove + reinstall)');
236
- console.log(' update --all Update all installed plugin packs');
241
+ console.log(' update --all Update all installed plugin packs for selected editor(s)');
237
242
  console.log(' clean <name> Prune old data (e.g. memory-pack --days 30)');
238
243
  console.log(' remove <name> Remove a plugin pack');
239
244
  console.log(' remove --all Remove all installed plugins');
240
245
  console.log(' list Show available plugin packs with install status');
241
246
  console.log(' status Show currently installed plugins with data stats');
247
+ console.log(' --editor <list> Runtime target: claude, codex, or all (default: claude)');
242
248
  console.log('\nOptions for mcp:');
243
249
  console.log(' list List available MCP templates');
250
+ console.log(' editors List editors with native MCP config adapters');
244
251
  console.log(' show <name> Show template details');
245
252
  console.log(' add <name> [names..] [--target <path>] Add servers to .mcp.json');
246
- console.log(' remove <name> Remove a server from .mcp.json');
253
+ console.log(' install --editor <name[,..]> [--scope project|global] [--target <path>] [names..]');
254
+ console.log(' Install templates into native editor MCP config');
255
+ console.log(' remove <name> [--editor <name[,..]>] [--scope project|global] [--target <path>]');
256
+ console.log(' Remove from .mcp.json or native editor configs');
247
257
  console.log('\nOptions for doctor:');
248
258
  console.log(' --fix Auto-repair detected issues');
249
259
  console.log('\nOptions for eject:');
@@ -372,7 +382,7 @@ function handleRemoveHook(args) {
372
382
  */
373
383
  function handleMcp(args) {
374
384
  if (args.length === 0) {
375
- console.error('Usage: ai-toolkit mcp <list|show|add|remove> [args..]');
385
+ console.error('Usage: ai-toolkit mcp <list|editors|show|add|install|remove> [args..]');
376
386
  process.exit(1);
377
387
  }
378
388
  run(scriptPath('mcp_manager.py'), args);
@@ -394,7 +404,9 @@ function handleConfig(args) {
394
404
  * @param {string[]} _args - Unused, kept for signature consistency
395
405
  */
396
406
  function handleGenerateAll(_args) {
397
- for (const gen of Object.values(GENERATORS)) {
407
+ for (const [name, gen] of Object.entries(GENERATORS)) {
408
+ // Skip agents-md — codex-md generates a superset to the same AGENTS.md
409
+ if (name === 'agents-md') continue;
398
410
  writeGeneratorOutput(gen);
399
411
  }
400
412
  // Directory-based generators (multi-file output)
@@ -404,11 +416,21 @@ function handleGenerateAll(_args) {
404
416
  run(scriptPath('generate_cline_rules.py'), [CWD]);
405
417
  run(scriptPath('generate_roo_rules.py'), [CWD]);
406
418
  run(scriptPath('generate_augment_rules.py'), [CWD]);
419
+ run(scriptPath('generate_codex_rules.py'), [CWD]);
420
+ run(scriptPath('generate_codex_hooks.py'), [CWD]);
407
421
  // Single-file generators
408
422
  const conventionsOut = runGenerator('generate_conventions.py');
409
423
  fs.writeFileSync(path.join(CWD, 'CONVENTIONS.md'), conventionsOut);
410
424
  console.log('Generated: CONVENTIONS.md');
411
425
  generateLlmsTxt();
426
+ // Re-inject registered custom rules into .claude/CLAUDE.md (idempotent markers)
427
+ const rulesDir = path.join(process.env.HOME, '.softspark', 'ai-toolkit', 'rules');
428
+ if (fs.existsSync(rulesDir)) {
429
+ const ruleFiles = fs.readdirSync(rulesDir).filter(f => f.endsWith('.md')).sort();
430
+ for (const rf of ruleFiles) {
431
+ run(scriptPath('inject_rule_cli.py'), [path.join(rulesDir, rf), CWD]);
432
+ }
433
+ }
412
434
  }
413
435
 
414
436
  /**
@@ -501,6 +523,8 @@ const SPECIAL_HANDLERS = {
501
523
  'roo-dir-rules': (_args) => run(scriptPath('generate_roo_rules.py'), [CWD]),
502
524
  'conventions-md': (_args) => { const out = runGenerator('generate_conventions.py'); fs.writeFileSync(path.join(CWD, 'CONVENTIONS.md'), out); console.log('Generated: CONVENTIONS.md'); },
503
525
  'augment-dir-rules': (_args) => run(scriptPath('generate_augment_rules.py'), [CWD]),
526
+ 'codex-rules': (_args) => run(scriptPath('generate_codex_rules.py'), [CWD]),
527
+ 'codex-hooks': (_args) => run(scriptPath('generate_codex_hooks.py'), [CWD]),
504
528
  'generate-all': handleGenerateAll,
505
529
  };
506
530
 
@@ -3,9 +3,9 @@ title: "SOP: Claude Toolkit Maintenance"
3
3
  category: procedures
4
4
  service: ai-toolkit
5
5
  tags: [sop, maintenance, agents, skills, install]
6
- version: "1.4.2"
6
+ version: "1.4.4"
7
7
  created: "2026-03-23"
8
- last_updated: "2026-04-10"
8
+ last_updated: "2026-04-13"
9
9
  description: "Standard operating procedures for installing, maintaining, and evolving the ai-toolkit."
10
10
  ---
11
11
 
@@ -34,7 +34,7 @@ ai-toolkit install --local --editors all # all supported editor
34
34
  ai-toolkit install --local --editors cursor,aider # specific editors only
35
35
  ```
36
36
 
37
- Supported editors: `cursor`, `windsurf`, `cline`, `roo`, `aider`, `augment`, `copilot`, `antigravity`.
37
+ Supported editors: `cursor`, `windsurf`, `cline`, `roo`, `aider`, `augment`, `copilot`, `antigravity`, `codex`.
38
38
 
39
39
  To restrict which language rules are injected, use `--lang`:
40
40
 
@@ -194,22 +194,22 @@ Use `PreToolUse` for blocking validations, `PostToolUse` for non-blocking feedba
194
194
  ## Managing Plugins
195
195
 
196
196
  ```bash
197
- ai-toolkit plugin list # show available packs
198
- ai-toolkit plugin install <name> # install a single pack
199
- ai-toolkit plugin install --all # install all 11 packs
200
- ai-toolkit plugin update <name> # update a pack (preserves data)
201
- ai-toolkit plugin update --all # update all installed packs
202
- ai-toolkit plugin clean <name> # prune data older than 90 days
197
+ ai-toolkit plugin list # show available packs
198
+ ai-toolkit plugin install --editor claude <name> # install for Claude global target
199
+ ai-toolkit plugin install --editor codex <name> # install for Codex global target
200
+ ai-toolkit plugin install --editor all --all # install all 11 packs for both runtimes
201
+ ai-toolkit plugin update --editor all --all # re-apply all installed packs after toolkit updates
202
+ ai-toolkit plugin clean <name> # prune data older than 90 days
203
203
  ai-toolkit plugin clean <name> --days 30 # custom retention
204
- ai-toolkit plugin remove <name> # remove a pack
205
- ai-toolkit plugin status # show installed packs with data stats
204
+ ai-toolkit plugin remove --editor codex <name> # remove from one runtime only
205
+ ai-toolkit plugin status --editor all # show installed packs with runtime details
206
206
  ```
207
207
 
208
- 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.
208
+ 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.
209
209
 
210
210
  Memory-pack auto-prunes observations older than 90 days on every session end (configurable via `MEMORY_RETENTION_DAYS`).
211
211
 
212
- State tracked in `~/.softspark/ai-toolkit/plugins.json`.
212
+ 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.
213
213
 
214
214
  ## Adding a KB Document
215
215
 
@@ -229,6 +229,51 @@ Follow the `documentation-standards` knowledge skill (`app/skills/documentation-
229
229
  2. `chmod +x` the script
230
230
  3. Reference: `` python3 ${CLAUDE_SKILL_DIR}/scripts/script.py . ``
231
231
 
232
+ ## Cross-Editor Verification (Mandatory)
233
+
234
+ **Every addition — skill, hook, MCP template, agent, rule — MUST be verified against all supported editors before merge.**
235
+
236
+ 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.
237
+
238
+ ### Verification checklist
239
+
240
+ When adding or modifying any toolkit component:
241
+
242
+ 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
243
+ 2. **Validate output format** — ensure the generated file matches what the editor expects (JSON schema, TOML structure, MDC frontmatter, directory naming)
244
+ 3. **Test scope rules** — verify project-local vs global behavior matches the editor's own scope model
245
+ 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
246
+
247
+ ### Editor documentation sources
248
+
249
+ | Editor | Where to verify |
250
+ |--------|----------------|
251
+ | Claude Code | `docs.anthropic.com/claude-code` |
252
+ | Cursor | `docs.cursor.com` |
253
+ | Windsurf | `docs.codeium.com/windsurf` |
254
+ | GitHub Copilot | `docs.github.com/copilot` |
255
+ | Gemini CLI | `github.com/google-gemini/gemini-cli` |
256
+ | Cline | `github.com/cline/cline` |
257
+ | Roo Code | `github.com/RooVetGit/Roo-Code` |
258
+ | Aider | `aider.chat` |
259
+ | Augment | `docs.augmentcode.com` |
260
+ | Codex CLI | `github.com/openai/codex` |
261
+ | Google Antigravity | `developers.google.com/project-idx` |
262
+
263
+ ### When to do this
264
+
265
+ - Adding a new skill → verify it renders correctly for Codex `.agents/skills/` and all directory-based editors
266
+ - Adding a new hook → verify event name is valid in Claude and check `.codex/hooks.json` compatibility
267
+ - Adding a new MCP template → verify it installs correctly for all 8 native adapters (`mcp_editors.py`)
268
+ - Modifying generator output → check that every editor-specific generator still produces valid output
269
+ - Adding a new editor → verify ALL existing features render correctly for the new target
270
+
271
+ ### Anti-pattern
272
+
273
+ 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.
274
+
275
+ ---
276
+
232
277
  ## Quality Checks
233
278
 
234
279
  ```bash
@@ -254,14 +299,17 @@ ai-toolkit benchmark-ecosystem --offline # benchmark snapshot
254
299
  Changes propagate instantly to all machines via symlinks. After any change:
255
300
 
256
301
  ```bash
257
- npm run generate:all # FIRST: regenerate AGENTS.md, llms.txt, all platform configs
302
+ npm run generate:all # FIRST: regenerate AGENTS.md, Codex rules, llms.txt, and platform configs
258
303
  scripts/validate.py # then validate — must pass before commit
259
304
  npm test # then test — must pass before commit
260
305
  ```
261
306
 
262
307
  Run `generate:all` before validate and test so that generated artifacts are current when
263
- the metadata contract tests run. Committing without regenerating first causes artifact
264
- drift and fails CI.
308
+ the metadata contract tests run. Directory-based rule generators now use ownership-aware
309
+ cleanup: repo regeneration manages only standard generated files, while `install/update`
310
+ manages standard, language, and custom overlays together. That keeps regeneration safe
311
+ without leaving stale standard artifacts behind. Committing without regenerating first
312
+ causes artifact drift and fails CI.
265
313
 
266
314
  ## Release Checklist
267
315
 
@@ -5,7 +5,7 @@ service: ai-toolkit
5
5
  tags: [sop, release, version, publish, changelog, semver]
6
6
  version: "1.5.0"
7
7
  created: "2026-04-10"
8
- last_updated: "2026-04-10"
8
+ last_updated: "2026-04-13"
9
9
  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."
10
10
  ---
11
11
 
@@ -38,6 +38,7 @@ python3 scripts/sync_version.py X.Y.Z # if script exists, else manual
38
38
  # 3. Write CHANGELOG.md entry
39
39
  # 4. Regenerate artifacts
40
40
  python3 scripts/generate_agents_md.py > AGENTS.md
41
+ python3 scripts/generate_codex_rules.py .
41
42
  python3 scripts/generate_llms_txt.py > llms.txt
42
43
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
43
44
 
@@ -161,6 +162,7 @@ Add entry at the top of `CHANGELOG.md` (after the header, before previous releas
161
162
 
162
163
  ```bash
163
164
  python3 scripts/generate_agents_md.py > AGENTS.md
165
+ python3 scripts/generate_codex_rules.py .
164
166
  python3 scripts/generate_llms_txt.py > llms.txt
165
167
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
166
168
  ```
@@ -268,7 +270,7 @@ git push origin --delete vX.Y.Z
268
270
  | 5 | `package-lock.json` | `npm install --package-lock-only` | Matches target |
269
271
  | 6 | Count sync | Check `package.json` description, README | `validate.py` passes |
270
272
  | 7 | CHANGELOG.md | Add release entry | Entry exists for vX.Y.Z |
271
- | 8 | Regenerate artifacts | `generate_agents_md.py`, `generate_llms_txt.py` | No unexpected diff |
273
+ | 8 | Regenerate artifacts | `generate_agents_md.py`, `generate_codex_rules.py`, `generate_llms_txt.py` | No unexpected diff |
272
274
  | 9 | Validate | `validate.py --strict` | 0 errors, 0 warnings |
273
275
  | 10 | Security audit | `audit_skills.py --ci` | 0 HIGH |
274
276
  | 11 | Tests | `npm test` | All pass |
@@ -5,7 +5,7 @@ service: ai-toolkit
5
5
  tags: [sop, verification, release, smoke-test, install, update, qa]
6
6
  version: "1.1.0"
7
7
  created: "2026-04-08"
8
- last_updated: "2026-04-08"
8
+ last_updated: "2026-04-13"
9
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
10
  ---
11
11
 
@@ -31,21 +31,22 @@ Verifies all critical paths from the user's perspective.
31
31
 
32
32
  ## Quick Checklist (TL;DR)
33
33
 
34
- 9 commands — if all pass, the release is ready:
34
+ 10 commands — if all pass, the release is ready:
35
35
 
36
36
  ```bash
37
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?
38
+ python3 scripts/generate_agents_md.py > AGENTS.md # 1. Regenerate AGENTS.md
39
+ python3 scripts/generate_codex_rules.py . # 2. Refresh standard Codex rules
40
+ python3 scripts/generate_llms_txt.py > llms.txt # 3. Regenerate llms.txt
41
+ python3 scripts/validate.py --strict # 4. Validation passed?
42
+ npm test # 5. All tests passed?
42
43
 
43
44
  # 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?
45
+ ai-toolkit --version # 6. Version OK?
46
+ ai-toolkit status # 7. Status OK?
47
+ ai-toolkit doctor # 8. Health check passed?
48
+ ai-toolkit install --dry-run # 9. Global install OK?
49
+ python3 scripts/audit_skills.py --ci # 10. Security audit clean?
49
50
  ```
50
51
 
51
52
  ---
@@ -58,6 +59,7 @@ counts but does NOT auto-regenerate — you must do it locally.
58
59
  ```bash
59
60
  # 1. Regenerate generated artifacts
60
61
  python3 scripts/generate_agents_md.py > AGENTS.md
62
+ python3 scripts/generate_codex_rules.py .
61
63
  python3 scripts/generate_llms_txt.py > llms.txt
62
64
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
63
65
 
@@ -71,7 +73,7 @@ python3 scripts/audit_skills.py --ci
71
73
  npm test
72
74
 
73
75
  # 5. Stage and commit
74
- git add AGENTS.md llms.txt llms-full.txt
76
+ git add AGENTS.md .agents/rules/ai-toolkit-*.md llms.txt llms-full.txt
75
77
  git add -p # stage your other changes
76
78
  git commit -m "feat: your change description"
77
79
  ```
@@ -82,7 +84,7 @@ by the developer as part of their PR.
82
84
 
83
85
  **One-liner (copy-paste):**
84
86
  ```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
87
+ 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
86
88
  ```
87
89
 
88
90
  ---
@@ -3,10 +3,10 @@ title: "AI Toolkit - Architecture Overview"
3
3
  category: reference
4
4
  service: ai-toolkit
5
5
  tags: [architecture, overview, design, structure]
6
- version: "1.4.2"
6
+ version: "1.4.4"
7
7
  created: "2026-03-23"
8
- last_updated: "2026-04-09"
9
- description: "Architecture of ai-toolkit: directory layout, global install model, skill tiers, and integration with projects."
8
+ last_updated: "2026-04-13"
9
+ description: "Architecture of ai-toolkit: directory layout, global install model, editor-aware MCP install, Codex translation layer, skill tiers, and integration with projects."
10
10
  ---
11
11
 
12
12
  # AI Toolkit Architecture
@@ -105,11 +105,13 @@ Machine (global) Project (local)
105
105
  **`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.
106
106
 
107
107
  **`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`:
108
- - `--editors all` — install all 8 editors (Cursor, Windsurf, Cline, Roo, Aider, Augment, Copilot, Antigravity)
108
+ - `--editors all` — install all 9 editors (Cursor, Windsurf, Cline, Roo, Aider, Augment, Copilot, Antigravity, Codex)
109
109
  - `--editors cursor,aider` — install only selected editors
110
110
  - (no flag) — auto-detect from existing project files; `update --local` picks up whatever editors already have configs
111
111
 
112
- 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.
112
+ 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`.
113
+
114
+ 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`).
113
115
 
114
116
  ## CLI Commands
115
117
 
@@ -122,6 +124,8 @@ Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.windsurf/rules
122
124
  | `uninstall` | `~/.claude/` | Strips toolkit components (preserves user content) |
123
125
  | `add-rule <file>` | `~/.softspark/ai-toolkit/rules/` | Register rule — auto-applied on every `update` |
124
126
  | `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/CLAUDE.md` | Unregister rule and remove its block |
127
+ | `mcp add <name...>` | `./.mcp.json` | Merge canonical MCP template(s) into project config |
128
+ | `mcp install --editor <name...>` | native editor config | Render MCP template(s) into editor-native config files |
125
129
  | `validate` | toolkit | Integrity check |
126
130
  | `doctor` | toolkit | Install health, hooks, benchmark freshness, and artifact drift diagnostics |
127
131
  | `benchmark-ecosystem` | toolkit | Benchmark snapshot for official Claude Code and external ecosystem repos |
@@ -140,6 +144,9 @@ Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.windsurf/rules
140
144
  | `conventions-md` | `./` | Generates `CONVENTIONS.md` (Aider auto-loaded) |
141
145
  | `augment-dir-rules` | `./` | Generates `.augment/rules/ai-toolkit-*.md` |
142
146
  | `antigravity-rules` | `./` | Generates `.agent/rules/` + `.agent/workflows/` |
147
+ | `codex-md` | `./` | Generates Codex-facing `AGENTS.md` |
148
+ | `codex-rules` | `./` | Generates `.agents/rules/*.md` |
149
+ | `codex-hooks` | `./` | Generates `.codex/hooks.json` |
143
150
  | `agents-md` | toolkit | Regenerates `AGENTS.md` |
144
151
  | `llms-txt` | `./` | Generates `llms.txt` |
145
152
  | `generate-all` | `./` | Generates all platform configs at once |
@@ -191,6 +198,38 @@ Skills that spawn real parallel agents use:
191
198
 
192
199
  `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` must be set for Agent Teams (tmux-based) support.
193
200
 
201
+ ### Codex Translation Layer
202
+
203
+ Codex does not expose Claude's `Agent`, `Team*`, and `Task*` primitives with the
204
+ same runtime semantics. To keep the skill catalog aligned, local Codex install
205
+ uses a translation layer:
206
+
207
+ - native Codex-compatible skills are linked directly
208
+ - Claude-only orchestration skills are emitted as generated wrappers
209
+ - wrapper guidance maps delegation to `spawn_agent`, `send_input`, `wait_agent`, `close_agent`, and `update_plan`
210
+
211
+ Codex therefore receives the full skill catalog, but not the full Claude hook
212
+ surface or tmux-backed Agent Teams lifecycle. Plugin packs reuse the same
213
+ translation and hook-compatibility model when targeting the global Codex layer.
214
+
215
+ See `kb/reference/codex-cli-compatibility.md` for the detailed mapping.
216
+
217
+ ## MCP Rendering Layer
218
+
219
+ `.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`.
220
+
221
+ Current native adapters:
222
+ - Claude Code: `.claude/settings.local.json` and `~/.claude/settings.json`
223
+ - Cursor: `.cursor/mcp.json` and `~/.cursor/mcp.json`
224
+ - GitHub Copilot: `.github/mcp.json` and `~/.copilot/mcp-config.json`
225
+ - Gemini CLI: `.gemini/settings.json` and `~/.gemini/settings.json`
226
+ - Windsurf: `~/.codeium/windsurf/mcp_config.json`
227
+ - Cline: `~/.cline/data/settings/cline_mcp_settings.json`
228
+ - Augment: `~/.augment/settings.json`
229
+ - Codex CLI: `~/.codex/config.toml`
230
+
231
+ See `kb/reference/mcp-editor-compatibility.md` for the support matrix and scope rules.
232
+
194
233
  ## Quality Guardrails
195
234
 
196
235
  ### Anti-Rationalization Tables
@@ -5,8 +5,8 @@ service: ai-toolkit
5
5
  tags: [benchmark, claude-code, ecosystem, hooks, plugins, architecture]
6
6
  version: "1.0.0"
7
7
  created: "2026-03-27"
8
- last_updated: "2026-04-01"
9
- description: "Reference summary of the ecosystem signals and implementation foundations adopted in ai-toolkit."
8
+ last_updated: "2026-04-13"
9
+ description: "Reference summary of the ecosystem signals and implementation foundations adopted in ai-toolkit, including runtime-aware plugin packaging."
10
10
  ---
11
11
 
12
12
  # Claude Ecosystem Expansion Foundations
@@ -19,13 +19,13 @@ This document captures the architectural foundations adopted in `ai-toolkit` aft
19
19
  2. official Claude Code patterns,
20
20
  3. selected external benchmark repositories.
21
21
 
22
- 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.
22
+ 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.
23
23
 
24
24
  ## Implemented Foundations
25
25
 
26
26
  ### 1. Plugin-oriented structure
27
27
 
28
- `ai-toolkit` now treats plugin packaging as a first-class capability.
28
+ `ai-toolkit` now treats plugin packaging as a first-class capability, with runtime-aware install surfaces for Claude and optional global Codex layering.
29
29
 
30
30
  Implemented artifacts:
31
31
  - `app/.claude-plugin/plugin.json`