continuous-improvement 3.0.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/.claude-plugin/marketplace.json +78 -0
  2. package/CHANGELOG.md +210 -0
  3. package/LICENSE +21 -21
  4. package/QUICKSTART.md +101 -81
  5. package/README.md +224 -198
  6. package/SKILL.md +87 -9
  7. package/action.yml +33 -0
  8. package/bin/analyze.sh +161 -153
  9. package/bin/backfill.mjs +172 -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 +169 -0
  18. package/bin/harvest-friction.mjs +279 -0
  19. package/bin/hook-stats.mjs +258 -0
  20. package/bin/install.mjs +418 -456
  21. package/bin/lint-transcript.mjs +239 -0
  22. package/bin/mcp-server.mjs +842 -499
  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 +115 -74
  28. package/commands/dashboard.md +56 -0
  29. package/commands/discipline.md +51 -0
  30. package/commands/harvest.md +76 -0
  31. package/commands/learn-eval.md +117 -0
  32. package/commands/planning-with-files.md +66 -0
  33. package/commands/proceed-with-the-recommendation.md +62 -0
  34. package/commands/ralph.md +103 -0
  35. package/commands/release-train.md +81 -0
  36. package/commands/seven-laws.md +16 -0
  37. package/commands/superpowers.md +153 -0
  38. package/commands/swarm.md +101 -0
  39. package/commands/workspace-surface-audit.md +77 -0
  40. package/hooks/observe.sh +172 -134
  41. package/hooks/session.sh +106 -106
  42. package/hooks/three-section-close.mjs +181 -0
  43. package/instinct-packs/go.json +58 -0
  44. package/instinct-packs/meta.json +16 -0
  45. package/instinct-packs/python.json +58 -0
  46. package/instinct-packs/react.json +58 -0
  47. package/lib/cli-anything.mjs +401 -0
  48. package/lib/compound-engineering.mjs +831 -0
  49. package/lib/observe-event.mjs +128 -0
  50. package/lib/plugin-metadata.mjs +432 -0
  51. package/lib/pm-marketplace.mjs +61 -0
  52. package/lib/pm-skills.mjs +1274 -0
  53. package/lib/resolve-home-dir.mjs +43 -0
  54. package/lib/skill-tiers.mjs +137 -0
  55. package/lib/unified-plugin.mjs +924 -0
  56. package/llms.txt +68 -0
  57. package/package.json +38 -15
  58. package/plugins/beginner.json +17 -6
  59. package/plugins/continuous-improvement/.claude-plugin/marketplace.json +20 -0
  60. package/plugins/continuous-improvement/.claude-plugin/plugin.json +26 -0
  61. package/plugins/continuous-improvement/LICENSE +21 -0
  62. package/plugins/continuous-improvement/README.md +56 -0
  63. package/plugins/continuous-improvement/bin/backfill.mjs +172 -0
  64. package/plugins/continuous-improvement/bin/mcp-server.mjs +886 -0
  65. package/plugins/continuous-improvement/bin/observe.mjs +148 -0
  66. package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -0
  67. package/plugins/continuous-improvement/commands/dashboard.md +56 -0
  68. package/plugins/continuous-improvement/commands/discipline.md +51 -0
  69. package/plugins/continuous-improvement/commands/harvest.md +76 -0
  70. package/plugins/continuous-improvement/commands/learn-eval.md +117 -0
  71. package/plugins/continuous-improvement/commands/planning-with-files.md +66 -0
  72. package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +62 -0
  73. package/plugins/continuous-improvement/commands/ralph.md +103 -0
  74. package/plugins/continuous-improvement/commands/release-train.md +81 -0
  75. package/plugins/continuous-improvement/commands/seven-laws.md +16 -0
  76. package/plugins/continuous-improvement/commands/superpowers.md +153 -0
  77. package/plugins/continuous-improvement/commands/swarm.md +101 -0
  78. package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -0
  79. package/plugins/continuous-improvement/hooks/hooks.json +60 -0
  80. package/plugins/continuous-improvement/hooks/observe.sh +172 -0
  81. package/plugins/continuous-improvement/hooks/session.sh +106 -0
  82. package/plugins/continuous-improvement/hooks/three-section-close.mjs +181 -0
  83. package/plugins/continuous-improvement/instinct-packs/go.json +58 -0
  84. package/plugins/continuous-improvement/instinct-packs/meta.json +16 -0
  85. package/plugins/continuous-improvement/instinct-packs/python.json +58 -0
  86. package/plugins/continuous-improvement/instinct-packs/react.json +58 -0
  87. package/plugins/continuous-improvement/lib/observe-event.mjs +128 -0
  88. package/plugins/continuous-improvement/lib/plugin-metadata.mjs +432 -0
  89. package/plugins/continuous-improvement/lib/resolve-home-dir.mjs +43 -0
  90. package/plugins/continuous-improvement/skills/README.md +34 -0
  91. package/plugins/continuous-improvement/skills/continuous-improvement/SKILL.md +249 -0
  92. package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +131 -0
  93. package/plugins/continuous-improvement/skills/gateguard/SKILL.md +155 -0
  94. package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +108 -0
  95. package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +454 -0
  96. package/plugins/continuous-improvement/skills/ralph/SKILL.md +221 -0
  97. package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +76 -0
  98. package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +104 -0
  99. package/plugins/continuous-improvement/skills/superpowers/SKILL.md +212 -0
  100. package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -0
  101. package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +136 -0
  102. package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +192 -0
  103. package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +191 -0
  104. package/plugins/continuous-improvement/skills/workspace-surface-audit/SKILL.md +147 -0
  105. package/plugins/continuous-improvement/templates/planning-with-files/findings.md +8 -0
  106. package/plugins/continuous-improvement/templates/planning-with-files/progress.md +7 -0
  107. package/plugins/continuous-improvement/templates/planning-with-files/task_plan.md +23 -0
  108. package/plugins/expert.json +34 -5
  109. package/skills/README.md +79 -0
  110. package/skills/deploy-receipt.md +131 -0
  111. package/skills/gateguard.md +155 -0
  112. package/skills/para-memory-files.md +108 -0
  113. package/skills/proceed-with-the-recommendation.md +454 -0
  114. package/skills/ralph.md +221 -0
  115. package/skills/safety-guard.md +76 -0
  116. package/skills/strategic-compact.md +104 -0
  117. package/skills/superpowers.md +212 -0
  118. package/skills/tdd-workflow.md +411 -0
  119. package/skills/token-budget-advisor.md +136 -0
  120. package/skills/verification-loop.md +192 -0
  121. package/skills/wild-risa-balance.md +191 -0
  122. package/skills/workspace-surface-audit.md +147 -0
  123. package/templates/planning-with-files/findings.md +8 -0
  124. package/templates/planning-with-files/progress.md +7 -0
  125. package/templates/planning-with-files/task_plan.md +23 -0
  126. package/templates/verify-ladder.example.json +47 -0
