@softspark/ai-toolkit 4.10.1 → 4.11.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/AGENTS.md +135 -0
- package/CHANGELOG.md +14 -0
- package/README.md +12 -13
- package/app/.claude-plugin/plugin.json +1 -1
- package/benchmarks/ecosystem-doctor-snapshot.json +18 -12
- package/bin/ai-toolkit.js +1 -1
- package/kb/procedures/maintenance-sop.md +5 -3
- package/kb/reference/architecture-overview.md +5 -4
- package/kb/reference/extension-api.md +5 -5
- package/kb/reference/global-install-model.md +18 -3
- package/kb/reference/integrations.md +16 -17
- package/kb/reference/language-rules.md +35 -14
- package/kb/reference/supported-tools-registry.md +2 -2
- package/llms-full.txt +86 -48
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/scripts/ecosystem_tools.json +5 -2
- package/scripts/generate_language_rules_skills.py +4 -2
- package/scripts/install.py +3 -3
- package/scripts/install_steps/ai_tools.py +67 -28
- package/scripts/install_steps/markers.py +132 -14
- package/scripts/remove_rule.py +15 -4
|
@@ -3,10 +3,10 @@ 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.1.0"
|
|
7
7
|
created: "2026-04-07"
|
|
8
|
-
last_updated: "2026-
|
|
9
|
-
description: "Reference for the language-specific rules system: 13 per-language rule sets shipped as knowledge skills, plus
|
|
8
|
+
last_updated: "2026-06-30"
|
|
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
|
|
|
12
12
|
# Language Rules System
|
|
@@ -15,7 +15,7 @@ description: "Reference for the language-specific rules system: 13 per-language
|
|
|
15
15
|
|
|
16
16
|
ai-toolkit ships rule content for 13 languages/platforms plus a language-agnostic common set. Source files live under `app/rules/` and are split into two delivery channels by `ai-toolkit install --local`:
|
|
17
17
|
|
|
18
|
-
- **Common rules** (`app/rules/common/*.md`): full content is
|
|
18
|
+
- **Common rules** (`app/rules/common/*.md`): full content is written to `.claude/rules/ai-toolkit-*.md` with Claude Code `paths` frontmatter. The project's `.claude/CLAUDE.md` keeps only a compact `<!-- TOOLKIT:language-rules START -->` index. This follows Claude Code's current guidance to keep `CLAUDE.md` concise and move larger instruction sets into scoped rules.
|
|
19
19
|
- **Per-language rules** (`app/rules/<lang>/*.md`): emitted at build time as `<lang>-rules` knowledge skills under `app/skills/`. Each skill is `user-invocable: false`, so Claude loads it via the Agent Skills progressive-disclosure mechanism only when its description triggers match (file extensions, framework names, or matching keywords in the prompt).
|
|
20
20
|
|
|
21
21
|
The skills are generated from the rule files via `python3 scripts/generate_language_rules_skills.py`, which is idempotent and rerun-safe. Other editors (Cursor, Windsurf, Cline, Roo, Augment, Codex, Copilot, Antigravity, Gemini, opencode) still receive the full per-language rule content via their own generators in `scripts/dir_rules_shared.py::build_language_rules()` — Claude is the only target where the per-language content is now skill-delivered rather than inlined.
|
|
@@ -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
|
|
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.
|
|
59
59
|
|
|
60
60
|
## Supported Languages
|
|
61
61
|
|
|
@@ -140,26 +140,47 @@ ai-toolkit install --local --modules core,agents
|
|
|
140
140
|
|
|
141
141
|
The `--lang` flag accepts comma-separated language names and converts them to `rules-<lang>` modules. Common aliases are supported: `go` → `golang`, `c++` → `cpp`, `c#`/`cs` → `csharp`. Using `--lang` implies `--local` and disables auto-detection.
|
|
142
142
|
|
|
143
|
-
Common rules are
|
|
143
|
+
Common rules are installed as path-scoped Claude Code rule files:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
.claude/rules/
|
|
147
|
+
├── ai-toolkit-coding-style.md
|
|
148
|
+
├── ai-toolkit-git-workflow.md
|
|
149
|
+
├── ai-toolkit-performance.md
|
|
150
|
+
├── ai-toolkit-security.md
|
|
151
|
+
└── ai-toolkit-testing.md
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Each file starts with:
|
|
155
|
+
|
|
156
|
+
```yaml
|
|
157
|
+
---
|
|
158
|
+
paths:
|
|
159
|
+
- "**/*"
|
|
160
|
+
---
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
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):
|
|
144
164
|
|
|
145
165
|
```
|
|
146
166
|
<!-- TOOLKIT:language-rules START -->
|
|
147
167
|
# Language Rules
|
|
148
168
|
|
|
149
|
-
Common
|
|
169
|
+
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.
|
|
172
|
+
|
|
173
|
+
Common rule files: `.claude/rules/ai-toolkit-coding-style.md`, ...
|
|
174
|
+
|
|
150
175
|
Language-specific rules live in `<lang>-rules` knowledge skills (e.g.
|
|
151
176
|
`python-rules`, `typescript-rules`) and load automatically when their
|
|
152
177
|
triggers match.
|
|
153
178
|
|
|
154
179
|
Detected languages: `python-rules`, `typescript-rules`.
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
... full content of app/rules/common/*.md inlined here ...
|
|
159
180
|
<!-- TOOLKIT:language-rules END -->
|
|
160
181
|
```
|
|
161
182
|
|
|
162
|
-
Re-running `install --local` is idempotent — the existing block is replaced, not duplicated. Per-language rules are not injected into `CLAUDE.md` for Claude — they are loaded contextually via their respective `<lang>-rules` knowledge skills.
|
|
183
|
+
Re-running `install --local` is idempotent — the existing block is replaced, not duplicated, and only managed `.claude/rules/ai-toolkit-*.md` files are refreshed. User-authored `.claude/rules/*.md` files are preserved. Per-language rules are not injected into `CLAUDE.md` for Claude — they are loaded contextually via their respective `<lang>-rules` knowledge skills.
|
|
163
184
|
|
|
164
185
|
### Generating language-rules skills
|
|
165
186
|
|
|
@@ -206,8 +227,8 @@ Language rules are tracked as modules in `manifest.json`:
|
|
|
206
227
|
| | Common rules | Per-language rules | Other skills |
|
|
207
228
|
|---|---|---|---|
|
|
208
229
|
| Source | `app/rules/common/` | `app/rules/<lang>/` | `app/skills/<name>/SKILL.md` |
|
|
209
|
-
| Delivery to Claude |
|
|
210
|
-
| Visibility |
|
|
230
|
+
| 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 |
|
|
211
232
|
| Scope | Language-agnostic standards (security, git, testing, perf, style) | Per-language coding-style, frameworks, patterns, security, testing | Domain skills (testing, debugging, RAG, etc.) |
|
|
212
233
|
| Install | `ai-toolkit install --local` | Global install (skills directory is symlinked) | Global install |
|
|
213
234
|
| Other editors | Inlined into editor-specific rule files | Inlined into editor-specific rule files (still full content, not skills) | N/A |
|
|
@@ -3,9 +3,9 @@ title: "Supported Tools Registry"
|
|
|
3
3
|
category: reference
|
|
4
4
|
service: ai-toolkit
|
|
5
5
|
tags: [editors, platforms, generators, integration, ecosystem]
|
|
6
|
-
version: "1.7.
|
|
6
|
+
version: "1.7.1"
|
|
7
7
|
created: "2026-04-23"
|
|
8
|
-
last_updated: "2026-06-
|
|
8
|
+
last_updated: "2026-06-30"
|
|
9
9
|
description: "Human-readable view of scripts/ecosystem_tools.json — the canonical list of tools ai-toolkit integrates with (Claude Code + 11 editors), their documentation URLs, config paths, our generators, and tracked capability markers."
|
|
10
10
|
---
|
|
11
11
|
|
package/llms-full.txt
CHANGED
|
@@ -4586,7 +4586,8 @@ What `install` and `update` do (merge-friendly — user content never overwritte
|
|
|
4586
4586
|
| `settings.json` hooks | JSON merge via `merge-hooks.py` | User hooks + settings preserved, toolkit entries tagged `_source: ai-toolkit` |
|
|
4587
4587
|
| `constitution.md` | Marker injection via `inject_section_cli.py` | User content outside `<!-- TOOLKIT:* -->` markers untouched |
|
|
4588
4588
|
| `ARCHITECTURE.md` | Marker injection via `inject_section_cli.py` | Same as above |
|
|
4589
|
-
| `CLAUDE.md` |
|
|
4589
|
+
| `CLAUDE.md` | Compact index for managed global rules | User content outside toolkit markers untouched |
|
|
4590
|
+
| `rules/ai-toolkit-*.md` | File-based Claude Code user-level rules from `app/rules/*.md` and registered rules | `ai-toolkit-*` prefix reserved for installer-managed files |
|
|
4590
4591
|
|
|
4591
4592
|
Re-running updates only toolkit content. Old whole-directory symlinks are auto-upgraded to per-file on next run.
|
|
4592
4593
|
|
|
@@ -4634,7 +4635,7 @@ ai-toolkit add-rule ./my-project-rules.md
|
|
|
4634
4635
|
# → copies to ~/.softspark/ai-toolkit/rules/my-project-rules.md
|
|
4635
4636
|
|
|
4636
4637
|
ai-toolkit update
|
|
4637
|
-
# →
|
|
4638
|
+
# → syncs the rule into ~/.claude/rules/ai-toolkit-registered-*.md and all global editor configs
|
|
4638
4639
|
|
|
4639
4640
|
ai-toolkit update --local
|
|
4640
4641
|
# → also propagates as ai-toolkit-custom-<name> to directory-based editors (Cursor, Windsurf, Cline, Roo, Augment, Antigravity)
|
|
@@ -4929,7 +4930,8 @@ What `uninstall` does:
|
|
|
4929
4930
|
- Removes per-directory skill symlinks (user skills preserved)
|
|
4930
4931
|
- Strips toolkit hook entries from `settings.json` (user hooks + settings preserved)
|
|
4931
4932
|
- Strips toolkit markers from `constitution.md` and `ARCHITECTURE.md` (user content preserved; empty files removed)
|
|
4932
|
-
- `~/.claude/CLAUDE.md` preserved (contains your custom
|
|
4933
|
+
- `~/.claude/CLAUDE.md` preserved (contains your custom content + compact toolkit index)
|
|
4934
|
+
- `~/.claude/rules/` preserved unless explicitly removed
|
|
4933
4935
|
- Empty `agents/` and `skills/` directories cleaned up
|
|
4934
4936
|
|
|
4935
4937
|
---
|
|
@@ -6264,7 +6266,7 @@ ai-toolkit/
|
|
|
6264
6266
|
app/ # All toolkit components
|
|
6265
6267
|
agents/ # Agent definitions (.md + YAML frontmatter)
|
|
6266
6268
|
skills/ # skills: task, hybrid, knowledge
|
|
6267
|
-
rules/ #
|
|
6269
|
+
rules/ # Source rules synced into Claude/editor rule files
|
|
6268
6270
|
hooks/ # Hook scripts (copied to ~/.softspark/ai-toolkit/hooks/)
|
|
6269
6271
|
hooks.json # Hook definitions (merged into ~/.claude/settings.json)
|
|
6270
6272
|
constitution.md # Immutable safety rules, 7 articles (marker-injected)
|
|
@@ -6317,8 +6319,9 @@ Machine (global) Project (local)
|
|
|
6317
6319
|
skills/*/ → per-dir symlinks hooks/ ← hook scripts (copied)
|
|
6318
6320
|
settings.json ← hooks merged here
|
|
6319
6321
|
constitution.md ← marker injection my-project/
|
|
6320
|
-
ARCHITECTURE.md ← marker injection CLAUDE.md ← project
|
|
6321
|
-
CLAUDE.md ←
|
|
6322
|
+
ARCHITECTURE.md ← marker injection CLAUDE.md ← project index
|
|
6323
|
+
CLAUDE.md ← compact rule index .claude/
|
|
6324
|
+
rules/*.md ← Claude user-level rules
|
|
6322
6325
|
settings.local.json ← MCP, perms
|
|
6323
6326
|
constitution.md ← marker injection
|
|
6324
6327
|
```
|
|
@@ -6355,7 +6358,7 @@ If a project already has `.mcp.json`, local install mirrors its `mcpServers` ent
|
|
|
6355
6358
|
| `update --local` | `./` | Re-apply + refresh project-local configs |
|
|
6356
6359
|
| `uninstall` | `~/.claude/` | Strips toolkit components (preserves user content) |
|
|
6357
6360
|
| `add-rule <file>` | `~/.softspark/ai-toolkit/rules/` | Register rule — auto-applied on every `update` |
|
|
6358
|
-
| `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/
|
|
6361
|
+
| `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/rules/` | Unregister rule and remove generated Claude rule file |
|
|
6359
6362
|
| `mcp add <name...>` | `./.mcp.json` | Merge canonical MCP template(s) into project config |
|
|
6360
6363
|
| `mcp install --editor <name...>` | native editor config | Render MCP template(s) into editor-native config files |
|
|
6361
6364
|
| `validate` | toolkit | Integrity check |
|
|
@@ -8385,19 +8388,19 @@ This design is intentional: ai-toolkit is a generic toolkit. Consumers (MCP serv
|
|
|
8385
8388
|
|
|
8386
8389
|
| Command | Target File | Mechanism | Idempotent |
|
|
8387
8390
|
|---------|-------------|-----------|------------|
|
|
8388
|
-
| `inject-rule <file.md>` | `~/.claude/CLAUDE.md` | HTML comment markers (`<!-- TOOLKIT:name -->`) | Yes |
|
|
8389
|
-
| `remove-rule <name>` | `~/.claude/
|
|
8391
|
+
| `inject-rule <file.md>` | `~/.claude/CLAUDE.md` | Legacy HTML comment markers (`<!-- TOOLKIT:name -->`) | Yes |
|
|
8392
|
+
| `remove-rule <name>` | `~/.softspark/ai-toolkit/rules/` + `~/.claude/rules/` | Unregister and remove generated Claude rule file | Yes |
|
|
8390
8393
|
| `inject-hook <file.json\|url> [name]` | `~/.claude/settings.json` | JSON `_source` tag per entry, URL cached + registered | Yes |
|
|
8391
8394
|
| `remove-hook <name>` | `~/.claude/settings.json` | Strip all entries with matching `_source`, unregister URL source | Yes |
|
|
8392
8395
|
| `inject-mcp <file.json\|url> [name] [--force]` | `~/.mcp.json` + every editor with `global_path` | JSON `_source` tag per server, URL cached + registered, full editor propagation | Yes |
|
|
8393
8396
|
| `remove-mcp <name>` | `~/.mcp.json` + every editor with `global_path` | Strip all servers with matching `_source`, clean editor configs, unregister URL | Yes |
|
|
8394
|
-
| `add-rule <file.md\|url>` | `~/.softspark/ai-toolkit/rules/` | File copy +
|
|
8397
|
+
| `add-rule <file.md\|url>` | `~/.softspark/ai-toolkit/rules/` | File copy + sync to `~/.claude/rules/ai-toolkit-registered-*.md` on next `update` | Yes |
|
|
8395
8398
|
| `mcp add <name...>` | `.mcp.json` | Merge `mcpServers` block from built-in template | Yes |
|
|
8396
8399
|
| `mcp install --editor <name...>` | Native editor MCP config | Render canonical template into editor format | Yes |
|
|
8397
8400
|
|
|
8398
8401
|
## inject-rule
|
|
8399
8402
|
|
|
8400
|
-
|
|
8403
|
+
Legacy direct injection: injects a Markdown rules file into `~/.claude/CLAUDE.md` between named HTML comment markers. Prefer `add-rule` for persistent global rules; `ai-toolkit update` syncs those into Claude Code user-level rule files under `~/.claude/rules/`.
|
|
8401
8404
|
|
|
8402
8405
|
```bash
|
|
8403
8406
|
npx @softspark/ai-toolkit inject-rule ./my-tool-rules.md
|
|
@@ -8416,7 +8419,7 @@ The block name is derived from the file stem (`my-tool-rules.md` → `my-tool-ru
|
|
|
8416
8419
|
|
|
8417
8420
|
## remove-rule
|
|
8418
8421
|
|
|
8419
|
-
|
|
8422
|
+
Unregisters a persistent rule, removes `~/.claude/rules/ai-toolkit-registered-<name>.md`, and strips any legacy injected rule block from `~/.claude/CLAUDE.md`.
|
|
8420
8423
|
|
|
8421
8424
|
```bash
|
|
8422
8425
|
npx @softspark/ai-toolkit remove-rule my-tool-rules
|
|
@@ -8641,9 +8644,9 @@ title: "Global Install Model"
|
|
|
8641
8644
|
category: reference
|
|
8642
8645
|
service: ai-toolkit
|
|
8643
8646
|
tags: [install, global, claude, codex, plugins, local-setup]
|
|
8644
|
-
version: "3.0
|
|
8647
|
+
version: "3.1.0"
|
|
8645
8648
|
created: "2026-03-26"
|
|
8646
|
-
last_updated: "2026-
|
|
8649
|
+
last_updated: "2026-06-30"
|
|
8647
8650
|
description: "Reference description of the global install target, project-local editor setup, global Codex plugin layering, and command responsibilities in ai-toolkit."
|
|
8648
8651
|
---
|
|
8649
8652
|
|
|
@@ -8653,7 +8656,7 @@ description: "Reference description of the global install target, project-local
|
|
|
8653
8656
|
|
|
8654
8657
|
`ai-toolkit` installs globally into `~/.claude/` by default.
|
|
8655
8658
|
|
|
8656
|
-
That means one machine-level install provides agents, skills, hooks, and
|
|
8659
|
+
That means one machine-level install provides agents, skills, hooks, constitution, and rule files to every project without committing toolkit boilerplate into each repository.
|
|
8657
8660
|
|
|
8658
8661
|
Other editor targets are opt-in and only use documented file surfaces. Cursor
|
|
8659
8662
|
rules stay project-local because Cursor's global user rules are managed through
|
|
@@ -8695,6 +8698,19 @@ The `--profile` flag controls how much of each editor's native surface is activa
|
|
|
8695
8698
|
|
|
8696
8699
|
## Global Editor Targets
|
|
8697
8700
|
|
|
8701
|
+
Claude Code's default global install writes these managed surfaces:
|
|
8702
|
+
|
|
8703
|
+
- `~/.claude/agents/*.md` — per-file symlinks to toolkit agents.
|
|
8704
|
+
- `~/.claude/skills/*/` — per-directory symlinks to toolkit skills.
|
|
8705
|
+
- `~/.claude/settings.json` — merged hook configuration and global settings.
|
|
8706
|
+
- `~/.claude/constitution.md` — marker-injected safety constitution.
|
|
8707
|
+
- `~/.claude/ARCHITECTURE.md` — marker-injected architecture reference.
|
|
8708
|
+
- `~/.claude/rules/ai-toolkit-*.md` — toolkit rules from `app/rules/*.md`.
|
|
8709
|
+
- `~/.claude/rules/ai-toolkit-registered-*.md` — rules registered with `ai-toolkit add-rule`.
|
|
8710
|
+
- `~/.claude/CLAUDE.md` — compact index pointing at the managed rule files.
|
|
8711
|
+
|
|
8712
|
+
The `ai-toolkit-*` prefix in `~/.claude/rules/` is reserved for installer-managed files. User-authored Claude rules should use another filename prefix, or be registered through `ai-toolkit add-rule` so they are emitted as `ai-toolkit-registered-*.md`.
|
|
8713
|
+
|
|
8698
8714
|
`ai-toolkit install --editors <name>` can write global files only for editors
|
|
8699
8715
|
with documented, file-based config surfaces:
|
|
8700
8716
|
|
|
@@ -8741,6 +8757,8 @@ These files still stay local to a repository as part of the core install model:
|
|
|
8741
8757
|
- `.git/hooks/pre-commit` (fallback)
|
|
8742
8758
|
- project-specific documentation or safety overlays
|
|
8743
8759
|
|
|
8760
|
+
Project-local Claude Code language rules live in `.claude/rules/ai-toolkit-*.md` with `paths` frontmatter. They are separate from the global user-level `~/.claude/rules/ai-toolkit-*.md` files above.
|
|
8761
|
+
|
|
8744
8762
|
Hooks do **not** live in project-local settings. They are merged only into global `~/.claude/settings.json`.
|
|
8745
8763
|
|
|
8746
8764
|
Codex is the exception in terms of file location, not hook ownership: its local
|
|
@@ -9622,15 +9640,15 @@ title: "AI Toolkit - External Integrations"
|
|
|
9622
9640
|
category: reference
|
|
9623
9641
|
service: ai-toolkit
|
|
9624
9642
|
tags: [integrations, rules, add-rule]
|
|
9625
|
-
version: "1.0
|
|
9643
|
+
version: "1.1.0"
|
|
9626
9644
|
created: "2026-03-26"
|
|
9627
|
-
last_updated: "2026-
|
|
9628
|
-
description: "How external repos
|
|
9645
|
+
last_updated: "2026-06-30"
|
|
9646
|
+
description: "How external repos register rules that ai-toolkit syncs into Claude Code user-level rules and other editor configs."
|
|
9629
9647
|
---
|
|
9630
9648
|
|
|
9631
9649
|
# External Integrations
|
|
9632
9650
|
|
|
9633
|
-
Repos that register rules with ai-toolkit so they are automatically
|
|
9651
|
+
Repos that register rules with ai-toolkit so they are automatically synced into Claude Code user-level rules and other editor configs on every `update`.
|
|
9634
9652
|
|
|
9635
9653
|
---
|
|
9636
9654
|
|
|
@@ -9644,9 +9662,11 @@ ai-toolkit add-rule ./jira-rules.md
|
|
|
9644
9662
|
ai-toolkit update # inject now
|
|
9645
9663
|
```
|
|
9646
9664
|
|
|
9647
|
-
After registration, `ai-toolkit update` will always re-
|
|
9665
|
+
After registration, `ai-toolkit update` will always re-sync the rule. Registry location: `~/.softspark/ai-toolkit/rules/`.
|
|
9648
9666
|
|
|
9649
|
-
|
|
9667
|
+
For Claude Code, registered rules are written to `~/.claude/rules/ai-toolkit-registered-<name>.md`. The `ai-toolkit-*` prefix in `~/.claude/rules/` is installer-managed; use another prefix for hand-written Claude rules.
|
|
9668
|
+
|
|
9669
|
+
To unregister a rule (removes from `~/.softspark/ai-toolkit/rules/`, deletes the generated Claude rule file, and strips any legacy block from `CLAUDE.md`):
|
|
9650
9670
|
|
|
9651
9671
|
```bash
|
|
9652
9672
|
ai-toolkit remove-rule jira-rules
|
|
@@ -9656,17 +9676,13 @@ ai-toolkit remove-rule jira-rules
|
|
|
9656
9676
|
|
|
9657
9677
|
## How It Works
|
|
9658
9678
|
|
|
9659
|
-
|
|
9679
|
+
Claude Code uses file-based user-level rules:
|
|
9660
9680
|
|
|
9661
9681
|
```
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
...rule content...
|
|
9665
|
-
|
|
9666
|
-
<!-- TOOLKIT:jira-rules END -->
|
|
9682
|
+
~/.claude/rules/ai-toolkit-registered-jira-rules.md
|
|
9667
9683
|
```
|
|
9668
9684
|
|
|
9669
|
-
|
|
9685
|
+
Other editors receive the same registered rule through their native generated rule surfaces. Legacy `CLAUDE.md` marker sections are removed during migration, but content outside toolkit-managed markers is never touched.
|
|
9670
9686
|
|
|
9671
9687
|
---
|
|
9672
9688
|
|
|
@@ -9675,8 +9691,9 @@ Content outside markers is never touched. Re-running updates only the marked blo
|
|
|
9675
9691
|
1. Create `<name>-rules.md` in your repo with Claude-relevant conventions
|
|
9676
9692
|
2. Register it: `ai-toolkit add-rule ./<name>-rules.md`
|
|
9677
9693
|
3. Verify it appears in: `~/.softspark/ai-toolkit/rules/<name>-rules.md`
|
|
9678
|
-
4. On next `install` it will be listed in: `Rules
|
|
9679
|
-
5.
|
|
9694
|
+
4. On next `install` it will be listed in: `Rules synced: ... <name>-rules`
|
|
9695
|
+
5. Verify Claude receives it at: `~/.claude/rules/ai-toolkit-registered-<name>-rules.md`
|
|
9696
|
+
6. Add an entry below documenting the integration
|
|
9680
9697
|
|
|
9681
9698
|
---
|
|
9682
9699
|
|
|
@@ -9685,7 +9702,7 @@ Content outside markers is never touched. Re-running updates only the marked blo
|
|
|
9685
9702
|
### rag-mcp
|
|
9686
9703
|
|
|
9687
9704
|
**Rule file:** `rag-mcp.md`
|
|
9688
|
-
**
|
|
9705
|
+
**Claude rule file:** `~/.claude/rules/ai-toolkit-registered-rag-mcp.md`
|
|
9689
9706
|
|
|
9690
9707
|
Teaches Claude Code the RAG-MCP search protocol: always call `smart_query()` before answering, `kb_id` vs `file_path` distinction, available MCP tools.
|
|
9691
9708
|
|
|
@@ -9697,7 +9714,7 @@ ai-toolkit add-rule ./rag-mcp-rules.md
|
|
|
9697
9714
|
### jira-mcp
|
|
9698
9715
|
|
|
9699
9716
|
**Rule file:** `jira-rules.md`
|
|
9700
|
-
**
|
|
9717
|
+
**Claude rule file:** `~/.claude/rules/ai-toolkit-registered-jira-rules.md`
|
|
9701
9718
|
|
|
9702
9719
|
Teaches Claude Code the Jira MCP tool set: `sync_tasks`, `read_cached_tasks`, `update_task_status`, `log_task_time`, and key rules (sync first, hours only, check transitions).
|
|
9703
9720
|
|
|
@@ -9772,10 +9789,10 @@ title: "Language Rules System"
|
|
|
9772
9789
|
category: reference
|
|
9773
9790
|
service: ai-toolkit
|
|
9774
9791
|
tags: [rules, languages, coding-style, testing, patterns, security]
|
|
9775
|
-
version: "2.
|
|
9792
|
+
version: "2.1.0"
|
|
9776
9793
|
created: "2026-04-07"
|
|
9777
|
-
last_updated: "2026-
|
|
9778
|
-
description: "Reference for the language-specific rules system: 13 per-language rule sets shipped as knowledge skills, plus
|
|
9794
|
+
last_updated: "2026-06-30"
|
|
9795
|
+
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."
|
|
9779
9796
|
---
|
|
9780
9797
|
|
|
9781
9798
|
# Language Rules System
|
|
@@ -9784,7 +9801,7 @@ description: "Reference for the language-specific rules system: 13 per-language
|
|
|
9784
9801
|
|
|
9785
9802
|
ai-toolkit ships rule content for 13 languages/platforms plus a language-agnostic common set. Source files live under `app/rules/` and are split into two delivery channels by `ai-toolkit install --local`:
|
|
9786
9803
|
|
|
9787
|
-
- **Common rules** (`app/rules/common/*.md`): full content is
|
|
9804
|
+
- **Common rules** (`app/rules/common/*.md`): full content is written to `.claude/rules/ai-toolkit-*.md` with Claude Code `paths` frontmatter. The project's `.claude/CLAUDE.md` keeps only a compact `<!-- TOOLKIT:language-rules START -->` index. This follows Claude Code's current guidance to keep `CLAUDE.md` concise and move larger instruction sets into scoped rules.
|
|
9788
9805
|
- **Per-language rules** (`app/rules/<lang>/*.md`): emitted at build time as `<lang>-rules` knowledge skills under `app/skills/`. Each skill is `user-invocable: false`, so Claude loads it via the Agent Skills progressive-disclosure mechanism only when its description triggers match (file extensions, framework names, or matching keywords in the prompt).
|
|
9789
9806
|
|
|
9790
9807
|
The skills are generated from the rule files via `python3 scripts/generate_language_rules_skills.py`, which is idempotent and rerun-safe. Other editors (Cursor, Windsurf, Cline, Roo, Augment, Codex, Copilot, Antigravity, Gemini, opencode) still receive the full per-language rule content via their own generators in `scripts/dir_rules_shared.py::build_language_rules()` — Claude is the only target where the per-language content is now skill-delivered rather than inlined.
|
|
@@ -9824,7 +9841,7 @@ app/rules/
|
|
|
9824
9841
|
└── medplum/
|
|
9825
9842
|
```
|
|
9826
9843
|
|
|
9827
|
-
**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
|
|
9844
|
+
**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.
|
|
9828
9845
|
|
|
9829
9846
|
## Supported Languages
|
|
9830
9847
|
|
|
@@ -9909,26 +9926,47 @@ ai-toolkit install --local --modules core,agents
|
|
|
9909
9926
|
|
|
9910
9927
|
The `--lang` flag accepts comma-separated language names and converts them to `rules-<lang>` modules. Common aliases are supported: `go` → `golang`, `c++` → `cpp`, `c#`/`cs` → `csharp`. Using `--lang` implies `--local` and disables auto-detection.
|
|
9911
9928
|
|
|
9912
|
-
Common rules are
|
|
9929
|
+
Common rules are installed as path-scoped Claude Code rule files:
|
|
9930
|
+
|
|
9931
|
+
```
|
|
9932
|
+
.claude/rules/
|
|
9933
|
+
├── ai-toolkit-coding-style.md
|
|
9934
|
+
├── ai-toolkit-git-workflow.md
|
|
9935
|
+
├── ai-toolkit-performance.md
|
|
9936
|
+
├── ai-toolkit-security.md
|
|
9937
|
+
└── ai-toolkit-testing.md
|
|
9938
|
+
```
|
|
9939
|
+
|
|
9940
|
+
Each file starts with:
|
|
9941
|
+
|
|
9942
|
+
```yaml
|
|
9943
|
+
---
|
|
9944
|
+
paths:
|
|
9945
|
+
- "**/*"
|
|
9946
|
+
---
|
|
9947
|
+
```
|
|
9948
|
+
|
|
9949
|
+
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):
|
|
9913
9950
|
|
|
9914
9951
|
```
|
|
9915
9952
|
<!-- TOOLKIT:language-rules START -->
|
|
9916
9953
|
# Language Rules
|
|
9917
9954
|
|
|
9918
|
-
Common
|
|
9955
|
+
Common ai-toolkit rules live in `.claude/rules/ai-toolkit-*.md`
|
|
9956
|
+
with Claude Code `paths` frontmatter so they load when project files
|
|
9957
|
+
are opened instead of expanding this CLAUDE.md at session startup.
|
|
9958
|
+
|
|
9959
|
+
Common rule files: `.claude/rules/ai-toolkit-coding-style.md`, ...
|
|
9960
|
+
|
|
9919
9961
|
Language-specific rules live in `<lang>-rules` knowledge skills (e.g.
|
|
9920
9962
|
`python-rules`, `typescript-rules`) and load automatically when their
|
|
9921
9963
|
triggers match.
|
|
9922
9964
|
|
|
9923
9965
|
Detected languages: `python-rules`, `typescript-rules`.
|
|
9924
|
-
|
|
9925
|
-
---
|
|
9926
|
-
|
|
9927
|
-
... full content of app/rules/common/*.md inlined here ...
|
|
9928
9966
|
<!-- TOOLKIT:language-rules END -->
|
|
9929
9967
|
```
|
|
9930
9968
|
|
|
9931
|
-
Re-running `install --local` is idempotent — the existing block is replaced, not duplicated. Per-language rules are not injected into `CLAUDE.md` for Claude — they are loaded contextually via their respective `<lang>-rules` knowledge skills.
|
|
9969
|
+
Re-running `install --local` is idempotent — the existing block is replaced, not duplicated, and only managed `.claude/rules/ai-toolkit-*.md` files are refreshed. User-authored `.claude/rules/*.md` files are preserved. Per-language rules are not injected into `CLAUDE.md` for Claude — they are loaded contextually via their respective `<lang>-rules` knowledge skills.
|
|
9932
9970
|
|
|
9933
9971
|
### Generating language-rules skills
|
|
9934
9972
|
|
|
@@ -9975,8 +10013,8 @@ Language rules are tracked as modules in `manifest.json`:
|
|
|
9975
10013
|
| | Common rules | Per-language rules | Other skills |
|
|
9976
10014
|
|---|---|---|---|
|
|
9977
10015
|
| Source | `app/rules/common/` | `app/rules/<lang>/` | `app/skills/<name>/SKILL.md` |
|
|
9978
|
-
| Delivery to Claude |
|
|
9979
|
-
| Visibility |
|
|
10016
|
+
| 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 |
|
|
10017
|
+
| Visibility | Loaded when project files are opened | Loaded when triggers match (file extensions, framework names) | Loaded when triggers match |
|
|
9980
10018
|
| Scope | Language-agnostic standards (security, git, testing, perf, style) | Per-language coding-style, frameworks, patterns, security, testing | Domain skills (testing, debugging, RAG, etc.) |
|
|
9981
10019
|
| Install | `ai-toolkit install --local` | Global install (skills directory is symlinked) | Global install |
|
|
9982
10020
|
| Other editors | Inlined into editor-specific rule files | Inlined into editor-specific rule files (still full content, not skills) | N/A |
|
|
@@ -11897,9 +11935,9 @@ title: "Supported Tools Registry"
|
|
|
11897
11935
|
category: reference
|
|
11898
11936
|
service: ai-toolkit
|
|
11899
11937
|
tags: [editors, platforms, generators, integration, ecosystem]
|
|
11900
|
-
version: "1.7.
|
|
11938
|
+
version: "1.7.1"
|
|
11901
11939
|
created: "2026-04-23"
|
|
11902
|
-
last_updated: "2026-06-
|
|
11940
|
+
last_updated: "2026-06-30"
|
|
11903
11941
|
description: "Human-readable view of scripts/ecosystem_tools.json — the canonical list of tools ai-toolkit integrates with (Claude Code + 11 editors), their documentation URLs, config paths, our generators, and tracked capability markers."
|
|
11904
11942
|
---
|
|
11905
11943
|
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softspark/ai-toolkit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.0",
|
|
4
4
|
"description": "AI coding toolkit: 108 skills, 44 agents, 12-editor write-through (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo, Aider, Augment, Antigravity, Codex, opencode), machine-enforced safety constitution, SARIF audit, signed npm provenance.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"description": "Authoritative registry of tools ai-toolkit integrates with. Consumed by scripts/ecosystem_doctor.py to detect upstream doc/version drift.",
|
|
4
|
-
"last_updated": "2026-06-
|
|
4
|
+
"last_updated": "2026-06-30",
|
|
5
5
|
"tools": [
|
|
6
6
|
{
|
|
7
7
|
"id": "claude-code",
|
|
@@ -226,7 +226,10 @@
|
|
|
226
226
|
".gemini/extensions/gemini-extension.json"
|
|
227
227
|
],
|
|
228
228
|
"our_generators": [
|
|
229
|
-
"scripts/generate_gemini.py"
|
|
229
|
+
"scripts/generate_gemini.py",
|
|
230
|
+
"scripts/generate_gemini_hooks.py",
|
|
231
|
+
"scripts/generate_gemini_commands.py",
|
|
232
|
+
"scripts/generate_gemini_skills.py"
|
|
230
233
|
],
|
|
231
234
|
"capability_markers": [
|
|
232
235
|
"GEMINI.md",
|
|
@@ -10,8 +10,10 @@ This is the proper progressive-disclosure replacement for the v1.3.8 pointer
|
|
|
10
10
|
block in ``.claude/CLAUDE.md``: instead of nudging Claude to Read absolute
|
|
11
11
|
nvm-pinned paths on demand, the rules ride on the Agent Skills mechanism.
|
|
12
12
|
|
|
13
|
-
Common rules (``app/rules/common/``)
|
|
14
|
-
|
|
13
|
+
Common rules (``app/rules/common/``) are installed as Claude Code
|
|
14
|
+
path-scoped ``.claude/rules/ai-toolkit-*.md`` files by ``install --local``.
|
|
15
|
+
This keeps ``CLAUDE.md`` below Claude's current size guidance while still
|
|
16
|
+
loading common guidance when project files are opened.
|
|
15
17
|
|
|
16
18
|
Idempotent: rerunning overwrites generated SKILL.md but leaves any other
|
|
17
19
|
files in the skill directory alone.
|
package/scripts/install.py
CHANGED
|
@@ -9,7 +9,7 @@ Claude Code (~/.claude/):
|
|
|
9
9
|
- Per-file symlinks: agents/*.md, skills/*/ (merges with user files)
|
|
10
10
|
- Merged JSON: hooks.json (toolkit entries tagged with _source)
|
|
11
11
|
- Marker injection: constitution.md, ARCHITECTURE.md (preserves user content)
|
|
12
|
-
-
|
|
12
|
+
- User-level rules: rules/ai-toolkit-*.md plus compact CLAUDE.md index
|
|
13
13
|
|
|
14
14
|
Other tools (global config locations):
|
|
15
15
|
- Windsurf: ~/.codeium/windsurf/memories/global_rules.md + ~/.codeium/windsurf/skills/
|
|
@@ -21,7 +21,7 @@ Other tools (global config locations):
|
|
|
21
21
|
- Codex: ~/AGENTS.md, ~/.agents/, ~/.codex/hooks.json
|
|
22
22
|
- opencode: ~/.config/opencode/
|
|
23
23
|
|
|
24
|
-
Registered rules (~/.softspark/ai-toolkit/rules/*.md) are also
|
|
24
|
+
Registered rules (~/.softspark/ai-toolkit/rules/*.md) are also synced into
|
|
25
25
|
all of the above. Add rules with: ai-toolkit add-rule <rule.md>
|
|
26
26
|
|
|
27
27
|
Usage:
|
|
@@ -412,7 +412,7 @@ def print_summary(local: bool = False) -> None:
|
|
|
412
412
|
else:
|
|
413
413
|
print()
|
|
414
414
|
print("Next steps:")
|
|
415
|
-
print(" 1.
|
|
415
|
+
print(" 1. Add hand-written global rules under ~/.claude/rules/ (avoid ai-toolkit-* prefix)")
|
|
416
416
|
print(" 2. Per project: ai-toolkit install --local --editors all")
|
|
417
417
|
print(" 3. To update: npm install -g @softspark/ai-toolkit@latest && ai-toolkit update")
|
|
418
418
|
print(" 4. To register rules from other tools: ai-toolkit add-rule <rule.md>")
|