@softspark/ai-toolkit 4.5.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -597,6 +597,56 @@ Derived from the immutable safety constitution (6 articles):
597
597
  - **Cite Sources**: Always reference `[PATH: ...]` when making decisions based on existing knowledge
598
598
  - **Read-Only Exploration**: Discovery agents never write; writing agents never explore blindly
599
599
  - **No Secrets in Code**: Never commit credentials, API keys, or sensitive configuration values
600
+
601
+ ## Coding Rules
602
+
603
+ ### Code Style
604
+
605
+ * Follow language-specific conventions: PEP 8 (Python), StandardJS/Prettier (TypeScript), gofmt (Go), rustfmt (Rust)
606
+ * Use descriptive names: functions as verbs (`calculateTotal`), booleans as questions (`isValid`), constants as UPPER_SNAKE
607
+ * Keep functions short — single responsibility, max ~30 lines
608
+ * Prefer immutability: use `const`/`final`/`let` over mutable variables where possible
609
+ * No magic numbers — extract to named constants
610
+ * Avoid deep nesting (max 3 levels) — use early returns and guard clauses
611
+ * DRY: extract shared logic only when used 3+ times; premature abstraction is worse than duplication
612
+ * YAGNI: do not build features or abstractions for hypothetical future requirements
613
+
614
+ ### Testing
615
+
616
+ * Every new feature or bug fix must include tests
617
+ * Use Arrange-Act-Assert pattern for unit tests
618
+ * Test behavior, not implementation — tests should survive refactoring
619
+ * Use descriptive test names: `test_<what>_<when>_<expected>`
620
+ * Prefer real dependencies over mocks at integration boundaries
621
+ * Target >70% code coverage for new code
622
+ * Never skip or disable tests without a linked issue explaining why
623
+ * Run the full test suite before marking work as done
624
+
625
+ ### Security
626
+
627
+ * Never commit secrets, API keys, credentials, or tokens — use environment variables
628
+ * Validate and sanitize all external input (user input, API responses, file uploads)
629
+ * Use parameterized queries — never concatenate SQL strings
630
+ * Escape output to prevent XSS in web contexts
631
+ * Apply principle of least privilege for file permissions and API scopes
632
+ * Keep dependencies updated — audit regularly for known CVEs
633
+ * Use HTTPS for all external communication
634
+ * Log security events without logging sensitive data (passwords, tokens, PII)
635
+
636
+ ### Output Mode
637
+
638
+ `output-mode: concise`
639
+
640
+ Default response mode is **concise**. The `brand-voice` skill (when present) auto-loads concise rules; assistants without that skill should still apply the directives below.
641
+
642
+ * No preamble — skip "I'll now...", "Sure, let me...", "Great question!" Start with the answer.
643
+ * Lead with the result — conclusion or output first; explanation only if asked or non-obvious.
644
+ * Max 3 sentences per closed question — yes/no, single-fact, or "where is X" answers stay under three sentences.
645
+ * Tables and lists over prose — when comparing options, listing steps, or showing values.
646
+ * No trailing summaries — if the diff or output already shows what changed, do not restate it.
647
+ * Drop filler adjectives — no "nice", "great", "powerful", "robust" unless the user asked for evaluation.
648
+ * Cite as `path:line` — instead of paragraphs describing where things live.
649
+ * Escalate to verbose only for: architecture / RFC / ADR / trade-off documents, or when the user asks for detail.
600
650
  <!-- TOOLKIT:ai-toolkit END -->
601
651
 
602
652
  <!-- TOOLKIT:jira-mcp START -->
