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/README.md CHANGED
@@ -5,170 +5,130 @@
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>
14
- <a href="https://github.com/naimkatiman/continuous-improvement/stargazers"><img src="https://img.shields.io/github/stars/naimkatiman/continuous-improvement?style=social" alt="stars"></a>
15
- <a href="https://github.com/naimkatiman/continuous-improvement/network/members"><img src="https://img.shields.io/github/forks/naimkatiman/continuous-improvement?style=social" alt="forks"></a>
16
- <a href="https://github.com/naimkatiman/continuous-improvement/graphs/contributors"><img src="https://img.shields.io/github/contributors/naimkatiman/continuous-improvement" alt="contributors"></a>
17
- <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a>
18
- <a href="test/"><img src="https://img.shields.io/badge/tests-104%20passing-brightgreen" alt="tests"></a>
19
- </p>
20
-
21
- <p align="center">
22
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>
23
- <a href="https://cursor.sh"><img src="https://img.shields.io/badge/Cursor-compatible-blue" alt="Cursor"></a>
24
- <a href="https://openai.com/codex"><img src="https://img.shields.io/badge/Codex-compatible-blue" alt="Codex"></a>
25
- <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>
26
- <a href="https://github.com/naimkatiman/continuous-improvement/actions"><img src="https://img.shields.io/github/actions/workflow/status/naimkatiman/continuous-improvement/ci.yml?label=CI" alt="CI"></a>
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-passing-brightgreen" alt="tests"></a>
27
16
  </p>
28
17
 
29
18
  <p align="center">
30
- <a href="docs/README.zh-CN.md">简体中文</a> |
31
- <a href="docs/README.ja.md">日本語</a>
19
+ <b>New here?</b> → <a href="QUICKSTART.md">QUICKSTART.md</a> (2 minutes)
32
20
  </p>
33
21
 
34
22
  ---
35
23
 
36
- ## The Problem
24
+ ## The problem this solves
37
25
 
38
- AI agents are great at individual steps. They're terrible at **discipline**.
26
+ You have used Claude Code (or any agentic coding tool) long enough to recognize the failure pattern.
39
27
 
40
- 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.
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 |
41
35
 
42
- **The 7 Laws** fix that plus a **learning system** (Mulahazah) that builds instincts over time. No config, no daemon, no manual setup.
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.
43
37
 
44
- ### Before vs After
38
+ ## What you get
45
39
 
46
- <details>
47
- <summary><b>Without continuous-improvement</b> — agent skips research, declares "done" without verifying</summary>
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
+ - **14 bundled skills + a runtime PreToolUse hook** that turn the Laws into enforced behavior `gateguard` runs as a PreToolUse hook (`hooks/gateguard.mjs`) that physically blocks Edit/Write/destructive Bash until the agent presents fact-list investigation. `tdd-workflow` enforces RED → GREEN → REFACTOR, `verification-loop` runs build/types/tests/security before "done", `deploy-receipt` closes the merge-to-production gap (deployed SHA + healthcheck), `proceed-with-the-recommendation` walks any agent's recommendation list top-to-bottom with per-item verification. The runtime hook catches the "skipped investigation" failure mode at the tool-call layer; the skills run model-side once the gate clears. See [§ How enforcement works](#how-enforcement-works) for the two-layer model.
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.
48
45
 
49
- ```
50
- You: Add 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.
51
47
 
52
- Agent: I'll add rate limiting now.
53
- *writes express-rate-limit middleware*
54
- Done! I've added rate limiting to the /api/users endpoint.
55
-
56
- You: Did you check if we already have rate limiting somewhere?
57
- Agent: Let me check... oh, there's already a rate limiter in middleware/rateLimit.ts.
58
- I've created a duplicate. Let me fix that.
48
+ ---
59
49
 
60
- You: Did you test it?
61
- Agent: Let me run the tests... they're failing. The import path is wrong.
62
- *fixes import*
63
- Now it works!
50
+ ## Install
64
51
 
65
- You: You also broke the /api/auth endpoint it was sharing that middleware.
66
- Agent: I see. Let me fix that too...
67
- ```
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.
68
53
 
69
- **Result:** 4 back-and-forth corrections. Duplicate code. Broken endpoint. 15 minutes wasted.
70
- </details>
54
+ ### Beginner inside Claude Code, two commands (plus one optional companion)
71
55
 
72
- <details>
73
- <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.
74
57
 
58
+ ```bash
59
+ # Inside Claude Code (no shell needed)
60
+ /plugin marketplace add naimkatiman/continuous-improvement
61
+ /plugin install continuous-improvement@continuous-improvement
75
62
  ```