package/README.md CHANGED
@@ -5,153 +5,105 @@
5
5
  <h1 align="center">The 7 Laws of AI Agent Discipline</h1>
6
6
 
7
7
  <p align="center">
8
- <b>Stop your AI agent from skipping steps, guessing, and declaring "done" without verifying.</b>
8
+ <b>Stop your Claude Code agent from skipping steps, guessing, and declaring "done" without verifying.</b>
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
12
  <a href="https://www.npmjs.com/package/continuous-improvement"><img src="https://img.shields.io/npm/v/continuous-improvement" alt="npm"></a>
13
- <a href="https://www.npmjs.com/package/continuous-improvement"><img src="https://img.shields.io/npm/dm/continuous-improvement" alt="downloads"></a>
13
+ <a href="https://docs.anthropic.com/en/docs/claude-code"><img src="https://img.shields.io/badge/Claude%20Code-skill-blueviolet" alt="Claude Code"></a>
14
14
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a>
15
- <a href="test/"><img src="https://img.shields.io/badge/tests-20%20passing-brightgreen" alt="tests"></a>
15
+ <a href="test/"><img src="https://img.shields.io/badge/tests-passing-brightgreen" alt="tests"></a>
16
16
  </p>
17
17
 
18
18
  <p align="center">
19
- <a href="https://docs.anthropic.com/en/docs/claude-code"><img src="https://img.shields.io/badge/Claude%20Code-skill-blueviolet" alt="Claude Code"></a>
20
- <a href="https://cursor.sh"><img src="https://img.shields.io/badge/Cursor-compatible-blue" alt="Cursor"></a>
21
- <a href="https://openai.com/codex"><img src="https://img.shields.io/badge/Codex-compatible-blue" alt="Codex"></a>
22
- <a href="https://ai.google.dev/gemini-api/docs/gemini-cli"><img src="https://img.shields.io/badge/Gemini%20CLI-compatible-blue" alt="Gemini CLI"></a>
19
+ <b>New here?</b> → <a href="QUICKSTART.md">QUICKSTART.md</a> (2 minutes)
23
20
  </p>
24
21
 
25
22
  ---
26
23
 
27
- ## The Problem
28
-
29
- AI agents are great at individual steps. They're terrible at **discipline**.
24
+ ## The problem this solves
30
25
 
31
- They skip research. They plan loosely. They declare "done" before verifying. They add features mid-task. They never reflect. Each session, they repeat the same mistakes.
26
+ You have used Claude Code (or any agentic coding tool) long enough to recognize the failure pattern.
32
27
 
33
- **The 7 Laws** fix that plus a **learning system** (Mulahazah) that builds instincts over time. No config, no daemon, no manual setup.
28
+ | You ask the agent to... | What actually happens |
29
+ |---|---|
30
+ | Add a feature | It edits five files, never runs the build, says "done" |
31
+ | Fix a bug | It reinvents a helper that already exists in the repo |
32
+ | Refactor a module | It bundles three unrelated changes into one commit |
33
+ | Pick up where last session ended | It re-explores from zero — the prior session's lessons are gone |
34
+ | Verify the change works | It claims "this should work" without running a single test |
34
35
 
35
- ### Before vs After
36
+ Every one of those failures is the agent skipping a step a disciplined engineer would not skip. The 7 Laws of AI Agent Discipline names each step, gives it a hook or a skill that enforces it, and feeds the captured patterns back into the agent so the same mistake gets harder to repeat next session.
36
37
 
37
- <details>
38
- <summary><b>Without continuous-improvement</b> — agent skips research, declares "done" without verifying</summary>
38
+ ## What you get
39
39
 
