@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.
Files changed (80) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/README.md +32 -25
  3. package/app/.claude-plugin/plugin.json +1 -1
  4. package/app/agents/code-reviewer.md +14 -0
  5. package/app/agents/frontend-specialist.md +27 -24
  6. package/app/agents/infrastructure-validator.md +2 -2
  7. package/app/claude-app/hooks/hooks.json +4 -2
  8. package/app/claude-app/skills/ai-toolkit-rules/SKILL.md +74 -17
  9. package/app/hooks/quality-gate.sh +9 -2
  10. package/app/hooks.json +4 -2
  11. package/app/personas/frontend-lead.md +20 -12
  12. package/app/rules/claude-toolkit-rules.md +4 -1
  13. package/app/rules/common/git-team.md +33 -0
  14. package/app/rules/common/git-workflow.md +6 -20
  15. package/app/rules/common/performance.md +25 -1
  16. package/app/rules/common/testing.md +7 -1
  17. package/app/rules/edit-discipline.md +37 -0
  18. package/app/skills/app-builder/SKILL.md +37 -6
  19. package/app/skills/claude-toolkit-rules/SKILL.md +37 -0
  20. package/app/skills/design-engineering/SKILL.md +87 -102
  21. package/app/skills/design-engineering/reference/animation-recipes.md +67 -0
  22. package/app/skills/design-engineering/reference/component-craft.md +28 -0
  23. package/app/skills/documentation-standards/SKILL.md +1 -1
  24. package/app/skills/edit-discipline/SKILL.md +50 -0
  25. package/app/skills/git-conventions/SKILL.md +18 -0
  26. package/app/skills/output-mode/SKILL.md +41 -0
  27. package/app/skills/quality-gates/SKILL.md +23 -0
  28. package/app/skills/review/SKILL.md +10 -0
  29. package/benchmarks/ecosystem-doctor-snapshot.json +17 -15
  30. package/bin/ai-toolkit.js +2 -0
  31. package/kb/procedures/{ecosystem-sync-sop.md → sop-ecosystem-sync.md} +2 -2
  32. package/kb/procedures/{maintenance-sop.md → sop-maintenance.md} +6 -3
  33. package/kb/procedures/{post-release-testing-sop.md → sop-post-release-testing.md} +3 -3
  34. package/kb/procedures/sop-pre-commit.md +96 -0
  35. package/kb/procedures/{release-preparation-sop.md → sop-release.md} +6 -6
  36. package/kb/reference/architecture-overview.md +1 -1
  37. package/kb/reference/cli-reference.md +3 -2
  38. package/kb/reference/copilot-compatibility.md +1 -1
  39. package/kb/reference/global-install-model.md +16 -3
  40. package/kb/reference/hooks-catalog.md +5 -3
  41. package/kb/reference/language-rules.md +28 -10
  42. package/kb/reference/licensing.md +2 -2
  43. package/kb/reference/quick-wins-implementation-summary.md +1 -1
  44. package/kb/reference/supported-tools-registry.md +2 -2
  45. package/kb/reference/unique-features.md +2 -1
  46. package/kb/troubleshooting/plugin-double-load.md +1 -1
  47. package/llms-full.txt +1016 -871
  48. package/llms.txt +6 -5
  49. package/manifest.json +2 -2
  50. package/package.json +6 -2
  51. package/scripts/benchmark_ecosystem.py +0 -1
  52. package/scripts/check_split.py +11 -9
  53. package/scripts/claude_app.py +5 -7
  54. package/scripts/codex_skill_adapter.py +4 -12
  55. package/scripts/compile_slm.py +10 -26
  56. package/scripts/doctor.py +322 -0
  57. package/scripts/evaluate_skills.py +1 -1
  58. package/scripts/frontmatter.py +452 -29
  59. package/scripts/generate_augment_rules.py +4 -4
  60. package/scripts/generate_cursor_mdc.py +2 -3
  61. package/scripts/generate_language_rules_skills.py +8 -14
  62. package/scripts/generate_llms_txt.py +1 -15
  63. package/scripts/generate_opencode_agents.py +0 -1
  64. package/scripts/generate_opencode_skills.py +2 -20
  65. package/scripts/generate_toolkit_rules_skills.py +189 -0
  66. package/scripts/generate_windsurf_rules.py +0 -1
  67. package/scripts/generator_base.py +0 -1
  68. package/scripts/inject_hook_cli.py +15 -2
  69. package/scripts/inject_mcp_cli.py +1 -2
  70. package/scripts/install.py +32 -1
  71. package/scripts/install_git_hooks.py +0 -1
  72. package/scripts/install_steps/ai_tools.py +65 -25
  73. package/scripts/install_steps/markers.py +6 -6
  74. package/scripts/install_steps/skill_scope.py +188 -0
  75. package/scripts/instruction_core.py +5 -8
  76. package/scripts/merge-hooks.py +13 -3
  77. package/scripts/pack_codebase.py +1 -1
  78. package/scripts/surface_manifest.py +6 -7
  79. package/scripts/validate.py +181 -12
  80. /package/kb/procedures/{release-verification-sop.md → sop-release-verification.md} +0 -0