76
- You: Add rate limiting to the /api/users endpoint
77
-
78
- Agent: **[Law 1: Research]** Searching for existing rate limiting...
79
- Found: middleware/rateLimit.ts — already applies to /api/auth.
80
- Found: express-rate-limit already in package.json.
81
-
82
- **[Law 2: Plan]**
83
- WILL: Extend existing rateLimit middleware to cover /api/users
84
- WILL NOT: Create new middleware or change existing /api/auth behavior
85
- VERIFY: Run tests + curl /api/users 101 times to confirm 429 response
86
63
 
87
- **[Law 3: Execute one thing]** Adding /api/users to the route list
88
- in middleware/rateLimit.ts...
64
+ The doubled name is correct: it reads as `<plugin>@<marketplace>`.
89
65
 
90
- **[Law 4: Verify]**
91
- ✓ npm test — 47/47 passing
92
- ✓ curl test — 429 after 100 requests
93
- ✓ /api/auth still works — 200 OK
66
+ **Optional companion (recommended).** The `/superpowers` dispatcher routes per-task to specialist skills (`writing-plans`, `test-driven-development`, `using-git-worktrees`, `dispatching-parallel-agents`, `finishing-a-development-branch`, etc.) shipped by Obra's `superpowers` plugin, which is vendored into this same marketplace as a pinned-SHA snapshot. Install it with one extra line:
94
67
 
95
- Done. Extended existing rate limiter to cover /api/users.
96
- One file changed: middleware/rateLimit.ts (+1 line).
68
+ ```bash
69
+ /plugin install superpowers@continuous-improvement
97
70
  ```
98
71
 
99
- **Result:** Correct on first attempt. No duplicate code. No broken endpoints. 2 minutes.
100
- </details>
101
-
102
- ---
72
+ Without the companion the dispatcher still works every routing target has a concrete inline fallback — but specialist quality is fallback-quality, not dedicated-skill-quality.
103
73
 
104
- ## Install
74
+ Verify: run `/discipline` in Claude Code — you should see the 7 Laws card.
75
+ 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.
105
76
 
106
- ### Beginner (default)just hooks, no setup needed
77
+ **Second-stage verify (proves the runtime gate is firing i.e. `hooks/gateguard.mjs` is invoked — not just docs claiming it).** Ask Claude to write a throwaway file with no research first:
107
78
 
108
- ```bash
109
- npx continuous-improvement install
79
+ ```
80
+ Edit a new file scratch.txt and put the word "hello" in it. Don't research anything first.
110
81
  ```
111
82
 
112
- That's it. For Claude Code, this installs:
113
- - Observation hooks (captures every tool call, <50ms, jq optional)
114
- - `/continuous-improvement`, `/discipline`, and `/dashboard` commands
115
- - Auto-leveling instinct system
83
+ You should see Claude **blocked** by the bundled `gateguard` PreToolUse hook (`hooks/gateguard.mjs`) with a fact-list reason. That block is the proof the hook is wired and enforcing. If Claude writes the file with no pause, the hook did not load — see Troubleshooting below. (To also verify observation hooks, run `/dashboard` and confirm a non-zero `Total` under `Observations`.)
116
84
 
117
- ### Expert full power with MCP server
85
+ ### How enforcement works
118
86
 
119
- ```bash
120
- npx continuous-improvement install --mode expert
121
- ```
87
+ The 7 Laws are enforced at **two layers**:
122
88
 
123
- Everything in beginner plus:
124
- - **MCP server** with 10 tools (instinct management, import/export, dashboard, instinct packs)
125
- - **Session hooks** (auto-load instincts at start, remind to reflect at end)
126
- - Works with Claude Code, Claude Desktop, and any MCP client
89
+ - **Runtime layer (hooks).** `gateguard` ships as a PreToolUse hook (`hooks/gateguard.mjs`) that physically blocks Edit / Write / MultiEdit / destructive Bash on the first mutation per file until the agent presents the facts named in [skills/gateguard.md § Gate Types](skills/gateguard.md). Destructive Bash (`rm -rf`, `git push --force`, `--force-with-lease`, `DROP DATABASE`, Windows `Remove-Item -Recurse`, etc.) is gated on every call, not just first. Read-only and exploratory tools (Read, Grep, Glob, routine Bash like `git status`) bypass the gate. Per-session state at `~/.claude/instincts/<project-hash>/gateguard-session.json` caps cumulative clearances at 50 distinct files to bound stuck-loop damage.
90
+ - **Model layer (skills).** Once the runtime gate clears for a file, the rest of the discipline (`tdd-workflow`, `verification-loop`, `proceed-with-the-recommendation`, etc.) runs model-side — the agent reads each skill and applies it. `observe.sh` / `observe.mjs` records every tool call into the Mulahazah feed for instinct extraction; that surface is observational, not enforcement.
127
91
 
128
- ### MCP only for non-Claude editors
92
+ V1 honest limitations: the runtime gate is honor-system once the agent flips `_gateguard_facts_presented: true` (the hook can't verify the investigation actually happened); the state file is deletable and parallel hook invocations can race. Documented in `src/hooks/gateguard.mts` and `src/lib/gateguard-state.mts` headers.
129
93
 
130
- ```bash
131
- npx continuous-improvement install --mode mcp
132
- ```
94
+ ### Expert — adds MCP server, observation hooks, and instinct packs
133
95
 
134
- Registers the MCP server without hooks for Cursor, Zed, Windsurf, VS Code, or any editor that supports MCP.
96
+ 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.
135
97
 
136
- ### Load a starter instinct pack
98
+ 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.
137
99
 
138
100
  ```bash
