@softspark/ai-toolkit 4.30.3 → 4.32.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 +123 -0
- package/README.md +32 -25
- package/app/.claude-plugin/plugin.json +1 -1
- package/app/agents/code-reviewer.md +14 -0
- package/app/agents/frontend-specialist.md +27 -24
- package/app/agents/infrastructure-validator.md +2 -2
- package/app/claude-app/hooks/hooks.json +4 -2
- package/app/claude-app/skills/ai-toolkit-rules/SKILL.md +74 -17
- package/app/hooks/quality-gate.sh +9 -2
- package/app/hooks.json +4 -2
- package/app/personas/frontend-lead.md +20 -12
- package/app/rules/claude-toolkit-rules.md +4 -1
- package/app/rules/common/git-team.md +33 -0
- package/app/rules/common/git-workflow.md +6 -20
- package/app/rules/common/performance.md +25 -1
- package/app/rules/common/testing.md +7 -1
- package/app/rules/edit-discipline.md +37 -0
- package/app/skills/app-builder/SKILL.md +37 -6
- package/app/skills/claude-toolkit-rules/SKILL.md +37 -0
- package/app/skills/design-engineering/SKILL.md +87 -102
- package/app/skills/design-engineering/reference/animation-recipes.md +67 -0
- package/app/skills/design-engineering/reference/component-craft.md +28 -0
- package/app/skills/documentation-standards/SKILL.md +1 -1
- package/app/skills/edit-discipline/SKILL.md +50 -0
- package/app/skills/git-conventions/SKILL.md +18 -0
- package/app/skills/output-mode/SKILL.md +41 -0
- package/app/skills/quality-gates/SKILL.md +23 -0
- package/app/skills/review/SKILL.md +10 -0
- package/benchmarks/ecosystem-doctor-snapshot.json +17 -15
- package/bin/ai-toolkit.js +2 -0
- package/kb/procedures/{ecosystem-sync-sop.md → sop-ecosystem-sync.md} +2 -2
- package/kb/procedures/{maintenance-sop.md → sop-maintenance.md} +6 -3
- package/kb/procedures/{post-release-testing-sop.md → sop-post-release-testing.md} +3 -3
- package/kb/procedures/sop-pre-commit.md +96 -0
- package/kb/procedures/{release-preparation-sop.md → sop-release.md} +6 -6
- package/kb/reference/architecture-overview.md +1 -1
- package/kb/reference/cli-reference.md +3 -2
- package/kb/reference/copilot-compatibility.md +1 -1
- package/kb/reference/global-install-model.md +16 -3
- package/kb/reference/hooks-catalog.md +5 -3
- package/kb/reference/language-rules.md +28 -10
- package/kb/reference/licensing.md +2 -2
- package/kb/reference/quick-wins-implementation-summary.md +1 -1
- package/kb/reference/supported-tools-registry.md +2 -2
- package/kb/reference/unique-features.md +2 -1
- package/kb/troubleshooting/plugin-double-load.md +1 -1
- package/llms-full.txt +1016 -871
- package/llms.txt +6 -5
- package/manifest.json +2 -2
- package/package.json +6 -2
- package/scripts/benchmark_ecosystem.py +0 -1
- package/scripts/check_split.py +11 -9
- package/scripts/claude_app.py +5 -7
- package/scripts/codex_skill_adapter.py +4 -12
- package/scripts/compile_slm.py +10 -26
- package/scripts/doctor.py +322 -0
- package/scripts/evaluate_skills.py +1 -1
- package/scripts/frontmatter.py +452 -29
- package/scripts/generate_augment_rules.py +4 -4
- package/scripts/generate_cursor_mdc.py +2 -3
- package/scripts/generate_language_rules_skills.py +8 -14
- package/scripts/generate_llms_txt.py +1 -15
- package/scripts/generate_opencode_agents.py +0 -1
- package/scripts/generate_opencode_skills.py +2 -20
- package/scripts/generate_toolkit_rules_skills.py +189 -0
- package/scripts/generate_windsurf_rules.py +0 -1
- package/scripts/generator_base.py +0 -1
- package/scripts/inject_hook_cli.py +15 -2
- package/scripts/inject_mcp_cli.py +1 -2
- package/scripts/install.py +32 -1
- package/scripts/install_git_hooks.py +0 -1
- package/scripts/install_steps/ai_tools.py +65 -25
- package/scripts/install_steps/markers.py +6 -6
- package/scripts/install_steps/skill_scope.py +188 -0
- package/scripts/instruction_core.py +5 -8
- package/scripts/merge-hooks.py +13 -3
- package/scripts/pack_codebase.py +1 -1
- package/scripts/surface_manifest.py +6 -7
- package/scripts/validate.py +181 -12
- /package/kb/procedures/{release-verification-sop.md → sop-release-verification.md} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: edit-discipline
|
|
3
|
+
description: "Change files with the edit and write tools, never by rewriting them through bash (sed, awk, tee, heredoc, redirection), and show `git diff` before reporting a file-changing task as done. Triggers: edit, write, modify, refactor, patch, fix, diff, review changes."
|
|
4
|
+
effort: low
|
|
5
|
+
user-invocable: false
|
|
6
|
+
allowed-tools: Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Edit Discipline
|
|
10
|
+
|
|
11
|
+
This rule comes from `app/rules/edit-discipline.md` in ai-toolkit. It applies to
|
|
12
|
+
every task in this workspace, not only when it is loaded.
|
|
13
|
+
|
|
14
|
+
# Edit Discipline & Reviewable Changes
|
|
15
|
+
|
|
16
|
+
## Edit files with the editing tools, not the shell
|
|
17
|
+
|
|
18
|
+
Use the `edit` and `write` tools to change a file. Do not rewrite tracked files
|
|
19
|
+
through `bash` with `sed`, `awk`, `tee`, a heredoc, or `>` redirection.
|
|
20
|
+
|
|
21
|
+
This is not a style preference. A shell rewrite is opaque to the host: the
|
|
22
|
+
session records a command, not a change. An `edit` call records which file
|
|
23
|
+
changed and how, so the interface can render it, a reviewer can read it, and a
|
|
24
|
+
later turn can cite it. A `sed` line records none of that, and the only way to
|
|
25
|
+
find out what happened is to read the file again.
|
|
26
|
+
|
|
27
|
+
The shell remains correct for what it is for: running builds, tests, linters,
|
|
28
|
+
git, package managers, and generators that own their own output.
|
|
29
|
+
|
|
30
|
+
## Show the change before calling the work done
|
|
31
|
+
|
|
32
|
+
Before reporting a file-changing task as finished, show what changed:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git diff -- <paths> # tracked files
|
|
36
|
+
git status --short # what is new or removed
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Paste the diff into the reply, or state precisely why it is too large and
|
|
40
|
+
summarise it by file with the counts. A task that reports success without
|
|
41
|
+
showing the change asks the reader to take the result on trust, and the reader
|
|
42
|
+
is the one who has to decide whether to commit it.
|
|
43
|
+
|
|
44
|
+
For an untracked file, show the content you wrote, not a description of it.
|
|
45
|
+
|
|
46
|
+
## Why both halves matter together
|
|
47
|
+
|
|
48
|
+
Editing through the tools makes a change *recordable*; showing the diff makes it
|
|
49
|
+
*reviewed*. Either alone leaves the person deciding whether to ship blind to
|
|
50
|
+
something they are accountable for.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-conventions
|
|
3
|
+
description: "Conventional Commits only (feat, fix, docs, refactor, test, chore); no AI co-authorship trailer and no AI signature in a commit message. Triggers: commit, git, message, changelog, release, pull request."
|
|
4
|
+
effort: low
|
|
5
|
+
user-invocable: false
|
|
6
|
+
allowed-tools: Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Git Conventions
|
|
10
|
+
|
|
11
|
+
This rule comes from `app/rules/git-conventions.md` in ai-toolkit. It applies to
|
|
12
|
+
every task in this workspace, not only when it is loaded.
|
|
13
|
+
|
|
14
|
+
# Git Conventions
|
|
15
|
+
|
|
16
|
+
- Do NOT add `Co-Authored-By: Claude` or any AI co-authorship to commits
|
|
17
|
+
- Do NOT add Claude signatures or attribution to commit messages
|
|
18
|
+
- Conventional commits format: `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: output-mode
|
|
3
|
+
description: "Answer concisely: lead with the result, no preamble, tables over prose, no trailing restatement of a diff the reader can already see. Triggers: response style, verbosity, summary, explanation, report."
|
|
4
|
+
effort: low
|
|
5
|
+
user-invocable: false
|
|
6
|
+
allowed-tools: Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Output Mode
|
|
10
|
+
|
|
11
|
+
This rule comes from `app/rules/output-mode.md` in ai-toolkit. It applies to
|
|
12
|
+
every task in this workspace, not only when it is loaded.
|
|
13
|
+
|
|
14
|
+
# Output Mode
|
|
15
|
+
|
|
16
|
+
`output-mode: concise`
|
|
17
|
+
|
|
18
|
+
Default response mode for this project is **concise**. The `brand-voice` skill (when present in ai-toolkit) auto-loads its `concise` rules; assistants without that skill should still apply the directives below.
|
|
19
|
+
|
|
20
|
+
## Concise Mode Directives
|
|
21
|
+
|
|
22
|
+
- **No preamble.** Skip "I'll now...", "Sure, let me...", "Great question!" and similar warm-ups. Start with the answer.
|
|
23
|
+
- **Lead with the result.** Conclusion or output first; explanation only if asked or non-obvious.
|
|
24
|
+
- **Max 3 sentences per closed question.** Yes/no, single-fact, or "where is X" answers stay under three sentences.
|
|
25
|
+
- **Tables and lists over prose** when comparing options, listing steps, or showing values.
|
|
26
|
+
- **No trailing summaries.** If the diff or output already shows what changed, do not restate it.
|
|
27
|
+
- **Drop filler adjectives.** No "nice", "great", "powerful", "robust" unless the user asked for evaluation.
|
|
28
|
+
- **Cite file paths as `path:line`** instead of paragraphs describing where things live.
|
|
29
|
+
- **Reserve longer prose** for: architecture proposals, trade-off analyses, plans with risks. Everything else: terse.
|
|
30
|
+
|
|
31
|
+
## When to escalate to verbose
|
|
32
|
+
|
|
33
|
+
- User explicitly asks: "explain in detail", "walk me through", "give me the full picture".
|
|
34
|
+
- Reporting a non-obvious failure mode where missing context would mislead.
|
|
35
|
+
- Architecture / RFC / ADR / trade-off documents — those have their own structure.
|
|
36
|
+
|
|
37
|
+
## How to override
|
|
38
|
+
|
|
39
|
+
- Per-session: `/brand-voice default` (or `/brand-voice strict` for even tighter)
|
|
40
|
+
- Per-project: change this rule's `output-mode:` value in the project's `CLAUDE.md`
|
|
41
|
+
- Permanent removal: re-run `ai-toolkit install --skip rules` or strip the `<!-- TOOLKIT:output-mode -->` block manually
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-gates
|
|
3
|
+
description: "Plan before work over an hour, and hold the gates: ruff clean, mypy --strict clean, pytest coverage above 70 percent, no secrets in code. Triggers: quality, lint, mypy, pytest, coverage, gate, definition of done."
|
|
4
|
+
effort: low
|
|
5
|
+
user-invocable: false
|
|
6
|
+
allowed-tools: Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Quality Gates
|
|
10
|
+
|
|
11
|
+
This rule comes from `app/rules/quality-gates.md` in ai-toolkit. It applies to
|
|
12
|
+
every task in this workspace, not only when it is loaded.
|
|
13
|
+
|
|
14
|
+
# Quality Gates & Mandatory Practices
|
|
15
|
+
|
|
16
|
+
## MANDATORY PRACTICES
|
|
17
|
+
1. **Plan First:** Tasks >1h require Plan, Success Criteria, and Pre-Mortem.
|
|
18
|
+
2. **Quality Gates:**
|
|
19
|
+
* `ruff check .` (0 errors)
|
|
20
|
+
* `mypy --strict src/` (0 errors)
|
|
21
|
+
* `pytest --cov=src` (>70% coverage)
|
|
22
|
+
* **Type Safety:** 100% public APIs, >60% internal.
|
|
23
|
+
3. **Security:** No secrets in code, sanitization, auth z/n.
|
|
@@ -146,6 +146,16 @@ After all reviewers complete:
|
|
|
146
146
|
- [ ] No memory leaks
|
|
147
147
|
- [ ] Optimized loops
|
|
148
148
|
|
|
149
|
+
### Frontend & UI Craft (Anti-Slop Gates)
|
|
150
|
+
- [ ] No gradient text headlines (`background-clip: text`) or saturated purple/blue hero washes
|
|
151
|
+
- [ ] No cliché 3-column card grids with icon-above-title tiles, card-in-card nesting, or side-stripe cards
|
|
152
|
+
- [ ] Interactive elements implement all 8 states (default, hover, focus-visible, active, disabled, loading, error, success)
|
|
153
|
+
- [ ] Input fields maintain constant 1px `border-width` across all states (zero layout shift) and reserve 2px transparent outline
|
|
154
|
+
- [ ] Mobile responsive: `overflow-x: clip` on `html` and `body`; no buttons/links wrapping to 2 lines; image grid tracks use `minmax(0, 1fr)`
|
|
155
|
+
- [ ] Typography: headings are roman (`font-style: normal`, no italic emphasis in headers); max 3 font families (2+1 rule)
|
|
156
|
+
- [ ] Content honesty: no invented metrics ("+47% conversion"), fake testimonials, or placeholder stock logos
|
|
157
|
+
- [ ] No fake re-drawn browser/OS chrome; no emoji used as load-bearing icons
|
|
158
|
+
|
|
149
159
|
### Testing
|
|
150
160
|
- [ ] Tests for new code
|
|
151
161
|
- [ ] Edge cases covered
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"last_run": "2026-09-
|
|
2
|
+
"last_run": "2026-09-04T08:36:45Z",
|
|
3
3
|
"schema_version": 1,
|
|
4
4
|
"tools": {
|
|
5
5
|
"aider": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"augment": {
|
|
27
|
-
"docs_hash": "
|
|
27
|
+
"docs_hash": "0e91c48495240138",
|
|
28
28
|
"headings": [
|
|
29
29
|
"Admin",
|
|
30
30
|
"Auggie CLI",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"claude-app": {
|
|
69
|
-
"docs_hash": "
|
|
69
|
+
"docs_hash": "4ba2582ffb78c262",
|
|
70
70
|
"headings": [
|
|
71
71
|
"Add global and folder instructions",
|
|
72
72
|
"Availability",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
"claude-code": {
|
|
111
|
-
"docs_hash": "
|
|
111
|
+
"docs_hash": "10fe9c9fa45efb7a",
|
|
112
112
|
"headings": [
|
|
113
113
|
"Core concepts",
|
|
114
114
|
"Documentation Index",
|
|
@@ -174,10 +174,10 @@
|
|
|
174
174
|
"userConfig": false,
|
|
175
175
|
"workflows": true
|
|
176
176
|
},
|
|
177
|
-
"version": "2.1.
|
|
177
|
+
"version": "2.1.260 (Claude Code)"
|
|
178
178
|
},
|
|
179
179
|
"cline": {
|
|
180
|
-
"docs_hash": "
|
|
180
|
+
"docs_hash": "53d71ba66743ef56",
|
|
181
181
|
"headings": [
|
|
182
182
|
"API Reference",
|
|
183
183
|
"Best Practices",
|
|
@@ -195,6 +195,7 @@
|
|
|
195
195
|
"Kanban",
|
|
196
196
|
"Observability",
|
|
197
197
|
"On this page",
|
|
198
|
+
"Resources",
|
|
198
199
|
"SDK",
|
|
199
200
|
"Security & Governance",
|
|
200
201
|
"Team Management",
|
|
@@ -224,7 +225,7 @@
|
|
|
224
225
|
}
|
|
225
226
|
},
|
|
226
227
|
"codex-cli": {
|
|
227
|
-
"docs_hash": "
|
|
228
|
+
"docs_hash": "5444e9c3b6b4d284",
|
|
228
229
|
"headings": [
|
|
229
230
|
"API",
|
|
230
231
|
"API Reference",
|
|
@@ -241,6 +242,7 @@
|
|
|
241
242
|
"Build with Codex",
|
|
242
243
|
"Capabilities",
|
|
243
244
|
"Categories",
|
|
245
|
+
"ChatGPT Work",
|
|
244
246
|
"ChatGPT web",
|
|
245
247
|
"ChatKit",
|
|
246
248
|
"Choose a model",
|
|
@@ -363,10 +365,10 @@
|
|
|
363
365
|
"plugin marketplace": false,
|
|
364
366
|
"sandbox": true
|
|
365
367
|
},
|
|
366
|
-
"version": "codex-cli 0.
|
|
368
|
+
"version": "codex-cli 0.153.2"
|
|
367
369
|
},
|
|
368
370
|
"cursor": {
|
|
369
|
-
"docs_hash": "
|
|
371
|
+
"docs_hash": "328f32fe1afe3e7e",
|
|
370
372
|
"headings": [
|
|
371
373
|
"Agent",
|
|
372
374
|
"CLI",
|
|
@@ -399,7 +401,7 @@
|
|
|
399
401
|
}
|
|
400
402
|
},
|
|
401
403
|
"dsh": {
|
|
402
|
-
"docs_hash": "
|
|
404
|
+
"docs_hash": "217350a932acc7fb",
|
|
403
405
|
"headings": [],
|
|
404
406
|
"markers": {
|
|
405
407
|
"Agent Preset": false,
|
|
@@ -410,7 +412,7 @@
|
|
|
410
412
|
}
|
|
411
413
|
},
|
|
412
414
|
"gemini-cli": {
|
|
413
|
-
"docs_hash": "
|
|
415
|
+
"docs_hash": "b78dde41b3161819",
|
|
414
416
|
"headings": [
|
|
415
417
|
"Breadcrumbs",
|
|
416
418
|
"Directory actions",
|
|
@@ -451,7 +453,7 @@
|
|
|
451
453
|
"version": "0.57.0"
|
|
452
454
|
},
|
|
453
455
|
"github-copilot": {
|
|
454
|
-
"docs_hash": "
|
|
456
|
+
"docs_hash": "606c4417d0acebed",
|
|
455
457
|
"headings": [
|
|
456
458
|
"About Copilot auto model selection",
|
|
457
459
|
"About Copilot automations",
|
|
@@ -488,7 +490,7 @@
|
|
|
488
490
|
}
|
|
489
491
|
},
|
|
490
492
|
"google-antigravity": {
|
|
491
|
-
"docs_hash": "
|
|
493
|
+
"docs_hash": "8cbf9aaffb6b57bf",
|
|
492
494
|
"headings": [],
|
|
493
495
|
"markers": {
|
|
494
496
|
"AGENTS.md": false,
|
|
@@ -515,7 +517,7 @@
|
|
|
515
517
|
}
|
|
516
518
|
},
|
|
517
519
|
"opencode": {
|
|
518
|
-
"docs_hash": "
|
|
520
|
+
"docs_hash": "4dac69e305e60373",
|
|
519
521
|
"headings": [
|
|
520
522
|
"Add features",
|
|
521
523
|
"Ask questions",
|
|
@@ -577,7 +579,7 @@
|
|
|
577
579
|
}
|
|
578
580
|
},
|
|
579
581
|
"windsurf": {
|
|
580
|
-
"docs_hash": "
|
|
582
|
+
"docs_hash": "121e915ebbd89355",
|
|
581
583
|
"headings": [
|
|
582
584
|
"Accounts",
|
|
583
585
|
"Advanced",
|
package/bin/ai-toolkit.js
CHANGED
|
@@ -311,6 +311,8 @@ function showHelp() {
|
|
|
311
311
|
console.log(' dsh (explicit project target; requires --local; excluded from "all")');
|
|
312
312
|
console.log(' Default with --local: auto-detect from existing project files');
|
|
313
313
|
console.log(' --auto-detect Detect project languages and install matching rule modules');
|
|
314
|
+
console.log(' --language-skills <s> detected (default): turn off <lang>-rules/<lang>-patterns skills for languages');
|
|
315
|
+
console.log(' no registered project uses (skillOverrides, reversible); all: keep every language skill on');
|
|
314
316
|
console.log(' --list, --dry-run Dry-run: show what would be applied');
|
|
315
317
|
console.log('\nOptions for create:');
|
|
316
318
|
console.log(' skill <name> --template=<type> Scaffold skill (types: linter, reviewer, generator, workflow, knowledge)');
|
|
@@ -253,5 +253,5 @@ jobs:
|
|
|
253
253
|
|
|
254
254
|
- [Supported Tools Registry](../reference/supported-tools-registry.md) — human-readable per-tool breakdown
|
|
255
255
|
- [MCP Editor Compatibility](../reference/mcp-editor-compatibility.md) — MCP-specific adapter table
|
|
256
|
-
- [Maintenance SOP](maintenance
|
|
257
|
-
- [Release Preparation SOP](release
|
|
256
|
+
- [Maintenance SOP](sop-maintenance.md) — general toolkit upkeep
|
|
257
|
+
- [Release Preparation SOP](sop-release.md) — run the doctor before tagging
|
|
@@ -3,9 +3,9 @@ title: "SOP: AI Toolkit Maintenance"
|
|
|
3
3
|
category: procedures
|
|
4
4
|
service: ai-toolkit
|
|
5
5
|
tags: [sop, maintenance, agents, skills, install]
|
|
6
|
-
version: "3.
|
|
6
|
+
version: "3.5.0"
|
|
7
7
|
created: "2026-03-23"
|
|
8
|
-
last_updated: "2026-
|
|
8
|
+
last_updated: "2026-09-04"
|
|
9
9
|
description: "Standard operating procedures for installing, maintaining, and evolving the ai-toolkit."
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -229,7 +229,9 @@ that runtime should receive the change.
|
|
|
229
229
|
greets the user with a traceback, and one that reads stdin must answer an
|
|
230
230
|
empty stdin with an error rather than blocking forever.
|
|
231
231
|
3. Update `kb/reference/skills-catalog.md` and `app/ARCHITECTURE.md`
|
|
232
|
-
4. Run `scripts/validate.py` — it checks the invocation, the body budget,
|
|
232
|
+
4. Run `scripts/validate.py` — it checks the invocation, the body budget, the
|
|
233
|
+
description budget (warn over 400 characters, error over 1024; unquoted
|
|
234
|
+
descriptions containing `: ` or ` #` are rejected, use `>-`), and
|
|
233
235
|
`reference/` link resolution
|
|
234
236
|
5. Run `python3 scripts/surface_manifest.py` before the next release to adopt the
|
|
235
237
|
new skill into the protected surface
|
|
@@ -305,6 +307,7 @@ bats tests/test_install.bats tests/test_codex.bats
|
|
|
305
307
|
bats tests/test_claude_app.bats tests/test_hooks_per_editor.bats
|
|
306
308
|
python3 scripts/claude_app.py verify
|
|
307
309
|
python3 scripts/validate.py --strict
|
|
310
|
+
npm run test:py # pytest over scripts/ logic incl. the frontmatter corpus test (dev venv, see CONTRIBUTING.md)
|
|
308
311
|
```
|
|
309
312
|
|
|
310
313
|
## Managing Plugins
|
|
@@ -16,7 +16,7 @@ actually install, from npm, rather than the working tree.
|
|
|
16
16
|
|
|
17
17
|
Sibling procedures exist for `jira-mcp` and `legal-pl-pack`; this is the
|
|
18
18
|
ai-toolkit equivalent. It complements
|
|
19
|
-
[Release Verification](release-verification
|
|
19
|
+
[Release Verification](sop-release-verification.md), which checks the toolkit
|
|
20
20
|
from the maintainer's own installed copy. The difference that matters: this one
|
|
21
21
|
never writes to the maintainer's `~/.claude` or `~/.softspark`.
|
|
22
22
|
|
|
@@ -310,6 +310,6 @@ print(f'removed {sb} ({n} files)')
|
|
|
310
310
|
|
|
311
311
|
## Related
|
|
312
312
|
|
|
313
|
-
- [Release Preparation](release
|
|
314
|
-
- [Release Verification](release-verification
|
|
313
|
+
- [Release Preparation](sop-release.md) — run before tagging
|
|
314
|
+
- [Release Verification](sop-release-verification.md) — the maintainer-install checks
|
|
315
315
|
- [rtk-pack Retirement](../history/completed/rtk-pack-retirement-20260727.md) — what happened the one time this SOP was written and not run
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "SOP: Pre-Commit Gate"
|
|
3
|
+
category: procedures
|
|
4
|
+
service: ai-toolkit
|
|
5
|
+
tags: [pre-commit, quality-gate, shellcheck, bats, validation, secrets]
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
created: "2026-09-02"
|
|
8
|
+
last_updated: "2026-09-02"
|
|
9
|
+
description: "The local gate to run before every commit to ai-toolkit: staged-file and secret scan, ShellCheck, Python syntax, toolkit validation, and the Bats suite. Runs the same checks CI runs, so main does not go red after a push."
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# SOP: Pre-Commit Gate
|
|
13
|
+
|
|
14
|
+
## Why this exists
|
|
15
|
+
|
|
16
|
+
CI runs on `main` and on pull requests, but it runs *after* the push. Every
|
|
17
|
+
check below already exists in `.github/workflows/ci.yml`; running them locally
|
|
18
|
+
first is what keeps `main` green and keeps a release from becoming a debug
|
|
19
|
+
session. The v4.5.1 postmortem in `sop-release.md` is the case
|
|
20
|
+
where a hook lint failure published while reddening `main` CI.
|
|
21
|
+
|
|
22
|
+
This gate is not a substitute for `sop-release.md`. That SOP gates
|
|
23
|
+
a *tag*; this one gates a *commit*.
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
`shellcheck`, `python3` and `bats` must be on `PATH`. The suite is the one
|
|
28
|
+
check that silently does nothing when its runner is absent, so install it
|
|
29
|
+
before relying on this gate:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
brew install bats-core shellcheck # macOS
|
|
33
|
+
sudo apt-get install -y bats shellcheck # Debian / Ubuntu
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## The gate
|
|
37
|
+
|
|
38
|
+
Run all five from the repository root. Each mirrors a CI job.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# 1. Staged files: secrets, large blobs, commit-type suggestion
|
|
42
|
+
python3 app/skills/commit/scripts/pre-commit-check.py
|
|
43
|
+
|
|
44
|
+
# 2. ShellCheck hooks -- the CI job that has published while red before
|
|
45
|
+
shellcheck --severity=warning app/hooks/*.sh app/plugins/*/hooks/*.sh
|
|
46
|
+
|
|
47
|
+
# 3. Python syntax across every script the toolkit ships
|
|
48
|
+
python3 -m py_compile scripts/*.py app/skills/*/scripts/*.py
|
|
49
|
+
|
|
50
|
+
# 4. Toolkit integrity: agents, skills, registry drift, content quality
|
|
51
|
+
npm run validate
|
|
52
|
+
|
|
53
|
+
# 5. The suite. Run it ONCE -- see the single-run discipline below
|
|
54
|
+
npm test
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
A non-zero exit from any of them is a stop, not a warning to note and push past.
|
|
58
|
+
|
|
59
|
+
## Single-run discipline
|
|
60
|
+
|
|
61
|
+
`npm test` runs the Bats suite with `--jobs 4`. Running it repeatedly to see
|
|
62
|
+
whether a failure is "flaky" hides real ordering bugs and wastes minutes. Run
|
|
63
|
+
it once. If it fails, read the failure and fix the cause; if the same test
|
|
64
|
+
passes on a re-run without a code change, that instability is itself the bug
|
|
65
|
+
and belongs in an issue, not in a retry.
|
|
66
|
+
|
|
67
|
+
## What this gate does not cover
|
|
68
|
+
|
|
69
|
+
- **Cross-platform.** The suite here runs on your machine only. Both
|
|
70
|
+
`ubuntu-latest` and `macos-latest` must be green before a tag; that gate
|
|
71
|
+
lives in `sop-release.md`, Phase 7, and is bound to the exact
|
|
72
|
+
release commit.
|
|
73
|
+
- **Required files.** The `required-files` CI job checks that every file the
|
|
74
|
+
module template mandates is present and that the version is in sync across
|
|
75
|
+
all four manifests. It is cheap and runs on every push.
|
|
76
|
+
- **Provenance and SARIF.** Release-time concerns; see
|
|
77
|
+
`sop-release.md`.
|
|
78
|
+
|
|
79
|
+
## Commit message
|
|
80
|
+
|
|
81
|
+
Conventional Commits, and no AI co-authorship trailer:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
feat(scope): summary in the imperative
|
|
85
|
+
fix(scope): summary in the imperative
|
|
86
|
+
docs|refactor|test|chore(scope): ...
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`pre-commit-check.py` suggests a type from the staged paths. It is a
|
|
90
|
+
suggestion; the scope and the summary are yours.
|
|
91
|
+
|
|
92
|
+
## Related
|
|
93
|
+
|
|
94
|
+
- `sop-release.md` -- the pre-tag gate, including cross-platform CI
|
|
95
|
+
- `sop-post-release-testing.md` -- what to verify after a release ships
|
|
96
|
+
- `sop-release-verification.md` -- end-to-end smoke test of an installed build
|
|
@@ -13,7 +13,7 @@ description: "Step-by-step checklist for preparing a new ai-toolkit release —
|
|
|
13
13
|
|
|
14
14
|
Complete checklist for preparing a new `@softspark/ai-toolkit` release.
|
|
15
15
|
Run this **before** tagging. After tagging and publishing, run the
|
|
16
|
-
[Release Verification SOP](release-verification
|
|
16
|
+
[Release Verification SOP](sop-release-verification.md) to smoke-test.
|
|
17
17
|
|
|
18
18
|
**Pipeline:**
|
|
19
19
|
```
|
|
@@ -32,10 +32,10 @@ git tag → CI publish → Release Verification SOP
|
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
# 0. Ecosystem sync (mandatory for minor/major releases; optional for patch)
|
|
35
|
-
# Full procedure: kb/procedures/ecosystem-sync
|
|
35
|
+
# Full procedure: kb/procedures/sop-ecosystem-sync.md
|
|
36
36
|
python3 scripts/ecosystem_doctor.py --format text > /tmp/eco-report.txt
|
|
37
37
|
cat /tmp/eco-report.txt
|
|
38
|
-
# If drift detected: stop here, follow ecosystem-sync
|
|
38
|
+
# If drift detected: stop here, follow sop-ecosystem-sync.md Phase 2-4 to
|
|
39
39
|
# classify each drift (A-F), update generators as needed, refresh snapshot,
|
|
40
40
|
# THEN resume this SOP.
|
|
41
41
|
python3 scripts/ecosystem_doctor.py --update # after all drift resolved
|
|
@@ -126,7 +126,7 @@ Output classifies every registered tool as **Clean**, **Drift**, or **Errored**.
|
|
|
126
126
|
|
|
127
127
|
### 0.2 Act on drift
|
|
128
128
|
|
|
129
|
-
For each drifting tool, follow [ecosystem-sync
|
|
129
|
+
For each drifting tool, follow [sop-ecosystem-sync.md](sop-ecosystem-sync.md) Phase 2-4:
|
|
130
130
|
|
|
131
131
|
| Drift class | Release impact |
|
|
132
132
|
|-------------|----------------|
|
|
@@ -195,7 +195,7 @@ The canonical version lives in `package.json`. These files **must** match:
|
|
|
195
195
|
|
|
196
196
|
| File | Field | When to update |
|
|
197
197
|
|------|-------|---------------|
|
|
198
|
-
| `kb/procedures/maintenance
|
|
198
|
+
| `kb/procedures/sop-maintenance.md` | frontmatter `version:` | If SOP content changed |
|
|
199
199
|
| `kb/reference/skills-catalog.md` | frontmatter `version:` | If skills added/removed |
|
|
200
200
|
| `kb/reference/agents-catalog.md` | frontmatter `version:` | If agents added/removed |
|
|
201
201
|
| `kb/reference/hooks-catalog.md` | frontmatter `version:` | If hooks changed |
|
|
@@ -591,7 +591,7 @@ This triggers `.github/workflows/publish.yml` which:
|
|
|
591
591
|
|
|
592
592
|
**Provenance is non-negotiable.** If `id-token: write` permission or the `--provenance` flag is missing from `publish.yml`, fix it BEFORE tagging — an unsigned release is a regression against the v2.8.0 standard.
|
|
593
593
|
|
|
594
|
-
**After CI completes:** Run the [Release Verification SOP](release-verification
|
|
594
|
+
**After CI completes:** Run the [Release Verification SOP](sop-release-verification.md)
|
|
595
595
|
to smoke-test the published package AND verify the provenance attestation landed on npm.
|
|
596
596
|
|
|
597
597
|
---
|
|
@@ -228,7 +228,7 @@ Three tiers determine how to approach a task:
|
|
|
228
228
|
|------|-------|-----------|-------|
|
|
229
229
|
| Task | `disable-model-invocation: true` | User via `/skill` only | 32 |
|
|
230
230
|
| Hybrid | (neither) | User via `/skill` + agent knowledge | 31 |
|
|
231
|
-
| Knowledge | `user-invocable: false` | Claude auto-loads |
|
|
231
|
+
| Knowledge | `user-invocable: false` | Claude auto-loads | 51 |
|
|
232
232
|
|
|
233
233
|
## Multi-Agent Execution
|
|
234
234
|
|
|
@@ -4,7 +4,7 @@ category: reference
|
|
|
4
4
|
service: ai-toolkit
|
|
5
5
|
tags: [cli, commands, reference, install, update, plugin, mcp, telemetry]
|
|
6
6
|
created: "2026-04-13"
|
|
7
|
-
last_updated: "2026-
|
|
7
|
+
last_updated: "2026-09-04"
|
|
8
8
|
description: "Complete CLI reference for all ai-toolkit commands, options, and flags."
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -19,6 +19,7 @@ Usage: ai-toolkit <command> [options]
|
|
|
19
19
|
| Command | Description |
|
|
20
20
|
|---------|-------------|
|
|
21
21
|
| `install` | First-time global install into `~/.claude/` + Cursor, Windsurf, Gemini |
|
|
22
|
+
| `install --language-skills detected\|all` | `detected` (default): turn off `<lang>-rules`/`<lang>-patterns` skills for languages no registered project uses, via `skillOverrides` in `~/.claude/settings.json` (entries are tracked in `state.json` and restored when a project brings the language back; a user's own override is never touched); `all`: keep every language skill on. The choice persists across `install`/`update` |
|
|
22
23
|
| `install --local` | Claude Code configs only; add `--editors all` or `--editors cursor,aider` for other tools |
|
|
23
24
|
| `update` | Re-apply toolkit after `npm install -g @softspark/ai-toolkit@latest` |
|
|
24
25
|
| `update --local` | Re-apply + auto-detect editors from existing project files |
|
|
@@ -26,7 +27,7 @@ Usage: ai-toolkit <command> [options]
|
|
|
26
27
|
| `status` | Show installed modules and version |
|
|
27
28
|
| `uninstall` | Remove toolkit from `~/.claude/` |
|
|
28
29
|
| `validate` | Verify toolkit integrity (`--strict` for CI-grade, warnings = errors) |
|
|
29
|
-
| `doctor` | Diagnose install health, hooks, quick-win assets,
|
|
30
|
+
| `doctor` | Diagnose install health, hooks, quick-win assets, artifact drift, context budget (est. resident tokens of the skill/agent listings and user rules, plus skills with zero recorded use; read-only, prints the `skillOverrides` key to paste), and permission rules (`permissions.allow` wildcards on interpreters, task runners, package installs, `gh api`, `curl`, `git fetch`, destructive commands; warns only, never edits) |
|
|
30
31
|
| `doctor --fix` | Auto-repair broken symlinks, missing hooks, stale artifacts |
|
|
31
32
|
| `eject [dir]` | Export standalone config (no symlinks, no toolkit dependency) |
|
|
32
33
|
| `claude-app export [--output FILE] [--no-custom-rules] [--verify]` | Build an uploadable Claude Chat/Desktop/Cowork plugin ZIP and global-instructions file |
|
|
@@ -159,7 +159,7 @@ running the generators directly:
|
|
|
159
159
|
|
|
160
160
|
- `scripts/generate_copilot.py` / `generate_copilot_hooks.py` contract tests
|
|
161
161
|
(`tests/test_copilot.bats`, `tests/test_copilot_hooks.bats`).
|
|
162
|
-
- Release layout check in `kb/procedures/release-verification
|
|
162
|
+
- Release layout check in `kb/procedures/sop-release-verification.md` asserts the
|
|
163
163
|
`.github/{agents,skills,instructions,prompts,hooks}` surfaces.
|
|
164
164
|
- `validate.py --strict` + `audit_skills.py --ci` in CI.
|
|
165
165
|
|
|
@@ -3,9 +3,9 @@ title: "Global Install Model"
|
|
|
3
3
|
category: reference
|
|
4
4
|
service: ai-toolkit
|
|
5
5
|
tags: [install, global, claude, codex, plugins, local-setup]
|
|
6
|
-
version: "3.
|
|
6
|
+
version: "3.5.0"
|
|
7
7
|
created: "2026-03-26"
|
|
8
|
-
last_updated: "2026-
|
|
8
|
+
last_updated: "2026-09-04"
|
|
9
9
|
description: "Reference description of Claude Code global install, Claude app plugin export, project-local editor setup, global Codex plugin layering, and command responsibilities in ai-toolkit."
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -17,6 +17,19 @@ description: "Reference description of Claude Code global install, Claude app pl
|
|
|
17
17
|
|
|
18
18
|
That means one machine-level install provides agents, skills, hooks, constitution, and rule files to every project without committing toolkit boilerplate into each repository.
|
|
19
19
|
|
|
20
|
+
Language knowledge skills are the one part of the global install that is
|
|
21
|
+
scoped by evidence (v4.32.0). Every `<lang>-rules` / `<lang>-patterns` skill is
|
|
22
|
+
still symlinked, but `install` and `update` read the languages detected across
|
|
23
|
+
the projects registered in `projects.json` and set `skillOverrides: off` in
|
|
24
|
+
`~/.claude/settings.json` for the others, so their descriptions stop loading
|
|
25
|
+
into every session. The entries the toolkit wrote are listed in `state.json`
|
|
26
|
+
under `managed_skill_overrides`; only those are ever removed again (when a
|
|
27
|
+
newly registered project brings the language back), a user's own override is
|
|
28
|
+
left alone. With no registered project on disk nothing is disabled.
|
|
29
|
+
`--language-skills all` restores everything and persists the choice
|
|
30
|
+
(`language_skill_scope` in `state.json`); `ai-toolkit doctor` reports the
|
|
31
|
+
resulting listing size and zero-use skills.
|
|
32
|
+
|
|
20
33
|
Other editor targets are opt-in and only use documented file surfaces. Cursor
|
|
21
34
|
rules stay project-local because Cursor's global user rules are managed through
|
|
22
35
|
the settings UI, not a stable merge-safe file. Codex supports both project and
|
|
@@ -59,7 +72,7 @@ The `--profile` flag controls how much of each editor's native surface is activa
|
|
|
59
72
|
|---------|-----------|----------|
|
|
60
73
|
| `minimal` | Smallest editor surface. Copilot still receives its root instructions, native agents, and self-contained skills; Codex still receives instructions, agents, skills, and native safety hooks. | You want the smallest supported footprint. |
|
|
61
74
|
| `standard` (default) | Claude Code + editor rule files. Includes Gemini and Antigravity hooks plus native Copilot instructions, agents, portable skills, and hooks. | Day-to-day installs. Most users. |
|
|
62
|
-
| `strict` | Everything in `standard` plus git-hook wiring for commit-time safety checks
|
|
75
|
+
| `strict` | Everything in `standard` plus git-hook wiring for commit-time safety checks and the `git-team` common rule (feature branches, PR size, required approval, review SLA). | Tight team with zero tolerance for drift. A solo maintainer releasing straight to `main` wants `standard`, which keeps the solo-safe `git-workflow` core only. |
|
|
63
76
|
| `full` | Every native surface across every editor: hooks, sub-agents, custom commands, skill pointers for Cursor / Windsurf / Gemini / Augment / Antigravity. | You want maximum coverage and understand that each editor will carry generated files under its own layout. |
|
|
64
77
|
|
|
65
78
|
Codex installs materialize the full skill catalog under `.agents/skills/`
|
|
@@ -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.
|
|
6
|
+
version: "1.12.0"
|
|
7
7
|
created: "2026-03-27"
|
|
8
|
-
last_updated: "2026-
|
|
8
|
+
last_updated: "2026-09-04"
|
|
9
9
|
description: "Complete reference of all ai-toolkit hooks: events, scripts, installation, and runtime behavior."
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -190,6 +190,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
|
190
190
|
| Matcher | *(all)* |
|
|
191
191
|
| Script | `~/.softspark/ai-toolkit/hooks/quality-check.sh` |
|
|
192
192
|
| Fires | After every Claude response |
|
|
193
|
+
| Mode | Background (`"async": true`). The linter (`npx tsc`, `ruff`) was the bulk of a 3.3 s median Stop chain; its output is advisory and reaches you when it finishes instead of holding the turn open |
|
|
193
194
|
|
|
194
195
|
**Action:** Runs language-appropriate linter:
|
|
195
196
|
- Python: `ruff check .`
|
|
@@ -208,6 +209,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
|
208
209
|
| Matcher | *(all)* |
|
|
209
210
|
| Script | `~/.softspark/ai-toolkit/hooks/save-session.sh` |
|
|
210
211
|
| Fires | After every Claude response |
|
|
212
|
+
| Mode | Background (`"async": true`): writes a file and exits 0, nothing to wait for |
|
|
211
213
|
|
|
212
214
|
**Action:** Writes enriched session context to the per-repo session store (`~/.softspark/ai-toolkit/sessions/<repo-key>/session-context.md`) for cross-session persistence. Captures:
|
|
213
215
|
- Session ID and last assistant message (first 5 lines)
|
|
@@ -225,7 +227,7 @@ Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
|
225
227
|
| Script | `~/.softspark/ai-toolkit/hooks/quality-gate.sh` |
|
|
226
228
|
| Fires | Before Claude is allowed to finish a response |
|
|
227
229
|
|
|
228
|
-
**Action:** Runs lint/typecheck. **Blocks stopping (exit 2)** if errors found, so Claude must continue and fix the issues. Missing local tooling is reported as skipped rather than blocking the session.
|
|
230
|
+
**Action:** Runs lint/typecheck. **Blocks stopping (exit 2)** if errors found, so Claude must continue and fix the issues. Missing local tooling is reported as skipped rather than blocking the session. Ruff runs only when the project configured it (`ruff.toml`, `.ruff.toml`, or a `[tool.ruff]` table in `pyproject.toml`); a `pyproject.toml` that only carries build or pytest/mypy metadata does not trigger `ruff check .` under whatever configuration the machine resolves (v4.32.0).
|
|
229
231
|
|
|
230
232
|
Skipped when `TOOLKIT_HOOK_PROFILE=minimal`.
|
|
231
233
|
|