package/CHANGELOG.md CHANGED
@@ -7,6 +7,43 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v4.6.0 - Editor ecosystem sync + Codex rules in AGENTS.md (2026-06-05)
11
+
12
+ Minor release. Syncs the editor registry with current upstream reality (Windsurf→Devin rebrand, Roo Code archive, Gemini CLI sunset, moved docs hosts) and fixes several generators that wrote to paths their editors never read. Headline: Codex now actually receives the universal coding rules.
13
+
14
+ ### Added
15
+ - **Codex CLI: all 10 native hook events** — wired the 5 previously-missing events (`PostToolUse`, `PreCompact`, `PostCompact`, `SubagentStart`, `SubagentStop`) to the shared toolkit hook scripts, mirroring `app/hooks.json`. Was 5 of 10.
16
+
17
+ ### Changed
18
+ - **Codex CLI: coding rules now in `AGENTS.md`** — the universal code-style/testing/security/output-mode rule bodies are inlined into `AGENTS.md`, the only instruction path Codex reads. They were previously emitted to `.agents/rules/`, which Codex never reads (confirmed against `developers.openai.com/codex`). Language rules continue via `.agents/skills/`.
19
+ - **Google Antigravity: plural `.agents/`** — generators now emit `.agents/rules/` and `.agents/workflows/` (the Antigravity 2.0 default); singular `.agent/` is still read by Antigravity as a fallback.
20
+ - **Conditional skill pointers** — Cursor/Cline/Augment skip the `ai-toolkit-skill-catalogue` pointer when real skills are discoverable at `.claude/skills/` (project or `~/.claude/skills/`), emitting it only as the editor-only fallback. Windsurf keeps its pointer unconditionally (its `.claude/skills` scan is gated behind a Devin "Claude Code config reading" setting).
21
+ - **Cursor subagents** — emit `model: inherit`; dropped the undocumented `tools`/`color` fields to match the current Cursor schema.
22
+ - **Augment subagents** — omit the `model` field (Augment uses the CLI default model; `inherit` is not a documented value).
23
+ - **Ecosystem registry sync** — Windsurf → Devin Desktop (docs/changelog redirects); Roo Code repo archived + docs moved to `roocodeinc.github.io`; Claude Code docs host `code.claude.com`; Codex docs `developers.openai.com/codex`; Gemini CLI free/paid tier sunset 2026-06-18 (enterprise continues); Cline config-path corrections; stale Gemini `Stop` marker dropped.
24
+
25
+ ### Fixed
26
+ - **opencode commands were empty** — the prompt now lives in the markdown body. Commands previously put it in a `template:` frontmatter block (JSON-config-only) with an empty body, so every generated opencode command was effectively blank.
27
+ - **Cline global rules** — now written to `~/Documents/Cline/Rules/` (the documented Cline global path) instead of the never-read `~/.cline/rules/`.
28
+ - **Augment commands** — dropped the undocumented `agent:` frontmatter field; fixed a false `generate_augment_hooks.py` docstring claim about per-workspace settings.
29
+
30
+ ### Removed
31
+ - **`scripts/generate_codex_rules.py`** and the `ai-toolkit codex-rules` / `npm run generate:codex-rules` subcommands — Codex never read the `.agents/rules/` output. Coding rules now ship via `AGENTS.md` (universal) and `.agents/skills/` (language). Installs need no migration; if you scripted `ai-toolkit codex-rules`, the rules are now produced by `ai-toolkit codex-md`. Test count: 1181 → 1179 (dead-path tests removed).
32
+
33
+ ### Ecosystem
34
+ - Class B (integrate): Codex 10 hook events. Class E (now-default): Antigravity plural `.agents/`, conditional skill pointers. Class D (deprecation): Windsurf→Devin, Roo Code archive, Gemini CLI tier sunset. Plus registry URL/version/config-path corrections across 9 tools.
35
+
36
+ ---
37
+
38
+ ## v4.5.1 - ShellCheck fix for loop-guard hook (2026-06-02)
39
+
40
+ Patch release. Clears two ShellCheck `SC2034` warnings in `loop-guard.sh` that turned the `main` CI ShellCheck job red after v4.5.0. The publish workflow does not run ShellCheck, so v4.5.0 published despite the red CI; this patch makes `main` green again. No runtime behavior change.
41
+
42
+ ### Fixed
43
+ - **`loop-guard.sh` ShellCheck** — `INPUT` now carries the `# shellcheck disable=SC2034` directive (it is consumed via the sourced `_hook-io.sh`, matching `guard-destructive.sh`), and `AI_TOOLKIT_HOOK_FORMAT` is `export`ed. `shellcheck --severity=warning app/hooks/*.sh` is clean.
44
+
45
+ ---
46
+
10
47
  ## v4.5.0 - Unicode-safety scanner, loop guard, honest instincts (2026-06-02)
11
48
 
12
49
  Minor release. Hardens the security audit against invisible prompt injection, adds a repeated-action loop guard, fixes destructive-guard false positives, and turns the instinct system from a dormant promise into a working manual feature.
