@martinffx/atelier 1.0.2 → 1.2.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/CHANGELOG.md +25 -0
- package/README.md +6 -5
- package/package.json +1 -1
- package/skills/{code-conventional-commit → code-commit}/SKILL.md +16 -1
- package/skills/code-commit/references/pr-workflow.md +145 -0
- package/skills/code-debug/SKILL.md +119 -191
- package/skills/code-debug/references/bug-patterns.md +71 -0
- package/skills/code-debug/references/techniques.md +44 -4
- package/skills/code-handoff/SKILL.md +16 -0
- package/skills/code-review/references/reviewers.md +3 -11
- package/skills/code-review/references/rq.md +4 -5
- package/skills/oracle-architect/SKILL.md +82 -1
- package/skills/oracle-architect/references/ddd-patterns.md +101 -0
- package/skills/oracle-architect/references/interface-design.md +203 -0
- package/skills/oracle-doubt/SKILL.md +252 -0
- package/skills/oracle-doubt/references/adversarial-prompt.md +47 -0
- package/skills/oracle-grillme/SKILL.md +160 -0
- package/skills/oracle-grillme/references/ADR-FORMAT.md +47 -0
- package/skills/oracle-grillme/references/CONTEXT-FORMAT.md +63 -0
- package/skills/oracle-security/SKILL.md +225 -0
- package/skills/oracle-security/references/security-patterns.md +236 -0
- package/skills/oracle-security/references/threat-modeling-guide.md +137 -0
- package/skills/spec-finish/SKILL.md +2 -5
- package/skills/spec-implement/SKILL.md +1 -1
- package/skills/code-conventional-commit/evals/evals.json +0 -23
- package/skills/code-conventional-commit/workspace/iteration-1/eval-0/with_skill/outputs/commit-message.txt +0 -4
- package/skills/code-conventional-commit/workspace/iteration-1/eval-0/with_skill/outputs/eval_metadata.json +0 -6
- package/skills/code-conventional-commit/workspace/iteration-1/eval-1/with_skill/outputs/eval_metadata.json +0 -6
- package/skills/code-conventional-commit/workspace/iteration-1/eval-1/with_skill/outputs/validation-result.txt +0 -16
- package/skills/code-conventional-commit/workspace/iteration-1/eval-2/with_skill/outputs/commit-message.txt +0 -8
- package/skills/code-conventional-commit/workspace/iteration-1/eval-2/with_skill/outputs/eval_metadata.json +0 -6
- package/skills/code-conventional-commit/workspace/iteration-1/report.html +0 -1325
- package/skills/code-git-worktrees/SKILL.md +0 -218
- package/skills/code-perf/SKILL.md +0 -163
- package/skills/code-perf/references/common-bottlenecks.md +0 -124
- package/skills/code-perf/references/optimization-patterns.md +0 -167
- package/skills/code-perf/references/profiling-tools.md +0 -126
- package/skills/code-security/SKILL.md +0 -183
- package/skills/code-security/references/owasp-top-10.md +0 -129
- package/skills/code-security/references/security-tools.md +0 -102
- package/skills/code-security/references/vulnerability-patterns.md +0 -129
- package/skills/code-stacked-commit/SKILL.md +0 -155
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-doubt
|
|
3
|
+
description: >
|
|
4
|
+
Adversarial review of non-trivial decisions using fresh-context scrutiny.
|
|
5
|
+
Use when correctness matters more than speed, when stakes are high
|
|
6
|
+
(production, security-sensitive logic, irreversible operations), or before
|
|
7
|
+
committing significant architectural or implementation choices.
|
|
8
|
+
user-invocable: true
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Doubt: Fresh-Context Adversarial Review
|
|
12
|
+
|
|
13
|
+
A confident answer is not a correct one. Long sessions accumulate context that quietly turns assumptions into "facts" without anyone noticing. Doubt-driven development is the discipline of materializing a fresh-context reviewer — biased to **disprove**, not approve — before any non-trivial output stands.
|
|
14
|
+
|
|
15
|
+
This is not `/review`. `/review` is a verdict on a finished artifact. This is an in-flight posture: non-trivial decisions get cross-examined while course-correction is still cheap.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
18
|
+
|
|
19
|
+
A decision is **non-trivial** when at least one of these is true:
|
|
20
|
+
|
|
21
|
+
- It introduces or modifies branching logic
|
|
22
|
+
- It crosses a module or service boundary
|
|
23
|
+
- It asserts a property the type system or compiler cannot verify (thread safety, idempotence, ordering, invariants)
|
|
24
|
+
- Its correctness depends on context the future reader cannot see
|
|
25
|
+
- Its blast radius is irreversible (production deploy, data migration, public API change)
|
|
26
|
+
|
|
27
|
+
Apply the skill when:
|
|
28
|
+
|
|
29
|
+
- About to make an architectural decision under uncertainty
|
|
30
|
+
- About to commit non-trivial code
|
|
31
|
+
- About to claim a non-obvious fact ("this is safe", "this scales", "this matches the spec")
|
|
32
|
+
- Working in code you don't fully understand
|
|
33
|
+
|
|
34
|
+
**When NOT to use:**
|
|
35
|
+
|
|
36
|
+
- Mechanical operations (renaming, formatting, file moves)
|
|
37
|
+
- Following a clear, unambiguous user instruction
|
|
38
|
+
- Reading or summarizing existing code
|
|
39
|
+
- One-line changes with obvious correctness
|
|
40
|
+
- Pure tooling operations (running tests, listing files)
|
|
41
|
+
- The user has explicitly asked for speed over verification
|
|
42
|
+
|
|
43
|
+
If you doubt every keystroke, you ship nothing. The skill applies only to non-trivial decisions as defined above.
|
|
44
|
+
|
|
45
|
+
## Loading Constraints
|
|
46
|
+
|
|
47
|
+
This skill is designed for the **main-session orchestrator**, where Step 3 (DOUBT) can spawn fresh-context reviewers via the `task` tool.
|
|
48
|
+
|
|
49
|
+
- **Do NOT add this skill to a persona's `skills:` frontmatter.** A persona that follows Step 3 would spawn another persona — the orchestration anti-pattern explicitly forbidden by `references/orchestration-patterns.md` ("personas do not invoke other personas").
|
|
50
|
+
- **If you find yourself applying this skill from inside a subagent context** (where nested subagent spawn is prevented): the preferred path is to surface to the user that doubt-driven cannot run nested and let the main session handle it. As a last resort only, a degraded self-questioning fallback exists — rewrite ARTIFACT + CONTRACT as a fresh self-prompt with a hard mental separator from your prior reasoning, and walk Steps 1–5. This is **not fresh-context review** (you carry your own context with you), so flag the result as degraded and prefer escalation whenever the user is reachable.
|
|
51
|
+
|
|
52
|
+
## The Process
|
|
53
|
+
|
|
54
|
+
Copy this checklist when applying the skill:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Doubt cycle:
|
|
58
|
+
- [ ] Step 1: CLAIM — wrote the claim + why-it-matters
|
|
59
|
+
- [ ] Step 2: EXTRACT — isolated artifact + contract, stripped reasoning
|
|
60
|
+
- [ ] Step 3: DOUBT — invoked fresh-context reviewer with adversarial prompt
|
|
61
|
+
- [ ] Step 4: RECONCILE — classified every finding against the artifact text
|
|
62
|
+
- [ ] Step 5: STOP — met stop condition (trivial findings, 3 cycles, or user override)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Step 1: CLAIM — Surface what stands
|
|
66
|
+
|
|
67
|
+
Name the decision in two or three lines:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
CLAIM: "The new caching layer is thread-safe under the
|
|
71
|
+
read-heavy workload described in the spec."
|
|
72
|
+
WHY THIS MATTERS: a race here corrupts user data and is
|
|
73
|
+
hard to detect in QA.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If you can't write the claim that compactly, you have a vibe, not a decision. Surface it before scrutinizing it.
|
|
77
|
+
|
|
78
|
+
### Step 2: EXTRACT — Smallest reviewable unit
|
|
79
|
+
|
|
80
|
+
A fresh-context reviewer needs the **artifact** and the **contract**, not the journey.
|
|
81
|
+
|
|
82
|
+
- **Code**: the diff or the function — not the whole file
|
|
83
|
+
- **Decision**: the proposal in 3–5 sentences plus the constraints it has to satisfy
|
|
84
|
+
- **Assertion**: the claim plus the evidence that supposedly supports it (kept distinct from the Step 1 CLAIM block, which is the orchestrator's hypothesis under scrutiny)
|
|
85
|
+
|
|
86
|
+
Strip your reasoning. If you hand over conclusions, you'll get back validation of your conclusions. The unit must be small enough that a reviewer can hold it in mind in one read — if it's a 500-line PR, decompose first.
|
|
87
|
+
|
|
88
|
+
### Step 3: DOUBT — Invoke the fresh-context reviewer
|
|
89
|
+
|
|
90
|
+
The reviewer's prompt **must be adversarial**. Framing decides the answer.
|
|
91
|
+
|
|
92
|
+
Use the adversarial prompt template from [references/adversarial-prompt.md](references/adversarial-prompt.md). The template is pasted verbatim into the subagent invocation to override any persona's default balanced response shape.
|
|
93
|
+
|
|
94
|
+
**Pass ARTIFACT + CONTRACT only. Do NOT pass the CLAIM.** Handing the reviewer your conclusion biases it toward agreement. The reviewer must independently determine whether the artifact satisfies the contract.
|
|
95
|
+
|
|
96
|
+
#### Cross-model escalation
|
|
97
|
+
|
|
98
|
+
A single-model reviewer shares blind spots with the original author — a colder, different-architecture perspective catches them. Doubt-driven is already opt-in for non-trivial decisions, so within that scope offering cross-model is part of the skill's value, not optional friction.
|
|
99
|
+
|
|
100
|
+
**Interactive sessions: always offer. Never silently skip.**
|
|
101
|
+
|
|
102
|
+
**Step 1: Ask the user**
|
|
103
|
+
|
|
104
|
+
After the single-model review in Step 3 above, but before RECONCILE, pause and ask:
|
|
105
|
+
|
|
106
|
+
> *"Single-model review complete. Want a cross-model second opinion? Options: spawn parallel subagents with different types (oracle + architect), manual external review (you paste it elsewhere), or skip."*
|
|
107
|
+
|
|
108
|
+
This question is mandatory in every interactive doubt cycle — even on artifacts that feel low-stakes. The user — not the agent — decides whether the cost is worth it. The agent's job is to surface the choice.
|
|
109
|
+
|
|
110
|
+
**Step 2: If the user picks parallel subagents — dispatch**
|
|
111
|
+
|
|
112
|
+
Spawn two `task` subagents in parallel with the same adversarial prompt + ARTIFACT + CONTRACT:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
task tool:
|
|
116
|
+
subagent_type: oracle
|
|
117
|
+
task tool:
|
|
118
|
+
subagent_type: architect
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Each subagent starts with isolated context by design. Take both outputs into Step 4 (RECONCILE).
|
|
122
|
+
|
|
123
|
+
**Step 3: If the user skips**
|
|
124
|
+
|
|
125
|
+
Acknowledge the skip in the output (*"Proceeding with single-model findings only"*) and continue to RECONCILE. Skipping is fine; silent skipping is not.
|
|
126
|
+
|
|
127
|
+
**Non-interactive contexts** (CI, scheduled runs):
|
|
128
|
+
|
|
129
|
+
- Cross-model is **skipped**, and the skip must be **announced** in the output: *"Cross-model skipped: non-interactive context."*
|
|
130
|
+
- **Never invoke external subagents without explicit user authorization** — this is a load-bearing safety property.
|
|
131
|
+
|
|
132
|
+
Cross-model adds cost, latency, and tool fragility. The agent surfaces the choice every cycle; the user decides whether this artifact warrants it.
|
|
133
|
+
|
|
134
|
+
### Step 4: RECONCILE — Fold findings back
|
|
135
|
+
|
|
136
|
+
The reviewer's output is data, not verdict. **You are still the orchestrator.** Re-read the artifact text against each finding before classifying — rubber-stamping the reviewer is the same failure mode as ignoring it.
|
|
137
|
+
|
|
138
|
+
For each finding, classify in this **precedence order** (first matching class wins):
|
|
139
|
+
|
|
140
|
+
1. **Contract misread** — reviewer flagged something specifically because the CONTRACT you provided was unclear or incomplete. Fix the contract first, re-classify on the next cycle.
|
|
141
|
+
2. **Valid + actionable** — real issue requiring a change to the artifact. Change it, re-loop.
|
|
142
|
+
3. **Valid trade-off** — issue is real but cost of fixing exceeds cost of accepting. Document the trade-off explicitly so the user sees it.
|
|
143
|
+
4. **Noise** — reviewer flagged something that's actually correct under context the reviewer didn't have. Note it, move on, and ask: would adding that context to the contract have prevented the false flag?
|
|
144
|
+
|
|
145
|
+
A fresh reviewer can be wrong because it lacks context. Don't defer just because it's "fresh."
|
|
146
|
+
|
|
147
|
+
### Step 5: STOP — Bounded loop, not recursion
|
|
148
|
+
|
|
149
|
+
Stop when:
|
|
150
|
+
|
|
151
|
+
- Next iteration returns only trivial or already-considered findings, **or**
|
|
152
|
+
- 3 cycles completed (escalate to user, don't grind a fourth alone), **or**
|
|
153
|
+
- User explicitly says "ship it"
|
|
154
|
+
|
|
155
|
+
If after 3 cycles the reviewer still surfaces substantive issues, the artifact may not be ready. Surface this to the user — three unresolved cycles is information about the artifact, not a reason to keep looping.
|
|
156
|
+
|
|
157
|
+
If 3 cycles is "obviously insufficient" because the artifact is large: the artifact is too big — return to Step 2 and decompose. Do not lift the bound.
|
|
158
|
+
|
|
159
|
+
## Common Rationalizations
|
|
160
|
+
|
|
161
|
+
| Rationalization | Reality |
|
|
162
|
+
|---|---|
|
|
163
|
+
| "I'm confident, skip the doubt step" | Confidence correlates poorly with correctness on novel problems. Moments of certainty are exactly when blind spots hide. |
|
|
164
|
+
| "Spawning a reviewer is expensive" | Debugging a wrong commit in production is more expensive. The check is bounded; the bug isn't. |
|
|
165
|
+
| "The reviewer will just nitpick" | Only if unscoped. Constrain the prompt to "issues that would make this fail under the contract." |
|
|
166
|
+
| "I'll do doubt at the end with `/review`" | `/review` is a final gate. Doubt-driven catches wrong directions early when course-correction is cheap. By PR time it's too late. |
|
|
167
|
+
| "If I doubt every step I'll never ship" | The skill applies to non-trivial decisions, not every keystroke. Re-read "When NOT to Use." |
|
|
168
|
+
| "Two opinions are always better than one" | Not when the second has less context and produces noise. Reconcile, don't defer. |
|
|
169
|
+
| "The reviewer disagreed so I was wrong" | The reviewer lacks your context — disagreement is information, not verdict. Re-read the artifact, classify, then decide. |
|
|
170
|
+
| "Cross-model is always better" | Cross-model catches blind spots a single model shares with itself, but it adds cost and tool fragility. Offer it every interactive doubt cycle — the user decides whether the artifact warrants it. The agent's job is to surface the choice, not to gate it. |
|
|
171
|
+
| "User said yes once, so I can keep invoking subagents" | Each invocation is its own authorization. The artifact, the prompt, and the context change between calls — re-confirm with the user before every run. |
|
|
172
|
+
|
|
173
|
+
## Red Flags
|
|
174
|
+
|
|
175
|
+
- Spawning a fresh-context reviewer for a one-line rename or formatting change
|
|
176
|
+
- Treating reviewer output as authoritative without re-reading the artifact text
|
|
177
|
+
- Looping >3 cycles without escalating to the user
|
|
178
|
+
- Prompting the reviewer with "is this good?" instead of "find issues"
|
|
179
|
+
- Skipping doubt under time pressure on a high-stakes decision
|
|
180
|
+
- Re-spawning fresh-context on an unchanged artifact (you'll get the same findings; you're stalling)
|
|
181
|
+
- **Doubt theater (checkable signal)**: across 2 or more cycles where the reviewer surfaced substantive findings, zero findings were classified as actionable. You are validating, not doubting. Stop and escalate.
|
|
182
|
+
- Doubting only after committing — that's `/review`, not doubt-driven development
|
|
183
|
+
- Hardcoding a subagent invocation without confirming with the user that the approach is acceptable
|
|
184
|
+
- **Silently skipping cross-model in an interactive doubt cycle.** Even when not recommending it, the offer must be visible. Skipping is fine; silent skipping is not.
|
|
185
|
+
- Falling back silently when a subagent errors or is unavailable — surface the failure and let the user redirect
|
|
186
|
+
- Stripping the contract from the reviewer's input
|
|
187
|
+
- Passing the CLAIM to the reviewer (biases toward agreement)
|
|
188
|
+
|
|
189
|
+
## Interaction with Other Skills
|
|
190
|
+
|
|
191
|
+
- **`code-review` / `/review`**: complementary. `/review` is post-hoc PR verdict; doubt-driven is in-flight per-decision. Use both.
|
|
192
|
+
- **`oracle-architect`** / **`spec-research`**: SDD verifies *facts about frameworks* against official docs. Doubt-driven verifies *your reasoning about the artifact*. SDD checks the API exists; doubt-driven checks you used it correctly under the contract.
|
|
193
|
+
- **`oracle-testing`**: TDD's RED step is doubt made concrete — a failing test is a disproof attempt. When TDD applies, that failing test *is* the doubt step for behavioral claims.
|
|
194
|
+
- **`code-debug`**: when the reviewer surfaces a real failure mode, drop into the debugging skill to localize and fix.
|
|
195
|
+
|
|
196
|
+
## Verification
|
|
197
|
+
|
|
198
|
+
After applying doubt-driven development:
|
|
199
|
+
|
|
200
|
+
- Every non-trivial decision (per the definition above) was named explicitly as a CLAIM before standing
|
|
201
|
+
- At least one fresh-context review per non-trivial artifact (a failing test produced by TDD's RED step satisfies this for behavioral claims, per Interaction with Other Skills)
|
|
202
|
+
- The reviewer received ARTIFACT + CONTRACT — NOT the CLAIM, NOT your reasoning
|
|
203
|
+
- The reviewer's prompt was adversarial ("find issues"), not validating ("is it good")
|
|
204
|
+
- Findings were classified against the artifact text (not rubber-stamped) using the precedence: contract misread / actionable / trade-off / noise
|
|
205
|
+
- A stop condition was met (trivial findings, 3 cycles, or user override)
|
|
206
|
+
- In interactive mode, cross-model was **explicitly offered** to the user (regardless of artifact stakes) and the response was acknowledged in the output
|
|
207
|
+
- In non-interactive mode, cross-model was skipped and the skip was announced
|
|
208
|
+
- Any subagent invocation was preceded by user authorization and confirmation of the approach
|
|
209
|
+
|
|
210
|
+
## Usage Examples
|
|
211
|
+
|
|
212
|
+
**Doubt an architectural decision:**
|
|
213
|
+
```
|
|
214
|
+
/atelier-doubt
|
|
215
|
+
CLAIM: "I will use DynamoDB single-table design for the Order service."
|
|
216
|
+
WHY: "Single-table simplifies access patterns but may couple unrelated domains."
|
|
217
|
+
ARTIFACT: "Proposed key schema: PK=ORDER#<id>, SK=METADATA#<id>. All order data in one table."
|
|
218
|
+
CONTRACT: "Must support: 1) lookup by order ID, 2) list by customer, 3) list by status. No cross-domain queries."
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Doubt a code change before commit:**
|
|
222
|
+
```
|
|
223
|
+
/atelier-doubt
|
|
224
|
+
CLAIM: "The retry logic in PaymentService is safe under concurrent requests."
|
|
225
|
+
WHY: "Race here could double-charge customers."
|
|
226
|
+
ARTIFACT: "<paste diff or function>"
|
|
227
|
+
CONTRACT: "Must be idempotent: same paymentId processed twice produces same result, no duplicate charges."
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Doubt a non-obvious assertion:**
|
|
231
|
+
```
|
|
232
|
+
/atelier-doubt
|
|
233
|
+
CLAIM: "This migration is safe to run online without downtime."
|
|
234
|
+
WHY: "Downtime here blocks checkout for all users."
|
|
235
|
+
ARTIFACT: "ALTER TABLE orders ADD COLUMN tracking_id VARCHAR(255); CREATE INDEX idx_tracking ON orders(tracking_id);"
|
|
236
|
+
CONTRACT: "Must not lock table for more than 1 second. Must not fail on 10M row table. Must be backward-compatible with running application code."
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Relationship to Other Skills
|
|
240
|
+
|
|
241
|
+
| Skill | Use When |
|
|
242
|
+
|---|---|
|
|
243
|
+
| **oracle-doubt** | In-flight adversarial review before a decision stands. Catches wrong directions early. |
|
|
244
|
+
| **oracle-challenge** | Critically evaluating an existing approach or decision after it's been made. |
|
|
245
|
+
| **code-review** | Post-hoc PR verdict on a finished artifact. |
|
|
246
|
+
| **oracle-testing** | TDD RED step serves as the doubt mechanism for behavioral claims. |
|
|
247
|
+
| **oracle-thinkdeep** | Deep exploration and alternative discovery for complex decisions (use doubt after thinkdeep narrows to a specific choice). |
|
|
248
|
+
|
|
249
|
+
**Key distinction:**
|
|
250
|
+
- `oracle-doubt` = "Before I commit to this, prove me wrong" (pre-commit adversarial review)
|
|
251
|
+
- `oracle-challenge` = "Is this approach valid?" (critical evaluation of standing decisions)
|
|
252
|
+
- `code-review` = "Judge this finished artifact" (post-hoc verdict)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Adversarial Reviewer Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this prompt when spawning a fresh-context reviewer via the `task` tool.
|
|
4
|
+
The reviewer must receive **ARTIFACT + CONTRACT only** — never the CLAIM or orchestrator's reasoning.
|
|
5
|
+
|
|
6
|
+
## Template
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
Adversarial review. Find what is wrong with this artifact.
|
|
10
|
+
Assume the author is overconfident. Look for:
|
|
11
|
+
- Unstated assumptions
|
|
12
|
+
- Edge cases not handled
|
|
13
|
+
- Hidden coupling or shared state
|
|
14
|
+
- Ways the contract could be violated
|
|
15
|
+
- Existing conventions this might break
|
|
16
|
+
- Failure modes under unexpected input
|
|
17
|
+
|
|
18
|
+
Do NOT validate. Do NOT summarize. Find issues, or state explicitly
|
|
19
|
+
that you cannot find any after thorough examination.
|
|
20
|
+
|
|
21
|
+
ARTIFACT:
|
|
22
|
+
{ARTIFACT}
|
|
23
|
+
|
|
24
|
+
CONTRACT:
|
|
25
|
+
{CONTRACT}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Dispatch via task tool
|
|
29
|
+
|
|
30
|
+
Spawn **parallel** subagents for cross-perspective review:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
# Reviewer 1: oracle perspective
|
|
34
|
+
<task tool call with subagent_type="oracle">
|
|
35
|
+
|
|
36
|
+
# Reviewer 2: architect perspective
|
|
37
|
+
<task tool call with subagent_type="architect">
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Each receives the **same** adversarial prompt above with ARTIFACT and CONTRACT.
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
- **Never pass the CLAIM** — handing the reviewer your conclusion biases them toward agreement
|
|
45
|
+
- **Never pass your reasoning** — the reviewer must independently determine whether the artifact satisfies the contract
|
|
46
|
+
- **Paste this prompt verbatim** — it overrides any persona's default response shape (which may be balanced/validating)
|
|
47
|
+
- **No session context** — the subagent starts fresh with only this prompt
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle-grillme
|
|
3
|
+
description: >
|
|
4
|
+
Socratic interrogation of plans against the project's domain model and documented decisions.
|
|
5
|
+
Use when the user wants to stress-test a plan, clarify terminology, or validate assumptions
|
|
6
|
+
against existing domain language. Updates CONTEXT.md and ADRs inline as decisions crystallise.
|
|
7
|
+
user-invocable: true
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Grill Me
|
|
11
|
+
|
|
12
|
+
Relentless questioning of your plan against the project's domain model, sharpening terminology and updating documentation (CONTEXT.md, ADRs) inline as decisions crystallise.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
- **Stress-testing a plan** — "I want to add a refund flow to the Order service"
|
|
17
|
+
- **Clarifying fuzzy language** — "We're calling it 'account' but is that a Customer or a User?"
|
|
18
|
+
- **Onboarding to a domain** — "Walk me through how the Billing context relates to Ordering"
|
|
19
|
+
- **Before writing specs** — Ensuring the domain language is solid before `spec-research` begins
|
|
20
|
+
- **After code review** — "The PR introduces 'cancellation' but our glossary says..."
|
|
21
|
+
|
|
22
|
+
## When NOT to Use
|
|
23
|
+
|
|
24
|
+
- **Simple implementation questions** — Use `oracle-challenge` or `oracle-architect` instead
|
|
25
|
+
- **Debugging** — Use `code-debug`
|
|
26
|
+
- **Testing strategy** — Use `oracle-testing`
|
|
27
|
+
- **Already in spec workflow** — Use `spec-research` + `oracle-architect` for domain discovery during the spec process
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## How It Works
|
|
32
|
+
|
|
33
|
+
<interview-loop>
|
|
34
|
+
|
|
35
|
+
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
36
|
+
|
|
37
|
+
Ask the questions one at a time, waiting for feedback on each question before continuing.
|
|
38
|
+
|
|
39
|
+
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
40
|
+
|
|
41
|
+
</interview-loop>
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Domain Awareness
|
|
46
|
+
|
|
47
|
+
### Discovering Context
|
|
48
|
+
|
|
49
|
+
Most repos have a single context:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
/
|
|
53
|
+
├── CONTEXT.md
|
|
54
|
+
├── docs/
|
|
55
|
+
│ └── adr/
|
|
56
|
+
│ ├── 0001-event-sourced-orders.md
|
|
57
|
+
│ └── 0002-postgres-for-write-model.md
|
|
58
|
+
└── src/
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
/
|
|
65
|
+
├── CONTEXT-MAP.md
|
|
66
|
+
├── docs/
|
|
67
|
+
│ └── adr/ ← system-wide decisions
|
|
68
|
+
├── src/
|
|
69
|
+
│ ├── ordering/
|
|
70
|
+
│ │ ├── CONTEXT.md
|
|
71
|
+
│ │ └── docs/adr/ ← context-specific decisions
|
|
72
|
+
│ └── billing/
|
|
73
|
+
│ ├── CONTEXT.md
|
|
74
|
+
│ └── docs/adr/
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
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.
|
|
78
|
+
|
|
79
|
+
### During the Session
|
|
80
|
+
|
|
81
|
+
#### Challenge Against the Glossary
|
|
82
|
+
|
|
83
|
+
When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately.
|
|
84
|
+
|
|
85
|
+
> "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"
|
|
86
|
+
|
|
87
|
+
#### Sharpen Fuzzy Language
|
|
88
|
+
|
|
89
|
+
When the user uses vague or overloaded terms, propose a precise canonical term.
|
|
90
|
+
|
|
91
|
+
> "You're saying 'account' — do you mean the Customer or the User? Those are different things."
|
|
92
|
+
|
|
93
|
+
#### Discuss Concrete Scenarios
|
|
94
|
+
|
|
95
|
+
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.
|
|
96
|
+
|
|
97
|
+
#### Cross-Reference With Code
|
|
98
|
+
|
|
99
|
+
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it:
|
|
100
|
+
|
|
101
|
+
> "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"
|
|
102
|
+
|
|
103
|
+
#### Update CONTEXT.md Inline
|
|
104
|
+
|
|
105
|
+
When a term is resolved, update `CONTEXT.md` right there. Don't batch these up — capture them as they happen. Use the format in [references/CONTEXT-FORMAT.md](./references/CONTEXT-FORMAT.md).
|
|
106
|
+
|
|
107
|
+
`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.
|
|
108
|
+
|
|
109
|
+
#### Offer ADRs Sparingly
|
|
110
|
+
|
|
111
|
+
Only offer to create an ADR when all three are true:
|
|
112
|
+
|
|
113
|
+
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
114
|
+
2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
|
|
115
|
+
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
116
|
+
|
|
117
|
+
If any of the three is missing, skip the ADR. Use the format in [references/ADR-FORMAT.md](./references/ADR-FORMAT.md).
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Usage Examples
|
|
122
|
+
|
|
123
|
+
### Stress-Test a New Feature
|
|
124
|
+
```
|
|
125
|
+
/grillme "I want to add a refund flow to the Order service"
|
|
126
|
+
```
|
|
127
|
+
> "Before we go further — your glossary defines 'Order' as a completed purchase. A refund implies the Order is no longer complete. Is 'refund' a state on Order, or a new concept entirely?"
|
|
128
|
+
|
|
129
|
+
### Clarify Ambiguous Terms
|
|
130
|
+
```
|
|
131
|
+
/grillme "We need to handle 'account' deletions"
|
|
132
|
+
```
|
|
133
|
+
> "You said 'account' — your CONTEXT.md has both Customer and User. Which one are we deleting, and what happens to their Orders?"
|
|
134
|
+
|
|
135
|
+
### Validate Against Existing Decisions
|
|
136
|
+
```
|
|
137
|
+
/grillme "I'm switching the write model from Postgres to DynamoDB"
|
|
138
|
+
```
|
|
139
|
+
> "ADR-0002 says we chose Postgres for the write model because of ACID requirements. Have those requirements changed, or is this a new trade-off?"
|
|
140
|
+
|
|
141
|
+
### Onboard to a Domain
|
|
142
|
+
```
|
|
143
|
+
/grillme "Explain how Billing relates to Ordering"
|
|
144
|
+
```
|
|
145
|
+
> "Ordering emits OrderPlaced events. Billing consumes them to create Invoices. But your CONTEXT.md says Invoice is a request for payment — who decides when payment is actually processed?"
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Relationship to Other Skills
|
|
150
|
+
|
|
151
|
+
| Skill | Use When |
|
|
152
|
+
|-------|----------|
|
|
153
|
+
| **oracle-grillme** | Questioning domain assumptions, sharpening terminology, updating docs inline |
|
|
154
|
+
| **oracle-challenge** | Critically evaluating a technical approach or decision |
|
|
155
|
+
| **oracle-architect** | Designing components, data models, API contracts during spec-research |
|
|
156
|
+
| **spec-research** | Structured discovery + architecture → spec.md (use grillme before this to solidify language) |
|
|
157
|
+
|
|
158
|
+
**Key distinction:**
|
|
159
|
+
- `oracle-challenge` = "Is this approach valid?" (critical evaluation)
|
|
160
|
+
- `oracle-grillme` = "What do we mean by these words?" (domain interrogation)
|
|
@@ -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,63 @@
|
|
|
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 as aliases to avoid.
|
|
28
|
+
- **Flag conflicts explicitly.** If a term is used ambiguously, call it out in "Flagged ambiguities" with a clear resolution.
|
|
29
|
+
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
|
|
30
|
+
- **Show relationships.** Use bold term names and express cardinality where obvious.
|
|
31
|
+
- **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.
|
|
32
|
+
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
33
|
+
- **Write an example dialogue.** A conversation between a dev and a domain expert that demonstrates how the terms interact naturally and clarifies boundaries between related concepts.
|
|
34
|
+
|
|
35
|
+
## Single vs Multi-Context Repos
|
|
36
|
+
|
|
37
|
+
**Single context (most repos):** One `CONTEXT.md` at the repo root.
|
|
38
|
+
|
|
39
|
+
**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
40
|
+
|
|
41
|
+
```md
|
|
42
|
+
# Context Map
|
|
43
|
+
|
|
44
|
+
## Contexts
|
|
45
|
+
|
|
46
|
+
- [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
|
|
47
|
+
- [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
|
|
48
|
+
- [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping
|
|
49
|
+
|
|
50
|
+
## Relationships
|
|
51
|
+
|
|
52
|
+
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
53
|
+
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
54
|
+
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The skill infers which structure applies:
|
|
58
|
+
|
|
59
|
+
- If `CONTEXT-MAP.md` exists, read it to find contexts
|
|
60
|
+
- If only a root `CONTEXT.md` exists, single context
|
|
61
|
+
- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
|
|
62
|
+
|
|
63
|
+
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|