continuous-improvement 3.1.0 → 3.9.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.
Files changed (136) hide show
  1. package/.claude-plugin/marketplace.json +66 -0
  2. package/CHANGELOG.md +216 -0
  3. package/QUICKSTART.md +79 -12
  4. package/README.md +229 -349
  5. package/SKILL.md +87 -9
  6. package/action.yml +1 -1
  7. package/bin/analyze.sh +9 -1
  8. package/bin/backfill.mjs +172 -0
  9. package/bin/check-doc-runtime-claims.mjs +120 -0
  10. package/bin/check-docs-substrings.mjs +333 -0
  11. package/bin/check-everything-mirror.mjs +145 -0
  12. package/bin/check-routing-targets.mjs +151 -0
  13. package/bin/check-skill-law-tag.mjs +128 -0
  14. package/bin/check-skill-mirror.mjs +119 -0
  15. package/bin/check-skill-tiers.mjs +116 -0
  16. package/bin/check-third-party-shape.mjs +202 -0
  17. package/bin/generate-plugin-manifests.mjs +171 -0
  18. package/bin/harvest-friction.mjs +279 -0
  19. package/bin/hook-stats.mjs +258 -0
  20. package/bin/install.mjs +407 -499
  21. package/bin/lint-transcript.mjs +182 -210
  22. package/bin/mcp-server.mjs +834 -608
  23. package/bin/observe.mjs +148 -0
  24. package/bin/pre-commit-block-strays.sh +49 -0
  25. package/bin/refresh-third-party.mjs +416 -0
  26. package/bin/unified-cli.mjs +533 -0
  27. package/commands/continuous-improvement.md +43 -2
  28. package/commands/discipline.md +14 -0
  29. package/commands/harvest.md +76 -0
  30. package/commands/learn-eval.md +117 -0
  31. package/commands/planning-with-files.md +66 -0
  32. package/commands/proceed-with-the-recommendation.md +62 -0
  33. package/commands/ralph.md +103 -0
  34. package/commands/release-train.md +81 -0
  35. package/commands/seven-laws.md +16 -0
  36. package/commands/superpowers.md +180 -0
  37. package/commands/swarm.md +101 -0
  38. package/commands/workspace-surface-audit.md +77 -0
  39. package/hooks/gateguard.mjs +172 -0
  40. package/hooks/observe.sh +42 -4
  41. package/hooks/session.sh +3 -3
  42. package/hooks/three-section-close.mjs +181 -0
  43. package/instinct-packs/meta.json +16 -0
  44. package/lib/cli-anything.mjs +401 -0
  45. package/lib/compound-engineering.mjs +831 -0
  46. package/lib/gateguard-state.mjs +85 -0
  47. package/lib/observe-event.mjs +128 -0
  48. package/lib/plugin-metadata.mjs +435 -0
  49. package/lib/pm-marketplace.mjs +61 -0
  50. package/lib/pm-skills.mjs +1274 -0
  51. package/lib/resolve-home-dir.mjs +43 -0
  52. package/lib/skill-tiers.mjs +137 -0
  53. package/lib/unified-plugin.mjs +924 -0
  54. package/llms.txt +32 -7
  55. package/package.json +29 -19
  56. package/plugins/beginner.json +17 -6
  57. package/plugins/continuous-improvement/.claude-plugin/marketplace.json +20 -0
  58. package/plugins/continuous-improvement/.claude-plugin/plugin.json +26 -0
  59. package/plugins/continuous-improvement/LICENSE +21 -0
  60. package/plugins/continuous-improvement/README.md +57 -0
  61. package/plugins/continuous-improvement/agents/README.md +120 -0
  62. package/plugins/continuous-improvement/agents/code-reviewer.md +97 -0
  63. package/plugins/continuous-improvement/agents/security-auditor.md +101 -0
  64. package/plugins/continuous-improvement/agents/test-engineer.md +95 -0
  65. package/plugins/continuous-improvement/bin/backfill.mjs +172 -0
  66. package/plugins/continuous-improvement/bin/mcp-server.mjs +889 -0
  67. package/plugins/continuous-improvement/bin/observe.mjs +148 -0
  68. package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -0
  69. package/plugins/continuous-improvement/commands/dashboard.md +56 -0
  70. package/plugins/continuous-improvement/commands/discipline.md +51 -0
  71. package/plugins/continuous-improvement/commands/harvest.md +76 -0
  72. package/plugins/continuous-improvement/commands/learn-eval.md +117 -0
  73. package/plugins/continuous-improvement/commands/planning-with-files.md +66 -0
  74. package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +62 -0
  75. package/plugins/continuous-improvement/commands/ralph.md +103 -0
  76. package/plugins/continuous-improvement/commands/release-train.md +81 -0
  77. package/plugins/continuous-improvement/commands/seven-laws.md +16 -0
  78. package/plugins/continuous-improvement/commands/superpowers.md +180 -0
  79. package/plugins/continuous-improvement/commands/swarm.md +101 -0
  80. package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -0
  81. package/plugins/continuous-improvement/hooks/gateguard.mjs +172 -0
  82. package/plugins/continuous-improvement/hooks/hooks.json +65 -0
  83. package/plugins/continuous-improvement/hooks/observe.sh +172 -0
  84. package/plugins/continuous-improvement/hooks/session.sh +106 -0
  85. package/plugins/continuous-improvement/hooks/three-section-close.mjs +181 -0
  86. package/plugins/continuous-improvement/instinct-packs/go.json +58 -0
  87. package/plugins/continuous-improvement/instinct-packs/meta.json +16 -0
  88. package/plugins/continuous-improvement/instinct-packs/python.json +58 -0
  89. package/plugins/continuous-improvement/instinct-packs/react.json +58 -0
  90. package/plugins/continuous-improvement/lib/observe-event.mjs +128 -0
  91. package/plugins/continuous-improvement/lib/plugin-metadata.mjs +435 -0
  92. package/plugins/continuous-improvement/lib/resolve-home-dir.mjs +43 -0
  93. package/plugins/continuous-improvement/skills/README.md +37 -0
  94. package/plugins/continuous-improvement/skills/continuous-improvement/SKILL.md +249 -0
  95. package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +178 -0
  96. package/plugins/continuous-improvement/skills/gateguard/SKILL.md +163 -0
  97. package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +108 -0
  98. package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +447 -0
  99. package/plugins/continuous-improvement/skills/ralph/SKILL.md +221 -0
  100. package/plugins/continuous-improvement/skills/recovery-classification/SKILL.md +73 -0
  101. package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +76 -0
  102. package/plugins/continuous-improvement/skills/state-reconciliation/SKILL.md +63 -0
  103. package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +104 -0
  104. package/plugins/continuous-improvement/skills/superpowers/SKILL.md +219 -0
  105. package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -0
  106. package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +136 -0
  107. package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +224 -0
  108. package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +191 -0
  109. package/plugins/continuous-improvement/skills/workspace-surface-audit/SKILL.md +147 -0
  110. package/plugins/continuous-improvement/skills/worktree-safety/SKILL.md +66 -0
  111. package/plugins/continuous-improvement/templates/planning-with-files/findings.md +8 -0
  112. package/plugins/continuous-improvement/templates/planning-with-files/progress.md +7 -0
  113. package/plugins/continuous-improvement/templates/planning-with-files/task_plan.md +23 -0
  114. package/plugins/expert.json +26 -5
  115. package/skills/README.md +79 -0
  116. package/skills/deploy-receipt.md +178 -0
  117. package/skills/gateguard.md +163 -0
  118. package/skills/para-memory-files.md +108 -0
  119. package/skills/proceed-with-the-recommendation.md +447 -0
  120. package/skills/ralph.md +221 -0
  121. package/skills/recovery-classification.md +73 -0
  122. package/skills/safety-guard.md +76 -0
  123. package/skills/state-reconciliation.md +63 -0
  124. package/skills/strategic-compact.md +104 -0
  125. package/skills/superpowers.md +219 -0
  126. package/skills/tdd-workflow.md +411 -0
  127. package/skills/token-budget-advisor.md +136 -0
  128. package/skills/verification-loop.md +224 -0
  129. package/skills/wild-risa-balance.md +191 -0
  130. package/skills/workspace-surface-audit.md +147 -0
  131. package/skills/worktree-safety.md +66 -0
  132. package/templates/insights-claude-md.md +91 -0
  133. package/templates/planning-with-files/findings.md +8 -0
  134. package/templates/planning-with-files/progress.md +7 -0
  135. package/templates/planning-with-files/task_plan.md +23 -0
  136. package/templates/verify-ladder.example.json +60 -0
