claude-agent-skills 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -0
- package/bundled-skills/ask-matt/SKILL.md +61 -0
- package/bundled-skills/brainstorming/SKILL.md +159 -0
- package/bundled-skills/brainstorming/scripts/frame-template.html +213 -0
- package/bundled-skills/brainstorming/scripts/helper.js +167 -0
- package/bundled-skills/brainstorming/scripts/server.cjs +723 -0
- package/bundled-skills/brainstorming/scripts/start-server.sh +209 -0
- package/bundled-skills/brainstorming/scripts/stop-server.sh +120 -0
- package/bundled-skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/bundled-skills/brainstorming/visual-companion.md +298 -0
- package/bundled-skills/cavecrew/README.md +41 -0
- package/bundled-skills/cavecrew/SKILL.md +82 -0
- package/bundled-skills/caveman/README.md +48 -0
- package/bundled-skills/caveman/SKILL.md +78 -0
- package/bundled-skills/caveman-commit/README.md +44 -0
- package/bundled-skills/caveman-commit/SKILL.md +65 -0
- package/bundled-skills/caveman-compress/README.md +163 -0
- package/bundled-skills/caveman-compress/SECURITY.md +31 -0
- package/bundled-skills/caveman-compress/SKILL.md +111 -0
- package/bundled-skills/caveman-compress/scripts/__init__.py +9 -0
- package/bundled-skills/caveman-compress/scripts/__main__.py +3 -0
- package/bundled-skills/caveman-compress/scripts/benchmark.py +80 -0
- package/bundled-skills/caveman-compress/scripts/cli.py +85 -0
- package/bundled-skills/caveman-compress/scripts/compress.py +342 -0
- package/bundled-skills/caveman-compress/scripts/detect.py +121 -0
- package/bundled-skills/caveman-compress/scripts/validate.py +213 -0
- package/bundled-skills/caveman-help/README.md +38 -0
- package/bundled-skills/caveman-help/SKILL.md +63 -0
- package/bundled-skills/caveman-review/README.md +33 -0
- package/bundled-skills/caveman-review/SKILL.md +55 -0
- package/bundled-skills/caveman-stats/README.md +30 -0
- package/bundled-skills/caveman-stats/SKILL.md +10 -0
- package/bundled-skills/codebase-design/DEEPENING.md +37 -0
- package/bundled-skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/bundled-skills/codebase-design/SKILL.md +114 -0
- package/bundled-skills/council/SKILL.md +77 -0
- package/bundled-skills/diagnosing-bugs/SKILL.md +134 -0
- package/bundled-skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
- package/bundled-skills/dispatching-parallel-agents/SKILL.md +185 -0
- package/bundled-skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/bundled-skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/bundled-skills/domain-modeling/SKILL.md +74 -0
- package/bundled-skills/edit-article/SKILL.md +15 -0
- package/bundled-skills/executing-plans/SKILL.md +70 -0
- package/bundled-skills/finishing-a-development-branch/SKILL.md +241 -0
- package/bundled-skills/git-guardrails-claude-code/SKILL.md +95 -0
- package/bundled-skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +25 -0
- package/bundled-skills/grill-me/SKILL.md +7 -0
- package/bundled-skills/grill-with-docs/SKILL.md +7 -0
- package/bundled-skills/grilling/SKILL.md +10 -0
- package/bundled-skills/handoff/SKILL.md +16 -0
- package/bundled-skills/i-am-dumb/SKILL.md +57 -0
- package/bundled-skills/implement/SKILL.md +15 -0
- package/bundled-skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/bundled-skills/improve-codebase-architecture/SKILL.md +66 -0
- package/bundled-skills/migrate-to-shoehorn/SKILL.md +118 -0
- package/bundled-skills/obsidian-vault/SKILL.md +59 -0
- package/bundled-skills/ponytail/SKILL.md +117 -0
- package/bundled-skills/ponytail-audit/SKILL.md +50 -0
- package/bundled-skills/ponytail-debt/SKILL.md +59 -0
- package/bundled-skills/ponytail-gain/SKILL.md +51 -0
- package/bundled-skills/ponytail-help/SKILL.md +43 -0
- package/bundled-skills/ponytail-review/SKILL.md +51 -0
- package/bundled-skills/prototype/LOGIC.md +79 -0
- package/bundled-skills/prototype/SKILL.md +31 -0
- package/bundled-skills/prototype/UI.md +112 -0
- package/bundled-skills/receiving-code-review/SKILL.md +213 -0
- package/bundled-skills/requesting-code-review/SKILL.md +103 -0
- package/bundled-skills/requesting-code-review/code-reviewer.md +172 -0
- package/bundled-skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/bundled-skills/scaffold-exercises/SKILL.md +106 -0
- package/bundled-skills/setup-matt-pocock-skills/SKILL.md +127 -0
- package/bundled-skills/setup-matt-pocock-skills/domain.md +51 -0
- package/bundled-skills/setup-matt-pocock-skills/issue-tracker-github.md +34 -0
- package/bundled-skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +35 -0
- package/bundled-skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
- package/bundled-skills/setup-matt-pocock-skills/triage-labels.md +15 -0
- package/bundled-skills/setup-pre-commit/SKILL.md +91 -0
- package/bundled-skills/subagent-driven-development/SKILL.md +418 -0
- package/bundled-skills/subagent-driven-development/implementer-prompt.md +139 -0
- package/bundled-skills/subagent-driven-development/scripts/review-package +44 -0
- package/bundled-skills/subagent-driven-development/scripts/sdd-workspace +22 -0
- package/bundled-skills/subagent-driven-development/scripts/task-brief +40 -0
- package/bundled-skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/bundled-skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/bundled-skills/systematic-debugging/SKILL.md +296 -0
- package/bundled-skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/bundled-skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/bundled-skills/systematic-debugging/defense-in-depth.md +122 -0
- package/bundled-skills/systematic-debugging/find-polluter.sh +63 -0
- package/bundled-skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/bundled-skills/systematic-debugging/test-academic.md +14 -0
- package/bundled-skills/systematic-debugging/test-pressure-1.md +58 -0
- package/bundled-skills/systematic-debugging/test-pressure-2.md +68 -0
- package/bundled-skills/systematic-debugging/test-pressure-3.md +69 -0
- package/bundled-skills/tdd/SKILL.md +108 -0
- package/bundled-skills/tdd/mocking.md +59 -0
- package/bundled-skills/tdd/refactoring.md +10 -0
- package/bundled-skills/tdd/tests.md +61 -0
- package/bundled-skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/bundled-skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/bundled-skills/teach/MISSION-FORMAT.md +31 -0
- package/bundled-skills/teach/RESOURCES-FORMAT.md +32 -0
- package/bundled-skills/teach/SKILL.md +140 -0
- package/bundled-skills/test-driven-development/SKILL.md +371 -0
- package/bundled-skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/bundled-skills/to-issues/SKILL.md +84 -0
- package/bundled-skills/to-prd/SKILL.md +75 -0
- package/bundled-skills/triage/AGENT-BRIEF.md +207 -0
- package/bundled-skills/triage/OUT-OF-SCOPE.md +105 -0
- package/bundled-skills/triage/SKILL.md +112 -0
- package/bundled-skills/using-git-worktrees/SKILL.md +202 -0
- package/bundled-skills/using-superpowers/SKILL.md +121 -0
- package/bundled-skills/using-superpowers/references/antigravity-tools.md +96 -0
- package/bundled-skills/using-superpowers/references/claude-code-tools.md +50 -0
- package/bundled-skills/using-superpowers/references/codex-tools.md +72 -0
- package/bundled-skills/using-superpowers/references/copilot-tools.md +49 -0
- package/bundled-skills/using-superpowers/references/gemini-tools.md +63 -0
- package/bundled-skills/using-superpowers/references/pi-tools.md +28 -0
- package/bundled-skills/verification-before-completion/SKILL.md +139 -0
- package/bundled-skills/writing-great-skills/GLOSSARY.md +195 -0
- package/bundled-skills/writing-great-skills/SKILL.md +82 -0
- package/bundled-skills/writing-plans/SKILL.md +174 -0
- package/bundled-skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/bundled-skills/writing-skills/SKILL.md +689 -0
- package/bundled-skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/bundled-skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/bundled-skills/writing-skills/graphviz-conventions.dot +172 -0
- package/bundled-skills/writing-skills/persuasion-principles.md +187 -0
- package/bundled-skills/writing-skills/render-graphs.js +168 -0
- package/bundled-skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/commands/add.js +97 -0
- package/commands/check.js +54 -0
- package/commands/exportSkills.js +30 -0
- package/commands/hub.js +52 -0
- package/commands/importSkills.js +68 -0
- package/commands/list.js +37 -0
- package/commands/remove.js +59 -0
- package/commands/sync.js +66 -0
- package/commands/update.js +70 -0
- package/index.js +100 -0
- package/lib/banner.js +108 -0
- package/lib/constants.js +10 -0
- package/lib/deps.js +51 -0
- package/lib/hash.js +26 -0
- package/lib/install.js +31 -0
- package/lib/lockfile.js +37 -0
- package/lib/prompts.js +50 -0
- package/lib/scope.js +19 -0
- package/lib/summary.js +108 -0
- package/lib/theme.js +11 -0
- package/package.json +43 -0
- package/skills.json +164 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: council
|
|
3
|
+
description: >
|
|
4
|
+
Convene a council of Haiku subagents to gather independent perspectives on a
|
|
5
|
+
question or decision, then synthesize them as orchestrator. The calling model
|
|
6
|
+
is the orchestrator. Use when the user says "consult the council", "ask the
|
|
7
|
+
council", "get multiple perspectives", "council mode", or invokes /council.
|
|
8
|
+
license: MIT
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Council
|
|
12
|
+
|
|
13
|
+
You are the orchestrator. Dispatch three Haiku subagents in parallel — each
|
|
14
|
+
a council member giving an independent perspective — then synthesize their
|
|
15
|
+
responses into a unified recommendation.
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
digraph council {
|
|
21
|
+
"Receive question" -> "Dispatch 3 Haiku members (parallel)";
|
|
22
|
+
"Dispatch 5 Haiku members (parallel)" -> "Collect all 5 responses";
|
|
23
|
+
"Collect all 5 responses" -> "Identify agreements and tensions";
|
|
24
|
+
"Identify agreements and tensions" -> "Synthesize and present";
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 1. Dispatch (parallel)
|
|
29
|
+
|
|
30
|
+
Spawn five subagents simultaneously using model `claude-haiku-4-5-20251001`.
|
|
31
|
+
Give each a distinct lens so their answers diverge:
|
|
32
|
+
|
|
33
|
+
| Member | Role prompt prefix |
|
|
34
|
+
|--------|-------------------|
|
|
35
|
+
| **Pragmatist** | "You are a pragmatic senior engineer. Prioritise what ships fastest with fewest moving parts." |
|
|
36
|
+
| **Critic** | "You are a skeptical senior engineer. Identify risks, edge cases, and what could go wrong." |
|
|
37
|
+
| **Architect** | "You are a systems-thinking senior engineer. Prioritise long-term maintainability and clean boundaries." |
|
|
38
|
+
| **User Advocate** | "You are a senior engineer focused on the end-user experience. Prioritise clarity, usability, and what the user actually needs over what was literally asked." |
|
|
39
|
+
| **Minimalist** | "You are a senior engineer who believes less is more. Question whether any part of this needs to exist at all, and what the smallest possible solution looks like." |
|
|
40
|
+
|
|
41
|
+
Each member receives: their role prefix + the user's exact question. No extra context. Keep the prompts short so the answer is theirs, not an echo of yours.
|
|
42
|
+
|
|
43
|
+
### 2. Collect
|
|
44
|
+
|
|
45
|
+
Wait for all three before proceeding. Do not synthesise from partial results.
|
|
46
|
+
|
|
47
|
+
### 3. Synthesise
|
|
48
|
+
|
|
49
|
+
As orchestrator:
|
|
50
|
+
- Note where all three agree — that is high-confidence ground.
|
|
51
|
+
- Note where two agree and one dissents — weigh the dissent explicitly.
|
|
52
|
+
- Note genuine three-way disagreement — surface the trade-off, don't paper over it.
|
|
53
|
+
- Produce one unified recommendation. Take a position; don't list options and defer back.
|
|
54
|
+
|
|
55
|
+
### 4. Present
|
|
56
|
+
|
|
57
|
+
Lead with the recommendation. Then a tight attribution block:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Council says: <your synthesised recommendation>
|
|
61
|
+
|
|
62
|
+
Pragmatist: <their key point, one line>
|
|
63
|
+
Critic: <their key point, one line>
|
|
64
|
+
Architect: <their key point, one line>
|
|
65
|
+
User Advocate: <their key point, one line>
|
|
66
|
+
Minimalist: <their key point, one line>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If two or three members flagged the same risk, call it out explicitly:
|
|
70
|
+
`⚠ All three flagged X — take this seriously.`
|
|
71
|
+
|
|
72
|
+
## Orchestrator rules
|
|
73
|
+
|
|
74
|
+
- You synthesise; you do not add a fourth opinion of your own on top.
|
|
75
|
+
- If members contradict each other, present the trade-off — do not silently pick one.
|
|
76
|
+
- Keep the attribution block honest: if a member said something inconvenient, include it.
|
|
77
|
+
- The council is not decoration. If you wouldn't change your answer based on what they said, note that and explain why.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: diagnosing-bugs
|
|
3
|
+
description: Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Diagnosing Bugs
|
|
7
|
+
|
|
8
|
+
A discipline for hard bugs. Skip phases only when explicitly justified.
|
|
9
|
+
|
|
10
|
+
When exploring the codebase, read `CONTEXT.md` (if it exists) to get a clear mental model of the relevant modules, and check ADRs in the area you're touching.
|
|
11
|
+
|
|
12
|
+
## Phase 1 — Build a feedback loop
|
|
13
|
+
|
|
14
|
+
**This is the skill.** Everything else is mechanical. If you have a **tight** pass/fail signal for the bug — one that goes red on _this_ bug — you will find the cause; bisection, hypothesis-testing, and instrumentation all just consume it. If you don't have one, no amount of staring at code will save you.
|
|
15
|
+
|
|
16
|
+
Spend disproportionate effort here. **Be aggressive. Be creative. Refuse to give up.**
|
|
17
|
+
|
|
18
|
+
### Ways to construct one — try them in roughly this order
|
|
19
|
+
|
|
20
|
+
1. **Failing test** at whatever seam reaches the bug — unit, integration, e2e.
|
|
21
|
+
2. **Curl / HTTP script** against a running dev server.
|
|
22
|
+
3. **CLI invocation** with a fixture input, diffing stdout against a known-good snapshot.
|
|
23
|
+
4. **Headless browser script** (Playwright / Puppeteer) — drives the UI, asserts on DOM/console/network.
|
|
24
|
+
5. **Replay a captured trace.** Save a real network request / payload / event log to disk; replay it through the code path in isolation.
|
|
25
|
+
6. **Throwaway harness.** Spin up a minimal subset of the system (one service, mocked deps) that exercises the bug code path with a single function call.
|
|
26
|
+
7. **Property / fuzz loop.** If the bug is "sometimes wrong output", run 1000 random inputs and look for the failure mode.
|
|
27
|
+
8. **Bisection harness.** If the bug appeared between two known states (commit, dataset, version), automate "boot at state X, check, repeat" so you can `git bisect run` it.
|
|
28
|
+
9. **Differential loop.** Run the same input through old-version vs new-version (or two configs) and diff outputs.
|
|
29
|
+
10. **HITL bash script.** Last resort. If a human must click, drive _them_ with `scripts/hitl-loop.template.sh` so the loop is still structured. Captured output feeds back to you.
|
|
30
|
+
|
|
31
|
+
Build the right feedback loop, and the bug is 90% fixed.
|
|
32
|
+
|
|
33
|
+
### Tighten the loop
|
|
34
|
+
|
|
35
|
+
Treat the loop as a product. Once you have _a_ loop, **tighten** it:
|
|
36
|
+
|
|
37
|
+
- Can I make it faster? (Cache setup, skip unrelated init, narrow the test scope.)
|
|
38
|
+
- Can I make the signal sharper? (Assert on the specific symptom, not "didn't crash".)
|
|
39
|
+
- Can I make it more deterministic? (Pin time, seed RNG, isolate filesystem, freeze network.)
|
|
40
|
+
|
|
41
|
+
A 30-second flaky loop is barely better than no loop; a 2-second deterministic one is tight — a debugging superpower.
|
|
42
|
+
|
|
43
|
+
### Non-deterministic bugs
|
|
44
|
+
|
|
45
|
+
The goal is not a clean repro but a **higher reproduction rate**. Loop the trigger 100×, parallelise, add stress, narrow timing windows, inject sleeps. A 50%-flake bug is debuggable; 1% is not — keep raising the rate until it's debuggable.
|
|
46
|
+
|
|
47
|
+
### When you genuinely cannot build a loop
|
|
48
|
+
|
|
49
|
+
Stop and say so explicitly. List what you tried. Ask the user for: (a) access to whatever environment reproduces it, (b) a captured artifact (HAR file, log dump, core dump, screen recording with timestamps), or (c) permission to add temporary production instrumentation. Do **not** proceed to hypothesise without a loop.
|
|
50
|
+
|
|
51
|
+
### Completion criterion — a tight loop that goes red
|
|
52
|
+
|
|
53
|
+
Phase 1 is done when the loop is **tight** and **red-capable**: you can name **one command** — a script path, a test invocation, a curl — that you have **already run at least once** (paste the invocation and its output), and that is:
|
|
54
|
+
|
|
55
|
+
- [ ] **Red-capable** — it drives the actual bug code path and asserts the **user's exact symptom**, so it can go red on this bug and green once fixed. Not "runs without erroring" — it must be able to _catch this specific bug_.
|
|
56
|
+
- [ ] **Deterministic** — same verdict every run (flaky bugs: a pinned, high reproduction rate, per above).
|
|
57
|
+
- [ ] **Fast** — seconds, not minutes.
|
|
58
|
+
- [ ] **Agent-runnable** — you can run it unattended; a human in the loop only via `scripts/hitl-loop.template.sh`.
|
|
59
|
+
|
|
60
|
+
If you catch yourself reading code to build a theory before this command exists, **stop — jumping straight to a hypothesis is the exact failure this skill prevents.** No red-capable command, no Phase 2.
|
|
61
|
+
|
|
62
|
+
## Phase 2 — Reproduce + minimise
|
|
63
|
+
|
|
64
|
+
Run the loop. Watch it go red — the bug appears.
|
|
65
|
+
|
|
66
|
+
Confirm:
|
|
67
|
+
|
|
68
|
+
- [ ] The loop produces the failure mode the **user** described — not a different failure that happens to be nearby. Wrong bug = wrong fix.
|
|
69
|
+
- [ ] The failure is reproducible across multiple runs (or, for non-deterministic bugs, reproducible at a high enough rate to debug against).
|
|
70
|
+
- [ ] You have captured the exact symptom (error message, wrong output, slow timing) so later phases can verify the fix actually addresses it.
|
|
71
|
+
|
|
72
|
+
### Minimise
|
|
73
|
+
|
|
74
|
+
Once it's red, shrink the repro to the **smallest scenario that still goes red**. Cut inputs, callers, config, data, and steps **one at a time**, re-running the loop after each cut — keep only what's load-bearing for the failure.
|
|
75
|
+
|
|
76
|
+
Why bother: a minimal repro shrinks the hypothesis space in Phase 3 (fewer moving parts left to suspect) and becomes the clean regression test in Phase 5.
|
|
77
|
+
|
|
78
|
+
Done when **every remaining element is load-bearing** — removing any one of them makes the loop go green.
|
|
79
|
+
|
|
80
|
+
Do not proceed until you have reproduced **and** minimised.
|
|
81
|
+
|
|
82
|
+
## Phase 3 — Hypothesise
|
|
83
|
+
|
|
84
|
+
Generate **3–5 ranked hypotheses** before testing any of them. Single-hypothesis generation anchors on the first plausible idea.
|
|
85
|
+
|
|
86
|
+
Each hypothesis must be **falsifiable**: state the prediction it makes.
|
|
87
|
+
|
|
88
|
+
> Format: "If <X> is the cause, then <changing Y> will make the bug disappear / <changing Z> will make it worse."
|
|
89
|
+
|
|
90
|
+
If you cannot state the prediction, the hypothesis is a vibe — discard or sharpen it.
|
|
91
|
+
|
|
92
|
+
**Show the ranked list to the user before testing.** They often have domain knowledge that re-ranks instantly ("we just deployed a change to #3"), or know hypotheses they've already ruled out. Cheap checkpoint, big time saver. Don't block on it — proceed with your ranking if the user is AFK.
|
|
93
|
+
|
|
94
|
+
## Phase 4 — Instrument
|
|
95
|
+
|
|
96
|
+
Each probe must map to a specific prediction from Phase 3. **Change one variable at a time.**
|
|
97
|
+
|
|
98
|
+
Tool preference:
|
|
99
|
+
|
|
100
|
+
1. **Debugger / REPL inspection** if the env supports it. One breakpoint beats ten logs.
|
|
101
|
+
2. **Targeted logs** at the boundaries that distinguish hypotheses.
|
|
102
|
+
3. Never "log everything and grep".
|
|
103
|
+
|
|
104
|
+
**Tag every debug log** with a unique prefix, e.g. `[DEBUG-a4f2]`. Cleanup at the end becomes a single grep. Untagged logs survive; tagged logs die.
|
|
105
|
+
|
|
106
|
+
**Perf branch.** For performance regressions, logs are usually wrong. Instead: establish a baseline measurement (timing harness, `performance.now()`, profiler, query plan), then bisect. Measure first, fix second.
|
|
107
|
+
|
|
108
|
+
## Phase 5 — Fix + regression test
|
|
109
|
+
|
|
110
|
+
Write the regression test **before the fix** — but only if there is a **correct seam** for it.
|
|
111
|
+
|
|
112
|
+
A correct seam is one where the test exercises the **real bug pattern** as it occurs at the call site. If the only available seam is too shallow (single-caller test when the bug needs multiple callers, unit test that can't replicate the chain that triggered the bug), a regression test there gives false confidence.
|
|
113
|
+
|
|
114
|
+
**If no correct seam exists, that itself is the finding.** Note it. The codebase architecture is preventing the bug from being locked down. Flag this for the next phase.
|
|
115
|
+
|
|
116
|
+
If a correct seam exists:
|
|
117
|
+
|
|
118
|
+
1. Turn the minimised repro into a failing test at that seam.
|
|
119
|
+
2. Watch it fail.
|
|
120
|
+
3. Apply the fix.
|
|
121
|
+
4. Watch it pass.
|
|
122
|
+
5. Re-run the Phase 1 feedback loop against the original (un-minimised) scenario.
|
|
123
|
+
|
|
124
|
+
## Phase 6 — Cleanup + post-mortem
|
|
125
|
+
|
|
126
|
+
Required before declaring done:
|
|
127
|
+
|
|
128
|
+
- [ ] Original repro no longer reproduces (re-run the Phase 1 loop)
|
|
129
|
+
- [ ] Regression test passes (or absence of seam is documented)
|
|
130
|
+
- [ ] All `[DEBUG-...]` instrumentation removed (`grep` the prefix)
|
|
131
|
+
- [ ] Throwaway prototypes deleted (or moved to a clearly-marked debug location)
|
|
132
|
+
- [ ] The hypothesis that turned out correct is stated in the commit / PR message — so the next debugger learns
|
|
133
|
+
|
|
134
|
+
**Then ask: what would have prevented this bug?** If the answer involves architectural change (no good test seam, tangled callers, hidden coupling) hand off to the `/improve-codebase-architecture` skill with the specifics. Make the recommendation **after** the fix is in, not before — you have more information now than when you started.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Human-in-the-loop reproduction loop.
|
|
3
|
+
# Copy this file, edit the steps below, and run it.
|
|
4
|
+
# The agent runs the script; the user follows prompts in their terminal.
|
|
5
|
+
#
|
|
6
|
+
# Usage:
|
|
7
|
+
# bash hitl-loop.template.sh
|
|
8
|
+
#
|
|
9
|
+
# Two helpers:
|
|
10
|
+
# step "<instruction>" → show instruction, wait for Enter
|
|
11
|
+
# capture VAR "<question>" → show question, read response into VAR
|
|
12
|
+
#
|
|
13
|
+
# At the end, captured values are printed as KEY=VALUE for the agent to parse.
|
|
14
|
+
|
|
15
|
+
set -euo pipefail
|
|
16
|
+
|
|
17
|
+
step() {
|
|
18
|
+
printf '\n>>> %s\n' "$1"
|
|
19
|
+
read -r -p " [Enter when done] " _
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
capture() {
|
|
23
|
+
local var="$1" question="$2" answer
|
|
24
|
+
printf '\n>>> %s\n' "$question"
|
|
25
|
+
read -r -p " > " answer
|
|
26
|
+
printf -v "$var" '%s' "$answer"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# --- edit below ---------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
step "Open the app at http://localhost:3000 and sign in."
|
|
32
|
+
|
|
33
|
+
capture ERRORED "Click the 'Export' button. Did it throw an error? (y/n)"
|
|
34
|
+
|
|
35
|
+
capture ERROR_MSG "Paste the error message (or 'none'):"
|
|
36
|
+
|
|
37
|
+
# --- edit above ---------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
printf '\n--- Captured ---\n'
|
|
40
|
+
printf 'ERRORED=%s\n' "$ERRORED"
|
|
41
|
+
printf 'ERROR_MSG=%s\n' "$ERROR_MSG"
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dispatching-parallel-agents
|
|
3
|
+
description: Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Dispatching Parallel Agents
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
|
|
11
|
+
|
|
12
|
+
When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.
|
|
13
|
+
|
|
14
|
+
**Core principle:** Dispatch one agent per independent problem domain. Let them work concurrently.
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
```dot
|
|
19
|
+
digraph when_to_use {
|
|
20
|
+
"Multiple failures?" [shape=diamond];
|
|
21
|
+
"Are they independent?" [shape=diamond];
|
|
22
|
+
"Single agent investigates all" [shape=box];
|
|
23
|
+
"One agent per problem domain" [shape=box];
|
|
24
|
+
"Can they work in parallel?" [shape=diamond];
|
|
25
|
+
"Sequential agents" [shape=box];
|
|
26
|
+
"Parallel dispatch" [shape=box];
|
|
27
|
+
|
|
28
|
+
"Multiple failures?" -> "Are they independent?" [label="yes"];
|
|
29
|
+
"Are they independent?" -> "Single agent investigates all" [label="no - related"];
|
|
30
|
+
"Are they independent?" -> "Can they work in parallel?" [label="yes"];
|
|
31
|
+
"Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
|
|
32
|
+
"Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Use when:**
|
|
37
|
+
- 3+ test files failing with different root causes
|
|
38
|
+
- Multiple subsystems broken independently
|
|
39
|
+
- Each problem can be understood without context from others
|
|
40
|
+
- No shared state between investigations
|
|
41
|
+
|
|
42
|
+
**Don't use when:**
|
|
43
|
+
- Failures are related (fix one might fix others)
|
|
44
|
+
- Need to understand full system state
|
|
45
|
+
- Agents would interfere with each other
|
|
46
|
+
|
|
47
|
+
## The Pattern
|
|
48
|
+
|
|
49
|
+
### 1. Identify Independent Domains
|
|
50
|
+
|
|
51
|
+
Group failures by what's broken:
|
|
52
|
+
- File A tests: Tool approval flow
|
|
53
|
+
- File B tests: Batch completion behavior
|
|
54
|
+
- File C tests: Abort functionality
|
|
55
|
+
|
|
56
|
+
Each domain is independent - fixing tool approval doesn't affect abort tests.
|
|
57
|
+
|
|
58
|
+
### 2. Create Focused Agent Tasks
|
|
59
|
+
|
|
60
|
+
Each agent gets:
|
|
61
|
+
- **Specific scope:** One test file or subsystem
|
|
62
|
+
- **Clear goal:** Make these tests pass
|
|
63
|
+
- **Constraints:** Don't change other code
|
|
64
|
+
- **Expected output:** Summary of what you found and fixed
|
|
65
|
+
|
|
66
|
+
### 3. Dispatch in Parallel
|
|
67
|
+
|
|
68
|
+
Issue all three subagent dispatches in the same response — they run in parallel:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
Subagent (general-purpose): "Fix agent-tool-abort.test.ts failures"
|
|
72
|
+
Subagent (general-purpose): "Fix batch-completion-behavior.test.ts failures"
|
|
73
|
+
Subagent (general-purpose): "Fix tool-approval-race-conditions.test.ts failures"
|
|
74
|
+
# All three run concurrently.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Multiple dispatch calls in one response = parallel execution. One per response = sequential.
|
|
78
|
+
|
|
79
|
+
### 4. Review and Integrate
|
|
80
|
+
|
|
81
|
+
When agents return:
|
|
82
|
+
- Read each summary
|
|
83
|
+
- Verify fixes don't conflict
|
|
84
|
+
- Run full test suite
|
|
85
|
+
- Integrate all changes
|
|
86
|
+
|
|
87
|
+
## Agent Prompt Structure
|
|
88
|
+
|
|
89
|
+
Good agent prompts are:
|
|
90
|
+
1. **Focused** - One clear problem domain
|
|
91
|
+
2. **Self-contained** - All context needed to understand the problem
|
|
92
|
+
3. **Specific about output** - What should the agent return?
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
|
|
96
|
+
|
|
97
|
+
1. "should abort tool with partial output capture" - expects 'interrupted at' in message
|
|
98
|
+
2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
|
|
99
|
+
3. "should properly track pendingToolCount" - expects 3 results but gets 0
|
|
100
|
+
|
|
101
|
+
These are timing/race condition issues. Your task:
|
|
102
|
+
|
|
103
|
+
1. Read the test file and understand what each test verifies
|
|
104
|
+
2. Identify root cause - timing issues or actual bugs?
|
|
105
|
+
3. Fix by:
|
|
106
|
+
- Replacing arbitrary timeouts with event-based waiting
|
|
107
|
+
- Fixing bugs in abort implementation if found
|
|
108
|
+
- Adjusting test expectations if testing changed behavior
|
|
109
|
+
|
|
110
|
+
Do NOT just increase timeouts - find the real issue.
|
|
111
|
+
|
|
112
|
+
Return: Summary of what you found and what you fixed.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Common Mistakes
|
|
116
|
+
|
|
117
|
+
**❌ Too broad:** "Fix all the tests" - agent gets lost
|
|
118
|
+
**✅ Specific:** "Fix agent-tool-abort.test.ts" - focused scope
|
|
119
|
+
|
|
120
|
+
**❌ No context:** "Fix the race condition" - agent doesn't know where
|
|
121
|
+
**✅ Context:** Paste the error messages and test names
|
|
122
|
+
|
|
123
|
+
**❌ No constraints:** Agent might refactor everything
|
|
124
|
+
**✅ Constraints:** "Do NOT change production code" or "Fix tests only"
|
|
125
|
+
|
|
126
|
+
**❌ Vague output:** "Fix it" - you don't know what changed
|
|
127
|
+
**✅ Specific:** "Return summary of root cause and changes"
|
|
128
|
+
|
|
129
|
+
## When NOT to Use
|
|
130
|
+
|
|
131
|
+
**Related failures:** Fixing one might fix others - investigate together first
|
|
132
|
+
**Need full context:** Understanding requires seeing entire system
|
|
133
|
+
**Exploratory debugging:** You don't know what's broken yet
|
|
134
|
+
**Shared state:** Agents would interfere (editing same files, using same resources)
|
|
135
|
+
|
|
136
|
+
## Real Example from Session
|
|
137
|
+
|
|
138
|
+
**Scenario:** 6 test failures across 3 files after major refactoring
|
|
139
|
+
|
|
140
|
+
**Failures:**
|
|
141
|
+
- agent-tool-abort.test.ts: 3 failures (timing issues)
|
|
142
|
+
- batch-completion-behavior.test.ts: 2 failures (tools not executing)
|
|
143
|
+
- tool-approval-race-conditions.test.ts: 1 failure (execution count = 0)
|
|
144
|
+
|
|
145
|
+
**Decision:** Independent domains - abort logic separate from batch completion separate from race conditions
|
|
146
|
+
|
|
147
|
+
**Dispatch:**
|
|
148
|
+
```
|
|
149
|
+
Agent 1 → Fix agent-tool-abort.test.ts
|
|
150
|
+
Agent 2 → Fix batch-completion-behavior.test.ts
|
|
151
|
+
Agent 3 → Fix tool-approval-race-conditions.test.ts
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Results:**
|
|
155
|
+
- Agent 1: Replaced timeouts with event-based waiting
|
|
156
|
+
- Agent 2: Fixed event structure bug (threadId in wrong place)
|
|
157
|
+
- Agent 3: Added wait for async tool execution to complete
|
|
158
|
+
|
|
159
|
+
**Integration:** All fixes independent, no conflicts, full suite green
|
|
160
|
+
|
|
161
|
+
**Time saved:** 3 problems solved in parallel vs sequentially
|
|
162
|
+
|
|
163
|
+
## Key Benefits
|
|
164
|
+
|
|
165
|
+
1. **Parallelization** - Multiple investigations happen simultaneously
|
|
166
|
+
2. **Focus** - Each agent has narrow scope, less context to track
|
|
167
|
+
3. **Independence** - Agents don't interfere with each other
|
|
168
|
+
4. **Speed** - 3 problems solved in time of 1
|
|
169
|
+
|
|
170
|
+
## Verification
|
|
171
|
+
|
|
172
|
+
After agents return:
|
|
173
|
+
1. **Review each summary** - Understand what changed
|
|
174
|
+
2. **Check for conflicts** - Did agents edit same code?
|
|
175
|
+
3. **Run full suite** - Verify all fixes work together
|
|
176
|
+
4. **Spot check** - Agents can make systematic errors
|
|
177
|
+
|
|
178
|
+
## Real-World Impact
|
|
179
|
+
|
|
180
|
+
From debugging session (2025-10-03):
|
|
181
|
+
- 6 failures across 3 files
|
|
182
|
+
- 3 agents dispatched in parallel
|
|
183
|
+
- All investigations completed concurrently
|
|
184
|
+
- All fixes integrated successfully
|
|
185
|
+
- Zero conflicts between agent changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# ADR Format
|
|
2
|
+
|
|
3
|
+
ADRs live in `docs/adr/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc.
|
|
4
|
+
|
|
5
|
+
Create the `docs/adr/` directory lazily — only when the first ADR is needed.
|
|
6
|
+
|
|
7
|
+
## Template
|
|
8
|
+
|
|
9
|
+
```md
|
|
10
|
+
# {Short title of the decision}
|
|
11
|
+
|
|
12
|
+
{1-3 sentences: what's the context, what did we decide, and why.}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
That's it. An ADR can be a single paragraph. The value is in recording *that* a decision was made and *why* — not in filling out sections.
|
|
16
|
+
|
|
17
|
+
## Optional sections
|
|
18
|
+
|
|
19
|
+
Only include these when they add genuine value. Most ADRs won't need them.
|
|
20
|
+
|
|
21
|
+
- **Status** frontmatter (`proposed | accepted | deprecated | superseded by ADR-NNNN`) — useful when decisions are revisited
|
|
22
|
+
- **Considered Options** — only when the rejected alternatives are worth remembering
|
|
23
|
+
- **Consequences** — only when non-obvious downstream effects need to be called out
|
|
24
|
+
|
|
25
|
+
## Numbering
|
|
26
|
+
|
|
27
|
+
Scan `docs/adr/` for the highest existing number and increment by one.
|
|
28
|
+
|
|
29
|
+
## When to offer an ADR
|
|
30
|
+
|
|
31
|
+
All three of these must be true:
|
|
32
|
+
|
|
33
|
+
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
34
|
+
2. **Surprising without context** — a future reader will look at the code and wonder "why on earth did they do it this way?"
|
|
35
|
+
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
36
|
+
|
|
37
|
+
If a decision is easy to reverse, skip it — you'll just reverse it. If it's not surprising, nobody will wonder why. If there was no real alternative, there's nothing to record beyond "we did the obvious thing."
|
|
38
|
+
|
|
39
|
+
### What qualifies
|
|
40
|
+
|
|
41
|
+
- **Architectural shape.** "We're using a monorepo." "The write model is event-sourced, the read model is projected into Postgres."
|
|
42
|
+
- **Integration patterns between contexts.** "Ordering and Billing communicate via domain events, not synchronous HTTP."
|
|
43
|
+
- **Technology choices that carry lock-in.** Database, message bus, auth provider, deployment target. Not every library — just the ones that would take a quarter to swap out.
|
|
44
|
+
- **Boundary and scope decisions.** "Customer data is owned by the Customer context; other contexts reference it by ID only." The explicit no-s are as valuable as the yes-s.
|
|
45
|
+
- **Deliberate deviations from the obvious path.** "We're using manual SQL instead of an ORM because X." Anything where a reasonable reader would assume the opposite. These stop the next engineer from "fixing" something that was deliberate.
|
|
46
|
+
- **Constraints not visible in the code.** "We can't use AWS because of compliance requirements." "Response times must be under 200ms because of the partner API contract."
|
|
47
|
+
- **Rejected alternatives when the rejection is non-obvious.** If you considered GraphQL and picked REST for subtle reasons, record it — otherwise someone will suggest GraphQL again in six months.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# CONTEXT.md Format
|
|
2
|
+
|
|
3
|
+
## Structure
|
|
4
|
+
|
|
5
|
+
```md
|
|
6
|
+
# {Context Name}
|
|
7
|
+
|
|
8
|
+
{One or two sentence description of what this context is and why it exists.}
|
|
9
|
+
|
|
10
|
+
## Language
|
|
11
|
+
|
|
12
|
+
**Order**:
|
|
13
|
+
{A one or two sentence description of the term}
|
|
14
|
+
_Avoid_: Purchase, transaction
|
|
15
|
+
|
|
16
|
+
**Invoice**:
|
|
17
|
+
A request for payment sent to a customer after delivery.
|
|
18
|
+
_Avoid_: Bill, payment request
|
|
19
|
+
|
|
20
|
+
**Customer**:
|
|
21
|
+
A person or organization that places orders.
|
|
22
|
+
_Avoid_: Client, buyer, account
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
|
|
28
|
+
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
|
|
29
|
+
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
|
|
30
|
+
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
31
|
+
|
|
32
|
+
## Single vs multi-context repos
|
|
33
|
+
|
|
34
|
+
**Single context (most repos):** One `CONTEXT.md` at the repo root.
|
|
35
|
+
|
|
36
|
+
**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
37
|
+
|
|
38
|
+
```md
|
|
39
|
+
# Context Map
|
|
40
|
+
|
|
41
|
+
## Contexts
|
|
42
|
+
|
|
43
|
+
- [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
|
|
44
|
+
- [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
|
|
45
|
+
- [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping
|
|
46
|
+
|
|
47
|
+
## Relationships
|
|
48
|
+
|
|
49
|
+
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
50
|
+
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
51
|
+
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The skill infers which structure applies:
|
|
55
|
+
|
|
56
|
+
- If `CONTEXT-MAP.md` exists, read it to find contexts
|
|
57
|
+
- If only a root `CONTEXT.md` exists, single context
|
|
58
|
+
- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
|
|
59
|
+
|
|
60
|
+
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: domain-modeling
|
|
3
|
+
description: Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Domain Modeling
|
|
7
|
+
|
|
8
|
+
Actively build and sharpen the project's domain model as you design. This is the *active* discipline — challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely *reading* `CONTEXT.md` for vocabulary is not this skill — that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
|
|
9
|
+
|
|
10
|
+
## File structure
|
|
11
|
+
|
|
12
|
+
Most repos have a single context:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/
|
|
16
|
+
├── CONTEXT.md
|
|
17
|
+
├── docs/
|
|
18
|
+
│ └── adr/
|
|
19
|
+
│ ├── 0001-event-sourced-orders.md
|
|
20
|
+
│ └── 0002-postgres-for-write-model.md
|
|
21
|
+
└── src/
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
/
|
|
28
|
+
├── CONTEXT-MAP.md
|
|
29
|
+
├── docs/
|
|
30
|
+
│ └── adr/ ← system-wide decisions
|
|
31
|
+
├── src/
|
|
32
|
+
│ ├── ordering/
|
|
33
|
+
│ │ ├── CONTEXT.md
|
|
34
|
+
│ │ └── docs/adr/ ← context-specific decisions
|
|
35
|
+
│ └── billing/
|
|
36
|
+
│ ├── CONTEXT.md
|
|
37
|
+
│ └── docs/adr/
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
|
|
41
|
+
|
|
42
|
+
## During the session
|
|
43
|
+
|
|
44
|
+
### Challenge against the glossary
|
|
45
|
+
|
|
46
|
+
When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"
|
|
47
|
+
|
|
48
|
+
### Sharpen fuzzy language
|
|
49
|
+
|
|
50
|
+
When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account' — do you mean the Customer or the User? Those are different things."
|
|
51
|
+
|
|
52
|
+
### Discuss concrete scenarios
|
|
53
|
+
|
|
54
|
+
When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
|
|
55
|
+
|
|
56
|
+
### Cross-reference with code
|
|
57
|
+
|
|
58
|
+
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"
|
|
59
|
+
|
|
60
|
+
### Update CONTEXT.md inline
|
|
61
|
+
|
|
62
|
+
When a term is resolved, update `CONTEXT.md` right there. Don't batch these up — capture them as they happen. Use the format in [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md).
|
|
63
|
+
|
|
64
|
+
`CONTEXT.md` should be totally devoid of implementation details. Do not treat `CONTEXT.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
|
|
65
|
+
|
|
66
|
+
### Offer ADRs sparingly
|
|
67
|
+
|
|
68
|
+
Only offer to create an ADR when all three are true:
|
|
69
|
+
|
|
70
|
+
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
71
|
+
2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
|
|
72
|
+
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
73
|
+
|
|
74
|
+
If any of the three is missing, skip the ADR. Use the format in [ADR-FORMAT.md](./ADR-FORMAT.md).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: edit-article
|
|
3
|
+
description: Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
1. First, divide the article into sections based on its headings. Think about the main points you want to make during those sections.
|
|
8
|
+
|
|
9
|
+
Consider that information is a directed acyclic graph, and that pieces of information can depend on other pieces of information. Make sure that the order of the sections and their contents respects these dependencies.
|
|
10
|
+
|
|
11
|
+
Confirm the sections with the user.
|
|
12
|
+
|
|
13
|
+
2. For each section:
|
|
14
|
+
|
|
15
|
+
2a. Rewrite the section to improve clarity, coherence, and flow. Use maximum 240 characters per paragraph.
|