@softspark/ai-toolkit 4.12.0 → 4.14.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +31 -15
  3. package/app/.claude-plugin/plugin.json +11 -19
  4. package/app/ARCHITECTURE.md +6 -6
  5. package/app/agents/explorer-agent.md +1 -1
  6. package/app/agents/fact-checker.md +1 -1
  7. package/app/claude-app/global-instructions.md +10 -0
  8. package/app/claude-app/hooks/hooks.json +284 -0
  9. package/app/claude-app/skills/ai-toolkit-rules/SKILL.md +359 -0
  10. package/app/hooks/config-desync-guard.sh +63 -23
  11. package/app/plugins/README.md +4 -1
  12. package/app/skills/json-mode-patterns/SKILL.md +2 -2
  13. package/app/skills/model-routing-patterns/SKILL.md +24 -7
  14. package/app/skills/prompt-caching-patterns/SKILL.md +2 -2
  15. package/app/skills/skill-creator/SKILL.md +1 -1
  16. package/benchmarks/ecosystem-doctor-snapshot.json +91 -25
  17. package/bin/ai-toolkit.js +21 -3
  18. package/kb/planning/drop-cascade-hooks-after-sunset.md +13 -8
  19. package/kb/procedures/ecosystem-sync-sop.md +5 -5
  20. package/kb/procedures/maintenance-sop.md +42 -4
  21. package/kb/procedures/release-preparation-sop.md +5 -1
  22. package/kb/procedures/release-verification-sop.md +25 -9
  23. package/kb/reference/architecture-overview.md +7 -2
  24. package/kb/reference/claude-ecosystem-expansion-foundations.md +12 -3
  25. package/kb/reference/cli-reference.md +4 -2
  26. package/kb/reference/global-install-model.md +24 -3
  27. package/kb/reference/hooks-catalog.md +2 -3
  28. package/kb/reference/plugin-pack-conventions.md +5 -5
  29. package/kb/reference/skills-catalog.md +2 -0
  30. package/kb/reference/supported-tools-registry.md +30 -13
  31. package/kb/reference/unique-features.md +3 -2
  32. package/llms-full.txt +179 -60
  33. package/manifest.json +8 -8
  34. package/package.json +4 -3
  35. package/scripts/_common.py +2 -2
  36. package/scripts/claude_app.py +347 -0
  37. package/scripts/doctor.py +85 -4
  38. package/scripts/ecosystem_tools.json +33 -5
  39. package/scripts/generate_devin_hooks.py +3 -4
  40. package/scripts/generate_windsurf_skills.py +5 -6
  41. package/scripts/install.py +23 -21
  42. package/scripts/install_steps/ai_tools.py +96 -6
  43. package/scripts/install_steps/install_state.py +2 -0
  44. package/scripts/update_projects.py +12 -1
  45. package/scripts/validate.py +34 -2
  46. package/AGENTS.md +0 -655
  47. package/scripts/generate_windsurf_hooks.py +0 -152