40
- ```
41
- You: Add rate limiting to the /api/users endpoint
40
+ - **A 7-step discipline** the agent must follow every task — research → plan → execute one thing → verify → reflect → learn → iterate. Each Law has at least one skill or hook that enforces it.
41
+ - **13 bundled skills** that turn the Laws from a doc into runtime behavior — `gateguard` blocks unverified Edit/Write/destructive Bash, `tdd-workflow` enforces RED → GREEN → REFACTOR, `verification-loop` runs build/types/tests/security before "done", `proceed-with-the-recommendation` walks any agent's recommendation list top-to-bottom with per-item verification.
42
+ - **Mulahazah, the auto-leveling instinct engine** — hooks capture every tool call; after ~20 observations the agent analyzes patterns and creates instincts with confidence scores. Suggestions appear at 0.5+, auto-apply at 0.7+, decay when ignored. Project-scoped, promote to global after 2+ projects. You configure nothing.
43
+ - **A GitHub Action transcript linter** that catches skipped Laws in CI — writes without prior research, edits without verification, too many files at once.
44
+ - **Two install paths** — Beginner is two slash commands inside Claude Code (no Node, no bash, ~90% of users). Expert adds the MCP server, observation hooks, instinct packs, and the linter.
42
45
 
43
- Agent: I'll add rate limiting now.
44
- *writes express-rate-limit middleware*
45
- Done! I've added rate limiting to the /api/users endpoint.
46
+ The whole thing is MIT, free, and lives in this one repo. No service, no account, no telemetry leaves your machine.
46
47
 
47
- You: Did you check if we already have rate limiting somewhere?
48
- Agent: Let me check... oh, there's already a rate limiter in middleware/rateLimit.ts.
49
- I've created a duplicate. Let me fix that.
48
+ ---
50
49
 
51
- You: Did you test it?
52
- Agent: Let me run the tests... they're failing. The import path is wrong.
53
- *fixes import*
54
- Now it works!
50
+ ## Install
55
51
 
56
- You: You also broke the /api/auth endpoint it was sharing that middleware.
57
- Agent: I see. Let me fix that too...
58
- ```
52
+ **If you don't know which to pick, use Beginner.** It is enough for ~90% of users and adds no Node or bash dependency.
59
53
 
60
- **Result:** 4 back-and-forth corrections. Duplicate code. Broken endpoint. 15 minutes wasted.
61
- </details>
54
+ ### Beginner inside Claude Code, two commands
62
55
 
63
- <details>
64
- <summary><b>With continuous-improvement</b> — agent follows the 7 laws</summary>
56
+ You get the 7 Laws skill, the hooks that enforce it, and the slash commands. Nothing else to install.
65
57
 
58
+ ```bash
59
+ # Inside Claude Code (no shell needed)
60
+ /plugin marketplace add naimkatiman/continuous-improvement
61
+ /plugin install continuous-improvement@continuous-improvement
66
62
  ```
67
- You: Add rate limiting to the /api/users endpoint
68
63
 
69
- Agent: **[Law 1: Research]** Searching for existing rate limiting...
70
- Found: middleware/rateLimit.ts — already applies to /api/auth.
71
- Found: express-rate-limit already in package.json.
64
+ The doubled name is correct: it reads as `<plugin>@<marketplace>`.
72
65
 
73
- **[Law 2: Plan]**
74
- WILL: Extend existing rateLimit middleware to cover /api/users
75
- WILL NOT: Create new middleware or change existing /api/auth behavior
76
- VERIFY: Run tests + curl /api/users 101 times to confirm 429 response
66
+ Verify: run `/discipline` in Claude Code — you should see the 7 Laws card.
67
+ If the command is not recognized, restart your Claude Code session first; the marketplace did pick the plugin up but commands load on session start.
77
68
 
78
- **[Law 3: Execute one thing]** Adding /api/users to the route list
79
- in middleware/rateLimit.ts...
69
+ ### Expert adds MCP server, observation hooks, and instinct packs
80
70
 
81
- **[Law 4: Verify]**
82
- ✓ npm test — 47/47 passing
83
- ✓ curl test — 429 after 100 requests
84
- ✓ /api/auth still works — 200 OK
71
+ Pick this if you want the MCP tools (12 of them, including `ci_plan_init` / `ci_plan_status` for `task_plan.md`-style planning), the session hooks that feed Mulahazah, and starter packs.
85
72
 
86
- Done. Extended existing rate limiter to cover /api/users.
87
- One file changed: middleware/rateLimit.ts (+1 line).
88
- ```
89
-
90
- **Result:** Correct on first attempt. No duplicate code. No broken endpoints. 2 minutes.
91
- </details>
92
-
93
- ---
94
-
95
- ## Install
96
-
97
- ### Beginner (default) — just hooks, no setup needed
98
-
99
- ```bash
100
- npx continuous-improvement install
101
- ```
102
-
103
- That's it. For Claude Code, this installs:
104
- - Observation hooks (captures every tool call, <50ms, jq optional)
105
- - `/continuous-improvement` command
106
- - Auto-leveling instinct system
107
-
108
- ### Expert — full power with MCP server
73
+ Preconditions: Node 18 / 20 / 22, plus bash on Windows (Git Bash or WSL — `hooks/observe.sh` is a bash script and silently no-ops without it). **`jq` is no longer required**: as of v3.6.0, `observe.sh` prefers the Node observer (`bin/observe.mjs`) which writes the rich event schema natively without external dependencies. The bash thin-schema path is kept as a two-phase shim, so legacy installs that have not re-run `npx continuous-improvement install` since v3.5.x will still degrade silently without `jq` (`winget install jqlang.jq` on Windows, `brew install jq` on macOS, `apt install jq` on Debian/Ubuntu) — re-running the installer is the cleaner fix and removes the dependency entirely. See [CHANGELOG.md](CHANGELOG.md) `[3.6.0]` for the migration details.
109
74
 
110
75
  ```bash