139
- npx continuous-improvement install --pack react # React/Next.js instincts
140
- npx continuous-improvement install --pack python # Python best practices
141
- npx continuous-improvement install --pack go # Go idioms
101
+ npx continuous-improvement install --mode expert
102
+ npx continuous-improvement install --pack react # optional: react | python | go | meta
103
+ # --pack seeds 5–10 starter instincts so suggestions appear in week 1 instead of week 4.
142
104
  ```
143
105
 
144
- ### Install to a specific target
106
+ Verify: run `/dashboard` in Claude Code — you should see instinct health and observation count.
107
+ Update later with `/plugin marketplace update continuous-improvement` or by re-running the npx command.
145
108
 
146
- ```bash
147
- npx continuous-improvement install --target claude # Claude Code + Mulahazah
148
- npx continuous-improvement install --target openclaw # OpenClaw (skill only)
149
- npx continuous-improvement install --target cursor # Cursor (skill only)
150
- npx continuous-improvement install --target all # All targets
151
- ```
109
+ ### Troubleshooting install
152
110
 
153
- ### Manual install
111
+ Three failures account for nearly every install support thread. Try them in order:
154
112
 
155
- ```bash
156
- mkdir -p ~/.claude/skills/continuous-improvement && \
157
- curl -fsSL -o ~/.claude/skills/continuous-improvement/SKILL.md \
158
- https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/SKILL.md
159
- ```
113
+ | Symptom | Real cause | Fix |
114
+ |---|---|---|
115
+ | `/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 |
116
+ | 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` |
117
+ | `/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 |
160
118
 
161
- ### Tell your agent
119
+ If none of those apply, paste the output of `npx continuous-improvement install` into a GitHub issue — that surface logs every step.
162
120
 
163
- ```
164
- Fetch and follow the skill at: https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/SKILL.md
165
- ```
121
+ ### Operator modes
166
122
 
167
- ---
123
+ 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.
124
+
125
+ | Env var | Effect | How to set |
126
+ |---|---|---|
127
+ | `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). |
168
128
 
169
- ## The 7 Laws of AI Agent Discipline
129
+ ---
170
130
 
171
- > Every skill in the ecosystem adds capabilities. This is the only one that fixes *how agents think*.
131
+ ## The 7 Laws
172
132
 
173
133
  | # | Law | Without it, agents... |
174
134
  |---|-----|----------------------|
@@ -178,319 +138,239 @@ Fetch and follow the skill at: https://raw.githubusercontent.com/naimkatiman/con
178
138
  | 4 | **Verify Before Reporting** | lie about being "done" |
179
139
  | 5 | **Reflect After Sessions** | repeat the same failures |
180
140
  | 6 | **Iterate One Change** | debug 5 changes at once |
181
- | 7 | **Learn From Every Session** | lose knowledge when the context window ends |
182
-
183
- ### The Loop
141
+ | 7 | **Learn From Every Session** | lose knowledge when context ends |
184
142
 
185
143
  ```
