continuous-improvement 3.16.0 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +6 -0
  3. package/README.md +165 -100
  4. package/bin/audit-actions.mjs +433 -0
  5. package/bin/check-command-count.mjs +114 -0
  6. package/bin/portfolio-health.mjs +298 -0
  7. package/commands/intent-driven-development.md +36 -0
  8. package/commands/reconcile.md +34 -7
  9. package/hooks/gateguard.mjs +137 -3
  10. package/lib/gateguard-state.mjs +5 -1
  11. package/lib/plugin-metadata.mjs +1 -1
  12. package/llms.txt +1 -1
  13. package/package.json +12 -6
  14. package/plugins/beginner.json +1 -1
  15. package/plugins/continuous-improvement/.claude-plugin/marketplace.json +2 -2
  16. package/plugins/continuous-improvement/.claude-plugin/plugin.json +2 -2
  17. package/plugins/continuous-improvement/commands/intent-driven-development.md +36 -0
  18. package/plugins/continuous-improvement/commands/reconcile.md +34 -7
  19. package/plugins/continuous-improvement/hooks/gateguard.mjs +137 -3
  20. package/plugins/continuous-improvement/lib/gateguard-state.mjs +5 -1
  21. package/plugins/continuous-improvement/lib/plugin-metadata.mjs +1 -1
  22. package/plugins/continuous-improvement/skills/README.md +2 -1
  23. package/plugins/continuous-improvement/skills/gateguard/SKILL.md +10 -0
  24. package/plugins/continuous-improvement/skills/intent-driven-development/SKILL.md +161 -0
  25. package/plugins/continuous-improvement/skills/reconcile/SKILL.md +52 -4
  26. package/plugins/expert.json +1 -1
  27. package/skills/gateguard.md +10 -0
  28. package/skills/intent-driven-development.md +161 -0
  29. package/skills/reconcile.md +52 -4
  30. package/templates/actions_security_checklist.md +39 -0
  31. package/templates/experiment_template.md +38 -0
  32. package/templates/portfolio_event.schema.json +69 -0
  33. package/templates/release_receipt_template.md +37 -0