@@ -3,9 +3,9 @@ title: "Language Rules System"
3
3
  category: reference
4
4
  service: ai-toolkit
5
5
  tags: [rules, languages, coding-style, testing, patterns, security]
6
- version: "2.1.0"
6
+ version: "2.2.0"
7
7
  created: "2026-04-07"
8
- last_updated: "2026-06-30"
8
+ last_updated: "2026-09-04"
9
9
  description: "Reference for the language-specific rules system: 13 per-language rule sets shipped as knowledge skills, plus common rules installed as Claude Code path-scoped project rules."
10
10
  ---
11
11
 
@@ -55,7 +55,7 @@ app/rules/
55
55
  └── medplum/
56
56
  ```
57
57
 
58
- **Total: 13 per-language directories × 5 files + 1 common directory × 5 files + 3 standalone files** (see README.md for canonical count). Per-language directories ship as `<lang>-rules` knowledge skills; the common directory is installed as Claude Code `.claude/rules/ai-toolkit-*.md` files.
58
+ **Total: 13 per-language directories × 5 files + 1 common directory × 6 files (5 in every profile + `git-team` in `strict`) + 3 standalone files** (see README.md for canonical count). Per-language directories ship as `<lang>-rules` knowledge skills; the common directory is installed as Claude Code `.claude/rules/ai-toolkit-*.md` files.
59
59
 
60
60
  ## Supported Languages
61
61
 
@@ -145,13 +145,16 @@ Common rules are installed as path-scoped Claude Code rule files:
145
145
  ```
146
146
  .claude/rules/
147
147
  ├── ai-toolkit-coding-style.md
148
+ ├── ai-toolkit-git-team.md # --profile strict only
148
149
  ├── ai-toolkit-git-workflow.md
149
150
  ├── ai-toolkit-performance.md
150
151
  ├── ai-toolkit-security.md
151
152
  └── ai-toolkit-testing.md
152
153
  ```
153
154
 
154
- Each file starts with:
155
+ A source rule may also carry `profiles:` (same block-list form). `git-team` declares `profiles: ["strict"]`: branching, pull-request, and review conventions for teams, kept out of `standard` so a solo maintainer who releases straight to `main` is not told to open PRs against themselves. Rerunning `install --local` with a different profile adds or removes the managed file. Only the Claude Code local install honours `profiles`; the Claude app export, `compile-slm`, and editor `lang-common` bundles still receive every common rule (see `DECISIONS.md`, 2026-09-04).
156
+
157
+ Each file's `paths` frontmatter is copied from the source rule in `app/rules/common/<category>.md`. A source rule without a `paths` block is always-on:
155
158
 
156
159
  ```yaml
157
160
  ---
@@ -160,6 +163,18 @@ paths:
160
163
  ---
161
164
  ```
162
165
 
166
+ A source rule with a `paths` block is path-scoped, so Claude Code loads it only when a matching file is touched. As of v4.32.0 `testing` (`**/*.test.*`, `**/*.spec.*`, `**/test_*`, `**/*_test.*`, `**/tests/**`) and `performance` (source-file extensions plus `**/*.sql`) are scoped; `coding-style`, `git-workflow`, and `security` stay always-on because they carry prohibitions that must hold in every session. To change a scope, edit the source frontmatter; `validate.py` rejects inline lists and unquoted globs because the installer reads only the block form:
167
+
168
+ ```yaml
169
+ ---
170
+ language: common
171
+ category: testing
172
+ version: "1.1.0"
173
+ paths:
174
+ - "**/tests/**"
175
+ ---
176
+ ```
177
+
163
178
  The project `CLAUDE.md` receives only a compact index between a single named marker (the per-language markers from v1.x are no longer used):
164
179
 
165
180
  ```
