@softspark/ai-toolkit 2.1.0 → 2.1.1

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/llms-full.txt CHANGED
@@ -27,7 +27,9 @@
27
27
  - [CI Integration](kb/reference/ci-integration.md)
28
28
  - [Claude Ecosystem Benchmark Snapshot](kb/reference/claude-ecosystem-benchmark-snapshot.md)
29
29
  - [Claude Ecosystem Expansion Foundations](kb/reference/claude-ecosystem-expansion-foundations.md)
30
+ - [CLI Reference](kb/reference/cli-reference.md)
30
31
  - [AI Toolkit - Codex CLI Compatibility](kb/reference/codex-cli-compatibility.md)
32
+ - [Ecosystem Comparison](kb/reference/comparison.md)
31
33
  - [Plan: Competitive Features — ai-toolkit](kb/reference/competitive-features-implementation.md)
32
34
  - [Distribution Model](kb/reference/distribution-model.md)
33
35
  - [Enterprise Config Inheritance Guide](kb/reference/enterprise-config-guide.md)
@@ -49,6 +51,7 @@
49
51
  - [Skills Unification Model](kb/reference/skills-unification.md)
50
52
  - [Usage Statistics](kb/reference/stats.md)
51
53
  - [Config Sync](kb/reference/sync.md)
54
+ - [Unique Features & Differentiators](kb/reference/unique-features.md)
52
55
  - [Troubleshooting](kb/troubleshooting/README.md)
53
56
 
54
57
  ## Skills
@@ -5112,6 +5115,146 @@ The reference benchmark set is intentionally curated:
5112
5115
 
5113
5116
  ---
5114
5117
 