111
76
  npx continuous-improvement install --mode expert
77
+ npx continuous-improvement install --pack react # optional: react | python | go | meta
78
+ # --pack seeds 5–10 starter instincts so suggestions appear in week 1 instead of week 4.
112
79
  ```
113
80
 
114
- Everything in beginner plus:
115
- - **MCP server** with 8 tools (instinct management, import/export, observation viewer)
116
- - **Session hooks** (auto-load instincts at start, remind to reflect at end)
117
- - Works with Claude Code, Claude Desktop, and any MCP client
81
+ Verify: run `/dashboard` in Claude Code — you should see instinct health and observation count.
82
+ Update later with `/plugin marketplace update continuous-improvement` or by re-running the npx command.
118
83
 
119
- ### MCP only — for non-Claude editors
84
+ ### Troubleshooting install
120
85
 
121
- ```bash
122
- npx continuous-improvement install --mode mcp
123
- ```
86
+ Three failures account for nearly every install support thread. Try them in order:
124
87
 
125
- Registers the MCP server without hooks for Cursor, Zed, Windsurf, VS Code, or any editor that supports MCP.
88
+ | Symptom | Real cause | Fix |
89
+ |---|---|---|
90
+ | `/discipline` says "command not recognized" right after `/plugin install` | Slash commands load on session start; the marketplace did pick the plugin up | Quit and reopen Claude Code, then run `/discipline` again |
91
+ | Expert mode hooks never fire on Windows | `observe.sh` is bash; PowerShell silently no-ops on it | Install Git Bash (or WSL) and re-run `npx continuous-improvement install --mode expert` |
92
+ | `/plugin marketplace add ...` returned nothing visible | Marketplace add was silent; the plugin is not yet selected | Run `/plugin install continuous-improvement@continuous-improvement` to select and activate it |
126
93
 
127
- ### Install to a specific target
94
+ If none of those apply, paste the output of `npx continuous-improvement install` into a GitHub issue — that surface logs every step.
128
95
 
129
- ```bash
130
- npx continuous-improvement install --target claude # Claude Code + Mulahazah
131
- npx continuous-improvement install --target openclaw # OpenClaw (skill only)
132
- npx continuous-improvement install --target cursor # Cursor (skill only)
133
- npx continuous-improvement install --target all # All targets
134
- ```
96
+ ### Operator modes
135
97
 
136
- ### Manual install
98
+ The framework has documented operator-level modes that change hook behavior without rebuilding the plugin. These are first-class — set them once in your shell rc and they persist across sessions.
137
99
 
138
- ```bash
139
- mkdir -p ~/.claude/skills/continuous-improvement && \
140
- curl -fsSL -o ~/.claude/skills/continuous-improvement/SKILL.md \
141
- https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/SKILL.md
142
- ```
143
-
144
- ### Tell your agent
145
-
146
- ```
147
- Fetch and follow the skill at: https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/SKILL.md
148
- ```
100
+ | Env var | Effect | How to set |
101
+ |---|---|---|
102
+ | `CLAUDE_THREE_SECTION_CLOSE_DISABLED=1` | `three-section-close.mjs` short-circuits before any enforcement or telemetry. Use when end-of-turn reflection should run as internal thinking rather than visible "What has been done / What is next / Recommendation" sections. Public default unchanged — the rule still fires for everyone else. | bash/zsh: `export CLAUDE_THREE_SECTION_CLOSE_DISABLED=1` in `~/.bashrc` / `~/.zshrc`. PowerShell: `$env:CLAUDE_THREE_SECTION_CLOSE_DISABLED=1` (session) or `[Environment]::SetEnvironmentVariable('CLAUDE_THREE_SECTION_CLOSE_DISABLED','1','User')` (persistent). |
149
103
 
150
104
  ---
151
105
 
152
- ## The 7 Laws of AI Agent Discipline
153
-
154
- > Every skill in the ecosystem adds capabilities. This is the only one that fixes *how agents think*.
106
+ ## The 7 Laws
155
107
 
156
108
  | # | Law | Without it, agents... |
157
109
  |---|-----|----------------------|
@@ -161,158 +113,232 @@ Fetch and follow the skill at: https://raw.githubusercontent.com/naimkatiman/con
161
113
  | 4 | **Verify Before Reporting** | lie about being "done" |
162
114
  | 5 | **Reflect After Sessions** | repeat the same failures |
163
115
  | 6 | **Iterate One Change** | debug 5 changes at once |
164
- | 7 | **Learn From Every Session** | lose knowledge when the context window ends |
165
-
166
- ### The Loop
116
+ | 7 | **Learn From Every Session** | lose knowledge when context ends |
167
117
 
168
118
  ```
