@softspark/ai-toolkit 4.3.2 → 4.4.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/CHANGELOG.md +63 -0
- package/README.md +11 -12
- package/app/.claude-plugin/plugin.json +1 -1
- package/app/ARCHITECTURE.md +1 -1
- package/app/hooks/_hook-io.sh +3 -4
- package/app/hooks/session-start.sh +5 -5
- package/app/hooks/stop-search-check.sh +4 -1
- package/app/hooks.json +1 -1
- package/benchmarks/ecosystem-doctor-snapshot.json +35 -14
- package/kb/procedures/maintenance-sop.md +40 -3
- package/kb/reference/architecture-overview.md +2 -2
- package/kb/reference/codex-cli-compatibility.md +13 -5
- package/kb/reference/global-install-model.md +2 -2
- package/kb/reference/hooks-catalog.md +23 -16
- package/kb/reference/supported-tools-registry.md +12 -12
- package/llms-full.txt +92 -40
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/scripts/ecosystem_tools.json +25 -7
- package/scripts/generate_cline_skills.py +26 -0
- package/scripts/generate_codex_hooks.py +9 -1
- package/scripts/generate_cursor_skills.py +25 -0
- package/scripts/generate_windsurf_skills.py +26 -0
- package/scripts/install.py +2 -2
- package/scripts/install_steps/ai_tools.py +30 -8
- package/scripts/skill_pointer.py +49 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,69 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## v4.4.0 - native editor skill pointers and hook governance hardening (2026-05-25)
|
|
11
|
+
|
|
12
|
+
Minor release. Adds native skill pointer generation for more editor surfaces and hardens search-first governance so quiet hooks still inject model context without noisy transcript output.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **Native editor skill pointers** - Added Cursor, Windsurf, and Cline skill pointer generators so supported editors can discover the ai-toolkit skill catalog through their native skill directories.
|
|
17
|
+
- **Shared skill pointer builder** - Added `scripts/skill_pointer.py` to keep generated skill pointer metadata consistent across editor-specific generators.
|
|
18
|
+
- **Release coverage** - Added generator and hook tests covering the new skill pointer outputs, quiet JSON `UserPromptSubmit` context, and noisy Codex search-first log fallback.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- **Editor registry and install flow** - Updated supported-tool metadata and install behavior for Cursor, Windsurf, and Cline native skill pointer targets.
|
|
23
|
+
- **Codex hook generation** - `scripts/generate_codex_hooks.py` now emits quiet JSON context for `user-prompt-submit.sh`, matching Claude Code's installed hook behavior.
|
|
24
|
+
- **Hook runtime documentation** - Updated the hooks catalog, Codex compatibility notes, global install model, supported tools registry, and maintenance SOP with the new runtime behavior.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **Quiet hook context injection** - `_hook-io.sh` now lets `AI_TOOLKIT_HOOK_FORMAT=json` emit `hookSpecificOutput.additionalContext` even when `AI_TOOLKIT_HOOK_QUIET=1` is set.
|
|
29
|
+
- **Search-first false positives in Codex** - `stop-search-check.sh` now scans a larger recent Codex log window and recognizes both `ToolCall: mcp__...__smart_query` and `tool.name="smart_query"` log shapes.
|
|
30
|
+
- **Installed runtime drift** - Claude and Codex hook manifests now install `UserPromptSubmit` with `AI_TOOLKIT_HOOK_QUIET=1 AI_TOOLKIT_HOOK_FORMAT=json`.
|
|
31
|
+
|
|
32
|
+
### Ecosystem
|
|
33
|
+
|
|
34
|
+
- **Snapshot refresh** - Refreshed the ecosystem doctor snapshot after upstream documentation/content drift review and generator updates.
|
|
35
|
+
|
|
36
|
+
### Verification
|
|
37
|
+
|
|
38
|
+
- `bats tests/test_generators.bats`
|
|
39
|
+
- `bats tests/test_cli.bats`
|
|
40
|
+
- `bats tests/test_skills_native.bats tests/test_native_surfaces.bats`
|
|
41
|
+
- `bats tests/test_hooks.bats tests/test_search_first_flow.bats`
|
|
42
|
+
- `bats tests/test_install.bats tests/test_codex.bats`
|
|
43
|
+
- `python3 scripts/validate.py --strict`
|
|
44
|
+
- `git diff --check`
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## v4.3.3 - silent hook context roll-forward (2026-05-21)
|
|
49
|
+
|
|
50
|
+
Patch release. Rolls forward the quiet-hook release with a stricter default: non-blocking plain-text hook context is now silent even when a runtime uses a stale or manually copied command without `AI_TOOLKIT_HOOK_QUIET=1`.
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- **Silent plain-text context by default** - non-blocking hook context output now requires `AI_TOOLKIT_HOOK_VERBOSE=1` in plain-text mode, so prompt-submit and startup reminders do not leak into the visible chat window.
|
|
55
|
+
- **SessionStart default output** - `session-start.sh` keeps session-state reset, stale search-flag cleanup, and update-notification side effects, but no longer prints startup reminders or loaded context unless verbose mode is enabled.
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- **Hook output helper** - `_hook-io.sh` supports `AI_TOOLKIT_HOOK_VERBOSE=1` for local debugging while keeping plain-text context silent by default.
|
|
60
|
+
- **Runtime hook docs** - `kb/reference/hooks-catalog.md` and `kb/reference/codex-cli-compatibility.md` document the new silent-by-default behavior and verbose opt-in.
|
|
61
|
+
|
|
62
|
+
### Tests
|
|
63
|
+
|
|
64
|
+
- **Silent default coverage** - `tests/test_hooks.bats` now verifies default silence for `SessionStart` and `UserPromptSubmit`, plus verbose opt-in for the same context messages.
|
|
65
|
+
|
|
66
|
+
### Verification
|
|
67
|
+
|
|
68
|
+
- `npm test` - 1144 passing.
|
|
69
|
+
- `python3 scripts/validate.py --strict` - passed.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
10
73
|
## v4.3.2 - quiet hooks and no-RAG search-first hardening (2026-05-21)
|
|
11
74
|
|
|
12
75
|
Patch release. Fixes noisy lifecycle hook output in Codex and Claude prompt-submit flows while preserving search-first enforcement and blocking decisions.
|
package/README.md
CHANGED
|
@@ -6,17 +6,16 @@
|
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](app/skills/)
|
|
8
8
|
[](app/agents/)
|
|
9
|
-
[](tests/)
|
|
10
10
|
|
|
11
|
-
## What's New in v4.
|
|
11
|
+
## What's New in v4.4.0
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Minor release. Adds native skill pointers for more editor surfaces and hardens quiet hook governance for Claude and Codex.
|
|
14
14
|
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **Codex search-first
|
|
18
|
-
- **
|
|
19
|
-
- **Ecosystem snapshot refresh**: release prep refreshed upstream editor/tool drift baselines after class A/C documentation and version drift review.
|
|
15
|
+
- **Native editor skills**: Cursor, Windsurf, and Cline now get generated skill pointer catalogs alongside existing rule surfaces.
|
|
16
|
+
- **Quiet JSON governance**: `UserPromptSubmit` keeps output quiet while still injecting `additionalContext` for search-first and workflow reminders.
|
|
17
|
+
- **Codex search-first hardening**: Stop enforcement recognizes current Codex MCP log shapes and tolerates noisy skill-loader output.
|
|
18
|
+
- **Release coverage updated**: generator, install, Codex, hook, and search-first tests cover the new behavior; suite count is 1149 tests.
|
|
20
19
|
|
|
21
20
|
See [CHANGELOG.md](CHANGELOG.md) for full history.
|
|
22
21
|
|
|
@@ -102,11 +101,11 @@ See [CLI Reference](kb/reference/cli-reference.md) for all commands and options.
|
|
|
102
101
|
| Platform | Config Files | Scope |
|
|
103
102
|
|----------|-------------|-------|
|
|
104
103
|
| Claude Code | `~/.claude/` | global |
|
|
105
|
-
| Cursor | `.cursor/rules/*.mdc` + `.cursor/mcp.json` | project (`~/.cursor/mcp.json` for MCP only) |
|
|
106
|
-
| Windsurf | `~/.codeium/.../global_rules.md` + `.windsurf/rules/*.md` | global + project |
|
|
104
|
+
| Cursor | `.cursor/rules/*.mdc` + `.cursor/mcp.json` + `.cursor/skills/*` | project (`~/.cursor/mcp.json` for MCP only) |
|
|
105
|
+
| Windsurf | `~/.codeium/.../global_rules.md` + `~/.codeium/windsurf/skills/*` + `.windsurf/rules/*.md` | global + project |
|
|
107
106
|
| Gemini CLI | `~/.gemini/GEMINI.md` | global |
|
|
108
107
|
| GitHub Copilot | `.github/copilot-instructions.md` | project |
|
|
109
|
-
| Cline |
|
|
108
|
+
| Cline | `~/.cline/rules/*.md` + `~/.cline/skills/*` + `.clinerules/*.md` | global + project |
|
|
110
109
|
| Roo Code | `~/.roo/rules/*.md` + `.roomodes` + `.roo/rules/*.md` | global rules + project |
|
|
111
110
|
| Aider | `~/.aider.conf.yml` + `.aider.conf.yml` + `CONVENTIONS.md` | global + project |
|
|
112
111
|
| Augment | `~/.augment/rules/*.md` + `.augment/rules/ai-toolkit-*.md` | global + project |
|
|
@@ -149,7 +148,7 @@ ai-toolkit/
|
|
|
149
148
|
│ └── ARCHITECTURE.md # Full system design
|
|
150
149
|
├── kb/ # Reference docs, procedures, plans
|
|
151
150
|
├── scripts/ # Validation, install, evaluation scripts
|
|
152
|
-
├── tests/ # Bats test suite (
|
|
151
|
+
├── tests/ # Bats test suite (1149 tests)
|
|
153
152
|
└── CHANGELOG.md
|
|
154
153
|
```
|
|
155
154
|
|
|
@@ -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.
|
|
4
|
+
"version": "4.4.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SoftSpark",
|
|
7
7
|
"url": "https://github.com/softspark"
|
package/app/ARCHITECTURE.md
CHANGED
|
@@ -356,7 +356,7 @@ Lead Session (You)
|
|
|
356
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()`.
|
|
357
357
|
|
|
358
358
|
### Codex Integration
|
|
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
|
|
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.
|
|
360
360
|
|
|
361
361
|
### opencode Integration (v2.5.0+)
|
|
362
362
|
opencode is the 11th supported editor. Five generators handle its integration surface:
|
package/app/hooks/_hook-io.sh
CHANGED
|
@@ -58,13 +58,12 @@ hook_new_content() {
|
|
|
58
58
|
|
|
59
59
|
hook_emit_context() {
|
|
60
60
|
local message="$1"
|
|
61
|
-
if [ "${AI_TOOLKIT_HOOK_QUIET:-0}" = "1" ]; then
|
|
62
|
-
return 0
|
|
63
|
-
fi
|
|
64
61
|
if [ "${AI_TOOLKIT_HOOK_FORMAT:-}" = "json" ]; then
|
|
65
62
|
jq -nc --arg msg "$message" \
|
|
66
63
|
'{"hookSpecificOutput":{"additionalContext":$msg},"suppressOutput":true}'
|
|
67
|
-
|
|
64
|
+
elif [ "${AI_TOOLKIT_HOOK_QUIET:-0}" = "1" ]; then
|
|
65
|
+
return 0
|
|
66
|
+
elif [ "${AI_TOOLKIT_HOOK_VERBOSE:-0}" = "1" ]; then
|
|
68
67
|
printf '%s\n' "$message"
|
|
69
68
|
fi
|
|
70
69
|
}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
source "$(dirname "$0")/_locate-toolkit.sh"
|
|
9
9
|
|
|
10
10
|
emit_context() {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
[ "${AI_TOOLKIT_HOOK_QUIET:-0}" = "1" ] && return 0
|
|
12
|
+
[ "${AI_TOOLKIT_HOOK_VERBOSE:-0}" != "1" ] && return 0
|
|
13
|
+
printf '%s\n' "$1"
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
# 1. Mandatory rules reminder
|
|
@@ -52,7 +52,7 @@ fi
|
|
|
52
52
|
|
|
53
53
|
# 3. Load session context (if available)
|
|
54
54
|
SESSION_FILE=".claude/session-context.md"
|
|
55
|
-
if [ -f "$SESSION_FILE" ] && [ "${AI_TOOLKIT_HOOK_QUIET:-0}" != "1" ]; then
|
|
55
|
+
if [ -f "$SESSION_FILE" ] && [ "${AI_TOOLKIT_HOOK_QUIET:-0}" != "1" ] && [ "${AI_TOOLKIT_HOOK_VERBOSE:-0}" = "1" ]; then
|
|
56
56
|
printf '%s\n' "=== Session Context ==="
|
|
57
57
|
cat "$SESSION_FILE"
|
|
58
58
|
printf '%s\n' "====================="
|
|
@@ -60,7 +60,7 @@ fi
|
|
|
60
60
|
|
|
61
61
|
# 3. Load active instincts (if any)
|
|
62
62
|
INSTINCTS_DIR=".claude/instincts"
|
|
63
|
-
if [ -d "$INSTINCTS_DIR" ] && [ "${AI_TOOLKIT_HOOK_QUIET:-0}" != "1" ] && ls "$INSTINCTS_DIR"/*.md >/dev/null 2>&1; then
|
|
63
|
+
if [ -d "$INSTINCTS_DIR" ] && [ "${AI_TOOLKIT_HOOK_QUIET:-0}" != "1" ] && [ "${AI_TOOLKIT_HOOK_VERBOSE:-0}" = "1" ] && ls "$INSTINCTS_DIR"/*.md >/dev/null 2>&1; then
|
|
64
64
|
printf '%s\n' "=== Active Instincts ==="
|
|
65
65
|
for f in "$INSTINCTS_DIR"/*.md; do
|
|
66
66
|
printf '%s\n' "- $(head -1 "$f")"
|
|
@@ -59,7 +59,10 @@ try:
|
|
|
59
59
|
with log_path.open("rb") as handle:
|
|
60
60
|
handle.seek(0, 2)
|
|
61
61
|
size = handle.tell()
|
|
62
|
-
|
|
62
|
+
# Codex logs can be noisy between the search call and Stop hook
|
|
63
|
+
# execution, especially when skill loading emits repeated warnings.
|
|
64
|
+
# Keep this bounded, but large enough to avoid false positives.
|
|
65
|
+
handle.seek(max(0, size - 20_000_000))
|
|
63
66
|
lines = handle.read().decode("utf-8", errors="replace").splitlines()
|
|
64
67
|
except OSError:
|
|
65
68
|
sys.exit(1)
|
package/app/hooks.json
CHANGED
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"hooks": [
|
|
104
104
|
{
|
|
105
105
|
"type": "command",
|
|
106
|
-
"command": "AI_TOOLKIT_HOOK_QUIET=1 \"$HOME/.softspark/ai-toolkit/hooks/user-prompt-submit.sh\""
|
|
106
|
+
"command": "AI_TOOLKIT_HOOK_QUIET=1 AI_TOOLKIT_HOOK_FORMAT=json \"$HOME/.softspark/ai-toolkit/hooks/user-prompt-submit.sh\""
|
|
107
107
|
}
|
|
108
108
|
]
|
|
109
109
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"last_run": "2026-05-
|
|
2
|
+
"last_run": "2026-05-25T11:12:53Z",
|
|
3
3
|
"schema_version": 1,
|
|
4
4
|
"tools": {
|
|
5
5
|
"aider": {
|
|
@@ -24,14 +24,21 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"augment": {
|
|
27
|
-
"docs_hash": "
|
|
27
|
+
"docs_hash": "2546ce56fc2d92e4",
|
|
28
28
|
"headings": [
|
|
29
|
+
"Admin",
|
|
30
|
+
"Auggie CLI",
|
|
29
31
|
"Code",
|
|
32
|
+
"Cosmos",
|
|
30
33
|
"Documentation Index",
|
|
34
|
+
"Getting Started",
|
|
31
35
|
"Introduction",
|
|
36
|
+
"Models & Pricing",
|
|
32
37
|
"On this page",
|
|
33
38
|
"Other automation",
|
|
39
|
+
"Other clients",
|
|
34
40
|
"Review",
|
|
41
|
+
"Troubleshooting",
|
|
35
42
|
"\u200bAuggie CLI",
|
|
36
43
|
"\u200bAutomate your SDLC",
|
|
37
44
|
"\u200bCosmos",
|
|
@@ -58,7 +65,7 @@
|
|
|
58
65
|
}
|
|
59
66
|
},
|
|
60
67
|
"claude-code": {
|
|
61
|
-
"docs_hash": "
|
|
68
|
+
"docs_hash": "78dbdbf9b1b09fe8",
|
|
62
69
|
"headings": [
|
|
63
70
|
"Documentation Index",
|
|
64
71
|
"On this page",
|
|
@@ -105,15 +112,20 @@
|
|
|
105
112
|
"slash command": true,
|
|
106
113
|
"sub-agent": true
|
|
107
114
|
},
|
|
108
|
-
"version": "2.1.
|
|
115
|
+
"version": "2.1.150 (Claude Code)"
|
|
109
116
|
},
|
|
110
117
|
"cline": {
|
|
111
|
-
"docs_hash": "
|
|
118
|
+
"docs_hash": "0d30b8f46cb45976",
|
|
112
119
|
"headings": [
|
|
113
120
|
"API Reference",
|
|
121
|
+
"Best Practices",
|
|
114
122
|
"CLI",
|
|
115
123
|
"Cline Overview",
|
|
124
|
+
"Configurations",
|
|
116
125
|
"Documentation Index",
|
|
126
|
+
"Features",
|
|
127
|
+
"Getting Started",
|
|
128
|
+
"IDE Specific Features",
|
|
117
129
|
"JetBrains Plugin",
|
|
118
130
|
"Kanban",
|
|
119
131
|
"Observability",
|
|
@@ -121,6 +133,8 @@
|
|
|
121
133
|
"SDK",
|
|
122
134
|
"Security & Governance",
|
|
123
135
|
"Team Management",
|
|
136
|
+
"Troubleshooting",
|
|
137
|
+
"Usage",
|
|
124
138
|
"VS Code Extension",
|
|
125
139
|
"\u200bAgent Core (SDK)",
|
|
126
140
|
"\u200bApplications",
|
|
@@ -142,7 +156,7 @@
|
|
|
142
156
|
}
|
|
143
157
|
},
|
|
144
158
|
"codex-cli": {
|
|
145
|
-
"docs_hash": "
|
|
159
|
+
"docs_hash": "8cad495445dd03e0",
|
|
146
160
|
"headings": [
|
|
147
161
|
"About",
|
|
148
162
|
"Contributing",
|
|
@@ -161,7 +175,7 @@
|
|
|
161
175
|
"Packages 0",
|
|
162
176
|
"Provide feedback",
|
|
163
177
|
"Quickstart",
|
|
164
|
-
"Releases
|
|
178
|
+
"Releases 799",
|
|
165
179
|
"Repository files navigation",
|
|
166
180
|
"Resources",
|
|
167
181
|
"Saved searches",
|
|
@@ -191,10 +205,10 @@
|
|
|
191
205
|
"mcp_servers": false,
|
|
192
206
|
"sandbox": true
|
|
193
207
|
},
|
|
194
|
-
"version": "codex-cli 0.
|
|
208
|
+
"version": "codex-cli 0.133.0"
|
|
195
209
|
},
|
|
196
210
|
"cursor": {
|
|
197
|
-
"docs_hash": "
|
|
211
|
+
"docs_hash": "56c9209877480e01",
|
|
198
212
|
"headings": [],
|
|
199
213
|
"markers": {
|
|
200
214
|
".cursor/rules": false,
|
|
@@ -210,7 +224,7 @@
|
|
|
210
224
|
}
|
|
211
225
|
},
|
|
212
226
|
"gemini-cli": {
|
|
213
|
-
"docs_hash": "
|
|
227
|
+
"docs_hash": "6a47f9b11ff1527d",
|
|
214
228
|
"headings": [
|
|
215
229
|
"Breadcrumbs",
|
|
216
230
|
"Directory actions",
|
|
@@ -249,7 +263,7 @@
|
|
|
249
263
|
}
|
|
250
264
|
},
|
|
251
265
|
"github-copilot": {
|
|
252
|
-
"docs_hash": "
|
|
266
|
+
"docs_hash": "a5b81592ca646743",
|
|
253
267
|
"headings": [
|
|
254
268
|
"About Copilot auto model selection",
|
|
255
269
|
"About Copilot integrations",
|
|
@@ -281,7 +295,7 @@
|
|
|
281
295
|
}
|
|
282
296
|
},
|
|
283
297
|
"google-antigravity": {
|
|
284
|
-
"docs_hash": "
|
|
298
|
+
"docs_hash": "6f089d2c7caabceb",
|
|
285
299
|
"headings": [],
|
|
286
300
|
"markers": {
|
|
287
301
|
"AGENTS.md": false,
|
|
@@ -297,7 +311,7 @@
|
|
|
297
311
|
}
|
|
298
312
|
},
|
|
299
313
|
"opencode": {
|
|
300
|
-
"docs_hash": "
|
|
314
|
+
"docs_hash": "74eb2d934df9b613",
|
|
301
315
|
"headings": [
|
|
302
316
|
"Add features",
|
|
303
317
|
"Ask questions",
|
|
@@ -357,18 +371,23 @@
|
|
|
357
371
|
}
|
|
358
372
|
},
|
|
359
373
|
"windsurf": {
|
|
360
|
-
"docs_hash": "
|
|
374
|
+
"docs_hash": "eddf51fabbcaa0a3",
|
|
361
375
|
"headings": [
|
|
376
|
+
"Accounts",
|
|
362
377
|
"Advanced",
|
|
378
|
+
"Agent Command Center",
|
|
363
379
|
"App Deploys",
|
|
364
380
|
"Cascade",
|
|
365
381
|
"Context Awareness",
|
|
366
382
|
"Documentation Index",
|
|
383
|
+
"Editor",
|
|
367
384
|
"MCP",
|
|
368
385
|
"Memories",
|
|
369
386
|
"On this page",
|
|
370
387
|
"Recommended Plugins",
|
|
388
|
+
"Security",
|
|
371
389
|
"Terminal",
|
|
390
|
+
"Troubleshooting",
|
|
372
391
|
"Usage",
|
|
373
392
|
"Welcome to Windsurf",
|
|
374
393
|
"Workflows",
|
|
@@ -390,11 +409,13 @@
|
|
|
390
409
|
"AGENTS.md": true,
|
|
391
410
|
"Cascade": true,
|
|
392
411
|
"MCP": true,
|
|
412
|
+
"SKILL.md": false,
|
|
393
413
|
"always_on": false,
|
|
394
414
|
"glob": true,
|
|
395
415
|
"hooks": true,
|
|
396
416
|
"memories": true,
|
|
397
417
|
"model_decision": false,
|
|
418
|
+
"skills": true,
|
|
398
419
|
"windsurfrules": false,
|
|
399
420
|
"workflows": true
|
|
400
421
|
}
|
|
@@ -3,9 +3,9 @@ title: "SOP: Claude Toolkit Maintenance"
|
|
|
3
3
|
category: procedures
|
|
4
4
|
service: ai-toolkit
|
|
5
5
|
tags: [sop, maintenance, agents, skills, install]
|
|
6
|
-
version: "3.0.
|
|
6
|
+
version: "3.0.1"
|
|
7
7
|
created: "2026-03-23"
|
|
8
|
-
last_updated: "2026-
|
|
8
|
+
last_updated: "2026-05-25"
|
|
9
9
|
description: "Standard operating procedures for installing, maintaining, and evolving the ai-toolkit."
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -34,7 +34,7 @@ ai-toolkit install --local --editors all # all supported editor
|
|
|
34
34
|
ai-toolkit install --local --editors cursor,aider # specific editors only
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Supported editors: `cursor`, `windsurf`, `cline`, `roo`, `aider`, `augment`, `copilot`, `antigravity`, `codex`.
|
|
37
|
+
Supported editors: `cursor`, `windsurf`, `cline`, `roo`, `aider`, `augment`, `copilot`, `antigravity`, `codex`, `gemini`, `opencode`.
|
|
38
38
|
|
|
39
39
|
To restrict which language rules are injected, use `--lang`:
|
|
40
40
|
|
|
@@ -202,6 +202,43 @@ Manual path:
|
|
|
202
202
|
|
|
203
203
|
Use `PreToolUse` for blocking validations, `PostToolUse` for non-blocking feedback, `UserPromptSubmit` for prompt governance, and `PreCompact` / `SessionEnd` for context preservation and handoff.
|
|
204
204
|
|
|
205
|
+
## Troubleshooting Rule Enforcement in Claude Code
|
|
206
|
+
|
|
207
|
+
Use this when Claude appears to ignore `CLAUDE.md`, `.claude/rules/*.md`, output styles, or search-first rules.
|
|
208
|
+
|
|
209
|
+
1. **Check current Claude docs first.** Confirm the live contract for memory, settings, output styles, and hooks:
|
|
210
|
+
- `https://code.claude.com/docs/en/memory`
|
|
211
|
+
- `https://code.claude.com/docs/en/settings`
|
|
212
|
+
- `https://code.claude.com/docs/en/output-styles`
|
|
213
|
+
- `https://code.claude.com/docs/en/hooks`
|
|
214
|
+
2. **Verify instruction loading.** Run `/memory` in Claude Code and confirm the expected `CLAUDE.md`, `CLAUDE.local.md`, and `.claude/rules/*.md` files are listed. Remember that Claude Code reads `CLAUDE.md`, not `AGENTS.md`, unless `CLAUDE.md` imports it.
|
|
215
|
+
3. **Verify the active output style.** Check `.claude/settings.local.json` or `/config`. Output style changes apply after `/clear` or a new session.
|
|
216
|
+
4. **Inspect installed hooks.** Ensure `~/.claude/settings.json` contains the ai-toolkit `UserPromptSubmit` and `Stop` entries. The governance hook must run with `AI_TOOLKIT_HOOK_QUIET=1 AI_TOOLKIT_HOOK_FORMAT=json` so it injects `additionalContext` without noisy transcript output.
|
|
217
|
+
5. **Reproduce the hook path directly.**
|
|
218
|
+
```bash
|
|
219
|
+
printf '{"session_id":"debug","prompt":"debug this technical rule issue"}' \
|
|
220
|
+
| AI_TOOLKIT_SEARCH_FIRST=strict AI_TOOLKIT_HOOK_QUIET=1 AI_TOOLKIT_HOOK_FORMAT=json \
|
|
221
|
+
~/.softspark/ai-toolkit/hooks/user-prompt-submit.sh
|
|
222
|
+
```
|
|
223
|
+
The output must be valid JSON with `hookSpecificOutput.additionalContext`.
|
|
224
|
+
6. **Check corrective enforcement.** If the assistant still skips required research, `stop-search-check.sh` should block Stop with the search-first message. If it does not, inspect `~/.softspark/ai-toolkit/state/search-required-*.flag` and the Codex/Claude transcript logs.
|
|
225
|
+
7. **Repair drift.** Run:
|
|
226
|
+
```bash
|
|
227
|
+
ai-toolkit update --only hooks
|
|
228
|
+
python3 scripts/ecosystem_doctor.py --tool claude-code --format text
|
|
229
|
+
scripts/validate.py
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
## Verification
|
|
233
|
+
|
|
234
|
+
After changing rule-enforcement behavior, run at minimum:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
bats tests/test_hooks.bats tests/test_search_first_flow.bats
|
|
238
|
+
bats tests/test_install.bats tests/test_codex.bats
|
|
239
|
+
python3 scripts/validate.py --strict
|
|
240
|
+
```
|
|
241
|
+
|
|
205
242
|
## Managing Plugins
|
|
206
243
|
|
|
207
244
|
```bash
|
|
@@ -105,11 +105,11 @@ Machine (global) Project (local)
|
|
|
105
105
|
**`ai-toolkit update`** — re-apply after `npm install -g @softspark/ai-toolkit@latest` or after `add-rule` / `remove-rule`. Same as `install` but semantically correct for update flows.
|
|
106
106
|
|
|
107
107
|
**`ai-toolkit install --local`** — run per project. Always installs Claude Code configs (CLAUDE.md, settings.local.json, constitution.md, language rules). Editor configs are opt-in via `--editors`:
|
|
108
|
-
- `--editors all` — install all
|
|
108
|
+
- `--editors all` — install all 11 editors (Cursor, Windsurf, Cline, Roo, Aider, Augment, Copilot, Antigravity, Codex, Gemini, opencode)
|
|
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`). 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`, `.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`.
|
|
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
|
|
|
@@ -3,7 +3,7 @@ title: "AI Toolkit - Codex CLI Compatibility"
|
|
|
3
3
|
category: reference
|
|
4
4
|
service: ai-toolkit
|
|
5
5
|
tags: [codex, compatibility, install, skills, hooks]
|
|
6
|
-
version: "1.0.
|
|
6
|
+
version: "1.0.2"
|
|
7
7
|
created: "2026-04-12"
|
|
8
8
|
last_updated: "2026-05-21"
|
|
9
9
|
description: "Reference for how ai-toolkit maps Claude-oriented skills, hooks, and plugin packs to Codex CLI."
|
|
@@ -110,10 +110,16 @@ This means Claude-only events such as `TaskCompleted`, `TeammateIdle`,
|
|
|
110
110
|
`~/.codex/hooks.json` (global layer). Non-Codex events are silently skipped.
|
|
111
111
|
`remove-hook` cleans both Claude and Codex targets.
|
|
112
112
|
|
|
113
|
-
Generated Codex hook commands include `AI_TOOLKIT_HOOK_QUIET=1`.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
Generated Codex hook commands include `AI_TOOLKIT_HOOK_QUIET=1`. The
|
|
114
|
+
`UserPromptSubmit` governance hook additionally sets `AI_TOOLKIT_HOOK_FORMAT=json`
|
|
115
|
+
so it can pass quiet `additionalContext` before the model responds. This keeps
|
|
116
|
+
non-blocking reminders and startup context out of visible hook output while
|
|
117
|
+
preserving hook side effects, proactive search-first context, and blocking
|
|
118
|
+
decisions such as search-first Stop enforcement.
|
|
119
|
+
|
|
120
|
+
Plain-text informational hook context is also silent by default in the shared
|
|
121
|
+
hook helper. Set `AI_TOOLKIT_HOOK_VERBOSE=1` only when debugging hook output
|
|
122
|
+
outside the Codex UI.
|
|
117
123
|
|
|
118
124
|
## Behavioral Limits
|
|
119
125
|
|
|
@@ -129,6 +135,8 @@ Known limits:
|
|
|
129
135
|
so `stop-search-check.sh` also checks `~/.codex/log/codex-tui.log` for
|
|
130
136
|
`smart_query`, `hybrid_search_kb`, `crag_search`, `multi_hop_search`, and
|
|
131
137
|
`verify_answer` calls after the search-first flag timestamp before blocking.
|
|
138
|
+
The scan is bounded to a recent log window, but sized to tolerate noisy Codex
|
|
139
|
+
skill-loader output between the search call and the Stop hook.
|
|
132
140
|
|
|
133
141
|
These are runtime platform limits, not installation defects.
|
|
134
142
|
|
|
@@ -60,10 +60,10 @@ The `--profile` flag controls how much of each editor's native surface is activa
|
|
|
60
60
|
`ai-toolkit install --editors <name>` can write global files only for editors
|
|
61
61
|
with documented, file-based config surfaces:
|
|
62
62
|
|
|
63
|
-
- `windsurf`: `~/.codeium/windsurf/memories/global_rules.md`
|
|
63
|
+
- `windsurf`: `~/.codeium/windsurf/memories/global_rules.md` plus `~/.codeium/windsurf/skills/ai-toolkit-skill-catalogue/SKILL.md`
|
|
64
64
|
- `gemini`: `~/.gemini/GEMINI.md`
|
|
65
65
|
- `augment`: `~/.augment/rules/ai-toolkit.md`
|
|
66
|
-
- `cline`:
|
|
66
|
+
- `cline`: `~/.cline/rules/ai-toolkit-*.md` plus `~/.cline/skills/ai-toolkit-skill-catalogue/SKILL.md`
|
|
67
67
|
- `roo`: `~/.roo/rules/ai-toolkit-*.md`
|
|
68
68
|
- `aider`: `~/.aider.conf.yml` plus `~/.aider-ai-toolkit-CONVENTIONS.md` when the YAML file does not already exist
|
|
69
69
|
- `codex`: `~/AGENTS.md`, `~/.agents/rules/*`, `~/.agents/skills/*`, `~/.codex/hooks.json`
|
|
@@ -3,9 +3,9 @@ title: "Hooks Catalog"
|
|
|
3
3
|
category: reference
|
|
4
4
|
service: ai-toolkit
|
|
5
5
|
tags: [hooks, quality, safety, enforcement, settings.json]
|
|
6
|
-
version: "1.5.
|
|
6
|
+
version: "1.5.5"
|
|
7
7
|
created: "2026-03-27"
|
|
8
|
-
last_updated: "2026-05-
|
|
8
|
+
last_updated: "2026-05-25"
|
|
9
9
|
description: "Complete reference of all ai-toolkit hooks: events, scripts, installation, and runtime behavior."
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -50,10 +50,10 @@ ai-toolkit update # re-copies scripts, re-merges (idempotent)
|
|
|
50
50
|
3. Loads session context from `.claude/session-context.md` (if exists)
|
|
51
51
|
4. Loads active instincts from `.claude/instincts/*.md` (if any)
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
By default the hook performs session-state reset, stale search-flag cleanup, and
|
|
54
|
+
update notification side effects without printing informational stdout. Set
|
|
55
|
+
`AI_TOOLKIT_HOOK_VERBOSE=1` to print the startup reminders and loaded context
|
|
56
|
+
for debugging; `AI_TOOLKIT_HOOK_QUIET=1` keeps it silent explicitly.
|
|
57
57
|
|
|
58
58
|
### Notification — `notify-waiting.sh`
|
|
59
59
|
|
|
@@ -107,12 +107,18 @@ context in the UI.
|
|
|
107
107
|
| Script | `~/.softspark/ai-toolkit/hooks/user-prompt-submit.sh` |
|
|
108
108
|
| Fires | Before Claude starts working on a submitted prompt |
|
|
109
109
|
|
|
110
|
-
**Action:**
|
|
110
|
+
**Action:** Maintains the per-session search-first flag used by Stop enforcement
|
|
111
|
+
and can provide a lightweight governance reminder: plan mode for architectural
|
|
112
|
+
work, evidence-first debugging, KB-first research, and validation expectations.
|
|
111
113
|
|
|
112
114
|
Skipped when `TOOLKIT_HOOK_PROFILE=minimal`. The bundled `app/hooks.json`
|
|
113
|
-
registers this command with `AI_TOOLKIT_HOOK_QUIET=1
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
registers this command with `AI_TOOLKIT_HOOK_QUIET=1 AI_TOOLKIT_HOOK_FORMAT=json`.
|
|
116
|
+
This keeps the hook visually quiet (`suppressOutput: true`) while still
|
|
117
|
+
injecting `hookSpecificOutput.additionalContext` before Claude starts working.
|
|
118
|
+
That context is the proactive half of search-first enforcement; the paired
|
|
119
|
+
`stop-search-check.sh` remains the corrective half. In plain-text mode,
|
|
120
|
+
informational reminders are silent by default and require
|
|
121
|
+
`AI_TOOLKIT_HOOK_VERBOSE=1`.
|
|
116
122
|
|
|
117
123
|
### UserPromptSubmit (usage tracking) — `track-usage.sh`
|
|
118
124
|
|
|
@@ -389,7 +395,7 @@ First-match-wins per file. Built-in runners: `bats`, `pytest`, `vitest`, `jest`.
|
|
|
389
395
|
| Script | `~/.softspark/ai-toolkit/hooks/search-tracker.sh` |
|
|
390
396
|
| Fires | After any search-style tool call |
|
|
391
397
|
|
|
392
|
-
**Action:** Clears `~/.softspark/ai-toolkit/state/search-required-<session_id>.flag` (per-session, keyed by `session_id` from the hook stdin payload, falling back to `transcript_path` basename, then `default`). Pairs with `user-prompt-submit.sh` (sets the flag on long technical prompts only when a search provider is detected or strict mode is enabled) and `stop-search-check.sh` (blocks Stop if the calling session's flag is still set). Search provider detection parses actual MCP server names from `mcpServers`, `mcp_servers`, or `mcp` config blocks; hook matchers and permission allowlists do not count as providers. Together the hooks enforce the global CLAUDE.md GOLDEN RULE without breaking offline/no-RAG installs and without cross-session interference when multiple Claude Code windows run in parallel.
|
|
398
|
+
**Action:** Clears `~/.softspark/ai-toolkit/state/search-required-<session_id>.flag` (per-session, keyed by `session_id` from the hook stdin payload, falling back to `transcript_path` basename, then `default`). Pairs with `user-prompt-submit.sh` (sets the flag on long technical prompts only when a search provider is detected or strict mode is enabled) and `stop-search-check.sh` (blocks Stop if the calling session's flag is still set). Search provider detection parses actual MCP server names from `mcpServers`, `mcp_servers`, or `mcp` config blocks; hook matchers and permission allowlists do not count as providers. Codex Stop enforcement also scans the recent `~/.codex/log/codex-tui.log` window for `ToolCall: mcp__...__smart_query` and `tool.name="smart_query"`-style entries because Codex MCP tool calls may not fire the shared `PostToolUse` tracker. Together the hooks enforce the global CLAUDE.md GOLDEN RULE without breaking offline/no-RAG installs and without cross-session interference when multiple Claude Code windows run in parallel.
|
|
393
399
|
|
|
394
400
|
Non-blocking (exit 0). Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
395
401
|
|
|
@@ -440,7 +446,7 @@ Non-blocking (exit 0). Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
|
440
446
|
| `scripts/test_cohesion.py` | Resolves changed paths → test commands via cohesion map. First-match-wins. Stdlib-only. |
|
|
441
447
|
| `app/hooks/test-cohesion-map.json` | Toolkit-default path → tests mapping (used when no project map exists). |
|
|
442
448
|
| `app/hooks/_locate-toolkit.sh` | Shared bash helper that exports `$TOOLKIT_DIR` for hooks needing scripts/. |
|
|
443
|
-
| `app/hooks/_hook-io.sh` | Shared bash helper that normalizes hook payloads across Claude, Augment, Gemini, Windsurf, and Cursor-style JSON.
|
|
449
|
+
| `app/hooks/_hook-io.sh` | Shared bash helper that normalizes hook payloads across Claude, Augment, Gemini, Windsurf, and Cursor-style JSON. JSON context output takes precedence over `AI_TOOLKIT_HOOK_QUIET=1`, so quiet hooks can still emit `additionalContext` with `suppressOutput: true`; plain-text output requires `AI_TOOLKIT_HOOK_VERBOSE=1`. |
|
|
444
450
|
| `app/hooks/_search-capability.sh` | Shared bash helper that enables search-first blocking only when RAG/Web is configured or strict mode is requested. |
|
|
445
451
|
|
|
446
452
|
## Runtime Profiles
|
|
@@ -457,10 +463,11 @@ Set in `.claude/settings.local.json`:
|
|
|
457
463
|
| `standard` | All hooks (default) |
|
|
458
464
|
| `strict` | Standard + mypy --strict on task completion |
|
|
459
465
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
466
|
+
Non-blocking informational context is silent in plain-text mode by default while
|
|
467
|
+
side effects and blocking decisions still run. Set `AI_TOOLKIT_HOOK_VERBOSE=1`
|
|
468
|
+
only when debugging hook context locally. `AI_TOOLKIT_HOOK_QUIET=1` keeps hook
|
|
469
|
+
commands explicitly silent, and Codex-generated hooks plus Claude's bundled
|
|
470
|
+
`UserPromptSubmit` entry use it to avoid visible prompt hook context.
|
|
464
471
|
|
|
465
472
|
## Architecture
|
|
466
473
|
|