continuous-improvement 3.1.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +78 -0
- package/CHANGELOG.md +191 -0
- package/LICENSE +21 -21
- package/QUICKSTART.md +101 -81
- package/README.md +207 -359
- package/SKILL.md +87 -9
- package/action.yml +33 -33
- package/bin/analyze.sh +161 -153
- package/bin/backfill.mjs +172 -0
- package/bin/check-docs-substrings.mjs +333 -0
- package/bin/check-everything-mirror.mjs +145 -0
- package/bin/check-routing-targets.mjs +151 -0
- package/bin/check-skill-law-tag.mjs +128 -0
- package/bin/check-skill-mirror.mjs +119 -0
- package/bin/check-skill-tiers.mjs +116 -0
- package/bin/check-third-party-shape.mjs +202 -0
- package/bin/generate-plugin-manifests.mjs +169 -0
- package/bin/harvest-friction.mjs +279 -0
- package/bin/hook-stats.mjs +258 -0
- package/bin/install.mjs +417 -516
- package/bin/lint-transcript.mjs +182 -210
- package/bin/mcp-server.mjs +840 -617
- package/bin/observe.mjs +148 -0
- package/bin/pre-commit-block-strays.sh +49 -0
- package/bin/refresh-third-party.mjs +416 -0
- package/bin/unified-cli.mjs +533 -0
- package/commands/continuous-improvement.md +115 -74
- package/commands/dashboard.md +56 -56
- package/commands/discipline.md +51 -37
- package/commands/harvest.md +76 -0
- package/commands/learn-eval.md +117 -0
- package/commands/planning-with-files.md +66 -0
- package/commands/proceed-with-the-recommendation.md +62 -0
- package/commands/ralph.md +103 -0
- package/commands/release-train.md +81 -0
- package/commands/seven-laws.md +16 -0
- package/commands/superpowers.md +153 -0
- package/commands/swarm.md +101 -0
- package/commands/workspace-surface-audit.md +77 -0
- package/hooks/observe.sh +172 -134
- package/hooks/session.sh +106 -106
- package/hooks/three-section-close.mjs +181 -0
- package/instinct-packs/go.json +58 -58
- package/instinct-packs/meta.json +16 -0
- package/instinct-packs/python.json +58 -58
- package/instinct-packs/react.json +58 -58
- package/lib/cli-anything.mjs +401 -0
- package/lib/compound-engineering.mjs +831 -0
- package/lib/observe-event.mjs +128 -0
- package/lib/plugin-metadata.mjs +432 -0
- package/lib/pm-marketplace.mjs +61 -0
- package/lib/pm-skills.mjs +1274 -0
- package/lib/resolve-home-dir.mjs +43 -0
- package/lib/skill-tiers.mjs +137 -0
- package/lib/unified-plugin.mjs +924 -0
- package/llms.txt +68 -43
- package/package.json +28 -19
- package/plugins/beginner.json +17 -6
- package/plugins/continuous-improvement/.claude-plugin/marketplace.json +20 -0
- package/plugins/continuous-improvement/.claude-plugin/plugin.json +26 -0
- package/plugins/continuous-improvement/LICENSE +21 -0
- package/plugins/continuous-improvement/README.md +56 -0
- package/plugins/continuous-improvement/bin/backfill.mjs +172 -0
- package/plugins/continuous-improvement/bin/mcp-server.mjs +886 -0
- package/plugins/continuous-improvement/bin/observe.mjs +148 -0
- package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -0
- package/plugins/continuous-improvement/commands/dashboard.md +56 -0
- package/plugins/continuous-improvement/commands/discipline.md +51 -0
- package/plugins/continuous-improvement/commands/harvest.md +76 -0
- package/plugins/continuous-improvement/commands/learn-eval.md +117 -0
- package/plugins/continuous-improvement/commands/planning-with-files.md +66 -0
- package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +62 -0
- package/plugins/continuous-improvement/commands/ralph.md +103 -0
- package/plugins/continuous-improvement/commands/release-train.md +81 -0
- package/plugins/continuous-improvement/commands/seven-laws.md +16 -0
- package/plugins/continuous-improvement/commands/superpowers.md +153 -0
- package/plugins/continuous-improvement/commands/swarm.md +101 -0
- package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -0
- package/plugins/continuous-improvement/hooks/hooks.json +60 -0
- package/plugins/continuous-improvement/hooks/observe.sh +172 -0
- package/plugins/continuous-improvement/hooks/session.sh +106 -0
- package/plugins/continuous-improvement/hooks/three-section-close.mjs +181 -0
- package/plugins/continuous-improvement/instinct-packs/go.json +58 -0
- package/plugins/continuous-improvement/instinct-packs/meta.json +16 -0
- package/plugins/continuous-improvement/instinct-packs/python.json +58 -0
- package/plugins/continuous-improvement/instinct-packs/react.json +58 -0
- package/plugins/continuous-improvement/lib/observe-event.mjs +128 -0
- package/plugins/continuous-improvement/lib/plugin-metadata.mjs +432 -0
- package/plugins/continuous-improvement/lib/resolve-home-dir.mjs +43 -0
- package/plugins/continuous-improvement/skills/README.md +34 -0
- package/plugins/continuous-improvement/skills/continuous-improvement/SKILL.md +249 -0
- package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +131 -0
- package/plugins/continuous-improvement/skills/gateguard/SKILL.md +155 -0
- package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +108 -0
- package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +454 -0
- package/plugins/continuous-improvement/skills/ralph/SKILL.md +221 -0
- package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +76 -0
- package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +104 -0
- package/plugins/continuous-improvement/skills/superpowers/SKILL.md +212 -0
- package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -0
- package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +136 -0
- package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +192 -0
- package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +191 -0
- package/plugins/continuous-improvement/skills/workspace-surface-audit/SKILL.md +147 -0
- package/plugins/continuous-improvement/templates/planning-with-files/findings.md +8 -0
- package/plugins/continuous-improvement/templates/planning-with-files/progress.md +7 -0
- package/plugins/continuous-improvement/templates/planning-with-files/task_plan.md +23 -0
- package/plugins/expert.json +26 -5
- package/skills/README.md +79 -0
- package/skills/deploy-receipt.md +131 -0
- package/skills/gateguard.md +155 -0
- package/skills/para-memory-files.md +108 -0
- package/skills/proceed-with-the-recommendation.md +454 -0
- package/skills/ralph.md +221 -0
- package/skills/safety-guard.md +76 -0
- package/skills/strategic-compact.md +104 -0
- package/skills/superpowers.md +212 -0
- package/skills/tdd-workflow.md +411 -0
- package/skills/token-budget-advisor.md +136 -0
- package/skills/verification-loop.md +192 -0
- package/skills/wild-risa-balance.md +191 -0
- package/skills/workspace-surface-audit.md +147 -0
- package/templates/planning-with-files/findings.md +8 -0
- package/templates/planning-with-files/progress.md +7 -0
- package/templates/planning-with-files/task_plan.md +23 -0
- package/templates/verify-ladder.example.json +47 -0
package/skills/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Source Skills
|
|
2
|
+
|
|
3
|
+
This directory holds the **source-of-truth** for the companion skills bundled with the `continuous-improvement` plugin.
|
|
4
|
+
|
|
5
|
+
> Edit files **here**. The plugin bundle at `plugins/continuous-improvement/skills/<name>/SKILL.md` is **regenerated** every time you run `npm run build` (see [`bin/generate-plugin-manifests.mjs`](../bin/generate-plugin-manifests.mjs)). Edits made directly inside `plugins/continuous-improvement/skills/` will be overwritten.
|
|
6
|
+
|
|
7
|
+
## Featured companion — installed by default with the plugin
|
|
8
|
+
|
|
9
|
+
`proceed-with-the-recommendation` is the **recommended pairing** for the 7 Laws. It is the execution arm that turns "do all of it" into a disciplined, verified, one-concern-at-a-time walk through the agent's recommendation list. If you only adopt one companion alongside the core skill, adopt this one.
|
|
10
|
+
|
|
11
|
+
| Skill | What it does | Source |
|
|
12
|
+
|-------|--------------|--------|
|
|
13
|
+
| **`proceed-with-the-recommendation`** ⭐ | Walks any agent's recommendation list top-to-bottom under the 7 Laws — routes each item to the right specialist (`superpowers:*`, `ralph`, `workspace-surface-audit`, `simplify`, `security-review`, `schedule`, `loop`), falls back to inline behavior when a specialist isn't installed, verifies per item, halts on `needs-approval` | @naimkatiman |
|
|
14
|
+
|
|
15
|
+
## Tier 1 — recommended pairing for **beginner** mode
|
|
16
|
+
|
|
17
|
+
These add concrete enforcement to the 7 Laws. Tier-1 skills are the always-on minimum for any user running `npx continuous-improvement install` (default beginner mode).
|
|
18
|
+
|
|
19
|
+
| Skill | What it does | Pairs with which Law |
|
|
20
|
+
|-------|--------------|----------------------|
|
|
21
|
+
| `para-memory-files` | File-based persistent memory using PARA (Projects/Areas/Resources/Archives) for cross-session context | Law 5 (Reflect), Law 7 (Learn) |
|
|
22
|
+
| `verification-loop` | Six-phase verification (build, types, lint, tests, security, diff) with a structured PASS/FAIL report | Law 4 (Verify Before Reporting) |
|
|
23
|
+
| `gateguard` | PreToolUse fact-forcing gate that blocks Edit/Write/destructive Bash until concrete investigation is presented | Law 1 (Research) |
|
|
24
|
+
| `tdd-workflow` | RED→GREEN→REFACTOR enforcement, 80%+ coverage gate across unit/integration/E2E | Law 3 (One Thing), Law 4 (Verify) |
|
|
25
|
+
|
|
26
|
+
## Tier 2 — additional skills for **expert** mode
|
|
27
|
+
|
|
28
|
+
Tier-2 skills layer on top of tier-1 for users running `npx continuous-improvement install --mode expert`. They cover autonomous-mode safety, response-depth control, and context-window discipline that matter once an agent runs longer or more aggressively.
|
|
29
|
+
|
|
30
|
+
| Skill | What it does | When it pays off |
|
|
31
|
+
|-------|--------------|------------------|
|
|
32
|
+
| `safety-guard` | Three-mode runtime guard (careful/freeze/guard) that blocks destructive commands and locks edits to a directory | Autonomous loops, prod systems, `--dangerously-skip-permissions` sessions |
|
|
33
|
+
| `token-budget-advisor` | Heuristic input/output token estimator that offers 25%/50%/75%/100% depth choices before answering | Long sessions where response size matters |
|
|
34
|
+
| `strategic-compact` | PreToolUse hook that suggests `/compact` at logical phase boundaries (research→plan, plan→implement, debug→next) instead of arbitrary auto-compaction | Multi-phase tasks that approach context limits |
|
|
35
|
+
| `wild-risa-balance` | Decision-framing lens that pairs WILD (Wild/Imaginative/Limitless/Disruptive) generation with RISA (Realistic/Important/Specific/Agreeable) execution, used to split recommendation lists into bold pilots above a safe baseline | Multi-item recommendation blocks where bold options keep losing to safe ones in a flat list |
|
|
36
|
+
|
|
37
|
+
The `/learn-eval` slash command also ships as part of the expert install: extract a session pattern, run a checklist quality gate, and decide global-vs-project save location before writing any skill file.
|
|
38
|
+
|
|
39
|
+
## Other always-bundled companion skills
|
|
40
|
+
|
|
41
|
+
These ship in the same plugin bundle regardless of mode and are available the moment you install the `continuous-improvement` plugin from the marketplace.
|
|
42
|
+
|
|
43
|
+
| Skill | What it does | Source |
|
|
44
|
+
|-------|--------------|--------|
|
|
45
|
+
| `ralph` | Autonomous loop that executes a PRD story-by-story with quality checks between iterations | [snarktank/ralph](https://github.com/snarktank/ralph) |
|
|
46
|
+
| `superpowers` | **Law activator.** Routes tasks to the correct Law-aligned specialist (brainstorming → Law 2, writing-plans → Law 2, TDD → Law 3+4, verification-before-completion → Law 4, etc.) so the right discipline fires automatically. Not a peer skill — a dispatcher for the others. | [obra/superpowers](https://github.com/obra/superpowers) |
|
|
47
|
+
| `workspace-surface-audit` | Audits the active repo, MCP servers, plugins, and env, then recommends high-value skills/workflows | continuous-improvement |
|
|
48
|
+
|
|
49
|
+
## How they get to your machine
|
|
50
|
+
|
|
51
|
+
Two paths, you pick:
|
|
52
|
+
|
|
53
|
+
**Path A — Install the plugin (recommended).** Bundled with the core skill, no per-skill copying. All companions land in one shot:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
/plugin marketplace add naimkatiman/continuous-improvement
|
|
57
|
+
/plugin install continuous-improvement@continuous-improvement
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
(The `-dev` suffix is reserved for the in-repo development marketplace at `plugins/continuous-improvement/.claude-plugin/marketplace.json` — only used when iterating on the bundle locally.)
|
|
61
|
+
|
|
62
|
+
**Path B — Drop a single skill in by hand.** Useful if you want only one companion without the rest of the plugin:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
SKILL=proceed-with-the-recommendation
|
|
66
|
+
mkdir -p ~/.claude/skills/$SKILL
|
|
67
|
+
curl -L https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/skills/$SKILL.md \
|
|
68
|
+
-o ~/.claude/skills/$SKILL/SKILL.md
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Or paste the file's contents directly into your agent's system prompt.
|
|
72
|
+
|
|
73
|
+
## Pressure-test logs
|
|
74
|
+
|
|
75
|
+
Adversarial pressure-test logs for skills in this directory live under [`docs/testing/`](../docs/testing/). They are not skills — they are baseline guarantees future edits must preserve.
|
|
76
|
+
|
|
77
|
+
## Relationship to the core skill
|
|
78
|
+
|
|
79
|
+
The core [`SKILL.md`](../SKILL.md) at the repo root defines the **7 Laws of discipline**. The skills in this directory are independent execution tools that build on those laws. They do not depend on `SKILL.md` and `SKILL.md` does not depend on them — but `proceed-with-the-recommendation` was written specifically to operationalize the 7 Laws end-to-end, which is why it's the featured pairing.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy-receipt
|
|
3
|
+
tier: "1"
|
|
4
|
+
description: Enforces Law 4 (Verify Before Reporting) of the 7 Laws of AI Agent Discipline at the deploy seam. A merge into a branch that auto-deploys is not "done" until the deploy provider reports the merged commit SHA running and a healthcheck endpoint returns 200. Companion to the vendored `finishing-a-development-branch` skill — does not replace it, runs after it for projects on Railway, Cloudflare Workers, Vercel, Netlify, Fly.io, or any other auto-deploy target.
|
|
5
|
+
origin: https://github.com/naimkatiman/continuous-improvement
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Deploy Receipt — Closing the Merge-to-Production Gap
|
|
9
|
+
|
|
10
|
+
## Why This Skill Exists
|
|
11
|
+
|
|
12
|
+
Multiple sessions in the operator's recent telemetry ended in a "partially achieved" state with the same shape: PR merged green, branch deleted, agent reports done — and then hours later the operator discovers the deploy provider never picked up the commit, was building from a stale lockfile, or silently rolled back. The merge happened. The deploy did not.
|
|
13
|
+
|
|
14
|
+
`finishing-a-development-branch` (vendored from Obra superpowers in `third-party/superpowers/`) ends at the merge. For repos that do not auto-deploy that is the correct boundary. For repos that DO auto-deploy from `main` (Railway, Cloudflare Workers, Vercel, Netlify, Fly.io, Cloud Run, App Runner, et al.) the merge is only the trigger — the work is not done until the deployed SHA matches the merged HEAD and the application answers a healthcheck.
|
|
15
|
+
|
|
16
|
+
This skill defines the receipt that closes that gap, without modifying the vendored upstream file.
|
|
17
|
+
|
|
18
|
+
## When to Activate
|
|
19
|
+
|
|
20
|
+
Activate when ALL of the following are true:
|
|
21
|
+
|
|
22
|
+
1. A merge into the deploy branch (typically `main` or `master`) has just landed
|
|
23
|
+
2. The repo declares an auto-deploy target — detect via any of:
|
|
24
|
+
- `railway.toml`, `railway.json`, or `RAILWAY_*` env vars in `.env.example`
|
|
25
|
+
- `wrangler.toml` / `wrangler.jsonc` (Cloudflare Workers)
|
|
26
|
+
- `vercel.json` or `.vercel/` directory
|
|
27
|
+
- `netlify.toml`
|
|
28
|
+
- `fly.toml`
|
|
29
|
+
- `app.yaml` (App Engine), `apprunner.yaml` (App Runner)
|
|
30
|
+
- GitHub Actions workflow with `deploy:` job triggered on push to the deploy branch
|
|
31
|
+
3. `finishing-a-development-branch` has reported "merged" — not "PR opened", not "review pending"
|
|
32
|
+
|
|
33
|
+
Do NOT activate when:
|
|
34
|
+
- Repo is library-only / package-published (npm, PyPI, crates.io) — those have a different verification surface
|
|
35
|
+
- Deploy is manual (operator runs `wrangler deploy` themselves) — the merge is genuinely the boundary
|
|
36
|
+
- Merge target is a non-deploy branch (`develop`, `staging-only`, `experimental`)
|
|
37
|
+
|
|
38
|
+
## What a Receipt Is
|
|
39
|
+
|
|
40
|
+
A deploy receipt has three components, all required:
|
|
41
|
+
|
|
42
|
+
1. **SHA match.** The deploy provider's currently-running revision SHA equals the merge commit SHA on the deploy branch. Not "the latest deploy started after the merge" — the SHA itself.
|
|
43
|
+
2. **Health response.** A documented healthcheck endpoint (project-specific; common shapes: `GET /health`, `GET /api/health`, `GET /version`) returns HTTP 200 within a reasonable timeout (default 5 minutes from merge).
|
|
44
|
+
3. **Build artifact integrity** (when verifiable). If the deploy emits a build hash, log digest, or version string, it matches what was built on the merge commit. If it does not emit one, this component is recorded as `not verifiable for this provider` — it does not block the receipt, but the gap is logged.
|
|
45
|
+
|
|
46
|
+
A receipt missing any required component is NOT a receipt. The merge is reported as `merged but not deployed — operator action required` per the close-the-loop rule below.
|
|
47
|
+
|
|
48
|
+
## How to Verify (per provider)
|
|
49
|
+
|
|
50
|
+
The skill is provider-aware but never hardcodes a specific API key or token shape. Three verification routes, in priority order:
|
|
51
|
+
|
|
52
|
+
### Route A — Provider CLI (preferred when authenticated)
|
|
53
|
+
|
|
54
|
+
The CLI is the highest-fidelity source.
|
|
55
|
+
|
|
56
|
+
| Provider | Command shape | Receipt extraction |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| Railway | `railway status --json` | `.deployments[0].meta.commitHash` |
|
|
59
|
+
| Cloudflare Workers | `wrangler deployments list --json` | `[0].metadata.deployment_trigger.metadata.commit_hash` |
|
|
60
|
+
| Vercel | `vercel inspect <url> --json` | `.gitSource.sha` |
|
|
61
|
+
| Netlify | `netlify api listSiteDeploys --data='{"site_id":"<id>"}'` | `[0].commit_ref` |
|
|
62
|
+
| Fly.io | `fly releases --json` | `[0].commit_sha` |
|
|
63
|
+
|
|
64
|
+
If the CLI is not installed or not authenticated in this session, fall through to Route B. Do NOT prompt the operator to install the CLI mid-session — that is a drive-by.
|
|
65
|
+
|
|
66
|
+
### Route B — GitHub Deployments API (works for any provider that posts back)
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
gh api repos/{owner}/{repo}/deployments --jq '.[0] | {sha, ref, environment}'
|
|
70
|
+
gh api repos/{owner}/{repo}/deployments/{id}/statuses --jq '.[0] | {state, target_url}'
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
A `state: success` status whose parent deployment's `sha` matches the merge SHA is a valid receipt component (1).
|
|
74
|
+
|
|
75
|
+
### Route C — Version endpoint curl (works for any HTTP service)
|
|
76
|
+
|
|
77
|
+
The most provider-agnostic. Requires the application to expose a version endpoint that returns its build SHA.
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
curl -fsS https://<deployed-host>/version
|
|
81
|
+
# Expect a JSON body or plain text containing the merge SHA, e.g. {"commit":"a477ec1"}
|
|
82
|
+
# Or a Git-style SHA prefix that matches `git rev-parse --short HEAD`
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
If no version endpoint exists in the project, log this as a gap and recommend adding one as a deferred follow-up — do not fabricate a receipt from a 200 on `/` or `/health` alone, because both can succeed against the OLD deploy.
|
|
86
|
+
|
|
87
|
+
## Output Shape (always emit this verbatim block)
|
|
88
|
+
|
|
89
|
+
After running verification:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
## Deploy Receipt — <project name>
|
|
93
|
+
- Merge SHA: <abbreviated sha>
|
|
94
|
+
- Deployed SHA: <abbreviated sha or "not retrieved (reason)">
|
|
95
|
+
- SHA match: yes | no | not verifiable
|
|
96
|
+
- Health endpoint: <url> → <status code> in <ms>ms
|
|
97
|
+
- Build artifact: <digest if available, else "not emitted by provider">
|
|
98
|
+
- Receipt status: COMPLETE | INCOMPLETE — <reason>
|
|
99
|
+
- Verified via: CLI | GitHub Deployments | version curl | combination
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
A `COMPLETE` receipt is the only state that lets the merge be reported as `done`. `INCOMPLETE` receipts surface a single named operator-action item (e.g. "Railway last deploy is older than the merge — re-trigger from dashboard or `railway up`").
|
|
103
|
+
|
|
104
|
+
## Anti-Patterns
|
|
105
|
+
|
|
106
|
+
- **"Eventually consistent" excuse.** Reporting done with `Deployed SHA: not retrieved` and a comment like "deploy will pick up shortly" is exactly the failure mode this skill prevents. There is no eventually — there is COMPLETE or INCOMPLETE.
|
|
107
|
+
- **Health-only receipts.** A 200 on `/health` against a stale deploy is not a receipt. Without SHA match, the receipt is INCOMPLETE.
|
|
108
|
+
- **Skipping for "small changes."** A docs-only commit still needs a receipt if the deploy branch auto-deploys — small changes have caused stale-build incidents on every provider in the table above.
|
|
109
|
+
- **Recommending the CLI install mid-receipt.** If Route A is unavailable, fall through to B then C. Adding tooling is a separate decision the operator makes outside the receipt loop.
|
|
110
|
+
- **Treating absence of evidence as evidence of success.** If none of the three routes produce a SHA, the receipt is `INCOMPLETE — no provider source available`, not `COMPLETE (assumed)`.
|
|
111
|
+
|
|
112
|
+
## Pairs With
|
|
113
|
+
|
|
114
|
+
- `finishing-a-development-branch` (vendored, third-party/superpowers/) — runs first; reports the merge. This skill runs after.
|
|
115
|
+
- `verification-loop` — same Law 4 family; this skill is the deploy-seam specialization
|
|
116
|
+
- `proceed-with-the-recommendation` — routing-table row for "Merge / close branch" should pair `finishing-a-development-branch` with this skill when the project is auto-deploy
|
|
117
|
+
- `safety-guard` — orthogonal; safety-guard prevents destructive ops, this verifies post-deploy state
|
|
118
|
+
|
|
119
|
+
## Close-the-Loop Rule
|
|
120
|
+
|
|
121
|
+
If the receipt is INCOMPLETE, the merge is NOT reported as a closed item in the Phase 7 summary of `proceed-with-the-recommendation`. It moves to **What is next → Immediate operator action**, with the named action and the exact command or dashboard step. The operator's session record is what determines done — not the agent's optimism.
|
|
122
|
+
|
|
123
|
+
## Installation
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
mkdir -p ~/.claude/skills/deploy-receipt
|
|
127
|
+
curl -L https://raw.githubusercontent.com/naimkatiman/continuous-improvement/main/skills/deploy-receipt.md \
|
|
128
|
+
-o ~/.claude/skills/deploy-receipt/SKILL.md
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Restart the Claude Code session so the registry picks it up.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gateguard
|
|
3
|
+
tier: "1"
|
|
4
|
+
description: Enforces Law 1 (Research Before Executing) of the 7 Laws of AI Agent Discipline. Fact-forcing gate that blocks Edit/Write/Bash (including MultiEdit) and demands concrete investigation (importers, data schemas, user instruction) before allowing the action. Measurably improves output quality by +2.25 points vs ungated agents.
|
|
5
|
+
origin: community
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# GateGuard — Fact-Forcing Pre-Action Gate
|
|
9
|
+
|
|
10
|
+
A PreToolUse hook that forces the agent to investigate before editing. Instead of self-evaluation ("are you sure?"), it demands concrete facts. The act of investigation creates awareness that self-evaluation never did.
|
|
11
|
+
|
|
12
|
+
## When to Activate
|
|
13
|
+
|
|
14
|
+
- Working on any codebase where file edits affect multiple modules
|
|
15
|
+
- Projects with data files that have specific schemas or date formats
|
|
16
|
+
- Teams where AI-generated code must match existing patterns
|
|
17
|
+
- Any workflow where the agent tends to guess instead of investigating
|
|
18
|
+
|
|
19
|
+
## Core Concept
|
|
20
|
+
|
|
21
|
+
LLM self-evaluation doesn't work. Ask "did you violate any policies?" and the answer is always "no." This is verified experimentally.
|
|
22
|
+
|
|
23
|
+
But asking "list every file that imports this module" forces the LLM to run Grep and Read. The investigation itself creates context that changes the output.
|
|
24
|
+
|
|
25
|
+
**Three-stage gate:**
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
1. DENY — block the first Edit/Write/Bash attempt
|
|
29
|
+
2. FORCE — tell the model exactly which facts to gather
|
|
30
|
+
3. ALLOW — permit retry after facts are presented
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
No competitor does all three. Most stop at deny.
|
|
34
|
+
|
|
35
|
+
## Evidence
|
|
36
|
+
|
|
37
|
+
Two independent A/B tests, identical agents, same task:
|
|
38
|
+
|
|
39
|
+
| Task | Gated | Ungated | Gap |
|
|
40
|
+
| --- | --- | --- | --- |
|
|
41
|
+
| Analytics module | 8.0/10 | 6.5/10 | +1.5 |
|
|
42
|
+
| Webhook validator | 10.0/10 | 7.0/10 | +3.0 |
|
|
43
|
+
| **Average** | **9.0** | **6.75** | **+2.25** |
|
|
44
|
+
|
|
45
|
+
Both agents produce code that runs and passes tests. The difference is design depth.
|
|
46
|
+
|
|
47
|
+
## Gate Types
|
|
48
|
+
|
|
49
|
+
### Edit / MultiEdit Gate (first edit per file)
|
|
50
|
+
|
|
51
|
+
MultiEdit is handled identically — each file in the batch is gated individually.
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Before editing {file_path}, present these facts:
|
|
55
|
+
|
|
56
|
+
1. List ALL files that import/require this file (use Grep)
|
|
57
|
+
2. List the public functions/classes affected by this change
|
|
58
|
+
3. If this file reads/writes data files, show field names, structure,
|
|
59
|
+
and date format (use redacted or synthetic values, not raw production data)
|
|
60
|
+
4. Quote the user's current instruction verbatim
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Write Gate (first new file creation)
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Before creating {file_path}, present these facts:
|
|
67
|
+
|
|
68
|
+
1. Name the file(s) and line(s) that will call this new file
|
|
69
|
+
2. Confirm no existing file serves the same purpose (use Glob)
|
|
70
|
+
3. If this file reads/writes data files, show field names, structure,
|
|
71
|
+
and date format (use redacted or synthetic values, not raw production data)
|
|
72
|
+
4. Quote the user's current instruction verbatim
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Destructive Bash Gate (every destructive command)
|
|
76
|
+
|
|
77
|
+
Triggers on: `rm -rf`, `git reset --hard`, `git push --force`, `drop table`, etc.
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
1. List all files/data this command will modify or delete
|
|
81
|
+
2. Write a one-line rollback procedure
|
|
82
|
+
3. Quote the user's current instruction verbatim
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Routine Bash Gate (once per session)
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Quote the user's current instruction verbatim.
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Parallel-Actor Gate (first mutation per session, then divergence-checked)
|
|
92
|
+
|
|
93
|
+
A second Claude/Codex/Maulana session can be running on the same host and the same working tree. On this operator's setup that is the common case, not the edge case (multi-clauding observed at 67% of recent messages). A mutation that looks safe in isolation can land on top of an upstream commit, an unstaged change, or a branch advance that this session never saw.
|
|
94
|
+
|
|
95
|
+
**On the first Edit / Write / mutating Bash of a session:**
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
Baseline these three values and quote them in your response:
|
|
99
|
+
|
|
100
|
+
1. `git rev-parse HEAD` — record the commit you started on
|
|
101
|
+
2. `git rev-parse @{u}` (if branch tracks an upstream) — record where origin was
|
|
102
|
+
3. `git status --porcelain` — record the working tree state
|
|
103
|
+
|
|
104
|
+
If any value is "unknown" (detached HEAD, no upstream, untracked-only tree),
|
|
105
|
+
say so explicitly. Do not proceed past the baseline silently.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**On every subsequent Edit / Write / mutating Bash, before allowing the action:**
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Re-check the three baselines against current state:
|
|
112
|
+
|
|
113
|
+
1. `git rev-parse HEAD` — has it advanced past your baseline without your commits?
|
|
114
|
+
2. `git rev-parse @{u}` — did upstream move while you worked?
|
|
115
|
+
3. `git status --porcelain` — are there modifications you did not introduce?
|
|
116
|
+
|
|
117
|
+
If ANY of those drifted from baseline, HALT. Emit:
|
|
118
|
+
"Parallel-actor divergence: <field> moved from <baseline> to <current>.
|
|
119
|
+
Working tree may belong to another session. Stop, surface to operator,
|
|
120
|
+
get clearance before next mutation."
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
This gate is what catches the squash-merge / ahead-of-origin trap recorded in the operator's memory (`feedback_pre_branch_check.md`, `feedback_parallel_actor.md`) — both classes of failure occurred because a baseline was never captured at session start.
|
|
124
|
+
|
|
125
|
+
## Quick Start
|
|
126
|
+
|
|
127
|
+
### Option A: Use the continuous-improvement hook (zero install)
|
|
128
|
+
|
|
129
|
+
The hook at `scripts/hooks/gateguard-fact-force.js` is included in this plugin. Enable it via hooks.json.
|
|
130
|
+
|
|
131
|
+
### Option B: Full package with config
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pip install gateguard-ai
|
|
135
|
+
gateguard init
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
This adds `.gateguard.yml` for per-project configuration (custom messages, ignore paths, gate toggles).
|
|
139
|
+
|
|
140
|
+
## Anti-Patterns
|
|
141
|
+
|
|
142
|
+
- **Don't use self-evaluation instead.** "Are you sure?" always gets "yes." This is experimentally verified.
|
|
143
|
+
- **Don't skip the data schema check.** Both A/B test agents assumed ISO-8601 dates when real data used `%Y/%m/%d %H:%M`. Checking data structure (with redacted values) prevents this entire class of bugs.
|
|
144
|
+
- **Don't gate every single Bash command.** Routine bash gates once per session. Destructive bash gates every time. This balance avoids slowdown while catching real risks.
|
|
145
|
+
|
|
146
|
+
## Best Practices
|
|
147
|
+
|
|
148
|
+
- Let the gate fire naturally. Don't try to pre-answer the gate questions — the investigation itself is what improves quality.
|
|
149
|
+
- Customize gate messages for your domain. If your project has specific conventions, add them to the gate prompts.
|
|
150
|
+
- Use `.gateguard.yml` to ignore paths like `.venv/`, `node_modules/`, `.git/`.
|
|
151
|
+
|
|
152
|
+
## Related Skills
|
|
153
|
+
|
|
154
|
+
- `safety-guard` — Runtime safety checks (complementary, not overlapping)
|
|
155
|
+
- `code-reviewer` — Post-edit review (GateGuard is pre-edit investigation)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: para-memory-files
|
|
3
|
+
tier: "1"
|
|
4
|
+
description: >
|
|
5
|
+
Enforces Law 5 (Reflect After Every Session) and Law 7 (Learn From Every Session)
|
|
6
|
+
of the 7 Laws of AI Agent Discipline by giving the agent a durable file-based
|
|
7
|
+
memory it can read on resume and write at session end.
|
|
8
|
+
File-based memory system using Tiago Forte's PARA method. Use this skill whenever
|
|
9
|
+
you need to store, retrieve, update, or organize knowledge across sessions. Covers
|
|
10
|
+
three memory layers: (1) Knowledge graph in PARA folders with atomic YAML facts,
|
|
11
|
+
(2) Daily notes as raw timeline, (3) Tacit knowledge about user patterns. Also
|
|
12
|
+
handles planning files, memory decay, weekly synthesis, and recall via qmd.
|
|
13
|
+
Trigger on any memory operation: saving facts, writing daily notes, creating
|
|
14
|
+
entities, running weekly synthesis, recalling past context, or managing plans.
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# PARA Memory Files
|
|
18
|
+
|
|
19
|
+
Persistent, file-based memory organized by Tiago Forte's PARA method. Three layers: a knowledge graph, daily notes, and tacit knowledge. All paths are relative to `$AGENT_HOME`.
|
|
20
|
+
|
|
21
|
+
## Three Memory Layers
|
|
22
|
+
|
|
23
|
+
### Layer 1: Knowledge Graph (`$AGENT_HOME/life/` -- PARA)
|
|
24
|
+
|
|
25
|
+
Entity-based storage. Each entity gets a folder with two tiers:
|
|
26
|
+
|
|
27
|
+
1. `summary.md` -- quick context, load first.
|
|
28
|
+
2. `items.yaml` -- atomic facts, load on demand.
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
$AGENT_HOME/life/
|
|
32
|
+
projects/ # Active work with clear goals/deadlines
|
|
33
|
+
<name>/
|
|
34
|
+
summary.md
|
|
35
|
+
items.yaml
|
|
36
|
+
areas/ # Ongoing responsibilities, no end date
|
|
37
|
+
people/<name>/
|
|
38
|
+
companies/<name>/
|
|
39
|
+
resources/ # Reference material, topics of interest
|
|
40
|
+
<topic>/
|
|
41
|
+
archives/ # Inactive items from the other three
|
|
42
|
+
index.md
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**PARA rules:**
|
|
46
|
+
|
|
47
|
+
- **Projects** -- active work with a goal or deadline. Move to archives when complete.
|
|
48
|
+
- **Areas** -- ongoing (people, companies, responsibilities). No end date.
|
|
49
|
+
- **Resources** -- reference material, topics of interest.
|
|
50
|
+
- **Archives** -- inactive items from any category.
|
|
51
|
+
|
|
52
|
+
**Fact rules:**
|
|
53
|
+
|
|
54
|
+
- Save durable facts immediately to `items.yaml`.
|
|
55
|
+
- Weekly: rewrite `summary.md` from active facts.
|
|
56
|
+
- Never delete facts. Supersede instead (`status: superseded`, add `superseded_by`).
|
|
57
|
+
- When an entity goes inactive, move its folder to `$AGENT_HOME/life/archives/`.
|
|
58
|
+
|
|
59
|
+
**When to create an entity:**
|
|
60
|
+
|
|
61
|
+
- Mentioned 3+ times, OR
|
|
62
|
+
- Direct relationship to the user (family, coworker, partner, client), OR
|
|
63
|
+
- Significant project or company in the user's life.
|
|
64
|
+
- Otherwise, note it in daily notes.
|
|
65
|
+
|
|
66
|
+
For the atomic fact YAML schema and memory decay rules, see [references/schemas.md](references/schemas.md).
|
|
67
|
+
|
|
68
|
+
### Layer 2: Daily Notes (`$AGENT_HOME/memory/YYYY-MM-DD.md`)
|
|
69
|
+
|
|
70
|
+
Raw timeline of events -- the "when" layer.
|
|
71
|
+
|
|
72
|
+
- Write continuously during conversations.
|
|
73
|
+
- Extract durable facts to Layer 1 during heartbeats.
|
|
74
|
+
|
|
75
|
+
### Layer 3: Tacit Knowledge (`$AGENT_HOME/MEMORY.md`)
|
|
76
|
+
|
|
77
|
+
How the user operates -- patterns, preferences, lessons learned.
|
|
78
|
+
|
|
79
|
+
- Not facts about the world; facts about the user.
|
|
80
|
+
- Update whenever you learn new operating patterns.
|
|
81
|
+
|
|
82
|
+
## Write It Down -- No Mental Notes
|
|
83
|
+
|
|
84
|
+
Memory does not survive session restarts. Files do.
|
|
85
|
+
|
|
86
|
+
- Want to remember something -> WRITE IT TO A FILE.
|
|
87
|
+
- "Remember this" -> update `$AGENT_HOME/memory/YYYY-MM-DD.md` or the relevant entity file.
|
|
88
|
+
- Learn a lesson -> update AGENTS.md, TOOLS.md, or the relevant skill file.
|
|
89
|
+
- Make a mistake -> document it so future-you does not repeat it.
|
|
90
|
+
- On-disk text files are always better than holding it in temporary context.
|
|
91
|
+
|
|
92
|
+
## Memory Recall -- Use qmd
|
|
93
|
+
|
|
94
|
+
Use `qmd` rather than grepping files:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
qmd query "what happened at Christmas" # Semantic search with reranking
|
|
98
|
+
qmd search "specific phrase" # BM25 keyword search
|
|
99
|
+
qmd vsearch "conceptual question" # Pure vector similarity
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Index your personal folder: `qmd index $AGENT_HOME`
|
|
103
|
+
|
|
104
|
+
Vectors + BM25 + reranking finds things even when the wording differs.
|
|
105
|
+
|
|
106
|
+
## Planning
|
|
107
|
+
|
|
108
|
+
Keep plans in timestamped files in `plans/` at the project root (outside personal memory so other agents can access them). Use `qmd` to search plans. Plans go stale -- if a newer plan exists, do not confuse yourself with an older version. If you notice staleness, update the file to note what it is supersededBy.
|