169
- Research Plan Execute (one thing) Verify Reflect Learn Iterate
119
+ Research -> Plan -> Execute (one thing) -> Verify -> Reflect -> Learn -> Iterate
170
120
  ```
171
121
 
172
- If your agent is skipping a step, that's the step it needs most.
122
+ <p align="center">
123
+ <img src="assets/diagram-7-laws-loop.jpg" alt="The 7 Laws of AI Agent Discipline — circular workflow loop" width="820" />
124
+ </p>
125
+
126
+ Full spec, reflection-block format, and anti-examples: [SKILL.md](SKILL.md).
173
127
 
174
128
  ---
175
129
 
176
130
  ## Mulahazah: Auto-Leveling Learning
177
131
 
178
- Mulahazah (Arabic: observation) makes your agent build **instincts** over time. It levels up automatically you don't configure anything.
132
+ Hooks capture every tool call. After ~20 observations, Claude analyzes patterns and creates **instincts** with confidence scores:
179
133
 
180
- ```
181
- Install: Hooks start capturing silently. You notice nothing.
182
- ~20 sessions: Agent analyzes patterns, creates first instincts (silent)
183
- ~50 sessions: Instincts cross 0.5 agent starts suggesting behaviors
184
- ~100 sessions: Instincts cross 0.7 agent auto-applies what it learned
185
- ```
134
+ - **< 0.5** silent (stored, not surfaced)
135
+ - **0.5–0.69** suggested inline when relevant
136
+ - **0.7+** auto-applied
137
+ - User corrections drop confidence by 0.1; unused instincts decay
138
+ - Project-scoped, promoted to global after seen across 2+ projects
186
139
 
187
- ### How it works
140
+ <p align="center">
141
+ <img src="assets/diagram-mulahazah-learning.jpg" alt="Mulahazah pipeline" width="820" />
142
+ </p>
188
143
 
189
- 1. **Hooks capture every tool call** — PreToolUse/PostToolUse hooks write JSONL observations (<50ms, never blocks your session, jq not required)
190
- 2. **Analysis runs inline** — when 20+ observations accumulate, Claude analyzes them at session start. No background daemon.
191
- 3. **Instincts carry confidence** — 0.3–0.9 scale with graduated behavior:
192
- - **Silent** (< 0.5) — stored, not surfaced
193
- - **Suggest** (0.5–0.69) — mentioned inline when relevant
194
- - **Auto-apply** (0.7+) — applied automatically
195
- 4. **Self-correcting** — user corrections drop confidence by 0.1. Unused instincts decay. Wrong behaviors fade out.
196
- 5. **Project-scoped** — instincts are per-project by default, promoted to global when seen across 2+ projects
144
+ ---
197
145
 
198
- ### Check what your agent has learned
146
+ ## Slash Commands
199
147
 
200
148
  ```
