@softspark/ai-toolkit 4.12.0 → 4.13.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 (40) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +33 -15
  3. package/app/.claude-plugin/plugin.json +11 -19
  4. package/app/ARCHITECTURE.md +6 -6
  5. package/app/claude-app/global-instructions.md +10 -0
  6. package/app/claude-app/hooks/hooks.json +284 -0
  7. package/app/claude-app/skills/ai-toolkit-rules/SKILL.md +359 -0
  8. package/app/hooks/config-desync-guard.sh +63 -23
  9. package/app/plugins/README.md +4 -1
  10. package/benchmarks/ecosystem-doctor-snapshot.json +91 -25
  11. package/bin/ai-toolkit.js +21 -3
  12. package/kb/planning/drop-cascade-hooks-after-sunset.md +13 -8
  13. package/kb/procedures/ecosystem-sync-sop.md +5 -5
  14. package/kb/procedures/maintenance-sop.md +42 -4
  15. package/kb/procedures/release-preparation-sop.md +5 -1
  16. package/kb/procedures/release-verification-sop.md +25 -9
  17. package/kb/reference/architecture-overview.md +7 -2
  18. package/kb/reference/claude-ecosystem-expansion-foundations.md +12 -3
  19. package/kb/reference/cli-reference.md +4 -2
  20. package/kb/reference/global-install-model.md +24 -3
  21. package/kb/reference/hooks-catalog.md +2 -3
  22. package/kb/reference/plugin-pack-conventions.md +5 -5
  23. package/kb/reference/skills-catalog.md +2 -0
  24. package/kb/reference/supported-tools-registry.md +30 -13
  25. package/kb/reference/unique-features.md +3 -2
  26. package/llms-full.txt +179 -60
  27. package/manifest.json +8 -8
  28. package/package.json +4 -3
  29. package/scripts/claude_app.py +347 -0
  30. package/scripts/doctor.py +85 -4
  31. package/scripts/ecosystem_tools.json +33 -5
  32. package/scripts/generate_devin_hooks.py +3 -4
  33. package/scripts/generate_windsurf_skills.py +5 -6
  34. package/scripts/install.py +23 -21
  35. package/scripts/install_steps/ai_tools.py +96 -6
  36. package/scripts/install_steps/install_state.py +2 -0
  37. package/scripts/update_projects.py +12 -1
  38. package/scripts/validate.py +34 -2
  39. package/AGENTS.md +0 -655
  40. package/scripts/generate_windsurf_hooks.py +0 -152
package/CHANGELOG.md CHANGED
@@ -7,6 +7,36 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v4.13.0 — Claude app delivery + Devin sunset cleanup (2026-07-10)
11
+
12
+ 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).
13
+
14
+ ### Added
15
+ - **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).
16
+ - **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.
17
+ - **Claude app ecosystem target** — registry/tooling now tracks 13 targets: Claude Code, Claude Chat/Cowork, and 11 editor integrations.
18
+
19
+ ### Fixed
20
+ - **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.
21
+ - **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.
22
+ - **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.
23
+ - **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.
24
+ - **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.
25
+ - **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`.
26
+ - **Detected-language state cleanup** — explicit module installs now clear stale `auto_detected_languages` metadata instead of reporting an obsolete last-detected language in `status`.
27
+ - **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.
28
+ - **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.
29
+
30
+ ### Removed
31
+ - **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.
32
+ - **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.
33
+
34
+ ### Ecosystem
35
+ - **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.
36
+ - **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.
37
+ - **Class A — editor docs**: reviewed content-only drift for Cursor, Copilot, Gemini, Cline, Augment, and opencode; no generator contract changes were found.
38
+ - **Class A — versions/docs**: refreshed Claude Code 2.1.206 and Codex CLI 0.144.1 after reviewing their official releases/current config surfaces.
39
+
10
40
  ## v4.12.0 — Global-first editor installs + Codex path fix (2026-07-02)
11
41
 
12
42
  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,23 @@
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.13.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.13.0 makes the Claude app a first-class distribution target and completes the Devin/Cascade migration.
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
+ - **Claude Chat/Desktop/Cowork export**: `ai-toolkit claude-app export --verify` creates an uploadable plugin ZIP and Cowork global-instructions file. Core and registered rules are packaged as app-native skills.
16
+ - **Plugin contract repaired**: the official validator now accepts the manifest; app hooks use `${CLAUDE_PLUGIN_ROOT}` instead of depending on a Claude Code install.
17
+ - **Cascade cleanup**: removed the dead `.windsurf/hooks.json` generator after the 2026-07-01 sunset; `.devin/hooks.v1.json` is the live Devin hook surface.
18
+ - **Devin skill-path correction**: stopped emitting undocumented `.devin/skills`; the pointer remains under the currently documented `.windsurf/skills` compatibility path.
19
+ - **Ecosystem refresh**: registry expanded to 13 targets and snapshots refreshed against current official documentation.
20
+ - **Test count**: 1208 → 1216 (Claude app export, editor migration/propagation, state isolation, diagnostics, and dry-run accuracy covered).
20
21
 
21
22
  See [CHANGELOG.md](CHANGELOG.md) for full history.
22
23
 
@@ -74,10 +75,25 @@ ai-toolkit update --local # auto-detects editors
74
75
 
75
76
  ```bash
