continuous-improvement 3.9.2 → 3.12.3
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 +3 -3
- package/CHANGELOG.md +95 -0
- package/LICENSE +21 -21
- package/QUICKSTART.md +13 -8
- package/README.md +94 -162
- package/SKILL.md +1 -1
- package/bin/analyze.sh +161 -161
- package/bin/backfill.mjs +19 -19
- package/bin/check-docs-substrings.mjs +73 -0
- package/bin/check-scripts-citation-drift.mjs +210 -0
- package/bin/check-skill-count.mjs +110 -0
- package/bin/check-test-imports-only.mjs +126 -0
- package/bin/check-tool-count.mjs +129 -0
- package/bin/companion-preference-status.mjs +231 -0
- package/bin/gateguard-clear.mjs +53 -0
- package/bin/generate-plugin-manifests.mjs +8 -1
- package/bin/harvest-friction.mjs +1 -1
- package/bin/hook-stats.mjs +21 -21
- package/bin/install.mjs +185 -28
- package/bin/mcp-server.mjs +216 -3
- package/bin/refresh-third-party.mjs +315 -313
- package/commands/audit.md +34 -0
- package/commands/companion-preference.md +58 -0
- package/commands/continuous-improvement.md +115 -115
- package/commands/dashboard.md +56 -56
- 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/harvest.md +1 -1
- package/commands/proceed-with-the-recommendation.md +20 -0
- package/commands/recall.md +49 -0
- package/commands/reconcile.md +47 -0
- package/commands/seven-laws.md +16 -16
- package/commands/superpowers.md +3 -3
- package/commands/verify-install.md +55 -0
- package/commands/workspace-surface-audit.md +77 -77
- package/hooks/companion-preference.mjs +190 -0
- package/hooks/gateguard.mjs +72 -25
- package/hooks/goal-drift-stop.mjs +183 -0
- package/hooks/observe.sh +15 -1
- package/hooks/recall-briefing.mjs +167 -0
- package/hooks/route-prompt.mjs +180 -0
- package/hooks/route-table.json +35 -0
- package/hooks/session.sh +106 -106
- package/hooks/three-section-close.mjs +134 -132
- package/instinct-packs/go.json +58 -58
- package/instinct-packs/meta.json +16 -16
- package/instinct-packs/python.json +58 -58
- package/instinct-packs/react.json +58 -58
- package/lib/gateguard-state.mjs +54 -2
- package/lib/goal-drift-gate.mjs +50 -0
- package/lib/goal-state.mjs +285 -0
- package/lib/plugin-metadata.mjs +134 -15
- package/lib/recall-briefing.mjs +57 -0
- package/lib/recall-index.mjs +175 -0
- package/lib/skill-distill.mjs +222 -0
- package/llms.txt +2 -2
- package/package.json +12 -7
- package/plugins/beginner.json +9 -4
- package/plugins/continuous-improvement/.claude-plugin/marketplace.json +2 -2
- package/plugins/continuous-improvement/.claude-plugin/plugin.json +2 -2
- package/plugins/continuous-improvement/LICENSE +21 -21
- package/plugins/continuous-improvement/agents/README.md +3 -3
- package/plugins/continuous-improvement/bin/backfill.mjs +19 -19
- package/plugins/continuous-improvement/bin/gateguard-clear.mjs +53 -0
- package/plugins/continuous-improvement/bin/mcp-server.mjs +216 -3
- package/plugins/continuous-improvement/commands/audit.md +34 -0
- package/plugins/continuous-improvement/commands/companion-preference.md +58 -0
- package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -115
- package/plugins/continuous-improvement/commands/dashboard.md +56 -56
- 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/harvest.md +1 -1
- 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/seven-laws.md +16 -16
- package/plugins/continuous-improvement/commands/superpowers.md +3 -3
- package/plugins/continuous-improvement/commands/verify-install.md +55 -0
- package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -77
- package/plugins/continuous-improvement/hooks/companion-preference.mjs +190 -0
- package/plugins/continuous-improvement/hooks/gateguard.mjs +72 -25
- package/plugins/continuous-improvement/hooks/goal-drift-stop.mjs +183 -0
- package/plugins/continuous-improvement/hooks/hooks.json +23 -2
- package/plugins/continuous-improvement/hooks/observe.sh +15 -1
- package/plugins/continuous-improvement/hooks/recall-briefing.mjs +167 -0
- 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/session.sh +106 -106
- package/plugins/continuous-improvement/hooks/three-section-close.mjs +134 -132
- package/plugins/continuous-improvement/instinct-packs/go.json +58 -58
- package/plugins/continuous-improvement/instinct-packs/meta.json +16 -16
- package/plugins/continuous-improvement/instinct-packs/python.json +58 -58
- package/plugins/continuous-improvement/instinct-packs/react.json +58 -58
- 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/plugin-metadata.mjs +134 -15
- package/plugins/continuous-improvement/lib/recall-briefing.mjs +57 -0
- package/plugins/continuous-improvement/lib/recall-index.mjs +175 -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/continuous-improvement/SKILL.md +1 -1
- 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 +77 -3
- package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -411
- 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 +28 -3
- 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 +77 -3
- package/skills/tdd-workflow.md +411 -411
- 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": "
|
|
11
|
-
"version": "3.
|
|
10
|
+
"description": "Makes Claude Code reason harder, recall past corrections, and learn from every session so its competence compounds run over run. The Mulahazah engine turns each fix into a reusable instinct, so a lesson learned once is applied automatically next time — no re-teaching. Built on the 7 Laws of AI Agent Discipline (research, plan, verify, reflect, learn) and shipped as 25 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.12.3",
|
|
12
12
|
"source": "./plugins/continuous-improvement",
|
|
13
13
|
"author": {
|
|
14
14
|
"name": "naimkatiman"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"name": "oh-my-claudecode",
|
|
56
|
-
"description": "Multi-agent orchestration system for Claude Code —
|
|
56
|
+
"description": "Multi-agent orchestration system for Claude Code — 38 skills + 19 agents covering audit, plan, build, verify, ship, release, retrospective, and ops. Includes ralph (autonomous PRD loop), release, ultrawork, ultraqa, team, trace, visual-verdict, debug, deep-dive, deep-interview, autopilot, autoresearch. Vendored snapshot at third-party/oh-my-claudecode/ pinned to upstream SHA aacde3e (v4.13.6). Heavy overlap with continuous-improvement /ralph and /superpowers — pick per task.",
|
|
57
57
|
"version": "4.13.6",
|
|
58
58
|
"source": "./third-party/oh-my-claudecode",
|
|
59
59
|
"author": {
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,101 @@ All notable changes to this skill are documented here.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [3.12.3] — 2026-06-08
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Completed the OIDC trusted-publishing pipeline by restoring setup-node `registry-url`** — #211 had removed it to kill the dummy-token `.npmrc`, but that left npm with no registry anchor for the OIDC token exchange (`ENEEDAUTH` on 3.12.1/3.12.2). With `registry-url` back, Node 22 (#213), npm ≥ 11.5.1, and a configured trusted publisher, npm mints and uses the OIDC token. **3.12.3 is the first version actually published to npm** carrying the 3.12.0 changes (#198 positioning, #199 recall hook, #202 OIDC, #203 doc-drift, #204 tool-count); 3.12.0–3.12.2 were never published. (#215)
|
|
14
|
+
|
|
15
|
+
## [3.12.2] — 2026-06-08
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **Release workflow now runs on Node 22 so OIDC trusted publishing actually authenticates** — npm trusted publishing requires npm ≥ 11.5.1 **and Node ≥ 22.14.0** ([docs.npmjs.com/trusted-publishers](https://docs.npmjs.com/trusted-publishers)). `release.yml` ran on Node 20, below the floor, so the OIDC token exchange never engaged: the `v3.12.0` publish fell back to setup-node's dummy `.npmrc` token (`E404`) and `v3.12.1` had no auth at all (`ENEEDAUTH`). Bumping `setup-node` to Node 22 (plus #211 dropping the token-bearing `.npmrc`) completes the OIDC pipeline. **3.12.2 is the first npm artifact to carry the 3.12.0 changes** (#198 positioning, #199 recall hook, #202 OIDC pipeline, #203 doc-drift, #204 tool-count invariant); `3.12.0` and `3.12.1` were never published to npm. (#211, #213)
|
|
20
|
+
|
|
21
|
+
## [3.12.1] — 2026-06-08
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **npm release pipeline now authenticates via OIDC instead of a dummy token** — the `v3.12.0` tag publish failed with `E404` on the registry PUT: `actions/setup-node` with `registry-url` wrote an `.npmrc` carrying `_authToken=${NODE_AUTH_TOKEN}` set to its placeholder value, so npm used that dummy token for the publish instead of OIDC trusted publishing (provenance still signed, since the sigstore OIDC token is separate). Dropping `registry-url` from `release.yml` lets `npm publish --provenance` fall back to OIDC as intended. **3.12.1 is the first npm artifact to carry the 3.12.0 changes** (intelligence-amplifier positioning #198, recall-briefing hook #199, OIDC pipeline #202, doc-drift fixes #203, `verify:tool-count` invariant #204); the `3.12.0` version was never published to npm. (#211)
|
|
26
|
+
|
|
27
|
+
## [3.12.0] — 2026-06-07
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **Proactive recall-briefing hook (opt-in episodic memory)** — `hooks/recall-briefing.mjs` runs on `UserPromptSubmit`, queries the BM25 observation index in-process, and surfaces the most relevant prior corrections as a briefing before the agent acts. First capability increment of the intelligence-amplifier reframe: a lesson learned once is recalled automatically on the next related prompt instead of being re-taught. Opt-in — disabled unless wired into the hook config.
|
|
32
|
+
- **`verify:tool-count` content invariant (12th in `verify:all`)** — `bin/check-tool-count.mjs` pins MCP tool-count claims in docs and source to the generated `plugins/{expert,beginner}.json` `tools[].length`, so a count can't drift when a tool is added — the gap that let "12 tools" pass `verify:all` green in the 2026-06-07 audit. Pins four claims across `docs/skills.md`, `README.md`, `QUICKSTART.md`, and the `mcp-server` banner. Follow-up to #203 (PR #204).
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **Positioning reframed from "seatbelt" to intelligence amplifier across every user-facing surface** — the 7 Laws of AI Agent Discipline keep their names but each is reframed from a restriction into a capability the agent gains. README h1 "A seatbelt for Claude Code" → "Claude Code that gets sharper every session"; landing page title/hero/CTA, `SHARED_PLUGIN_DESCRIPTION` (the source of truth that propagates to `package.json` + all generated manifests + `llms.txt`), SKILL.md, and CONTRIBUTING.md all reframed from "Stops Claude Code from…" loss-framing to capability-led copy. Honesty held: recall stays lexical/BM25, instincts decay, GateGuard still blocks (framed as forced grounding) — no over-claiming. Plan: `docs/plans/2026-06-07-intelligence-amplifier-reframe.md`.
|
|
37
|
+
- **npm release now publishes via OIDC trusted publishing instead of `NPM_TOKEN`** — the account enforces 2FA-on-writes, which makes long-lived granular tokens hit EOTP in CI. `release.yml` upgrades npm to ≥ 11.5.1 and publishes with `npm publish --access public --provenance` (signed provenance from the OIDC claims); the `NPM_TOKEN` secret dependency is gone. See `docs/RELEASING.md` for the one-time trusted-publisher setup.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **Doc/count drift surfaced by a post-merge audit** — corrected prose/count claims that drifted from the v3.11.0 implementation and that no `verify:all` invariant covers: MCP expert surface is 18 tools (not 12); the CONTRIBUTING release checklist now defers to `docs/RELEASING.md` instead of describing the retired manual publish flow; `agents/README.md` repointed off a non-existent reference doc; the oh-my-claudecode vendored snapshot count corrected to 38 skills; `harvest` observe-path corrected to `instincts/bin/observe.mjs`; and reports/update-card test counts synced to 793.
|
|
42
|
+
|
|
43
|
+
## [3.11.0] — 2026-06-07
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
|
|
47
|
+
- **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.
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- **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.
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
|
|
55
|
+
- **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.
|
|
56
|
+
- **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).
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## [3.10.0] — 2026-06-03
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
|
|
64
|
+
- **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.
|
|
65
|
+
- **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.
|
|
66
|
+
- **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.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## [3.9.2] — 2026-05-10
|
|
71
|
+
|
|
72
|
+
Manifest-derivation patch. One fix plus the release cut.
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
|
|
76
|
+
- **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).
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## [3.9.1] — 2026-05-10
|
|
81
|
+
|
|
82
|
+
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.
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
|
|
86
|
+
- **`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.
|
|
87
|
+
- **`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.
|
|
88
|
+
- **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.
|
|
89
|
+
- **Three verification-ladder skills** (PR #117) — `state-reconciliation`, `recovery-classification`, and `worktree-safety` added as pre-dispatch invariants.
|
|
90
|
+
- **`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.
|
|
91
|
+
- **Repo-root `.mcp.json`** (PR #113) — dogfoods `bin/mcp-server.mjs` from inside the repo.
|
|
92
|
+
|
|
93
|
+
### Changed
|
|
94
|
+
|
|
95
|
+
- **Installer path collapse + dispatcher rewrite** (commit `bc76bfe`) — installer paths collapsed, versions synced, installer surface expanded.
|
|
96
|
+
- **`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/`.
|
|
97
|
+
- **CI `verify-generated` check widened** (PR #99) — `git diff` path widened to `.claude-plugin bin test lib plugins`.
|
|
98
|
+
|
|
99
|
+
### Fixed
|
|
100
|
+
|
|
101
|
+
- **MCP server emits NDJSON over stdio** (PR #114) — corrected the transport framing to the MCP spec (NDJSON, not LSP-style framing).
|
|
102
|
+
- **`gateguard` doc wording reverted** (commit `5eca467`) — the "runtime gate is roadmap" wording was reverted once the hook actually shipped.
|
|
103
|
+
|
|
9
104
|
---
|
|
10
105
|
|
|
11
106
|
## [3.9.0] — 2026-05-07
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Naim Katiman
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Naim Katiman
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
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
|
|
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):
|
|
101
106
|
|
|
102
|
-
|
|
|
103
|
-
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
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
|
|
|
@@ -125,7 +130,7 @@ Corrections drop instinct confidence. Unused instincts decay. The system self-co
|
|
|
125
130
|
|
|
126
131
|
## Expert (npx) — only if you want MCP, hooks, or instinct packs
|
|
127
132
|
|
|
128
|
-
The Beginner path above is enough for most users. Pick this only if you want the MCP tools (
|
|
133
|
+
The Beginner path above is enough for most users. Pick this only if you want the MCP tools (18 of them, including `ci_plan_init` / `ci_plan_status` for `task_plan.md`-style planning), the session hooks that feed Mulahazah, or the starter instinct packs.
|
|
129
134
|
|
|
130
135
|
Do not run both paths against the same `~/.claude/` — that produces duplicated state. Pick one and stick with it.
|
|
131
136
|
|
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">Claude Code that gets sharper every session</h1>
|
|
6
8
|
|
|
7
9
|
<p align="center">
|
|
8
|
-
<b>
|
|
10
|
+
<b>Reasons deeper. Recalls what it already solved. Verifies before "done". Keeps every lesson.</b>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<i>The 7 Laws of AI Agent Discipline — runtime hooks, instinct memory, and skills that compound what it learns.</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 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
|
+
|
|
22
31
|
---
|
|
23
32
|
|
|
24
|
-
##
|
|
33
|
+
## What this does
|
|
34
|
+
|
|
35
|
+
Claude Code is powerful but leaves intelligence on the table: 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 make it sharper:
|
|
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 intelligence.
|
|
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,14 +131,14 @@ 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.
|
|
93
138
|
|
|
94
139
|
### Expert — adds MCP server, observation hooks, and instinct packs
|
|
95
140
|
|
|
96
|
-
Pick this if you want the MCP tools (
|
|
141
|
+
Pick this if you want the MCP tools (18 of them, including `ci_plan_init` / `ci_plan_status` for `task_plan.md`-style planning), the session hooks that feed Mulahazah, and starter packs.
|
|
97
142
|
|
|
98
143
|
Preconditions: Node 18 / 20 / 22, plus bash on Windows (Git Bash or WSL — `hooks/observe.sh` is a bash script and silently no-ops without it). **`jq` is no longer required**: as of v3.6.0, `observe.sh` prefers the Node observer (`bin/observe.mjs`) which writes the rich event schema natively without external dependencies. The bash thin-schema path is kept as a two-phase shim, so legacy installs that have not re-run `npx continuous-improvement install` since v3.5.x will still degrade silently without `jq` (`winget install jqlang.jq` on Windows, `brew install jq` on macOS, `apt install jq` on Debian/Ubuntu) — re-running the installer is the cleaner fix and removes the dependency entirely. See [CHANGELOG.md](CHANGELOG.md) `[3.6.0]` for the migration details.
|
|
99
144
|
|
|
@@ -125,20 +170,22 @@ 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). |
|
|
174
|
+
| `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). |
|
|
128
175
|
|
|
129
176
|
---
|
|
130
177
|
|
|
131
178
|
## The 7 Laws
|
|
132
179
|
|
|
133
|
-
| # | Law |
|
|
180
|
+
| # | Law | What it gives the agent |
|
|
134
181
|
|---|-----|----------------------|
|
|
135
|
-
| 1 | **Research Before Executing** |
|
|
136
|
-
| 2 | **Plan Is Sacred** |
|
|
137
|
-
| 3 | **One Thing at a Time** |
|
|
138
|
-
| 4 | **Verify Before Reporting** |
|
|
139
|
-
| 5 | **Reflect After Sessions** |
|
|
140
|
-
| 6 | **Iterate One Change** |
|
|
141
|
-
| 7 | **Learn From Every Session** |
|
|
182
|
+
| 1 | **Research Before Executing** | builds on what already exists instead of reinventing it |
|
|
183
|
+
| 2 | **Plan Is Sacred** | lands effort on the goal with success defined up front |
|
|
184
|
+
| 3 | **One Thing at a Time** | ships each change on a known-good base |
|
|
185
|
+
| 4 | **Verify Before Reporting** | backs every "done" with evidence you can trust |
|
|
186
|
+
| 5 | **Reflect After Sessions** | turns each session into a captured lesson |
|
|
187
|
+
| 6 | **Iterate One Change** | keeps debugging isolated and the signal clean |
|
|
188
|
+
| 7 | **Learn From Every Session** | compounds knowledge so next week's agent is sharper |
|
|
142
189
|
|
|
143
190
|
```
|
|
144
191
|
Research -> Plan -> Execute (one thing) -> Verify -> Reflect -> Learn -> Iterate
|
|
@@ -148,19 +195,13 @@ Research -> Plan -> Execute (one thing) -> Verify -> Reflect -> Learn -> Iterate
|
|
|
148
195
|
<img src="assets/diagram-7-laws-loop.jpg" alt="The 7 Laws of AI Agent Discipline — circular workflow loop" width="820" />
|
|
149
196
|
</p>
|
|
150
197
|
|
|
151
|
-
Full spec, reflection-block format, and anti-examples: [SKILL.md](SKILL.md).
|
|
198
|
+
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
199
|
|
|
153
200
|
---
|
|
154
201
|
|
|
155
|
-
## Mulahazah:
|
|
156
|
-
|
|
157
|
-
Hooks capture every tool call. After ~20 observations, Claude analyzes patterns and creates **instincts** with confidence scores:
|
|
202
|
+
## Mulahazah: auto-leveling learning
|
|
158
203
|
|
|
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
|
|
204
|
+
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
205
|
|
|
165
206
|
<p align="center">
|
|
166
207
|
<img src="assets/diagram-mulahazah-learning.jpg" alt="Mulahazah pipeline" width="820" />
|
|
@@ -179,135 +220,27 @@ Hooks capture every tool call. After ~20 observations, Claude analyzes patterns
|
|
|
179
220
|
/superpowers Law activator — route the task to the right specialist
|
|
180
221
|
/workspace-surface-audit Audit repo + MCP + env, recommend high-value skills
|
|
181
222
|
/planning-with-files Create task_plan.md, findings.md, progress.md
|
|
223
|
+
/grill-me Interview-mode alignment (one question at a time)
|
|
224
|
+
/grill-with-docs Grill-me with persistent outcomes — updates CONTEXT.md + ADRs inline
|
|
225
|
+
/handoff End-of-session compaction into mktemp brief for the next agent
|
|
182
226
|
/discipline Quick reference card of the 7 Laws
|
|
227
|
+
/verify-install One-shot post-install check — commands, gateguard, observe
|
|
183
228
|
/dashboard Visual instinct health dashboard
|
|
229
|
+
/companion-preference Inspect companion-preference hook telemetry
|
|
184
230
|
/ralph Autonomous PRD story-by-story loop
|
|
185
|
-
/learn-eval Capture session patterns into new skills (
|
|
186
|
-
/harvest Extract reusable patterns from session friction
|
|
231
|
+
/learn-eval Capture session patterns into new skills (needs observation history)
|
|
232
|
+
/harvest Extract reusable patterns from session friction (needs observation history)
|
|
187
233
|
/release-train Coordinate a multi-PR release sequence
|
|
188
234
|
/swarm Fan-out coordination across parallel sub-agents
|
|
189
235
|
```
|
|
190
236
|
|
|
191
|
-
All
|
|
237
|
+
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
238
|
|
|
193
239
|
---
|
|
194
240
|
|
|
195
|
-
##
|
|
241
|
+
## Skills
|
|
196
242
|
|
|
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.
|
|
243
|
+
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
244
|
|
|
312
245
|
---
|
|
313
246
|
|
|
@@ -322,9 +255,7 @@ Lint agent behavior in CI. Detects skipped laws.
|
|
|
322
255
|
strict: true
|
|
323
256
|
```
|
|
324
257
|
|
|
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>`.
|
|
258
|
+
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
259
|
|
|
329
260
|
---
|
|
330
261
|
|
|
@@ -356,7 +287,7 @@ Every skill description leads with `Enforces Law N (...)` so the discipline tag
|
|
|
356
287
|
|
|
357
288
|
Workflows from this repo, applied to real open-source contributions:
|
|
358
289
|
|
|
359
|
-
### pm-skills (product-on-purpose,
|
|
290
|
+
### pm-skills (product-on-purpose, Apache 2.0)
|
|
360
291
|
|
|
361
292
|
[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
293
|
|
|
@@ -368,9 +299,10 @@ Authored end-to-end with `/superpowers` and `/proceed-with-the-recommendation`:
|
|
|
368
299
|
|
|
369
300
|
- [QUICKSTART.md](QUICKSTART.md) — 2-minute setup
|
|
370
301
|
- [SKILL.md](SKILL.md) — full 7 Laws spec
|
|
302
|
+
- [docs/skills.md](docs/skills.md) — full 25-skill catalog
|
|
371
303
|
- [examples/](examples/) — bug fix, feature build, refactor walkthroughs
|
|
372
304
|
- [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
|
|
305
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md) — architecture, repo internals, adding a new skill
|
|
374
306
|
- [SECURITY.md](SECURITY.md)
|
|
375
307
|
|
|
376
308
|
MIT.
|
package/SKILL.md
CHANGED
|
@@ -6,7 +6,7 @@ description: "Install structured self-improvement loops with instinct-based lear
|
|
|
6
6
|
|
|
7
7
|
# continuous-improvement
|
|
8
8
|
|
|
9
|
-
You follow the continuous-improvement framework. These 7 laws
|
|
9
|
+
You follow the continuous-improvement framework. These 7 laws make every task sharper — each is a capability that compounds: research deeper, plan tighter, verify with evidence, reflect, and learn so the same lesson is never re-taught.
|
|
10
10
|
|
|
11
11
|
## Law 1: Research Before Executing
|
|
12
12
|
|