@martinffx/atelier 1.2.1 → 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.
Files changed (57) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +22 -24
  3. package/agents/architect.md +1 -1
  4. package/agents/oracle.md +1 -1
  5. package/dist/atelier.js +12 -14
  6. package/package.json +1 -1
  7. package/skills/code-commit/SKILL.md +5 -13
  8. package/skills/code-pull-request/SKILL.md +36 -0
  9. package/skills/code-pull-request/references/common.md +76 -0
  10. package/skills/code-pull-request/references/create-pr.md +122 -0
  11. package/skills/code-pull-request/references/default-template.md +25 -0
  12. package/skills/code-pull-request/references/leave-comment.md +53 -0
  13. package/skills/code-pull-request/references/merge-pr.md +94 -0
  14. package/skills/code-pull-request/references/read-comments.md +61 -0
  15. package/skills/code-pull-request/references/respond-to-comment.md +66 -0
  16. package/skills/code-review/SKILL.md +21 -12
  17. package/skills/code-review/references/reviewers.md +142 -41
  18. package/skills/code-review/references/rq.md +48 -32
  19. package/skills/oracle-debug/SKILL.md +218 -0
  20. package/skills/{code-debug → oracle-debug}/references/bug-patterns.md +3 -3
  21. package/skills/oracle-domain-modelling/SKILL.md +84 -0
  22. package/skills/oracle-grill-me/SKILL.md +20 -0
  23. package/skills/spec-brainstorm/SKILL.md +91 -71
  24. package/skills/spec-finish/SKILL.md +20 -14
  25. package/skills/spec-implement/SKILL.md +3 -2
  26. package/skills/spec-orchestrator/SKILL.md +4 -15
  27. package/skills/spec-plan/SKILL.md +1 -1
  28. package/agents/scout.md +0 -40
  29. package/skills/code-commit/references/pr-workflow.md +0 -145
  30. package/skills/code-debug/SKILL.md +0 -199
  31. package/skills/code-docs/SKILL.md +0 -171
  32. package/skills/code-docs/references/api-docs.md +0 -116
  33. package/skills/code-docs/references/changelog.md +0 -64
  34. package/skills/code-docs/references/readme-structure.md +0 -94
  35. package/skills/oracle-architect/SKILL.md +0 -327
  36. package/skills/oracle-architect/references/api-design.md +0 -345
  37. package/skills/oracle-architect/references/data-modeling.md +0 -318
  38. package/skills/oracle-architect/references/ddd-patterns.md +0 -348
  39. package/skills/oracle-architect/references/interface-design.md +0 -203
  40. package/skills/oracle-challenge/SKILL.md +0 -126
  41. package/skills/oracle-doubt/SKILL.md +0 -252
  42. package/skills/oracle-doubt/references/adversarial-prompt.md +0 -47
  43. package/skills/oracle-grillme/SKILL.md +0 -160
  44. package/skills/oracle-security/SKILL.md +0 -225
  45. package/skills/oracle-security/references/security-patterns.md +0 -236
  46. package/skills/oracle-security/references/threat-modeling-guide.md +0 -137
  47. package/skills/oracle-testing/SKILL.md +0 -237
  48. package/skills/oracle-testing/references/anti-patterns.md +0 -618
  49. package/skills/oracle-testing/references/boundaries.md +0 -579
  50. package/skills/oracle-testing/references/core-testing.md +0 -691
  51. package/skills/oracle-testing/references/edge-testing.md +0 -794
  52. package/skills/oracle-testing/references/stub-driven-tdd.md +0 -322
  53. package/skills/oracle-thinkdeep/SKILL.md +0 -164
  54. /package/skills/{code-debug → oracle-debug}/references/language-tools.md +0 -0
  55. /package/skills/{code-debug → oracle-debug}/references/techniques.md +0 -0
  56. /package/skills/{oracle-grillme → oracle-domain-modelling}/references/ADR-FORMAT.md +0 -0
  57. /package/skills/{oracle-grillme → oracle-domain-modelling}/references/CONTEXT-FORMAT.md +0 -0