package/CHANGELOG.md CHANGED
@@ -7,6 +7,46 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v4.14.0 — Model refresh + effort-aware routing (2026-07-14)
11
+
12
+ Minor release. Refreshes Claude model IDs to the current generation across the toolkit, teaches the routing skill to route on `effort` (not just model tier), and moves two pure-retrieval agents to Haiku. No skill/agent/hook count change (44 agents, 108 skills, 1216 tests).
13
+
14
+ ### Changed
15
+ - **Canonical model IDs bumped** — `scripts/_common.py` `DEFAULT_CLAUDE_MODELS` now resolves `opus → claude-opus-4-8` and `sonnet → claude-sonnet-5` (`haiku → claude-haiku-4-5` unchanged). This is the single source of truth generators emit.
16
+ - **`model-routing-patterns` skill refreshed** — tier table updated to Haiku 4.5 / Sonnet 5 / Opus 4.8 with per-1M pricing, added a **Fable 5** row plus a "not the default best model" caveat (target for "strongest model" stays `claude-opus-4-8`), and a new **Effort routing** section (effort is the cheaper lever before swapping models — it does not invalidate the prompt cache). Fallback-chain example IDs updated.
17
+ - **Stale example model IDs refreshed** — `json-mode-patterns`, `prompt-caching-patterns`, and `skill-creator` code samples now reference `claude-opus-4-8`.
18
+ - **Pure-retrieval agents routed to Haiku** — `explorer-agent` (Read/Grep/Glob only) and `fact-checker` (Read only) changed from `model: sonnet` to `model: haiku`, closing the gap where the routing skill recommended Haiku workers but no agent used the tier.
19
+
20
+ ## v4.13.0 — Claude app delivery + Devin sunset cleanup (2026-07-10)
21
+
22
+ Minor release. Adds a validated distribution path for Claude Chat/Desktop/Cowork, fixes the core plugin contract, and removes the retired Cascade hook surface. Test count: 1208 → 1216 (seven deprecated Cascade assertions removed; six Claude app contract tests, three editor migration/propagation tests, two state-isolation/cleanup tests, two untagged-hook diagnostics, and two dry-run regressions added).
23
+
24
+ ### Added
25
+ - **Claude app plugin export** — `ai-toolkit claude-app export [--output FILE] [--no-custom-rules] [--verify]` creates a deterministic plugin ZIP for `Customize > Plugins` and a sibling Cowork global-instructions file. The archive bundles skills, agents, app-relative hooks, required helper scripts, core rules, and registered user rules (opt-out for shareable bundles).
26
+ - **App-native rules delivery** — common and standalone rule sources are rendered into the `ai-toolkit-rules` skill because Claude Chat/Cowork does not read Claude Code's `CLAUDE.md` or `~/.claude/rules/` surfaces.
27
+ - **Claude app ecosystem target** — registry/tooling now tracks 13 targets: Claude Code, Claude Chat/Cowork, and 11 editor integrations.
28
+
29
+ ### Fixed
30
+ - **Official plugin manifest** — changed `repository` from an invalid object to the required URL string, removed four ignored non-schema fields, and declared the generated app skill/hook component paths. `claude plugin validate` now passes on a clean staged plugin.
31
+ - **Cowork hook portability** — generated plugin hooks use `${CLAUDE_PLUGIN_ROOT}` and bundle their Python helpers instead of assuming a separate `~/.softspark/ai-toolkit/hooks` install.
32
+ - **Untagged hook diagnostics** — `doctor` and `config-desync-guard.sh` now recognize canonical hook behavior when Claude rewrites settings without preserving ai-toolkit's private `_source` marker, eliminating false "hooks missing" warnings.
33
+ - **Update dry-run safety** — `ai-toolkit update --dry-run` and `--list` no longer invoke registered-project updates or create `projects.lock` after the read-only preview.
34
+ - **Cline dry-run accuracy** — global preview now reports reuse of Cline-compatible `~/.claude/skills` instead of claiming it will create a redundant `~/.cline/skills` pointer.
35
+ - **Global/local state isolation** — project-local installs and registered-project propagation no longer overwrite global `state.json` modules/profile with the last project's detected languages; project metadata remains in `projects.json`.
36
+ - **Detected-language state cleanup** — explicit module installs now clear stale `auto_detected_languages` metadata instead of reporting an obsolete last-detected language in `status`.
37
+ - **Registered-project editor/profile propagation** — explicit `ai-toolkit update --editors/--profile ...` overrides now reach registered projects; without an override, each project's saved editor set and profile are preserved.
38
+ - **Devin skill discovery** — emit a single canonical pointer under `.windsurf/skills` instead of also writing `.devin/skills`. Both are in Devin's documented eight-path discovery list (all scanned in every repo), so one pointer keeps skills discoverable while avoiding duplicate registration.
39
+
40
+ ### Removed
41
+ - **Cascade hook generator** — removed `generate_windsurf_hooks.py`, `.windsurf/hooks.json` install wiring, tests, and docs after Cascade's 2026-07-01 sunset. `generate_devin_hooks.py` / `.devin/hooks.v1.json` is the sole Windsurf-family hook surface.
42
+ - **Retired path migration** — local Windsurf/Devin updates strip only ai-toolkit-owned entries from legacy `.windsurf/hooks.json` and remove the managed `.devin/skills/ai-toolkit-skill-catalogue` pointer while preserving user content.
43
+
44
+ ### Ecosystem
45
+ - **Class B/F — Claude app plugins**: adopted the official plugin surface shared by Chat/Desktop/Cowork; skills work across Chat and Cowork while hooks/sub-agents are Cowork-only.
46
+ - **Class D — Devin/Cascade**: completed the scheduled removal and refreshed current skill paths. Devin Desktop v3.4.27 and its v3.4.22 skill-permission change were reviewed; no permission field is needed for ai-toolkit's non-executing pointer skill.
47
+ - **Class A — editor docs**: reviewed content-only drift for Cursor, Copilot, Gemini, Cline, Augment, and opencode; no generator contract changes were found.
48
+ - **Class A — versions/docs**: refreshed Claude Code 2.1.206 and Codex CLI 0.144.1 after reviewing their official releases/current config surfaces.
49
+
10
50
  ## v4.12.0 — Global-first editor installs + Codex path fix (2026-07-02)