package/README.md CHANGED
@@ -8,15 +8,15 @@
8
8
  [![Agents](https://img.shields.io/badge/agents-44-blue)](app/agents/)
9
9
  [![Tests](https://img.shields.io/badge/tests-1179%20passing-success)](tests/)
10
10
 
11
- ## What's New in v4.5.0
11
+ ## What's New in v4.6.0
12
12
 
13
- Minor release. Hardens the security audit against invisible prompt injection, adds a repeated-action loop guard, fixes destructive-guard false positives, and makes the instinct system actually work.
13
+ v4.6.0 syncs the editor ecosystem with current upstream reality and fixes several generators that were writing to paths their editors never read.
14
14
 
15
- - **Unicode-safety scanner**: the skill/agent audit now flags invisible and smuggled Unicode (tag-block ASCII smuggling, Trojan Source bidi controls) across all shipped prompt text a prompt-injection vector regex checks never caught. Runs in the `--ci` gate.
16
- - **Loop guard**: a new advisory `PostToolUse` hook warns when the same action repeats, catching stuck loops that the `/repeat` failure-counter circuit breaker misses.
17
- - **`git push --force-with-lease` unblocked**: the destructive-command guard no longer false-positives on safe force-pushes or on commit messages that merely mention `DROP TABLE`/`rm -rf`.
18
- - **Instincts load by default**: hand-authored `.claude/instincts/*.md` now load at session start (previously dormant behind a verbose flag). The skill docs were corrected to drop a never-implemented auto-extractor claim.
19
- - **Editor honesty + secret scrubbing**: the platform matrix marks which editors get hook enforcement, and memory-pack now redacts secrets before storing session observations.
15
+ - **Codex finally gets its coding rules**: the universal code-style/testing/security rules are now inlined into `AGENTS.md` (the only file Codex reads) instead of the never-read `.agents/rules/`. Codex also now wires all 10 native lifecycle hook events.
16
+ - **opencode commands fixed**: the prompt now lives in the markdown body it previously went into a `template:` frontmatter block that opencode ignores, producing empty commands.
17
+ - **Cline global rules land where Cline reads them**: `~/Documents/Cline/Rules/` instead of the never-read `~/.cline/rules/`.
18
+ - **Smarter skill pointers**: Cursor/Cline/Augment skip the catalogue pointer when real skills are already discoverable at `.claude/skills/`, emitting it only as the editor-only fallback.
19
+ - **Registry sync**: Windsurf Devin Desktop, Roo Code archived, Antigravity `.agents/` plural default, Gemini CLI free/paid sunset (2026-06-18), corrected docs URLs across the board.
20
20
 
21
21
  See [CHANGELOG.md](CHANGELOG.md) for full history.
22
22
 
@@ -106,12 +106,12 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
106
106
  | Windsurf | `~/.codeium/.../global_rules.md` + `~/.codeium/windsurf/skills/*` + `.windsurf/rules/*.md` | ✅ | global + project |
107
107
  | Gemini CLI | `~/.gemini/GEMINI.md` | ✅ | global |
108
108
  | GitHub Copilot | `.github/copilot-instructions.md` | — | project |
109
- | Cline | `~/.cline/rules/*.md` + `~/.cline/skills/*` + `.clinerules/*.md` | — | global + project |
109
+ | Cline | `~/Documents/Cline/Rules/*.md` + `~/.cline/skills/*` + `.clinerules/*.md` | — | global + project |
110
110
  | Roo Code | `~/.roo/rules/*.md` + `.roomodes` + `.roo/rules/*.md` | — | global rules + project |
111
111
  | Aider | `~/.aider.conf.yml` + `.aider.conf.yml` + `CONVENTIONS.md` | — | global + project |
112
112
  | Augment | `~/.augment/rules/*.md` + `.augment/rules/ai-toolkit-*.md` | ✅ | global + project |
113
- | Google Antigravity | `.agent/rules/*.md` + `.agent/workflows/*.md` | — | project |
114
- | Codex CLI | `AGENTS.md` + `.agents/rules/*.md` + `.agents/skills/*` + `.codex/hooks.json` | ✅ | project + global plugin |
113
+ | Google Antigravity | `.agents/rules/*.md` + `.agents/workflows/*.md` | — | project |
114
+ | Codex CLI | `AGENTS.md` (coding rules inlined) + `.agents/skills/*` + `.codex/hooks.json` | ✅ | project + global plugin |
115
115
  | opencode | `AGENTS.md` + `.opencode/{agents,commands,plugins}/*` + `opencode.json` | ✅ | project + global (`~/.config/opencode/`) |
116
116
 
117
117
  > Claude Code is always installed (primary platform). Other editors on demand with `--editors`. Every platform receives the agent/skill catalog, guidelines, and registered custom rules as text. The **Hooks** column marks platforms that also get lifecycle hook enforcement — the machine-enforced constitution (guard-destructive, quality gates, search-first discipline). Platforms marked — receive those rules as guidance only, without blocking hooks.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-toolkit",
3
3
  "description": "Professional-grade Claude Code toolkit with persona presets, skill security auditor, expanded lifecycle hooks, experimental opt-in plugin packs, benchmark harvesting, and multi-tool support.",
4
- "version": "4.5.0",
4
+ "version": "4.6.0",
5
5
  "author": {
6
6
  "name": "SoftSpark",
7
7
  "url": "https://github.com/softspark"
@@ -14,6 +14,7 @@ source "$(dirname "$0")/_profile-check.sh"
14
14
  # shellcheck source=_hook-io.sh
15
15
  source "$(dirname "$0")/_hook-io.sh"
16
16
 
17
+ # shellcheck disable=SC2034 # INPUT is consumed via sourced _hook-io.sh
17
18
  INPUT=$(cat)
18
19
  TOOL_NAME=$(hook_tool_name)
19
20
  [ -z "$TOOL_NAME" ] && exit 0
@@ -52,7 +53,7 @@ fi
52
53
  COUNT=$(grep -cxF "$HASH" "$LOG" 2>/dev/null | tr -d ' ')
53
54
  [ -z "$COUNT" ] && COUNT=0
54
55
  if [ "$COUNT" -ge "$THRESHOLD" ]; then
55
- AI_TOOLKIT_HOOK_FORMAT=json
56
+ export AI_TOOLKIT_HOOK_FORMAT=json
56
57
  hook_emit_context "PostToolUse" \
57
58
  "Loop guard: the same ${TOOL_NAME} action has repeated ${COUNT}x within the last ${WINDOW} steps. If you are not making progress, stop and reassess — try a different approach or ask the user — instead of retrying the identical action."
58
59
  fi
@@ -1,5 +1,5 @@
1
1
  {
2
- "last_run": "2026-05-30T19:51:17Z",
2
+ "last_run": "2026-06-05T09:16:41Z",
3
3
  "schema_version": 1,
4
4
  "tools": {
5
5
  "aider": {
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "augment": {
27
- "docs_hash": "46ef1d20d537234f",
27
+ "docs_hash": "544c8cce7baacb2e",
28
28
  "headings": [
29
29
  "Admin",
30
30
  "Auggie CLI",
@@ -65,7 +65,7 @@
65
65
  }
66
66
  },
67
67
  "claude-code": {
68
- "docs_hash": "b2ee6850b58cee40",
68
+ "docs_hash": "f84eb6cd31b39797",
69
69
  "headings": [
70
70
  "Core concepts",
71
71
  "Documentation Index",
@@ -120,10 +120,10 @@
120
120
  "slash command": true,
121
121
  "sub-agent": true
122
122
  },
123
- "version": "2.1.158 (Claude Code)"
123
+ "version": "2.1.165 (Claude Code)"
124
124
  },
125
125
  "cline": {
126
- "docs_hash": "9ec25e5132332d2f",
126
+ "docs_hash": "d94f88d02b733ee6",
127
127
  "headings": [
128
128
  "API Reference",
129
129
  "Best Practices",
@@ -164,37 +164,51 @@
164
164
  }
165
165
  },
166
166
  "codex-cli": {
167
- "docs_hash": "f7a6a5144e0f61a2",
167
+ "docs_hash": "b86ae1b6bda0e071",
168
168
  "headings": [
169
- "About",
170
- "Contributing",
171
- "Contributors",
172
- "Docs",
173
- "Folders and files",
174
- "Footer",
175
- "Footer navigation",
176
- "Forks",
177
- "History",
178
- "Installing and running Codex CLI",
179
- "Languages",
180
- "Latest commit",
181
- "License",
182
- "Navigation Menu",
183
- "Packages 0",
184
- "Provide feedback",
169
+ "API",
170
+ "API Reference",
171
+ "Administration",
172
+ "Advertiser API",
173
+ "Agents SDK",
174
+ "Automation",
175
+ "Build",
176
+ "Categories",
177
+ "Codex",
178
+ "Codex for Open Source",
179
+ "Community",
180
+ "Configuration",
181
+ "Contribute",
182
+ "Conversion apps",
183
+ "Core Concepts",
184
+ "Core concepts",
185
+ "Deploy",
186
+ "Docs agent",
187
+ "Evaluation",
188
+ "Events",
189
+ "Explore use cases",
190
+ "File Upload",
191
+ "Get started",
192
+ "Getting Started",
193
+ "Going live",
194
+ "Guides",
195
+ "Learn",
196
+ "Legacy APIs",
197
+ "Measurement",
198
+ "Plan",
199
+ "Programs",
185
200
  "Quickstart",
186
- "Releases 804",
187
- "Repository files navigation",
201
+ "Realtime and audio",
202
+ "Recent",
203
+ "Releases",
188
204
  "Resources",
189
- "Saved searches",
190
- "Search code, repositories, users, issues, pull requests...",
191
- "Security policy",
192
- "Stars",
193
- "Uh oh!",
194
- "Use saved searches to filter your results more quickly",
195
- "Using Codex with your ChatGPT plan",
196
- "Watchers",
197
- "openai/codex"
205
+ "Run and scale",
206
+ "Search the Codex docs",
207
+ "Specialized models",
208
+ "Suggested",
209
+ "Tools",
210
+ "Topics",
211
+ "Using Codex"
198
212
  ],
199
213
  "markers": {
200
214
  ".agents/skills": false,
@@ -213,14 +227,14 @@
213
227
  "hook handler: agent": false,
214
228
  "hook handler: command": false,
215
229
  "hook handler: prompt": false,
216
- "hooks": false,
230
+ "hooks": true,
217
231
  "mcp_servers": false,
218
232
  "sandbox": true
219
233
  },
220
- "version": "codex-cli 0.134.0"
234
+ "version": "codex-cli 0.136.0"
221
235
  },
222
236
  "cursor": {
223
- "docs_hash": "6aa8a8d7cc046f13",
237
+ "docs_hash": "aee861b1ed20480d",
224
238
  "headings": [],
225
239
  "markers": {
226
240
  ".cursor/rules": false,
@@ -236,7 +250,7 @@
236
250
  }
237
251
  },
238
252
  "gemini-cli": {
239
- "docs_hash": "5569709cc2e463a8",
253
+ "docs_hash": "0bbd00c009a9357b",
240
254
  "headings": [
241
255
  "Breadcrumbs",
242
256
  "Directory actions",
@@ -265,7 +279,6 @@
265
279
  "SKILL.md": false,
266
280
  "SessionEnd": false,
267
281
  "SessionStart": false,
268
- "Stop": true,
269
282
  "activate_skill": false,
270
283
  "custom commands": false,
271
284
  "gemini-extension.json": false,
@@ -275,16 +288,17 @@
275
288
  }
276
289
  },
277
290
  "github-copilot": {
278
- "docs_hash": "56ac2d5768f930b5",
291
+ "docs_hash": "2314ef6e31c223a1",
279
292
  "headings": [
280
293
  "About Copilot auto model selection",
294
+ "About Copilot automations",
281
295
  "About Copilot integrations",
296
+ "About agent apps",
282
297
  "About agent management",
283
298
  "About agent skills",
284
299
  "About billing for GitHub Copilot in organizations and enterprises",
300
+ "About cloud and local sandboxes for GitHub Copilot",
285
301
  "About custom agents",
286
- "About customizing GitHub Copilot responses",
287
- "About enterprise accounts for Copilot Business",
288
302
  "Articles",
289
303
  "Did you find what you needed?",
290
304
  "GitHub Copilot",
@@ -307,7 +321,7 @@
307
321
  }
308
322
  },
309
323
  "google-antigravity": {
310
- "docs_hash": "f933b31ac7414c29",
324
+ "docs_hash": "5ea5426c4445e746",
311
325
  "headings": [],
312
326
  "markers": {
313
327
  "AGENTS.md": false,
@@ -323,7 +337,7 @@
323
337
  }
324
338
  },
325
339
  "opencode": {
326
- "docs_hash": "fe7f7590e4553574",
340
+ "docs_hash": "0e54c8a8f59b6474",
327
341
  "headings": [
328
342
  "Add features",
329
343
  "Ask questions",
@@ -383,45 +397,44 @@
383
397
  }
384
398
  },
385
399
  "windsurf": {
386
- "docs_hash": "a30041baf564742f",
400
+ "docs_hash": "3405457d501ab760",
387
401
  "headings": [
388
- "Accounts",
389
402
  "Advanced",
390
403
  "Agent Command Center",
391
404
  "App Deploys",
392
- "Cascade",
393
405
  "Context Awareness",
406
+ "Devin Desktop",
407
+ "Devin Local",
394
408
  "Documentation Index",
395
- "Editor",
396
409
  "MCP",
397
410
  "Memories",
398
411
  "On this page",
399
412
  "Recommended Plugins",
400
- "Security",
413
+ "Releases",
401
414
  "Terminal",
402
- "Troubleshooting",
403
415
  "Usage",
404
- "Welcome to Windsurf",
416
+ "Welcome to Devin Desktop",
417
+ "Windsurf Plugins",
405
418
  "Workflows",
406
419
  "\u200b1. Select setup flow",
407
420
  "\u200b2. Choose editor theme",
408
421
  "\u200b3. Sign up / Log in",
409
422
  "\u200b4. Let\u2019s Surf!",
410
423
  "\u200bCustom App Icons (beta)",
424
+ "\u200bDevin Desktop Next",
411
425
  "\u200bForgot to Import VS Code Configurations?",
412
426
  "\u200bIncompatible Extensions",
413
427
  "\u200bOnboarding",
414
428
  "\u200bSet Up",
415
429
  "\u200bThings to Try",
416
- "\u200bUninstall Windsurf",
417
- "\u200bUpdate Windsurf",
418
- "\u200bWindsurf Next"
430
+ "\u200bUninstall Devin Desktop",
431
+ "\u200bUpdate Devin Desktop"
419
432
  ],
420
433
  "markers": {
421
434
  "AGENTS.md": true,
422
435
  "Cascade": true,
423
436
  "MCP": true,
424
- "SKILL.md": false,
437
+ "SKILL.md": true,
425
438
  "always_on": false,
426
439
  "glob": true,
427
440
  "hooks": true,
package/bin/ai-toolkit.js CHANGED
@@ -98,9 +98,8 @@ const COMMANDS = {
98
98
  'conventions-md': 'Generate CONVENTIONS.md for Aider (auto-loaded)',
99
99
  'augment-rules': 'Generate .augment/rules/ai-toolkit.md for Augment (legacy)',
100
100
  'augment-dir-rules': 'Generate .augment/rules/ai-toolkit-*.md for Augment (recommended)',
101
- 'antigravity-rules': 'Generate .agent/rules/ and .agent/workflows/ for Google Antigravity',
102
- 'codex-md': 'Generate AGENTS.md for OpenAI Codex CLI',
103
- 'codex-rules': 'Generate .agents/rules/ for OpenAI Codex CLI',
101
+ 'antigravity-rules': 'Generate .agents/rules/ and .agents/workflows/ for Google Antigravity',
102
+ 'codex-md': 'Generate AGENTS.md (coding rules inlined) for OpenAI Codex CLI',
104
103
  'codex-hooks': 'Generate .codex/hooks.json for OpenAI Codex CLI',
105
104
  'opencode-md': 'Generate AGENTS.md for opencode',
106
105
  'opencode-agents': 'Generate .opencode/agents/ for opencode (subagents)',
@@ -504,7 +503,6 @@ function handleGenerateAll(_args) {
504
503
  run(scriptPath('generate_cline_rules.py'), [CWD]);
505
504
  run(scriptPath('generate_roo_rules.py'), [CWD]);
506
505
  run(scriptPath('generate_augment_rules.py'), [CWD]);
507
- run(scriptPath('generate_codex_rules.py'), [CWD]);
508
506
  run(scriptPath('generate_codex_hooks.py'), [CWD]);
509
507
  run(scriptPath('generate_opencode_agents.py'), [CWD]);
510
508
  run(scriptPath('generate_opencode_commands.py'), [CWD]);
@@ -617,7 +615,6 @@ const SPECIAL_HANDLERS = {
617
615
  'roo-dir-rules': (_args) => run(scriptPath('generate_roo_rules.py'), [CWD]),
618
616
  'conventions-md': (_args) => { const out = runGenerator('generate_conventions.py'); fs.writeFileSync(path.join(CWD, 'CONVENTIONS.md'), out); console.log('Generated: CONVENTIONS.md'); },
619
617
  'augment-dir-rules': (_args) => run(scriptPath('generate_augment_rules.py'), [CWD]),
620
- 'codex-rules': (_args) => run(scriptPath('generate_codex_rules.py'), [CWD]),
621
618
  'codex-hooks': (_args) => run(scriptPath('generate_codex_hooks.py'), [CWD]),
622
619
  'opencode-agents': (_args) => run(scriptPath('generate_opencode_agents.py'), [CWD]),
623
620
  'opencode-commands': (_args) => run(scriptPath('generate_opencode_commands.py'), [CWD]),
@@ -2,11 +2,11 @@
2
2
  title: "SOP: Release Preparation"
3
3
  category: procedures
4
4
  service: ai-toolkit
5
- tags: [sop, release, version, publish, changelog, semver, provenance, sarif, ecosystem]
6
- version: "1.10.1"
5
+ tags: [sop, release, version, publish, changelog, semver, provenance, sarif, ecosystem, shellcheck]
6
+ version: "1.11.0"
7
7
  created: "2026-04-10"
8
- last_updated: "2026-04-28"
9
- description: "Step-by-step checklist for preparing a new ai-toolkit release — ecosystem-sync drift check, version sync, changelog, artifact regeneration, validation, and tagging. Run BEFORE every git tag. Includes mandatory Provenance, SARIF, and checksum-pin checks added in v2.8.0, the single-run npm test discipline added in v1.8.0, the ecosystem-sync gate added in v1.9.0, and the registry-vs-generators drift gate added in v1.10.0."
8
+ last_updated: "2026-06-02"
9
+ description: "Step-by-step checklist for preparing a new ai-toolkit release — ecosystem-sync drift check, version sync, changelog, artifact regeneration, validation, and tagging. Run BEFORE every git tag. Includes mandatory Provenance, SARIF, and checksum-pin checks added in v2.8.0, the single-run npm test discipline added in v1.8.0, the ecosystem-sync gate added in v1.9.0, the registry-vs-generators drift gate added in v1.10.0, and the mandatory pre-tag ShellCheck gate added in v1.11.0 (publish.yml does not run ShellCheck, so a hook lint failure can publish while reddening main CI — see the v4.5.1 postmortem in Phase 5)."
10
10
  ---
11
11
 
12
12
  # SOP: Release Preparation
@@ -51,12 +51,11 @@ python3 scripts/sync_version.py X.Y.Z # if script exists, else manual
51
51
  # 3. Write CHANGELOG.md entry
52
52
  # 4. Regenerate artifacts
53
53
  python3 scripts/generate_agents_md.py > AGENTS.md
54
- python3 scripts/generate_codex_rules.py .
55
54
  python3 scripts/generate_llms_txt.py > llms.txt
56
55
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
57
56
 
58
- # 5. Validate + audit + SARIF + test + ecosystem check
59
- python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci && python3 scripts/audit_skills.py --sarif > /tmp/audit.sarif && npm test
57
+ # 5. Validate + audit + SARIF + shellcheck + test + ecosystem check
58
+ python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci && python3 scripts/audit_skills.py --sarif > /tmp/audit.sarif && shellcheck --severity=warning app/hooks/*.sh && npm test
60
59
 
61
60
  # 5a. Supply-chain standard (v2.8.0+) — non-negotiable
62
61
  grep -q -- '--provenance' .github/workflows/publish.yml || { echo "MISSING --provenance"; exit 1; }
@@ -253,7 +252,6 @@ Add entry at the top of `CHANGELOG.md` (after the header, before previous releas
253
252
 
254
253
  ```bash
255
254
  python3 scripts/generate_agents_md.py > AGENTS.md
256
- python3 scripts/generate_codex_rules.py .
257
255
  python3 scripts/generate_llms_txt.py > llms.txt
258
256
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
259
257
  ```
@@ -278,6 +276,12 @@ python3 scripts/audit_skills.py --ci
278
276
  python3 scripts/audit_skills.py --sarif > audit.sarif # MANDATORY — GHAS ingest
279
277
  python3 scripts/audit_skills.py --permissions # review Bash/Write/Edit footprint
280
278
 
279
+ # ShellCheck on hooks (added in 1.11.0). Mirrors the ci.yml "ShellCheck hooks"
280
+ # job. NOT run by validate.py, npm test, OR publish.yml — so a hook with a
281
+ # ShellCheck warning passes every other gate AND still publishes on tag while
282
+ # turning main CI red. Run it here, before tagging.
283
+ shellcheck --severity=warning app/hooks/*.sh && echo "OK: shellcheck clean"
284
+
281
285
  # Registry / generator drift (added in 1.10.0). Meta-generators excluded.
282
286
  META="generate_agents_md.py|generate_llms_txt.py|generate_language_rules_skills.py"
283
287
  diff \
@@ -299,12 +303,15 @@ echo "ok: $(grep -c '^ok ' /tmp/npm-test.log) | not ok: $(grep -c '^not ok' /tmp
299
303
  - `audit_skills.py --ci`: `HIGH: 0 | WARN: 0` (INFO is acceptable)
300
304
  - `audit_skills.py --sarif`: valid JSON, non-empty `runs[0].tool.driver.rules`
301
305
  - `audit_skills.py --permissions`: review `Skills with Bash + Write + Edit` list — any newly-added skill with broad access MUST be justified in the CHANGELOG entry
306
+ - `shellcheck --severity=warning app/hooks/*.sh`: no output, exit 0. A common false positive is `SC2034` on `INPUT` or env vars (e.g. `AI_TOOLKIT_HOOK_FORMAT`) that a *sourced* helper (`_hook-io.sh`) consumes — ShellCheck cannot see cross-file use. Fix with a `# shellcheck disable=SC2034` directive or `export`, matching `guard-destructive.sh`. Never tag with a red ShellCheck.
302
307
  - Registry drift: `OK: registry matches filesystem`. If `DRIFT:` appears, add the missing `scripts/generate_*.py` rows to `kb/reference/supported-tools-registry.md` before tagging.
303
308
  - `npm test`: `1..N` with zero `not ok` (read from the cached `/tmp/npm-test.log`, do not rerun)
304
309
 
310
+ > **Why this matters (v4.5.1 postmortem):** `publish.yml` runs only `validate.py` + `npm test`, so it published v4.5.0 even though the `main` CI `ShellCheck hooks` job was red on two `SC2034` warnings in a new hook. The publish workflow does **not** depend on the CI workflow. Until that is fixed, ShellCheck is a manual pre-tag gate — run it here every time.
311
+
305
312
  **One-liner:**
306
313
  ```bash
307
- python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci && python3 scripts/audit_skills.py --sarif > audit.sarif && diff <(grep -oE 'scripts/generate_[a-z_]+\.py' kb/reference/supported-tools-registry.md | sort -u) <(ls scripts/generate_*.py | grep -vE 'generate_agents_md\.py|generate_llms_txt\.py|generate_language_rules_skills\.py' | sort -u) && npm test
314
+ python3 scripts/validate.py --strict && python3 scripts/audit_skills.py --ci && python3 scripts/audit_skills.py --sarif > audit.sarif && shellcheck --severity=warning app/hooks/*.sh && diff <(grep -oE 'scripts/generate_[a-z_]+\.py' kb/reference/supported-tools-registry.md | sort -u) <(ls scripts/generate_*.py | grep -vE 'generate_agents_md\.py|generate_llms_txt\.py|generate_language_rules_skills\.py' | sort -u) && npm test
308
315
  ```
309
316
 
310
317
  **If tests fail:** Fix the issue, do NOT skip. Common failures:
@@ -427,14 +434,15 @@ git push origin --delete vX.Y.Z
427
434
  | 5 | `package-lock.json` | `npm install --package-lock-only` | Matches target |
428
435
  | 6 | Count sync | Check `package.json` description, README | `validate.py` passes |
429
436
  | 7 | CHANGELOG.md | Add release entry (incl. `Ecosystem` subsection if any B/D/E/F drift) | Entry exists for vX.Y.Z |
430
- | 8 | Regenerate artifacts | `generate_agents_md.py`, `generate_codex_rules.py`, `generate_llms_txt.py` | No unexpected diff |
437
+ | 8 | Regenerate artifacts | `generate_agents_md.py`, `generate_llms_txt.py` | No unexpected diff |
431
438
  | 9 | Validate | `validate.py --strict` | 0 errors, 0 warnings |
432
439
  | 10 | Security audit (CI mode) | `audit_skills.py --ci` | 0 HIGH |
433
440
  | 11 | Security audit (SARIF) | `audit_skills.py --sarif` | Valid SARIF 2.1.0 JSON |
434
441
  | 12 | Per-skill permissions | `audit_skills.py --permissions` | New broad-access skills justified in CHANGELOG |
435
- | 13 | Provenance flag check | `grep -- '--provenance' .github/workflows/publish.yml` | Present |
436
- | 14 | Checksum-pin backfill | `sources.json` entries all have `sha256` | No unpinned URL sources |
437
- | 15 | Tests | `npm test` | All pass |
438
- | 16 | Commit | `git commit` | Clean working tree |
439
- | 17 | Tag | `git tag vX.Y.Z` | Tag exists |
440
- | 18 | Push | `git push origin main --tags` | CI triggered with `id-token: write` |
442
+ | 13 | ShellCheck hooks | `shellcheck --severity=warning app/hooks/*.sh` | Exit 0, no output (mirrors ci.yml; publish.yml does NOT run it) |
443
+ | 14 | Provenance flag check | `grep -- '--provenance' .github/workflows/publish.yml` | Present |
444
+ | 15 | Checksum-pin backfill | `sources.json` entries all have `sha256` | No unpinned URL sources |
445
+ | 16 | Tests | `npm test` | All pass |
446
+ | 17 | Commit | `git commit` | Clean working tree |
447
+ | 18 | Tag | `git tag vX.Y.Z` | Tag exists |
448
+ | 19 | Push | `git push origin main --tags` | CI triggered with `id-token: write` |
@@ -36,9 +36,8 @@ Verifies all critical paths from the user's perspective.
36
36
  ```bash
37
37
  # Pre-commit (Phase 0)
38
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?
39
+ python3 scripts/generate_llms_txt.py > llms.txt # 2. Regenerate llms.txt
40
+ python3 scripts/validate.py --strict # 3. Validation passed?
42
41
  npm test > /tmp/npm-test.log 2>&1 && grep -c '^ok ' /tmp/npm-test.log && ! grep -q '^not ok' /tmp/npm-test.log # 5. All tests passed? (single run, cached)
43
42
 
44
43
  # Post-install verification (Phases 1-7)
@@ -68,7 +67,6 @@ counts but does NOT auto-regenerate — you must do it locally.
68
67
  ```bash
69
68
  # 1. Regenerate generated artifacts
70
69
  python3 scripts/generate_agents_md.py > AGENTS.md
71
- python3 scripts/generate_codex_rules.py .
72
70
  python3 scripts/generate_llms_txt.py > llms.txt
73
71
  python3 scripts/generate_llms_txt.py --full > llms-full.txt
74
72
 
@@ -93,7 +91,7 @@ by the developer as part of their PR.
93
91
 
94
92
  **One-liner (copy-paste):**
95
93
  ```bash
96
- 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
94
+ 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
97
95
  ```
98
96
 
99
97
  ---
@@ -109,7 +109,7 @@ Machine (global) Project (local)
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`). Full-profile installs also emit native skill pointer catalogues for Cursor, Windsurf, and Cline. 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`.
112
+ Each editor gets directory-based format (`.cursor/rules/*.mdc`, `.windsurf/rules/*.md`, `.clinerules/*.md`, `.roo/rules/*.md`, `.augment/rules/ai-toolkit-*.md`, `.agents/rules/*.md`, `CONVENTIONS.md`). Full-profile installs also emit native skill pointer catalogues for Cursor, Windsurf, and Cline. Codex local install additionally generates `AGENTS.md` (universal coding rules inlined — Codex reads only AGENTS.md, not `.agents/rules/`), `.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
113
 
114
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`).
115
115
 
@@ -143,9 +143,8 @@ If a project already has `.mcp.json`, local install mirrors its `mcpServers` ent
143
143
  | `aider-conf` | `./` | Generates `.aider.conf.yml` |
144
144
  | `conventions-md` | `./` | Generates `CONVENTIONS.md` (Aider auto-loaded) |
145
145
  | `augment-dir-rules` | `./` | Generates `.augment/rules/ai-toolkit-*.md` |
146
- | `antigravity-rules` | `./` | Generates `.agent/rules/` + `.agent/workflows/` |
146
+ | `antigravity-rules` | `./` | Generates `.agents/rules/` + `.agents/workflows/` |
147
147
  | `codex-md` | `./` | Generates Codex-facing `AGENTS.md` |
148
- | `codex-rules` | `./` | Generates `.agents/rules/*.md` |
149
148
  | `codex-hooks` | `./` | Generates `.codex/hooks.json` |
150
149
  | `agents-md` | toolkit | Regenerates `AGENTS.md` |
151
150
  | `llms-txt` | `./` | Generates `llms.txt` |
@@ -87,8 +87,7 @@ Usage: ai-toolkit <command> [options]
87
87
  |---------|-------------|
88
88
  | `generate-all` | Generate all platform configs at once |
89
89
  | `agents-md` | Regenerate `AGENTS.md` from agent definitions |
90
- | `codex-md` | Generate `AGENTS.md` with marker injection for Codex CLI |
91
- | `codex-rules` | Generate `.agents/rules/*.md` for Codex CLI |
90
+ | `codex-md` | Generate `AGENTS.md` (coding rules inlined) with marker injection for Codex CLI |
92
91
  | `codex-hooks` | Generate `.codex/hooks.json` for Codex CLI |
93
92
  | `cursor-rules` | Generate `.cursorrules` (legacy single file) |
94
93
  | `cursor-mdc` | Generate `.cursor/rules/*.mdc` (recommended) |
@@ -104,7 +103,7 @@ Usage: ai-toolkit <command> [options]
104
103
  | `conventions-md` | Generate `CONVENTIONS.md` for Aider |
105
104
  | `augment-rules` | Generate `.augment/rules/ai-toolkit.md` (legacy) |
106
105
  | `augment-dir-rules` | Generate `.augment/rules/ai-toolkit-*.md` (recommended) |
107
- | `antigravity-rules` | Generate `.agent/rules/` and `.agent/workflows/` |
106
+ | `antigravity-rules` | Generate `.agents/rules/` and `.agents/workflows/` |
108
107
  | `llms-txt` | Generate `llms.txt` and `llms-full.txt` |
109
108
 
110
109
  ## Other Commands