201
- /continuous-improvement
149
+ /seven-laws Reflect, analyze, show status (brand-aligned name)
150
+ /continuous-improvement Same workflow as /seven-laws (kept for backward compat)
151
+ /proceed-with-the-recommendation Walk any agent's recommendation list top-to-bottom
152
+ /superpowers Law activator — route the task to the right specialist
153
+ /workspace-surface-audit Audit repo + MCP + env, recommend high-value skills
154
+ /planning-with-files Create task_plan.md, findings.md, progress.md
155
+ /discipline Quick reference card of the 7 Laws
156
+ /dashboard Visual instinct health dashboard
157
+ /ralph Autonomous PRD story-by-story loop (expert)
158
+ /learn-eval Capture session patterns into new skills (expert)
202
159
  ```
203
160
 
161
+ In expert mode, the same planning workflow is also available programmatically through the MCP tools `ci_plan_init` (initialize `task_plan.md`, `findings.md`, `progress.md` in the project root) and `ci_plan_status` (summarize their current contents).
162
+
204
163
  ---
205
164
 
206
- ## Real-World Examples
165
+ ## Law Coverage
207
166
 
208
- See the [`examples/`](examples/) directory for detailed walkthroughs:
167
+ Every bundled skill, command, and hook enforces at least one of the 7 Laws. The full Law-to-tool alignment matrix lives in [CONTRIBUTING.md → Law Coverage Matrix](CONTRIBUTING.md#law-coverage-matrix); each skill's `description:` also leads with `Enforces Law N (...)` so the tag shows up every time the skill is loaded. Operator-level mode toggles live in the **Operator modes** section above the 7 Laws, alongside install.
209
168
 
210
- - [**Bug Fix**](examples/01-bug-fix.md) — Double submit bug: 4 rounds without framework → 1 round with it
211
- - [**Feature Build**](examples/02-feature-build.md) — Adding pagination: 3 rewrites without → correct first attempt with
212
- - [**Refactor**](examples/03-refactor.md) — SDK migration: cascading failures without → zero regressions with
169
+ ---
213
170
 
214
- Each example shows the same task done with and without the 7 laws, highlighting which laws made the difference.
171
+ ## All 13 Skills
215
172
 
216
- ---
173
+ The plugin ships **1 core + 1 featured + 4 tier-1 + 4 tier-2 + 3 always-bundled = 13 skills**. Source-of-truth lives in [`skills/`](skills/) (one `.md` per skill); the plugin bundle at [`plugins/continuous-improvement/skills/`](plugins/continuous-improvement/skills/) is regenerated by `npm run build`.
217
174
 
218
- ## Files
175
+ <details>
176
+ <summary>Show the full skill table (13 rows)</summary>
177
+
178
+ | # | Skill | Tier | Law | What it does |
179
+ |---|-------|------|-----|--------------|
180
+ | 1 | [`continuous-improvement`](SKILL.md) | core | — | The 7 Laws spec itself (research → plan → execute → verify → reflect → learn → iterate) |
181
+ | 2 | [`proceed-with-the-recommendation`](skills/proceed-with-the-recommendation.md) ⭐ | featured | all 7 | Walks any agent's recommendation list top-to-bottom, routes each item, verifies per item, halts on `needs-approval` |
182
+ | 3 | [`gateguard`](skills/gateguard.md) | 1 | 1 | PreToolUse gate that blocks Edit/Write/destructive Bash until concrete investigation is presented |
183
+ | 4 | [`para-memory-files`](skills/para-memory-files.md) | 1 | 5 + 7 | Durable file-based memory using PARA (Projects/Areas/Resources/Archives) for cross-session context |
184
+ | 5 | [`tdd-workflow`](skills/tdd-workflow.md) | 1 | 3 + 4 | RED → GREEN → REFACTOR enforcement with 80%+ coverage across unit/integration/E2E |
185
+ | 6 | [`verification-loop`](skills/verification-loop.md) | 1 | 4 | Six-phase verification (build, types, lint, tests, security, diff) with PASS/FAIL report |
186
+ | 7 | [`safety-guard`](skills/safety-guard.md) | 2 | 3 | Three-mode runtime guard (careful/freeze/guard) that blocks destructive commands and locks edits to a directory |
187
+ | 8 | [`strategic-compact`](skills/strategic-compact.md) | 2 | 5 | Suggests `/compact` at logical phase boundaries instead of arbitrary auto-compaction |
188
+ | 9 | [`token-budget-advisor`](skills/token-budget-advisor.md) | 2 | 2 | Token estimator that offers 25/50/75/100% depth choices before answering |
189
+ | 10 | [`wild-risa-balance`](skills/wild-risa-balance.md) | 2 | 2 | Pairs WILD (bold) generation with RISA (safe) execution; splits recommendation lists into pilots above a baseline |
190
+ | 11 | [`ralph`](skills/ralph.md) | companion | 6 | Autonomous loop that executes a PRD story-by-story with quality checks between iterations |
191
+ | 12 | [`superpowers`](skills/superpowers.md) | companion | activator | Law activator — routes tasks to the correct Law-aligned specialist so the right discipline fires automatically |
192
+ | 13 | [`workspace-surface-audit`](skills/workspace-surface-audit.md) | companion | 1 | Audits the active repo, MCP servers, plugins, env, then recommends high-value skills/workflows |
219
193
 
220
- ```
221
- continuous-improvement/
222
- ├── SKILL.md # The 7 Laws + instinct behavior
223
- ├── commands/continuous-improvement.md # /continuous-improvement command
224
- ├── hooks/observe.sh # Observation hook (pure bash, <50ms)
225
- ├── bin/install.mjs # CLI installer
226
- ├── test/ # 20 tests (node --test)
227
- ├── examples/ # Real-world before/after scenarios
228
- ├── QUICKSTART.md # First-use guide
229
- ├── CHANGELOG.md
230
- └── package.json
231
- ```
194
+ </details>
232
195
 
233
- ### What gets installed where (Claude Code)
196
+ The orchestrator skill `proceed-with-the-recommendation` also routes to optional companion skills from external plugins (e.g. `obra/superpowers`, `code-review`, `frontend-design`, `commit-commands`). Each routing target has an inline fallback in the orchestrator, so the plugin works on a clean install with nothing else present — install the dedicated companion only when you want a specialist over the fallback. Full target list with source-plugin and risk-if-absent: [`plugins/continuous-improvement/README.md` § Required vs Optional companions](plugins/continuous-improvement/README.md#required-vs-optional-companions).
234
197
 
235
- ```
236
- ~/.claude/skills/continuous-improvement/SKILL.md # The skill
237
- ~/.claude/commands/continuous-improvement.md # The command
238
- ~/.claude/instincts/
239
- ├── observe.sh # Hook script
240
- ├── global/ # Global instincts (*.yaml)
241
- └── <project-hash>/
242
- ├── project.json # Project metadata
243
- ├── observations.jsonl # Tool call observations
244
- └── *.yaml # Project instincts
198
+ ### Beginner gets — by default
199
+
200
+ Tier 1 + featured + companion. Auto-installed when you run the plugin install commands above. No flags, no choices.
201
+
202
+ ### Expert gets — additionally
203
+
204
+ Tier 2 (`safety-guard`, `strategic-compact`, `token-budget-advisor`, `wild-risa-balance`), the MCP server (12 tools incl. `ci_plan_init`/`ci_plan_status`), session-observation hooks for Mulahazah, and `/learn-eval` for capturing session patterns into new skills.
205
+
206
+ ### Drop-in single-file install
207
+
208
+ Want one skill without the whole plugin? Copy the `.md` file straight into `~/.claude/skills/<name>/SKILL.md`:
209
+
210
+ ```bash
211
+ SKILL=proceed-with-the-recommendation
212
+ mkdir -p ~/.claude/skills/$SKILL
213
+ curl -L https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/skills/$SKILL.md \
214
+ -o ~/.claude/skills/$SKILL/SKILL.md
245
215
  ```