11
51
 
12
52
  Minor release. Expands global (HOME-scoped) installs to every editor with a documented, merge-safe file surface, and fixes a Codex global-install bug where instructions landed in a file Codex never reads. Test count: 1203 → 1208.
package/README.md CHANGED
@@ -1,22 +1,21 @@
1
1
  # ai-toolkit
2
2
 
3
- > Professional-grade AI coding toolkit with multi-platform support. Machine-enforced safety, 108 skills, 44 agents, expanded lifecycle hooks, persona presets, experimental opt-in plugin packs, and benchmark tooling — works with Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Google Antigravity, Codex CLI, and opencode, ready in 60 seconds.
3
+ > Professional-grade AI coding toolkit with multi-platform support. Machine-enforced safety, 108 skills, 44 agents, expanded lifecycle hooks, persona presets, experimental opt-in plugin packs, and benchmark tooling — works with Claude Code, Claude Chat/Cowork, Cursor, Devin, Copilot, Gemini, Cline, Roo/Zoo Code, Aider, Augment, Google Antigravity, Codex CLI, and opencode.
4
4
 
5
5
  [![CI](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
7
  [![Skills](https://img.shields.io/badge/skills-108-brightgreen)](app/skills/)
8
8
  [![Agents](https://img.shields.io/badge/agents-44-blue)](app/agents/)
9
- [![Tests](https://img.shields.io/badge/tests-1208%20passing-success)](tests/)
9
+ [![Tests](https://img.shields.io/badge/tests-1216%20passing-success)](tests/)
10
10
 
11
- ## What's New in v4.12.0
11
+ ## What's New in v4.14.0
12
12
 
13
- v4.12.0 makes global (HOME-scoped) installs first-class for every editor with a documented file surface, and fixes a Codex global-install bug.
13
+ v4.14.0 refreshes Claude model IDs to the current generation and makes model routing effort-aware.
14
14
 
15
- - **Codex global path fix**: `install --editors codex` now writes `~/.codex/AGENTS.md` (the file Codex actually reads) instead of the never-loaded `~/AGENTS.md`; upgrades strip the stale section.
16
- - **Global installs for 7 editors**: Gemini (hooks/commands/skills), Augment (agents/commands/hooks), Roo/Zoo (skills), Windsurf (`~/.config/devin/AGENTS.md`), plus new global support for Cursor (`~/.cursor/hooks.json`), GitHub Copilot (`~/.copilot/`), and Antigravity (skill pointer).
17
- - **Roo Zoo Code**: retargeted the dead `RooCodeInc/Roo-Code` release feed to the active successor `Zoo-Code-Org/Zoo-Code`.
18
- - **Ecosystem refresh**: Gemini v0.49.0, Codex 0.142.5, Auggie 0.31.0, Antigravity CLI 1.0.14, Claude Code 2.1.198; snapshot re-baselined.
19
- - **Test count**: 1203 → 1208.
15
+ - **Current model IDs**: `scripts/_common.py` now resolves `opus claude-opus-4-8` and `sonnet → claude-sonnet-5` (the single source of truth generators emit); stale `claude-opus-4-7` samples across skills refreshed.
16
+ - **Effort-aware routing**: `model-routing-patterns` gains an Effort section tuning `output_config.effort` is the cheaper lever before swapping models, and it does not invalidate the prompt cache the way a mid-session model swap does.
17
+ - **Fable 5 tier documented**: added to the routing table with pricing and a "not the default best model" caveat — for "strongest model", the target stays `claude-opus-4-8`.
18
+ - **Cheaper retrieval agents**: `explorer-agent` and `fact-checker` (pure read/search) moved to `model: haiku`, closing the gap where the skill recommended Haiku workers but no agent used the tier.
20
19
 
21
20
  See [CHANGELOG.md](CHANGELOG.md) for full history.
22
21
 
@@ -74,10 +73,25 @@ ai-toolkit update --local # auto-detects editors
74
73
 
75
74
  ```bash
76
75
  ai-toolkit plugin list # show available packs
77
- ai-toolkit plugin install --editor all --all # install all for Claude + Codex
76
+ ai-toolkit plugin install --editor all --all # install all for Claude Code + Codex
78
77
  ai-toolkit plugin status --editor all # show what's installed
79
78
  ```
80
79
 
80
+ ### Claude Chat / Desktop / Cowork
81
+
82
+ The Claude app does not read Claude Code's `~/.claude/rules/` or `CLAUDE.md`.
83
+ Export and upload the app-native plugin instead:
84
+
85
+ ```bash
86
+ ai-toolkit claude-app export --verify
87
+ # Claude > Customize > Plugins > + > Upload plugin
88
+ # Paste the generated *-global-instructions.md into:
89
+ # Settings > Cowork > Global instructions
90
+ ```
91
+
92
+ Re-export and re-upload after toolkit or registered-rule updates. Skills work
93
+ in Chat and Cowork; hooks and sub-agents are active only in Cowork.
94
+
81
95
  ### Install Profiles
82
96
 
83
97
  ```bash
@@ -102,8 +116,9 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
102
116
  | Platform | Config Files | Hooks | Scope |
103
117
  |----------|-------------|:-----:|-------|
104
118
  | Claude Code | `~/.claude/agents`, `~/.claude/skills`, `~/.claude/rules/*.md`, `~/.claude/settings.json` | ✅ | global |
119
+ | Claude Chat / Cowork | uploaded plugin ZIP + UI global/folder instructions | Cowork only | account/app |
105
120
  | Cursor | `.cursor/rules/*.mdc` + `.cursor/mcp.json` + `.cursor/skills/*` | ✅ | project (`~/.cursor/mcp.json` for MCP only) |
106
- | Windsurf (Devin Desktop) | `~/.codeium/.../global_rules.md` + `~/.codeium/windsurf/skills/*` + `.devin/rules/*.md` + `.windsurf/rules/*.md` (legacy) | ✅ | global + project |
121
+ | Windsurf (Devin Desktop) | `~/.config/devin/AGENTS.md` + `.devin/rules/*.md` + `.devin/hooks.v1.json` + `.windsurf/skills/*` | ✅ | global + project |
107
122
  | Gemini CLI | `~/.gemini/GEMINI.md` | ✅ | global |
108
123
  | GitHub Copilot | `.github/copilot-instructions.md` + `.github/instructions/*` + `.github/prompts/*` + `AGENTS.md` | — | project |
109
124
  | Cline | `~/Documents/Cline/Rules/*.md` + `~/.cline/skills/*` + `.clinerules/*.md` | — | global + project |
@@ -114,7 +129,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
114
129
  | Codex CLI | `AGENTS.md` (coding rules inlined) + `.agents/skills/*` + `.codex/hooks.json` | ✅ | project + global plugin |
115
130
  | opencode | `AGENTS.md` + `.opencode/{agents,commands,plugins}/*` + `opencode.json` | ✅ | project + global (`~/.config/opencode/`) |
116
131
 
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.
132
+ > Claude Code is always installed (primary platform). Other editors are selected with `--editors`; the Claude app uses the separate `claude-app export` flow because its customization store is UI/plugin-managed. The **Hooks** column marks platforms with lifecycle enforcement. Platforms marked — receive guidance without blocking hooks.
118
133
 
119
134
  ---
120
135
 
@@ -126,7 +141,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
126
141
  | `skills/` (hybrid) | 30 | Slash commands with agent knowledge base |
127
142
  | `skills/` (knowledge) | 46 | Domain knowledge auto-loaded by agents (includes 13 `<lang>-rules` skills) |
128
143
  | `agents/` | 44 | Specialized agents across 10 categories |
129
- | `hooks/` | 29 entries / 14 events | Quality gates, path safety, prompt governance, loop guard, session lifecycle |
144
+ | `hooks/` | 28 entries / 14 events + statusLine | Quality gates, path safety, prompt governance, loop guard, session lifecycle |
130
145
  | `plugins/` | 11 packs | Opt-in domain bundles (security, research, frontend, enterprise, 6 language packs) |
131
146
  | `constitution.md` | 7 articles | Machine-enforced safety rules |
132
147
  | `rules/` | auto-synced | Global/project rule files for Claude and other editors |
@@ -142,14 +157,15 @@ ai-toolkit/
142
157
  │ ├── agents/ # 44 agent definitions
143
158
  │ ├── skills/ # 108 skills (task / hybrid / knowledge)
144
159
  │ ├── rules/ # Source rules synced into Claude/editor rule files
145
- │ ├── hooks/ # Hook scripts (29 entries, 14 lifecycle events)
160
+ │ ├── hooks/ # Hook scripts (28 entries, 14 lifecycle events)
161
+ │ ├── claude-app/ # Generated Chat/Cowork plugin rules, hooks, instructions
146
162
  │ ├── plugins/ # 11 experimental plugin packs (opt-in)
147
163
  │ ├── output-styles/ # System prompt output style overrides
148
164
  │ ├── constitution.md # 7 immutable safety articles
149
165
  │ └── ARCHITECTURE.md # Full system design
150
166
  ├── kb/ # Reference docs, procedures, plans
151
167
  ├── scripts/ # Validation, install, evaluation scripts
152
- ├── tests/ # Bats test suite (1208 tests)
168
+ ├── tests/ # Bats test suite (1216 tests)
153
169
  └── CHANGELOG.md
154
170
  ```
155
171
 
@@ -1,19 +1,18 @@
1
1
  {
2
+ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
2
3
  "name": "ai-toolkit",
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.12.0",
4
+ "displayName": "AI Toolkit",
5
+ "description": "Professional-grade engineering skills, agents, rules, and lifecycle guardrails for Claude Code, Claude Chat, and Cowork.",
6
+ "version": "4.14.0",
5
7
  "author": {
6
8
  "name": "SoftSpark",
7
9
  "url": "https://github.com/softspark"
8
10
  },
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/softspark/ai-toolkit"
12
- },
11
+ "repository": "https://github.com/softspark/ai-toolkit",
13
12
  "license": "MIT",
14
13
  "homepage": "https://github.com/softspark/ai-toolkit",
15
- "npm": "@softspark/ai-toolkit",
16
- "install": "npx @softspark/ai-toolkit install",
14
+ "skills": "./claude-app/skills/",
15
+ "hooks": "./claude-app/hooks/hooks.json",
17
16
  "keywords": [
18
17
  "development",
19
18
  "testing",
@@ -31,15 +30,8 @@
31
30
  "agents",
32
31
  "cursor",
33
32
  "codex",
34
- "opencode"
35
- ],
36
- "marketplace": {
37
- "category": "developer-tools",
38
- "tags": ["productivity", "code-quality", "agents", "safety"],
39
- "listing-url": "https://smithery.ai/plugin/ai-toolkit",
40
- "pricing": "free"
41
- },
42
- "claude-code": {
43
- "min-version": "1.0.33"
44
- }
33
+ "opencode",
34
+ "cowork",
35
+ "claude-app"
36
+ ]
45
37
  }
@@ -8,7 +8,7 @@ Universal multi-agent system for software development. Works across all reposito
8
8
  |-----------|-------|
9
9
  | Agents | See agents catalog |
10
10
  | Skills | See skills catalog |
11
- | Hooks | 14 events / 29 entries (SessionStart ×3, Notification ×1, PreToolUse ×5, UserPromptSubmit ×2, PostToolUse ×5, Stop ×4, TaskCompleted ×1, TeammateIdle ×1, SubagentStart ×1, SubagentStop ×1, PreCompact ×2, SessionEnd ×1, InstructionsLoaded ×1, ConfigChange ×1) |
11
+ | Hooks | 14 events / 28 entries (SessionStart ×2, Notification ×1, PreToolUse ×5, UserPromptSubmit ×2, PostToolUse ×5, Stop ×4, TaskCompleted ×1, TeammateIdle ×1, SubagentStart ×1, SubagentStop ×1, PreCompact ×2, SessionEnd ×1, InstructionsLoaded ×1, ConfigChange ×1) plus statusLine |
12
12
 
13
13
  ---
14
14
 
@@ -19,8 +19,8 @@ The toolkit is organised as five stacked layers. Higher layers depend on lower l
19
19
  ```
20
20
  ┌─────────────────────────────────────────────────────────────┐
21
21
  │ Layer 5 — Plugins (distribution) │
22
- │ Bundles for npm / marketplace / ai-toolkit eject
23
- │ Files: app/plugins/, plugin.json, package.json
22
+ │ Bundles for npm / Claude app / marketplace / eject
23
+ │ Files: app/claude-app/, app/plugins/, plugin.json
24
24
  ├─────────────────────────────────────────────────────────────┤
25
25
  │ Layer 4 — Subagents (delegation) │
26
26
  │ Specialised personas spawned via Agent / Teams │
@@ -48,14 +48,14 @@ The toolkit is organised as five stacked layers. Higher layers depend on lower l
48
48
  | A reusable workflow / domain knowledge | Layer 2 (Skills) | `/debug`, `/review`, `python-rules` |
49
49
  | Behavior the harness must enforce automatically | Layer 3 (Hooks) | block destructive `rm -rf`, run lint on Stop |
50
50
  | A specialised role for delegation | Layer 4 (Subagents) | `security-auditor`, `database-architect` |
51
- | A shippable bundle for other repos | Layer 5 (Plugins) | `app/plugins/python-stack/` |
51
+ | A shippable bundle for other repos or Claude app | Layer 5 (Plugins) | `app/plugins/`, `app/claude-app/` |
52
52
 
53
53
  ### Cross-cutting rules
54
54
 
55
55
  - A skill MAY trigger an agent (`agent: <name>` frontmatter) — that's Layer 2 calling Layer 4.
56
56
  - A hook MUST NOT call a skill — hooks are deterministic shell, skills are LLM-driven.
57
57
  - A plugin MAY bundle skills + agents + hooks, but never the inverse.
58
- - CLAUDE.md is read by every layer; it is the only layer everyone reads.
58
+ - Claude Code reads CLAUDE.md across layers. Claude Chat/Cowork uses app-global/folder instructions and plugin skills instead; `ai-toolkit claude-app export` (backed by `claude_app.py`) builds the uploadable plugin ZIP + Cowork global-instructions and renders core rules into `ai-toolkit-rules` for that runtime.
59
59
 
60
60
  ---
61
61
 
@@ -353,7 +353,7 @@ Lead Session (You)
353
353
  ### Language Rules (68 files, 13 languages)
354
354
  `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>`.
355
355
 
356
- 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()`.
356
+ Language rules are propagated to **all configured editors** — not just Claude Code. `dir_rules_shared.build_language_rules()` reads `app/rules/<lang>/*.md`, strips frontmatter, and returns combined content per language. Each directory-based generator (Cursor, Devin/Windsurf, Cline, Roo, Augment, Antigravity, Codex) emits `ai-toolkit-lang-<lang>` files in its native format. Claude Chat/Cowork receives the existing language skills plus an app-only `ai-toolkit-rules` skill through `claude_app.py`. Registered custom rules are embedded in the local app bundle and propagated to directory-based editors.
357
357
 
358
358
  ### Codex Integration
359
359
  Codex receives `AGENTS.md`, `.agents/rules/*.md`, optional `.agents/skills/*`, and `.codex/hooks.json`. `generate_codex_hooks.py` emits only Codex-supported lifecycle events and prefixes commands with `AI_TOOLKIT_HOOK_QUIET=1`, so informational hook output is not shown at session start or prompt submit while side effects and blocking Stop decisions still run. The `UserPromptSubmit` governance hook also sets `AI_TOOLKIT_HOOK_FORMAT=json` so proactive `additionalContext` reaches the model quietly. Claude's bundled `UserPromptSubmit` hook uses the same quiet JSON context path.
@@ -2,7 +2,7 @@
2
2
  name: explorer-agent
3
3
  description: "Codebase exploration and discovery agent. Use for mapping project structure, finding dependencies, understanding architecture, and research. Does NOT write code - only reads and analyzes."
4
4
  tools: Read, Grep, Glob
5
- model: sonnet
5
+ model: haiku
6
6
  color: cyan
7
7
  skills: clean-code
8
8
  ---
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: fact-checker
3
3
  description: "Claim verification expert. Use for verifying facts, source validation, RAG result accuracy checking. Triggers: fact check, verify, accuracy, claim, source validation."
4
- model: sonnet
4
+ model: haiku
5
5
  color: cyan
6
6
  tools: Read
7
7
  skills: clean-code
@@ -0,0 +1,10 @@
1
+ # AI Toolkit — Claude app global instructions
2
+
3
+ For every technical, coding, debugging, review, architecture, DevOps, data,
4
+ or file-editing task, load and follow the installed `ai-toolkit-rules` skill
5
+ before acting. Load the relevant language-rule and workflow skills as needed.
6
+ Use ai-toolkit sub-agents for specialist work in Cowork. Before claiming a
7
+ task is complete, run fresh verification and report the evidence.
8
+
9
+ In regular Chat, hooks and sub-agents are unavailable; skills remain the
10
+ authoritative customization surface. In Cowork, also honor the plugin hooks.
@@ -0,0 +1,284 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh\""
10
+ }
11
+ ]
12
+ },
13
+ {
14
+ "matcher": "startup|compact",
15
+ "hooks": [
16
+ {
17
+ "type": "command",
18
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/mcp-health.sh\""
19
+ }
20
+ ]
21
+ }
22
+ ],
23
+ "Notification": [
24
+ {
25
+ "matcher": "",
26
+ "hooks": [
27
+ {
28
+ "type": "command",
29
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/notify-waiting.sh\""
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "PreToolUse": [
35
+ {
36
+ "matcher": "Bash",
37
+ "hooks": [
38
+ {
39
+ "type": "command",
40
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/guard-destructive.sh\""
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ "matcher": "Bash|Read|Edit|Write|MultiEdit|Glob|Grep|NotebookEdit|mcp__filesystem__.*",
46
+ "hooks": [
47
+ {
48
+ "type": "command",
49
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/guard-path.sh\""
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "matcher": "Edit|Write|MultiEdit",
55
+ "hooks": [
56
+ {
57
+ "type": "command",
58
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/guard-config.sh\""
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "matcher": "Bash",
64
+ "hooks": [
65
+ {
66
+ "type": "command",
67
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/commit-quality.sh\""
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "matcher": "Bash",
73
+ "hooks": [
74
+ {
75
+ "type": "command",
76
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/revert-guard.sh\""
77
+ }
78
+ ]
79
+ }
80
+ ],
81
+ "UserPromptSubmit": [
82
+ {
83
+ "matcher": "",
84
+ "hooks": [
85
+ {
86
+ "type": "command",
87
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" AI_TOOLKIT_HOOK_QUIET=1 AI_TOOLKIT_HOOK_FORMAT=json \"${CLAUDE_PLUGIN_ROOT}/hooks/user-prompt-submit.sh\""
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "matcher": "",
93
+ "hooks": [
94
+ {
95
+ "type": "command",
96
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/track-usage.sh\""
97
+ }
98
+ ]
99
+ }
100
+ ],
101
+ "PostToolUse": [
102
+ {
103
+ "matcher": "Edit|MultiEdit|Write",
104
+ "hooks": [
105
+ {
106
+ "type": "command",
107
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/post-tool-use.sh\""
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "matcher": "Bash|Edit|Write|MultiEdit",
113
+ "hooks": [
114
+ {
115
+ "type": "command",
116
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/governance-capture.sh\""
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "matcher": "Bash|Edit|MultiEdit|Write",
122
+ "hooks": [
123
+ {
124
+ "type": "command",
125
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/loop-guard.sh\""
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "matcher": "Edit|MultiEdit|Write",
131
+ "hooks": [
132
+ {
133
+ "type": "command",
134
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/test-cohesion.sh\""
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ "matcher": "mcp__.*__(smart_query|hybrid_search_kb|crag_search|multi_hop_search|verify_answer)|WebSearch|WebFetch",
140
+ "hooks": [
141
+ {
142
+ "type": "command",
143
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/search-tracker.sh\""
144
+ }
145
+ ]
146
+ }
147
+ ],
148
+ "Stop": [
149
+ {
150
+ "matcher": "",
151
+ "hooks": [
152
+ {
153
+ "type": "command",
154
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/quality-check.sh\""
155
+ }
156
+ ]
157
+ },
158
+ {
159
+ "matcher": "",
160
+ "hooks": [
161
+ {
162
+ "type": "command",
163
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/save-session.sh\""
164
+ }
165
+ ]
166
+ },
167
+ {
168
+ "matcher": "",
169
+ "hooks": [
170
+ {
171
+ "type": "command",
172
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/quality-gate.sh\""
173
+ }
174
+ ]
175
+ },
176
+ {
177
+ "matcher": "",
178
+ "hooks": [
179
+ {
180
+ "type": "command",
181
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/stop-search-check.sh\""
182
+ }
183
+ ]
184
+ }
185
+ ],
186
+ "TaskCompleted": [
187
+ {
188
+ "matcher": "",
189
+ "hooks": [
190
+ {
191
+ "type": "command",
192
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/quality-gate.sh\""
193
+ }
194
+ ]
195
+ }
196
+ ],
197
+ "TeammateIdle": [
198
+ {
199
+ "matcher": "",
200
+ "hooks": [
201
+ {
202
+ "type": "command",
203
+ "command": "echo 'Teammate going idle. Verify: (1) All assigned files modified, (2) Tests written for changes, (3) Documentation updated if needed.'"
204
+ }
205
+ ]
206
+ }
207
+ ],
208
+ "SubagentStart": [
209
+ {
210
+ "matcher": "",
211
+ "hooks": [
212
+ {
213
+ "type": "command",
214
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/subagent-start.sh\""
215
+ }
216
+ ]
217
+ }
218
+ ],
219
+ "SubagentStop": [
220
+ {
221
+ "matcher": "",
222
+ "hooks": [
223
+ {
224
+ "type": "command",
225
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/subagent-stop.sh\""
226
+ }
227
+ ]
228
+ }
229
+ ],
230
+ "PreCompact": [
231
+ {
232
+ "matcher": "",
233
+ "hooks": [
234
+ {
235
+ "type": "command",
236
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/pre-compact.sh\""
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "matcher": "",
242
+ "hooks": [
243
+ {
244
+ "type": "command",
245
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/pre-compact-save.sh\""
246
+ }
247
+ ]
248
+ }
249
+ ],
250
+ "SessionEnd": [
251
+ {
252
+ "matcher": "",
253
+ "hooks": [
254
+ {
255
+ "type": "command",
256
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/session-end.sh\""
257
+ }
258
+ ]
259
+ }
260
+ ],
261
+ "InstructionsLoaded": [
262
+ {
263
+ "matcher": "",
264
+ "hooks": [
265
+ {
266
+ "type": "command",
267
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/instructions-audit.sh\""
268
+ }
269
+ ]
270
+ }
271
+ ],
272
+ "ConfigChange": [
273
+ {
274
+ "matcher": "user_settings",
275
+ "hooks": [
276
+ {
277
+ "type": "command",
278
+ "command": "AI_TOOLKIT_DIR=\"${CLAUDE_PLUGIN_ROOT}\" \"${CLAUDE_PLUGIN_ROOT}/hooks/config-desync-guard.sh\""
279
+ }
280
+ ]
281
+ }
282
+ ]
283
+ }
284
+ }