@@ -4,7 +4,7 @@
4
4
 
5
5
  This workflow:
6
6
  1. Gets diff (git diff against target branch)
7
- 2. Triage Subagent - Analyzes diff, selects reviewers, identifies skills to load
7
+ 2. Triage Subagent - Analyzes diff, selects reviewers, identifies relevant skills to look for
8
8
  3. Reviewer Subagents (parallel) - Each selected reviewer analyzes code
9
9
  4. Synthesis Subagent - Deduplicates findings
10
10
  5. Architect Subagent - Architecture review
@@ -32,14 +32,14 @@ Capture the list of changed files and the full diff.
32
32
 
33
33
  ## Step 2: Triage Subagent
34
34
 
35
- **Purpose:** Analyze diff to determine context, select reviewers, identify skills to load.
35
+ **Purpose:** Analyze diff to determine context, select reviewers, identify relevant skills to look for.
36
36
 
37
- **Uses:** `scout` agent - See [agents/scout.md](../../agents/scout.md)
37
+ **Uses:** `recon` agent.
38
38
 
39
39
  ### Subagent Invocation
40
40
 
41
41
  ```yaml
42
- subagent_type: scout
42
+ subagent_type: recon
43
43
  description: "Triage diff for code review"
44
44
  prompt: |
45
45
  Analyze this code diff to determine review needs.
@@ -56,12 +56,21 @@ prompt: |
56
56
  - Correctness (logic, types, error handling)
57
57
  - Maintainability (naming, complexity, tests)
58
58
  - Architecture (boundaries, layers, SOLID)
59
+ - PythonLanguage (Python language, runtime, typing, packaging, tests)
60
+ - RustLanguage (Rust ownership, lifetimes, errors, async, API design)
61
+ - GoLanguage (Go errors, contexts, concurrency, interfaces, package layout)
59
62
  - SecuritySkeptic (security + failure scenarios)
60
63
  - PerformanceOperator (performance at scale)
61
64
  - MaintainabilityPedant (quality + precision)
62
- 4. **Identify skills to load** based on detected language/framework:
65
+ 4. **Identify relevant skills to look for** based on detected language/framework:
66
+ - Reviewers must look for relevant language, framework, testing, architecture, security, or tooling skills before reviewing.
67
+ - Reviewers should load relevant skills that are available.
68
+ - If no relevant skill is available, reviewers continue with their reviewer prompt.
69
+ - Failure to find or load a skill is not a review failure.
63
70
  - TypeScript → typescript-testing, typescript-fastify (if fastify framework)
64
- - Python → python-testing, python-fastapi (if fastapi framework)
71
+ - Python → python-modern-python, python-testing, python-fastapi (if fastapi framework)
72
+ - Rust → rust-specific skills if available
73
+ - Go → go-specific skills if available
65
74
 
66
75
 
67
76
  Return ONLY valid JSON (no markdown, no code blocks):
@@ -76,6 +85,8 @@ prompt: |
76
85
  }
77
86
  ```
78
87
 
88
+ `skills_to_load` lists best-effort skill candidates for reviewers to look for and load if available. It does not make any skill mandatory.
89
+
79
90
  ### Expected Output
80
91
 
81
92
  ```json
@@ -92,23 +103,27 @@ prompt: |
92
103
 
93
104
  **Purpose:** Each selected reviewer analyzes the code from their specialty perspective.
94
105
 
95
- **Uses:** `general` subagent - One per reviewer, dispatched concurrently
106
+ **Uses:** `oracle` agent - One per reviewer, dispatched concurrently.
107
+
108
+ Reviewer names are prompt personas, not subagent types. Do not use `general`, `Security`, `Correctness`, `PerformanceOperator`, or any other reviewer name as `subagent_type`.
96
109
 
97
110
  **Pattern:** Spawn one subagent per reviewer **concurrently** (parallel execution).
98
111
 
99
- ### Skill Loading Pre-Step
112
+ ### Relevant Skill Search Pre-Step
100
113
 
101
- Before dispatching reviewers, the detected skills are passed to each reviewer:
114
+ Before dispatching reviewers, the detected relevant skills are passed to each reviewer as best-effort guidance:
102
115
  ```json