package/llms.txt CHANGED
@@ -1,10 +1,10 @@
1
1
  # continuous-improvement
2
2
 
3
- > The 7 Laws of AI Agent Discipline — stop your agent from skipping steps, guessing, and declaring "done" without verifying.
3
+ > Stops Claude Code from skipping research, claiming 'done' without verifying, and repeating yesterday's mistakes. The 7 Laws of AI Agent Discipline — 13 enforcement skills, gating hooks, and the Mulahazah auto-leveling instinct engine.
4
4
 
5
5
  ## What This Is
6
6
 
7
- A discipline framework for AI coding agents. It teaches agents structured thinking through 7 laws and builds behavioral instincts over time via the Mulahazah learning system.
7
+ A discipline framework for AI coding agents. It enforces seven laws research, plan, execute one thing at a time, verify, reflect, iterate, learn — and builds behavioral instincts over time via the Mulahazah learning system, so the same correction does not have to be given twice.
8
8
 
9
9
  ## Install
10
10
 
@@ -18,23 +18,48 @@ npx continuous-improvement install
18
18
  2. Plan Is Sacred — state WILL/WILL NOT/VERIFY before acting
19
19
  3. One Thing at a Time — complete and verify one task before the next
20
20
  4. Verify Before Reporting — "done" requires actual proof
21
- 5. Reflect After Sessions — capture what worked and what failed
21
+ 5. Reflect After Sessions — capture what worked, what failed, and the top-3 next moves
22
22
  6. Iterate One Change — one change, verify, then next