186
- Research Plan Execute (one thing) Verify Reflect Learn Iterate
144
+ Research -> Plan -> Execute (one thing) -> Verify -> Reflect -> Learn -> Iterate
187
145
  ```
188
146
 
189
- If your agent is skipping a step, that's the step it needs most.
147
+ <p align="center">
148
+ <img src="assets/diagram-7-laws-loop.jpg" alt="The 7 Laws of AI Agent Discipline — circular workflow loop" width="820" />
149
+ </p>
150
+
151
+ Full spec, reflection-block format, and anti-examples: [SKILL.md](SKILL.md).
190
152
 
191
153
  ---
192
154
 
193
155
  ## Mulahazah: Auto-Leveling Learning
194
156
 
195
- Mulahazah (Arabic: observation) makes your agent build **instincts** over time. It levels up automatically you don't configure anything.
157
+ Hooks capture every tool call. After ~20 observations, Claude analyzes patterns and creates **instincts** with confidence scores:
196
158
 
197
- ```
198
- Install: Hooks start capturing silently. You notice nothing.
199
- ~20 sessions: Agent analyzes patterns, creates first instincts (silent)
200
- ~50 sessions: Instincts cross 0.5 agent starts suggesting behaviors
201
- ~100 sessions: Instincts cross 0.7 agent auto-applies what it learned
202
- ```
159
+ - **< 0.5** silent (stored, not surfaced)
160
+ - **0.5–0.69** suggested inline when relevant
161
+ - **0.7+** auto-applied
162
+ - User corrections drop confidence by 0.1; unused instincts decay
163
+ - Project-scoped, promoted to global after seen across 2+ projects
203
164
 
204
- ### How it works
165
+ <p align="center">
166
+ <img src="assets/diagram-mulahazah-learning.jpg" alt="Mulahazah pipeline" width="820" />
167
+ </p>
205
168
 
206
- 1. **Hooks capture every tool call** — PreToolUse/PostToolUse hooks write JSONL observations (<50ms, never blocks your session, jq not required)
207
- 2. **Analysis runs inline** — when 20+ observations accumulate, Claude analyzes them at session start. No background daemon.
208
- 3. **Instincts carry confidence** — 0.3–0.9 scale with graduated behavior:
209
- - **Silent** (< 0.5) — stored, not surfaced
210
- - **Suggest** (0.5–0.69) — mentioned inline when relevant
211
- - **Auto-apply** (0.7+) — applied automatically
212
- 4. **Self-correcting** — user corrections drop confidence by 0.1. Unused instincts decay. Wrong behaviors fade out.
213
- 5. **Project-scoped** — instincts are per-project by default, promoted to global when seen across 2+ projects
169
+ ---
214
170
 
215
- ### Starter Instinct Packs
171
+ ## Slash Commands
216
172
 
217
- Jump-start your instincts with pre-built packs for popular stacks:
173
+ `/seven-laws` is the canonical reflect-and-learn command. `/continuous-improvement` is kept as an alias for backward compatibility — both run the same workflow.
218
174
 
219
- ```bash
220
- npx continuous-improvement install --pack react # 8 React/Next.js instincts
221
- npx continuous-improvement install --pack python # 8 Python instincts
222
- npx continuous-improvement install --pack go # 8 Go instincts
175
+ ```
176
+ /seven-laws Reflect, analyze, show status (canonical)
177
+ /continuous-improvement Alias for /seven-laws (kept for backward compat)
178
+ /proceed-with-the-recommendation Walk any agent's recommendation list top-to-bottom
179
+ /superpowers Law activator — route the task to the right specialist
180
+ /workspace-surface-audit Audit repo + MCP + env, recommend high-value skills
181
+ /planning-with-files Create task_plan.md, findings.md, progress.md
182
+ /discipline Quick reference card of the 7 Laws
183
+ /dashboard Visual instinct health dashboard
184
+ /ralph Autonomous PRD story-by-story loop
185
+ /learn-eval Capture session patterns into new skills (expert)
186
+ /harvest Extract reusable patterns from session friction
187
+ /release-train Coordinate a multi-PR release sequence
188
+ /swarm Fan-out coordination across parallel sub-agents
223
189
  ```
224
190
 
225
- Or in expert mode: use the `ci_load_pack` tool to load packs at any time.
191
+ All 13 ship in the marketplace bundle. The Beginner install gets all of them. In Expert (`npx`) mode, the installer mirrors the full set into `~/.claude/commands/` and additionally exposes the planning workflow 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).
226
192
 
227
- ### Check what your agent has learned
193
+ ---
228
194
 
229
- ```
230
- /continuous-improvement # Reflect, analyze, show status
231
- /discipline # Quick reference card of the 7 Laws
232
- /dashboard # Visual instinct health dashboard
233
- ```
195
+ ## Law Coverage
196
+
197
+ 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.
234
198
 
235
199
  ---
236
200
 
237
- ## GitHub Action: Agent Transcript Linter
201
+ ## All 14 Skills
238
202
 
