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
|
@@ -38,7 +38,7 @@ Intercept the response flow to offer the user a choice about response depth **be
|
|
|
38
38
|
|
|
39
39
|
Use the repository's canonical context-budget heuristics to estimate the prompt's token count mentally.
|
|
40
40
|
|
|
41
|
-
Use the same calibration guidance as
|
|
41
|
+
Use the same calibration guidance as `context-budget`:
|
|
42
42
|
|
|
43
43
|
- prose: `words × 1.3`
|
|
44
44
|
- code-heavy or mixed/code blocks: `chars / 4`
|
|
@@ -23,7 +23,21 @@ Invoke this skill:
|
|
|
23
23
|
|
|
24
24
|
Every project has its own actual invocation for build / typecheck / lint / test / security / deploy-receipt. Hardcoding `npm run build` and `npm run test` works when the project happens to use those exact scripts; for everything else (pnpm, yarn, cargo, go, mise, just, custom scripts, monorepos with workspace-scoped commands) it returns "deps not installed" or "config not found" misreads from the wrong invocation. Phase 0 runs first so Phases 1–6 never have to guess.
|
|
25
25
|
|
|
26
|
-
**
|
|
26
|
+
**Run [`scripts/resolve-verify-ladder.mjs`](../scripts/resolve-verify-ladder.mjs)** at the repo root. It encodes the full four-step resolution priority and emits the fenced block below. Use `--json` for machine consumption.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
$ node scripts/resolve-verify-ladder.mjs
|
|
30
|
+
verify-ladder (resolved):
|
|
31
|
+
build: npm run build (sniff:package.json:scripts.build)
|
|
32
|
+
typecheck: npm run typecheck (sniff:package.json:scripts.typecheck)
|
|
33
|
+
lint: npm run lint (sniff:package.json:scripts.lint)
|
|
34
|
+
test: npm test (sniff:package.json:scripts.test)
|
|
35
|
+
security: (ask operator — no marker found)
|
|
36
|
+
deploy_receipt: (ask operator — no marker found)
|
|
37
|
+
synthetic_checks: (ask operator — no marker found)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Resolution priority** (first match wins; the script implements this — the prose is documentation):
|
|
27
41
|
|
|
28
42
|
1. **`.claude/verify-ladder.json` manifest** at the repo root. Schema:
|
|
29
43
|
```json
|
|
@@ -36,24 +50,12 @@ Every project has its own actual invocation for build / typecheck / lint / test
|
|
|
36
50
|
"deploy_receipt": "npx wrangler deployments list --json"
|
|
37
51
|
}
|
|
38
52
|
```
|
|
39
|
-
Any field omitted falls through to step 2 for that field only. A field set to the literal
|
|
40
|
-
2. **Sniff `package.json` `scripts`** for `build`, `typecheck` or `tsc`, `lint`, `test`, `audit` or `security`. Tie-breaker when multiple scripts could match a phase: prefer `verify:<phase>` over `<phase>` over `<phase
|
|
41
|
-
3. **Sniff per-language toolchain files** if `package.json` is absent: `Cargo.toml` → `cargo build` / `cargo test`, `go.mod` → `go build ./...` / `go test ./...`, `pyproject.toml` → `
|
|
42
|
-
4. **Ask the operator** if none of the above resolves the field. Do not invent.
|
|
53
|
+
Any field omitted falls through to step 2 for that field only. A field set to the literal JSON `null` means "skip this phase for this project" — the resolver records source `manifest:null`. Underscore-prefixed keys (`_doc`, `_node_example`, etc.) are ignored as documentation/examples.
|
|
54
|
+
2. **Sniff `package.json` `scripts`** for `build`, `typecheck` or `tsc`, `lint`, `test`, `audit` or `security`. Tie-breaker when multiple scripts could match a phase: prefer `verify:<phase>` over `<phase>` over `<phase>:*` (wildcard tail). Do NOT pick `test` when `verify:test` exists; the operator's explicit verification surface always wins over the convenience alias.
|
|
55
|
+
3. **Sniff per-language toolchain files** if `package.json` is absent: `Cargo.toml` → `cargo build` / `cargo check` / `cargo clippy` / `cargo test` / `cargo audit`, `go.mod` → `go build ./...` / `go vet ./...` / `go test ./...`, `pyproject.toml` → `pyright` / `ruff check .` / `pytest`, `Gemfile` → `bundle exec rspec` / `bundle exec rubocop`.
|
|
56
|
+
4. **Ask the operator** (source `ask-operator`) if none of the above resolves the field. Do not invent.
|
|
43
57
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
verify-ladder (resolved):
|
|
48
|
-
build: npm run build
|
|
49
|
-
typecheck: npx tsc --noEmit (sniff: package.json scripts.typecheck)
|
|
50
|
-
lint: npm run lint
|
|
51
|
-
test: npm test
|
|
52
|
-
security: (skipped — no script defined)
|
|
53
|
-
deploy_receipt: npx wrangler deployments list --json (manifest)
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Each row shows the resolved command + its source (manifest, sniff, or skipped). The fenced block is the contract surface — every later phase reads from this resolved ladder, never from a hardcoded fallback.
|
|
58
|
+
Each row shows the resolved command + its source (`manifest`, `sniff:<file>:<key>`, `manifest:null`, or `ask-operator`). The fenced block is the contract surface — every later phase reads from this resolved ladder, never from a hardcoded fallback.
|
|
57
59
|
|
|
58
60
|
A starter manifest is provided at `templates/verify-ladder.example.json`; copy it to `.claude/verify-ladder.json` and trim per project.
|
|
59
61
|
|
|
@@ -143,7 +145,11 @@ If either is `No`, the verification report goes back to the operator with the ex
|
|
|
143
145
|
|
|
144
146
|
### Phase 8: Deploy Receipt (auto-deploy projects only)
|
|
145
147
|
|
|
146
|
-
For repos whose `verify-ladder.json` declares a `deploy_receipt` field — or whose sniff path detects an auto-deploy target
|
|
148
|
+
For repos whose `verify-ladder.json` declares a `deploy_receipt` field — or whose sniff path detects an auto-deploy target — the verify is not complete until the deployed SHA matches the merge SHA and a healthcheck returns 200. Hand off to the `deploy-receipt` skill (Law 4 deploy-seam companion landed in PR #83) and treat its `Receipt status: COMPLETE` as the gate.
|
|
149
|
+
|
|
150
|
+
**Detection.** Run [`scripts/detect-deploy-target.sh`](../scripts/detect-deploy-target.sh) at the repo root. Output is one of `railway` / `cloudflare` / `vercel` / `netlify` / `fly` / `appengine` / `apprunner` / `gha-deploy` / `none`. Anything except `none` triggers handoff to `deploy-receipt`; `none` means Phase 8 is skipped (no deploy seam exists).
|
|
151
|
+
|
|
152
|
+
**SHA extraction.** For the detected provider, [`scripts/get-deployed-sha.sh <provider>`](../scripts/get-deployed-sha.sh) returns the currently-deployed SHA via the provider CLI; `--show-command <provider>` prints the pipeline shape without executing (useful for dry-runs and citation). `deploy-receipt` owns the receipt's other components (health endpoint, build artifact, on-incomplete modes) and Route B/C fallbacks.
|
|
147
153
|
|
|
148
154
|
INCOMPLETE receipts move to "Immediate operator action" in the close, never to "ready". Library-only / package-published repos skip this phase entirely (no deploy seam exists).
|
|
149
155
|
|
|
@@ -158,11 +164,13 @@ Phase 8 confirms the deploy seam. Phase 9 confirms the deployed surface matches
|
|
|
158
164
|
|
|
159
165
|
**What the runner does:**
|
|
160
166
|
|
|
167
|
+
Implementation: `scripts/run-synthetic.mjs` encodes the lexical walk, interpreter map, env injection, and exit-code aggregation below. The prose is documentation, not the contract — when the two disagree, the script wins.
|
|
168
|
+
|
|
161
169
|
1. List every `*.synthetic.{sh,mjs,ts,py}` file in the resolved directory in lexical order.
|
|
162
170
|
2. For each file, set the input env vars: `BASE_URL` (production base from project config), `BASELINE_URL` (staging baseline from project config), `EXPECTED_SHA` (the merge SHA Phase 8 reported COMPLETE), `DEPLOY_BRANCH` (the deploy branch name), `RECEIPT_TIMESTAMP` (ISO-8601 of the receipt).
|
|
163
171
|
3. Invoke the file via the right interpreter (`bash` for `.sh`, `node` for `.mjs`, `tsx` for `.ts`, `python` for `.py`). Files with unrecognized extensions are skipped with a warning.
|
|
164
172
|
4. Capture stdout + stderr + exit code per file. On exit 0, the check passed. On any non-zero exit, the check failed and stdout is the operator-facing diff.
|
|
165
|
-
5. Aggregate: if every file exited 0, Phase 9 is `PASS`. If any file exited non-zero, Phase 9 is `FAIL — synthetic drift on <filenames>` and the captured diffs go into the verification report verbatim (no agent re-summarization).
|
|
173
|
+
5. Aggregate: if every file exited 0, Phase 9 is `PASS`. If any file exited non-zero, Phase 9 is `FAIL — synthetic drift on <filenames>` and the captured diffs go into the verification report verbatim (no agent re-summarization). Exit code 2 with zero drift (every non-pass was a config error from the check itself) surfaces as `INCOMPLETE — config error` to distinguish "gate did not run" from "gate ran and found drift".
|
|
166
174
|
|
|
167
175
|
**Surfacing rule:**
|
|
168
176
|
|
|
@@ -3,6 +3,7 @@ name: wild-risa-balance
|
|
|
3
3
|
tier: "2"
|
|
4
4
|
description: Enforces Law 2 (Plan Is Sacred) of the 7 Laws of AI Agent Discipline. Decision-framing lens that pairs WILD generation with RISA execution when emitting recommendation lists. Not a runtime hook.
|
|
5
5
|
origin: continuous-improvement
|
|
6
|
+
user-invocable: false
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# WILD / RISA Balance
|
|
@@ -74,7 +74,7 @@ Probe and record (no destructive commands; quote results inline):
|
|
|
74
74
|
- **jq availability.** `command -v jq` (or `Get-Command jq`). When jq is missing, observation-pipeline hooks fall back to a thin schema and curl/JSON one-liners need a node/python rewrite.
|
|
75
75
|
- **Case-sensitive filesystem.** Test by creating two paths differing only in case in a tempdir. NTFS (Windows) and APFS (macOS default) are case-insensitive; Linux ext4 and case-sensitive APFS are case-sensitive. Affects `CLAUDE.md` vs `claude.md` resolution and import paths.
|
|
76
76
|
- **CWD baseline.** `pwd` (or `Get-Location`) recorded at session start. `tsc`, build scripts, and some test runners change CWD as a side effect; subsequent commands run from the wrong directory return "deps not installed" or "config not found" misreads.
|
|
77
|
-
- **Parallel-actor expectation.** Document whether a second Claude / Codex / Maulana session may operate on the same working tree. If yes, the `gateguard` Parallel-Actor Gate
|
|
77
|
+
- **Parallel-actor expectation.** Document whether a second Claude / Codex / Maulana session may operate on the same working tree. If yes, the `gateguard` Parallel-Actor Gate uses [`scripts/git-state-snapshot.sh`](../scripts/git-state-snapshot.sh) to produce a single JSON envelope (`{head, upstream, dirty, root, branch}`) for the baseline and the divergence check. This skill records whether parallel-actor is expected; gateguard owns the runtime mechanics, so the audit doesn't restate the git-command triple.
|
|
78
78
|
|
|
79
79
|
Output the recorded grain as a single fenced block so it survives context compaction and any later phase can reference it without re-probing:
|
|
80
80
|
|
|
@@ -3,6 +3,7 @@ name: worktree-safety
|
|
|
3
3
|
tier: "2"
|
|
4
4
|
description: "Enforces Law 4 (Verify Before Reporting) of the 7 Laws of AI Agent Discipline. Pre-dispatch invariant: validate worktree root before any source-writing tool call. Catches missing .git, fallback path-only creation, stale leases, foreign-session ownership, and non-worktree git operations before they corrupt history."
|
|
5
5
|
origin: continuous-improvement
|
|
6
|
+
user-invocable: false
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Worktree Safety Skill
|
|
@@ -31,10 +32,10 @@ The continuous-improvement repo runs on Windows + Git Bash with `autocrlf=true`
|
|
|
31
32
|
|
|
32
33
|
Before any source-writing call, verify all five. Fail closed on any miss.
|
|
33
34
|
|
|
34
|
-
1. **Root validity** — `git rev-parse --show-toplevel` resolves; the resolved path matches CWD after symlink-safe canonicalization.
|
|
35
|
+
1. **Root validity** — `git rev-parse --show-toplevel` resolves; the resolved path matches CWD after symlink-safe canonicalization. The `root` field of [`scripts/git-state-snapshot.sh`](../scripts/git-state-snapshot.sh) carries the canonicalized root, and its non-zero exit on `{"error":"not-a-git-repo"}` is itself the fail-closed signal — no second probe needed.
|
|
35
36
|
2. **`.git` presence** — `.git` exists (file pointer for worktrees, directory for primary checkout). A missing or unreadable `.git` is an immediate stop.
|
|
36
37
|
3. **Worktree registration** — `git worktree list` includes the resolved root with no `prunable` flag. Prunable worktrees can be deleted by another process at any moment.
|
|
37
|
-
4. **Branch alignment** — current branch matches the lease ledger; `HEAD` is not detached unless the unit explicitly asked for detached state.
|
|
38
|
+
4. **Branch alignment** — current branch matches the lease ledger; `HEAD` is not detached unless the unit explicitly asked for detached state. The snapshot script's `branch` field carries either the branch name or the literal `"detached"`, so detached-state is observable without a second probe.
|
|
38
39
|
5. **Lease ownership** — the session ID in `.git/worktrees/<name>/lease` (or your equivalent ledger) matches this session. Stale or foreign leases block the call.
|
|
39
40
|
|
|
40
41
|
Output a single fenced block before any source-writing dispatch:
|
package/plugins/expert.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "continuous-improvement",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.3",
|
|
4
4
|
"mode": "expert",
|
|
5
|
-
"description": "Expert mode: tune confidence, manage instincts, and persist plans on disk. Adds safety, token-budget, and strategic-compact skills plus the /learn-eval command so long sessions stay
|
|
5
|
+
"description": "Expert mode: tune confidence, manage instincts, and persist plans on disk. Adds safety, token-budget, and strategic-compact skills plus the /learn-eval command so long sessions stay sharp and learnings survive context resets.",
|
|
6
6
|
"tools": [
|
|
7
7
|
{
|
|
8
8
|
"name": "ci_status",
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
"name": "ci_reflect",
|
|
17
17
|
"what": "Reflect on what you did this session"
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
"name": "ci_gateguard_clear",
|
|
21
|
+
"what": "Clear the GateGuard gate for files after presenting facts"
|
|
22
|
+
},
|
|
19
23
|
{
|
|
20
24
|
"name": "ci_reinforce",
|
|
21
25
|
"what": "Accept or reject instinct suggestions to tune confidence"
|
|
@@ -51,6 +55,26 @@
|
|
|
51
55
|
{
|
|
52
56
|
"name": "ci_load_pack",
|
|
53
57
|
"what": "Load starter instinct packs (react, python, go) into the current project"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "ci_goal_check",
|
|
61
|
+
"what": "Detect when a session has drifted from its stated goal"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "ci_recall",
|
|
65
|
+
"what": "Search past sessions for relevant prior activity (episodic recall)"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "ci_distill_candidates",
|
|
69
|
+
"what": "Find repeated successful tool sequences worth turning into skills"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "ci_distill_propose",
|
|
73
|
+
"what": "Draft a reusable instinct from a repeated successful pattern"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "ci_distill_promote",
|
|
77
|
+
"what": "Promote an edited draft into a live instinct"
|
|
54
78
|
}
|
|
55
79
|
],
|
|
56
80
|
"setup": {
|
|
@@ -83,9 +107,10 @@
|
|
|
83
107
|
"included": [
|
|
84
108
|
"PreToolUse",
|
|
85
109
|
"PostToolUse",
|
|
110
|
+
"UserPromptSubmit",
|
|
86
111
|
"SessionStart",
|
|
87
112
|
"SessionEnd"
|
|
88
113
|
],
|
|
89
|
-
"description": "Full hook suite: observation capture
|
|
114
|
+
"description": "Full hook suite: observation capture, lazy prompt routing, session-level instinct loading, and auto-reflection."
|
|
90
115
|
}
|
|
91
116
|
}
|
package/skills/README.md
CHANGED
|
@@ -44,6 +44,9 @@ These ship in the same plugin bundle regardless of mode and are available the mo
|
|
|
44
44
|
|-------|--------------|--------|
|
|
45
45
|
| `ralph` | Autonomous loop that executes a PRD story-by-story with quality checks between iterations | [snarktank/ralph](https://github.com/snarktank/ralph) |
|
|
46
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
|
+
| `handoff` | One-shot session compaction into an `mktemp`-backed markdown brief a fresh agent can pick up cold — goal, current state, decisions, open questions, next step, skills to load | [mattpocock/skills](https://github.com/mattpocock/skills/blob/main/skills/in-progress/handoff/SKILL.md) |
|
|
48
|
+
| `grill-me` | Pre-execution alignment interrogation — interview the user one question at a time, walking every branch of the decision tree with a recommended answer for each, until the spec is shippable cold to a fresh agent | [mattpocock/skills](https://github.com/mattpocock/skills/blob/main/skills/productivity/grill-me/SKILL.md) |
|
|
49
|
+
| `grill-with-docs` | Grilling-with-persistent-outcomes — challenges the plan against the existing `CONTEXT.md` glossary, sharpens fuzzy terminology, cross-references user statements against code, and updates `CONTEXT.md` + `docs/adr/` inline as decisions crystallise. Bundles a CONTEXT.md format spec and an ADR format spec as appendices | [mattpocock/skills](https://github.com/mattpocock/skills/blob/main/skills/engineering/grill-with-docs/SKILL.md) |
|
|
47
50
|
| `workspace-surface-audit` | Audits the active repo, MCP servers, plugins, and env, then recommends high-value skills/workflows | continuous-improvement |
|
|
48
51
|
|
|
49
52
|
## How they get to your machine
|
package/skills/audit.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit
|
|
3
|
+
tier: "2"
|
|
4
|
+
description: Enforces Law 4 (Verify Before Reporting) of the 7 Laws of AI Agent Discipline. Audits a window of recent commits for real defects, confirms each finding before touching code so false positives die first, and checks every surface a change touches — so 'looks done' is never mistaken for 'is correct'.
|
|
5
|
+
origin: continuous-improvement
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Audit — Confirm Recent Commits Before You Trust Them
|
|
10
|
+
|
|
11
|
+
Law 4 says verify before reporting. A merged commit with green CI is a claim, not a proof. This skill runs the audit-driven loop: take a window of recent commits, hunt for real defects, prove each one before touching code, fix on a branch, and verify every surface the fix touches before declaring the audit clean.
|
|
12
|
+
|
|
13
|
+
## When to Activate
|
|
14
|
+
|
|
15
|
+
- After a batch of commits lands ("audit today's commits"), especially on money-handling, auth, or state-mutating code.
|
|
16
|
+
- When a feature shipped across several surfaces (backend, frontend, admin, migration) and you suspect one was missed.
|
|
17
|
+
- After a large refactor or a conflicted merge — exactly when individually-correct functions can still cancel each other out.
|
|
18
|
+
- Before a release cut, as the last gate over "everything claimed done."
|
|
19
|
+
|
|
20
|
+
## The Loop
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
1. Scope — pick the commit window (e.g. main since last release, or HEAD~N..HEAD)
|
|
24
|
+
2. Find — hunt for real defects, one concern per pass
|
|
25
|
+
3. Confirm — prove each finding against the actual code; false positives die here
|
|
26
|
+
4. Fix — one branch, one concern per commit, smallest diff that closes the defect
|
|
27
|
+
5. Verify — exercise EVERY surface the fix touches, not just the one you edited
|
|
28
|
+
6. Report — confirmed defects, dismissed false positives, and no-op items, with evidence
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Find: One Concern Per Pass
|
|
32
|
+
|
|
33
|
+
Run the find pass once per dimension rather than one undifferentiated sweep. The dimensions that have actually caught defects in this codebase's domain:
|
|
34
|
+
|
|
35
|
+
- **Value/economy drift** — a constant duplicated across surfaces (a prize array hardcoded in the frontend while the backend reads an endpoint; a cap defined twice). Grep both sides; compare.
|
|
36
|
+
- **Concurrency** — a read-modify-write with no guard, a settlement that is not idempotent, a row that can get stuck between two states.
|
|
37
|
+
- **Surface coverage** — a change that updated the backend but not the admin filter or the client cache that mirrors it.
|
|
38
|
+
- **Type/contract** — a payload shape that one side narrowed and the other did not.
|
|
39
|
+
|
|
40
|
+
For a thorough audit, use the `superpowers:dispatching-parallel-agents` skill to fan these out as parallel reviewers — each blind to the others — then merge findings.
|
|
41
|
+
|
|
42
|
+
## Confirm Before Fixing
|
|
43
|
+
|
|
44
|
+
A finding is a hypothesis until proven against the code. Before writing any fix:
|
|
45
|
+
|
|
46
|
+
- Read the actual lines, not the diff summary. Confirm the defect reproduces in the current tree.
|
|
47
|
+
- State why it is real in one sentence. If you cannot, it is a false positive — record it as dismissed and move on.
|
|
48
|
+
- Prefer a failing test that reproduces the defect, then fix to green (`tdd-workflow`).
|
|
49
|
+
|
|
50
|
+
Defaulting findings to "real" is how plausible-but-wrong fixes get shipped. Default to skeptical; make the code prove the bug.
|
|
51
|
+
|
|
52
|
+
## Verify Every Surface the Fix Touches
|
|
53
|
+
|
|
54
|
+
The recurring failure this skill exists to stop: a fix that the agent claims is done while the frontend array, admin filter, or cached copy still carries the old value. This is the functional-surface check `audit` gates before reporting — not the build/test/lint ladder itself (that is `verification-loop`). Before reporting an item closed:
|
|
55
|
+
|
|
56
|
+
- List every surface the changed value or behavior touches (backend, frontend, admin, migration, cache, generated artifact).
|
|
57
|
+
- Re-check each surface yourself — do not assume one auto-updates from another.
|
|
58
|
+
- On each surface, run the resolved `verification-loop` ladder against the code that implements it, not a manual spot-check.
|
|
59
|
+
|
|
60
|
+
This applies the `verification-loop` (Law 4) and `goal-monitor` (Law 2) discipline to someone else's recent work.
|
|
61
|
+
|
|
62
|
+
## Report Honestly
|
|
63
|
+
|
|
64
|
+
Three buckets, with evidence: **confirmed** (defect + fix + the check that proves it), **dismissed** (looked like a bug, here is why it is not), **no-op** (in scope but nothing to change). Silence on a surface is not a pass.
|
|
65
|
+
|
|
66
|
+
## Pairs With
|
|
67
|
+
|
|
68
|
+
- **`code-review`** / **`security-review`** — the dimension passes; `audit` is the loop that runs them over a commit window and acts on the output.
|
|
69
|
+
- **`superpowers:dispatching-parallel-agents`** — fan the find pass out across dimensions, then verify each finding adversarially.
|
|
70
|
+
- **`verification-loop`** (Law 4) — the build/test/lint ladder `audit` runs on each surface before a finding is closed.
|
|
71
|
+
- **`goal-monitor`** (Law 2) — confirms the fix still serves the task goal, not just that it compiles.
|
|
72
|
+
- **`recall`** (Law 1) — before confirming a finding, recall whether this exact defect was hit and fixed before.
|
|
73
|
+
- **`reconcile`** (Law 1) — when the audit ends in a fix, reconcile the branch state before pushing.
|
package/skills/deploy-receipt.md
CHANGED
|
@@ -3,6 +3,7 @@ name: deploy-receipt
|
|
|
3
3
|
tier: "1"
|
|
4
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
5
|
origin: https://github.com/naimkatiman/continuous-improvement
|
|
6
|
+
disable-model-invocation: true
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Deploy Receipt — Closing the Merge-to-Production Gap
|
|
@@ -20,14 +21,7 @@ This skill defines the receipt that closes that gap, without modifying the vendo
|
|
|
20
21
|
Activate when ALL of the following are true:
|
|
21
22
|
|
|
22
23
|
1. A merge into the deploy branch (typically `main` or `master`) has just landed
|
|
23
|
-
2.
|
|
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
|
|
24
|
+
2. [`scripts/detect-deploy-target.sh`](../scripts/detect-deploy-target.sh) returns a value other than `none` at the repo root. The script encodes the full file-marker table — `railway.toml` / `railway.json` → `railway`, `wrangler.toml` / `wrangler.jsonc` → `cloudflare`, `vercel.json` / `.vercel/` → `vercel`, `netlify.toml` → `netlify`, `fly.toml` → `fly`, `app.yaml` → `appengine`, `apprunner.yaml` → `apprunner`, `.github/workflows/*.yml` with a `deploy:` job → `gha-deploy`. First match wins, in that order. The script is the source of truth; the file list above is documentation
|
|
31
25
|
3. `finishing-a-development-branch` has reported "merged" — not "PR opened", not "review pending"
|
|
32
26
|
|
|
33
27
|
Do NOT activate when:
|
|
@@ -51,17 +45,19 @@ The skill is provider-aware but never hardcodes a specific API key or token shap
|
|
|
51
45
|
|
|
52
46
|
### Route A — Provider CLI (preferred when authenticated)
|
|
53
47
|
|
|
54
|
-
The CLI is the highest-fidelity source.
|
|
48
|
+
The CLI is the highest-fidelity source. Run [`scripts/get-deployed-sha.sh <provider>`](../scripts/get-deployed-sha.sh) — the script owns the per-provider pipeline (CLI + jq filter) and prints just the SHA on stdout. Inspect the pipeline shape without executing via `bash scripts/get-deployed-sha.sh --show-command <provider>`.
|
|
55
49
|
|
|
56
|
-
|
|
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` |
|
|
50
|
+
Provider-to-pipeline map (cited from the script, not redefined here):
|
|
63
51
|
|
|
64
|
-
|
|
52
|
+
| Provider value | CLI |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `railway` | `railway` |
|
|
55
|
+
| `cloudflare` | `wrangler` |
|
|
56
|
+
| `vercel` | `vercel` |
|
|
57
|
+
| `netlify` | `netlify` |
|
|
58
|
+
| `fly` | `fly` |
|
|
59
|
+
|
|
60
|
+
Exit codes from the script: `0` on success (SHA printed), `2` on missing/unknown provider (usage error), `3` when the required CLI is not installed locally — that is the fall-through signal to Route B, not a hard failure. Do NOT prompt the operator to install the CLI mid-session — that is a drive-by.
|
|
65
61
|
|
|
66
62
|
### Route B — GitHub Deployments API (works for any provider that posts back)
|
|
67
63
|
|
package/skills/gateguard.md
CHANGED
|
@@ -3,6 +3,7 @@ name: gateguard
|
|
|
3
3
|
tier: "1"
|
|
4
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
5
|
origin: community
|
|
6
|
+
user-invocable: false
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# GateGuard — Fact-Forcing Pre-Action Gate
|
|
@@ -96,30 +97,37 @@ A second Claude/Codex/Maulana session can be running on the same host and the sa
|
|
|
96
97
|
|
|
97
98
|
**On the first Edit / Write / mutating Bash of a session:**
|
|
98
99
|
|
|
100
|
+
Run [`scripts/git-state-snapshot.sh`](../scripts/git-state-snapshot.sh) and quote its JSON envelope verbatim. Example output:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
{"head":"966ce51","upstream":"966ce51","dirty":0,"root":"/path/to/repo","branch":"main"}
|
|
99
104
|
```
|
|
100
|
-
Baseline these three values and quote them in your response:
|
|
101
105
|
|
|
102
|
-
|
|
103
|
-
2. `git rev-parse @{u}` (if branch tracks an upstream) — record where origin was
|
|
104
|
-
3. `git status --porcelain` — record the working tree state
|
|
106
|
+
Field meanings:
|
|
105
107
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
1. `head` — short SHA of the commit you started on
|
|
109
|
+
2. `upstream` — short SHA of `@{u}` if the branch tracks an upstream, else the literal `"none"`
|
|
110
|
+
3. `dirty` — integer count of `git status --porcelain` lines (0 == clean)
|
|
111
|
+
4. `root` — repo root path from `git rev-parse --show-toplevel`
|
|
112
|
+
5. `branch` — current branch name, or the literal `"detached"`
|
|
113
|
+
|
|
114
|
+
If `upstream` is `"none"` or `branch` is `"detached"`, say so explicitly. Do not proceed past the baseline silently. If the script exits non-zero (output is `{"error":"not-a-git-repo"}`), HALT — the harness is not running in a git checkout and no mutation should land here.
|
|
109
115
|
|
|
110
116
|
**On every subsequent Edit / Write / mutating Bash, before allowing the action:**
|
|
111
117
|
|
|
112
|
-
|
|
113
|
-
Re-check the three baselines against current state:
|
|
118
|
+
Re-run [`scripts/git-state-snapshot.sh`](../scripts/git-state-snapshot.sh) and diff against the baseline:
|
|
114
119
|
|
|
115
|
-
1. `
|
|
116
|
-
2. `
|
|
117
|
-
3. `
|
|
120
|
+
1. `head` — has it advanced past your baseline without your commits?
|
|
121
|
+
2. `upstream` — did upstream move while you worked?
|
|
122
|
+
3. `dirty` — are there modifications you did not introduce (count increased)?
|
|
123
|
+
4. `branch` — did the working tree switch branches under you?
|
|
118
124
|
|
|
119
125
|
If ANY of those drifted from baseline, HALT. Emit:
|
|
120
|
-
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
Parallel-actor divergence: <field> moved from <baseline> to <current>.
|
|
121
129
|
Working tree may belong to another session. Stop, surface to operator,
|
|
122
|
-
get clearance before next mutation.
|
|
130
|
+
get clearance before next mutation.
|
|
123
131
|
```
|
|
124
132
|
|
|
125
133
|
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.
|
|
@@ -132,14 +140,25 @@ This gate is what catches the squash-merge / ahead-of-origin trap recorded in th
|
|
|
132
140
|
|
|
133
141
|
Smoke-test the runtime gate after install: ask Claude to write a throwaway file with no research first. The hook should return a `block` decision with a fact-list reason; Claude should pause rather than write.
|
|
134
142
|
|
|
143
|
+
### Clearing the gate (after presenting the facts)
|
|
144
|
+
|
|
145
|
+
The block reason prints the exact `gateguard-session.json` path and the clearance commands. Clearance matches a file regardless of drive-letter case or path separator (`d:\x` and `D:/x` resolve to the same key), so it no longer matters whether the hook and the helper spelled the project root differently. Any one of these allows the retry:
|
|
146
|
+
|
|
147
|
+
- **MCP tool** (beginner + expert): `ci_gateguard_clear` with `file_paths: ["<path>", …]`.
|
|
148
|
+
- **CLI** (Bash, never gated): `node "${CLAUDE_PLUGIN_ROOT}/bin/gateguard-clear.mjs" "<path>"`; add `--state <gateguard-session.json>` to write the exact file the block reason printed.
|
|
149
|
+
- **Manual**: append each path to `cleared_files` in the printed `gateguard-session.json` via a non-destructive Bash write.
|
|
150
|
+
|
|
151
|
+
The inline `_gateguard_facts_presented: true` retry still works on harnesses that forward unknown tool params, but Claude Code's strict tool schema (`additionalProperties: false`) rejects it with `InputValidationError` — use one of the above on Claude Code.
|
|
152
|
+
|
|
135
153
|
### V1 honest limitations (not mitigated, documented)
|
|
136
154
|
|
|
137
|
-
- **Honor system.**
|
|
155
|
+
- **Honor system.** Clearance is recorded by `ci_gateguard_clear`, the `gateguard-clear.mjs` CLI, a manual state-file write, or the inline `_gateguard_facts_presented` flag where the harness allows it (see "Clearing the gate" above). The hook can't verify the investigation actually happened; the 50-file cap bounds damage from stuck loops or rogue agents.
|
|
138
156
|
- **State-file deletion.** `rm`-ing the session state resets every gate. Acceptable because the session itself is the trust boundary.
|
|
139
157
|
- **Parallel-hook race.** Two simultaneous hook invocations can race the read+write of the state file. Acceptable trade-off vs Windows atomic-rename complexity.
|
|
140
|
-
- **MultiEdit V1.** Currently gates on `edits[0].file_path` only. Per-file batching is a TODO.
|
|
141
158
|
|
|
142
|
-
|
|
159
|
+
**MultiEdit per-file gating.** The hook clears and checks every `edits[]` path individually, so a mixed-clearance batch blocks until *all* edited files are cleared or facts are presented. The block reason now names the whole batch, not just the first uncleared path.
|
|
160
|
+
|
|
161
|
+
These behaviors are documented in `src/hooks/gateguard.mts` and `src/lib/gateguard-state.mts` headers.
|
|
143
162
|
|
|
144
163
|
### Future: third-party `gateguard-ai` package
|
|
145
164
|
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: goal-monitor
|
|
3
|
+
tier: "2"
|
|
4
|
+
description: Enforces Law 2 (Plan Is Sacred) of the 7 Laws of AI Agent Discipline. Detects when a session has drifted away from its stated goal by scoring recent tool activity against the '## Goal' section of task_plan.md, so drift is caught mid-session instead of at end-of-session reflection.
|
|
5
|
+
origin: continuous-improvement
|
|
6
|
+
user-invocable: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Goal Monitor — Continuous Drift Detection
|
|
10
|
+
|
|
11
|
+
A "Clear Goal" discipline: a stated goal is only useful if something keeps checking the work against it. `task_plan.md` captures the goal once; this skill turns it into a recurring check so a session that has quietly wandered off into unrelated files surfaces the drift while there is still budget to course-correct.
|
|
12
|
+
|
|
13
|
+
## When to Activate
|
|
14
|
+
|
|
15
|
+
- After a long stretch of edits, before claiming progress on the original goal.
|
|
16
|
+
- When you suspect the work has sprawled across unrelated areas of the codebase.
|
|
17
|
+
- Before a checkpoint or handoff, to confirm the session stayed on its stated goal.
|
|
18
|
+
- Any time the goal in `task_plan.md` and the actual tool activity might have diverged.
|
|
19
|
+
|
|
20
|
+
## Core Concept
|
|
21
|
+
|
|
22
|
+
Law 2 says the plan is sacred. But "sacred" is hollow if nothing measures adherence. Goal Monitor scores the most recent observations against the goal and reports one of three states:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
ON GOAL — recent activity relates to the goal (score >= threshold)
|
|
26
|
+
DRIFT — most recent activity is unrelated, or touched forbidden paths
|
|
27
|
+
NO DATA — not enough observations in the window yet
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The score is the fraction of recent observations whose tool name, input, or output references a goal keyword — or whose edited path falls under a goal-scope glob.
|
|
31
|
+
|
|
32
|
+
## Goal Source
|
|
33
|
+
|
|
34
|
+
The check reads, in order:
|
|
35
|
+
|
|
36
|
+
1. `task_plan.md` in the project root (seeded by `ci_plan_init` / `/planning-with-files`).
|
|
37
|
+
2. `~/.claude/instincts/<project-hash>/goal.md` (fallback for non-repo sessions).
|
|
38
|
+
3. An explicit `goal_file` argument, if provided.
|
|
39
|
+
|
|
40
|
+
The plan needs a `## Goal` section. Two optional sections sharpen the signal:
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
## Goal
|
|
44
|
+
Implement OAuth login with JWT session tokens for the auth service.
|
|
45
|
+
|
|
46
|
+
## Goal Keywords
|
|
47
|
+
oauth, jwt, login, session
|
|
48
|
+
|
|
49
|
+
## Goal Scope
|
|
50
|
+
paths: src/auth/**, test/auth/**
|
|
51
|
+
forbidden: src/marketing/**
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
When `## Goal Keywords` is absent, keywords are auto-extracted from the goal prose (stopwords and short tokens dropped). `## Goal Scope` is optional: `paths` globs count as on-goal matches; `forbidden` globs are a hard drift signal even when keywords also match.
|
|
55
|
+
|
|
56
|
+
## How to Invoke
|
|
57
|
+
|
|
58
|
+
The check is exposed as the `ci_goal_check` MCP tool (expert mode) and the `/goal-check` slash command:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
ci_goal_check # score the last 30 observations against task_plan.md
|
|
62
|
+
ci_goal_check limit=50 # widen the window
|
|
63
|
+
ci_goal_check goal_file=docs/x.md # score against a specific plan file
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Acting on the Result
|
|
67
|
+
|
|
68
|
+
- **ON GOAL** — proceed; the plan and the work agree.
|
|
69
|
+
- **DRIFT** — stop and decide explicitly: either steer back to the goal, or, if the goal has legitimately changed, update the `## Goal` section so the plan stays the single source of truth. Do not silently let the work and the plan disagree — that is exactly the Law 2 violation this skill exists to catch.
|
|
70
|
+
- **NO DATA** — keep working; the observation window is still filling.
|
|
71
|
+
|
|
72
|
+
## Limitations
|
|
73
|
+
|
|
74
|
+
- Keyword scoring is lexical, not semantic: a goal that says "login" will not match activity that only ever says "authentication". Add synonyms to `## Goal Keywords` when vocabulary diverges.
|
|
75
|
+
- A deliberately broad goal ("refactor the whole repo") will score nearly everything as on-goal. Use `## Goal Scope` to add precision when the goal is narrow.
|
|
76
|
+
|
|
77
|
+
## Pairs With
|
|
78
|
+
|
|
79
|
+
- **`proceed-with-the-recommendation`** (orchestrator, Law 2) — run a goal check at phase boundaries to confirm the plan still matches the work.
|
|
80
|
+
- **`para-memory-files`** / planning-with-files — the `## Goal` section this skill reads is the same one those workflows write.
|
|
81
|
+
- **`strategic-compact`** — before compacting a long session, a goal check confirms what the session was actually about.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grill-me
|
|
3
|
+
tier: "2"
|
|
4
|
+
description: Enforces Law 1 (Research Before Executing) of the 7 Laws of AI Agent Discipline. Interview the user relentlessly about a plan or design until shared understanding is reached, resolving every branch of the decision tree before any code is written. Ported from mattpocock/skills under MIT.
|
|
5
|
+
origin: https://github.com/mattpocock/skills
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /grill-me — Interrogate the plan before executing it
|
|
9
|
+
|
|
10
|
+
Ported verbatim in behavior from [mattpocock/skills `productivity/grill-me`](https://github.com/mattpocock/skills/blob/main/skills/productivity/grill-me/SKILL.md) (MIT, © 2026 Matt Pocock). Cold-storage snapshot at [`third-party/mattpocock-skills/skills/productivity/grill-me/SKILL.md`](../third-party/mattpocock-skills/skills/productivity/grill-me/SKILL.md); SHA pin in [`third-party/MANIFEST.md`](../third-party/MANIFEST.md).
|
|
11
|
+
|
|
12
|
+
## What this skill does
|
|
13
|
+
|
|
14
|
+
Interview the user relentlessly about every aspect of the plan until shared understanding is reached. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide a recommended answer.
|
|
15
|
+
|
|
16
|
+
Ask questions one at a time.
|
|
17
|
+
|
|
18
|
+
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
19
|
+
|
|
20
|
+
## When to fire it
|
|
21
|
+
|
|
22
|
+
- The user has just stated a goal at a high level ("add auth", "speed up the API") with no spec underneath.
|
|
23
|
+
- A `/proceed-with-the-recommendation` walk is about to start but the recommendation list itself is ambiguous about scope or success criteria.
|
|
24
|
+
- An RFC, PRD, or plan doc is being drafted and the user wants pressure on the assumptions before writing it.
|
|
25
|
+
- The user types "grill me", "stress-test this plan", or "interview me about X".
|
|
26
|
+
- `gateguard` is firing because the agent does not have enough grounding to proceed safely on a Write/Edit/Bash — alignment is missing, not just facts.
|
|
27
|
+
|
|
28
|
+
## How it differs from `gateguard`
|
|
29
|
+
|
|
30
|
+
`gateguard` is a tool-boundary gate that blocks Edit / Write / Bash until the agent provides concrete investigation (importers, schemas, user instruction). It catches the case where the agent thinks it knows enough to mutate state. `grill-me` is the conversational layer one floor above: it surfaces the missing decisions before any tool call would even be attempted. They compose:
|
|
31
|
+
|
|
32
|
+
| Gap | Caught by |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Agent has no spec, no plan — about to invent one | `grill-me` |
|
|
35
|
+
| Agent has a plan but specific branches are under-specified | `grill-me` |
|
|
36
|
+
| Agent is about to Edit / Write / Bash without grounding | `gateguard` |
|
|
37
|
+
| Plan exists, grounded, but the implementation drifts | `verification-loop`, `tdd-workflow` |
|
|
38
|
+
|
|
39
|
+
## Interview discipline
|
|
40
|
+
|
|
41
|
+
Five rules the agent should hold while grilling:
|
|
42
|
+
|
|
43
|
+
1. **One question at a time.** Multi-question turns let the user skim and answer the easy ones. Force depth on each branch.
|
|
44
|
+
2. **Always recommend.** Every question carries a "my answer would be X because Y" so the user can confirm, override, or expose a third option you hadn't considered.
|
|
45
|
+
3. **Explore before asking.** If `grep` / `ls` / a quick read can answer the question, do that first. Do not waste user attention on questions the codebase already answers.
|
|
46
|
+
4. **Walk the tree, do not jump.** Resolve dependencies in order — do not ask about deployment if you have not pinned the data model yet.
|
|
47
|
+
5. **Stop when the spec is shippable.** The end state is a plan a fresh agent could execute cold, not an endless interview. When the next agent could pick up the doc and run, stop.
|
|
48
|
+
|
|
49
|
+
## How it fits the 7 Laws
|
|
50
|
+
|
|
51
|
+
| Law | Role of this skill |
|
|
52
|
+
|---|---|
|
|
53
|
+
| Law 1 (Research Before Executing) | Pre-execution interrogation closes the alignment gap that misaligns the agent with the user before any tool call. |
|
|
54
|
+
| Law 2 (Plan Is Sacred) | The interview produces a plan grounded in real decisions, not invented defaults. |
|
|
55
|
+
| Law 4 (Verify Before Reporting) | Every recommended answer is a falsifiable claim the user can correct in the moment. |
|
|
56
|
+
|
|
57
|
+
## Companion / alternative skills
|
|
58
|
+
|
|
59
|
+
- [`gateguard`](./gateguard.md) — tool-boundary gate; blocks Edit / Write / Bash until grounding is presented. Fires after `grill-me` has aligned the spec.
|
|
60
|
+
- [`workspace-surface-audit`](./workspace-surface-audit.md) — Law 1 surface audit; inventory of MCP servers, plugins, env, hooks. Use when the missing context is "what is available in this repo" rather than "what should we build."
|
|
61
|
+
- [`superpowers:brainstorming`](https://github.com/obra/superpowers/blob/main/skills/brainstorming/SKILL.md) — Socratic design refinement. Use for open-ended ideation; use `grill-me` once the idea is committed and needs hardening.
|
|
62
|
+
- [`handoff`](./handoff.md) — session-end compaction. Pair with `grill-me`: grill at start, handoff at end.
|
|
63
|
+
|
|
64
|
+
## Attribution
|
|
65
|
+
|
|
66
|
+
This skill is a port of [mattpocock/skills `productivity/grill-me`](https://github.com/mattpocock/skills/blob/main/skills/productivity/grill-me/SKILL.md). MIT-licensed upstream, MIT-licensed here. See [`third-party/mattpocock-skills/LICENSE`](../third-party/mattpocock-skills/LICENSE) for the verbatim license and [`third-party/mattpocock-skills/OUR_NOTES.md`](../third-party/mattpocock-skills/OUR_NOTES.md) for the vendoring rationale and drift radar.
|