5118
+ ## kb/reference/cli-reference.md
5119
+
5120
+ ---
5121
+ title: "CLI Reference"
5122
+ category: reference
5123
+ service: ai-toolkit
5124
+ tags: [cli, commands, reference, install, update, plugin, mcp]
5125
+ created: "2026-04-13"
5126
+ last_updated: "2026-04-13"
5127
+ description: "Complete CLI reference for all ai-toolkit commands, options, and flags."
5128
+ ---
5129
+
5130
+ # CLI Reference
5131
+
5132
+ ```
5133
+ Usage: ai-toolkit <command> [options]
5134
+ ```
5135
+
5136
+ ## Core Commands
5137
+
5138
+ | Command | Description |
5139
+ |---------|-------------|
5140
+ | `install` | First-time global install into `~/.claude/` + Cursor, Windsurf, Gemini |
5141
+ | `install --local` | Claude Code configs only; add `--editors all` or `--editors cursor,aider` for other tools |
5142
+ | `update` | Re-apply toolkit after `npm install -g @softspark/ai-toolkit@latest` |
5143
+ | `update --local` | Re-apply + auto-detect editors from existing project files |
5144
+ | `reset --local` | Wipe all project-local configs and recreate from scratch (clean slate) |
5145
+ | `status` | Show installed modules and version |
5146
+ | `uninstall` | Remove toolkit from `~/.claude/` |
5147
+ | `validate` | Verify toolkit integrity (`--strict` for CI-grade, warnings = errors) |
5148
+ | `doctor` | Diagnose install health, hooks, quick-win assets, and artifact drift |
5149
+ | `doctor --fix` | Auto-repair broken symlinks, missing hooks, stale artifacts |
5150
+ | `eject [dir]` | Export standalone config (no symlinks, no toolkit dependency) |
5151
+
5152
+ ## Rule & Hook Injection
5153
+
5154
+ | Command | Description |
5155
+ |---------|-------------|
5156
+ | `add-rule <rule.md> [name]` | Register rule in `~/.softspark/ai-toolkit/rules/` — auto-applied on every `update` |
5157
+ | `remove-rule <name> [dir]` | Unregister rule and remove its block from `CLAUDE.md` |
5158
+ | `inject-hook <file.json>` | Inject external hooks into settings.json (idempotent, `_source` tagged) |
5159
+ | `remove-hook <name>` | Remove injected hooks by source name |
5160
+
5161
+ ## MCP Management
5162
+
5163
+ | Command | Description |
5164
+ |---------|-------------|
5165
+ | `mcp list` | List available MCP server templates (25 templates) |
5166
+ | `mcp editors` | List editors with native MCP config adapters and scopes |
5167
+ | `mcp add <name> [names...]` | Add MCP server template(s) to `.mcp.json` |
5168
+ | `mcp install --editor <name[,..]> [names...]` | Install templates into native editor MCP config |
5169
+ | `mcp show <name>` | Show MCP template config details |
5170
+ | `mcp remove <name>` | Remove MCP server from `.mcp.json` or editor MCP config |
5171
+
5172
+ ## Plugin Management
5173
+
5174
+ | Command | Description |
5175
+ |---------|-------------|
5176
+ | `plugin list` | Show available plugin packs with install status |
5177
+ | `plugin install <name> [--editor claude\|codex\|all]` | Install a plugin pack for selected runtime(s) |
5178
+ | `plugin install --all [--editor claude\|codex\|all]` | Install all 11 plugin packs |
5179
+ | `plugin update <name> [--editor claude\|codex\|all]` | Update a plugin pack (remove + reinstall, preserves data) |
5180
+ | `plugin update --all [--editor claude\|codex\|all]` | Update all installed plugin packs |
5181
+ | `plugin clean <name> [--days N]` | Prune old plugin data (default: 90 days) |
5182
+ | `plugin remove <name> [--editor claude\|codex\|all]` | Remove a plugin pack |
5183
+ | `plugin status [--editor claude\|codex\|all]` | Show installed plugins with runtime-specific details |
5184
+
5185
+ ## Config Inheritance
5186
+
5187
+ | Command | Description |
5188
+ |---------|-------------|
5189
+ | `config validate [path]` | Validate `.softspark-toolkit.json` schema + extends + enforcement |
5190
+ | `config diff [path]` | Show project vs base config differences |
5191
+ | `config init [flags]` | Create `.softspark-toolkit.json` (`--extends`, `--profile`, `--no-extends`) |
5192
+ | `config create-base <name>` | Scaffold base config npm package |
5193
+ | `config check [path]` | CI enforcement gate (exit 0=pass, 1=fail, 2=no config; `--json`) |
5194
+
5195
+ ## Project Registry
5196
+
5197
+ | Command | Description |
5198
+ |---------|-------------|
5199
+ | `projects` | List registered projects |
5200
+ | `projects --prune` | Remove stale (deleted) entries |
5201
+ | `projects remove /path` | Unregister specific project |
5202
+
5203
+ ## Generator Commands
5204
+
5205
+ | Command | Description |
5206
+ |---------|-------------|
5207
+ | `generate-all` | Generate all platform configs at once |
5208
+ | `agents-md` | Regenerate `AGENTS.md` from agent definitions |
5209
+ | `codex-md` | Generate `AGENTS.md` with marker injection for Codex CLI |
5210
+ | `codex-rules` | Generate `.agents/rules/*.md` for Codex CLI |
5211
+ | `codex-hooks` | Generate `.codex/hooks.json` for Codex CLI |
5212
+ | `cursor-rules` | Generate `.cursorrules` (legacy single file) |
5213
+ | `cursor-mdc` | Generate `.cursor/rules/*.mdc` (recommended) |
5214
+ | `windsurf-rules` | Generate `.windsurfrules` (legacy) |
5215
+ | `windsurf-dir-rules` | Generate `.windsurf/rules/*.md` (recommended) |
5216
+ | `copilot-instructions` | Generate `.github/copilot-instructions.md` |
5217
+ | `gemini-md` | Generate `GEMINI.md` for Gemini CLI |
5218
+ | `cline-rules` | Generate `.clinerules` (legacy) |
5219
+ | `cline-dir-rules` | Generate `.clinerules/*.md` (recommended) |
5220
+ | `roo-modes` | Generate `.roomodes` |
5221
+ | `roo-dir-rules` | Generate `.roo/rules/*.md` |
5222
+ | `aider-conf` | Generate `.aider.conf.yml` |
5223
+ | `conventions-md` | Generate `CONVENTIONS.md` for Aider |
5224
+ | `augment-rules` | Generate `.augment/rules/ai-toolkit.md` (legacy) |
5225
+ | `augment-dir-rules` | Generate `.augment/rules/ai-toolkit-*.md` (recommended) |
5226
+ | `antigravity-rules` | Generate `.agent/rules/` and `.agent/workflows/` |
5227
+ | `llms-txt` | Generate `llms.txt` and `llms-full.txt` |
5228
+
5229
+ ## Other Commands
5230
+
5231
+ | Command | Description |
5232
+ |---------|-------------|
5233
+ | `stats` | Show skill usage statistics (`--reset` to clear, `--json` for raw output) |
5234
+ | `benchmark --my-config` | Compare your config vs defaults vs ecosystem |
5235
+ | `benchmark-ecosystem` | Generate ecosystem benchmark snapshot |
5236
+ | `create skill <name>` | Scaffold new skill from template (`--template=linter\|reviewer\|generator\|workflow\|knowledge`) |
5237
+ | `sync` | Config portability via GitHub Gist (`--export`, `--push`, `--pull`, `--import`) |
5238
+ | `compile-slm` | Compile toolkit into minimal SLM system prompt (`--budget`, `--model-size`, `--dry-run`) |
5239
+ | `evaluate` | Run skill evaluation suite |
5240
+
5241
+ ## Install / Update Options
5242
+
5243
+ ```bash
5244
+ ai-toolkit install --only agents,hooks # apply only listed components
5245
+ ai-toolkit install --skip hooks # skip listed components
5246
+ ai-toolkit install --profile minimal # minimal | standard | strict
5247
+ ai-toolkit install --persona backend-lead # backend-lead | frontend-lead | devops-eng | junior-dev
5248
+ ai-toolkit install --local --editors all # Claude Code + all editors
5249
+ ai-toolkit install --local --editors cursor,aider # + specific editors
5250
+ ai-toolkit install --local --lang typescript # explicit language rules
5251
+ ai-toolkit install --modules core,agents,rules-typescript # selective modules
5252
+ ai-toolkit install --list # dry-run: show what would change
5253
+ ai-toolkit update --local # auto-detects editors from existing files
5254
+ ```
5255
+
5256
+ ---
5257
+
5115
5258
  ## kb/reference/codex-cli-compatibility.md
