@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
|
@@ -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.
|
|
6
|
+
version: "2.2.0"
|
|
7
7
|
created: "2026-04-07"
|
|
8
|
-
last_updated: "2026-
|
|
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 ×
|
|
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
|
-
|
|
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
|
|
171
|
-
|
|
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
|
-
|
|
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
|
|
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 |
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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-
|
|
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.**
|