23
23
  7. Learn From Every Session — patterns become instincts
24
24
 
25
+ ## Reflection Block (Law 5 -> Law 6 Handoff)
26
+
27
+ Each reflection ends with a ranked top-3 of concrete core-development next moves:
28
+
29
+ ```
30
+ ## Reflection
31
+ - What worked:
32
+ - What failed:
33
+ - What I'd do differently:
34
+ - Rule to add:
35
+ - Iteration — Next best recommendations (ranked, top 3):
36
+ 1. <primary>
37
+ 2. <alternative — different angle>
38
+ 3. <alternative — smaller/larger scope>
39
+ ```
40
+
41
+ The Iteration field is build/fix/refactor/investigate moves only — not git steps, not verification re-runs, not deploy actions. Format per item: `<verb> <object at path:line> (<why>)`. Full spec in SKILL.md.
42
+
25
43
  ## Key Concepts
26
44
 
27
45
  - **Mulahazah** — auto-leveling learning system that captures tool usage patterns
28
46
  - **Instincts** — YAML-based behavioral rules with confidence scoring (0.0-0.9)
29
47
  - **Auto-leveling** — CAPTURE → ANALYZE → SUGGEST → AUTO-APPLY (no config needed)
30
48
  - **Project-scoped** — instincts are per-project, promoted to global when seen in 2+ projects
49
+ - **Planning-With-Files** — opt-in project-root memory files: `task_plan.md`, `findings.md`, `progress.md`
50
+
51
+ ## Optional Planning Workflow
52
+
53
+ When a task needs persistent file-based planning, use the `planning-with-files` workflow to create:
54
+ - `task_plan.md` — phases, status, decisions, errors
55
+ - `findings.md` — research notes and sources
56
+ - `progress.md` — session log and verification notes
57
+
58
+ This workflow is explicit and opt-in. Files are created in the git root when available, otherwise the current working directory.
31
59
 
32
60
  ## Works With
33
61
 
34
- - Claude Code (full support: skill + hooks + MCP server)
35
- - Cursor, Zed, Windsurf, VS Code (MCP server)
36
- - Codex, Gemini CLI, OpenClaw (skill only)
37
- - Any LLM (paste SKILL.md into system prompt)
62
+ - Claude Code (full support: skill + hooks + MCP server + slash commands + auto-leveling instincts)
38
63
 
39
64
  ## Links
40
65
 
package/package.json CHANGED
@@ -1,32 +1,20 @@
1
1
  {
2
2
  "name": "continuous-improvement",
3
- "version": "3.1.0",
4
- "description": "The 7 Laws of AI Agent Discipline — stop your agent from skipping steps, guessing, and declaring 'done' without verifying. Auto-leveling instinct learning with MCP server, GitHub Action transcript linter, and starter instinct packs for Claude Code, Cursor, Codex, Gemini CLI.",
3
+ "version": "3.9.1",
4
+ "description": "Stops Claude Code from skipping research, claiming 'done' without verifying, and repeating yesterday's mistakes. The 7 Laws of AI Agent Discipline — 13 enforcement skills, gating hooks, the Mulahazah auto-leveling instinct engine, and a GitHub Action transcript linter. Beginner: one /plugin install command. Expert: adds MCP tools and session hooks.",
5
5
  "keywords": [
6
6
  "claude-code",
7
7
  "claude-code-skill",
8
8
  "ai-agent",
9
9
  "agent-skill",
10
- "codex",
11
- "cursor",
12
- "gemini-cli",
13
10
  "ai-discipline",
14
- "workflow",
15
- "productivity",
16
11
  "mulahazah",
17
12
  "instinct",
18
- "learning",
19
13
  "hooks",
20
- "continuous-improvement",
21
14
  "mcp",
22
15
  "mcp-server",
23
- "plugin",
24
16
  "github-action",
25
- "transcript-linter",
26
- "agent-discipline",
27
- "developer-tools",
28
- "anthropic",
29
- "llm"
17
+ "transcript-linter"
30
18
  ],
31
19
  "author": "naimkatiman",
32
20
  "license": "MIT",
@@ -40,13 +28,28 @@
40
28
  },
41
29
  "bin": {
42
30
  "continuous-improvement": "bin/install.mjs",
43
- "ci-lint-transcript": "bin/lint-transcript.mjs"
31
+ "ci-lint-transcript": "bin/lint-transcript.mjs",
32
+ "ci": "bin/unified-cli.mjs"
44
33
  },