5116
5259
 
5117
5260
  ---
@@ -5253,6 +5396,40 @@ The Codex compatibility path is verified by:
5253
5396
 
5254
5397
  ---
5255
5398
 
5399
+ ## kb/reference/comparison.md
5400
+
5401
+ ---
5402
+ title: "Ecosystem Comparison"
5403
+ category: reference
5404
+ service: ai-toolkit
5405
+ tags: [comparison, ecosystem, features, alternatives]
5406
+ created: "2026-04-13"
5407
+ last_updated: "2026-04-13"
5408
+ description: "Feature comparison of ai-toolkit vs other Claude Code toolkits and agent frameworks."
5409
+ ---
5410
+
5411
+ # Ecosystem Comparison
5412
+
5413
+ | Feature | ai-toolkit | everything-claude-code | wshobson/agents | ruflo |
5414
+ |---------|---------------|----------------------|-----------------|-------|
5415
+ | Skills | 92 | 100+ | 146 | 20+ |
5416
+ | Agents | 44 | 30+ | 112 | 20+ |
5417
+ | Machine-enforced constitution | **Yes** | No (docs only) | No | No |
5418
+ | Skill-scoped lifecycle hooks | **Yes** | No | No | No |
5419
+ | Effort-based model budgeting | **Yes** | No | No | No |
5420
+ | Test suite | Yes (bats) | Yes (997 tests) | No | Yes |
5421
+ | npm/npx install | Yes | Yes | Yes | Yes |
5422
+ | Cross-tool support | **Cursor, Windsurf, Copilot, Gemini, Cline, Roo, Aider, Augment, Antigravity, Codex** | 5+ tools | Smithery | Limited |
5423
+ | Selective install | Yes | Yes | Yes (72 plugins) | No |
5424
+ | Session persistence | Yes | Yes | No | No |
5425
+ | Architecture notes | **Yes** | No | No | No |
5426
+ | KB/RAG integration | **Yes** | No | No | Yes |
5427
+ | License | MIT | MIT | MIT | MIT |
5428
+
5429
+ For live benchmark data, see the [ecosystem benchmark snapshot](claude-ecosystem-benchmark-snapshot.md).
5430
+
5431
+ ---
5432
+
5256
5433
  ## kb/reference/competitive-features-implementation.md
5257
5434
 
5258
5435
  ---
@@ -8863,6 +9040,224 @@ ai-toolkit sync --pull abc123def456 # Use gist ID from first push
8863
9040
 
8864
9041
  ---
8865
9042
 