76
77
  ai-toolkit plugin list # show available packs
77
- ai-toolkit plugin install --editor all --all # install all for Claude + Codex
78
+ ai-toolkit plugin install --editor all --all # install all for Claude Code + Codex
78
79
  ai-toolkit plugin status --editor all # show what's installed
79
80
  ```
80
81
 
82
+ ### Claude Chat / Desktop / Cowork
83
+
84
+ The Claude app does not read Claude Code's `~/.claude/rules/` or `CLAUDE.md`.
85
+ Export and upload the app-native plugin instead:
86
+
87
+ ```bash
88
+ ai-toolkit claude-app export --verify
89
+ # Claude > Customize > Plugins > + > Upload plugin
90
+ # Paste the generated *-global-instructions.md into:
91
+ # Settings > Cowork > Global instructions
92
+ ```
93
+
94
+ Re-export and re-upload after toolkit or registered-rule updates. Skills work
95
+ in Chat and Cowork; hooks and sub-agents are active only in Cowork.
96
+
81
97
  ### Install Profiles
82
98
 
83
99
  ```bash
@@ -102,8 +118,9 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
102
118
  | Platform | Config Files | Hooks | Scope |
103
119
  |----------|-------------|:-----:|-------|
104
120
  | Claude Code | `~/.claude/agents`, `~/.claude/skills`, `~/.claude/rules/*.md`, `~/.claude/settings.json` | ✅ | global |
121
+ | Claude Chat / Cowork | uploaded plugin ZIP + UI global/folder instructions | Cowork only | account/app |
105
122
  | 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 |
123
+ | Windsurf (Devin Desktop) | `~/.config/devin/AGENTS.md` + `.devin/rules/*.md` + `.devin/hooks.v1.json` + `.windsurf/skills/*` | ✅ | global + project |
107
124
  | Gemini CLI | `~/.gemini/GEMINI.md` | ✅ | global |
108
125
  | GitHub Copilot | `.github/copilot-instructions.md` + `.github/instructions/*` + `.github/prompts/*` + `AGENTS.md` | — | project |
109
126
  | Cline | `~/Documents/Cline/Rules/*.md` + `~/.cline/skills/*` + `.clinerules/*.md` | — | global + project |
@@ -114,7 +131,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
114
131
  | Codex CLI | `AGENTS.md` (coding rules inlined) + `.agents/skills/*` + `.codex/hooks.json` | ✅ | project + global plugin |
115
132
  | opencode | `AGENTS.md` + `.opencode/{agents,commands,plugins}/*` + `opencode.json` | ✅ | project + global (`~/.config/opencode/`) |
116
133
 
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.
134
+ > 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
135
 
119
136
  ---
120
137
 
@@ -126,7 +143,7 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
126
143
  | `skills/` (hybrid) | 30 | Slash commands with agent knowledge base |
127
144
  | `skills/` (knowledge) | 46 | Domain knowledge auto-loaded by agents (includes 13 `<lang>-rules` skills) |
128
145
  | `agents/` | 44 | Specialized agents across 10 categories |
129
- | `hooks/` | 29 entries / 14 events | Quality gates, path safety, prompt governance, loop guard, session lifecycle |
146
+ | `hooks/` | 28 entries / 14 events + statusLine | Quality gates, path safety, prompt governance, loop guard, session lifecycle |
130
147
  | `plugins/` | 11 packs | Opt-in domain bundles (security, research, frontend, enterprise, 6 language packs) |
131
148
  | `constitution.md` | 7 articles | Machine-enforced safety rules |
132
149
  | `rules/` | auto-synced | Global/project rule files for Claude and other editors |
@@ -142,14 +159,15 @@ ai-toolkit/
142
159
  │ ├── agents/ # 44 agent definitions
143
160
  │ ├── skills/ # 108 skills (task / hybrid / knowledge)
144
161
  │ ├── rules/ # Source rules synced into Claude/editor rule files
145
- │ ├── hooks/ # Hook scripts (29 entries, 14 lifecycle events)
162
+ │ ├── hooks/ # Hook scripts (28 entries, 14 lifecycle events)
163
+ │ ├── claude-app/ # Generated Chat/Cowork plugin rules, hooks, instructions
146
164
  │ ├── plugins/ # 11 experimental plugin packs (opt-in)
147
165
  │ ├── output-styles/ # System prompt output style overrides
148
166
  │ ├── constitution.md # 7 immutable safety articles
149
167
  │ └── ARCHITECTURE.md # Full system design
150
168
  ├── kb/ # Reference docs, procedures, plans
151
169
  ├── scripts/ # Validation, install, evaluation scripts
152
- ├── tests/ # Bats test suite (1208 tests)
170
+ ├── tests/ # Bats test suite (1216 tests)
153
171
  └── CHANGELOG.md
154
172
  ```
155
173
 
@@ -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.13.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; `claude_app.py` 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.
@@ -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
+ }