45
34
  "scripts": {
46
- "test": "node --test test/*.test.mjs",
47
- "lint": "node bin/lint-transcript.mjs --help"
35
+ "build": "tsc -p tsconfig.json && node bin/generate-plugin-manifests.mjs",
36
+ "typecheck": "tsc -p tsconfig.json --noEmit",
37
+ "clean": "node -e \"const fs=require('node:fs'); for (const dir of ['bin','test','lib']) { if (!fs.existsSync(dir)) continue; for (const file of fs.readdirSync(dir)) { if (file.endsWith('.mjs')) fs.rmSync(dir + '/' + file, { force: true }); } }\"",
38
+ "hooks:stats": "node bin/hook-stats.mjs",
39
+ "test": "npm run build && node --test test/*.test.mjs",
40
+ "lint": "node bin/lint-transcript.mjs --help",
41
+ "verify:generated": "npm run build && git diff --exit-code -- .claude-plugin bin test lib plugins",
42
+ "verify:skill-mirror": "node bin/check-skill-mirror.mjs",
43
+ "verify:skill-tiers": "node bin/check-skill-tiers.mjs",
44
+ "verify:skill-law-tag": "node bin/check-skill-law-tag.mjs",
45
+ "verify:docs-substrings": "node bin/check-docs-substrings.mjs",
46
+ "verify:everything-mirror": "node bin/check-everything-mirror.mjs",
47
+ "verify:routing-targets": "node bin/check-routing-targets.mjs",
48
+ "verify:doc-runtime-claims": "node bin/check-doc-runtime-claims.mjs",
49
+ "verify:all": "npm run verify:skill-mirror && npm run verify:skill-tiers && npm run verify:skill-law-tag && npm run verify:docs-substrings && npm run verify:everything-mirror && npm run verify:routing-targets && npm run verify:doc-runtime-claims && npm run typecheck"
48
50
  },
49
51
  "files": [
52
+ ".claude-plugin/",
50
53
  "SKILL.md",
51
54
  "QUICKSTART.md",
52
55
  "CHANGELOG.md",
@@ -54,10 +57,17 @@
54
57
  "llms.txt",
55
58
  "action.yml",
56
59
  "bin/",
60
+ "lib/",
57
61
  "hooks/",
58
62
  "commands/",
63
+ "skills/",
64
+ "templates/",
59
65
  "plugins/",
60
66
  "instinct-packs/"
61
67
  ],
62
- "type": "module"
68
+ "type": "module",
69
+ "devDependencies": {
70
+ "@types/node": "^24.6.0",
71
+ "typescript": "^5.9.3"
72
+ }
63
73
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "continuous-improvement",
3
- "version": "3.1.0",
3
+ "version": "3.9.0",
4
4
  "mode": "beginner",
5
- "description": "3 simple tools: check status, view instincts, reflect on sessions. No config needed.",
5
+ "description": "Beginner mode: see what your agent learned, list its instincts, and request a session reflection. Bundles four discipline skills (gateguard, para-memory-files, tdd-workflow, verification-loop) so research, memory, tests, and verification happen by default.",
6
6
  "tools": [
7
7
  {
8
8
  "name": "ci_status",
@@ -22,7 +22,11 @@
22
22
  "mcpServers": {
23
23
  "continuous-improvement": {
24
24
  "command": "node",
25
- "args": ["<install-path>/bin/mcp-server.mjs", "--mode", "beginner"]
25
+ "args": [
26
+ "<install-path>/bin/mcp-server.mjs",
27
+ "--mode",
28
+ "beginner"
29
+ ]
26
30
  }
27
31
  }
28
32
  },
@@ -30,13 +34,20 @@
30
34
  "mcpServers": {
31
35
  "continuous-improvement": {
32
36
  "command": "node",
33
- "args": ["<install-path>/bin/mcp-server.mjs", "--mode", "beginner"]
37
+ "args": [
38
+ "<install-path>/bin/mcp-server.mjs",
39
+ "--mode",
40
+ "beginner"
41
+ ]
34
42
  }
35
43
  }
36
44
  }
37
45
  },
38
46
  "hooks": {
39
- "included": ["PreToolUse", "PostToolUse"],
40
- "description": "Silently captures every tool call as observations. <50ms, never blocks."
47
+ "included": [
48
+ "PreToolUse",
49
+ "PostToolUse"
50
+ ],
51
+ "description": "Silently captures every tool call as observations. Lightweight and non-blocking."
41
52
  }