239
- Lint your AI agent's behavior in CI/CD. The only GitHub Action that checks if your agent followed disciplined workflows.
203
+ The plugin ships **1 core + 1 featured + 5 tier-1 + 4 tier-2 + 3 always-bundled = 14 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`.
240
204
 
241
- ```yaml
242
- - uses: naimkatiman/continuous-improvement@v3
243
- with:
244
- transcript-path: agent-log.jsonl
245
- strict: true # Fail build on law violations
246
- ```
205
+ <details>
206
+ <summary>Show the full skill table (14 rows)</summary>
207
+
208
+ | # | Skill | Tier | Law | What it does |
209
+ |---|-------|------|-----|--------------|
210
+ | 1 | [`continuous-improvement`](SKILL.md) | core | — | The 7 Laws spec itself (research → plan → execute → verify → reflect → learn → iterate) |
211
+ | 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` |
212
+ | 3 | [`gateguard`](skills/gateguard.md) | 1 | 1 | Runtime PreToolUse hook (`hooks/gateguard.mjs`) + skill: physically blocks Edit/Write/MultiEdit and every destructive Bash until fact-list investigation is presented. Read-only and routine Bash bypass. |
213
+ | 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 |
214
+ | 5 | [`tdd-workflow`](skills/tdd-workflow.md) | 1 | 3 + 4 | RED → GREEN → REFACTOR enforcement with 80%+ coverage across unit/integration/E2E |
215
+ | 6 | [`verification-loop`](skills/verification-loop.md) | 1 | 4 | Six-phase verification (build, types, lint, tests, security, diff) with PASS/FAIL report |
216
+ | 7 | [`deploy-receipt`](skills/deploy-receipt.md) | 1 | 4 | Closes the merge-to-production gap on auto-deploy targets (Railway, Cloudflare Workers, Vercel, Netlify, Fly.io). "Done" requires the deployed SHA matching merged HEAD + a healthcheck returning 200 — runs after the vendored `finishing-a-development-branch`. |
217
+ | 8 | [`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 |
218
+ | 9 | [`strategic-compact`](skills/strategic-compact.md) | 2 | 5 | Suggests `/compact` at logical phase boundaries instead of arbitrary auto-compaction |
219
+ | 10 | [`token-budget-advisor`](skills/token-budget-advisor.md) | 2 | 2 | Token estimator that offers 25/50/75/100% depth choices before answering |
220
+ | 11 | [`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 |
221
+ | 12 | [`ralph`](skills/ralph.md) | companion | 6 | Autonomous loop that executes a PRD story-by-story with quality checks between iterations |
222
+ | 13 | [`superpowers`](skills/superpowers.md) | companion | activator | Law activator — routes tasks to the correct Law-aligned specialist so the right discipline fires automatically |
223
+ | 14 | [`workspace-surface-audit`](skills/workspace-surface-audit.md) | companion | 1 | Audits the active repo, MCP servers, plugins, env, then recommends high-value skills/workflows |
247
224
 
248
- The linter analyzes tool call patterns and detects:
249
- - **Law 1 violations** — writes without prior research
250
- - **Law 3 violations** — too many consecutive edits without verification
251
- - **Law 4 violations** — code changes without running tests/builds
252
- - **Law 6 violations** — too many files modified at once
225
+ </details>
253
226
 
254
- Output includes a discipline score (0-100) and detailed violation report.
227
+ 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).
255
228
 
256
- ```bash
257
- # Run locally
258
- node bin/lint-transcript.mjs observations.jsonl
259
- cat transcript.jsonl | node bin/lint-transcript.mjs --stdin --json
260
- ```
229
+ ### Beginner gets — by default
261
230
 
262
- ---
263
-
264
- ## Plugin Architecture
265
-
266
- continuous-improvement ships as a **plugin** with three layers. Pick what you need:
267
-
268
- ### Layer 1: Skill Only (any LLM)
269
- Paste SKILL.md into your system prompt. Your agent follows the 7 Laws. No tools, no hooks, no server.
270
-
271
- ### Layer 2: Hooks (Claude Code)
272
- `npx continuous-improvement install` — installs hooks that silently capture every tool call. The instinct system grows automatically. Zero config.
273
-
274
- ### Layer 3: MCP Server (any MCP client)
275
- `npx continuous-improvement install --mode expert` — a full MCP server that any editor can connect to.
276
-
277
- ### Beginner vs Expert
278
-
279
- | Feature | Beginner (default) | Expert |
280
- |---------|-------------------|--------|
281
- | Observation hooks | Yes | Yes |
282
- | `/continuous-improvement` command | Yes | Yes |
283
- | `/discipline` quick reference | Yes | Yes |
284
- | `/dashboard` visual dashboard | Yes | Yes |
285
- | Auto-leveling instincts | Yes | Yes |
286
- | `ci_status` tool | - | Yes |
287
- | `ci_instincts` tool | - | Yes |
288
- | `ci_reflect` tool | - | Yes |
289
- | `ci_reinforce` tool | - | Yes |
290
- | `ci_create_instinct` tool | - | Yes |
291
- | `ci_observations` tool | - | Yes |
292
- | `ci_export` / `ci_import` | - | Yes |
293
- | `ci_dashboard` tool | - | Yes |
294
- | `ci_load_pack` tool | - | Yes |
295
- | Session start/end hooks | - | Yes |
296
- | MCP server | - | Yes |
297
-
298
- **Beginner** is the right choice for 90% of users. It just works — install and forget. The system quietly learns from your sessions.
299
-
300
- **Expert** adds the MCP server for programmatic access, manual instinct management, import/export for team sharing, visual dashboard, and instinct packs.
301
-
302
- ### MCP Tools Reference
303
-
304
- | Tool | Description |
305
- |------|-------------|
306
- | `ci_status` | Current level, instinct count, observation count |
307
- | `ci_instincts` | List learned instincts with confidence levels |
308
- | `ci_reflect` | Generate structured session reflection |
309
- | `ci_reinforce` | Accept/reject instinct suggestions (expert) |
310
- | `ci_create_instinct` | Manually create instincts (expert) |
311
- | `ci_observations` | View raw tool call observations (expert) |
312
- | `ci_export` | Export instincts as JSON (expert) |
313
- | `ci_import` | Import instincts from JSON (expert) |
314
- | `ci_dashboard` | Visual dashboard with confidence distribution (expert) |
315
- | `ci_load_pack` | Load starter instinct packs (expert) |
231
+ Tier 1 + featured + companion. Auto-installed when you run the plugin install commands above. No flags, no choices.
316
232
 
