continuous-improvement 3.8.0 → 3.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -14
- package/CHANGELOG.md +25 -0
- package/LICENSE +21 -21
- package/QUICKSTART.md +148 -101
- package/README.md +50 -18
- package/action.yml +33 -33
- package/bin/analyze.sh +161 -161
- package/bin/backfill.mjs +19 -19
- package/bin/check-doc-runtime-claims.mjs +120 -0
- package/bin/generate-plugin-manifests.mjs +2 -0
- package/bin/hook-stats.mjs +21 -21
- package/bin/install.mjs +51 -44
- package/bin/mcp-server.mjs +43 -40
- package/bin/refresh-third-party.mjs +416 -416
- package/commands/continuous-improvement.md +115 -115
- package/commands/dashboard.md +56 -56
- package/commands/discipline.md +51 -51
- package/commands/proceed-with-the-recommendation.md +62 -62
- package/commands/seven-laws.md +16 -16
- package/commands/superpowers.md +119 -92
- package/commands/workspace-surface-audit.md +77 -77
- package/hooks/gateguard.mjs +172 -0
- package/hooks/observe.sh +172 -172
- package/hooks/session.sh +106 -106
- package/hooks/three-section-close.mjs +181 -181
- 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 +85 -0
- package/lib/plugin-metadata.mjs +25 -18
- package/llms.txt +68 -68
- package/package.json +3 -2
- package/plugins/beginner.json +1 -1
- package/plugins/continuous-improvement/.claude-plugin/marketplace.json +1 -1
- package/plugins/continuous-improvement/.claude-plugin/plugin.json +1 -1
- package/plugins/continuous-improvement/LICENSE +21 -21
- package/plugins/continuous-improvement/README.md +1 -0
- package/plugins/continuous-improvement/agents/README.md +120 -0
- package/plugins/continuous-improvement/agents/code-reviewer.md +97 -0
- package/plugins/continuous-improvement/agents/security-auditor.md +101 -0
- package/plugins/continuous-improvement/agents/test-engineer.md +95 -0
- package/plugins/continuous-improvement/bin/backfill.mjs +19 -19
- package/plugins/continuous-improvement/bin/mcp-server.mjs +43 -40
- 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 +51 -51
- package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +62 -62
- package/plugins/continuous-improvement/commands/seven-laws.md +16 -16
- package/plugins/continuous-improvement/commands/superpowers.md +119 -92
- package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -77
- package/plugins/continuous-improvement/hooks/gateguard.mjs +172 -0
- package/plugins/continuous-improvement/hooks/hooks.json +6 -1
- package/plugins/continuous-improvement/hooks/observe.sh +172 -172
- package/plugins/continuous-improvement/hooks/session.sh +106 -106
- package/plugins/continuous-improvement/hooks/three-section-close.mjs +181 -181
- 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/plugin-metadata.mjs +25 -18
- package/plugins/continuous-improvement/skills/README.md +4 -1
- package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +47 -0
- package/plugins/continuous-improvement/skills/gateguard/SKILL.md +17 -9
- package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +108 -108
- package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +1 -8
- package/plugins/continuous-improvement/skills/ralph/SKILL.md +221 -221
- package/plugins/continuous-improvement/skills/recovery-classification/SKILL.md +73 -0
- package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +76 -76
- package/plugins/continuous-improvement/skills/state-reconciliation/SKILL.md +63 -0
- package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +104 -104
- package/plugins/continuous-improvement/skills/superpowers/SKILL.md +22 -15
- package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -411
- package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +136 -136
- package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +32 -0
- package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +191 -191
- package/plugins/continuous-improvement/skills/worktree-safety/SKILL.md +66 -0
- package/plugins/expert.json +1 -1
- package/skills/README.md +79 -79
- package/skills/deploy-receipt.md +47 -0
- package/skills/gateguard.md +17 -9
- package/skills/para-memory-files.md +108 -108
- package/skills/proceed-with-the-recommendation.md +1 -8
- package/skills/ralph.md +221 -221
- package/skills/recovery-classification.md +73 -0
- package/skills/safety-guard.md +76 -76
- package/skills/state-reconciliation.md +63 -0
- package/skills/strategic-compact.md +104 -104
- package/skills/superpowers.md +22 -15
- package/skills/tdd-workflow.md +411 -411
- package/skills/token-budget-advisor.md +136 -136
- package/skills/verification-loop.md +32 -0
- package/skills/wild-risa-balance.md +191 -191
- package/skills/worktree-safety.md +66 -0
- package/templates/insights-claude-md.md +91 -0
- package/templates/verify-ladder.example.json +37 -24
|
@@ -1,191 +1,191 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: wild-risa-balance
|
|
3
|
-
tier: "2"
|
|
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
|
-
origin: continuous-improvement
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# WILD / RISA Balance
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
- Emitting a multi-item recommendation block (≥3 items)
|
|
13
|
-
- Choosing between a safe option and a bold option
|
|
14
|
-
- Reviewing your own plan for over-cautiousness or over-fantasy
|
|
15
|
-
- Pairing with `proceed-with-the-recommendation` to decide which items belong above and below the cut
|
|
16
|
-
|
|
17
|
-
## The Two Modes
|
|
18
|
-
|
|
19
|
-
### RISA (Execution)
|
|
20
|
-
|
|
21
|
-
- **R**ealistic — fits the constraints in front of you
|
|
22
|
-
- **I**mportant — moves a stated goal, not a vanity metric
|
|
23
|
-
- **S**pecific — names files, commands, or owners
|
|
24
|
-
- **A**greeable — the operator can approve it without a meeting
|
|
25
|
-
|
|
26
|
-
If you only stay in RISA, you ship safe, average results.
|
|
27
|
-
|
|
28
|
-
### WILD (Creation)
|
|
29
|
-
|
|
30
|
-
- **W**ild — breaks the default frame
|
|
31
|
-
- **I**maginative — invents an option that did not exist a minute ago
|
|
32
|
-
- **L**imitless — ignores current budget, headcount, or stack
|
|
33
|
-
- **D**isruptive — replaces a workflow rather than tuning it
|
|
34
|
-
|
|
35
|
-
If you only stay in WILD, you generate cool ideas that never ship.
|
|
36
|
-
|
|
37
|
-
## The Trap
|
|
38
|
-
|
|
39
|
-
RISA alone produces a backlog of incremental fixes that never compound. WILD alone produces a graveyard of demos that never reach production. The bigger failure is unconscious switching: drifting into WILD during execution, or drifting into RISA during brainstorming, without naming the switch. Name the mode you are in before you write the next line.
|
|
40
|
-
|
|
41
|
-
## Switching Deliberately
|
|
42
|
-
|
|
43
|
-
| Phase | Mode | Why |
|
|
44
|
-
|-------------------------|-------|----------------------------------------------------|
|
|
45
|
-
| Brainstorm | WILD | Quantity and range beat early filtering |
|
|
46
|
-
| Roadmap framing | WILD | Frame the bigger bet before scoping it down |
|
|
47
|
-
| Per-item recommendation | Mixed | Top items can be WILD, baseline items must be RISA |
|
|
48
|
-
| Per-item execution | RISA | One thing, verified, shipped |
|
|
49
|
-
| Verification | RISA | Reality check, no new invention |
|
|
50
|
-
| Reflection | WILD | Counterfactuals, "what would have been bolder" |
|
|
51
|
-
|
|
52
|
-
WILD owns generation phases. RISA owns execution phases. The switch is intentional, not accidental.
|
|
53
|
-
|
|
54
|
-
## How to Apply in a Recommendation List
|
|
55
|
-
|
|
56
|
-
When this skill is in play, every recommendation block ships **at least 7 items**, split as:
|
|
57
|
-
|
|
58
|
-
1. **Top block — WILD pilots: exactly 2 bold items.** Present both; the operator picks at most one to actually run. If you cannot find a second genuinely bold option, stretch — do not pad with a safe item dressed up as wild.
|
|
59
|
-
2. **Bottom block — RISA baseline: at least 5 safe items.** These ship now regardless of the WILD bet. If you cannot reach 5, the surface is under-explored — expand scope before emitting the list.
|
|
60
|
-
3. Within each block, rank descending by impact.
|
|
61
|
-
4. Once the list is composed, wait for the operator's "proceed" signal before invoking `proceed-with-the-recommendation`. Never auto-trigger it. This skill only changes how the list is composed.
|
|
62
|
-
|
|
63
|
-
Total floor: **2 WILD + 5 RISA = 7 items minimum.** Going above is fine; going below means the skill was not applied.
|
|
64
|
-
|
|
65
|
-
The point: the operator gets a real WILD/RISA contrast (2 bold bets weighed against a 5-deep trusted baseline), not a flat list where the bold option silently competes with safe ones and loses by default.
|
|
66
|
-
|
|
67
|
-
## Audience Tiers (beginner vs expert)
|
|
68
|
-
|
|
69
|
-
Recommendation blocks ship in **two tiers** depending on the operator's signaled level. The 2 WILD + ≥5 RISA floor described above is the **expert** tier. Beginners get a different, lighter shape. The point: under-load for experts and overload for beginners are both failure modes — splitting the format prevents both.
|
|
70
|
-
|
|
71
|
-
### Tier selection
|
|
72
|
-
|
|
73
|
-
**Default = expert.** Switch to beginner only when one of these triggers fires:
|
|
74
|
-
|
|
75
|
-
- **Explicit flag** — the operator types `/beginner` or refers to themselves as a beginner ("for beginner", "as a beginner", "I'm new to this").
|
|
76
|
-
- **Explicit lite framing** — "simple list", "just the top 3", "small list", "short version", "no need for surgical".
|
|
77
|
-
- **Auto-detect heuristic** — the **first message of the thread** contains any of: `beginner`, `new to (this|claude|the system)`, `simple`, `explain like`, `first time`, `i'm just starting`, `i'm learning`. Single-message false positives are acceptable — the operator flips with `/expert` if mismatched.
|
|
78
|
-
|
|
79
|
-
The operator can override mid-thread: `/expert` switches back to WILD+RISA, `/beginner` switches back to the lite tier. Apply the most recently named tier.
|
|
80
|
-
|
|
81
|
-
### Beginner tier (lite shape)
|
|
82
|
-
|
|
83
|
-
When in beginner tier:
|
|
84
|
-
|
|
85
|
-
- **3 minimum, 5 maximum** items. No padding past 5. Below 3 means there is no recommendation — write `Recommendation: no`.
|
|
86
|
-
- **Goal-driven** — each item names the outcome, not the mechanism. Format: `<verb> <thing> → <observable result>`.
|
|
87
|
-
- **Execution-first** — each item is a concrete next action, not a tradeoff to weigh.
|
|
88
|
-
- **One-shot, iterate from there** — no "surgical change" framing, no phased sequencing, no commit-size gates. Get to a working pass, then improve.
|
|
89
|
-
- **Optimized for the latest Opus model (Opus 4.7 at time of writing)** — assume the model holds the full task in one shot. Do not pre-decompose into micro-steps that fight the model's reasoning depth. Lean on broader, outcome-shaped instructions over fine-grained scripts.
|
|
90
|
-
- Order: descending impact.
|
|
91
|
-
- No WILD/RISA labels. No counts annotation. No tiered tables.
|
|
92
|
-
|
|
93
|
-
### Expert tier (default for Naim, default in this repo)
|
|
94
|
-
|
|
95
|
-
The full WILD+RISA structure documented above: ≥7 items, exactly 2 WILD + ≥5 RISA, WILD on top descending, RISA below descending, counts annotated inline.
|
|
96
|
-
|
|
97
|
-
Each item still leads with the outcome inside both WILD and RISA: `<verb> <thing> → <observable result>`.
|
|
98
|
-
|
|
99
|
-
### Tier signal in the 3-section close
|
|
100
|
-
|
|
101
|
-
When Phase 7's three-section close lands, the `## Recommendation` header carries an explicit tier suffix:
|
|
102
|
-
|
|
103
|
-
- Expert: `## Recommendation (expert)`
|
|
104
|
-
- Beginner: `## Recommendation (beginner)`
|
|
105
|
-
|
|
106
|
-
The Stop hook regex (`^#+ +Recommendation(?:\s|$)`) already accepts both forms — the suffix is documentation, not a gate. The point is a self-describing audit trail: a future reader (or an instinct scan) can tell which tier was applied without re-deriving it from item count or label presence.
|
|
107
|
-
|
|
108
|
-
### The "no" escape valve (both tiers)
|
|
109
|
-
|
|
110
|
-
If neither tier can produce a real recommendation — every candidate item would be padding, or you cannot reach the tier's floor (3 for beginner, 7 for expert) without inventing busywork — write `Recommendation: no` and stop. This applies to **both tiers equally**.
|
|
111
|
-
|
|
112
|
-
`no` is not absence. It is an explicit signal that the current session or perspective is exhausted on this surface and the operator should switch context: a fresh session (cold prompt cache, no carryover bias), a different specialist agent (different perspective on the same problem), a different framing (re-scoping the goal), or sleep on it. Padding to hit the floor is the failure mode this escape exists to prevent — a flat 3-item beginner list of "review the README, run the tests, commit your changes" is worse than `Recommendation: no` because it disguises an empty thought as work.
|
|
113
|
-
|
|
114
|
-
When `no` ships, the Phase 7 close header still carries the tier suffix (`## Recommendation (expert)` or `## Recommendation (beginner)`) so the audit trail records which tier exhausted itself, and the body is just the literal `no` on its own line. No tiered tables, no WILD/RISA blocks, no "Want me to: A or B?" closer.
|
|
115
|
-
|
|
116
|
-
## Proactive Roadmap Surfacing (surface, do not execute)
|
|
117
|
-
|
|
118
|
-
A "wait for instructions" agent fails by silence — sitting on a known next step (visible roadmap, deferred item from a prior session) until told. A "proactive" agent fails by running that step without being asked. Both lose. Surface bridges them: raise the next step as a recommendation item, never as a fait accompli.
|
|
119
|
-
|
|
120
|
-
### Trigger conditions
|
|
121
|
-
|
|
122
|
-
Surface a next step when any of these are true:
|
|
123
|
-
|
|
124
|
-
- A persistent roadmap names an undone step — MemoryCore `current-session.md`, `docs/plans/*`, `⚠️ Deferred` entries in a project `CLAUDE.md`, or pending operator actions logged in MemoryCore.
|
|
125
|
-
- The current task is finished and a stated session goal implies the next one.
|
|
126
|
-
- The session has drifted from a stated roadmap (asked to do A, but B is now blocked by A's choice).
|
|
127
|
-
- An instinct or memory record predicts a near-term action the operator typically forgets (e.g., "rotate keys before next deploy", "push branch after N commits").
|
|
128
|
-
|
|
129
|
-
### Hard boundary — surface, do not execute
|
|
130
|
-
|
|
131
|
-
Surfacing emits the next step as a recommendation item. It does **not** mean running the command, editing the file, or shipping the change. Execution still requires explicit "proceed", "go", "run it", or equivalent. The boundary is non-negotiable:
|
|
132
|
-
|
|
133
|
-
- Global CLAUDE.md: "If instructions conflict or information is missing, stop and ask."
|
|
134
|
-
- Auto Mode: even in autonomous execution, "anything that deletes data or modifies shared or production systems still needs explicit user confirmation."
|
|
135
|
-
- Trust is asymmetric — one unauthorized "helpful" action costs more than a hundred missed surfacings. Recovery is one-way.
|
|
136
|
-
|
|
137
|
-
### Format
|
|
138
|
-
|
|
139
|
-
A surfaced item lives inside the normal RISA block. Mark it inline as `(surfaced — <source>)` so the operator can tell which items came from the roadmap vs. the current request:
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
RISA baseline — ship regardless (5 of ≥5)
|
|
143
|
-
1. Run remote D1 migration before next deploy → unblocks Close/Cancel admin button. (surfaced — pending operator action since 2026-05-04)
|
|
144
|
-
2. ...
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
A WILD-tier reframe of the roadmap itself (not a single deferred step, but a re-shape of the whole next phase) goes in the WILD block instead, with the same `(surfaced — <source>)` marker.
|
|
148
|
-
|
|
149
|
-
### Anti-patterns
|
|
150
|
-
|
|
151
|
-
- Re-surfacing an item the operator explicitly deferred — once is a reminder, three times is nagging. After one repeat, log the defer reason to memory and stop.
|
|
152
|
-
- Surfacing speculative steps with no source in any roadmap or memory ("you should also consider…" without a citation).
|
|
153
|
-
- Bundling a surface with execution ("I went ahead and started X"). Surface, wait, execute on go.
|
|
154
|
-
- Treating absence of a roadmap as license to invent one — if no roadmap exists and none was requested, ask before drafting.
|
|
155
|
-
|
|
156
|
-
The point: the operator never has to remember a deferred item, and never has to forgive an unauthorized one. Both at once.
|
|
157
|
-
|
|
158
|
-
## Integration with the 7 Laws
|
|
159
|
-
|
|
160
|
-
| Mode | Reinforces | Tempered by |
|
|
161
|
-
|------|---------------------------------------------------------|--------------------------|
|
|
162
|
-
| RISA | Law 2 (Plan), Law 3 (One Thing), Law 4 (Verify) | Law 6 (Iterate One Thing) |
|
|
163
|
-
| WILD | Law 1 (Research — broader exploration), Law 5 (Reflect) | Law 6 (Iterate One Thing) |
|
|
164
|
-
|
|
165
|
-
Both modes pass through Law 6 before execution. WILD without Law 6 is a wishlist. RISA without Law 6 ships safe fixes while the real bottleneck waits.
|
|
166
|
-
|
|
167
|
-
## Example
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
Recommendations (descending impact within each block)
|
|
171
|
-
|
|
172
|
-
WILD pilots — pick at most one (2 of 2)
|
|
173
|
-
1. Replace the current review workflow with a single adversarial pair.
|
|
174
|
-
2. Drop the staging environment in favor of feature-flagged production.
|
|
175
|
-
|
|
176
|
-
RISA baseline — ship regardless (5 of ≥5)
|
|
177
|
-
1. Add the missing test for the failure path noted in verification.
|
|
178
|
-
2. Rename the ambiguous flag to match its actual behavior.
|
|
179
|
-
3. Backfill the type on the public export that currently widens to `any`.
|
|
180
|
-
4. Wire the existing Stop hook into the new skill's checklist gate.
|
|
181
|
-
5. Update the README mirror so the bundled plugin matches the source skill. (surfaced — verify:skill-mirror gate flagged drift in last CI run)
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
Total: 7 items (2 WILD + 5 RISA). That is the floor — emit more on either side if the surface warrants it. The fifth RISA item is marked `(surfaced — <source>)` to demonstrate the convention from the Proactive Roadmap Surfacing section: items lifted from a roadmap or memory carry an inline source attribution so the operator can tell roadmap-driven items apart from current-request items.
|
|
185
|
-
|
|
186
|
-
## Related
|
|
187
|
-
|
|
188
|
-
- `continuous-improvement` — the 7 Laws card (core skill)
|
|
189
|
-
- `proceed-with-the-recommendation` — execution arm; carries surfaced items across the surface → execute boundary defined in the Proactive Roadmap Surfacing section above
|
|
190
|
-
- `superpowers:brainstorming` — upstream WILD generator
|
|
191
|
-
- `verification-loop` — downstream RISA verifier
|
|
1
|
+
---
|
|
2
|
+
name: wild-risa-balance
|
|
3
|
+
tier: "2"
|
|
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
|
+
origin: continuous-improvement
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# WILD / RISA Balance
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- Emitting a multi-item recommendation block (≥3 items)
|
|
13
|
+
- Choosing between a safe option and a bold option
|
|
14
|
+
- Reviewing your own plan for over-cautiousness or over-fantasy
|
|
15
|
+
- Pairing with `proceed-with-the-recommendation` to decide which items belong above and below the cut
|
|
16
|
+
|
|
17
|
+
## The Two Modes
|
|
18
|
+
|
|
19
|
+
### RISA (Execution)
|
|
20
|
+
|
|
21
|
+
- **R**ealistic — fits the constraints in front of you
|
|
22
|
+
- **I**mportant — moves a stated goal, not a vanity metric
|
|
23
|
+
- **S**pecific — names files, commands, or owners
|
|
24
|
+
- **A**greeable — the operator can approve it without a meeting
|
|
25
|
+
|
|
26
|
+
If you only stay in RISA, you ship safe, average results.
|
|
27
|
+
|
|
28
|
+
### WILD (Creation)
|
|
29
|
+
|
|
30
|
+
- **W**ild — breaks the default frame
|
|
31
|
+
- **I**maginative — invents an option that did not exist a minute ago
|
|
32
|
+
- **L**imitless — ignores current budget, headcount, or stack
|
|
33
|
+
- **D**isruptive — replaces a workflow rather than tuning it
|
|
34
|
+
|
|
35
|
+
If you only stay in WILD, you generate cool ideas that never ship.
|
|
36
|
+
|
|
37
|
+
## The Trap
|
|
38
|
+
|
|
39
|
+
RISA alone produces a backlog of incremental fixes that never compound. WILD alone produces a graveyard of demos that never reach production. The bigger failure is unconscious switching: drifting into WILD during execution, or drifting into RISA during brainstorming, without naming the switch. Name the mode you are in before you write the next line.
|
|
40
|
+
|
|
41
|
+
## Switching Deliberately
|
|
42
|
+
|
|
43
|
+
| Phase | Mode | Why |
|
|
44
|
+
|-------------------------|-------|----------------------------------------------------|
|
|
45
|
+
| Brainstorm | WILD | Quantity and range beat early filtering |
|
|
46
|
+
| Roadmap framing | WILD | Frame the bigger bet before scoping it down |
|
|
47
|
+
| Per-item recommendation | Mixed | Top items can be WILD, baseline items must be RISA |
|
|
48
|
+
| Per-item execution | RISA | One thing, verified, shipped |
|
|
49
|
+
| Verification | RISA | Reality check, no new invention |
|
|
50
|
+
| Reflection | WILD | Counterfactuals, "what would have been bolder" |
|
|
51
|
+
|
|
52
|
+
WILD owns generation phases. RISA owns execution phases. The switch is intentional, not accidental.
|
|
53
|
+
|
|
54
|
+
## How to Apply in a Recommendation List
|
|
55
|
+
|
|
56
|
+
When this skill is in play, every recommendation block ships **at least 7 items**, split as:
|
|
57
|
+
|
|
58
|
+
1. **Top block — WILD pilots: exactly 2 bold items.** Present both; the operator picks at most one to actually run. If you cannot find a second genuinely bold option, stretch — do not pad with a safe item dressed up as wild.
|
|
59
|
+
2. **Bottom block — RISA baseline: at least 5 safe items.** These ship now regardless of the WILD bet. If you cannot reach 5, the surface is under-explored — expand scope before emitting the list.
|
|
60
|
+
3. Within each block, rank descending by impact.
|
|
61
|
+
4. Once the list is composed, wait for the operator's "proceed" signal before invoking `proceed-with-the-recommendation`. Never auto-trigger it. This skill only changes how the list is composed.
|
|
62
|
+
|
|
63
|
+
Total floor: **2 WILD + 5 RISA = 7 items minimum.** Going above is fine; going below means the skill was not applied.
|
|
64
|
+
|
|
65
|
+
The point: the operator gets a real WILD/RISA contrast (2 bold bets weighed against a 5-deep trusted baseline), not a flat list where the bold option silently competes with safe ones and loses by default.
|
|
66
|
+
|
|
67
|
+
## Audience Tiers (beginner vs expert)
|
|
68
|
+
|
|
69
|
+
Recommendation blocks ship in **two tiers** depending on the operator's signaled level. The 2 WILD + ≥5 RISA floor described above is the **expert** tier. Beginners get a different, lighter shape. The point: under-load for experts and overload for beginners are both failure modes — splitting the format prevents both.
|
|
70
|
+
|
|
71
|
+
### Tier selection
|
|
72
|
+
|
|
73
|
+
**Default = expert.** Switch to beginner only when one of these triggers fires:
|
|
74
|
+
|
|
75
|
+
- **Explicit flag** — the operator types `/beginner` or refers to themselves as a beginner ("for beginner", "as a beginner", "I'm new to this").
|
|
76
|
+
- **Explicit lite framing** — "simple list", "just the top 3", "small list", "short version", "no need for surgical".
|
|
77
|
+
- **Auto-detect heuristic** — the **first message of the thread** contains any of: `beginner`, `new to (this|claude|the system)`, `simple`, `explain like`, `first time`, `i'm just starting`, `i'm learning`. Single-message false positives are acceptable — the operator flips with `/expert` if mismatched.
|
|
78
|
+
|
|
79
|
+
The operator can override mid-thread: `/expert` switches back to WILD+RISA, `/beginner` switches back to the lite tier. Apply the most recently named tier.
|
|
80
|
+
|
|
81
|
+
### Beginner tier (lite shape)
|
|
82
|
+
|
|
83
|
+
When in beginner tier:
|
|
84
|
+
|
|
85
|
+
- **3 minimum, 5 maximum** items. No padding past 5. Below 3 means there is no recommendation — write `Recommendation: no`.
|
|
86
|
+
- **Goal-driven** — each item names the outcome, not the mechanism. Format: `<verb> <thing> → <observable result>`.
|
|
87
|
+
- **Execution-first** — each item is a concrete next action, not a tradeoff to weigh.
|
|
88
|
+
- **One-shot, iterate from there** — no "surgical change" framing, no phased sequencing, no commit-size gates. Get to a working pass, then improve.
|
|
89
|
+
- **Optimized for the latest Opus model (Opus 4.7 at time of writing)** — assume the model holds the full task in one shot. Do not pre-decompose into micro-steps that fight the model's reasoning depth. Lean on broader, outcome-shaped instructions over fine-grained scripts.
|
|
90
|
+
- Order: descending impact.
|
|
91
|
+
- No WILD/RISA labels. No counts annotation. No tiered tables.
|
|
92
|
+
|
|
93
|
+
### Expert tier (default for Naim, default in this repo)
|
|
94
|
+
|
|
95
|
+
The full WILD+RISA structure documented above: ≥7 items, exactly 2 WILD + ≥5 RISA, WILD on top descending, RISA below descending, counts annotated inline.
|
|
96
|
+
|
|
97
|
+
Each item still leads with the outcome inside both WILD and RISA: `<verb> <thing> → <observable result>`.
|
|
98
|
+
|
|
99
|
+
### Tier signal in the 3-section close
|
|
100
|
+
|
|
101
|
+
When Phase 7's three-section close lands, the `## Recommendation` header carries an explicit tier suffix:
|
|
102
|
+
|
|
103
|
+
- Expert: `## Recommendation (expert)`
|
|
104
|
+
- Beginner: `## Recommendation (beginner)`
|
|
105
|
+
|
|
106
|
+
The Stop hook regex (`^#+ +Recommendation(?:\s|$)`) already accepts both forms — the suffix is documentation, not a gate. The point is a self-describing audit trail: a future reader (or an instinct scan) can tell which tier was applied without re-deriving it from item count or label presence.
|
|
107
|
+
|
|
108
|
+
### The "no" escape valve (both tiers)
|
|
109
|
+
|
|
110
|
+
If neither tier can produce a real recommendation — every candidate item would be padding, or you cannot reach the tier's floor (3 for beginner, 7 for expert) without inventing busywork — write `Recommendation: no` and stop. This applies to **both tiers equally**.
|
|
111
|
+
|
|
112
|
+
`no` is not absence. It is an explicit signal that the current session or perspective is exhausted on this surface and the operator should switch context: a fresh session (cold prompt cache, no carryover bias), a different specialist agent (different perspective on the same problem), a different framing (re-scoping the goal), or sleep on it. Padding to hit the floor is the failure mode this escape exists to prevent — a flat 3-item beginner list of "review the README, run the tests, commit your changes" is worse than `Recommendation: no` because it disguises an empty thought as work.
|
|
113
|
+
|
|
114
|
+
When `no` ships, the Phase 7 close header still carries the tier suffix (`## Recommendation (expert)` or `## Recommendation (beginner)`) so the audit trail records which tier exhausted itself, and the body is just the literal `no` on its own line. No tiered tables, no WILD/RISA blocks, no "Want me to: A or B?" closer.
|
|
115
|
+
|
|
116
|
+
## Proactive Roadmap Surfacing (surface, do not execute)
|
|
117
|
+
|
|
118
|
+
A "wait for instructions" agent fails by silence — sitting on a known next step (visible roadmap, deferred item from a prior session) until told. A "proactive" agent fails by running that step without being asked. Both lose. Surface bridges them: raise the next step as a recommendation item, never as a fait accompli.
|
|
119
|
+
|
|
120
|
+
### Trigger conditions
|
|
121
|
+
|
|
122
|
+
Surface a next step when any of these are true:
|
|
123
|
+
|
|
124
|
+
- A persistent roadmap names an undone step — MemoryCore `current-session.md`, `docs/plans/*`, `⚠️ Deferred` entries in a project `CLAUDE.md`, or pending operator actions logged in MemoryCore.
|
|
125
|
+
- The current task is finished and a stated session goal implies the next one.
|
|
126
|
+
- The session has drifted from a stated roadmap (asked to do A, but B is now blocked by A's choice).
|
|
127
|
+
- An instinct or memory record predicts a near-term action the operator typically forgets (e.g., "rotate keys before next deploy", "push branch after N commits").
|
|
128
|
+
|
|
129
|
+
### Hard boundary — surface, do not execute
|
|
130
|
+
|
|
131
|
+
Surfacing emits the next step as a recommendation item. It does **not** mean running the command, editing the file, or shipping the change. Execution still requires explicit "proceed", "go", "run it", or equivalent. The boundary is non-negotiable:
|
|
132
|
+
|
|
133
|
+
- Global CLAUDE.md: "If instructions conflict or information is missing, stop and ask."
|
|
134
|
+
- Auto Mode: even in autonomous execution, "anything that deletes data or modifies shared or production systems still needs explicit user confirmation."
|
|
135
|
+
- Trust is asymmetric — one unauthorized "helpful" action costs more than a hundred missed surfacings. Recovery is one-way.
|
|
136
|
+
|
|
137
|
+
### Format
|
|
138
|
+
|
|
139
|
+
A surfaced item lives inside the normal RISA block. Mark it inline as `(surfaced — <source>)` so the operator can tell which items came from the roadmap vs. the current request:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
RISA baseline — ship regardless (5 of ≥5)
|
|
143
|
+
1. Run remote D1 migration before next deploy → unblocks Close/Cancel admin button. (surfaced — pending operator action since 2026-05-04)
|
|
144
|
+
2. ...
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
A WILD-tier reframe of the roadmap itself (not a single deferred step, but a re-shape of the whole next phase) goes in the WILD block instead, with the same `(surfaced — <source>)` marker.
|
|
148
|
+
|
|
149
|
+
### Anti-patterns
|
|
150
|
+
|
|
151
|
+
- Re-surfacing an item the operator explicitly deferred — once is a reminder, three times is nagging. After one repeat, log the defer reason to memory and stop.
|
|
152
|
+
- Surfacing speculative steps with no source in any roadmap or memory ("you should also consider…" without a citation).
|
|
153
|
+
- Bundling a surface with execution ("I went ahead and started X"). Surface, wait, execute on go.
|
|
154
|
+
- Treating absence of a roadmap as license to invent one — if no roadmap exists and none was requested, ask before drafting.
|
|
155
|
+
|
|
156
|
+
The point: the operator never has to remember a deferred item, and never has to forgive an unauthorized one. Both at once.
|
|
157
|
+
|
|
158
|
+
## Integration with the 7 Laws
|
|
159
|
+
|
|
160
|
+
| Mode | Reinforces | Tempered by |
|
|
161
|
+
|------|---------------------------------------------------------|--------------------------|
|
|
162
|
+
| RISA | Law 2 (Plan), Law 3 (One Thing), Law 4 (Verify) | Law 6 (Iterate One Thing) |
|
|
163
|
+
| WILD | Law 1 (Research — broader exploration), Law 5 (Reflect) | Law 6 (Iterate One Thing) |
|
|
164
|
+
|
|
165
|
+
Both modes pass through Law 6 before execution. WILD without Law 6 is a wishlist. RISA without Law 6 ships safe fixes while the real bottleneck waits.
|
|
166
|
+
|
|
167
|
+
## Example
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
Recommendations (descending impact within each block)
|
|
171
|
+
|
|
172
|
+
WILD pilots — pick at most one (2 of 2)
|
|
173
|
+
1. Replace the current review workflow with a single adversarial pair.
|
|
174
|
+
2. Drop the staging environment in favor of feature-flagged production.
|
|
175
|
+
|
|
176
|
+
RISA baseline — ship regardless (5 of ≥5)
|
|
177
|
+
1. Add the missing test for the failure path noted in verification.
|
|
178
|
+
2. Rename the ambiguous flag to match its actual behavior.
|
|
179
|
+
3. Backfill the type on the public export that currently widens to `any`.
|
|
180
|
+
4. Wire the existing Stop hook into the new skill's checklist gate.
|
|
181
|
+
5. Update the README mirror so the bundled plugin matches the source skill. (surfaced — verify:skill-mirror gate flagged drift in last CI run)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Total: 7 items (2 WILD + 5 RISA). That is the floor — emit more on either side if the surface warrants it. The fifth RISA item is marked `(surfaced — <source>)` to demonstrate the convention from the Proactive Roadmap Surfacing section: items lifted from a roadmap or memory carry an inline source attribution so the operator can tell roadmap-driven items apart from current-request items.
|
|
185
|
+
|
|
186
|
+
## Related
|
|
187
|
+
|
|
188
|
+
- `continuous-improvement` — the 7 Laws card (core skill)
|
|
189
|
+
- `proceed-with-the-recommendation` — execution arm; carries surfaced items across the surface → execute boundary defined in the Proactive Roadmap Surfacing section above
|
|
190
|
+
- `superpowers:brainstorming` — upstream WILD generator
|
|
191
|
+
- `verification-loop` — downstream RISA verifier
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worktree-safety
|
|
3
|
+
tier: "2"
|
|
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
|
+
origin: continuous-improvement
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Worktree Safety Skill
|
|
9
|
+
|
|
10
|
+
A pre-dispatch invariant. Before any tool call that writes source files or runs git, validate that the current working directory is a registered worktree with a healthy `.git`, owned by this session, on the expected branch.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Before every Edit / Write / Bash that touches source code in a multi-worktree session.
|
|
15
|
+
- Before any `git` command in an auto-loop.
|
|
16
|
+
- After any pause/resume — CWD may have drifted, the worktree may have been pruned, the lease may have expired.
|
|
17
|
+
- When the verification ladder reports a class-`worktree` failure (see `recovery-classification`).
|
|
18
|
+
|
|
19
|
+
## Why This Skill Exists
|
|
20
|
+
|
|
21
|
+
GSD-2's [CONTEXT.md](https://github.com/gsd-build/gsd-2/blob/main/CONTEXT.md) names "Worktree Safety" as one of four runtime invariant modules. Common failure modes it catches:
|
|
22
|
+
|
|
23
|
+
- **Units dispatch into ghost / invalid worktree roots** — `.git` missing, fallback path-only creation, the worktree was pruned but the loop kept its handle.
|
|
24
|
+
- **Health checks unit-specific instead of lifecycle-wide** — earlier units (sketch, plan) write into invalid roots before any check runs.
|
|
25
|
+
- **Brittle exit / merge signals** — relying on artifact presence instead of authoritative branch and commit state.
|
|
26
|
+
- **Parallel actors mutating the working tree of a worktree they don't own** — a known hazard on this host (see `feedback_parallel_actor.md`).
|
|
27
|
+
|
|
28
|
+
The continuous-improvement repo runs on Windows + Git Bash with `autocrlf=true` and a parallel-actor expectation, both of which make weak worktree handling expensive.
|
|
29
|
+
|
|
30
|
+
## The Five-Check Envelope
|
|
31
|
+
|
|
32
|
+
Before any source-writing call, verify all five. Fail closed on any miss.
|
|
33
|
+
|
|
34
|
+
1. **Root validity** — `git rev-parse --show-toplevel` resolves; the resolved path matches CWD after symlink-safe canonicalization.
|
|
35
|
+
2. **`.git` presence** — `.git` exists (file pointer for worktrees, directory for primary checkout). A missing or unreadable `.git` is an immediate stop.
|
|
36
|
+
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
|
+
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
|
+
Output a single fenced block before any source-writing dispatch:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
worktree-safety (resolved):
|
|
44
|
+
root: d:/Ai/ci-wt-skill-trio (matches CWD, canonicalized)
|
|
45
|
+
.git: file pointer → /shared/.git/worktrees/skill-trio (present)
|
|
46
|
+
registration: listed in `git worktree list` (not prunable)
|
|
47
|
+
branch: feat/verification-ladder-skill-trio (matches lease)
|
|
48
|
+
lease: owned by session 4f2a (this session) → CLEAR
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If any line is non-`CLEAR`, dispatch is blocked and the failure routes to `recovery-classification` as class `worktree`.
|
|
52
|
+
|
|
53
|
+
## Anti-Patterns
|
|
54
|
+
|
|
55
|
+
- **Per-tool checks, not lifecycle checks.** Validating only at execute-task lets sketch / plan / research units write into invalid roots first.
|
|
56
|
+
- **Trusting CWD.** A `process.chdir` (or operator `cd`) in another loop iteration can leave CWD pointing at a pruned worktree. Re-resolve every time; do not cache.
|
|
57
|
+
- **Fallback-to-primary on worktree miss.** Silently writing to the primary checkout when the worktree is broken is the worst recovery — it corrupts the wrong branch with no audit trail.
|
|
58
|
+
- **Skipping lease ownership.** Two sessions in the same worktree race on every commit. The lease is the authoritative single-writer signal; do not skip it because "it's only one session" — that assumption breaks the moment a parallel actor appears.
|
|
59
|
+
- **Allowing detached HEAD silently.** A detached HEAD is sometimes legitimate (bisect, snapshot read), but every check must name whether detached is expected for this unit.
|
|
60
|
+
|
|
61
|
+
## Pairs With
|
|
62
|
+
|
|
63
|
+
- [verification-loop](verification-loop.md) — runs as a pre-Phase-0 invariant; the resolved-safety block fires before the resolved-ladder block.
|
|
64
|
+
- [state-reconciliation](state-reconciliation.md) — both fire before dispatch; safety runs first because reconciliation depends on a valid worktree root.
|
|
65
|
+
- [recovery-classification](recovery-classification.md) — any non-`CLEAR` line routes here as class `worktree`.
|
|
66
|
+
- [gateguard](gateguard.md) — gateguard fires at the tool boundary; worktree-safety is the lifecycle counterpart that runs before tool dispatch is even considered.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# insights-claude-md.md — paste-in CLAUDE.md blocks
|
|
2
|
+
|
|
3
|
+
The four blocks below originate from the 28-day Claude Code usage report (`usage-data/report.html`, "Suggested CLAUDE.md Additions" section). Each block targets a recurring friction class the report flagged:
|
|
4
|
+
|
|
5
|
+
- **Verification Discipline** — sessions where typecheck/test was skipped or run from the wrong CWD
|
|
6
|
+
- **Environment Notes** — Windows + Git Bash + PowerShell mismatches that cost retries
|
|
7
|
+
- **Think Before Acting** — sessions where edits started before grounding was complete
|
|
8
|
+
- **Git & Deploy Workflow** — merge declared "done" while the deploy provider was still on a stale commit
|
|
9
|
+
|
|
10
|
+
The discipline behavior is already encoded as continuous-improvement skills (`gateguard`, `workspace-surface-audit`, `verification-loop`, `deploy-receipt`). These blocks are the *project-local* CLAUDE.md text — the per-repo reminder that lives where developers actually look when they read `CLAUDE.md`. Skills enforce; CLAUDE.md communicates.
|
|
11
|
+
|
|
12
|
+
## How to use this file
|
|
13
|
+
|
|
14
|
+
1. Open the target project's `CLAUDE.md`.
|
|
15
|
+
2. Pick the blocks that apply to that project (TypeScript projects probably want all four; library-only projects can skip the deploy block).
|
|
16
|
+
3. Paste them under existing sections or as new top-level sections.
|
|
17
|
+
4. Adjust placeholders — the report's wording is opinionated. `pnpm` is just an example; if the project uses `npm` or `yarn` or `bun`, swap it. If the project's deploy target is not Railway or Cloudflare, swap those names. The structure stays; the specifics adapt.
|
|
18
|
+
5. Optionally lock the section headings under `bin/check-docs-substrings.mjs` so a wholesale CLAUDE.md rewrite doesn't silently drop the discipline contract.
|
|
19
|
+
|
|
20
|
+
The blocks are paste-in markdown — copy them verbatim into your project's CLAUDE.md.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Block 1 — Verification Discipline
|
|
25
|
+
|
|
26
|
+
Paste under a "Working norms" or "Coding standards" section. Adjust `pnpm` → your package manager.
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
## Verification Discipline
|
|
30
|
+
- Always run `pnpm typecheck` and `pnpm test` after code changes before declaring done
|
|
31
|
+
- Run verification commands from the repo root; verify CWD with `pwd` if a previous command may have changed it
|
|
32
|
+
- Never claim 'verified' or 'done' without showing the passing output
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Why this block: the report flagged sessions where Claude either skipped typecheck/test until the operator prompted, or ran `tsc` from `frontend/` and incorrectly concluded deps weren't installed. The CWD line addresses the second failure mode directly.
|
|
36
|
+
|
|
37
|
+
## Block 2 — Environment Notes
|
|
38
|
+
|
|
39
|
+
Paste under a "Local development" or "Environment" section. Adjust the shell + tool list to match the project's actual setup.
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
## Environment Notes
|
|
43
|
+
- Shell is Git Bash on Windows; do NOT use `jq` (not installed) — use PowerShell or node/python for JSON parsing
|
|
44
|
+
- Be careful with bash quoting in curl/psql commands; prefer heredocs or files over inline single-quoted JSON
|
|
45
|
+
- CLAUDE.md is case-sensitive on some filesystems — always use uppercase
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Why this block: the report flagged repeated jq-not-installed retries, shell-quoting failures on curl/psql, and a Windows case-sensitivity issue with `CLAUDE.md` vs `claude.md`. If your environment is different (macOS + zsh, Linux + bash, WSL2), rewrite this block to name *your* environment's grain — the goal is to surface the per-project gotchas before the agent re-discovers them at a cost of one wasted retry each.
|
|
49
|
+
|
|
50
|
+
## Block 3 — Think Before Acting
|
|
51
|
+
|
|
52
|
+
Paste near the top of CLAUDE.md, ideally above any task-specific instructions.
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
## Think Before Acting
|
|
56
|
+
- For any non-trivial request, produce a short plan before editing files
|
|
57
|
+
- When the user references prior work (e.g. 'the Finnhub stuff'), verify it exists in the repo before acting on the assumption
|
|
58
|
+
- Use TDD for new features: write failing test, then code, then verify
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Why this block: the operator literally had to type "you need to think before u response" mid-session, and a separate session was wasted verifying nonexistent "Finnhub work" that was only used as a framework analogy. The first bullet generalizes the "plan first" rule from the global CLAUDE.md; the second is project-local — if your project has its own analogy-vs-real-code traps, name them here.
|
|
62
|
+
|
|
63
|
+
## Block 4 — Git & Deploy Workflow
|
|
64
|
+
|
|
65
|
+
Paste under a "Git workflow" or "Release process" section. Adjust the deploy provider names to match your project.
|
|
66
|
+
|
|
67
|
+
```markdown
|
|
68
|
+
## Git & Deploy Workflow
|
|
69
|
+
- Never push directly to main — use PR workflow; harness will block direct pushes
|
|
70
|
+
- After merging, verify Railway/Cloudflare actually picked up the commit before declaring deploy complete
|
|
71
|
+
- For production POSTs and wrangler tail, expect harness blocks and surface them as caveats requiring user action
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Why this block: multiple sessions hit "Railway deploy didn't pick up the latest commit" or "harness blocked merge-to-main / production POST / wrangler" — pre-emptive awareness saves retry cycles. The second bullet is what `deploy-receipt` enforces in-tooling; this CLAUDE.md text makes the same expectation visible to humans reviewing PRs.
|
|
75
|
+
|
|
76
|
+
If your project deploys somewhere other than Railway or Cloudflare, swap those names. If your project does NOT auto-deploy from main (library-only / package-published), drop the second bullet entirely — receipt verification doesn't apply.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Companion skills (already installed if you have continuous-improvement)
|
|
81
|
+
|
|
82
|
+
Each block has a corresponding skill that enforces the rule when an agent is in the loop. Pasting the block tells humans the rule; installing the skill makes the agent obey it.
|
|
83
|
+
|
|
84
|
+
| Block | Companion skill |
|
|
85
|
+
|---|---|
|
|
86
|
+
| Verification Discipline | `verification-loop` (per-project ladder via `.claude/verify-ladder.json`) |
|
|
87
|
+
| Environment Notes | `workspace-surface-audit` (records environment grain at session start) |
|
|
88
|
+
| Think Before Acting | `gateguard` (blocks Edit/Write/Bash before grounding) |
|
|
89
|
+
| Git & Deploy Workflow | `deploy-receipt` (verifies deployed SHA + healthcheck before declaring done) |
|
|
90
|
+
|
|
91
|
+
If you want both layers (CLAUDE.md text + skill enforcement), paste the block AND keep the skill installed. If you only want one, the skill is the higher-fidelity surface — it runs at the tool boundary and cannot be skipped by an agent that didn't read the markdown.
|
|
@@ -9,39 +9,52 @@
|
|
|
9
9
|
"Three starter shapes are provided below — pick one, delete the others, then trim."
|
|
10
10
|
],
|
|
11
11
|
|
|
12
|
+
"_synthetic_checks_doc": [
|
|
13
|
+
"synthetic_checks names a directory (relative to the repo root) containing",
|
|
14
|
+
"*.synthetic.{sh,mjs,ts,py} files. Each file is invoked once after deploy-receipt",
|
|
15
|
+
"reports COMPLETE, with BASE_URL + BASELINE_URL + EXPECTED_SHA env vars set.",
|
|
16
|
+
"Exit 0 = production matches baseline; non-zero = drift, stdout is the diff.",
|
|
17
|
+
"Set to null to skip; set to a different path (e.g. 'infra/synthetic/') to relocate.",
|
|
18
|
+
"See synthetic-checks/README.md for the full contract."
|
|
19
|
+
],
|
|
20
|
+
|
|
12
21
|
"_typescript_node_example": {
|
|
13
|
-
"build":
|
|
14
|
-
"typecheck":
|
|
15
|
-
"lint":
|
|
16
|
-
"test":
|
|
17
|
-
"security":
|
|
18
|
-
"deploy_receipt":
|
|
22
|
+
"build": "npm run build",
|
|
23
|
+
"typecheck": "npx tsc --noEmit",
|
|
24
|
+
"lint": "npm run lint",
|
|
25
|
+
"test": "npm test",
|
|
26
|
+
"security": "npm audit --audit-level=high",
|
|
27
|
+
"deploy_receipt": null,
|
|
28
|
+
"synthetic_checks": null
|
|
19
29
|
},
|
|
20
30
|
|
|
21
31
|
"_rust_cargo_example": {
|
|
22
|
-
"build":
|
|
23
|
-
"typecheck":
|
|
24
|
-
"lint":
|
|
25
|
-
"test":
|
|
26
|
-
"security":
|
|
27
|
-
"deploy_receipt":
|
|
32
|
+
"build": "cargo build --release",
|
|
33
|
+
"typecheck": "cargo check --all-targets",
|
|
34
|
+
"lint": "cargo clippy --all-targets -- -D warnings",
|
|
35
|
+
"test": "cargo test --all-features",
|
|
36
|
+
"security": "cargo audit",
|
|
37
|
+
"deploy_receipt": null,
|
|
38
|
+
"synthetic_checks": null
|
|
28
39
|
},
|
|
29
40
|
|
|
30
41
|
"_python_uv_example": {
|
|
31
|
-
"build":
|
|
32
|
-
"typecheck":
|
|
33
|
-
"lint":
|
|
34
|
-
"test":
|
|
35
|
-
"security":
|
|
36
|
-
"deploy_receipt":
|
|
42
|
+
"build": null,
|
|
43
|
+
"typecheck": "uv run pyright",
|
|
44
|
+
"lint": "uv run ruff check .",
|
|
45
|
+
"test": "uv run pytest",
|
|
46
|
+
"security": "uv run pip-audit",
|
|
47
|
+
"deploy_receipt": null,
|
|
48
|
+
"synthetic_checks": null
|
|
37
49
|
},
|
|
38
50
|
|
|
39
51
|
"_cloudflare_worker_example": {
|
|
40
|
-
"build":
|
|
41
|
-
"typecheck":
|
|
42
|
-
"lint":
|
|
43
|
-
"test":
|
|
44
|
-
"security":
|
|
45
|
-
"deploy_receipt":
|
|
52
|
+
"build": "npm run build",
|
|
53
|
+
"typecheck": "npx tsc --noEmit",
|
|
54
|
+
"lint": "npm run lint",
|
|
55
|
+
"test": "npm test",
|
|
56
|
+
"security": "npm audit --audit-level=high",
|
|
57
|
+
"deploy_receipt": "npx wrangler deployments list --json",
|
|
58
|
+
"synthetic_checks": "synthetic-checks/"
|
|
46
59
|
}
|
|
47
60
|
}
|