@@ -167,10 +182,13 @@ The project `CLAUDE.md` receives only a compact index between a single named mar
167
182
  # Language Rules
168
183
 
169
184
  Common ai-toolkit rules live in `.claude/rules/ai-toolkit-*.md`
170
- with Claude Code `paths` frontmatter so they load when project files
171
- are opened instead of expanding this CLAUDE.md at session startup.
185
+ with Claude Code `paths` frontmatter instead of expanding this
186
+ CLAUDE.md. Always-on rules load in every session; path-scoped rules
187
+ load only when a matching file is touched.
188
+
189
+ Always-on: `.claude/rules/ai-toolkit-coding-style.md`, ...
172
190
 
173
- Common rule files: `.claude/rules/ai-toolkit-coding-style.md`, ...
191
+ Path-scoped: `.claude/rules/ai-toolkit-performance.md`, ...
174
192
 
175
193
  Language-specific rules live in `<lang>-rules` knowledge skills (e.g.
176
194
  `python-rules`, `typescript-rules`) and load automatically when their
@@ -207,7 +225,7 @@ Language rules are tracked as modules in `manifest.json`:
207
225
 
208
226
  | Module | Description |
209
227
  |--------|-------------|
210
- | `rules-common` | Common coding rules (5 files), included in `standard` profile |
228
+ | `rules-common` | Common coding rules (6 files: 5 in every profile, `git-team` in `strict` only), included in `standard` profile |
211
229
  | `rules-typescript` | TypeScript-specific rules |
212
230
  | `rules-python` | Python-specific rules |
213
231
  | `rules-golang` | Go-specific rules |
@@ -228,9 +246,9 @@ Language rules are tracked as modules in `manifest.json`:
228
246
  |---|---|---|---|
229
247
  | Source | `app/rules/common/` | `app/rules/<lang>/` | `app/skills/<name>/SKILL.md` |
230
248
  | Delivery to Claude | Path-scoped `.claude/rules/ai-toolkit-*.md` files (`--local`) + compact `CLAUDE.md` index | Generated as `<lang>-rules` knowledge skills, loaded contextually | Loaded contextually by description match |
231
- | Visibility | Loaded when project files are opened | Loaded when triggers match (file extensions, framework names) | Loaded when triggers match |
249
+ | Visibility | Always-on (`coding-style`, `git-workflow`, `security`) or loaded when a matching file is touched (`testing`, `performance`) | Loaded when triggers match (file extensions, framework names) | Loaded when triggers match |
232
250
  | Scope | Language-agnostic standards (security, git, testing, perf, style) | Per-language coding-style, frameworks, patterns, security, testing | Domain skills (testing, debugging, RAG, etc.) |
233
- | Install | `ai-toolkit install --local` | Global install (skills directory is symlinked) | Global install |
251
+ | Install | `ai-toolkit install --local` | Global install (skills directory is symlinked); skills for languages no registered project uses are turned off via `skillOverrides` (`--language-skills detected`, the default) unless `--language-skills all` was chosen | Global install |
234
252
  | Other editors | Inlined into editor-specific rule files | Inlined into editor-specific rule files (still full content, not skills) | N/A |
235
253
 
236
254
  Per-language content delivered as a knowledge skill is the same Markdown that other editors receive inlined. The split exists only for Claude, where the Agent Skills progressive-disclosure mechanism keeps the system prompt small.
@@ -131,7 +131,7 @@ MIT remnant would need each contributor's agreement.
131
131
 
132
132
  It is a test rather than a checklist line on purpose. This project has two
133
133
  same-day postmortems about SOPs that existed and were skipped; CI does not skip.
134
- [Release Preparation](../procedures/release-preparation-sop.md) Phase 5c runs the
134
+ [Release Preparation](../procedures/sop-release.md) Phase 5c runs the
135
135
  same gate before tagging so a failure surfaces before the tag, not after.
136
136
 
137
137
  ## If the licence ever changes again
@@ -144,5 +144,5 @@ source, cross-verify against a second independent copy, and only then write
144
144
  ## Related
145
145
 
146
146
  - [`LICENSE`](../../LICENSE), [`NOTICE`](../../NOTICE)