317
- ---
233
+ ### Expert gets — additionally
318
234
 
319
- ## Real-World Examples
235
+ 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.
320
236
 
321
- See the [`examples/`](examples/) directory for detailed walkthroughs:
237
+ ### Drop-in single-file install
322
238
 
323
- - [**Bug Fix**](examples/01-bug-fix.md) Double submit bug: 4 rounds without framework 1 round with it
324
- - [**Feature Build**](examples/02-feature-build.md) — Adding pagination: 3 rewrites without → correct first attempt with
325
- - [**Refactor**](examples/03-refactor.md) — SDK migration: cascading failures without → zero regressions with
239
+ Want one skill without the whole plugin? Copy the `.md` file straight into `~/.claude/skills/<name>/SKILL.md`:
326
240
 
327
- Each example shows the same task done with and without the 7 laws, highlighting which laws made the difference.
241
+ ```bash
242
+ SKILL=proceed-with-the-recommendation
243
+ mkdir -p ~/.claude/skills/$SKILL
244
+ curl -L https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/skills/$SKILL.md \
245
+ -o ~/.claude/skills/$SKILL/SKILL.md
246
+ ```
328
247
 
329
248
  ---
330
249
 
331
- ## Files
250
+ ## Evolution — adding a new skill
332
251
 
333
- ```
334
- continuous-improvement/
335
- ├── SKILL.md # The 7 Laws + instinct behavior
336
- ├── bin/
337
- │ ├── install.mjs # CLI installer (--mode beginner|expert|mcp)
338
- │ ├── mcp-server.mjs # MCP server (zero dependencies)
339
- │ └── lint-transcript.mjs # Agent transcript linter (GitHub Action)
340
- ├── hooks/
341
- │ ├── observe.sh # Observation hook (pure bash, <50ms)
342
- │ └── session.sh # Session start/end hook (expert mode)
343
- ├── plugins/
344
- │ ├── beginner.json # Plugin manifest: 3 tools
345
- │ └── expert.json # Plugin manifest: 10 tools
346
- ├── commands/
347
- │ ├── continuous-improvement.md # /continuous-improvement command
348
- │ ├── discipline.md # /discipline quick reference
349
- │ └── dashboard.md # /dashboard visual display
350
- ├── instinct-packs/
351
- │ ├── react.json # React/Next.js starter instincts
352
- │ ├── python.json # Python starter instincts
353
- │ └── go.json # Go starter instincts
354
- ├── test/ # 104 tests (node --test)
355
- ├── examples/ # Real-world before/after scenarios
356
- ├── docs/ # Translations (zh-CN, ja)
357
- ├── .github/
358
- │ ├── workflows/ci.yml # CI pipeline (Node 18/20/22)
359
- │ └── ISSUE_TEMPLATE/ # Bug report + feature request templates
360
- ├── action.yml # GitHub Action definition
361
- ├── llms.txt # LLM-friendly project description
362
- ├── CONTRIBUTING.md
363
- ├── CODE_OF_CONDUCT.md
364
- ├── SECURITY.md
365
- ├── QUICKSTART.md
366
- ├── CHANGELOG.md
367
- └── package.json
368
- ```
252
+ 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.
369
253
 
370
- ### What gets installed where
254
+ ### The 5-step recipe
371
255
 
372
- **Beginner mode** (default):
373
- ```
374
- ~/.claude/skills/continuous-improvement/SKILL.md # The skill
375
- ~/.claude/commands/continuous-improvement.md # The command
376
- ~/.claude/commands/discipline.md # Quick reference
377
- ~/.claude/commands/dashboard.md # Dashboard
378
- ~/.claude/instincts/
379
- ├── observe.sh # Hook script
380
- ├── global/ # Global instincts (*.yaml)
381
- └── <project-hash>/
382
- ├── project.json # Project metadata
383
- ├── observations.jsonl # Tool call observations
384
- └── *.yaml # Project instincts
256
+ ```bash
257
+ # 1. Create the source file
258
+ touch skills/<your-skill>.md
385
259
  ```
386
260
 
387
- **Expert mode** adds:
388
- ```
389
- ~/.claude/instincts/session.sh # Session hooks
390
- ~/.claude/settings.json # + MCP server + session hooks
261
+ ```yaml
262
+ # 2. Frontmatter must declare name + tier + Law-tagged description
263
+ ---
264
+ name: <your-skill>
265
+ tier: "1" # core | featured | "1" | "2" | companion
266
+ description: "Enforces Law N (<law name>) of the 7 Laws of AI Agent Discipline. <what it does>."
267
+ ---
391
268
  ```