103
116
  {
104
117
  "skills_to_load": ["typescript-testing"]
105
118
  }
106
119
  ```
107
120
 
121
+ The `skills_to_load` field name is retained for compatibility. Treat it as optional guidance: reviewers must look for relevant skills, load the available ones, and continue if none are available.
122
+
108
123
  ### Subagent Invocation (One per Reviewer)
109
124
 
110
125
  ```yaml
111
- subagent_type: general
126
+ subagent_type: oracle
112
127
  description: "Security review of code diff"
113
128
  prompt: |
114
129
  You are a Security Reviewer analyzing code for security vulnerabilities.
@@ -118,11 +133,13 @@ prompt: |
118
133
  - Framework: {framework}
119
134
  - Files: {files}
120
135
 
121
- **PRE-STEP: Load Relevant Skills**
122
- Before reviewing, load these skills:
136
+ **PRE-STEP: Look for Relevant Skills**
137
+ Before reviewing, look for relevant language, framework, testing, architecture, security, or tooling skills.
138
+ Load any relevant skills that are available:
123
139
  {skills_to_load}
124
140
 
125
- Use the `skill` tool to load each skill.
141
+ If no relevant skill is available or a skill cannot be loaded, continue with this reviewer prompt.
142
+ Failure to find or load a skill is not a review failure.
126
143
 
127
144
  DIFF:
128
145
  {git_diff}
@@ -184,18 +201,13 @@ for reviewer in reviewers:
184
201
 
185
202
  ---
186
203
 
187
- ## Step 4: Synthesis Subagent (First Pass)
204
+ ## Step 4: Synthesis First Pass
188
205
 
189
206
  **Purpose:** Group, deduplicate, and assign initial severity.
190
207
 
191
- **Uses:** `general` subagent
208
+ **Uses:** Inline synthesis by the main agent.
192
209
 
193
- ### Subagent Invocation
194
-
195
- ```yaml
196
- subagent_type: general
197
- description: "Synthesize code review findings"
198
- prompt: |
210
+ ```markdown
199
211
  Synthesize these code review findings from multiple reviewers.
200
212
 
201
213
  RAW FINDINGS:
@@ -231,7 +243,7 @@ prompt: |
231
243
 
232
244
  **Purpose:** Review architecture-specific concerns.
233
245
 
234
- **Uses:** `architect` agent - See [agents/architect.md](../../agents/architect.md)
246
+ **Uses:** `architect` agent.
235
247
 
236
248
  ### Subagent Invocation
237
249
 
@@ -249,9 +261,11 @@ prompt: |
249
261
  SYNTHESIZED FINDINGS:
250
262
  {synthesized_findings_json}
251
263
 
252
- **PRE-STEP: Load Relevant Skills**
253
- Before reviewing, load:
254
- - Use `skill` tool to load: oracle-architect
264
+ **PRE-STEP: Look for Relevant Skills**
265
+ Before reviewing, look for relevant architecture and language architecture skills.
266
+ Load relevant skills if available, such as `typescript-api-design` or the language skill for this codebase.
267
+ If no relevant skill is available or a skill cannot be loaded, continue with this architect prompt.
268
+ Failure to find or load a skill is not a review failure.
255
269
 
256
270
  Focus areas:
257
271
  - Boundary violations
@@ -284,7 +298,7 @@ prompt: |
284
298
 
285
299
  **Purpose:** Validate findings by challenging assumptions.
286
300
 
287
- **Uses:** `oracle` agent - See [agents/oracle.md](../../agents/oracle.md)
301
+ **Uses:** `oracle` agent.
288
302
 
289
303
  ### Subagent Invocation
290
304
 
@@ -297,9 +311,11 @@ prompt: |
297
311
  ALL FINDINGS (includes synthesized + architecture):
298
312
  {all_findings_json}
299
313
 