147
- - [Release Preparation SOP](../procedures/release-preparation-sop.md) — Phase 5c
147
+ - [Release Preparation SOP](../procedures/sop-release.md) — Phase 5c
148
148
  - [Distribution Model](distribution-model.md) — what ships and where
@@ -53,7 +53,7 @@ Updated baseline docs:
53
53
  - `kb/reference/skills-catalog.md`
54
54
  - `kb/reference/plugin-pack-conventions.md`
55
55
  - `kb/reference/claude-ecosystem-benchmark-snapshot.md`
56
- - `kb/procedures/maintenance-sop.md`
56
+ - `kb/procedures/sop-maintenance.md`
57
57
 
58
58
  ## Validation Evidence
59
59
 
@@ -285,13 +285,13 @@ See [DSH Compatibility](./dsh-compatibility.md) for commands, topology, subscrip
285
285
  2. Delete its section from this document.
286
286
  3. Delete its snapshot entry from `benchmarks/ecosystem-doctor-snapshot.json` (or let the next `--update` prune it — currently not pruned automatically).
287
287
  4. Decide whether to keep the generator (`scripts/generate_<tool>_*.py`) for backwards compatibility or delete it.
288
- 5. Remove references from `README.md`, `manifest.json` `description` field, and `kb/procedures/maintenance-sop.md` `Supported editors` line.
288
+ 5. Remove references from `README.md`, `manifest.json` `description` field, and `kb/procedures/sop-maintenance.md` `Supported editors` line.
289
289
 
290
290
  ---
291
291
 
292
292
  ## Related
293
293
 
294
- - [Ecosystem Sync SOP](../procedures/ecosystem-sync-sop.md) — how to use the doctor
294
+ - [Ecosystem Sync SOP](../procedures/sop-ecosystem-sync.md) — how to use the doctor
295
295
  - [MCP Editor Compatibility](./mcp-editor-compatibility.md) — MCP-specific subset
296
296
  - `scripts/ecosystem_tools.json` — source of truth
297
297
  - `scripts/ecosystem_doctor.py` — drift detector
@@ -4,7 +4,7 @@ category: reference
4
4
  service: ai-toolkit
5
5
  tags: [features, differentiators, constitution, hooks, security, tdd, memory]
6
6
  created: "2026-04-13"
7
- last_updated: "2026-08-06"
7
+ last_updated: "2026-09-04"
8
8
  description: "Detailed description of ai-toolkit's unique features: constitution enforcement, hooks system, security scanning, effort budgeting, quality gates, and more."
9
9
  ---
10
10
 
@@ -119,6 +119,7 @@ added after the thing it checks had already shipped broken.
119
119
  | **Public surface** (`surface_manifest.py` + `app/surface.json`) | a skill, agent, CLI command, frontmatter field, hook, KB category or pack disappearing | `BACKWARD_COMPATIBILITY.md` listed the surfaces; renaming one still left every check green |
120
120
  | **Script invocation** (`validate.py`) | a skill running its own script by any path other than `${CLAUDE_SKILL_DIR}`, or through the wrong interpreter | nine skills shipped invocations that resolved only in the repo, never on an installed machine |
121
121
  | **Skill body budget** (`validate.py`) | a `SKILL.md` body over 20,000 bytes; warns over 18,000 | the body loads on every trigger match, including accidental ones; three skills sat at 24–35 KB |
122
+ | **Skill description budget** (`validate.py`) | a description over 1,024 characters (the Agent Skills cap; the runtime truncates past it), or an unquoted description containing `: ` or ` #` (strict YAML drops every field, `allowed-tools` included); warns over 400; applied to plugin-pack skills too | two installed skills sat at 791 and 883 characters and made up 8% of the model's skill listing on their own |
122
123
  | **Split integrity** (`check_split.py`) | a body → `reference/` refactor that lost a fenced code line, a required section, the description, or a working link | run by hand during a split; caught a heading corrupted inside a fenced example on first use |
123
124
 
124
125
  The surface check is deliberately one-directional: **removals fail, additions pass.**
@@ -94,4 +94,4 @@ Expect `Total plugin skills loaded: 0`, `Total plugin agents loaded: 0`, and the
94
94
  ## Related
95
95
 
96
96
  - `kb/reference/global-install-model.md`
97
- - `kb/procedures/maintenance-sop.md`
97
+ - `kb/procedures/sop-maintenance.md`