246
216
 
247
217
  ---
248
218
 
249
- ## Uninstall
219
+ ## Evolution — adding a new skill
220
+
221
+ Drop one `.md` file into [`skills/`](skills/), run `npm run build`, and the plugin bundle, manifests, and bundled-skills README regenerate from that source. Seven lints (`verify:all` + `verify:generated`) block the merge if anything drifts.
222
+
223
+ ### The 5-step recipe
250
224
 
251
225
  ```bash
252
- npx continuous-improvement install --uninstall
226
+ # 1. Create the source file
227
+ touch skills/<your-skill>.md
253
228
  ```
254
229
 
255
- Removes the skill, hooks, and command. Your learned instincts in `~/.claude/instincts/` are preserved — delete that directory manually if you want a clean slate.
230
+ ```yaml
231
+ # 2. Frontmatter must declare name + tier + Law-tagged description
232
+ ---
233
+ name: <your-skill>
234
+ tier: "1" # core | featured | "1" | "2" | companion
235
+ description: "Enforces Law N (<law name>) of the 7 Laws of AI Agent Discipline. <what it does>."
236
+ ---
237
+ ```
238
+
239
+ ```bash
240
+ # 3. Regenerate the bundle (also writes plugins/.../skills/<your-skill>/SKILL.md
241
+ # + the bundled-skills README, which is itself generator-output)
242
+ npm run build
243
+
244
+ # 4. Run all 6 verify lints — must all pass
245
+ npm run verify:all
246
+
247
+ # 5. Commit one concern at a time (per CLAUDE.md): the source skill alone first,
248
+ # then any wiring (hooks, commands, Law-coverage table updates) as separate commits
249
+ git add skills/<your-skill>.md plugins/continuous-improvement/skills/<your-skill>/
250
+ git commit -m "feat(skills): add <your-skill> for Law N enforcement"
251
+ ```
252
+
253
+ ### What the build does for you automatically
254
+
255
+ - **Mirrors source → bundle** (`bin/generate-plugin-manifests.mjs`): copies `skills/<name>.md` to `plugins/continuous-improvement/skills/<name>/SKILL.md`
256
+ - **Regenerates plugin manifests** with the new skill listed in tier order
257
+ - **Re-renders** [`plugins/continuous-improvement/skills/README.md`](plugins/continuous-improvement/skills/README.md) (do not edit by hand — generator output)
258
+
259
+ ### What the lints enforce so you cannot ship a half-wired skill
260
+
261
+ | Lint | Blocks |
262
+ |------|--------|
263
+ | `verify:skill-mirror` | source `skills/<name>.md` and `plugins/.../<name>/SKILL.md` are out of sync |
264
+ | `verify:skill-tiers` | skill has missing or unrecognized `tier:` value |
265
+ | `verify:skill-law-tag` | skill description does not start with `Enforces Law N` (or `Law activator`, or `all 7 Laws`) |
266
+ | `verify:docs-substrings` | README/QUICKSTART references a removed/renamed skill |
267
+ | `verify:everything-mirror` | non-skill files in `plugins/continuous-improvement/` drift from their root-level source |
268
+ | `verify:routing-targets` | `proceed-with-the-recommendation` names a routing target that is neither bundled nor declared in `optional-companions.json` |
269
+ | `verify:generated` | `npm run build` was not re-run after a source change |
270
+
271
+ ### When to fold a new external skill into the 7 Laws
272
+
273
+ A new skill is a fit if it provably enforces (or is a routed activator for) at least one of the 7 Laws. The Law-tag lint will refuse it otherwise. If it sits outside the laws (a domain skill — e.g. SQL optimization), keep it as an external plugin. The 7 Laws plugin stays disciplined about scope; that is the point.
274
+
275
+ ### What is *not* automated (the honest limits)
276
+
277
+ - The Law-coverage matrix above (`## Law Coverage`) is hand-maintained — add your new skill to the right Law row when you ship it.
278
+ - The "All 13 Skills" count in the section header is a literal — bump it when N changes.
279
+ - Promotion between tiers (e.g. `2` → `1` after it proves itself) is a manual edit to the frontmatter `tier:` field, by design — the maintainer should make that call deliberately.
256
280
 
257
281
  ---
258
282
 
259
- ## Works With
283
+ ## GitHub Action: Transcript Linter
260
284
 