300
- **PRE-STEP: Load Relevant Skills**
301
- Before challenging, load:
302
- - Use `skill` tool to load: oracle-challenge
314
+ **PRE-STEP: Look for Relevant Skills**
315
+ Before challenging, look for relevant language, framework, or debugging skills.
316
+ Load relevant skills if available, such as a language-specific testing skill.
317
+ If no relevant skill is available or a skill cannot be loaded, continue with this challenge prompt.
318
+ Failure to find or load a skill is not a review failure.
303
319
 
304
320
  For each flagged finding, use `mcp__sequential-thinking__sequentialthinking` to analyze:
305
321
  1. Is this handled elsewhere in the codebase?
@@ -348,9 +364,9 @@ Display findings in terminal per [output.md](./output.md).
348
364
  | Step | Subagent | Uses | Parallel? | Purpose |
349
365
  |------|----------|------|----------|---------|
350
366
  | 1 | Get Diff | inline | — | `git diff <branch>` |
351
- | 2 | Triage | `scout` agent | No | Detect context, select reviewers, identify skills |
352
- | 3 | Reviewers | `general` subagent | Yes (per reviewer) | Specialty analysis |
353
- | 4 | Synthesis | `general` subagent | No | Deduplicate and group |
367
+ | 2 | Triage | `recon` agent | No | Detect context, select reviewers, identify relevant skills to look for |
368
+ | 3 | Reviewers | `oracle` agent | Yes (per reviewer) | Specialty analysis |
369
+ | 4 | Synthesis | inline | No | Deduplicate and group |
354
370
  | 5 | Architect | `architect` agent | No | Architecture review |
355
371
  | 6 | Challenge | `oracle` agent | No | Validate findings |
356
372
  | 7 | Output | inline | — | Format and display findings |