392
269
 
393
- ---
270
+ ```bash
271
+ # 3. Regenerate the bundle (also writes plugins/.../skills/<your-skill>/SKILL.md
272
+ # + the bundled-skills README, which is itself generator-output)
273
+ npm run build
394
274
 
395
- ## Uninstall
275
+ # 4. Run all 6 verify lints — must all pass
276
+ npm run verify:all
396
277
 
397
- ```bash
398
- npx continuous-improvement install --uninstall
278
+ # 5. Commit one concern at a time (per CLAUDE.md): the source skill alone first,
279
+ # then any wiring (hooks, commands, Law-coverage table updates) as separate commits
280
+ git add skills/<your-skill>.md plugins/continuous-improvement/skills/<your-skill>/
281
+ git commit -m "feat(skills): add <your-skill> for Law N enforcement"
399
282
  ```
400
283
 
401
- Removes the skill, hooks, and commands. Your learned instincts in `~/.claude/instincts/` are preserved — delete that directory manually if you want a clean slate.
284
+ ### What the build does for you automatically
402
285
 
403
- ---
286
+ - **Mirrors source → bundle** (`bin/generate-plugin-manifests.mjs`): copies `skills/<name>.md` to `plugins/continuous-improvement/skills/<name>/SKILL.md`
287
+ - **Regenerates plugin manifests** with the new skill listed in tier order
288
+ - **Re-renders** [`plugins/continuous-improvement/skills/README.md`](plugins/continuous-improvement/skills/README.md) (do not edit by hand — generator output)
404
289
 
405
- ## Works With
290
+ ### What the lints enforce so you cannot ship a half-wired skill
406
291
 
407
- | Tool | Support |
408
- |------|---------|
409
- | **Claude Code** | Full skill + hooks + MCP server + auto-leveling instincts |
410
- | **Claude Desktop** | MCP server (expert/mcp mode) |
411
- | **Cursor** | MCP server (mcp mode) or skill only (paste SKILL.md into rules) |
412
- | **Zed / Windsurf** | MCP server (mcp mode) |
413
- | **VS Code** | MCP server (mcp mode) with Copilot MCP support |
414
- | **Codex** | Skill only |
415
- | **Gemini CLI** | Skill only |
416
- | **OpenClaw** | Skill only |
417
- | **Any LLM** | Paste SKILL.md into your system prompt |
292
+ | Lint | Blocks |
293
+ |------|--------|
294
+ | `verify:skill-mirror` | source `skills/<name>.md` and `plugins/.../<name>/SKILL.md` are out of sync |
295
+ | `verify:skill-tiers` | skill has missing or unrecognized `tier:` value |
296
+ | `verify:skill-law-tag` | skill description does not start with `Enforces Law N` (or `Law activator`, or `all 7 Laws`) |
297
+ | `verify:docs-substrings` | README/QUICKSTART references a removed/renamed skill |
298
+ | `verify:everything-mirror` | non-skill files in `plugins/continuous-improvement/` drift from their root-level source |
299
+ | `verify:routing-targets` | `proceed-with-the-recommendation` names a routing target that is neither bundled nor declared in `optional-companions.json` |
300
+ | `verify:generated` | `npm run build` was not re-run after a source change |
418
301
 
419
- ---
302
+ ### When to fold a new external skill into the 7 Laws
420
303
 
421
- ## Red Flags
304
+ 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.
422
305
 
423
- If your agent says any of these, it's skipping a law:
306
+ ### What is *not* automated (the honest limits)
424
307
 
425
- - "I'll just quickly..." Law 3 violation
426
- - "This should work..." Law 4 violation (verify, don't assume)
427
- - "I already know how to..."Law 1 violation (still research)
428
- - "Let me also add..." → Law 6 violation (finish first)
429
- - "I'll remember this..." → Law 7 violation (write it down)
308
+ - The Law-coverage matrix above (`## Law Coverage`) is hand-maintained — add your new skill to the right Law row when you ship it.
309
+ - The "All 14 Skills" count in the section header is a literal — bump it when N changes.
310
+ - 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.
430
311
 
431
312
  ---
432
313
 
433
- ## Roadmap
314
+ ## GitHub Action: Transcript Linter
315
+
316
+ Lint agent behavior in CI. Detects skipped laws.
434
317
 
435
- ### Phase 1: Foundation -- DONE
318
+ ```yaml
319
+ - uses: naimkatiman/continuous-improvement@v3
320
+ with:
321
+ transcript-path: agent-log.jsonl
322
+ strict: true
323
+ ```
436
324
 
