@softspark/ai-toolkit 2.0.2 → 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/CHANGELOG.md +49 -0
- package/README.md +143 -774
- package/app/ARCHITECTURE.md +1 -1
- package/app/plugins/README.md +6 -2
- package/app/skills/plugin-creator/SKILL.md +3 -4
- package/bin/ai-toolkit.js +34 -10
- package/kb/procedures/maintenance-sop.md +64 -16
- package/kb/procedures/release-preparation-sop.md +4 -2
- package/kb/procedures/release-verification-sop.md +15 -13
- package/kb/reference/architecture-overview.md +44 -5
- package/kb/reference/claude-ecosystem-expansion-foundations.md +4 -4
- package/kb/reference/cli-reference.md +135 -0
- package/kb/reference/codex-cli-compatibility.md +136 -0
- package/kb/reference/comparison.md +29 -0
- package/kb/reference/extension-api.md +23 -6
- package/kb/reference/global-install-model.md +62 -5
- package/kb/reference/mcp-editor-compatibility.md +62 -0
- package/kb/reference/mcp-templates.md +32 -6
- package/kb/reference/plugin-pack-conventions.md +22 -21
- package/kb/reference/skills-catalog.md +27 -5
- package/kb/reference/unique-features.md +213 -0
- package/llms-full.txt +903 -84
- package/llms.txt +5 -0
- package/package.json +6 -5
- package/scripts/codex_skill_adapter.py +295 -0
- package/scripts/dir_rules_shared.py +46 -7
- package/scripts/generate_agents_md.py +13 -0
- package/scripts/generate_antigravity.py +2 -1
- package/scripts/generate_augment_rules.py +2 -1
- package/scripts/generate_cline_rules.py +13 -3
- package/scripts/generate_codex.py +105 -0
- package/scripts/generate_codex_hooks.py +78 -0
- package/scripts/generate_codex_rules.py +52 -0
- 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 +15 -0
- package/scripts/install_steps/ai_tools.py +83 -4
- package/scripts/mcp_editors.py +340 -0
- package/scripts/mcp_manager.py +125 -13
- package/scripts/plugin.py +745 -301
- package/scripts/plugin_schema.py +16 -1
|
@@ -5,15 +5,15 @@ service: ai-toolkit
|
|
|
5
5
|
tags: [plugins, plugin-packs, conventions, manifests, hooks, policy-packs]
|
|
6
6
|
version: "1.0.0"
|
|
7
7
|
created: "2026-03-28"
|
|
8
|
-
last_updated: "2026-04-
|
|
9
|
-
description: "Conventions for experimental ai-toolkit plugin packs, policy packs, hook packs, and plugin-creator scaffolding."
|
|
8
|
+
last_updated: "2026-04-13"
|
|
9
|
+
description: "Conventions for experimental ai-toolkit plugin packs, policy packs, hook packs, and plugin-creator scaffolding across Claude and Codex runtimes."
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Plugin Pack Conventions
|
|
13
13
|
|
|
14
14
|
## Purpose
|
|
15
15
|
|
|
16
|
-
`ai-toolkit` now includes experimental plugin packs under `app/plugins/` to formalize a
|
|
16
|
+
`ai-toolkit` now includes experimental plugin packs under `app/plugins/` to formalize a runtime-aware plugin direction for Claude and optional global Codex layering without changing the default core install surface.
|
|
17
17
|
|
|
18
18
|
## Pack Types
|
|
19
19
|
|
|
@@ -73,32 +73,34 @@ Required keys:
|
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
ai-toolkit plugin list # show all 11 packs with install status
|
|
76
|
-
ai-toolkit plugin install <name>
|
|
77
|
-
ai-toolkit plugin install --
|
|
78
|
-
ai-toolkit plugin
|
|
79
|
-
ai-toolkit plugin update --all
|
|
76
|
+
ai-toolkit plugin install --editor claude <name> # Claude global target
|
|
77
|
+
ai-toolkit plugin install --editor codex <name> # Codex global target
|
|
78
|
+
ai-toolkit plugin install --editor all --all # install all 11 packs for both runtimes
|
|
79
|
+
ai-toolkit plugin update --editor all --all # update all installed packs
|
|
80
80
|
ai-toolkit plugin clean <name> # prune data older than 90 days (default)
|
|
81
81
|
ai-toolkit plugin clean <name> --days 30 # prune data older than 30 days
|
|
82
|
-
ai-toolkit plugin remove <name>
|
|
83
|
-
ai-toolkit plugin remove --all
|
|
84
|
-
ai-toolkit plugin status
|
|
82
|
+
ai-toolkit plugin remove --editor codex <name> # remove from one runtime only
|
|
83
|
+
ai-toolkit plugin remove --editor all --all # remove all installed packs everywhere
|
|
84
|
+
ai-toolkit plugin status --editor all # show installed packs with runtime details
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
### What `plugin install` Does
|
|
88
88
|
|
|
89
|
-
1. **
|
|
89
|
+
1. **Parses** `--editor claude|codex|all` (default: `claude`)
|
|
90
90
|
2. **Copies** plugin-specific hooks to `~/.softspark/ai-toolkit/hooks/plugin-<pack>-<hook>.sh`
|
|
91
91
|
3. **Copies** plugin-specific scripts to `~/.softspark/ai-toolkit/plugin-scripts/<pack>/`
|
|
92
92
|
4. **Runs** init scripts if present (e.g. `init_db.py` for memory-pack — safe to re-run, preserves data)
|
|
93
|
-
5. **
|
|
94
|
-
6. **
|
|
93
|
+
5. **Claude target**: links missing agents/skills into `~/.claude/`, injects plugin-local rules into `~/.claude/CLAUDE.md`, and merges plugin hook entries into `~/.claude/settings.json`
|
|
94
|
+
6. **Codex target**: bootstraps global Codex assets in `HOME` (`~/AGENTS.md`, `~/.agents/skills`, `~/.agents/rules`, `~/.codex/hooks.json`) and then layers plugin-specific rules/hooks on top
|
|
95
|
+
7. **Records** installed state per runtime in `~/.softspark/ai-toolkit/plugins.json`
|
|
95
96
|
|
|
96
97
|
### What `plugin update` Does
|
|
97
98
|
|
|
98
|
-
1. **Removes** existing plugin
|
|
99
|
+
1. **Removes** existing plugin runtime entries for the selected editor(s) (same as `remove`)
|
|
99
100
|
2. **Reinstalls** from the current source (same as `install`)
|
|
100
101
|
3. **Preserves plugin data** (e.g. memory-pack SQLite database is never deleted)
|
|
101
|
-
4.
|
|
102
|
+
4. Shared plugin scripts/hooks are kept if another runtime still has the same pack installed
|
|
103
|
+
5. `--all` updates only currently installed packs for the selected runtime(s)
|
|
102
104
|
|
|
103
105
|
### What `plugin clean` Does
|
|
104
106
|
|
|
@@ -108,10 +110,10 @@ ai-toolkit plugin status # show installed packs with data stats
|
|
|
108
110
|
|
|
109
111
|
### What `plugin remove` Does
|
|
110
112
|
|
|
111
|
-
1. **
|
|
112
|
-
2. **
|
|
113
|
-
3. **
|
|
114
|
-
4. **Updates** `plugins.json` state
|
|
113
|
+
1. **Claude target**: strips plugin hook entries from `~/.claude/settings.json` and removes plugin-local rule sections from `~/.claude/CLAUDE.md`
|
|
114
|
+
2. **Codex target**: strips plugin hook entries from `~/.codex/hooks.json` and removes `~/.agents/rules/plugin-<pack>-*.md`
|
|
115
|
+
3. **Shared assets** (`~/.softspark/ai-toolkit/hooks/plugin-*`, `plugin-scripts/<pack>/`) are removed only when no remaining runtime still uses that pack
|
|
116
|
+
4. **Updates** `plugins.json` state per runtime
|
|
115
117
|
5. **Leaves** core agents/skills untouched (they belong to the base install)
|
|
116
118
|
6. **Leaves** plugin data intact (e.g. `memory.db` — use `clean` to prune)
|
|
117
119
|
|
|
@@ -119,7 +121,7 @@ ai-toolkit plugin status # show installed packs with data stats
|
|
|
119
121
|
|
|
120
122
|
- **Auto-retention**: `session-summary.sh` hook auto-prunes observations older than 90 days on every session end (configurable via `MEMORY_RETENTION_DAYS` env var)
|
|
121
123
|
- **Manual clean**: `ai-toolkit plugin clean memory-pack --days 30`
|
|
122
|
-
- **Status**: `ai-toolkit plugin status` shows DB size, observation count, date range
|
|
124
|
+
- **Status**: `ai-toolkit plugin status --editor claude|codex|all` shows runtime-specific install details plus DB size, observation count, and date range where relevant
|
|
123
125
|
|
|
124
126
|
## Current Experimental Packs
|
|
125
127
|
|
|
@@ -148,4 +150,3 @@ ai-toolkit plugin status # show installed packs with data stats
|
|
|
148
150
|
- `hooks/session-summary.sh` — summarizes session on Stop
|
|
149
151
|
|
|
150
152
|
These are intentionally excluded from the default install until explicitly enabled via `ai-toolkit plugin install`.
|
|
151
|
-
|
|
@@ -3,10 +3,10 @@ title: "AI Toolkit - Skills Catalog"
|
|
|
3
3
|
category: reference
|
|
4
4
|
service: ai-toolkit
|
|
5
5
|
tags: [skills, domain-knowledge, catalog, task-skills, hybrid-skills]
|
|
6
|
-
version: "1.4.
|
|
6
|
+
version: "1.4.3"
|
|
7
7
|
created: "2026-03-23"
|
|
8
|
-
last_updated: "2026-04-
|
|
9
|
-
description: "Complete skills catalog with task, hybrid, and knowledge skills. Includes effort levels, skill-scoped hooks, executable scripts, security auditor, and persona presets."
|
|
8
|
+
last_updated: "2026-04-12"
|
|
9
|
+
description: "Complete skills catalog with task, hybrid, and knowledge skills. Includes Codex adaptation notes, effort levels, skill-scoped hooks, executable scripts, security auditor, and persona presets."
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Skills Catalog
|
|
@@ -73,9 +73,9 @@ Hybrid skills combine slash-command invocation with domain knowledge that agents
|
|
|
73
73
|
| **docs** | `/docs` | high | Generate/update docs: README, API docs, architecture notes, changelogs (Tier 1 — single agent) |
|
|
74
74
|
| **search** | `/search` | medium | Search knowledge base (MCP tools with local fallback) |
|
|
75
75
|
| **explain** | `/explain` | medium | Explain architecture of a file/module using Mermaid diagrams |
|
|
76
|
-
| **orchestrate** | `/orchestrate` | max | Custom multi-agent parallelism — Tier 3,
|
|
76
|
+
| **orchestrate** | `/orchestrate` | max | Custom multi-agent parallelism — Tier 3, native in Claude, Codex-adapted to `spawn_agent` workflows |
|
|
77
77
|
| **swarm** | `/swarm` | max | Massive parallelism: map-reduce, consensus, relay — Tier 3 |
|
|
78
|
-
| **workflow** | `/workflow` | max | 15 predefined multi-agent workflow types — Tier 2 |
|
|
78
|
+
| **workflow** | `/workflow` | max | 15 predefined multi-agent workflow types — Tier 2, Codex-adapted to native subagent orchestration |
|
|
79
79
|
| **instinct-review** | `/instinct-review` | low | Review, curate, and manage learned instincts from past sessions |
|
|
80
80
|
| **teams** | `/teams` | max | Launch pre-configured Agent Teams compositions for common workflows |
|
|
81
81
|
| **write-a-prd** | `/write-a-prd` | high | Create PRD through interactive interview, codebase exploration, and module design |
|
|
@@ -250,6 +250,28 @@ Step 0 interview before setup — 5 targeted questions to capture undocumented p
|
|
|
250
250
|
- `allowed-tools: ...` — tools available to the agent when processing this skill
|
|
251
251
|
- `depends-on: skill-a, skill-b` — declares dependencies on other skills (validated by `validate.py`)
|
|
252
252
|
|
|
253
|
+
### Codex CLI Adaptation
|
|
254
|
+
|
|
255
|
+
Codex CLI receives the full skill catalog during `ai-toolkit install --local --editors codex`.
|
|
256
|
+
|
|
257
|
+
- Native Codex-compatible skills are symlinked directly into `.agents/skills/`
|
|
258
|
+
- Claude-oriented orchestration skills are generated as Codex wrappers
|
|
259
|
+
- Adapted wrappers translate `Agent`, `Team*`, and `Task*` guidance to `spawn_agent`, `send_input`, `wait_agent`, `close_agent`, and `update_plan`
|
|
260
|
+
|
|
261
|
+
Common adapted skills:
|
|
262
|
+
|
|
263
|
+
- `/orchestrate`
|
|
264
|
+
- `/workflow`
|
|
265
|
+
- `/swarm`
|
|
266
|
+
- `/teams`
|
|
267
|
+
- `/subagent-development`
|
|
268
|
+
- `/tdd`
|
|
269
|
+
|
|
270
|
+
The translated skill content keeps the original support assets (`reference/`,
|
|
271
|
+
`scripts/`, `assets/`) while replacing Claude-specific runtime instructions.
|
|
272
|
+
|
|
273
|
+
See `kb/reference/codex-cli-compatibility.md` for the detailed mapping and hook limits.
|
|
274
|
+
|
|
253
275
|
### Skill Dependencies (`depends-on`)
|
|
254
276
|
Skills can declare dependencies on other skills (primarily knowledge skills) for documentation and validation:
|
|
255
277
|
```yaml
|
|
@@ -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
|