@@ -0,0 +1,218 @@
1
+ ---
2
+ name: oracle-debug
3
+ description: >
4
+ Disciplined debugging methodology. Triggers on bug reports, test failures, "debug this",
5
+ "diagnose this", unexpected behavior, build failures, integration issues, or performance
6
+ regressions. Always find root cause before attempting any fix.
7
+ user-invocable: true
8
+ ---
9
+
10
+ # Oracle Debug
11
+
12
+ Random fixes waste time and create new bugs. Quick patches mask underlying issues.
13
+
14
+ **Core principle:** find root cause before attempting any fix. Symptom fixes are failure.
15
+
16
+ **Violating the letter of this process is violating the spirit of debugging.**
17
+
18
+ ## The Iron Law
19
+
20
+ ```
21
+ NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
22
+ ```
23
+
24
+ If you haven't completed Phase 1, you cannot propose fixes.
25
+
26
+ ## When to Use
27
+
28
+ Use for any technical issue:
29
+
30
+ - Test failures
31
+ - Bugs in production
32
+ - Unexpected behavior
33
+ - Performance regressions
34
+ - Build or integration failures
35
+ - Intermittent failures
36
+
37
+ **Use this especially when:**
38
+
39
+ - Under time pressure
40
+ - "Just one quick fix" seems obvious
41
+ - You've already tried multiple fixes
42
+ - The previous fix didn't work
43
+ - You don't fully understand the issue
44
+
45
+ ## The Four Phases
46
+
47
+ You must complete each phase before proceeding to the next.
48
+
49
+ ---
50
+
51
+ ## Phase 1 — Root Cause Investigation
52
+
53
+ **Before attempting any fix:**
54
+
55
+ Use the project's domain glossary and ADRs to build a clear mental model of the
56
+ relevant modules before tracing.
57
+
58
+ 1. **Read error messages carefully.** Read the full stack trace, line numbers, file paths, and error codes. Don't skip warnings.
59
+ 2. **Build a fast feedback loop.** If you don't have a fast, deterministic, pass/fail signal for the bug, no amount of code-reading will save you. Spend disproportionate effort here.
60
+
61
+ Try these in order:
62
+ - Failing test at the seam that reaches the bug
63
+ - Curl / HTTP script against a running dev server
64
+ - CLI invocation with fixture input
65
+ - Headless browser script (Playwright/Puppeteer)
66
+ - Replay a captured trace (network payload, event log)
67
+ - Throwaway harness (minimal subset of the system)
68
+ - Property/fuzz loop for "sometimes wrong" bugs
69
+ - Bisection harness (e.g., `git bisect run`)
70
+ - Differential loop (old vs new version)
71
+ - HITL bash script (last resort — structure the human clicks)
72
+
73
+ Iterate on the loop: make it faster, sharper, and more deterministic. A 30-second flaky loop is barely better than no loop.
74
+
75
+ 3. **Reproduce the bug.** Run the loop. Confirm the failure matches what the user described, is reproducible across runs, and the exact symptom is captured.
76
+ 4. **Check recent changes.** `git diff`, recent commits, new dependencies, config changes, environment differences.
77
+ 5. **Trace data flow.** In multi-component systems, add diagnostic instrumentation at each boundary:
78
+ - Log what data enters each component
79
+ - Log what data exits each component
80
+ - Verify environment/config propagation
81
+ - Check state at each layer
82
+
83
+ Run once to gather evidence, then narrow to the failing component.
84
+ 6. **Trace backward through the call stack.** Where does the bad value originate? What called this with the bad value? Trace up until you find the source. Fix at the source, not at the symptom.
85
+
86
+ ### Non-deterministic bugs
87
+
88
+ The goal is not a clean repro but a **higher reproduction rate**. Loop the trigger 100×, parallelize, add stress, narrow timing windows, inject sleeps. A 50% flake is debuggable; 1% is not — keep raising the rate until it is.
89
+
90
+ ### When you genuinely cannot build a loop
91
+
92
+ Stop and say so explicitly. Ask the user for:
93
+
94
+ - Access to the environment that reproduces it
95
+ - A captured artifact (HAR, log dump, core dump, screen recording)
96
+ - Permission to add temporary production instrumentation
97
+
98
+ **Do not proceed to Phase 2 without a loop you believe in.**
99
+
100
+ ---
101
+
102
+ ## Phase 2 — Pattern Analysis
103
+
104
+ Find the pattern before fixing.
105
+
106
+ 1. **Find working examples.** Locate similar working code in the same codebase.
107
+ 2. **Compare against references.** If implementing a known pattern, read the reference implementation completely.
108
+ 3. **Identify differences.** List every difference between working and broken, however small.
109
+ 4. **Understand dependencies.** What components, config, settings, and assumptions does this code rely on?
110
+
111
+ ---
112
+
113
+ ## Phase 3 — Hypothesis and Testing
114
+
115
+ Use the scientific method.
116
+
117
+ 1. **Generate 3–5 ranked hypotheses.** Single-hypothesis generation anchors on the first plausible idea. Each hypothesis must be falsifiable: state the prediction it makes. **Show the ranked list to the user before testing** — they often have domain knowledge that re-ranks instantly.
118
+
119
+ > Format: "If `<X>` is the cause, then `<changing Y>` will make the bug disappear / `<changing Z>` will make it worse."
120
+
121
+ 2. **Test one variable at a time.** Make the smallest possible change to test the hypothesis.
122
+ 3. **Instrument mapped to predictions.** Each probe must map to a specific prediction. Prefer a debugger/REPL over logs; prefer targeted logs at boundaries over "log everything and grep".
123
+
124
+ **Tag every debug log** with a unique prefix, e.g. `[DEBUG-a4f2]`. Cleanup becomes a single grep.
125
+
126
+ 4. **Performance regressions.** Logs are usually wrong. Establish a baseline measurement (timing harness, profiler, query plan), then bisect. Measure first, fix second.
127
+
128
+ 5. **When you don't know, say so.** Don't pretend. Ask for help or research more.
129
+
130
+ ---
131
+
132
+ ## Phase 4 — Implementation
133
+
134
+ Fix the root cause, not the symptom.
135
+
136
+ 1. **Create a failing test case.** The simplest possible reproduction. MUST exist before the fix.
137
+
138
+ 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, note that the codebase architecture is preventing the bug from being locked down.
139
+
140
+ 2. **Implement a single fix.** Address the root cause. One change at a time. No "while I'm here" improvements. No bundled refactoring.
141
+ 3. **Verify the fix.** Does the test pass? Do other tests still pass? Does the original repro no longer reproduce?
142
+ 4. **If the fix doesn't work:**
143
+ - STOP
144
+ - Count the failed fix attempts
145
+ - If < 3: return to Phase 1 with the new information
146
+ - If ≥ 3: **question the architecture**. Pattern problems, hidden coupling, and shared state that each fix reveals are signs of a wrong pattern. Discuss with the user before attempting Fix #4.
147
+
148
+ ### Cleanup + post-mortem
149
+
150
+ Before declaring done:
151
+
152
+ - [ ] Original repro no longer reproduces (re-run Phase 1 loop)
153
+ - [ ] Regression test passes (or absence of seam is documented)
154
+ - [ ] All `[DEBUG-...]` instrumentation removed
155
+ - [ ] Throwaway prototypes deleted or moved to a clearly-marked debug location
156
+ - [ ] The correct hypothesis is stated in the commit / PR message
157
+ - [ ] You asked: "What would have prevented this bug?"
158
+
159
+ ---
160
+
161
+ ## Red Flags — Stop and Return to Phase 1
162
+
163
+ If you catch yourself thinking:
164
+
165
+ - "Quick fix for now, investigate later"
166
+ - "Just try changing X and see if it works"
167
+ - "Add multiple changes, run tests"
168
+ - "Skip the test, I'll manually verify"
169
+ - "It's probably X, let me fix that"
170
+ - "I don't fully understand but this might work"
171
+ - "Pattern says X but I'll adapt it differently"
172
+ - "One more fix attempt" (after 2+ failures)
173
+ - Each fix reveals a new problem in a different place
174
+
175
+ All of these mean: stop. Return to Phase 1.
176
+
177
+ ## Common Rationalizations
178
+
179
+ | Excuse | Reality |
180
+ |---|---|
181
+ | "Issue is simple, don't need process" | Simple issues have root causes too. |
182
+ | "Emergency, no time for process" | Systematic debugging is faster than thrashing. |
183
+ | "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
184
+ | "I'll write the test after confirming the fix" | Untested fixes don't stick. Test first proves the bug. |
185
+ | "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
186
+ | "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. |
187
+ | "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
188
+
189
+ ## Quick Reference
190
+
191
+ | Phase | Key Activities | Success Criteria |
192
+ |---|---|---|
193
+ | 1. Root cause | Read errors, build loop, reproduce, trace data flow | Understand what and why |
194
+ | 2. Pattern analysis | Find working examples, compare | Identify differences |
195
+ | 3. Hypothesis | Form theory, test minimally | Confirmed or new hypothesis |
196
+ | 4. Implementation | Failing test, single fix, verify | Bug resolved, tests pass |
197
+
198
+ ## Debug Summary
199
+
200
+ After each session, summarize:
201
+
202
+ ```
203
+ ## Debug Summary
204
+
205
+ **Problem:** [One sentence]
206
+ **Root Cause:** [What actually was wrong]
207
+ **Fix:** [How you fixed it]
208
+ **Verification:** [Test results]
209
+ **Prevention:** [Regression test added? Architectural finding?]
210
+ ```
211
+
212
+ ## References
213
+
214
+ - **Language-specific tools** → `references/language-tools.md`
215
+ - **Common bug patterns** → `references/bug-patterns.md`
216
+ - **Logging & techniques** → `references/techniques.md`
217
+
218
+ Structure inspired by [obra/superpowers systematic-debugging](https://github.com/obra/superpowers).
@@ -1,6 +1,6 @@
1
1
  # Common Bug Patterns
2
2
 
3
- Quick reference for recognising and fixing recurring bug categories.
3
+ Quick reference for recognizing and fixing recurring bug categories.
4
4
 
5
5
  ---
6
6
 
@@ -45,7 +45,7 @@ const name = user.profile.name;
45
45
 
46
46
  ## Logic Errors
47
47
 
48
- **Symptoms:** Wrong output, wrong behaviour
48
+ **Symptoms:** Wrong output, wrong behavior
49
49
 
50
50
  **Debug approach:**
51
51
  1. Trace through the logic manually
@@ -68,4 +68,4 @@ const name = user.profile.name;
68
68
  2. Identify hot paths
69
69
  3. Optimize the bottleneck
70
70
 
71
- **See also:** Phase 4 "Perf branch" in SKILL.md for the disciplined approach.
71
+ **See also:** Phase 3 "Performance regressions" in SKILL.md for the disciplined approach.
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: oracle-domain-modelling
3
+ description: >
4
+ Build and sharpen a project's domain model. Use when the user wants to pin down
5
+ domain terminology or a ubiquitous language, record an architectural decision,
6
+ or when another skill needs to maintain the domain model.
7
+ user-invocable: false
8
+ ---
9
+
10
+ # Domain Modelling
11
+
12
+ 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.)
13
+
14
+ ## File structure
15
+
16
+ Most repos have a single context:
17
+
18
+ ```
19
+ /
20
+ ├── CONTEXT.md
21
+ ├── docs/
22
+ │ └── adr/
23
+ │ ├── 0001-event-sourced-orders.md
24
+ │ └── 0002-postgres-for-write-model.md
25
+ └── src/
26
+ ```
27
+
28
+ If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
29
+
30
+ ```
31
+ /
32
+ ├── CONTEXT-MAP.md
33
+ ├── docs/
34
+ │ └── adr/ ← system-wide decisions
35
+ ├── src/
36
+ │ ├── ordering/
37
+ │ │ ├── CONTEXT.md
38
+ │ │ └── docs/adr/ ← context-specific decisions
39
+ │ └── billing/
40
+ │ ├── CONTEXT.md
41
+ │ └── docs/adr/
42
+ ```
43
+
44
+ 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.
45
+
46
+ ## During the session
47
+
48
+ ### Challenge against the glossary
49
+
50
+ When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately:
51
+
52
+ > "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"
53
+
54
+ ### Sharpen fuzzy language
55
+
56
+ When the user uses vague or overloaded terms, propose a precise canonical term:
57
+
58
+ > "You're saying 'account' — do you mean the Customer or the User? Those are different things."
59
+
60
+ ### Discuss concrete scenarios
61
+
62
+ 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.
63
+
64
+ ### Cross-reference with code
65
+
66
+ When the user states how something works, check whether the code agrees. If you find a contradiction, surface it:
67
+
68
+ > "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"
69
+
70
+ ### Update CONTEXT.md inline
71
+
72
+ 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).
73
+
74
+ `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.
75
+
76
+ ### Offer ADRs sparingly
77
+
78
+ Only offer to create an ADR when all three are true:
79
+
80
+ 1. **Hard to reverse** — the cost of changing your mind later is meaningful
81
+ 2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
82
+ 3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
83
+
84
+ If any of the three is missing, skip the ADR. Use the format in [references/ADR-FORMAT.md](./references/ADR-FORMAT.md).
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: oracle-grill-me
3
+ description: >
4
+ Grill the user relentlessly about a plan, decision, or idea, maintaining the project's
5
+ domain model (CONTEXT.md, ADRs) as decisions crystallise. Use when the user wants to
6
+ stress-test their thinking, or uses any 'grill' trigger phrases.
7
+ user-invocable: true
8
+ ---
9
+
10
+ # Grill Me
11
+
12
+ Interview me relentlessly about every aspect of this until we reach a shared understanding. Walk down each branch of the decision tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
13
+
14
+ Ask the questions one at a time, waiting for feedback on each question before continuing. Asking multiple questions at once is bewildering.
15
+
16
+ If a *fact* can be found by exploring the environment (filesystem, tools, etc.), look it up rather than asking me. The *decisions*, though, are mine — put each one to me and wait for my answer.
17
+
18
+ Do not act on it until I confirm we have reached a shared understanding.
19
+
20
+ Run this session using the `oracle-domain-modelling` skill.