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.
- package/.claude-plugin/marketplace.json +78 -0
- package/CHANGELOG.md +210 -0
- package/LICENSE +21 -21
- package/QUICKSTART.md +101 -81
- package/README.md +224 -198
- package/SKILL.md +87 -9
- package/action.yml +33 -0
- package/bin/analyze.sh +161 -153
- package/bin/backfill.mjs +172 -0
- package/bin/check-docs-substrings.mjs +333 -0
- package/bin/check-everything-mirror.mjs +145 -0
- package/bin/check-routing-targets.mjs +151 -0
- package/bin/check-skill-law-tag.mjs +128 -0
- package/bin/check-skill-mirror.mjs +119 -0
- package/bin/check-skill-tiers.mjs +116 -0
- package/bin/check-third-party-shape.mjs +202 -0
- package/bin/generate-plugin-manifests.mjs +169 -0
- package/bin/harvest-friction.mjs +279 -0
- package/bin/hook-stats.mjs +258 -0
- package/bin/install.mjs +418 -456
- package/bin/lint-transcript.mjs +239 -0
- package/bin/mcp-server.mjs +842 -499
- package/bin/observe.mjs +148 -0
- package/bin/pre-commit-block-strays.sh +49 -0
- package/bin/refresh-third-party.mjs +416 -0
- package/bin/unified-cli.mjs +533 -0
- package/commands/continuous-improvement.md +115 -74
- package/commands/dashboard.md +56 -0
- package/commands/discipline.md +51 -0
- package/commands/harvest.md +76 -0
- package/commands/learn-eval.md +117 -0
- package/commands/planning-with-files.md +66 -0
- package/commands/proceed-with-the-recommendation.md +62 -0
- package/commands/ralph.md +103 -0
- package/commands/release-train.md +81 -0
- package/commands/seven-laws.md +16 -0
- package/commands/superpowers.md +153 -0
- package/commands/swarm.md +101 -0
- package/commands/workspace-surface-audit.md +77 -0
- package/hooks/observe.sh +172 -134
- package/hooks/session.sh +106 -106
- package/hooks/three-section-close.mjs +181 -0
- package/instinct-packs/go.json +58 -0
- package/instinct-packs/meta.json +16 -0
- package/instinct-packs/python.json +58 -0
- package/instinct-packs/react.json +58 -0
- package/lib/cli-anything.mjs +401 -0
- package/lib/compound-engineering.mjs +831 -0
- package/lib/observe-event.mjs +128 -0
- package/lib/plugin-metadata.mjs +432 -0
- package/lib/pm-marketplace.mjs +61 -0
- package/lib/pm-skills.mjs +1274 -0
- package/lib/resolve-home-dir.mjs +43 -0
- package/lib/skill-tiers.mjs +137 -0
- package/lib/unified-plugin.mjs +924 -0
- package/llms.txt +68 -0
- package/package.json +38 -15
- package/plugins/beginner.json +17 -6
- package/plugins/continuous-improvement/.claude-plugin/marketplace.json +20 -0
- package/plugins/continuous-improvement/.claude-plugin/plugin.json +26 -0
- package/plugins/continuous-improvement/LICENSE +21 -0
- package/plugins/continuous-improvement/README.md +56 -0
- package/plugins/continuous-improvement/bin/backfill.mjs +172 -0
- package/plugins/continuous-improvement/bin/mcp-server.mjs +886 -0
- package/plugins/continuous-improvement/bin/observe.mjs +148 -0
- package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -0
- package/plugins/continuous-improvement/commands/dashboard.md +56 -0
- package/plugins/continuous-improvement/commands/discipline.md +51 -0
- package/plugins/continuous-improvement/commands/harvest.md +76 -0
- package/plugins/continuous-improvement/commands/learn-eval.md +117 -0
- package/plugins/continuous-improvement/commands/planning-with-files.md +66 -0
- package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +62 -0
- package/plugins/continuous-improvement/commands/ralph.md +103 -0
- package/plugins/continuous-improvement/commands/release-train.md +81 -0
- package/plugins/continuous-improvement/commands/seven-laws.md +16 -0
- package/plugins/continuous-improvement/commands/superpowers.md +153 -0
- package/plugins/continuous-improvement/commands/swarm.md +101 -0
- package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -0
- package/plugins/continuous-improvement/hooks/hooks.json +60 -0
- package/plugins/continuous-improvement/hooks/observe.sh +172 -0
- package/plugins/continuous-improvement/hooks/session.sh +106 -0
- package/plugins/continuous-improvement/hooks/three-section-close.mjs +181 -0
- package/plugins/continuous-improvement/instinct-packs/go.json +58 -0
- package/plugins/continuous-improvement/instinct-packs/meta.json +16 -0
- package/plugins/continuous-improvement/instinct-packs/python.json +58 -0
- package/plugins/continuous-improvement/instinct-packs/react.json +58 -0
- package/plugins/continuous-improvement/lib/observe-event.mjs +128 -0
- package/plugins/continuous-improvement/lib/plugin-metadata.mjs +432 -0
- package/plugins/continuous-improvement/lib/resolve-home-dir.mjs +43 -0
- package/plugins/continuous-improvement/skills/README.md +34 -0
- package/plugins/continuous-improvement/skills/continuous-improvement/SKILL.md +249 -0
- package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +131 -0
- package/plugins/continuous-improvement/skills/gateguard/SKILL.md +155 -0
- package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +108 -0
- package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +454 -0
- package/plugins/continuous-improvement/skills/ralph/SKILL.md +221 -0
- package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +76 -0
- package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +104 -0
- package/plugins/continuous-improvement/skills/superpowers/SKILL.md +212 -0
- package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -0
- package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +136 -0
- package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +192 -0
- package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +191 -0
- package/plugins/continuous-improvement/skills/workspace-surface-audit/SKILL.md +147 -0
- package/plugins/continuous-improvement/templates/planning-with-files/findings.md +8 -0
- package/plugins/continuous-improvement/templates/planning-with-files/progress.md +7 -0
- package/plugins/continuous-improvement/templates/planning-with-files/task_plan.md +23 -0
- package/plugins/expert.json +34 -5
- package/skills/README.md +79 -0
- package/skills/deploy-receipt.md +131 -0
- package/skills/gateguard.md +155 -0
- package/skills/para-memory-files.md +108 -0
- package/skills/proceed-with-the-recommendation.md +454 -0
- package/skills/ralph.md +221 -0
- package/skills/safety-guard.md +76 -0
- package/skills/strategic-compact.md +104 -0
- package/skills/superpowers.md +212 -0
- package/skills/tdd-workflow.md +411 -0
- package/skills/token-budget-advisor.md +136 -0
- package/skills/verification-loop.md +192 -0
- package/skills/wild-risa-balance.md +191 -0
- package/skills/workspace-surface-audit.md +147 -0
- package/templates/planning-with-files/findings.md +8 -0
- package/templates/planning-with-files/progress.md +7 -0
- package/templates/planning-with-files/task_plan.md +23 -0
- 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
|
|
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://
|
|
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-
|
|
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="
|
|
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
|
|
28
|
-
|
|
29
|
-
AI agents are great at individual steps. They're terrible at **discipline**.
|
|
24
|
+
## The problem this solves
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
You have used Claude Code (or any agentic coding tool) long enough to recognize the failure pattern.
|
|
32
27
|
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
|
|
38
|
-
<summary><b>Without continuous-improvement</b> — agent skips research, declares "done" without verifying</summary>
|
|
38
|
+
## What you get
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
61
|
-
</details>
|
|
54
|
+
### Beginner — inside Claude Code, two commands
|
|
62
55
|
|
|
63
|
-
|
|
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
|
-
|
|
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
|
-
|
|
74
|
-
|
|
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
|
-
|
|
79
|
-
in middleware/rateLimit.ts...
|
|
69
|
+
### Expert — adds MCP server, observation hooks, and instinct packs
|
|
80
70
|
|
|
81
|
-
|
|
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
|
-
|
|
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
|
-
|
|
115
|
-
|
|
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
|
-
###
|
|
84
|
+
### Troubleshooting install
|
|
120
85
|
|
|
121
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
|
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
|
|
165
|
-
|
|
166
|
-
### The Loop
|
|
116
|
+
| 7 | **Learn From Every Session** | lose knowledge when context ends |
|
|
167
117
|
|
|
168
118
|
```
|
|
169
|
-
Research
|
|
119
|
+
Research -> Plan -> Execute (one thing) -> Verify -> Reflect -> Learn -> Iterate
|
|
170
120
|
```
|
|
171
121
|
|
|
172
|
-
|
|
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
|
-
|
|
132
|
+
Hooks capture every tool call. After ~20 observations, Claude analyzes patterns and creates **instincts** with confidence scores:
|
|
179
133
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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
|
-
|
|
140
|
+
<p align="center">
|
|
141
|
+
<img src="assets/diagram-mulahazah-learning.jpg" alt="Mulahazah pipeline" width="820" />
|
|
142
|
+
</p>
|
|
188
143
|
|
|
189
|
-
|
|
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
|
-
|
|
146
|
+
## Slash Commands
|
|
199
147
|
|
|
200
148
|
```
|
|
201
|
-
/
|
|
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
|
-
##
|
|
165
|
+
## Law Coverage
|
|
207
166
|
|
|
208
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
226
|
+
# 1. Create the source file
|
|
227
|
+
touch skills/<your-skill>.md
|
|
253
228
|
```
|
|
254
229
|
|
|
255
|
-
|
|
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
|
-
##
|
|
283
|
+
## GitHub Action: Transcript Linter
|
|
260
284
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
-
##
|
|
300
|
+
## Uninstall
|
|
273
301
|
|
|
274
|
-
|
|
302
|
+
```bash
|
|
303
|
+
npx continuous-improvement install --uninstall
|
|
304
|
+
```
|
|
275
305
|
|
|
276
|
-
|
|
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
|
-
##
|
|
310
|
+
## The Brand Stack
|
|
285
311
|
|
|
286
|
-
|
|
312
|
+
One product, three names. Use the one that fits the audience:
|
|
287
313
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
-
|
|
292
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
324
|
+
## In the wild
|
|
302
325
|
|
|
303
|
-
|
|
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
|
-
###
|
|
328
|
+
### pm-skills (product-on-purpose, 189 stars, Apache 2.0)
|
|
309
329
|
|
|
310
|
-
-
|
|
311
|
-
|
|
312
|
-
-
|
|
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
|
-
##
|
|
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.
|