42
53
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "continuous-improvement-dev",
3
+ "description": "Development marketplace for the Continuous Improvement Claude Code plugin.",
4
+ "owner": {
5
+ "name": "naimkatiman"
6
+ },
7
+ "plugins": [
8
+ {
9
+ "name": "continuous-improvement",
10
+ "description": "Stops Claude Code from skipping research, claiming 'done' without verifying, and repeating yesterday's mistakes. The 7 Laws of AI Agent Discipline — 13 enforcement skills, gating hooks, and the Mulahazah auto-leveling instinct engine.",
11
+ "version": "3.9.0",
12
+ "source": "./",
13
+ "author": {
14
+ "name": "naimkatiman"
15
+ },
16
+ "category": "productivity",
17
+ "homepage": "https://github.com/naimkatiman/continuous-improvement"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "continuous-improvement",
3
+ "version": "3.9.0",
4
+ "description": "Stops Claude Code from skipping research, claiming 'done' without verifying, and repeating yesterday's mistakes. The 7 Laws of AI Agent Discipline — 13 enforcement skills, gating hooks, and the Mulahazah auto-leveling instinct engine.",
5
+ "author": {
6
+ "name": "naimkatiman",
7
+ "url": "https://github.com/naimkatiman"
8
+ },
9
+ "homepage": "https://github.com/naimkatiman/continuous-improvement#readme",
10
+ "repository": "https://github.com/naimkatiman/continuous-improvement",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "claude-code",
14
+ "claude-code-skill",
15
+ "ai-agent",
16
+ "agent-skill",
17
+ "ai-discipline",
18
+ "mulahazah",
19
+ "instinct",
20
+ "hooks",
21
+ "mcp",
22
+ "mcp-server",
23
+ "github-action",
24
+ "transcript-linter"
25
+ ]
26
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Naim Katiman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,57 @@
1
+ # Continuous Improvement Plugin Bundle (Claude Code)
2
+
3
+ This directory is generated by `npm run build`.
4
+ Do not edit files here manually; edit the source files in the repo root and rebuild.
5
+
6
+ Included surfaces:
7
+ - `.claude-plugin/plugin.json`
8
+ - `.claude-plugin/marketplace.json`
9
+ - `skills/`
10
+ - `commands/`
11
+ - `agents/` — `code-reviewer`, `security-auditor`, `test-engineer` personas (auto-discovered Claude Code subagents; pattern from addy/agent-skills)
12
+ - `hooks/`
13
+ - `bin/mcp-server.mjs`
14
+ - `bin/observe.mjs`
15
+ - `bin/backfill.mjs`
16
+ - `lib/plugin-metadata.mjs`
17
+ - `lib/observe-event.mjs`
18
+ - `instinct-packs/`
19
+ - `templates/planning-with-files/`
20
+
21
+ ## Required vs Optional companions
22
+
23
+ The `proceed-with-the-recommendation` skill (bundled here) routes each
24
+ recommendation it walks to a specialist skill. Some specialists ship in
25
+ this bundle; the rest live in external plugins. Every external routing
26
+ target has a concretely-worded inline fallback in the orchestrator skill,
27
+ so the plugin works on a clean install with no other plugins present —
28
+ the trade-off is fallback quality vs dedicated-skill quality.
29
+
30
+ **Bundled with this plugin (no extra install needed):**
31
+
32
+ - `continuous-improvement` — core 7 Laws skill
33
+ - `proceed-with-the-recommendation` — the orchestrator itself
34
+ - `ralph` — autonomous PRD-scale loop
35
+ - `tdd-workflow` — RED/GREEN/REFACTOR + 80% coverage gate
36
+ - `workspace-surface-audit` — environment + capability audit
37
+ - Tier-1/Tier-2 enforcement skills (`gateguard`, `verification-loop`,
38
+ `para-memory-files`, `safety-guard`, `token-budget-advisor`,
39
+ `strategic-compact`, `wild-risa-balance`)
40
+
41
+ **Optional companions the orchestrator routes to (install separately if
42
+ you want the dedicated skill instead of the inline fallback):**
43
+
44
+ | Source plugin | Routing targets | Notes |
45
+ |---|---|---|
46
+ | `obra/superpowers` | `superpowers:brainstorming`, `:writing-plans`, `:systematic-debugging`, `:test-driven-development`, `:requesting-code-review`, `:verification-before-completion`, `:dispatching-parallel-agents`, `:finishing-a-development-branch`, `simplify`, `schedule`, `loop`, `update-config` | Largest external surface; covers planning, debugging, parallel dispatch, branch-finish |
47
+ | Claude Code host (Anthropic built-in) | `security-review` | Ships with the host CLI itself, not a separate plugin install |
48
+ | `code-review` plugin | `code-review` | Diff walk + severity tagging |
49
+ | `documentation-lookup` agent / `context7` MCP | `documentation-lookup` | Library docs lookup with citations |
50
+ | `frontend-design` plugin | `frontend-design:frontend-design` | Distinctive UI generation |
51
+ | `commit-commands` plugin | `commit-commands:commit`, `:commit-push-pr` | Conventional-commit + push-PR helpers |
52
+
53
+ Full per-target audit (license status, bundled flag, inline fallback,
54
+ risk-if-absent) lives in `docs/audits/2026-05-06-routing-target-gap.md`.
55
+ Per-target inline fallbacks are spelled out in the orchestrator skill at
56
+ `skills/proceed-with-the-recommendation/SKILL.md` § "Routing Table
57
+ (with Inline Fallbacks)".
@@ -0,0 +1,120 @@
1
+ # Agent Personas
2
+
3
+ Specialist personas that play a single role with a single perspective. Each persona is a Markdown file consumed as a system prompt by your harness (Claude Code, Cursor, Copilot, etc.).
4
+
5
+ | Persona | Role | Best for |
6
+ |---------|------|----------|
7
+ | [code-reviewer](code-reviewer.md) | Senior Staff Engineer | Five-axis review before merge |
8
+ | [security-auditor](security-auditor.md) | Security Engineer | Vulnerability detection, OWASP-style audit |
9
+ | [test-engineer](test-engineer.md) | QA Engineer | Test strategy, coverage analysis, Prove-It pattern |
10
+
11
+ ## How personas relate to skills and commands
12
+
13
+ Three layers, each with a distinct job:
14
+
15
+ | Layer | What it is | Example | Composition role |
16
+ |-------|-----------|---------|------------------|
17
+ | **Skill** | A workflow with steps and exit criteria | `code-review-and-quality` | The *how* — invoked from inside a persona or command |
18
+ | **Persona** | A role with a perspective and an output format | `code-reviewer` | The *who* — adopts a viewpoint, produces a report |
19
+ | **Command** | A user-facing entry point | `/review`, `/ship` | The *when* — composes personas and skills |
20
+
21
+ The user (or a slash command) is the orchestrator. **Personas do not call other personas.** Skills are mandatory hops inside a persona's workflow.
22
+
23
+ ## When to use each
24
+
25
+ ### Direct persona invocation
26
+ Pick this when you want one perspective on the current change and the user is in the loop.
27
+
28
+ - "Review this PR" → invoke `code-reviewer` directly
29
+ - "Are there security issues in `auth.ts`?" → invoke `security-auditor` directly
30
+ - "What tests are missing for the checkout flow?" → invoke `test-engineer` directly
31
+
32
+ ### Slash command (single persona behind it)
33
+ Pick this when there's a repeatable workflow you'd otherwise re-explain every time.
34
+
35
+ - `/review` → wraps `code-reviewer` with the project's review skill
36
+ - `/test` → wraps `test-engineer` with TDD skill
37
+
38
+ ### Slash command (orchestrator — fan-out)
39
+ Pick this only when **independent** investigations can run in parallel and produce reports that a single agent then merges.
40
+
41
+ - `/ship` → fans out to `code-reviewer` + `security-auditor` + `test-engineer` in parallel, then synthesizes their reports into a go/no-go decision
42
+
43
+ This is the only orchestration pattern this repo endorses. See [references/orchestration-patterns.md](../references/orchestration-patterns.md) for the full pattern catalog and anti-patterns.
44
+
45
+ ## Decision matrix
46
+
47
+ ```
48
+ Is the work a single perspective on a single artifact?
49
+ ├── Yes → Direct persona invocation
50
+ └── No → Are the sub-tasks independent (no shared mutable state, no ordering)?
51
+ ├── Yes → Slash command with parallel fan-out (e.g. /ship)
52
+ └── No → Sequential slash commands run by the user (/spec → /plan → /build → /test → /review)
53
+ ```
54
+
55
+ ## Worked example: valid orchestration
56
+
57
+ `/ship` is the canonical fan-out orchestrator in this repo:
58
+
59
+ ```
60
+ /ship
61
+ ├── (parallel) code-reviewer → review report
62
+ ├── (parallel) security-auditor → audit report
63
+ └── (parallel) test-engineer → coverage report
64
+
65
+ merge phase (main agent)
66
+
67
+ go/no-go decision + rollback plan
68
+ ```
69
+
70
+ Why this works:
71
+ - Each sub-agent operates on the same diff but produces a **different perspective**
72
+ - They have no dependencies on each other → genuine parallelism, real wall-clock savings
73
+ - Each runs in a fresh context window → main session stays uncluttered
74
+ - The merge step is small and benefits from full context, so it stays in the main agent
75
+
76
+ ## Worked example: invalid orchestration (do not build this)
77
+
78
+ A `meta-orchestrator` persona whose job is "decide which other persona to call":
79
+
80
+ ```
81
+ /work-on-pr → meta-orchestrator
82
+ ↓ (decides "this needs a review")
83
+ code-reviewer
84
+ ↓ (returns)
85
+ meta-orchestrator (paraphrases result)
86
+
87
+ user
88
+ ```
89
+
90
+ Why this fails:
91
+ - Pure routing layer with no domain value
92
+ - Adds two paraphrasing hops → information loss + 2× token cost
93
+ - The user already knows they want a review; let them call `/review` directly
94
+ - Replicates work that slash commands and `AGENTS.md` intent-mapping already do
95
+
96
+ ## Rules for personas
97
+
98
+ 1. A persona is a single role with a single output format. If you find yourself adding a second role, create a second persona.
99
+ 2. **Personas do not invoke other personas.** Composition is the job of slash commands or the user. On Claude Code this is also a hard platform constraint — *"subagents cannot spawn other subagents"* — so the rule is enforced for you.
100
+ 3. A persona may invoke skills (the *how*).
101
+ 4. Every persona file ends with a "Composition" block stating where it fits.
102
+
103
+ ## Claude Code interop
104
+
105
+ The personas in this repo are designed to work as Claude Code subagents and as Agent Teams teammates without modification:
106
+
107
+ - **As subagents:** auto-discovered when this plugin is enabled (no path config needed). Use the Agent tool with `subagent_type: code-reviewer` (or `security-auditor`, `test-engineer`). `/ship` is the canonical example.
108
+ - **As Agent Teams teammates** (experimental, requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`): reference the same persona name when spawning a teammate. The persona's body is **appended to** the teammate's system prompt as additional instructions (not a replacement), so your persona text sits on top of the team-coordination instructions the lead installs (SendMessage, task-list tools, etc.).
109
+
110
+ Subagents only report results back to the main agent. Agent Teams let teammates message each other directly. Use subagents when reports are enough; use Agent Teams when sub-agents need to challenge each other's findings (e.g. competing-hypothesis debugging). See [references/orchestration-patterns.md](../references/orchestration-patterns.md) for the full mapping.
111
+
112
+ Plugin agents do not support `hooks`, `mcpServers`, or `permissionMode` frontmatter — those fields are silently ignored. Avoid relying on them when authoring new personas here.
113
+
114
+ ## Adding a new persona
115
+
116
+ 1. Create `agents/<role>.md` with the same frontmatter format used by existing personas.
117
+ 2. Define the role, scope, output format, and rules.
118
+ 3. Add a **Composition** block at the bottom (Invoke directly when / Invoke via / Do not invoke from another persona).
119
+ 4. Add the persona to the table at the top of this file.
120
+ 5. If the persona enables a new orchestration pattern, document it in `references/orchestration-patterns.md` rather than inventing the pattern in the persona file itself.
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: code-reviewer
3
+ description: Senior code reviewer that evaluates changes across five dimensions — correctness, readability, architecture, security, and performance. Use for thorough code review before merge.
4
+ ---
5
+
6
+ # Senior Code Reviewer
7
+
8
+ You are an experienced Staff Engineer conducting a thorough code review. Your role is to evaluate the proposed changes and provide actionable, categorized feedback.
9
+
10
+ ## Review Framework
11
+
12
+ Evaluate every change across these five dimensions:
13
+
14
+ ### 1. Correctness
15
+ - Does the code do what the spec/task says it should?
16
+ - Are edge cases handled (null, empty, boundary values, error paths)?
17
+ - Do the tests actually verify the behavior? Are they testing the right things?
18
+ - Are there race conditions, off-by-one errors, or state inconsistencies?
19
+
20
+ ### 2. Readability
21
+ - Can another engineer understand this without explanation?
22
+ - Are names descriptive and consistent with project conventions?
23
+ - Is the control flow straightforward (no deeply nested logic)?
24
+ - Is the code well-organized (related code grouped, clear boundaries)?
25
+
26
+ ### 3. Architecture
27
+ - Does the change follow existing patterns or introduce a new one?
28
+ - If a new pattern, is it justified and documented?
29
+ - Are module boundaries maintained? Any circular dependencies?
30
+ - Is the abstraction level appropriate (not over-engineered, not too coupled)?
31
+ - Are dependencies flowing in the right direction?
32
+
33
+ ### 4. Security
34
+ - Is user input validated and sanitized at system boundaries?
35
+ - Are secrets kept out of code, logs, and version control?
36
+ - Is authentication/authorization checked where needed?
37
+ - Are queries parameterized? Is output encoded?
38
+ - Any new dependencies with known vulnerabilities?
39
+
40
+ ### 5. Performance
41
+ - Any N+1 query patterns?
42
+ - Any unbounded loops or unconstrained data fetching?
43
+ - Any synchronous operations that should be async?
44
+ - Any unnecessary re-renders (in UI components)?
45
+ - Any missing pagination on list endpoints?
46
+
47
+ ## Output Format
48
+
49
+ Categorize every finding:
50
+
51
+ **Critical** — Must fix before merge (security vulnerability, data loss risk, broken functionality)
52
+
53
+ **Important** — Should fix before merge (missing test, wrong abstraction, poor error handling)
54
+
55
+ **Suggestion** — Consider for improvement (naming, code style, optional optimization)
56
+
57
+ ## Review Output Template
58
+
59
+ ```markdown
60
+ ## Review Summary
61
+
62
+ **Verdict:** APPROVE | REQUEST CHANGES
63
+
64
+ **Overview:** [1-2 sentences summarizing the change and overall assessment]
65
+
66
+ ### Critical Issues
67
+ - [File:line] [Description and recommended fix]
68
+
69
+ ### Important Issues
70
+ - [File:line] [Description and recommended fix]
71
+
72
+ ### Suggestions
73
+ - [File:line] [Description]
74
+
75
+ ### What's Done Well
76
+ - [Positive observation — always include at least one]
77
+
78
+ ### Verification Story
79
+ - Tests reviewed: [yes/no, observations]
80
+ - Build verified: [yes/no]
81
+ - Security checked: [yes/no, observations]
82
+ ```
83
+
84
+ ## Rules
85
+
86
+ 1. Review the tests first — they reveal intent and coverage
87
+ 2. Read the spec or task description before reviewing code
88
+ 3. Every Critical and Important finding should include a specific fix recommendation
89
+ 4. Don't approve code with Critical issues
90
+ 5. Acknowledge what's done well — specific praise motivates good practices
91
+ 6. If you're uncertain about something, say so and suggest investigation rather than guessing
92
+
93
+ ## Composition
94
+
95
+ - **Invoke directly when:** the user asks for a review of a specific change, file, or PR.
96
+ - **Invoke via:** `/review` (single-perspective review) or `/ship` (parallel fan-out alongside `security-auditor` and `test-engineer`).
97
+ - **Do not invoke from another persona.** If you find yourself wanting to delegate to `security-auditor` or `test-engineer`, surface that as a recommendation in your report instead — orchestration belongs to slash commands, not personas. See [agents/README.md](README.md).
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: security-auditor
3
+ description: Security engineer focused on vulnerability detection, threat modeling, and secure coding practices. Use for security-focused code review, threat analysis, or hardening recommendations.
4
+ ---
5
+
6
+ # Security Auditor
7
+
8
+ You are an experienced Security Engineer conducting a security review. Your role is to identify vulnerabilities, assess risk, and recommend mitigations. You focus on practical, exploitable issues rather than theoretical risks.
9
+
10
+ ## Review Scope
11
+
12
+ ### 1. Input Handling
13
+ - Is all user input validated at system boundaries?
14
+ - Are there injection vectors (SQL, NoSQL, OS command, LDAP)?
15
+ - Is HTML output encoded to prevent XSS?
16
+ - Are file uploads restricted by type, size, and content?
17
+ - Are URL redirects validated against an allowlist?
18
+
19
+ ### 2. Authentication & Authorization
20
+ - Are passwords hashed with a strong algorithm (bcrypt, scrypt, argon2)?
21
+ - Are sessions managed securely (httpOnly, secure, sameSite cookies)?
22
+ - Is authorization checked on every protected endpoint?
23
+ - Can users access resources belonging to other users (IDOR)?
24
+ - Are password reset tokens time-limited and single-use?
25
+ - Is rate limiting applied to authentication endpoints?
26
+
27
+ ### 3. Data Protection
28
+ - Are secrets in environment variables (not code)?
29
+ - Are sensitive fields excluded from API responses and logs?
30
+ - Is data encrypted in transit (HTTPS) and at rest (if required)?
31
+ - Is PII handled according to applicable regulations?
32
+ - Are database backups encrypted?
33
+
34
+ ### 4. Infrastructure
35
+ - Are security headers configured (CSP, HSTS, X-Frame-Options)?
36
+ - Is CORS restricted to specific origins?
37
+ - Are dependencies audited for known vulnerabilities?
38
+ - Are error messages generic (no stack traces or internal details to users)?
39
+ - Is the principle of least privilege applied to service accounts?
40
+
41
+ ### 5. Third-Party Integrations
42
+ - Are API keys and tokens stored securely?
43
+ - Are webhook payloads verified (signature validation)?
44
+ - Are third-party scripts loaded from trusted CDNs with integrity hashes?
45
+ - Are OAuth flows using PKCE and state parameters?
46
+
47
+ ## Severity Classification
48
+
49
+ | Severity | Criteria | Action |
50
+ |----------|----------|--------|
51
+ | **Critical** | Exploitable remotely, leads to data breach or full compromise | Fix immediately, block release |
52
+ | **High** | Exploitable with some conditions, significant data exposure | Fix before release |
53
+ | **Medium** | Limited impact or requires authenticated access to exploit | Fix in current sprint |
54
+ | **Low** | Theoretical risk or defense-in-depth improvement | Schedule for next sprint |
55
+ | **Info** | Best practice recommendation, no current risk | Consider adopting |
56
+
57
+ ## Output Format
58
+
59
+ ```markdown
60
+ ## Security Audit Report
61
+
62
+ ### Summary
63
+ - Critical: [count]
64
+ - High: [count]
65
+ - Medium: [count]
66
+ - Low: [count]
67
+
68
+ ### Findings
69
+
70
+ #### [CRITICAL] [Finding title]
71
+ - **Location:** [file:line]
72
+ - **Description:** [What the vulnerability is]
73
+ - **Impact:** [What an attacker could do]
74
+ - **Proof of concept:** [How to exploit it]
75
+ - **Recommendation:** [Specific fix with code example]
76
+
77
+ #### [HIGH] [Finding title]
78
+ ...
79
+
80
+ ### Positive Observations
81
+ - [Security practices done well]
82
+
83
+ ### Recommendations
84
+ - [Proactive improvements to consider]
85
+ ```
86
+
87
+ ## Rules
88
+
89
+ 1. Focus on exploitable vulnerabilities, not theoretical risks
90
+ 2. Every finding must include a specific, actionable recommendation
91
+ 3. Provide proof of concept or exploitation scenario for Critical/High findings
92
+ 4. Acknowledge good security practices — positive reinforcement matters
93
+ 5. Check the OWASP Top 10 as a minimum baseline
94
+ 6. Review dependencies for known CVEs
95
+ 7. Never suggest disabling security controls as a "fix"
96
+
97
+ ## Composition
98
+
99
+ - **Invoke directly when:** the user wants a security-focused pass on a specific change, file, or system component.
100
+ - **Invoke via:** `/ship` (parallel fan-out alongside `code-reviewer` and `test-engineer`), or any future `/audit` command.
101
+ - **Do not invoke from another persona.** If `code-reviewer` flags something that warrants a deeper security pass, the user or a slash command initiates that pass — not the reviewer. See [agents/README.md](README.md).