@@ -7,8 +7,8 @@
7
7
  "plugins": [
8
8
  {
9
9
  "name": "continuous-improvement",
10
- "description": "The persistent-memory and runtime-discipline layer for Claude Code. It remembers the corrections you already gave, grounds every edit in real facts before it lands, and — through the Mulahazah engine — turns each fix into a reusable instinct, so a lesson learned once is applied automatically next time with no re-teaching. Built on the 7 Laws of AI Agent Discipline (research, plan, verify, reflect, learn) and shipped as 26 bundled skills, instinct-aware hooks, an MCP toolset for recall and reflection, and a GitHub Action transcript linter that feeds real work history back into sharper instincts.",
11
- "version": "3.16.0",
10
+ "description": "The persistent-memory and runtime-discipline layer for Claude Code. It remembers the corrections you already gave, grounds every edit in real facts before it lands, and — through the Mulahazah engine — turns each fix into a reusable instinct, so a lesson learned once is applied automatically next time with no re-teaching. Built on the 7 Laws of AI Agent Discipline (research, plan, verify, reflect, learn) and shipped as 27 bundled skills, instinct-aware hooks, an MCP toolset for recall and reflection, and a GitHub Action transcript linter that feeds real work history back into sharper instincts.",
11
+ "version": "3.18.0",
12
12
  "source": "./plugins/continuous-improvement",
13
13
  "author": {
14
14
  "name": "naimkatiman"
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this skill are documented here.
4
4
 
5
5
  ---
6
6
 
7
+ ## [3.17.0] — 2026-06-28
8
+
9
+ ### Added
10
+
11
+ - **`/intent-driven-development`**: turn an ambiguous or high-impact change into verifiable acceptance criteria before you build. Converts a fuzzy request into observable `AC-NNN` criteria with named verification methods and a `[revised]` protocol that forbids silently dropping a criterion mid-build, so "done" is falsifiable and the agreed plan is held sacred (Law 2). Tier 2 (expert install). Brings the bundle to 27 skills. (#258)
12
+
7
13
  ## [3.16.0] — 2026-06-27
8
14
 
9
15
  ### Added
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- README landing-page structure rationale: docs/plans/2026-05-14-readme-landing-rewrite.md -->
1
+ <!-- README landing-page structure rationale: docs/plans/2026-06-28-readme-progressive-disclosure.md (supersedes docs/plans/2026-05-14-readme-landing-rewrite.md) -->
2
2
 
3
3
  <p align="center">
4
4
  <img src="assets/combined.gif" alt="Before vs After — The 7 Laws of AI Agent Discipline" width="700" />
@@ -15,17 +15,30 @@
15
15
  </p>
16
16
 
17
17
  <p align="center">
18
- <a href="https://www.npmjs.com/package/continuous-improvement"><img src="https://img.shields.io/npm/v/continuous-improvement" alt="npm"></a>
18
+ <a href="https://www.npmjs.com/package/continuous-improvement"><img src="https://img.shields.io/npm/v/continuous-improvement" alt="npm version"></a>
19
+ <a href="https://www.npmjs.com/package/continuous-improvement"><img src="https://img.shields.io/npm/dm/continuous-improvement" alt="npm downloads"></a>
19
20
  <a href="https://docs.anthropic.com/en/docs/claude-code"><img src="https://img.shields.io/badge/Claude%20Code-skill-blueviolet" alt="Claude Code"></a>
20
21
  <a href="https://github.com/marketplace/actions/ai-agent-discipline-linter"><img src="https://img.shields.io/badge/GitHub%20Action-marketplace-blue" alt="GitHub Action"></a>
21
22
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a>
22
- <a href="test/"><img src="https://img.shields.io/badge/tests-passing-brightgreen" alt="tests"></a>
23
23
  </p>
24
24
 
25
25
  <p align="center">
26
26
  <b>New here?</b> → <a href="QUICKSTART.md">QUICKSTART.md</a> (2 minutes) · <a href="https://continuous-improvement.dev">continuous-improvement.dev</a>
27
27
  </p>
28
28
 
29
+ ## Quick start
30
+
31
+ Inside Claude Code — two commands, no Node, no bash:
32
+
33
+ ```bash
34
+ /plugin marketplace add naimkatiman/continuous-improvement
35
+ /plugin install continuous-improvement@continuous-improvement
36
+ ```
37
+
38
+ **If you don't know which to pick, use Beginner.** That is the install above — enough for ~90% of users. Want the MCP server, observation hooks, and instinct packs too? See [Expert install](#install) below.
39
+
40
+ Verify it is live: run `/discipline` in Claude Code and you should see the 7 Laws card. (Commands load on session start — if it is not recognized, restart Claude Code once.)
41
+
29
42
  > **What this is *not*:** a prompt template, a `CLAUDE.md`, or a vibes-based reminder. It is a runtime hook (`hooks/gateguard.mjs`) plus a bundled skill set that makes the agent ground every change in real facts — it physically blocks `Edit` / `Write` / destructive `Bash` until the investigation is done, so edits land on understanding instead of guesses.
30
43
 
31
44
  ---
@@ -38,11 +51,13 @@ Claude Code is powerful but leaves intelligence on the table: it edits before re
38
51
  2. **During work** — bundled skills enforce planning, one-thing-at-a-time execution, TDD ([`tdd-workflow`](skills/tdd-workflow.md)), and a six-phase verification ladder ([`verification-loop`](skills/verification-loop.md)) before "done".
39
52
  3. **After work** — `/seven-laws` reflection plus the Mulahazah instinct engine capture lessons, and the opt-in [`recall-briefing`](hooks/recall-briefing.mjs) hook resurfaces the most relevant past fix on the next related prompt, so the same mistake does not repeat next session.
40
53
 
41
- Beginner install is two slash commands inside Claude Code (no Node, no bash). Expert install adds MCP tools, observation hooks, instinct packs, and a GitHub Action transcript linter for CI.
42
-
43
54
  ---
44
55
 
45
- ## Before and after
56
+ ## See it in action
57
+
58
+ <p align="center">
59
+ <img src="assets/gateguard-demo.png" alt="gateguard blocks an unresearched Edit until the investigation is on the table" width="820" />
60
+ </p>
46
61
 
47
62
  Without Continuous Improvement, "fix the login redirect bug" looks like this:
48
63
 
@@ -56,59 +71,38 @@ Same agent. Same model. Different intelligence.
56
71
 
57
72
  ---
58
73
 
59
- ## Who this is for
60
-
61
- Use this if you:
62
-
63
- - ship from real repositories with real consequences
64
- - have been bitten by an agent that edits before understanding
65
- - want tests, builds, or healthchecks to pass before "done"
66
- - want lessons from yesterday to survive into today
67
-
68
- Skip it if you:
69
-
70
- - only do one-off prompts (no edits, no commits)
71
- - do not use Claude Code
72
- - dislike *any* friction before agent edits
73
- - want a prompt template, not a runtime gate
74
-
75
- (The runtime gate is `hooks/gateguard.mjs`; full mechanics in [How enforcement works](#how-enforcement-works) below.)
76
-
77
- ---
74
+ ## The 7 Laws
78
75
 
79
- ## The problem this solves
76
+ | # | Law | What it gives the agent |
77
+ |---|-----|----------------------|
78
+ | 1 | **Research Before Executing** | builds on what already exists instead of reinventing it |
79
+ | 2 | **Plan Is Sacred** | lands effort on the goal with success defined up front |
80
+ | 3 | **One Thing at a Time** | ships each change on a known-good base |
81
+ | 4 | **Verify Before Reporting** | backs every "done" with evidence you can trust |
82
+ | 5 | **Reflect After Sessions** | turns each session into a captured lesson |
83
+ | 6 | **Iterate One Change** | keeps debugging isolated and the signal clean |
84
+ | 7 | **Learn From Every Session** | compounds knowledge so next week's agent is sharper |
80
85
 
81
- You have used Claude Code (or any agentic coding tool) long enough to recognize the failure pattern. Matt Pocock's [Skills For Real Engineers](https://github.com/mattpocock/skills) names four root failure modes that account for nearly every "the agent didn't help" complaint; the 7 Laws of AI Agent Discipline catch those four at the tool-call boundary plus a fifth that only shows up across sessions.
86
+ ```
87
+ Research -> Plan -> Execute (one thing) -> Verify -> Reflect -> Learn -> Iterate
88
+ ```
82
89
 
83
- | # | Failure mode | What you see | Which Law fires | What enforces it |
84
- |---|---|---|---|---|
85
- | 1 | **Misalignment** | The agent doesn't do what you want — invents requirements, reinvents helpers that already exist, or builds the wrong thing before anyone challenged the idea | Law 1 (Research) | [`roast`](skills/roast.md), [`grill-me`](skills/grill-me.md), [`grill-with-docs`](skills/grill-with-docs.md), [`gateguard`](skills/gateguard.md), [`workspace-surface-audit`](skills/workspace-surface-audit.md) |
86
- | 2 | **No shared language** | The agent uses 20 words where 1 would do; jargon decoded fresh every session; variable names drift from domain terms | Law 2 (Plan), Law 7 (Learn) | [`grill-with-docs`](skills/grill-with-docs.md) (writes & maintains `CONTEXT.md`), [`token-budget-advisor`](skills/token-budget-advisor.md), [`strategic-compact`](skills/strategic-compact.md) |
87
- | 3 | **No feedback loop** | The code doesn't work — agent claims "done" without running build, tests, or healthcheck | Law 4 (Verify) | [`tdd-workflow`](skills/tdd-workflow.md), [`verification-loop`](skills/verification-loop.md), [`deploy-receipt`](skills/deploy-receipt.md) |
88
- | 4 | **Design rot** | Ball-of-mud accelerates — agent bundles three concerns into one PR, stacks untested changes, ignores prior architectural decisions | Law 2 (Plan), Law 3 (One Thing) | [`superpowers:writing-plans`](https://github.com/obra/superpowers/blob/main/skills/writing-plans/SKILL.md), [`safety-guard`](skills/safety-guard.md), [`worktree-safety`](skills/worktree-safety.md), [`wild-risa-balance`](skills/wild-risa-balance.md) |
89
- | 5 | **Forgotten lessons** | Next session starts from zero — prior corrections, decisions, instincts are lost; the same mistake repeats next week | Law 5 (Reflect), Law 7 (Learn) | [`handoff`](skills/handoff.md), Mulahazah instinct engine |
90
+ <p align="center">
91
+ <img src="assets/diagram-7-laws-loop.jpg" alt="The 7 Laws of AI Agent Discipline — circular workflow loop" width="820" />
92
+ </p>
90
93
 
91
- Three of those alignment + reflection skills (`grill-me`, `grill-with-docs`, `handoff`) are MIT-licensed ports from mattpocock/skills; the rest are continuous-improvement-native. Every failure mode has at least one runtime hook or model-side skill that catches it before it lands in the diff.
94
+ Full spec, reflection-block format, and anti-examples: [SKILL.md](SKILL.md). Full Law-to-tool alignment matrix: [CONTRIBUTING.md § Law Coverage Matrix](CONTRIBUTING.md#law-coverage-matrix).
92
95
 
93
96
  ---
94
97
 
95
98
  ## Install
96
99
 
97
- **If you don't know which to pick, use Beginner.** It is enough for ~90% of users and adds no Node or bash dependency.
100
+ **Beginner (recommended)** is the two-command [Quick start](#quick-start) above the 7 Laws skill, the hooks that enforce it, and the slash commands. Nothing else to install.
98
101
 
99
- ### Beginner — inside Claude Code, two commands (plus one optional companion)
102
+ <details>
103
+ <summary><b>Optional companion — the <code>/superpowers</code> dispatcher (recommended)</b></summary>
100
104
 
101
- You get the 7 Laws skill, the hooks that enforce it, and the slash commands. Nothing else to install.
102
-
103
- ```bash
104
- # Inside Claude Code (no shell needed)
105
- /plugin marketplace add naimkatiman/continuous-improvement
106
- /plugin install continuous-improvement@continuous-improvement
107
- ```
108
-
109
- The doubled name is correct: it reads as `<plugin>@<marketplace>`.
110
-
111
- **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:
105
+ 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:
112
106
 
113
107
  ```bash
114
108
  /plugin install superpowers@continuous-improvement
@@ -116,9 +110,6 @@ The doubled name is correct: it reads as `<plugin>@<marketplace>`.
116
110
 
117
111
  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.
118
112
 
119
- Verify: run `/discipline` in Claude Code — you should see the 7 Laws card.
120
- 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.
121
-
122
113
  **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:
123
114
 
124
115
  ```
@@ -127,7 +118,10 @@ Edit a new file scratch.txt and put the word "hello" in it. Don't research anyth
127
118
 
128
119
  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`.)
129
120
 
130
- ### How enforcement works
121
+ </details>
122
+
123
+ <details>
124
+ <summary><b>How enforcement works (two layers: runtime hooks + model-side skills)</b></summary>
131
125
 
132
126
  The 7 Laws are enforced at **two layers**:
133
127
 
@@ -136,7 +130,10 @@ The 7 Laws are enforced at **two layers**:
136
130
 
137
131
  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.
138
132
 
139
- ### Expert — adds MCP server, observation hooks, and instinct packs
133
+ </details>
134
+
135
+ <details>
136
+ <summary><b>Expert install — MCP server, observation hooks, and instinct packs</b></summary>
140
137
 
141
138
  Pick this if you want the MCP tools (19 of them, including `ci_plan_init` / `ci_plan_status` for `task_plan.md`-style planning), the session hooks that feed Mulahazah, and starter packs.
142
139
 
@@ -151,7 +148,10 @@ npx continuous-improvement install --pack react # optional: react | python | g
151
148
  Verify: run `/dashboard` in Claude Code — you should see instinct health and observation count.
152
149
  Update later with `/plugin marketplace update continuous-improvement` or by re-running the npx command. When you run the npx installer, it makes one throttled, fail-open read of the public npm registry and prints a one-line notice if a newer version is published (no telemetry — nothing about you is sent). Silence it with `CLAUDE_CI_UPDATE_CHECK=off`.
153
150
 
154
- ### Troubleshooting install
151
+ </details>
152
+
153
+ <details>
154
+ <summary><b>Troubleshooting install</b></summary>
155
155
 
156
156
  Three failures account for nearly every install support thread. Try them in order:
157
157
 
@@ -163,7 +163,10 @@ Three failures account for nearly every install support thread. Try them in orde
163
163
 
164
164
  If none of those apply, paste the output of `npx continuous-improvement install` into a GitHub issue — that surface logs every step.
165
165
 
166
- ### Operator modes
166
+ </details>
167
+
168
+ <details>
169
+ <summary><b>Operator modes (env vars that change hook behavior)</b></summary>
167
170
 
168
171
  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.
169
172
 
@@ -174,7 +177,10 @@ The framework has documented operator-level modes that change hook behavior with
174
177
  | `CLAUDE_RECALL_BRIEFING=1` | `hooks/recall-briefing.mjs` (a UserPromptSubmit hook) makes episodic memory proactive: on the first substantive prompt of a session it searches this project's past observations (BM25) and injects a one-time `<system-reminder>` with the most relevant prior activity, so the agent reuses a past fix instead of re-deriving it. Opt-in and default off; it is an amplifier, never a gate — it cannot block a prompt and fails open. The `ci_recall` MCP tool stays available for explicit, deeper searches. | bash/zsh: `export CLAUDE_RECALL_BRIEFING=1` in `~/.bashrc` / `~/.zshrc`. PowerShell: `$env:CLAUDE_RECALL_BRIEFING=1` (session) or `[Environment]::SetEnvironmentVariable('CLAUDE_RECALL_BRIEFING','1','User')` (persistent). |
175
178
  | `CLAUDE_WORKFLOW_DISTILL_NUDGE=on` | `hooks/workflow-distill.mjs` (a `Stop` hook) closes the orchestration-to-memory loop: when a native Workflow run's output then passed a verify in the same session, it prints a one-line stderr nudge to run the `ci_distill_from_workflow` MCP tool, so an expensive multi-agent run leaves a durable Mulahazah draft instinct instead of evaporating. `on` enables it; default (unset or any other value) is off. Opt-in amplifier, never a gate — it cannot block the Stop, dedupes per run, and fails open. | bash/zsh: `export CLAUDE_WORKFLOW_DISTILL_NUDGE=on` in `~/.bashrc` / `~/.zshrc`. PowerShell: `$env:CLAUDE_WORKFLOW_DISTILL_NUDGE='on'` (session) or `[Environment]::SetEnvironmentVariable('CLAUDE_WORKFLOW_DISTILL_NUDGE','on','User')` (persistent). |
176
179
 
177
- ### Works with other agents
180
+ </details>
181
+
182
+ <details>
183
+ <summary><b>Works with other agents (Gemini, Codex, Cursor, Windsurf, Zed, Aider, Copilot)</b></summary>
178
184
 
179
185
  Claude Code gets the full install (hooks, MCP server, instinct learning). Every other agent platform can still run the 7 Laws as a rules file — one flag writes the skill text into the file that platform reads, at your project root:
180
186
 
@@ -194,43 +200,75 @@ npx continuous-improvement install --target gemini,codex
194
200
 
195
201
  Shared files (`GEMINI.md`, `AGENTS.md`, `.rules`, `CONVENTIONS.md`, `copilot-instructions.md`) are merged through a managed marker block — your existing content is preserved and reinstalls are idempotent. Targets can be combined freely (`--target claude,gemini,codex` runs the full Claude Code install plus the rules files).
196
202
 
203
+ </details>
204
+
197
205
  ---
198
206
 
199
- ## The 7 Laws
207
+ ## Who this is for
200
208
 
201
- | # | Law | What it gives the agent |
202
- |---|-----|----------------------|
203
- | 1 | **Research Before Executing** | builds on what already exists instead of reinventing it |
204
- | 2 | **Plan Is Sacred** | lands effort on the goal with success defined up front |
205
- | 3 | **One Thing at a Time** | ships each change on a known-good base |
206
- | 4 | **Verify Before Reporting** | backs every "done" with evidence you can trust |
207
- | 5 | **Reflect After Sessions** | turns each session into a captured lesson |
208
- | 6 | **Iterate One Change** | keeps debugging isolated and the signal clean |
209
- | 7 | **Learn From Every Session** | compounds knowledge so next week's agent is sharper |
209
+ <details>
210
+ <summary><b>Use it if you ship from real repos — skip it if you only do one-off prompts</b></summary>
210
211
 
211
- ```
212
- Research -> Plan -> Execute (one thing) -> Verify -> Reflect -> Learn -> Iterate
213
- ```
212
+ Use this if you:
214
213
 
215
- <p align="center">
216
- <img src="assets/diagram-7-laws-loop.jpg" alt="The 7 Laws of AI Agent Discipline circular workflow loop" width="820" />
217
- </p>
214
+ - ship from real repositories with real consequences
215
+ - have been bitten by an agent that edits before understanding
216
+ - want tests, builds, or healthchecks to pass before "done"
217
+ - want lessons from yesterday to survive into today
218
218
 
219
- Full spec, reflection-block format, and anti-examples: [SKILL.md](SKILL.md). Full Law-to-tool alignment matrix: [CONTRIBUTING.md § Law Coverage Matrix](CONTRIBUTING.md#law-coverage-matrix).
219
+ Skip it if you:
220
+
221
+ - only do one-off prompts (no edits, no commits)
222
+ - do not use Claude Code
223
+ - dislike *any* friction before agent edits
224
+ - want a prompt template, not a runtime gate
225
+
226
+ (The runtime gate is `hooks/gateguard.mjs`; full mechanics in [How enforcement works](#install) above.)
227
+
228
+ </details>
229
+
230
+ ---
231
+
232
+ ## The problem this solves
233
+
234
+ <details>
235
+ <summary><b>Five failure modes every agentic-coding user hits — and which Law catches each</b></summary>
236
+
237
+ You have used Claude Code (or any agentic coding tool) long enough to recognize the failure pattern. Matt Pocock's [Skills For Real Engineers](https://github.com/mattpocock/skills) names four root failure modes that account for nearly every "the agent didn't help" complaint; the 7 Laws of AI Agent Discipline catch those four at the tool-call boundary plus a fifth that only shows up across sessions.
238
+
239
+ | # | Failure mode | What you see | Which Law fires | What enforces it |
240
+ |---|---|---|---|---|
241
+ | 1 | **Misalignment** | The agent doesn't do what you want — invents requirements, reinvents helpers that already exist, or builds the wrong thing before anyone challenged the idea | Law 1 (Research) | [`roast`](skills/roast.md), [`grill-me`](skills/grill-me.md), [`grill-with-docs`](skills/grill-with-docs.md), [`gateguard`](skills/gateguard.md), [`workspace-surface-audit`](skills/workspace-surface-audit.md) |
242
+ | 2 | **No shared language** | The agent uses 20 words where 1 would do; jargon decoded fresh every session; variable names drift from domain terms | Law 2 (Plan), Law 7 (Learn) | [`grill-with-docs`](skills/grill-with-docs.md) (writes & maintains `CONTEXT.md`), [`token-budget-advisor`](skills/token-budget-advisor.md), [`strategic-compact`](skills/strategic-compact.md) |
243
+ | 3 | **No feedback loop** | The code doesn't work — agent claims "done" without running build, tests, or healthcheck | Law 4 (Verify) | [`tdd-workflow`](skills/tdd-workflow.md), [`verification-loop`](skills/verification-loop.md), [`deploy-receipt`](skills/deploy-receipt.md) |
244
+ | 4 | **Design rot** | Ball-of-mud accelerates — agent bundles three concerns into one PR, stacks untested changes, ignores prior architectural decisions | Law 2 (Plan), Law 3 (One Thing) | [`superpowers:writing-plans`](https://github.com/obra/superpowers/blob/main/skills/writing-plans/SKILL.md), [`safety-guard`](skills/safety-guard.md), [`worktree-safety`](skills/worktree-safety.md), [`wild-risa-balance`](skills/wild-risa-balance.md) |
245
+ | 5 | **Forgotten lessons** | Next session starts from zero — prior corrections, decisions, instincts are lost; the same mistake repeats next week | Law 5 (Reflect), Law 7 (Learn) | [`handoff`](skills/handoff.md), Mulahazah instinct engine |
246
+
247
+ Three of those alignment + reflection skills (`grill-me`, `grill-with-docs`, `handoff`) are MIT-licensed ports from mattpocock/skills; the rest are continuous-improvement-native. Every failure mode has at least one runtime hook or model-side skill that catches it before it lands in the diff.
248
+
249
+ </details>
220
250
 
221
251
  ---
222
252
 
223
253
  ## Mulahazah: auto-leveling learning
224
254
 
255
+ <details>
256
+ <summary><b>How instincts form, level up, and decay — you configure nothing</b></summary>
257
+
225
258
  Hooks capture every tool call. After ~20 observations Claude analyzes patterns and creates **instincts** with confidence scores: silent below 0.5, suggested at 0.5–0.69, auto-applied at 0.7+. Corrections drop confidence by 0.1; unused instincts decay. Project-scoped; promoted to global after seen across 2+ projects. You configure nothing.
226
259
 
227
260
  <p align="center">
228
261
  <img src="assets/diagram-mulahazah-learning.jpg" alt="Mulahazah pipeline" width="820" />
229
262
  </p>
230
263
 
264
+ </details>
265
+
231
266
  ---
232
267
 
233
- ## Slash Commands
268
+ ## Slash commands
269
+
270
+ <details>
271
+ <summary><b>All 28 commands (Beginner gets every one)</b></summary>
234
272
 
235
273
  `/seven-laws` is the canonical reflect-and-learn command. `/continuous-improvement` is kept as an alias for backward compatibility — both run the same workflow.
236
274
 
@@ -240,28 +278,40 @@ Hooks capture every tool call. After ~20 observations Claude analyzes patterns a
240
278
  /proceed-with-the-recommendation Walk any agent's recommendation list top-to-bottom
241
279
  /superpowers Law activator — route the task to the right specialist
242
280
  /workspace-surface-audit Audit repo + MCP + env, recommend high-value skills
243
- /planning-with-files Create task_plan.md, findings.md, progress.md
281
+ /roast 5-persona adversarial council — GO / RESHAPE / KILL on an idea
244
282
  /grill-me Interview-mode alignment (one question at a time)
245
283
  /grill-with-docs Grill-me with persistent outcomes — updates CONTEXT.md + ADRs inline
284
+ /intent-driven-development Scope an ambiguous change into verifiable acceptance criteria
285
+ /planning-with-files Create task_plan.md, findings.md, progress.md
286
+ /goal-check Score recent activity against the task_plan.md goal (drift detector)
287
+ /reconcile Establish git ground truth before any mutation; verify a push landed
288
+ /audit Audit recent commits for real defects, confirm each before fixing
289
+ /ship Single-defect fast path — reconcile, TDD fix, verify, one PR
290
+ /production-readiness-review Parallel readiness gate — severity-ranked punch-list (reports only)
246
291
  /handoff End-of-session compaction into mktemp brief for the next agent
292
+ /recall BM25 search over past observations — "have I hit this before?"
247
293
  /discipline Quick reference card of the 7 Laws
294
+ /model-forward Restate the model-forward stance — go with the model, not against it
248
295
  /verify-install One-shot post-install check — commands, gateguard, observe
249
296
  /dashboard Visual instinct health dashboard
250
297
  /companion-preference Inspect companion-preference hook telemetry
251
298
  /ralph Autonomous PRD story-by-story loop
252
299
  /learn-eval Capture session patterns into new skills (needs observation history)
253
300
  /harvest Extract reusable patterns from session friction (needs observation history)
301
+ /distill Distill repeated successful sequences into draft instincts (needs observation history)
254
302
  /release-train Coordinate a multi-PR release sequence
255
303
  /swarm Fan-out coordination across parallel sub-agents
256
304
  ```
257
305
 
258
- All 18 ship in the marketplace bundle. The Beginner install gets all of them — with one caveat: `/learn-eval` and `/harvest` only produce useful output once Mulahazah has accumulated observation history (~20 observations), so running them on day 1 returns an empty result, not a broken command. `/swarm` and `/release-train` are orchestration commands aimed at larger multi-agent or multi-PR work. 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).
306
+ All 28 ship in the marketplace bundle. The Beginner install gets all of them — with one caveat: `/learn-eval`, `/harvest`, and `/distill` only produce useful output once Mulahazah has accumulated observation history (~20 observations), so running them on day 1 returns an empty result, not a broken command. `/swarm` and `/release-train` are orchestration commands aimed at larger multi-agent or multi-PR work. 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).
307
+
308
+ </details>
259
309
 
260
310
  ---
261
311
 
262
312
  ## Skills
263
313
 
264
- The plugin ships **26 skills** — 1 core + 1 featured + 6 tier-1 + 15 tier-2 + 3 always-bundled. Beginner install gets tier-1, featured, and the always-bundled companion; Expert adds tier-2, the MCP server, and observation hooks. Full catalog with per-skill descriptions, Law tagging, and drop-in single-file install: [docs/skills.md](docs/skills.md). Adding a 27th skill: [CONTRIBUTING.md § Evolution — adding a new skill](CONTRIBUTING.md#evolution--adding-a-new-skill).
314
+ The plugin ships **27 skills** — 1 core + 1 featured + 6 tier-1 + 16 tier-2 + 3 always-bundled. Beginner install gets tier-1, featured, and the always-bundled companion; Expert adds tier-2, the MCP server, and observation hooks. Full catalog with per-skill descriptions, Law tagging, and drop-in single-file install: [docs/skills.md](docs/skills.md). Adding a 28th skill: [CONTRIBUTING.md § Evolution — adding a new skill](CONTRIBUTING.md#evolution--adding-a-new-skill).
265
315
 
266
316
  ---
267
317
 
@@ -280,17 +330,48 @@ Catches writes without prior research (Law 1), too many edits without verificati
280
330
 
281
331
  ---
282
332
 
283
- ## Uninstall
333
+ ## Portfolio spine
334
+
335
+ Two standalone commands turn a multi-repo portfolio into scored, auditable evidence. Both are offline: they read local files only, no network.
336
+
337
+ **`ci-audit-actions`** — static GitHub Actions security scan. Flags missing/over-broad `permissions:`, unpinned actions, missing job timeouts, missing concurrency, untrusted event text interpolated into `run:`, and dangerous triggers combined with secrets. Writes a markdown report; `--strict` exits 1 on high-severity findings.
284
338
 
285
339
  ```bash
286
- npx continuous-improvement install --uninstall
340
+ npx -p continuous-improvement ci-audit-actions --repo . --out reports/actions-security.md --strict
287
341
  ```
288
342
 
289
- Removes skill, hooks, commands, MCP server. Learned instincts in `~/.claude/instincts/` are preserved delete manually for a clean slate.
343
+ **`ci-portfolio-health`** — scores every repo in a `portfolio/repos.json` registry 0-100 from local proof signals (CI presence, release receipts, experiment records, commit freshness, high-severity audit findings) and writes a worst-first table with a named next action per repo.
344
+
345
+ ```bash
346
+ npx -p continuous-improvement ci-portfolio-health --config portfolio/repos.json --out reports/portfolio-health.md
347
+ ```
348
+
349
+ Proof-format templates ship in [templates/](templates/): `release_receipt_template.md`, `experiment_template.md`, `actions_security_checklist.md`, and `portfolio_event.schema.json`.
290
350
 
291
351
  ---
292
352
 
293
- ## The Brand Stack
353
+ ## More
354
+
355
+ - [QUICKSTART.md](QUICKSTART.md) — 2-minute setup
356
+ - [SKILL.md](SKILL.md) — full 7 Laws spec
357
+ - [docs/skills.md](docs/skills.md) — full 27-skill catalog
358
+ - [examples/](examples/) — bug fix, feature build, refactor walkthroughs
359
+ - [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)
360
+ - [CONTRIBUTING.md](CONTRIBUTING.md) — architecture, repo internals, adding a new skill
361
+ - [SECURITY.md](SECURITY.md)
362
+
363
+ <details>
364
+ <summary><b>Uninstall · the brand stack · in the wild</b></summary>
365
+
366
+ ### Uninstall
367
+
368
+ ```bash
369
+ npx continuous-improvement install --uninstall
370
+ ```
371
+
372
+ Removes skill, hooks, commands, MCP server. Learned instincts in `~/.claude/instincts/` are preserved — delete manually for a clean slate.
373
+
374
+ ### The brand stack
294
375
 
295
376
  One product, three names. Use the one that fits the audience:
296
377
 
@@ -302,28 +383,12 @@ One product, three names. Use the one that fits the audience:
302
383
 
303
384
  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.
304
385
 
305
- ---
306
-
307
- ## In the wild
386
+ ### In the wild
308
387
 
309
388
  Workflows from this repo, applied to real open-source contributions:
310
389
 
311
- ### pm-skills (product-on-purpose, Apache 2.0)
312
-
313
- [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.
314
-
315
- 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`).
390
+ **pm-skills (product-on-purpose, Apache 2.0)** — [F-07 discover-market-sizing](https://github.com/product-on-purpose/pm-skills/pull/141), a 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. 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.
316
391
 
317
- ---
318
-
319
- ## More
320
-
321
- - [QUICKSTART.md](QUICKSTART.md) — 2-minute setup
322
- - [SKILL.md](SKILL.md) — full 7 Laws spec
323
- - [docs/skills.md](docs/skills.md) — full 26-skill catalog
324
- - [examples/](examples/) — bug fix, feature build, refactor walkthroughs
325
- - [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)
326
- - [CONTRIBUTING.md](CONTRIBUTING.md) — architecture, repo internals, adding a new skill
327
- - [SECURITY.md](SECURITY.md)
392
+ </details>
328
393
 
329
394
  MIT.