@softspark/ai-toolkit 2.1.0 → 2.1.2
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 +47 -0
- package/CHANGELOG.md +26 -0
- package/README.md +141 -801
- package/bin/ai-toolkit.js +15 -3
- package/kb/reference/cli-reference.md +135 -0
- package/kb/reference/comparison.md +29 -0
- package/kb/reference/unique-features.md +213 -0
- package/llms-full.txt +395 -0
- package/llms.txt +3 -0
- package/package.json +1 -1
- package/scripts/generate_agents_md.py +15 -0
- package/scripts/generate_antigravity.py +2 -1
- package/scripts/generate_augment_rules.py +2 -1
- package/scripts/generate_cline_rules.py +2 -1
- package/scripts/generate_codex.py +16 -0
- package/scripts/generate_codex_rules.py +2 -1
- package/scripts/generate_cursor_mdc.py +2 -1
- package/scripts/generate_roo_rules.py +2 -1
- package/scripts/generate_windsurf_rules.py +2 -1
- package/scripts/generator_base.py +17 -0
- package/scripts/install_steps/ai_tools.py +3 -1
package/bin/ai-toolkit.js
CHANGED
|
@@ -203,11 +203,12 @@ function showHelp() {
|
|
|
203
203
|
console.log('\nOptions for install / update:');
|
|
204
204
|
console.log(' --only <list> Apply only listed components (e.g. agents,hooks,cursor,windsurf,gemini)');
|
|
205
205
|
console.log(' --skip <list> Skip listed components');
|
|
206
|
-
console.log(' --local Also set up project-local configs (CLAUDE.md, settings, constitution,
|
|
206
|
+
console.log(' --local Also set up project-local configs (CLAUDE.md, settings, constitution, language rules, git hooks)');
|
|
207
207
|
console.log(' --profile <p> Install profile: minimal (agents+skills), standard (default), strict (all+git hooks)');
|
|
208
|
+
console.log(' --persona <p> Persona preset: backend-lead, frontend-lead, devops-eng, junior-dev');
|
|
208
209
|
console.log(' --modules <list> Install specific modules (e.g. core,agents,rules-typescript)');
|
|
209
210
|
console.log(' --lang <list> Explicitly select language rules (e.g. typescript, go,python)');
|
|
210
|
-
console.log(' --editors <list> Install editor configs: cursor,windsurf,cline,roo,aider,augment,copilot,antigravity (or "all")');
|
|
211
|
+
console.log(' --editors <list> Install editor configs: cursor,windsurf,cline,roo,aider,augment,copilot,antigravity,codex (or "all")');
|
|
211
212
|
console.log(' Default with --local: auto-detect from existing project files');
|
|
212
213
|
console.log(' --auto-detect Detect project languages and install matching rule modules');
|
|
213
214
|
console.log(' --list, --dry-run Dry-run: show what would be applied');
|
|
@@ -403,7 +404,10 @@ function handleConfig(args) {
|
|
|
403
404
|
* @param {string[]} _args - Unused, kept for signature consistency
|
|
404
405
|
*/
|
|
405
406
|
function handleGenerateAll(_args) {
|
|
406
|
-
for (const gen of Object.
|
|
407
|
+
for (const [name, gen] of Object.entries(GENERATORS)) {
|
|
408
|
+
// Skip codex-md — it injects a Codex config block via markers (used by install --local --editors codex)
|
|
409
|
+
// agents-md generates the full agent list which is the standalone AGENTS.md
|
|
410
|
+
if (name === 'codex-md') continue;
|
|
407
411
|
writeGeneratorOutput(gen);
|
|
408
412
|
}
|
|
409
413
|
// Directory-based generators (multi-file output)
|
|
@@ -420,6 +424,14 @@ function handleGenerateAll(_args) {
|
|
|
420
424
|
fs.writeFileSync(path.join(CWD, 'CONVENTIONS.md'), conventionsOut);
|
|
421
425
|
console.log('Generated: CONVENTIONS.md');
|
|
422
426
|
generateLlmsTxt();
|
|
427
|
+
// Re-inject registered custom rules into .claude/CLAUDE.md (idempotent markers)
|
|
428
|
+
const rulesDir = path.join(process.env.HOME, '.softspark', 'ai-toolkit', 'rules');
|
|
429
|
+
if (fs.existsSync(rulesDir)) {
|
|
430
|
+
const ruleFiles = fs.readdirSync(rulesDir).filter(f => f.endsWith('.md')).sort();
|
|
431
|
+
for (const rf of ruleFiles) {
|
|
432
|
+
run(scriptPath('inject_rule_cli.py'), [path.join(rulesDir, rf), CWD]);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
423
435
|
}
|
|
424
436
|
|
|
425
437
|
/**
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "CLI Reference"
|
|
3
|
+
category: reference
|
|
4
|
+
service: ai-toolkit
|
|
5
|
+
tags: [cli, commands, reference, install, update, plugin, mcp]
|
|
6
|
+
created: "2026-04-13"
|
|
7
|
+
last_updated: "2026-04-13"
|
|
8
|
+
description: "Complete CLI reference for all ai-toolkit commands, options, and flags."
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# CLI Reference
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Usage: ai-toolkit <command> [options]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Core Commands
|
|
18
|
+
|
|
19
|
+
| Command | Description |
|
|
20
|
+
|---------|-------------|
|
|
21
|
+
| `install` | First-time global install into `~/.claude/` + Cursor, Windsurf, Gemini |
|
|
22
|
+
| `install --local` | Claude Code configs only; add `--editors all` or `--editors cursor,aider` for other tools |
|
|
23
|
+
| `update` | Re-apply toolkit after `npm install -g @softspark/ai-toolkit@latest` |
|
|
24
|
+
| `update --local` | Re-apply + auto-detect editors from existing project files |
|
|
25
|
+
| `reset --local` | Wipe all project-local configs and recreate from scratch (clean slate) |
|
|
26
|
+
| `status` | Show installed modules and version |
|
|
27
|
+
| `uninstall` | Remove toolkit from `~/.claude/` |
|
|
28
|
+
| `validate` | Verify toolkit integrity (`--strict` for CI-grade, warnings = errors) |
|
|
29
|
+
| `doctor` | Diagnose install health, hooks, quick-win assets, and artifact drift |
|
|
30
|
+
| `doctor --fix` | Auto-repair broken symlinks, missing hooks, stale artifacts |
|
|
31
|
+
| `eject [dir]` | Export standalone config (no symlinks, no toolkit dependency) |
|
|
32
|
+
|
|
33
|
+
## Rule & Hook Injection
|
|
34
|
+
|
|
35
|
+
| Command | Description |
|
|
36
|
+
|---------|-------------|
|
|
37
|
+
| `add-rule <rule.md> [name]` | Register rule in `~/.softspark/ai-toolkit/rules/` — auto-applied on every `update` |
|
|
38
|
+
| `remove-rule <name> [dir]` | Unregister rule and remove its block from `CLAUDE.md` |
|
|
39
|
+
| `inject-hook <file.json>` | Inject external hooks into settings.json (idempotent, `_source` tagged) |
|
|
40
|
+
| `remove-hook <name>` | Remove injected hooks by source name |
|
|
41
|
+
|
|
42
|
+
## MCP Management
|
|
43
|
+
|
|
44
|
+
| Command | Description |
|
|
45
|
+
|---------|-------------|
|
|
46
|
+
| `mcp list` | List available MCP server templates (25 templates) |
|
|
47
|
+
| `mcp editors` | List editors with native MCP config adapters and scopes |
|
|
48
|
+
| `mcp add <name> [names...]` | Add MCP server template(s) to `.mcp.json` |
|
|
49
|
+
| `mcp install --editor <name[,..]> [names...]` | Install templates into native editor MCP config |
|
|
50
|
+
| `mcp show <name>` | Show MCP template config details |
|
|
51
|
+
| `mcp remove <name>` | Remove MCP server from `.mcp.json` or editor MCP config |
|
|
52
|
+
|
|
53
|
+
## Plugin Management
|
|
54
|
+
|
|
55
|
+
| Command | Description |
|
|
56
|
+
|---------|-------------|
|
|
57
|
+
| `plugin list` | Show available plugin packs with install status |
|
|
58
|
+
| `plugin install <name> [--editor claude\|codex\|all]` | Install a plugin pack for selected runtime(s) |
|
|
59
|
+
| `plugin install --all [--editor claude\|codex\|all]` | Install all 11 plugin packs |
|
|
60
|
+
| `plugin update <name> [--editor claude\|codex\|all]` | Update a plugin pack (remove + reinstall, preserves data) |
|
|
61
|
+
| `plugin update --all [--editor claude\|codex\|all]` | Update all installed plugin packs |
|
|
62
|
+
| `plugin clean <name> [--days N]` | Prune old plugin data (default: 90 days) |
|
|
63
|
+
| `plugin remove <name> [--editor claude\|codex\|all]` | Remove a plugin pack |
|
|
64
|
+
| `plugin status [--editor claude\|codex\|all]` | Show installed plugins with runtime-specific details |
|
|
65
|
+
|
|
66
|
+
## Config Inheritance
|
|
67
|
+
|
|
68
|
+
| Command | Description |
|
|
69
|
+
|---------|-------------|
|
|
70
|
+
| `config validate [path]` | Validate `.softspark-toolkit.json` schema + extends + enforcement |
|
|
71
|
+
| `config diff [path]` | Show project vs base config differences |
|
|
72
|
+
| `config init [flags]` | Create `.softspark-toolkit.json` (`--extends`, `--profile`, `--no-extends`) |
|
|
73
|
+
| `config create-base <name>` | Scaffold base config npm package |
|
|
74
|
+
| `config check [path]` | CI enforcement gate (exit 0=pass, 1=fail, 2=no config; `--json`) |
|
|
75
|
+
|
|
76
|
+
## Project Registry
|
|
77
|
+
|
|
78
|
+
| Command | Description |
|
|
79
|
+
|---------|-------------|
|
|
80
|
+
| `projects` | List registered projects |
|
|
81
|
+
| `projects --prune` | Remove stale (deleted) entries |
|
|
82
|
+
| `projects remove /path` | Unregister specific project |
|
|
83
|
+
|
|
84
|
+
## Generator Commands
|
|
85
|
+
|
|
86
|
+
| Command | Description |
|
|
87
|
+
|---------|-------------|
|
|
88
|
+
| `generate-all` | Generate all platform configs at once |
|
|
89
|
+
| `agents-md` | Regenerate `AGENTS.md` from agent definitions |
|
|
90
|
+
| `codex-md` | Generate `AGENTS.md` with marker injection for Codex CLI |
|
|
91
|
+
| `codex-rules` | Generate `.agents/rules/*.md` for Codex CLI |
|
|
92
|
+
| `codex-hooks` | Generate `.codex/hooks.json` for Codex CLI |
|
|
93
|
+
| `cursor-rules` | Generate `.cursorrules` (legacy single file) |
|
|
94
|
+
| `cursor-mdc` | Generate `.cursor/rules/*.mdc` (recommended) |
|
|
95
|
+
| `windsurf-rules` | Generate `.windsurfrules` (legacy) |
|
|
96
|
+
| `windsurf-dir-rules` | Generate `.windsurf/rules/*.md` (recommended) |
|
|
97
|
+
| `copilot-instructions` | Generate `.github/copilot-instructions.md` |
|
|
98
|
+
| `gemini-md` | Generate `GEMINI.md` for Gemini CLI |
|
|
99
|
+
| `cline-rules` | Generate `.clinerules` (legacy) |
|
|
100
|
+
| `cline-dir-rules` | Generate `.clinerules/*.md` (recommended) |
|
|
101
|
+
| `roo-modes` | Generate `.roomodes` |
|
|
102
|
+
| `roo-dir-rules` | Generate `.roo/rules/*.md` |
|
|
103
|
+
| `aider-conf` | Generate `.aider.conf.yml` |
|
|
104
|
+
| `conventions-md` | Generate `CONVENTIONS.md` for Aider |
|
|
105
|
+
| `augment-rules` | Generate `.augment/rules/ai-toolkit.md` (legacy) |
|
|
106
|
+
| `augment-dir-rules` | Generate `.augment/rules/ai-toolkit-*.md` (recommended) |
|
|
107
|
+
| `antigravity-rules` | Generate `.agent/rules/` and `.agent/workflows/` |
|
|
108
|
+
| `llms-txt` | Generate `llms.txt` and `llms-full.txt` |
|
|
109
|
+
|
|
110
|
+
## Other Commands
|
|
111
|
+
|
|
112
|
+
| Command | Description |
|
|
113
|
+
|---------|-------------|
|
|
114
|
+
| `stats` | Show skill usage statistics (`--reset` to clear, `--json` for raw output) |
|
|
115
|
+
| `benchmark --my-config` | Compare your config vs defaults vs ecosystem |
|
|
116
|
+
| `benchmark-ecosystem` | Generate ecosystem benchmark snapshot |
|
|
117
|
+
| `create skill <name>` | Scaffold new skill from template (`--template=linter\|reviewer\|generator\|workflow\|knowledge`) |
|
|
118
|
+
| `sync` | Config portability via GitHub Gist (`--export`, `--push`, `--pull`, `--import`) |
|
|
119
|
+
| `compile-slm` | Compile toolkit into minimal SLM system prompt (`--budget`, `--model-size`, `--dry-run`) |
|
|
120
|
+
| `evaluate` | Run skill evaluation suite |
|
|
121
|
+
|
|
122
|
+
## Install / Update Options
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
ai-toolkit install --only agents,hooks # apply only listed components
|
|
126
|
+
ai-toolkit install --skip hooks # skip listed components
|
|
127
|
+
ai-toolkit install --profile minimal # minimal | standard | strict
|
|
128
|
+
ai-toolkit install --persona backend-lead # backend-lead | frontend-lead | devops-eng | junior-dev
|
|
129
|
+
ai-toolkit install --local --editors all # Claude Code + all editors
|
|
130
|
+
ai-toolkit install --local --editors cursor,aider # + specific editors
|
|
131
|
+
ai-toolkit install --local --lang typescript # explicit language rules
|
|
132
|
+
ai-toolkit install --modules core,agents,rules-typescript # selective modules
|
|
133
|
+
ai-toolkit install --list # dry-run: show what would change
|
|
134
|
+
ai-toolkit update --local # auto-detects editors from existing files
|
|
135
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Ecosystem Comparison"
|
|
3
|
+
category: reference
|
|
4
|
+
service: ai-toolkit
|
|
5
|
+
tags: [comparison, ecosystem, features, alternatives]
|
|
6
|
+
created: "2026-04-13"
|
|
7
|
+
last_updated: "2026-04-13"
|
|
8
|
+
description: "Feature comparison of ai-toolkit vs other Claude Code toolkits and agent frameworks."
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Ecosystem Comparison
|
|
12
|
+
|
|
13
|
+
| Feature | ai-toolkit | everything-claude-code | wshobson/agents | ruflo |
|
|
14
|
+
|---------|---------------|----------------------|-----------------|-------|
|
|
15
|
+
| Skills | 92 | 100+ | 146 | 20+ |
|
|
16
|
+
| Agents | 44 | 30+ | 112 | 20+ |
|
|
17
|
+
| Machine-enforced constitution | **Yes** | No (docs only) | No | No |
|
|
18
|
+
| Skill-scoped lifecycle hooks | **Yes** | No | No | No |
|
|
19
|
+
| Effort-based model budgeting | **Yes** | No | No | No |
|
|
20
|
+
| Test suite | Yes (bats) | Yes (997 tests) | No | Yes |
|
|
21
|
+
| npm/npx install | Yes | Yes | Yes | Yes |
|
|
22
|
+
| Cross-tool support | **Cursor, Windsurf, Copilot, Gemini, Cline, Roo, Aider, Augment, Antigravity, Codex** | 5+ tools | Smithery | Limited |
|
|
23
|
+
| Selective install | Yes | Yes | Yes (72 plugins) | No |
|
|
24
|
+
| Session persistence | Yes | Yes | No | No |
|
|
25
|
+
| Architecture notes | **Yes** | No | No | No |
|
|
26
|
+
| KB/RAG integration | **Yes** | No | No | Yes |
|
|
27
|
+
| License | MIT | MIT | MIT | MIT |
|
|
28
|
+
|
|
29
|
+
For live benchmark data, see the [ecosystem benchmark snapshot](claude-ecosystem-benchmark-snapshot.md).
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Unique Features & Differentiators"
|
|
3
|
+
category: reference
|
|
4
|
+
service: ai-toolkit
|
|
5
|
+
tags: [features, differentiators, constitution, hooks, security, tdd, memory]
|
|
6
|
+
created: "2026-04-13"
|
|
7
|
+
last_updated: "2026-04-13"
|
|
8
|
+
description: "Detailed description of ai-toolkit's unique features: constitution enforcement, hooks system, security scanning, effort budgeting, quality gates, and more."
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Unique Features & Differentiators
|
|
12
|
+
|
|
13
|
+
## 1. Machine-Enforced Constitution
|
|
14
|
+
|
|
15
|
+
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:
|
|
16
|
+
- Mass deletion (`rm -rf`, `DROP TABLE`)
|
|
17
|
+
- Blind overwrites of uncommitted work
|
|
18
|
+
- Any action that could cause irreversible data loss
|
|
19
|
+
|
|
20
|
+
## 2. Hooks as Executable Scripts
|
|
21
|
+
|
|
22
|
+
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.
|
|
23
|
+
|
|
24
|
+
**12 lifecycle events / 21 global hook entries:**
|
|
25
|
+
|
|
26
|
+
| Event | Script | Action |
|
|
27
|
+
|-------|--------|--------|
|
|
28
|
+
| SessionStart | `session-start.sh` | MANDATORY rules reminder + session context + instincts |
|
|
29
|
+
| SessionStart | `mcp-health.sh` | Check MCP server command availability (non-blocking warning) |
|
|
30
|
+
| SessionStart | `session-context.sh` | Capture environment snapshot to `~/.softspark/ai-toolkit/sessions/current-context.json` |
|
|
31
|
+
| Notification | `notify-waiting.sh` | Cross-platform desktop notification |
|
|
32
|
+
| PreToolUse | `guard-destructive.sh` | Block `rm -rf`, `DROP TABLE`, etc. |
|
|
33
|
+
| PreToolUse | `guard-path.sh` | Block wrong-user path hallucination |
|
|
34
|
+
| PreToolUse | `guard-config.sh` | Block edits to linter/formatter config files unless explicitly requested |
|
|
35
|
+
| PreToolUse | `commit-quality.sh` | Advisory validation of git commit messages |
|
|
36
|
+
| UserPromptSubmit | `user-prompt-submit.sh` | Prompt governance reminder |
|
|
37
|
+
| UserPromptSubmit | `track-usage.sh` | Record skill invocations to local stats |
|
|
38
|
+
| PostToolUse | `post-tool-use.sh` | Lightweight validation reminders after edits |
|
|
39
|
+
| PostToolUse | `governance-capture.sh` | Log security-sensitive operations to JSONL |
|
|
40
|
+
| Stop | `quality-check.sh` | Multi-language lint (ruff/tsc/phpstan/dart/go) |
|
|
41
|
+
| Stop | `save-session.sh` | Persist session context for cross-session continuity |
|
|
42
|
+
| TaskCompleted | `quality-gate.sh` | Block task completion on lint/type errors |
|
|
43
|
+
| SubagentStart | `subagent-start.sh` | Narrow-scope reminder for spawned subagents |
|
|
44
|
+
| SubagentStop | `subagent-stop.sh` | Completion checklist for subagent handoff |
|
|
45
|
+
| PreCompact | `pre-compact.sh` | Smart compaction: prioritized context |
|
|
46
|
+
| PreCompact | `pre-compact-save.sh` | Save timestamped context backup |
|
|
47
|
+
| SessionEnd | `session-end.sh` | Persist a session-end handoff note |
|
|
48
|
+
| TeammateIdle | *(inline)* | Completeness reminder |
|
|
49
|
+
|
|
50
|
+
**5 skill-scoped hooks:**
|
|
51
|
+
|
|
52
|
+
| Skill | Hook | Action |
|
|
53
|
+
|-------|------|--------|
|
|
54
|
+
| `/commit` | Pre | Run linter, block on failure |
|
|
55
|
+
| `/test` | Post | Coverage check, report threshold |
|
|
56
|
+
| `/deploy` | Post | Health check, rollback if degraded |
|
|
57
|
+
| `/migrate` | Pre | Backup verification |
|
|
58
|
+
| `/rollback` | Post | State verification |
|
|
59
|
+
|
|
60
|
+
## 3. Security Scanning
|
|
61
|
+
|
|
62
|
+
Two complementary security tools:
|
|
63
|
+
|
|
64
|
+
**`/skill-audit`** — scan skills and agents for code-level risks:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
/skill-audit # Interactive (Claude remediation)
|
|
68
|
+
python3 scripts/audit_skills.py --ci # CI mode: exit 1 on HIGH
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Detects: `eval()`/`exec()`, hardcoded secrets, permission issues, bash risks.
|
|
72
|
+
|
|
73
|
+
**`/cve-scan`** — scan project dependencies for known CVEs:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
/cve-scan # Auto-detect ecosystems, scan all
|
|
77
|
+
python3 app/skills/cve-scan/scripts/cve_scan.py # Direct invocation
|
|
78
|
+
python3 app/skills/cve-scan/scripts/cve_scan.py --json # Machine-readable
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Supports: npm, pip, composer, cargo, go, ruby, dart. Uses native audit tools — zero external deps.
|
|
82
|
+
|
|
83
|
+
**Severity levels:** HIGH (blocks CI), WARN (should fix), INFO (review)
|
|
84
|
+
|
|
85
|
+
## 4. Effort-Based Model Budgeting
|
|
86
|
+
|
|
87
|
+
Every skill declares an effort level used for model token budgeting:
|
|
88
|
+
- `low` — lint, build, fix (fast, cheap)
|
|
89
|
+
- `medium` — debug, analyze, ci
|
|
90
|
+
- `high` — review, plan, refactor, docs
|
|
91
|
+
- `max` — orchestrate, swarm, workflow
|
|
92
|
+
|
|
93
|
+
## 5. Multi-Language Quality Gates
|
|
94
|
+
|
|
95
|
+
The `Stop` hook runs after every response across 5 languages:
|
|
96
|
+
|
|
97
|
+
| Language | Lint | Type Check |
|
|
98
|
+
|----------|------|-----------|
|
|
99
|
+
| Python | ruff | mypy --strict |
|
|
100
|
+
| TypeScript | ESLint/tsc | tsc --noEmit |
|
|
101
|
+
| PHP | phpstan | phpstan |
|
|
102
|
+
| Dart | dart analyze | dart analyze |
|
|
103
|
+
| Go | go vet | go vet |
|
|
104
|
+
|
|
105
|
+
## 6. Iron Law Enforcement
|
|
106
|
+
|
|
107
|
+
Three skills enforce non-negotiable quality gates with anti-rationalization tables:
|
|
108
|
+
|
|
109
|
+
| Skill | Iron Law | What it prevents |
|
|
110
|
+
|-------|----------|-----------------|
|
|
111
|
+
| `/tdd` | `NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST` | Code written before test? Delete it. Start over. |
|
|
112
|
+
| `debugging-tactics` | `NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST` | 4-phase debugging: root cause → pattern → hypothesis → fix. |
|
|
113
|
+
| `verification-before-completion` | `NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE` | Gate: IDENTIFY → RUN → READ → VERIFY → CLAIM. |
|
|
114
|
+
|
|
115
|
+
Additionally, **15 core skills** include `## Common Rationalizations` tables — domain-specific excuses with rebuttals that prevent agent drift.
|
|
116
|
+
|
|
117
|
+
## 7. Confidence Scoring & Self-Evaluation (`/review`)
|
|
118
|
+
|
|
119
|
+
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.
|
|
120
|
+
|
|
121
|
+
## 8. Agent Verification Checklists
|
|
122
|
+
|
|
123
|
+
10 key agents include `## Verification Checklist` — exit criteria that MUST be met before presenting results:
|
|
124
|
+
|
|
125
|
+
| Agent | Key exit criteria |
|
|
126
|
+
|-------|------------------|
|
|
127
|
+
| `code-reviewer` | Every finding has file:line + evidence, not just opinion |
|
|
128
|
+
| `security-auditor` | Each finding includes proof-of-concept or exploit path |
|
|
129
|
+
| `test-engineer` | No empty/placeholder tests, mocks only at boundaries |
|
|
130
|
+
| `debugger` | Root cause identified, regression test added |
|
|
131
|
+
| `backend-specialist` | Input validation, error format, query optimization |
|
|
132
|
+
| `frontend-specialist` | Empty/loading/error states, accessibility, responsive |
|
|
133
|
+
| `database-architect` | Migration tested on prod-like volume, rollback tested |
|
|
134
|
+
| `performance-optimizer` | Baseline measured, profiler evidence attached |
|
|
135
|
+
| `devops-implementer` | Dry run passed, rollback documented, no hardcoded secrets |
|
|
136
|
+
| `documenter` | Code examples runnable, no placeholders, valid links |
|
|
137
|
+
|
|
138
|
+
## 9. Skill Reference Routing
|
|
139
|
+
|
|
140
|
+
7 core skills include `## Related Skills` sections that suggest logical follow-up skills:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
/review → found issues? → /debug, /tdd, /cve-scan, /analyze
|
|
144
|
+
/debug → bug fixed? → /review, /tdd, /workflow incident-response
|
|
145
|
+
/plan → approved? → /orchestrate, /write-a-prd, /grill-me
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## 10. Two-Stage Review (`/subagent-development`)
|
|
149
|
+
|
|
150
|
+
Per-task review pipeline inspired by [obra/superpowers](https://github.com/obra/superpowers):
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
Implementer → Spec Compliance Review → Code Quality Review → Next Task
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
- Implementer reports: `DONE` / `DONE_WITH_CONCERNS` / `NEEDS_CONTEXT` / `BLOCKED`
|
|
157
|
+
- Spec reviewer: all requirements met, nothing extra, nothing missing
|
|
158
|
+
- Quality reviewer: SOLID, naming, error handling, tests, security
|
|
159
|
+
|
|
160
|
+
## 11. Ralph Wiggum Loop (`/repeat`)
|
|
161
|
+
|
|
162
|
+
Autonomous agent loop with safety controls:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
/repeat 5m /test # run tests every 5 min until all pass
|
|
166
|
+
/repeat --iterations 3 /review # max 3 review passes
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
| Safety Control | Default |
|
|
170
|
+
|----------------|---------|
|
|
171
|
+
| Max iterations | 5 |
|
|
172
|
+
| Circuit breaker | 3 consecutive failures → halt |
|
|
173
|
+
| Min interval | 1 minute |
|
|
174
|
+
| Exit detection | DONE / COMPLETE / ALL PASS |
|
|
175
|
+
|
|
176
|
+
## 12. Persistent Memory (`memory-pack` plugin)
|
|
177
|
+
|
|
178
|
+
SQLite-based session memory (opt-in plugin pack):
|
|
179
|
+
|
|
180
|
+
| Component | Purpose |
|
|
181
|
+
|-----------|---------|
|
|
182
|
+
| `observation-capture.sh` | PostToolUse hook — captures tool actions to SQLite |
|
|
183
|
+
| `session-summary.sh` | Stop hook — AI-compress session observations |
|
|
184
|
+
| `mem-search` skill | FTS5 full-text search across past sessions |
|
|
185
|
+
| `<private>` tags | Content between tags stripped before storage |
|
|
186
|
+
| Progressive disclosure | Summary (~500 tok) → relevant (~2k tok) → full |
|
|
187
|
+
|
|
188
|
+
## 13. Persona Presets
|
|
189
|
+
|
|
190
|
+
4 engineering personas that adjust Claude's communication style per role:
|
|
191
|
+
|
|
192
|
+
| Persona | Focus | Key Skills |
|
|
193
|
+
|---------|-------|------------|
|
|
194
|
+
| `backend-lead` | System design, scalability, data integrity | `/workflow backend-feature`, `/tdd` |
|
|
195
|
+
| `frontend-lead` | Component architecture, a11y, Core Web Vitals | `/design-an-interface`, `/review` |
|
|
196
|
+
| `devops-eng` | IaC, CI/CD, blast radius, rollback safety | `/workflow infrastructure-change`, `/deploy` |
|
|
197
|
+
| `junior-dev` | Step-by-step explanations, learning focus | `/explain`, `/explore`, `/debug` |
|
|
198
|
+
|
|
199
|
+
Persistent via `--persona` at install time, or session-scoped via `/persona` runtime command.
|
|
200
|
+
|
|
201
|
+
## 14. Visual Brainstorming Companion
|
|
202
|
+
|
|
203
|
+
Optional browser-based companion for `/write-a-prd` and `/design-an-interface`:
|
|
204
|
+
- Ephemeral Node.js HTTP server (auto-kills after 30min idle)
|
|
205
|
+
- Dark theme, responsive, zero external dependencies
|
|
206
|
+
- Per-question routing: mockups/diagrams → browser, text/conceptual → terminal
|
|
207
|
+
|
|
208
|
+
## 15. KB Integration Protocol
|
|
209
|
+
|
|
210
|
+
Agents follow a research-before-action protocol enforced via rules:
|
|
211
|
+
1. `smart_query()` or `hybrid_search_kb()` before any technical answer
|
|
212
|
+
2. Source citation mandatory (`[PATH: kb/...]`)
|
|
213
|
+
3. Strict order: KB → Files → External Docs → General Knowledge
|