437
- - [x] Published to public npm (`npx continuous-improvement install` works)
438
- - [x] 104-test suite (installer, hook, MCP server, linter, packs, community files)
439
- - [x] Before/after examples in README + `examples/` directory
440
- - [x] Gemini CLI support
441
- - [x] Platform badges and improved npm metadata
442
- - [ ] **Submit to [awesome-agent-skills](https://github.com/VoltAgent/awesome-agent-skills)** (14K stars)
325
+ `@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.
443
326
 
444
- ### Phase 2: Plugin Architecture -- DONE
327
+ 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>`.
445
328
 
446
- - [x] **MCP server** — 10 tools (beginner: 3, expert: 7 more) with zero dependencies
447
- - [x] **Beginner / Expert separation** — simple defaults, power when you need it
448
- - [x] **Plugin manifests** — `plugins/beginner.json` and `plugins/expert.json`
449
- - [x] **Session hooks** — auto-load instincts at session start, remind to reflect at end
450
- - [x] **`--mode` flag** — `beginner` | `expert` | `mcp` installation modes
451
- - [x] **Import/export** — share instincts as JSON between team members
452
- - [x] **Multi-editor MCP support** — Claude Desktop, Cursor, Zed, Windsurf, VS Code
329
+ ---
453
330
 
454
- ### Phase 2.5: Visibility & Ecosystem -- DONE
331
+ ## Uninstall
455
332
 
456
- - [x] **GitHub Action** — lint agent transcripts for law compliance (`action.yml`)
457
- - [x] **Starter instinct packs** — React, Python, Go (pre-built instincts)
458
- - [x] **`/discipline` command** — quick reference card of the 7 Laws
459
- - [x] **`/dashboard` command** — visual instinct health dashboard
460
- - [x] **Community files** — CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md
461
- - [x] **llms.txt** — LLM-friendly project description for discoverability
462
- - [x] **CI pipeline** — GitHub Actions testing on Node 18/20/22
463
- - [x] **Issue templates** — bug report + feature request
464
- - [x] **Translations** — Chinese (简体中文) and Japanese (日本語)
333
+ ```bash
334
+ npx continuous-improvement install --uninstall
335
+ ```
465
336
 
466
- ### Phase 3: Content & Proof
337
+ Removes skill, hooks, commands, MCP server. Learned instincts in `~/.claude/instincts/` are preserved — delete manually for a clean slate.
467
338
 
468
- - [ ] **2-min demo video** — side-by-side agent with/without discipline. Post to X + YouTube.
469
- - [ ] **"Why your AI agent keeps lying about being done"** — X thread / blog post
470
- - [ ] **"Law of the Week" X series** — 7 weeks of content breaking down each law
339
+ ---
471
340
 
472
- ### Phase 4: Ecosystem Growth
341
+ ## The Brand Stack
473
342
 
474
- - [ ] **VS Code extension** sidebar showing instinct confidence levels
475
- - [ ] **More instinct packs** — TypeScript, Rust, Java, Django, Laravel
476
- - [ ] **Instinct marketplace** — share learned instincts across teams
343
+ One product, three names. Use the one that fits the audience:
477
344
 
478
- ### Phase 5: Community
345
+ | Layer | Name | When you say it |
346
+ |-------|------|-----------------|
347
+ | **Brand** | The 7 Laws of AI Agent Discipline | Tweets, talks, docs, "what is this" |
348
+ | **Engine** | Mulahazah | The auto-leveling instinct system inside it |
349
+ | **Package** | `continuous-improvement` | `npm install`, `/plugin install`, `settings.json` |
479
350
 
480
- - [ ] **Conference talk on Mulahazah** the auto-leveling system is genuinely novel
481
- - [ ] **Leaderboard / badges** — "100 sessions" achievement system
482
- - [ ] **Custom domain** — landing page with interactive demo
351
+ 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.
483
352
 
484
353
  ---
485
354
 
486
- ## Contributing
355
+ ## In the wild
356
+
357
+ Workflows from this repo, applied to real open-source contributions:
487
358
 
488
- See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. Issues and PRs welcome.
359
+ ### pm-skills (product-on-purpose, 189 stars, Apache 2.0)
489
360
 
490
- ## Security
361
+ [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.
362
+
363
+ 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`).
364
+
365
+ ---
491
366
 
492
- See [SECURITY.md](SECURITY.md) for the security policy and how to report vulnerabilities.
367
+ ## More
493
368
 
494
- ## License
369
+ - [QUICKSTART.md](QUICKSTART.md) — 2-minute setup
370
+ - [SKILL.md](SKILL.md) — full 7 Laws spec
371
+ - [examples/](examples/) — bug fix, feature build, refactor walkthroughs
372
+ - [templates/insights-claude-md.md](templates/insights-claude-md.md) — paste-in CLAUDE.md blocks for verification discipline, environment notes, think-before-acting, and git/deploy workflow (sourced from the 28-day usage report)
373
+ - [CONTRIBUTING.md](CONTRIBUTING.md) — architecture, repo internals
374
+ - [SECURITY.md](SECURITY.md)
495
375
 
496
- MIT
376
+ MIT.