9043
+ ## kb/reference/unique-features.md
9044
+
9045
+ ---
9046
+ title: "Unique Features & Differentiators"
9047
+ category: reference
9048
+ service: ai-toolkit
9049
+ tags: [features, differentiators, constitution, hooks, security, tdd, memory]
9050
+ created: "2026-04-13"
9051
+ last_updated: "2026-04-13"
9052
+ description: "Detailed description of ai-toolkit's unique features: constitution enforcement, hooks system, security scanning, effort budgeting, quality gates, and more."
9053
+ ---
9054
+
9055
+ # Unique Features & Differentiators
9056
+
9057
+ ## 1. Machine-Enforced Constitution
9058
+
9059
+ Unlike other toolkits that put safety rules in documentation only, ai-toolkit enforces a 5-article constitution via `PreToolUse` hooks. The hook actually **blocks** execution of:
9060
+ - Mass deletion (`rm -rf`, `DROP TABLE`)
9061
+ - Blind overwrites of uncommitted work
9062
+ - Any action that could cause irreversible data loss
9063
+
9064
+ ## 2. Hooks as Executable Scripts
9065
+
9066
+ Hook logic lives in `app/hooks/*.sh` — not inline JSON one-liners. Scripts are copied to `~/.softspark/ai-toolkit/hooks/` on install and referenced from `~/.claude/settings.json`. Easy to read, debug, and extend.
9067
+
9068
+ **12 lifecycle events / 21 global hook entries:**
9069
+
9070
+ | Event | Script | Action |
9071
+ |-------|--------|--------|
9072
+ | SessionStart | `session-start.sh` | MANDATORY rules reminder + session context + instincts |
9073
+ | SessionStart | `mcp-health.sh` | Check MCP server command availability (non-blocking warning) |
9074
+ | SessionStart | `session-context.sh` | Capture environment snapshot to `~/.softspark/ai-toolkit/sessions/current-context.json` |
9075
+ | Notification | `notify-waiting.sh` | Cross-platform desktop notification |
9076
+ | PreToolUse | `guard-destructive.sh` | Block `rm -rf`, `DROP TABLE`, etc. |
9077
+ | PreToolUse | `guard-path.sh` | Block wrong-user path hallucination |
9078
+ | PreToolUse | `guard-config.sh` | Block edits to linter/formatter config files unless explicitly requested |
9079
+ | PreToolUse | `commit-quality.sh` | Advisory validation of git commit messages |
9080
+ | UserPromptSubmit | `user-prompt-submit.sh` | Prompt governance reminder |
9081
+ | UserPromptSubmit | `track-usage.sh` | Record skill invocations to local stats |
9082
+ | PostToolUse | `post-tool-use.sh` | Lightweight validation reminders after edits |
9083
+ | PostToolUse | `governance-capture.sh` | Log security-sensitive operations to JSONL |
9084
+ | Stop | `quality-check.sh` | Multi-language lint (ruff/tsc/phpstan/dart/go) |
9085
+ | Stop | `save-session.sh` | Persist session context for cross-session continuity |
9086
+ | TaskCompleted | `quality-gate.sh` | Block task completion on lint/type errors |
9087
+ | SubagentStart | `subagent-start.sh` | Narrow-scope reminder for spawned subagents |
9088
+ | SubagentStop | `subagent-stop.sh` | Completion checklist for subagent handoff |
9089
+ | PreCompact | `pre-compact.sh` | Smart compaction: prioritized context |
9090
+ | PreCompact | `pre-compact-save.sh` | Save timestamped context backup |
9091
+ | SessionEnd | `session-end.sh` | Persist a session-end handoff note |
9092
+ | TeammateIdle | *(inline)* | Completeness reminder |
9093
+
9094
+ **5 skill-scoped hooks:**
9095
+
9096
+ | Skill | Hook | Action |
9097
+ |-------|------|--------|
9098
+ | `/commit` | Pre | Run linter, block on failure |
9099
+ | `/test` | Post | Coverage check, report threshold |
9100
+ | `/deploy` | Post | Health check, rollback if degraded |
9101
+ | `/migrate` | Pre | Backup verification |
9102
+ | `/rollback` | Post | State verification |
9103
+
9104
+ ## 3. Security Scanning
9105
+
9106
+ Two complementary security tools:
9107
+
9108
+ **`/skill-audit`** — scan skills and agents for code-level risks:
9109
+
9110
+ ```bash
9111
+ /skill-audit # Interactive (Claude remediation)
9112
+ python3 scripts/audit_skills.py --ci # CI mode: exit 1 on HIGH
9113
+ ```
9114
+
9115
+ Detects: `eval()`/`exec()`, hardcoded secrets, permission issues, bash risks.
9116
+
9117
+ **`/cve-scan`** — scan project dependencies for known CVEs:
9118
+
9119
+ ```bash
9120
+ /cve-scan # Auto-detect ecosystems, scan all
9121
+ python3 app/skills/cve-scan/scripts/cve_scan.py # Direct invocation
9122
+ python3 app/skills/cve-scan/scripts/cve_scan.py --json # Machine-readable
9123
+ ```
9124
+
9125
+ Supports: npm, pip, composer, cargo, go, ruby, dart. Uses native audit tools — zero external deps.
9126
+
9127
+ **Severity levels:** HIGH (blocks CI), WARN (should fix), INFO (review)
9128
+
9129
+ ## 4. Effort-Based Model Budgeting
9130
+
9131
+ Every skill declares an effort level used for model token budgeting:
9132
+ - `low` — lint, build, fix (fast, cheap)
9133
+ - `medium` — debug, analyze, ci
9134
+ - `high` — review, plan, refactor, docs
9135
+ - `max` — orchestrate, swarm, workflow
9136
+
9137
+ ## 5. Multi-Language Quality Gates
9138
+
9139
+ The `Stop` hook runs after every response across 5 languages:
9140
+
9141
+ | Language | Lint | Type Check |
9142
+ |----------|------|-----------|
9143
+ | Python | ruff | mypy --strict |
9144
+ | TypeScript | ESLint/tsc | tsc --noEmit |
9145
+ | PHP | phpstan | phpstan |
9146
+ | Dart | dart analyze | dart analyze |
9147
+ | Go | go vet | go vet |
9148
+
9149
+ ## 6. Iron Law Enforcement
9150
+
9151
+ Three skills enforce non-negotiable quality gates with anti-rationalization tables:
9152
+
9153
+ | Skill | Iron Law | What it prevents |
9154
+ |-------|----------|-----------------|
9155
+ | `/tdd` | `NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST` | Code written before test? Delete it. Start over. |
9156
+ | `debugging-tactics` | `NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST` | 4-phase debugging: root cause → pattern → hypothesis → fix. |
9157
+ | `verification-before-completion` | `NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE` | Gate: IDENTIFY → RUN → READ → VERIFY → CLAIM. |
9158
+
9159
+ Additionally, **15 core skills** include `## Common Rationalizations` tables — domain-specific excuses with rebuttals that prevent agent drift.
9160
+
9161
+ ## 7. Confidence Scoring & Self-Evaluation (`/review`)
9162
+
9163
+ The `/review` skill outputs findings with per-issue confidence scores (1-10) and severity classification (critical/major/minor/nit). After completing a review, an LLM-as-Judge self-evaluation pass checks for blind spots: anchoring bias, assumption vs verification, missing unhappy paths, and calibrates confidence scores.
9164
+
9165
+ ## 8. Agent Verification Checklists
9166
+
9167
+ 10 key agents include `## Verification Checklist` — exit criteria that MUST be met before presenting results:
9168
+
9169
+ | Agent | Key exit criteria |
9170
+ |-------|------------------|
9171
+ | `code-reviewer` | Every finding has file:line + evidence, not just opinion |
9172
+ | `security-auditor` | Each finding includes proof-of-concept or exploit path |
9173
+ | `test-engineer` | No empty/placeholder tests, mocks only at boundaries |
9174
+ | `debugger` | Root cause identified, regression test added |
9175
+ | `backend-specialist` | Input validation, error format, query optimization |
9176
+ | `frontend-specialist` | Empty/loading/error states, accessibility, responsive |
9177
+ | `database-architect` | Migration tested on prod-like volume, rollback tested |
9178
+ | `performance-optimizer` | Baseline measured, profiler evidence attached |
9179
+ | `devops-implementer` | Dry run passed, rollback documented, no hardcoded secrets |
9180
+ | `documenter` | Code examples runnable, no placeholders, valid links |
9181
+
9182
+ ## 9. Skill Reference Routing
9183
+
9184
+ 7 core skills include `## Related Skills` sections that suggest logical follow-up skills:
9185
+
9186
+ ```
9187
+ /review → found issues? → /debug, /tdd, /cve-scan, /analyze
9188
+ /debug → bug fixed? → /review, /tdd, /workflow incident-response
9189
+ /plan → approved? → /orchestrate, /write-a-prd, /grill-me
9190
+ ```
9191
+
9192
+ ## 10. Two-Stage Review (`/subagent-development`)
9193
+
9194
+ Per-task review pipeline inspired by [obra/superpowers](https://github.com/obra/superpowers):
9195
+
9196
+ ```
9197
+ Implementer → Spec Compliance Review → Code Quality Review → Next Task
9198
+ ```
9199
+
9200
+ - Implementer reports: `DONE` / `DONE_WITH_CONCERNS` / `NEEDS_CONTEXT` / `BLOCKED`
9201
+ - Spec reviewer: all requirements met, nothing extra, nothing missing
9202
+ - Quality reviewer: SOLID, naming, error handling, tests, security
9203
+
9204
+ ## 11. Ralph Wiggum Loop (`/repeat`)
9205
+
9206
+ Autonomous agent loop with safety controls:
9207
+
9208
+ ```bash
9209
+ /repeat 5m /test # run tests every 5 min until all pass
9210
+ /repeat --iterations 3 /review # max 3 review passes
9211
+ ```
9212
+
9213
+ | Safety Control | Default |
9214
+ |----------------|---------|
9215
+ | Max iterations | 5 |
9216
+ | Circuit breaker | 3 consecutive failures → halt |
9217
+ | Min interval | 1 minute |
9218
+ | Exit detection | DONE / COMPLETE / ALL PASS |
9219
+
9220
+ ## 12. Persistent Memory (`memory-pack` plugin)
9221
+
9222
+ SQLite-based session memory (opt-in plugin pack):
9223
+
9224
+ | Component | Purpose |
9225
+ |-----------|---------|
9226
+ | `observation-capture.sh` | PostToolUse hook — captures tool actions to SQLite |
9227
+ | `session-summary.sh` | Stop hook — AI-compress session observations |
9228
+ | `mem-search` skill | FTS5 full-text search across past sessions |
9229
+ | `<private>` tags | Content between tags stripped before storage |
9230
+ | Progressive disclosure | Summary (~500 tok) → relevant (~2k tok) → full |
9231
+
9232
+ ## 13. Persona Presets
9233
+
9234
+ 4 engineering personas that adjust Claude's communication style per role:
9235
+
9236
+ | Persona | Focus | Key Skills |
9237
+ |---------|-------|------------|
9238
+ | `backend-lead` | System design, scalability, data integrity | `/workflow backend-feature`, `/tdd` |
9239
+ | `frontend-lead` | Component architecture, a11y, Core Web Vitals | `/design-an-interface`, `/review` |
9240
+ | `devops-eng` | IaC, CI/CD, blast radius, rollback safety | `/workflow infrastructure-change`, `/deploy` |
9241
+ | `junior-dev` | Step-by-step explanations, learning focus | `/explain`, `/explore`, `/debug` |
9242
+
9243
+ Persistent via `--persona` at install time, or session-scoped via `/persona` runtime command.
9244
+
9245
+ ## 14. Visual Brainstorming Companion
9246
+
9247
+ Optional browser-based companion for `/write-a-prd` and `/design-an-interface`:
9248
+ - Ephemeral Node.js HTTP server (auto-kills after 30min idle)
9249
+ - Dark theme, responsive, zero external dependencies
9250
+ - Per-question routing: mockups/diagrams → browser, text/conceptual → terminal
9251
+
9252
+ ## 15. KB Integration Protocol
9253
+
9254
+ Agents follow a research-before-action protocol enforced via rules:
9255
+ 1. `smart_query()` or `hybrid_search_kb()` before any technical answer
9256
+ 2. Source citation mandatory (`[PATH: kb/...]`)
9257
+ 3. Strict order: KB → Files → External Docs → General Knowledge
9258
+
9259
+ ---
9260
+
8866
9261
  ## kb/troubleshooting/README.md
8867
9262
 
8868
9263
  ---
package/llms.txt CHANGED
@@ -27,7 +27,9 @@
27
27
  - [CI Integration](kb/reference/ci-integration.md)
28
28
  - [Claude Ecosystem Benchmark Snapshot](kb/reference/claude-ecosystem-benchmark-snapshot.md)
29
29
  - [Claude Ecosystem Expansion Foundations](kb/reference/claude-ecosystem-expansion-foundations.md)
30
+ - [CLI Reference](kb/reference/cli-reference.md)
30
31
  - [AI Toolkit - Codex CLI Compatibility](kb/reference/codex-cli-compatibility.md)
32
+ - [Ecosystem Comparison](kb/reference/comparison.md)
31
33
  - [Plan: Competitive Features — ai-toolkit](kb/reference/competitive-features-implementation.md)
32
34
  - [Distribution Model](kb/reference/distribution-model.md)
33
35
  - [Enterprise Config Inheritance Guide](kb/reference/enterprise-config-guide.md)
@@ -49,4 +51,5 @@
49
51
  - [Skills Unification Model](kb/reference/skills-unification.md)
50
52
  - [Usage Statistics](kb/reference/stats.md)
51
53
  - [Config Sync](kb/reference/sync.md)
54
+ - [Unique Features & Differentiators](kb/reference/unique-features.md)
52
55
  - [Troubleshooting](kb/troubleshooting/README.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softspark/ai-toolkit",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Professional-grade AI coding toolkit: 92 skills, 44 agents, multi-platform support (Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, Augment, Google Antigravity, Codex CLI), machine-enforced safety constitution, persona presets, skill security auditor, expanded lifecycle hooks, 11 plugin packs, and benchmark tooling.",
5
5
  "keywords": [
6
6
  "claude",
@@ -46,7 +46,7 @@
46
46
  "evaluate": "python3 scripts/evaluate_skills.py",
47
47
  "benchmark:ecosystem": "python3 scripts/benchmark_ecosystem.py --offline",
48
48
  "benchmark:harvest": "python3 scripts/harvest_ecosystem.py --offline",
49
- "generate:agents": "python3 scripts/generate_agents_md.py > AGENTS.md",
49
+ "generate:agents": "python3 scripts/generate_codex.py > AGENTS.md",
50
50
  "generate:cursor": "python3 scripts/generate_cursor_rules.py > .cursorrules",
51
51
  "generate:llms": "python3 scripts/generate_llms_txt.py > llms.txt && python3 scripts/generate_llms_txt.py --full > llms-full.txt",
52
52
  "generate:windsurf": "python3 scripts/generate_windsurf.py > .windsurfrules",
@@ -11,6 +11,7 @@ from pathlib import Path
11
11
 
12
12
  sys.path.insert(0, str(Path(__file__).resolve().parent))
13
13
  from _common import agents_dir, frontmatter_field
14
+ from paths import RULES_DIR
14
15
 
15
16
 
16
17
  def main() -> None:
@@ -86,6 +87,18 @@ def main() -> None:
86
87
  print("---")
87
88
  print()
88
89
 
90
+ # Registered custom rules from ~/.softspark/ai-toolkit/rules/
91
+ if RULES_DIR.is_dir():
92
+ for rule_file in sorted(RULES_DIR.glob("*.md")):
93
+ rule_name = rule_file.stem
94
+ print(f"<!-- TOOLKIT:{rule_name} START -->")
95
+ print("<!-- Auto-injected by ai-toolkit. Re-run to update. -->")
96
+ print()
97
+ print(rule_file.read_text(encoding="utf-8").rstrip())
98
+ print()
99
+ print(f"<!-- TOOLKIT:{rule_name} END -->")
100
+ print()
101
+
89
102
 
90
103
  if __name__ == "__main__":
91
104
  main()
@@ -40,7 +40,8 @@ def generate(target_dir: Path, *,
40
40
 
41
41
  def main() -> None:
42
42
  target = Path(sys.argv[1]) if len(sys.argv) > 1 else Path.cwd()
43
- generate(target)
43
+ from paths import RULES_DIR
44
+ generate(target, rules_dir=RULES_DIR)
44
45
 
45
46
 
46
47
  if __name__ == "__main__":
@@ -134,7 +134,8 @@ def generate(target_dir: Path, *,
134
134
 
135
135
  def main() -> None:
136
136
  target = Path(sys.argv[1]) if len(sys.argv) > 1 else Path.cwd()
137
- generate(target)
137
+ from paths import RULES_DIR
138
+ generate(target, rules_dir=RULES_DIR)
138
139
 
139
140
 
140
141
  if __name__ == "__main__":
@@ -48,7 +48,8 @@ def generate(target_dir: Path, *,
48
48
 
49
49
  def main() -> None:
50
50
  target = Path(sys.argv[1]) if len(sys.argv) > 1 else Path.cwd()
51
- generate(target)
51
+ from paths import RULES_DIR
52
+ generate(target, rules_dir=RULES_DIR)
52
53
 
53
54
 
54
55
  if __name__ == "__main__":
@@ -22,6 +22,7 @@ from emission import (
22
22
  print_toolkit_start,
23
23
  )
24
24
  from frontmatter import frontmatter_field
25
+ from paths import RULES_DIR
25
26
 
26
27
 
27
28
  def _emit_agents() -> str:
@@ -87,6 +88,18 @@ def main() -> None:
87
88
 
88
89
  print_toolkit_end()
89
90
 
91
+ # Registered custom rules from ~/.softspark/ai-toolkit/rules/
92
+ if RULES_DIR.is_dir():
93
+ for rule_file in sorted(RULES_DIR.glob("*.md")):
94
+ rule_name = rule_file.stem
95
+ print()
96
+ print(f"<!-- TOOLKIT:{rule_name} START -->")
97
+ print("<!-- Auto-injected by ai-toolkit. Re-run to update. -->")
98
+ print()
99
+ print(rule_file.read_text(encoding="utf-8").rstrip())
100
+ print()
101
+ print(f"<!-- TOOLKIT:{rule_name} END -->")
102
+
90
103
 
91
104
  if __name__ == "__main__":
92
105
  main()
@@ -44,7 +44,8 @@ def generate(target_dir: Path, *,
44
44
 
45
45
  def main() -> None:
46
46
  target = Path(sys.argv[1]) if len(sys.argv) > 1 else Path.cwd()
47
- generate(target)
47
+ from paths import RULES_DIR
48
+ generate(target, rules_dir=RULES_DIR)
48
49
 
49
50
 
50
51
  if __name__ == "__main__":
@@ -149,7 +149,8 @@ def generate(target_dir: Path, *,
149
149
 
150
150
  def main() -> None:
151
151
  target = Path(sys.argv[1]) if len(sys.argv) > 1 else Path.cwd()
152
- generate(target)
152
+ from paths import RULES_DIR
153
+ generate(target, rules_dir=RULES_DIR)
153
154
 
154
155
 
155
156
  if __name__ == "__main__":
@@ -33,7 +33,8 @@ def generate(target_dir: Path, *,
33
33
 
34
34
  def main() -> None:
35
35
  target = Path(sys.argv[1]) if len(sys.argv) > 1 else Path.cwd()
36
- generate(target)
36
+ from paths import RULES_DIR
37
+ generate(target, rules_dir=RULES_DIR)
37
38
 
38
39
 
39
40
  if __name__ == "__main__":
@@ -34,7 +34,8 @@ def generate(target_dir: Path, *,
34
34
 
35
35
  def main() -> None:
36
36
  target = Path(sys.argv[1]) if len(sys.argv) > 1 else Path.cwd()
37
- generate(target)
37
+ from paths import RULES_DIR
38
+ generate(target, rules_dir=RULES_DIR)
38
39
 
39
40
 
40
41
  if __name__ == "__main__":
@@ -27,6 +27,9 @@ Usage::
27
27
  from __future__ import annotations
28
28
 
29
29
  import sys
30
+ from pathlib import Path
31
+
32
+ from paths import RULES_DIR
30
33
 
31
34
  from emission import (
32
35
  count_agents_and_skills,
@@ -138,3 +141,15 @@ def render_generator(config: dict) -> None:
138
141
  if config.get("use_markers", True):
139
142
  print()
140
143
  print_toolkit_end()
144
+
145
+ # Registered custom rules from ~/.softspark/ai-toolkit/rules/
146
+ if RULES_DIR.is_dir():
147
+ for rule_file in sorted(RULES_DIR.glob("*.md")):
148
+ rule_name = rule_file.stem
149
+ print()
150
+ print(f"<!-- TOOLKIT:{rule_name} START -->")
151
+ print("<!-- Auto-injected by ai-toolkit. Re-run to update. -->")
152
+ print()
153
+ print(rule_file.read_text(encoding="utf-8").rstrip())
154
+ print()
155
+ print(f"<!-- TOOLKIT:{rule_name} END -->")