continuous-improvement 3.9.2 → 3.11.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 +2 -2
- package/CHANGELOG.md +61 -0
- package/QUICKSTART.md +13 -8
- package/README.md +84 -153
- package/bin/backfill.mjs +0 -0
- package/bin/check-doc-runtime-claims.mjs +0 -0
- package/bin/check-docs-substrings.mjs +73 -0
- package/bin/check-everything-mirror.mjs +0 -0
- package/bin/check-routing-targets.mjs +0 -0
- package/bin/check-scripts-citation-drift.mjs +210 -0
- package/bin/check-skill-count.mjs +110 -0
- package/bin/check-skill-law-tag.mjs +0 -0
- package/bin/check-skill-mirror.mjs +0 -0
- package/bin/check-skill-tiers.mjs +0 -0
- package/bin/check-test-imports-only.mjs +126 -0
- package/bin/check-third-party-shape.mjs +0 -0
- package/bin/companion-preference-status.mjs +231 -0
- package/bin/gateguard-clear.mjs +53 -0
- package/bin/generate-plugin-manifests.mjs +7 -1
- package/bin/harvest-friction.mjs +0 -0
- package/bin/hook-stats.mjs +0 -0
- package/bin/install.mjs +182 -26
- package/bin/lint-transcript.mjs +0 -0
- package/bin/mcp-server.mjs +215 -2
- package/bin/observe.mjs +0 -0
- package/bin/pre-commit-block-strays.sh +0 -0
- package/bin/refresh-third-party.mjs +315 -313
- package/bin/unified-cli.mjs +0 -0
- package/commands/audit.md +34 -0
- package/commands/companion-preference.md +58 -0
- package/commands/discipline.md +14 -0
- package/commands/distill.md +39 -0
- package/commands/goal-check.md +53 -0
- package/commands/grill-me.md +40 -0
- package/commands/grill-with-docs.md +38 -0
- package/commands/handoff.md +42 -0
- package/commands/proceed-with-the-recommendation.md +20 -0
- package/commands/recall.md +49 -0
- package/commands/reconcile.md +47 -0
- package/commands/superpowers.md +2 -2
- package/commands/verify-install.md +55 -0
- package/hooks/companion-preference.mjs +190 -0
- package/hooks/gateguard.mjs +60 -25
- package/hooks/goal-drift-stop.mjs +183 -0
- package/hooks/observe.sh +15 -1
- package/hooks/route-prompt.mjs +180 -0
- package/hooks/route-table.json +35 -0
- package/hooks/three-section-close.mjs +134 -132
- package/lib/cli-anything.mjs +0 -0
- package/lib/compound-engineering.mjs +0 -0
- package/lib/gateguard-state.mjs +54 -2
- package/lib/goal-drift-gate.mjs +50 -0
- package/lib/goal-state.mjs +285 -0
- package/lib/observe-event.mjs +0 -0
- package/lib/plugin-metadata.mjs +126 -12
- package/lib/pm-marketplace.mjs +0 -0
- package/lib/pm-skills.mjs +0 -0
- package/lib/recall-index.mjs +175 -0
- package/lib/resolve-home-dir.mjs +0 -0
- package/lib/skill-distill.mjs +222 -0
- package/lib/skill-tiers.mjs +0 -0
- package/lib/unified-plugin.mjs +0 -0
- package/llms.txt +1 -1
- package/package.json +11 -7
- package/plugins/beginner.json +8 -3
- package/plugins/continuous-improvement/.claude-plugin/marketplace.json +2 -2
- package/plugins/continuous-improvement/.claude-plugin/plugin.json +2 -2
- package/plugins/continuous-improvement/agents/README.md +2 -2
- package/plugins/continuous-improvement/bin/backfill.mjs +0 -0
- package/plugins/continuous-improvement/bin/gateguard-clear.mjs +53 -0
- package/plugins/continuous-improvement/bin/mcp-server.mjs +215 -2
- package/plugins/continuous-improvement/bin/observe.mjs +0 -0
- package/plugins/continuous-improvement/commands/audit.md +34 -0
- package/plugins/continuous-improvement/commands/companion-preference.md +58 -0
- package/plugins/continuous-improvement/commands/discipline.md +14 -0
- package/plugins/continuous-improvement/commands/distill.md +39 -0
- package/plugins/continuous-improvement/commands/goal-check.md +53 -0
- package/plugins/continuous-improvement/commands/grill-me.md +40 -0
- package/plugins/continuous-improvement/commands/grill-with-docs.md +38 -0
- package/plugins/continuous-improvement/commands/handoff.md +42 -0
- package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +20 -0
- package/plugins/continuous-improvement/commands/recall.md +49 -0
- package/plugins/continuous-improvement/commands/reconcile.md +47 -0
- package/plugins/continuous-improvement/commands/superpowers.md +2 -2
- package/plugins/continuous-improvement/commands/verify-install.md +55 -0
- package/plugins/continuous-improvement/hooks/companion-preference.mjs +190 -0
- package/plugins/continuous-improvement/hooks/gateguard.mjs +60 -25
- package/plugins/continuous-improvement/hooks/goal-drift-stop.mjs +183 -0
- package/plugins/continuous-improvement/hooks/hooks.json +18 -2
- package/plugins/continuous-improvement/hooks/observe.sh +15 -1
- package/plugins/continuous-improvement/hooks/route-prompt.mjs +180 -0
- package/plugins/continuous-improvement/hooks/route-table.json +35 -0
- package/plugins/continuous-improvement/hooks/three-section-close.mjs +134 -132
- package/plugins/continuous-improvement/lib/gateguard-state.mjs +137 -0
- package/plugins/continuous-improvement/lib/goal-drift-gate.mjs +50 -0
- package/plugins/continuous-improvement/lib/goal-state.mjs +285 -0
- package/plugins/continuous-improvement/lib/observe-event.mjs +0 -0
- package/plugins/continuous-improvement/lib/plugin-metadata.mjs +126 -12
- package/plugins/continuous-improvement/lib/recall-index.mjs +175 -0
- package/plugins/continuous-improvement/lib/resolve-home-dir.mjs +0 -0
- package/plugins/continuous-improvement/lib/skill-distill.mjs +222 -0
- package/plugins/continuous-improvement/skills/README.md +8 -0
- package/plugins/continuous-improvement/skills/audit/SKILL.md +73 -0
- package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +13 -17
- package/plugins/continuous-improvement/skills/gateguard/SKILL.md +36 -17
- package/plugins/continuous-improvement/skills/goal-monitor/SKILL.md +81 -0
- package/plugins/continuous-improvement/skills/grill-me/SKILL.md +66 -0
- package/plugins/continuous-improvement/skills/grill-with-docs/SKILL.md +252 -0
- package/plugins/continuous-improvement/skills/handoff/SKILL.md +59 -0
- package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +1 -1
- package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +82 -6
- package/plugins/continuous-improvement/skills/ralph/SKILL.md +1 -0
- package/plugins/continuous-improvement/skills/recall/SKILL.md +50 -0
- package/plugins/continuous-improvement/skills/reconcile/SKILL.md +80 -0
- package/plugins/continuous-improvement/skills/recovery-classification/SKILL.md +1 -0
- package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +1 -0
- package/plugins/continuous-improvement/skills/skill-distillation/SKILL.md +57 -0
- package/plugins/continuous-improvement/skills/state-reconciliation/SKILL.md +1 -0
- package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +1 -0
- package/plugins/continuous-improvement/skills/superpowers/SKILL.md +76 -2
- package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +1 -1
- package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +28 -20
- package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +1 -0
- package/plugins/continuous-improvement/skills/workspace-surface-audit/SKILL.md +1 -1
- package/plugins/continuous-improvement/skills/worktree-safety/SKILL.md +3 -2
- package/plugins/expert.json +27 -2
- package/skills/README.md +3 -0
- package/skills/audit.md +73 -0
- package/skills/deploy-receipt.md +13 -17
- package/skills/gateguard.md +36 -17
- package/skills/goal-monitor.md +81 -0
- package/skills/grill-me.md +66 -0
- package/skills/grill-with-docs.md +252 -0
- package/skills/handoff.md +59 -0
- package/skills/para-memory-files.md +1 -1
- package/skills/proceed-with-the-recommendation.md +82 -6
- package/skills/ralph.md +1 -0
- package/skills/recall.md +50 -0
- package/skills/reconcile.md +80 -0
- package/skills/recovery-classification.md +1 -0
- package/skills/safety-guard.md +1 -0
- package/skills/skill-distillation.md +57 -0
- package/skills/state-reconciliation.md +1 -0
- package/skills/strategic-compact.md +1 -0
- package/skills/superpowers.md +76 -2
- package/skills/token-budget-advisor.md +1 -1
- package/skills/verification-loop.md +28 -20
- package/skills/wild-risa-balance.md +1 -0
- package/skills/workspace-surface-audit.md +1 -1
- package/skills/worktree-safety.md +3 -2
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"plugins": [
|
|
8
8
|
{
|
|
9
9
|
"name": "continuous-improvement",
|
|
10
|
-
"description": "Stops Claude Code from skipping research, claiming 'done' without verifying, and repeating yesterday's mistakes. The 7 Laws of AI Agent Discipline —
|
|
11
|
-
"version": "3.
|
|
10
|
+
"description": "Stops Claude Code from skipping research, claiming 'done' without verifying, and repeating yesterday's mistakes. The 7 Laws of AI Agent Discipline — 25 bundled skills, gating hooks, the Mulahazah auto-leveling instinct engine, and a GitHub Action transcript linter.",
|
|
11
|
+
"version": "3.11.0",
|
|
12
12
|
"source": "./plugins/continuous-improvement",
|
|
13
13
|
"author": {
|
|
14
14
|
"name": "naimkatiman"
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,67 @@ All notable changes to this skill are documented here.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.11.0] — 2026-06-07
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **In-harness GateGuard clearance: `ci_gateguard_clear` + `bin/gateguard-clear.mjs`** — after presenting the facts, clear the gate with the `ci_gateguard_clear` MCP tool (available in beginner *and* expert mode, since the gate fires for every install) or the `gateguard-clear.mjs` CLI over the hook-allowed Bash route, instead of hand-writing the session-state JSON. Both take one or more file paths and record clearance through the shared canonical writer; the CLI accepts `--state <gateguard-session.json>` to target the exact file the block reason prints.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **Landing page rebuilt as a Blueprint spec-sheet on the `continuous-improvement.dev` domain** — `docs/landing/index.html` is now a warm-paper editorial spec-sheet (OKLCH palette, one safety-vermilion accent, Space Grotesk + JetBrains Mono, asymmetric hero, the 7 Laws rendered as numbered clauses, enforcement zig-zag), replacing the previous dark/purple/emoji page. The 7-Law copy is pulled verbatim from `commands/discipline.md`. A `docs/landing/CNAME` plus updated `homepage`, canonical URL, and README link point the GitHub Pages site at the `continuous-improvement.dev` custom domain.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **GateGuard block reason now points at a clearance path that works on Claude Code** — the runtime hook told the agent to retry with `_gateguard_facts_presented: true`, but Claude Code's strict tool schema (`additionalProperties: false`) rejects that extra param with `InputValidationError` before the hook runs, leaving the first Edit/Write per file unclearable through the file tools. The block reason and the skill's "Honor system" note now lead with the portable route — record clearance in the session state file via a non-destructive Bash write — and keep the inline flag as a secondary path for harnesses that forward unknown tool params. No behavior change to the gate itself.
|
|
22
|
+
- **GateGuard clearance now matches regardless of path form** — the hook and every clearance helper canonicalize the project root and per-file keys (lowercase drive letter, `\`→`/`, strip trailing slash), so a clearance recorded by one process (e.g. the MCP server, which resolves the root via git-toplevel `D:/…`) is seen by the hook (which resolves via `CLAUDE_PROJECT_DIR` `d:/…`). This removes the drive-case / separator mismatch that previously forced seeding every path variant across candidate session dirs by hand. `lib/gateguard-state.mjs` is now bundled into `plugins/continuous-improvement/` (the bundled hook and `mcp-server.mjs` both import it).
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## [3.10.0] — 2026-06-03
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **Installer now persists cleanup-only hook filtering** — `src/bin/install.mts` now writes `settings.json` when it strips broken legacy observe/session hooks even if the clean installer hook was already present, so coexistence cases no longer leave stale legacy commands behind. Regression coverage now seeds a clean observe hook alongside a broken legacy one and verifies the broken entry disappears while the clean one remains once.
|
|
31
|
+
- **Installer now clones hook entries per target bucket** — the observe/session hook entries are now constructed inside each loop iteration instead of reusing one object across `PreToolUse`/`PostToolUse` or `SessionStart`/`SessionEnd`, so a future mutation in one bucket can't silently leak into the paired bucket.
|
|
32
|
+
- **GateGuard MultiEdit docs now match runtime behavior** — the skill docs no longer describe MultiEdit as `edits[0].file_path` V1; they now document the per-file gate that blocks mixed-clearance batches until every edited path is cleared or facts are presented, and the runtime keeps the 50-file cap intact even for multi-file batches while naming the full batch in the block reason.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## [3.9.2] — 2026-05-10
|
|
37
|
+
|
|
38
|
+
Manifest-derivation patch. One fix plus the release cut.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- **Manifests track the package version automatically** (PR #122) — `VERSION` in `src/lib/plugin-metadata.mts` is now derived from `package.json` at build time instead of being a hand-maintained constant. `npm run build` regenerates `marketplace.json` and `plugin.json` with the correct version on every release without a separate manual edit. v3.9.2 was the first release cut with auto-derived manifests (PR #123).
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## [3.9.1] — 2026-05-10
|
|
47
|
+
|
|
48
|
+
First release through the tag-triggered `release.yml` pipeline. The `v3.9.0` tag was placed before PR #99 merged, so this release range also carries the feature and CI work that landed on top of the v3.8.0 dispatcher train — the substantive items are listed below; the `[3.9.0]` entry above describes only PRs #97–#99.
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- **`release.yml` tag-triggered npm publish** (PR #119) — pushing a `v*` tag now builds, verifies, and publishes to npm, with the retarget policy and cut procedure documented in `docs/RELEASING.md`. PR #120 cut v3.9.1 as the first exercise of this pipeline.
|
|
53
|
+
- **`gateguard` runtime PreToolUse hook** (PRs #106, #108) — `hooks/gateguard.mjs` ships as the runtime layer that physically blocks Edit/Write/MultiEdit and destructive Bash until fact-list investigation is presented. PR #107 added hotfix-PR mode, a synthetic-checks rung, and the insights CLAUDE.md template.
|
|
54
|
+
- **Native review-agent trio** (PR #112) — `code-reviewer`, `security-auditor`, and `test-engineer` agents in `plugins/continuous-improvement/agents/`, routed by the orchestrator during verify and review phases.
|
|
55
|
+
- **Three verification-ladder skills** (PR #117) — `state-reconciliation`, `recovery-classification`, and `worktree-safety` added as pre-dispatch invariants.
|
|
56
|
+
- **`verify:doc-runtime-claims` lint** (commit `241e8fe`) — codifies the audit-twice rule: any user-facing runtime-hook claim must carry a `hooks/<file>.mjs` anchor within ±5 lines.
|
|
57
|
+
- **Repo-root `.mcp.json`** (PR #113) — dogfoods `bin/mcp-server.mjs` from inside the repo.
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
|
|
61
|
+
- **Installer path collapse + dispatcher rewrite** (commit `bc76bfe`) — installer paths collapsed, versions synced, installer surface expanded.
|
|
62
|
+
- **`pm-skills` switched from vendored snapshot to out-of-band marketplace install** (PR #101) — product-management coverage now installs via `phuryn/pm-skills` per `docs/THIRD_PARTY.md` instead of being vendored under `third-party/`.
|
|
63
|
+
- **CI `verify-generated` check widened** (PR #99) — `git diff` path widened to `.claude-plugin bin test lib plugins`.
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- **MCP server emits NDJSON over stdio** (PR #114) — corrected the transport framing to the MCP spec (NDJSON, not LSP-style framing).
|
|
68
|
+
- **`gateguard` doc wording reverted** (commit `5eca467`) — the "runtime gate is roadmap" wording was reverted once the hook actually shipped.
|
|
69
|
+
|
|
9
70
|
---
|
|
10
71
|
|
|
11
72
|
## [3.9.0] — 2026-05-07
|
package/QUICKSTART.md
CHANGED
|
@@ -25,6 +25,8 @@ Without it, `/superpowers` still works — it falls back to inline behavior —
|
|
|
25
25
|
|
|
26
26
|
### Verify the install — two checks
|
|
27
27
|
|
|
28
|
+
**Fastest path:** restart Claude Code, then run `/verify-install` — it walks all three checks (commands loaded, gateguard fires, observation capture recording) and prints a single ✓ wired / ✗ missing line. The manual checks below are the same probes done by hand, kept here so you can see what each one proves.
|
|
29
|
+
|
|
28
30
|
**Check 1 — slash command loaded.** Quit and reopen Claude Code (slash commands only load on session start), then run:
|
|
29
31
|
|
|
30
32
|
```
|
|
@@ -97,14 +99,17 @@ This shows what the system has learned — instincts, confidence levels, and the
|
|
|
97
99
|
|
|
98
100
|
## How auto-leveling works
|
|
99
101
|
|
|
100
|
-
You don't configure anything. The system promotes itself
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
|
106
|
-
|
|
107
|
-
|
|
|
102
|
+
You don't configure anything. The system promotes itself. The unit is
|
|
103
|
+
**observations** — one per tool call, not one per session — so a single active
|
|
104
|
+
session can produce dozens. The four levels below mirror the source-of-truth
|
|
105
|
+
table in [SKILL.md](SKILL.md):
|
|
106
|
+
|
|
107
|
+
| Level | Trigger | What happens |
|
|
108
|
+
|-------|---------|-------------|
|
|
109
|
+
| CAPTURE | < 20 observations | Hooks capture tool calls silently. No behavior change. |
|
|
110
|
+
| ANALYZE | 20+ observations | Agent analyzes patterns, creates instincts (silent — you see nothing) |
|
|
111
|
+
| SUGGEST | Any instinct at 0.5–0.69 confidence | Agent suggests inline: "Consider: [action]" |
|
|
112
|
+
| AUTO-APPLY | Any instinct at 0.7+ confidence | Agent auto-applies the learned behavior |
|
|
108
113
|
|
|
109
114
|
Corrections drop instinct confidence. Unused instincts decay. The system self-corrects.
|
|
110
115
|
|
package/README.md
CHANGED
|
@@ -1,49 +1,94 @@
|
|
|
1
|
+
<!-- README landing-page structure rationale: docs/plans/2026-05-14-readme-landing-rewrite.md -->
|
|
2
|
+
|
|
1
3
|
<p align="center">
|
|
2
4
|
<img src="assets/combined.gif" alt="Before vs After — The 7 Laws of AI Agent Discipline" width="700" />
|
|
3
5
|
</p>
|
|
4
6
|
|
|
5
|
-
<h1 align="center">
|
|
7
|
+
<h1 align="center">A seatbelt for Claude Code</h1>
|
|
6
8
|
|
|
7
9
|
<p align="center">
|
|
8
|
-
<b>
|
|
10
|
+
<b>Research first. Edit safely. Verify before done. Remember what worked.</b>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<i>The 7 Laws of AI Agent Discipline — runtime hooks, enforcement skills, and project memory.</i>
|
|
9
15
|
</p>
|
|
10
16
|
|
|
11
17
|
<p align="center">
|
|
12
18
|
<a href="https://www.npmjs.com/package/continuous-improvement"><img src="https://img.shields.io/npm/v/continuous-improvement" alt="npm"></a>
|
|
13
19
|
<a href="https://docs.anthropic.com/en/docs/claude-code"><img src="https://img.shields.io/badge/Claude%20Code-skill-blueviolet" alt="Claude Code"></a>
|
|
20
|
+
<a href="https://github.com/marketplace/actions/ai-agent-discipline-linter"><img src="https://img.shields.io/badge/GitHub%20Action-marketplace-blue" alt="GitHub Action"></a>
|
|
14
21
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a>
|
|
15
22
|
<a href="test/"><img src="https://img.shields.io/badge/tests-passing-brightgreen" alt="tests"></a>
|
|
16
23
|
</p>
|
|
17
24
|
|
|
18
25
|
<p align="center">
|
|
19
|
-
<b>New here?</b> → <a href="QUICKSTART.md">QUICKSTART.md</a> (2 minutes)
|
|
26
|
+
<b>New here?</b> → <a href="QUICKSTART.md">QUICKSTART.md</a> (2 minutes) · <a href="https://continuous-improvement.dev">continuous-improvement.dev</a>
|
|
20
27
|
</p>
|
|
21
28
|
|
|
29
|
+
> **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 physically blocks `Edit` / `Write` / destructive `Bash` until the agent has done the work.
|
|
30
|
+
|
|
22
31
|
---
|
|
23
32
|
|
|
24
|
-
##
|
|
33
|
+
## What this does
|
|
34
|
+
|
|
35
|
+
Claude Code is powerful but skips the boring discipline: it edits before reading, guesses instead of checking, stacks five concerns into one commit, and says "done" without running tests. Continuous Improvement adds three layers that stop that:
|
|
36
|
+
|
|
37
|
+
1. **Before an edit** — [`gateguard`](skills/gateguard.md) ships as a `PreToolUse` hook (`hooks/gateguard.mjs`) that physically blocks `Edit` / `Write` / `MultiEdit` and destructive `Bash` until the agent presents a fact-list investigation.
|
|
38
|
+
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
|
+
3. **After work** — `/seven-laws` reflection plus the Mulahazah instinct engine capture lessons so the same mistake does not repeat next session.
|
|
40
|
+
|
|
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
|
+
---
|
|
44
|
+
|
|
45
|
+
## Before and after
|
|
46
|
+
|
|
47
|
+
Without Continuous Improvement, "fix the login redirect bug" looks like this:
|
|
48
|
+
|
|
49
|
+
> Claude edits `Login.tsx`, `LoginForm.tsx`, `useAuth.ts`, `authRouter.ts`, `redirects.ts`, and `useNavigate.ts` — six files, no plan, no investigation. Says "done". The redirect still loops. You roll back six files.
|
|
50
|
+
|
|
51
|
+
With Continuous Improvement, the same prompt is forced through the gate:
|
|
52
|
+
|
|
53
|
+
> `gateguard` blocks the first `Edit` until Claude presents a fact list. Claude reads `useAuth.ts`, finds the existing `redirectAfterLogin` helper, traces *why* the redirect loops (a stale `from` query param), and edits one line in one file. `verification-loop` runs the tests. The reply names the file, the line, the cause.
|
|
54
|
+
|
|
55
|
+
Same agent. Same model. Different discipline.
|
|
56
|
+
|
|
57
|
+
---
|
|
25
58
|
|
|
26
|
-
|
|
59
|
+
## Who this is for
|
|
27
60
|
|
|
28
|
-
|
|
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 |
|
|
61
|
+
Use this if you:
|
|
35
62
|
|
|
36
|
-
|
|
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
|
|
37
67
|
|
|
38
|
-
|
|
68
|
+
Skip it if you:
|
|
39
69
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
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.
|
|
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
|
|
45
74
|
|
|
46
|
-
The
|
|
75
|
+
(The runtime gate is `hooks/gateguard.mjs`; full mechanics in [How enforcement works](#how-enforcement-works) below.)
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## The problem this solves
|
|
80
|
+
|
|
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.
|
|
82
|
+
|
|
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 | Law 1 (Research) | [`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), [`para-memory-files`](skills/para-memory-files.md), Mulahazah instinct engine |
|
|
90
|
+
|
|
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.
|
|
47
92
|
|
|
48
93
|
---
|
|
49
94
|
|
|
@@ -86,7 +131,7 @@ You should see Claude **blocked** by the bundled `gateguard` PreToolUse hook (`h
|
|
|
86
131
|
|
|
87
132
|
The 7 Laws are enforced at **two layers**:
|
|
88
133
|
|
|
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.
|
|
134
|
+
- **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. A second runtime hook, `goal-drift-stop` (`hooks/goal-drift-stop.mjs`), fires on `Stop`: it scores each turn against the stated `## Goal` and, on a substantive wrap-up that has drifted off-goal, warns by default (or re-prompts under `CLAUDE_GOAL_DRIFT_GATE=block`) — so a drifted session can't quietly declare "done". Fail-open.
|
|
90
135
|
- **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.
|
|
91
136
|
|
|
92
137
|
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.
|
|
@@ -125,6 +170,7 @@ The framework has documented operator-level modes that change hook behavior with
|
|
|
125
170
|
| Env var | Effect | How to set |
|
|
126
171
|
|---|---|---|
|
|
127
172
|
| `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). |
|
|
173
|
+
| `CLAUDE_GOAL_DRIFT_GATE` | `goal-drift-stop.mjs` (a `Stop` hook) scores each turn's activity against the `## Goal` in `task_plan.md` and acts on drift. `warn` (default) prints a one-line stderr notice and never blocks; `block` re-prompts a substantive wrap-up that has drifted off-goal so the goal gates the close; `off` disables it. Reads the same observation feed as Mulahazah; fails open on any error. | bash/zsh: `export CLAUDE_GOAL_DRIFT_GATE=block` in `~/.bashrc` / `~/.zshrc`. PowerShell: `$env:CLAUDE_GOAL_DRIFT_GATE='block'` (session) or `[Environment]::SetEnvironmentVariable('CLAUDE_GOAL_DRIFT_GATE','block','User')` (persistent). |
|
|
128
174
|
|
|
129
175
|
---
|
|
130
176
|
|
|
@@ -148,19 +194,13 @@ Research -> Plan -> Execute (one thing) -> Verify -> Reflect -> Learn -> Iterate
|
|
|
148
194
|
<img src="assets/diagram-7-laws-loop.jpg" alt="The 7 Laws of AI Agent Discipline — circular workflow loop" width="820" />
|
|
149
195
|
</p>
|
|
150
196
|
|
|
151
|
-
Full spec, reflection-block format, and anti-examples: [SKILL.md](SKILL.md).
|
|
197
|
+
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).
|
|
152
198
|
|
|
153
199
|
---
|
|
154
200
|
|
|
155
|
-
## Mulahazah:
|
|
156
|
-
|
|
157
|
-
Hooks capture every tool call. After ~20 observations, Claude analyzes patterns and creates **instincts** with confidence scores:
|
|
201
|
+
## Mulahazah: auto-leveling learning
|
|
158
202
|
|
|
159
|
-
|
|
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
|
+
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.
|
|
164
204
|
|
|
165
205
|
<p align="center">
|
|
166
206
|
<img src="assets/diagram-mulahazah-learning.jpg" alt="Mulahazah pipeline" width="820" />
|
|
@@ -179,135 +219,27 @@ Hooks capture every tool call. After ~20 observations, Claude analyzes patterns
|
|
|
179
219
|
/superpowers Law activator — route the task to the right specialist
|
|
180
220
|
/workspace-surface-audit Audit repo + MCP + env, recommend high-value skills
|
|
181
221
|
/planning-with-files Create task_plan.md, findings.md, progress.md
|
|
222
|
+
/grill-me Interview-mode alignment (one question at a time)
|
|
223
|
+
/grill-with-docs Grill-me with persistent outcomes — updates CONTEXT.md + ADRs inline
|
|
224
|
+
/handoff End-of-session compaction into mktemp brief for the next agent
|
|
182
225
|
/discipline Quick reference card of the 7 Laws
|
|
226
|
+
/verify-install One-shot post-install check — commands, gateguard, observe
|
|
183
227
|
/dashboard Visual instinct health dashboard
|
|
228
|
+
/companion-preference Inspect companion-preference hook telemetry
|
|
184
229
|
/ralph Autonomous PRD story-by-story loop
|
|
185
|
-
/learn-eval Capture session patterns into new skills (
|
|
186
|
-
/harvest Extract reusable patterns from session friction
|
|
230
|
+
/learn-eval Capture session patterns into new skills (needs observation history)
|
|
231
|
+
/harvest Extract reusable patterns from session friction (needs observation history)
|
|
187
232
|
/release-train Coordinate a multi-PR release sequence
|
|
188
233
|
/swarm Fan-out coordination across parallel sub-agents
|
|
189
234
|
```
|
|
190
235
|
|
|
191
|
-
All
|
|
236
|
+
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).
|
|
192
237
|
|
|
193
238
|
---
|
|
194
239
|
|
|
195
|
-
##
|
|
240
|
+
## Skills
|
|
196
241
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## All 14 Skills
|
|
202
|
-
|
|
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`.
|
|
204
|
-
|
|
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 |
|
|
224
|
-
|
|
225
|
-
</details>
|
|
226
|
-
|
|
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).
|
|
228
|
-
|
|
229
|
-
### Beginner gets — by default
|
|
230
|
-
|
|
231
|
-
Tier 1 + featured + companion. Auto-installed when you run the plugin install commands above. No flags, no choices.
|
|
232
|
-
|
|
233
|
-
### Expert gets — additionally
|
|
234
|
-
|
|
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.
|
|
236
|
-
|
|
237
|
-
### Drop-in single-file install
|
|
238
|
-
|
|
239
|
-
Want one skill without the whole plugin? Copy the `.md` file straight into `~/.claude/skills/<name>/SKILL.md`:
|
|
240
|
-
|
|
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
|
-
```
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## Evolution — adding a new skill
|
|
251
|
-
|
|
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.
|
|
253
|
-
|
|
254
|
-
### The 5-step recipe
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
# 1. Create the source file
|
|
258
|
-
touch skills/<your-skill>.md
|
|
259
|
-
```
|
|
260
|
-
|
|
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
|
-
---
|
|
268
|
-
```
|
|
269
|
-
|
|
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
|
|
274
|
-
|
|
275
|
-
# 4. Run all 6 verify lints — must all pass
|
|
276
|
-
npm run verify:all
|
|
277
|
-
|
|
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"
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### What the build does for you automatically
|
|
285
|
-
|
|
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)
|
|
289
|
-
|
|
290
|
-
### What the lints enforce so you cannot ship a half-wired skill
|
|
291
|
-
|
|
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 |
|
|
301
|
-
|
|
302
|
-
### When to fold a new external skill into the 7 Laws
|
|
303
|
-
|
|
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.
|
|
305
|
-
|
|
306
|
-
### What is *not* automated (the honest limits)
|
|
307
|
-
|
|
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.
|
|
242
|
+
The plugin ships **25 skills** — 1 core + 1 featured + 6 tier-1 + 14 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 26th skill: [CONTRIBUTING.md § Evolution — adding a new skill](CONTRIBUTING.md#evolution--adding-a-new-skill).
|
|
311
243
|
|
|
312
244
|
---
|
|
313
245
|
|
|
@@ -322,9 +254,7 @@ Lint agent behavior in CI. Detects skipped laws.
|
|
|
322
254
|
strict: true
|
|
323
255
|
```
|
|
324
256
|
|
|
325
|
-
|
|
326
|
-
|
|
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>`.
|
|
257
|
+
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>`. The `@v3` floating-tag retarget policy lives in [CONTRIBUTING.md § Release](CONTRIBUTING.md#release).
|
|
328
258
|
|
|
329
259
|
---
|
|
330
260
|
|
|
@@ -356,7 +286,7 @@ Every skill description leads with `Enforces Law N (...)` so the discipline tag
|
|
|
356
286
|
|
|
357
287
|
Workflows from this repo, applied to real open-source contributions:
|
|
358
288
|
|
|
359
|
-
### pm-skills (product-on-purpose,
|
|
289
|
+
### pm-skills (product-on-purpose, Apache 2.0)
|
|
360
290
|
|
|
361
291
|
[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
292
|
|
|
@@ -368,9 +298,10 @@ Authored end-to-end with `/superpowers` and `/proceed-with-the-recommendation`:
|
|
|
368
298
|
|
|
369
299
|
- [QUICKSTART.md](QUICKSTART.md) — 2-minute setup
|
|
370
300
|
- [SKILL.md](SKILL.md) — full 7 Laws spec
|
|
301
|
+
- [docs/skills.md](docs/skills.md) — full 25-skill catalog
|
|
371
302
|
- [examples/](examples/) — bug fix, feature build, refactor walkthroughs
|
|
372
303
|
- [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
|
|
304
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md) — architecture, repo internals, adding a new skill
|
|
374
305
|
- [SECURITY.md](SECURITY.md)
|
|
375
306
|
|
|
376
307
|
MIT.
|
package/bin/backfill.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -177,6 +177,48 @@ export const DOCS_ASSERTIONS = [
|
|
|
177
177
|
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "## Stacked-PR Plan Precondition (≥3 files)", source: "docs-substrings-manifest:superpowers-stacked-pr-precondition" },
|
|
178
178
|
{ file: "skills/superpowers.md", pattern: "Per-PR table", source: "docs-substrings-manifest:superpowers-stacked-pr-precondition" },
|
|
179
179
|
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "Per-PR table", source: "docs-substrings-manifest:superpowers-stacked-pr-precondition" },
|
|
180
|
+
// superpowers Companion-Preference Override — locked 2026-05-13 (PR 1 of dispatcher-bias train).
|
|
181
|
+
// The dispatcher gained an opt-in settings key (~/.claude/settings.json →
|
|
182
|
+
// continuous_improvement.companion_preference: "ci-first" | "companions-first" | "strict-companions")
|
|
183
|
+
// that lets an operator who installed a companion plugin promote it over the CI-bundled default.
|
|
184
|
+
// Each assertion below catches a specific class of regression:
|
|
185
|
+
// - "## Companion-Preference Override" → removing the whole override section
|
|
186
|
+
// - "companion_preference" → renaming or moving the settings key
|
|
187
|
+
// - "strict-companions" → losing the hard-halt variant
|
|
188
|
+
{ file: "skills/superpowers.md", pattern: "## Companion-Preference Override", source: "docs-substrings-manifest:superpowers-companion-preference-override" },
|
|
189
|
+
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "## Companion-Preference Override", source: "docs-substrings-manifest:superpowers-companion-preference-override" },
|
|
190
|
+
{ file: "skills/superpowers.md", pattern: "companion_preference", source: "docs-substrings-manifest:superpowers-companion-preference-override" },
|
|
191
|
+
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "companion_preference", source: "docs-substrings-manifest:superpowers-companion-preference-override" },
|
|
192
|
+
{ file: "skills/superpowers.md", pattern: "strict-companions", source: "docs-substrings-manifest:superpowers-companion-preference-override" },
|
|
193
|
+
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "strict-companions", source: "docs-substrings-manifest:superpowers-companion-preference-override" },
|
|
194
|
+
// superpowers Runtime Enforcement subsection — locked 2026-05-13 (PR 3 of dispatcher-bias train).
|
|
195
|
+
// The Companion-Preference Override moved from documented-only to runtime-enforced via
|
|
196
|
+
// hooks/companion-preference.mjs (PreToolUse). The "### Runtime enforcement" subsection
|
|
197
|
+
// names the hook file as the verify:doc-runtime-claims anchor and describes the per-mode
|
|
198
|
+
// decision contract. Each assertion catches a specific class of regression:
|
|
199
|
+
// - "### Runtime enforcement" → removing the whole subsection
|
|
200
|
+
// - "hooks/companion-preference.mjs" → losing the hook anchor (also satisfies doc-runtime-claims)
|
|
201
|
+
// - "fails open" → losing the no-block-on-bug invariant
|
|
202
|
+
{ file: "skills/superpowers.md", pattern: "### Runtime enforcement", source: "docs-substrings-manifest:superpowers-runtime-enforcement" },
|
|
203
|
+
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "### Runtime enforcement", source: "docs-substrings-manifest:superpowers-runtime-enforcement" },
|
|
204
|
+
{ file: "skills/superpowers.md", pattern: "hooks/companion-preference.mjs", source: "docs-substrings-manifest:superpowers-runtime-enforcement" },
|
|
205
|
+
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "hooks/companion-preference.mjs", source: "docs-substrings-manifest:superpowers-runtime-enforcement" },
|
|
206
|
+
{ file: "skills/superpowers.md", pattern: "fails open", source: "docs-substrings-manifest:superpowers-runtime-enforcement" },
|
|
207
|
+
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "fails open", source: "docs-substrings-manifest:superpowers-runtime-enforcement" },
|
|
208
|
+
// superpowers Telemetry subsection — locked 2026-05-14 (PR 4 of dispatcher-bias train).
|
|
209
|
+
// The hook gained a JSONL telemetry writer at ~/.claude/instincts/<hash>/companion-preference.jsonl
|
|
210
|
+
// that fires under every mode including ci-first (which writes `observation` shadow rows). The
|
|
211
|
+
// "### Telemetry" subsection documents the JSONL path and the four-value action enum. Each
|
|
212
|
+
// assertion catches a specific class of regression:
|
|
213
|
+
// - "### Telemetry" → removing the whole subsection
|
|
214
|
+
// - "companion-preference.jsonl" → renaming the JSONL file
|
|
215
|
+
// - "observation" → losing the ci-first shadow row that makes default-flip decisions evidence-driven
|
|
216
|
+
{ file: "skills/superpowers.md", pattern: "### Telemetry", source: "docs-substrings-manifest:superpowers-telemetry-jsonl" },
|
|
217
|
+
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "### Telemetry", source: "docs-substrings-manifest:superpowers-telemetry-jsonl" },
|
|
218
|
+
{ file: "skills/superpowers.md", pattern: "companion-preference.jsonl", source: "docs-substrings-manifest:superpowers-telemetry-jsonl" },
|
|
219
|
+
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "companion-preference.jsonl", source: "docs-substrings-manifest:superpowers-telemetry-jsonl" },
|
|
220
|
+
{ file: "skills/superpowers.md", pattern: "`observation`", source: "docs-substrings-manifest:superpowers-telemetry-jsonl" },
|
|
221
|
+
{ file: "plugins/continuous-improvement/skills/superpowers/SKILL.md", pattern: "`observation`", source: "docs-substrings-manifest:superpowers-telemetry-jsonl" },
|
|
180
222
|
// verification-loop per-project ladder — locked 2026-05-07 (PR C of second-release train).
|
|
181
223
|
// Phase 0 (Ladder Resolution) was added so Phases 1–6 read the project's actual build/typecheck/
|
|
182
224
|
// lint/test/security/deploy_receipt invocations from .claude/verify-ladder.json (or sniff /
|
|
@@ -253,6 +295,37 @@ export const DOCS_ASSERTIONS = [
|
|
|
253
295
|
{ file: "plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md", pattern: `The "no" escape valve (both tiers)`, source: "wild-risa-tiers.test.mts" },
|
|
254
296
|
{ file: "skills/proceed-with-the-recommendation.md", pattern: "explicit handoff signal", source: "wild-risa-tiers.test.mts" },
|
|
255
297
|
{ file: "plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md", pattern: "explicit handoff signal", source: "wild-risa-tiers.test.mts" },
|
|
298
|
+
// proceed-with-the-recommendation --once fast-path mode — locked 2026-05-13 (PR 2 of dispatcher-bias train).
|
|
299
|
+
// The orchestrator gained an opt-in mode that runs Phase 1 + Phase 3 + Phase 4 only on single-item
|
|
300
|
+
// safe-tagged confirmations, skipping P-MAG, Plan, Reflect, and the three-section close. Hard
|
|
301
|
+
// preconditions refuse --once and fall back to the full flow if list size != 1, item is not safe,
|
|
302
|
+
// it touches > 3 files / > 150 LOC, hits restricted dirs, or is destructive. Each assertion below
|
|
303
|
+
// catches a specific class of regression:
|
|
304
|
+
// - "## Fast-Path: `--once` Mode" → removing the whole section
|
|
305
|
+
// - "Refuse --once if any fail"-shaped → losing the precondition gate (matched via "--once refused:")
|
|
306
|
+
// - "Phase 0 — P-MAG" + "**Skipped.**" → losing the explicit phase-status table (matched via "Skipped.** Reason: single-item")
|
|
307
|
+
{ file: "skills/proceed-with-the-recommendation.md", pattern: "## Fast-Path: `--once` Mode", source: "docs-substrings-manifest:proceed-once-mode" },
|
|
308
|
+
{ file: "plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md", pattern: "## Fast-Path: `--once` Mode", source: "docs-substrings-manifest:proceed-once-mode" },
|
|
309
|
+
{ file: "skills/proceed-with-the-recommendation.md", pattern: "--once refused:", source: "docs-substrings-manifest:proceed-once-mode" },
|
|
310
|
+
{ file: "plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md", pattern: "--once refused:", source: "docs-substrings-manifest:proceed-once-mode" },
|
|
311
|
+
{ file: "skills/proceed-with-the-recommendation.md", pattern: "Skipped.** Reason: single-item", source: "docs-substrings-manifest:proceed-once-mode" },
|
|
312
|
+
{ file: "plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md", pattern: "Skipped.** Reason: single-item", source: "docs-substrings-manifest:proceed-once-mode" },
|
|
313
|
+
{ file: "commands/proceed-with-the-recommendation.md", pattern: "Fast-path: `--once` mode", source: "docs-substrings-manifest:proceed-once-mode" },
|
|
314
|
+
{ file: "plugins/continuous-improvement/commands/proceed-with-the-recommendation.md", pattern: "Fast-path: `--once` mode", source: "docs-substrings-manifest:proceed-once-mode" },
|
|
315
|
+
// /companion-preference status reader — locked 2026-05-14 (PR 5 of dispatcher-bias train).
|
|
316
|
+
// The reader CLI (bin/companion-preference-status.mjs) and slash command (commands/companion-preference.md)
|
|
317
|
+
// turn the JSONL telemetry from PR #138 into a per-skill aggregation report. The slash command must
|
|
318
|
+
// expose the frontmatter name, the canonical CLI invocation, and the documented --json subcommand.
|
|
319
|
+
// Each assertion catches a specific class of regression:
|
|
320
|
+
// - "name: companion-preference" → renaming the slash command
|
|
321
|
+
// - "companion-preference-status.mjs" → renaming the CLI entry point
|
|
322
|
+
// - "## Subcommands" → losing the documented surface (--json, --days, --all)
|
|
323
|
+
{ file: "commands/companion-preference.md", pattern: "name: companion-preference", source: "docs-substrings-manifest:companion-preference-status-reader" },
|
|
324
|
+
{ file: "plugins/continuous-improvement/commands/companion-preference.md", pattern: "name: companion-preference", source: "docs-substrings-manifest:companion-preference-status-reader" },
|
|
325
|
+
{ file: "commands/companion-preference.md", pattern: "companion-preference-status.mjs", source: "docs-substrings-manifest:companion-preference-status-reader" },
|
|
326
|
+
{ file: "plugins/continuous-improvement/commands/companion-preference.md", pattern: "companion-preference-status.mjs", source: "docs-substrings-manifest:companion-preference-status-reader" },
|
|
327
|
+
{ file: "commands/companion-preference.md", pattern: "## Subcommands", source: "docs-substrings-manifest:companion-preference-status-reader" },
|
|
328
|
+
{ file: "plugins/continuous-improvement/commands/companion-preference.md", pattern: "## Subcommands", source: "docs-substrings-manifest:companion-preference-status-reader" },
|
|
256
329
|
];
|
|
257
330
|
export function checkAssertions(repoRoot, assertions = DOCS_ASSERTIONS) {
|
|
258
331
|
const fileCache = new Map();
|
|
File without changes
|
|
File without changes
|