261
- | Tool | Support |
262
- |------|---------|
263
- | **Claude Code** | Full — skill + hooks + auto-leveling instincts |
264
- | **Cursor** | Skill only (paste SKILL.md into rules) |
265
- | **Codex** | Skill only |
266
- | **Gemini CLI** | Skill only |
267
- | **OpenClaw** | Skill only |
268
- | **Any LLM** | Paste SKILL.md into your system prompt |
285
+ Lint agent behavior in CI. Detects skipped laws.
286
+
287
+ ```yaml
288
+ - uses: naimkatiman/continuous-improvement@v3
289
+ with:
290
+ transcript-path: agent-log.jsonl
291
+ strict: true
292
+ ```
293
+
294
+ `@v3` is a floating major-version tag that retargets on every `v3.x.y` release. Pin to a specific tag (`@v3.7.0`) if you need byte-reproducible CI; use `@v3` to ride patch and minor bumps automatically. See [CONTRIBUTING.md § Release](CONTRIBUTING.md#release) for the retarget policy.
295
+
296
+ Catches: writes without prior research (Law 1), too many edits without verification (Law 3), code changes without tests/builds (Law 4), too many files at once (Law 6). Run locally with `node bin/lint-transcript.mjs <file>`.
269
297
 
270
298
  ---
271
299
 
272
- ## Red Flags
300
+ ## Uninstall
273
301
 
274
- If your agent says any of these, it's skipping a law:
302
+ ```bash
303
+ npx continuous-improvement install --uninstall
304
+ ```
275
305
 
276
- - "I'll just quickly..." Law 3 violation
277
- - "This should work..." → Law 4 violation (verify, don't assume)
278
- - "I already know how to..." → Law 1 violation (still research)
279
- - "Let me also add..." → Law 6 violation (finish first)
280
- - "I'll remember this..." → Law 7 violation (write it down)
306
+ Removes skill, hooks, commands, MCP server. Learned instincts in `~/.claude/instincts/` are preserved — delete manually for a clean slate.
281
307
 
282
308
  ---
283
309
 
284
- ## Roadmap
310
+ ## The Brand Stack
285
311
 
286
- ### Phase 1: Foundation -- DONE
312
+ One product, three names. Use the one that fits the audience:
287
313
 
288
- - [x] Published to public npm (`npx continuous-improvement install` works)
289
- - [x] 20-test suite (installer, hook, SKILL.md validation)
290
- - [x] Before/after examples in README + `examples/` directory
291
- - [x] Gemini CLI support
292
- - [x] Platform badges and improved npm metadata
293
- - [ ] **Submit to [awesome-agent-skills](https://github.com/VoltAgent/awesome-agent-skills)** (14K stars)
314
+ | Layer | Name | When you say it |
315
+ |-------|------|-----------------|
316
+ | **Brand** | The 7 Laws of AI Agent Discipline | Tweets, talks, docs, "what is this" |
317
+ | **Engine** | Mulahazah | The auto-leveling instinct system inside it |
318
+ | **Package** | `continuous-improvement` | `npm install`, `/plugin install`, `settings.json` |
294
319
 
295
- ### Phase 2: Content & Proof (In Progress)
320
+ Every skill description leads with `Enforces Law N (...)` so the discipline tag shows up the moment the skill is loaded; the lint `verify:skill-law-tag` blocks any skill that drops the tag.
296
321
 
297
- - [ ] **2-min demo video** — side-by-side agent with/without discipline. Post to X + YouTube.
298
- - [ ] **"Why your AI agent keeps lying about being done"** — X thread / blog post
299
- - [ ] **"Law of the Week" X series** — 7 weeks of content breaking down each law
322
+ ---
300
323
 
301
- ### Phase 3: Ecosystem Integration
324
+ ## In the wild
302
325
 
303
- - [ ] **MCP server** expose instinct status + law compliance as MCP tools
304
- - [ ] **GitHub Action** — lint agent transcripts for law compliance
305
- - [ ] **VS Code extension** — sidebar showing instinct confidence levels
306
- - [ ] **Aider / Windsurf / Zed** support
326
+ Workflows from this repo, applied to real open-source contributions:
307
327
 
308
- ### Phase 4: Community
328
+ ### pm-skills (product-on-purpose, 189 stars, Apache 2.0)
309
329
 
310
- - [ ] **Instinct marketplace** share learned instincts across teams
311
- - [ ] **Quick-start instinct packs** — pre-built instincts for React, Python, Go, etc.
312
- - [ ] **Conference talk on Mulahazah** the auto-leveling system is genuinely novel
330
+ [F-07 discover-market-sizing](https://github.com/product-on-purpose/pm-skills/pull/141) - new domain skill in the Discover phase covering TAM/SAM/SOM market sizing for the [pm-skills](https://github.com/product-on-purpose/pm-skills) library.
331
+
332
+ Authored end-to-end with `/superpowers` and `/proceed-with-the-recommendation`: surface audit before any code, brainstorm gate with WILD/RISA framing, branch isolation off the upstream fork, single-skill PR scope per the upstream maintainer's curated-contributions model, count cascade across 23 docs files, and 9 local validators green before push (`lint-skills-frontmatter`, `validate-agents-md`, `validate-commands`, `check-count-consistency`, `check-nav-completeness`, `check-generated-content-untouched`, `check-generated-freshness`, `validate-meeting-skills-family`, `validate-plugin-install`).
313
333
 
314
334
  ---
315
335
 
316
- ## License
336
+ ## More
337
+
338
+ - [QUICKSTART.md](QUICKSTART.md) — 2-minute setup
339
+ - [SKILL.md](SKILL.md) — full 7 Laws spec
340
+ - [examples/](examples/) — bug fix, feature build, refactor walkthroughs
341
+ - [CONTRIBUTING.md](CONTRIBUTING.md) — architecture, repo internals
342
+ - [SECURITY.md](SECURITY.md)
317
343
 
318
- MIT
344
+ MIT.