@b0tts/template-dev-installer 1.0.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 (34) hide show
  1. package/cli.mjs +129 -0
  2. package/files/.agents/skills/_explain-it-v1-disabled/SKILL.md +86 -0
  3. package/files/.agents/skills/close/SKILL.md +112 -0
  4. package/files/.agents/skills/closev2/REFERENCE.md +194 -0
  5. package/files/.agents/skills/closev2/SKILL.md +84 -0
  6. package/files/.agents/skills/create-nav-guide/SKILL.md +39 -0
  7. package/files/.agents/skills/docs-mcp/SKILL.md +91 -0
  8. package/files/.agents/skills/explain-it-v2/REFERENCE.md +213 -0
  9. package/files/.agents/skills/explain-it-v2/SKILL.md +133 -0
  10. package/files/.agents/skills/grill-me/SKILL.md +10 -0
  11. package/files/.agents/skills/grill-with-docs/ADR-FORMAT.md +47 -0
  12. package/files/.agents/skills/grill-with-docs/CONTEXT-FORMAT.md +63 -0
  13. package/files/.agents/skills/grill-with-docs/SKILL.md +88 -0
  14. package/files/.agents/skills/handoff/SKILL.md +34 -0
  15. package/files/.agents/skills/improve-codebase-architecture/DEEPENING.md +37 -0
  16. package/files/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  17. package/files/.agents/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -0
  18. package/files/.agents/skills/improve-codebase-architecture/LANGUAGE.md +53 -0
  19. package/files/.agents/skills/improve-codebase-architecture/SKILL.md +81 -0
  20. package/files/.agents/skills/karpathy-guidelines/SKILL.md +0 -0
  21. package/files/.agents/skills/regenerate-minecraft-world/SKILL.md +46 -0
  22. package/files/.agents/skills/to-prd/SKILL.md +76 -0
  23. package/files/.agents/skills/tutorial/SKILL.md +43 -0
  24. package/files/.agents/skills/write-a-skill/SKILL.md +117 -0
  25. package/files/.agents/skills/zoom-out/SKILL.md +7 -0
  26. package/files/AGENTS.md +40 -0
  27. package/files/README.md +245 -0
  28. package/files/opencode/opencode.json +178 -0
  29. package/files/opencode/plugins/Notifications.js +66 -0
  30. package/files/opencode/settings.json +1 -0
  31. package/files/pi/extensions/context-tiers.ts +250 -0
  32. package/files/pi/mcp.json +12 -0
  33. package/files/pi/settings.json +13 -0
  34. package/package.json +23 -0
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: docs-mcp
3
+ description: Search and index up-to-date library documentation via Docs MCP (self-hosted Context7 alternative). Use when user asks a library-specific question, needs API reference with exact signatures, wants version-pinned docs, or says "check the docs", "look up the API", "what's the latest on X", "how do I use Y". Prefer over web_search when the library is (or can be) indexed — this gives structured, version-aware results without ads or SEO spam. Also use when the model suspects its training data may be stale.
4
+ ---
5
+
6
+ # Docs MCP — Versioned Documentation Search
7
+
8
+ ## Tool Inventory
9
+
10
+ | Tool | Purpose | Destructive |
11
+ |------|---------|-------------|
12
+ | `mcp_docs_list_libraries` | See all indexed libraries + versions | No |
13
+ | `mcp_docs_find_version` | Resolve best matching version | No |
14
+ | `mcp_docs_search_docs` | Semantic search within indexed docs | No |
15
+ | `mcp_docs_fetch_url` | Fetch single page as Markdown (no indexing) | No |
16
+ | `mcp_docs_scrape_docs` | Index a new library/version from URL | Yes (writes) |
17
+ | `mcp_docs_refresh_version` | Re-scrape, updating only changed pages | Yes |
18
+ | `mcp_docs_remove_docs` | Delete a library/version from index | Yes |
19
+ | `mcp_docs_list_jobs` | List scraping jobs (filter by status) | No |
20
+ | `mcp_docs_get_job_info` | Get job progress/detail | No |
21
+ | `mcp_docs_cancel_job` | Cancel a running/queued job | Yes |
22
+
23
+ ## Core Workflow
24
+
25
+ ### 1. Check what's indexed
26
+
27
+ Always start with `mcp_docs_list_libraries`. Currently only `prettier` is indexed — most queries will require scraping first.
28
+
29
+ ### 2. Find the right version
30
+
31
+ Use `mcp_docs_find_version` to discover available versions. Supports X-Range patterns:
32
+ - `"18.x"` → highest 18.x.x
33
+ - `"18.2.x"` → highest 18.2.x
34
+ - `"18.2.0"` → exact match
35
+ - omit → latest available
36
+
37
+ ### 3. Search or scrape
38
+
39
+ **If the library IS indexed**: use `mcp_docs_search_docs` with a specific query. Good queries name concrete APIs or concepts: `"hooks lifecycle"`, `"ReturnType example"`, `"form validation"`. Avoid broad queries like `"react"`.
40
+
41
+ **If the library is NOT indexed**: ask the user if they want to scrape it, then use `mcp_docs_scrape_docs`:
42
+ ```
43
+ library: "react"
44
+ version: "18.2.0" // or "18.x" for latest 18.x
45
+ url: "https://react.dev/reference/react"
46
+ maxPages: 500
47
+ maxDepth: 3
48
+ scope: "subpages" // or "hostname" for whole site
49
+ ```
50
+
51
+ Scraping is async — returns a `jobId`. Use `mcp_docs_get_job_info` to monitor progress. Once COMPLETED, search results are available.
52
+
53
+ ### 4. Fetch single pages (no indexing)
54
+
55
+ Use `mcp_docs_fetch_url` for one-off lookups — converts any URL to Markdown without storing it. Good for: testing URLs before scraping, reading private docs (with `headers`), converting local files (`file://`).
56
+
57
+ ## Version Targeting Strategy
58
+
59
+ | User says | Use version |
60
+ |-----------|-------------|
61
+ | "how do I use React hooks" | omit (latest) |
62
+ | "React 18 hooks" | `"18.x"` |
63
+ | "React 18.2 hooks" | `"18.2.x"` |
64
+ | "useState in React 18.2.0" | `"18.2.0"` |
65
+
66
+ ## When NOT to use Docs MCP
67
+
68
+ - **General web research** → use `web_search`
69
+ - **Code examples / Stack Overflow** → use `code_search`
70
+ - **Library is obscure / no docs site** → `web_search` or `code_search`
71
+ - **Conceptual questions** ("what is a monad") → `web_search`
72
+ - **Comparing libraries** → `web_search` (multiple angles via `queries`)
73
+
74
+ ## Anti-Patterns
75
+
76
+ - Searching before checking if library is indexed
77
+ - Using version `"latest"` string — omit the version parameter instead
78
+ - Waiting synchronously for scraping — use `get_job_info` to poll
79
+ - Scraping huge sites at `maxDepth: 10` — start shallow, add depth if needed
80
+ - Using `search_docs` for queries better suited to `code_search` (how-to patterns with code snippets)
81
+
82
+ ## Job Management
83
+
84
+ Scraping jobs flow: `queued → running → completed` (or `failed`/`cancelled`).
85
+
86
+ After starting a scrape with `waitForCompletion: false` (default for MCP), check progress:
87
+ 1. `mcp_docs_list_jobs` (optionally filter `status: "running"`)
88
+ 2. `mcp_docs_get_job_info` with the `jobId`
89
+ 3. If stuck or too slow, `mcp_docs_cancel_job`
90
+
91
+ Failed jobs leave the version in `FAILED` state. Re-scrape by calling `scrape_docs` again with `clean: true`.
@@ -0,0 +1,213 @@
1
+ # Learning Science Reference
2
+
3
+ ## The Evidence Base
4
+
5
+ ### Retrieval Practice (Strongest Evidence)
6
+
7
+ **What:** Actively recalling information from memory rather than passively rereading.
8
+
9
+ **Evidence:** Systematic review of 50 classroom experiments found retrieval practice reliably benefits learning across materials, ages, abilities, and test types (Agarwal et al., Annual Reviews; Yang et al., Educational Psychology Review).
10
+
11
+ **Why it works:** Retrieval strengthens memory traces and slows forgetting. The act of trying to remember is itself a learning event.
12
+
13
+ **Application in this skill:**
14
+ - Ask "What do you think this does?" before explaining
15
+ - "Explain this back to me in your own words" after explaining
16
+ - "How would you modify this to do X?" (application-level retrieval)
17
+
18
+ ### Generation Effect (Strong Evidence)
19
+
20
+ **What:** Producing information (writing, typing, saying) leads to better retention than reading it.
21
+
22
+ **Evidence:** Meta-analysis found moderate benefit (Hedges' g = .41) for generating text over reading, not due to extra time spent (Springer Nature, 2023).
23
+
24
+ **Why it works:** Generation requires deeper processing and creates stronger memory traces.
25
+
26
+ **Application in this skill:**
27
+ - Always ask user to attempt an answer before showing the correct one
28
+ - Even wrong guesses improve retention of the correct answer
29
+ - "What would happen if we removed this line?" forces generation
30
+
31
+ ### Socratic Questioning (Good Evidence)
32
+
33
+ **What:** Asking questions that guide thinking rather than providing direct answers. Oxford tutorial system uses this extensively.
34
+
35
+ **Evidence:** Studies show Socratic-style AI questioning improves learning and engagement. One study reported 45% knowledge gain and 13% confidence boost in code comprehension (ACM, 2020).
36
+
37
+ **Why it works:** Forces active thinking, reveals misconceptions, builds intellectual curiosity.
38
+
39
+ **Application in this skill:**
40
+ - "What do you think [concept] means?" before explaining
41
+ - "Why do you think they chose to do it this way?"
42
+ - "What would be a different approach and what are the tradeoffs?"
43
+
44
+ ### Bloom's Taxonomy (Widely Used Framework)
45
+
46
+ **Levels (lowest to highest cognitive demand):**
47
+ 1. **Remember** — Recall facts ("What is a foreign key?")
48
+ 2. **Understand** — Explain ideas ("Why do we need foreign keys?")
49
+ 3. **Apply** — Use information in new situations ("Add a foreign key to this new table")
50
+ 4. **Analyze** — Draw connections ("How does this trigger relate to the scores table?")
51
+ 5. **Evaluate** — Justify decisions ("Is this schema design good? What would you change?")
52
+ 6. **Create** — Produce new work ("Design a schema for a similar system")
53
+
54
+ **Application in this skill:**
55
+ - Start with Remember/Understand for basic concepts
56
+ - Progress to Apply/Analyze for retrieval checks
57
+ - End with Evaluate/Create in application challenges
58
+
59
+ ### Desirable Difficulties (Bjork)
60
+
61
+ **What:** Conditions that make learning harder in specific ways improve long-term retention.
62
+
63
+ **Key strategies:**
64
+ - **Spacing** — Distribute practice over time
65
+ - **Interleaving** — Mix different topics within a session
66
+ - **Generation** — Produce answers rather than read them
67
+
68
+ **Why it works:** Difficulty during learning creates stronger memory traces. Easy learning = weak retention.
69
+
70
+ **Application in this skill:**
71
+ - Interleaving: Circle back to earlier concepts later (spaced retrieval)
72
+ - Generation: Always ask before telling
73
+ - Productive struggle: Let user think before giving answers
74
+
75
+ ### Productive Struggle
76
+
77
+ **What:** Engaging with challenging tasks promotes deeper learning, even if the user gets it wrong initially.
78
+
79
+ **Evidence:** "Productive Failure" research shows solving problems before receiving instruction prepares learners to notice and encode critical features (Review of Educational Research, 2021).
80
+
81
+ **Why it works:** Struggle activates relevant prior knowledge and creates "hooks" for new information.
82
+
83
+ **Application in this skill:**
84
+ - Present code before explaining it
85
+ - Ask "What do you think this does?" even if user might be wrong
86
+ - Celebrate attempts — wrong answers are valuable learning events
87
+
88
+ ### Feynman Technique
89
+
90
+ **What:** Explain a concept in simple language (like to a child), identify gaps, review and simplify.
91
+
92
+ **Evidence:** Effectiveness derives from combining self-explanation and retrieval practice (both have strong independent research support).
93
+
94
+ **Application in this skill:**
95
+ - "Explain this back to me in your own words" is a Feynman-style retrieval
96
+ - "How would you explain this to someone who's never seen SQL?"
97
+ - If user struggles, that reveals a gap to address
98
+
99
+ ### Metacognition and Calibration
100
+
101
+ **What:** "Thinking about thinking" — the ability to monitor and control your own learning. A key component is **metacognitive calibration**: how accurately you assess what you know.
102
+
103
+ **Challenge:** Students are often overconfident and overestimate their understanding.
104
+
105
+ **Application in this skill:**
106
+ - Calibration phase helps user (and agent) accurately assess current knowledge
107
+ - Retrieval checks reveal actual understanding vs perceived understanding
108
+ - "Explain this back to me" exposes gaps the user didn't know they had
109
+
110
+ ## When to Use Each Technique
111
+
112
+ ### Generation Effect (Ask Before Telling)
113
+ **Use when:** Introducing any new section or concept
114
+ **Don't use when:** User clearly knows it already (from calibration)
115
+
116
+ ### Retrieval Practice (Explain Back)
117
+ **Use when:** After explaining a concept, to solidify understanding
118
+ **Don't use when:** User is struggling and needs more support first
119
+
120
+ ### Socratic Questioning (Guiding Questions)
121
+ **Use when:** User gives a partial answer or you want to probe deeper
122
+ **Don't use when:** User is clearly confused and needs direct explanation
123
+
124
+ ### Interleaving (Mix Concepts)
125
+ **Use when:** Spaced retrieval phase, to strengthen connections
126
+ **Don't use when:** User needs to master one concept before moving on
127
+
128
+ ### Productive Struggle (Present Challenge First)
129
+ **Use when:** User has some baseline knowledge (from calibration)
130
+ **Don't use when:** User is a complete beginner on this topic (just explain)
131
+
132
+ ## Adapting to User Level
133
+
134
+ ### For ✅ "Knows It" Concepts
135
+ - Minimal generation prompts ("Quick sanity check — what does this do?")
136
+ - Jump to higher Bloom's levels (Analyze, Evaluate)
137
+ - Focus on project-specific usage, not general explanation
138
+ - Retrieval checks can be application-level ("How would you change this?")
139
+
140
+ ### For 🟡 "Sort of Knows It" Concepts
141
+ - Brief generation prompt ("What do you remember about this?")
142
+ - Quick refresher explanation
143
+ - Standard retrieval checks
144
+ - Connect to what they already know
145
+
146
+ ### For ❌ "No Idea" Concepts
147
+ - Skip generation prompt (would be frustrating, not productive)
148
+ - Go straight to explanation with analogies and tables
149
+ - Simple retrieval checks ("Explain this back in your own words")
150
+ - Celebrate any attempt, even partial
151
+
152
+ ## Example Dialogue Flow
153
+
154
+ ### User says: "Explain this SQL file"
155
+
156
+ **Agent (Phase 2: Calibrate):**
157
+ > "Before we dive in, quick calibration — have you worked with SQL before, or is this new?"
158
+
159
+ **User:** "I know the basics — SELECT, INSERT, that kind of thing."
160
+
161
+ **Agent:** "Got it. And what about triggers and materialized views — familiar, or new territory?"
162
+
163
+ **User:** "No idea what those are."
164
+
165
+ **Agent (Phase 3: Active Explanation):**
166
+
167
+ *Shows first section (table definitions)*
168
+
169
+ > "Alright, let's start here. You know SQL basics, so — what do you think these CREATE TABLE statements are setting up? What's the relationship between these tables?"
170
+
171
+ **User:** "Looks like clans, events, and scores. Events probably reference clans?"
172
+
173
+ **Agent (Socratic feedback):**
174
+ > "Spot on! Events do reference clans. Quick follow-up — what do you think happens to events if we delete a clan? Look for a clue in the SQL."
175
+
176
+ **User:** "Oh, ON DELETE CASCADE — so the events get deleted too?"
177
+
178
+ **Agent:**
179
+ > "Exactly! Now here's the full breakdown..."
180
+
181
+ *[Gives detailed explanation with tables and analogies]*
182
+
183
+ **Agent (Retrieval check):**
184
+ > "OK, so if I insert a new event for clan 'SIG' in season 1 worth 100 points, what happens to the clan_season_scores table?"
185
+
186
+ **User:** "The trigger fires and adds 100 to SIG's season 1 total?"
187
+
188
+ **Agent:**
189
+ > "Perfect! Now let's tackle triggers and materialized views — these are new for you, so I'll explain first..."
190
+
191
+ *[Goes straight to explanation without generation prompt, since user said they don't know these]*
192
+
193
+ ## Common Pitfalls
194
+
195
+ ### Over-Questioning
196
+ **Wrong:** Asking 5 Socratic questions per section
197
+ **Right:** 1 generation prompt + 1 retrieval check per section (max)
198
+
199
+ ### Ignoring Calibration
200
+ **Wrong:** Asking "What's a SELECT statement?" when user said they know SQL
201
+ **Right:** Skip basics, focus on project-specific usage
202
+
203
+ ### No Retrieval
204
+ **Wrong:** Explaining everything without checking understanding
205
+ **Right:** "Explain this back to me" after key concepts
206
+
207
+ ### Too Much Struggle
208
+ **Wrong:** Letting user flounder on completely new concepts
209
+ **Right:** If calibration shows "no idea", explain first, then retrieve
210
+
211
+ ### Passive Consumption
212
+ **Wrong:** Long explanations without interaction
213
+ **Right:** One section at a time, always pause for retrieval
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: explain-it-v2
3
+ description: Evidence-based interactive walkthrough using retrieval practice, Socratic questioning, and productive struggle. Calibrated to user's level. Use when user says "explain this", "walk me through", "teach me this", "break this down", or pastes an error and asks "what happened".
4
+ ---
5
+
6
+ # Explain It V2
7
+
8
+ Interactive, evidence-based walkthrough that challenges the user to think actively rather than passively consuming explanations.
9
+
10
+ ## Core Learning Principles
11
+
12
+ Every interaction incorporates these evidence-based strategies:
13
+
14
+ 1. **Retrieval Practice** — Force recall from memory, not passive rereading
15
+ 2. **Generation Effect** — Ask user to produce an answer before showing the correct one
16
+ 3. **Socratic Questioning** — Guide through questions, don't just give answers
17
+ 4. **Productive Struggle** — Present challenges before solutions
18
+ 5. **Bloom's Taxonomy** — Progress: Remember → Understand → Apply → Analyze → Evaluate → Create
19
+
20
+ See [REFERENCE.md](REFERENCE.md) for detailed learning science.
21
+
22
+ ## Phase 1: Gather
23
+
24
+ Determine what's being explained:
25
+ - **File in project** → read it in full
26
+ - **Code in chat** → work from conversation directly
27
+ - **Error message** → work from pasted text
28
+
29
+ If the file references other short, directly relevant files, read those too.
30
+
31
+ ## Phase 2: Calibrate
32
+
33
+ ### Quick check (always)
34
+
35
+ Ask 2-3 rapid-fire questions to gauge skill level. One at a time.
36
+
37
+ **Style:** casual, "help me calibrate" not "let me test you."
38
+
39
+ If a question can be answered from codebase/conversation history, figure it out yourself.
40
+
41
+ ### Grill session (optional)
42
+
43
+ After quick check, offer to do a quick grill session based on the grill me skill.
44
+
45
+ If yes: activate the grill-me skill and utilize its architecture to calibrate the user's skill level.
46
+
47
+ ### Build level map
48
+
49
+ Tag each concept:
50
+ - ✅ **Knows it** → correct terminology, skip basics
51
+ - 🟡 **Sort of knows it** → brief refresh
52
+ - ❌ **No idea** → plain English, analogies, build from scratch
53
+
54
+ If user says "just explain it" → default to beginner and go.
55
+
56
+ ## Phase 3: Active Explanation
57
+
58
+ For each section, follow this cycle:
59
+
60
+ ### 3a. Present (Generation Effect)
61
+
62
+ Show the code WITHOUT explanation. Ask:
63
+
64
+ > "Before I break this down, what do you think this section does? Even a wrong guess helps."
65
+
66
+ Wait for user's attempt.
67
+
68
+ ### 3b. Socratic Feedback
69
+
70
+ Assess their answer:
71
+ - If correct: acknowledge, ask a follow-up to probe deeper
72
+ - If partially correct: acknowledge what's right, ask guiding question about what's missing
73
+ - If wrong or "no idea": that's fine, move to explanation
74
+
75
+ Don't spend more than 1-2 exchanges here. The goal is activation, not interrogation.
76
+
77
+ ### 3c. Explain
78
+
79
+ Now give the full breakdown using:
80
+ - **Tables** for structured comparisons
81
+ - **Analogies** for abstract concepts
82
+ - **Plain English translations** of technical syntax
83
+ - **Why it matters** in one line
84
+
85
+ Match depth to the level map from Phase 2.
86
+
87
+ ### 3d. Retrieval Check
88
+
89
+ After explanation, ask a retrieval question:
90
+ - "Explain this back to me in your own words"
91
+ - "How would you modify this to do X?"
92
+ - "What would happen if we removed this line?"
93
+
94
+ Wait for answer, give brief feedback, then move on.
95
+
96
+ ### For Error Messages
97
+
98
+ 1. **Present** — show the error, ask "What do you think went wrong?"
99
+ 2. **Socratic probe** — based on their answer, ask a follow-up
100
+ 3. **Explain** — TL;DR, fix, why it happened, prevention
101
+ 4. **Retrieval** — "If you saw this error again, what would you check first?"
102
+
103
+ ## Phase 4: Reinforcement
104
+
105
+ After all sections:
106
+
107
+ ### 4a. Connection Diagram
108
+
109
+ ASCII art showing how pieces relate.
110
+
111
+ ### 4b. Spaced Retrieval
112
+
113
+ Circle back to 2-3 earlier concepts:
114
+ - "Quick check — can you remind me what [earlier concept] does?"
115
+ - Mix concepts from different sections (interleaving)
116
+
117
+ ### 4c. Application Challenge
118
+
119
+ Present a new scenario requiring application:
120
+ - "Given this schema, how would you add [new feature]?"
121
+ - "If you wanted to change [behavior], what would you modify?"
122
+
123
+ Target Apply/Analyze level of Bloom's, not just Remember.
124
+
125
+ ## Rules
126
+
127
+ - **Never explain before asking** — always give user a chance to generate first
128
+ - **One section at a time** for large files (>50 lines)
129
+ - **Match the level map** — don't over-explain what they know
130
+ - **Use their context** — reference their actual project, not generic examples
131
+ - **Celebrate attempts** — wrong answers are valuable, acknowledge the thinking
132
+ - **No setup overhead** — conversational only, don't create files unless asked
133
+ - **Pause after retrieval** — wait for answer before moving on
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: grill-me
3
+ description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
4
+ ---
5
+
6
+ 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.
7
+
8
+ Ask the questions one at a time.
9
+
10
+ If a question can be answered by exploring the codebase, explore the codebase instead.
@@ -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.
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: grill-with-docs
3
+ description: Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
4
+ ---
5
+
6
+ <what-to-do>
7
+
8
+ 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.
9
+
10
+ Ask the questions one at a time, waiting for feedback on each question before continuing.
11
+
12
+ If a question can be answered by exploring the codebase, explore the codebase instead.
13
+
14
+ </what-to-do>
15
+
16
+ <supporting-info>
17
+
18
+ ## Domain awareness
19
+
20
+ During codebase exploration, also look for existing documentation:
21
+
22
+ ### File structure
23
+
24
+ Most repos have a single context:
25
+
26
+ ```
27
+ /
28
+ ├── CONTEXT.md
29
+ ├── docs/
30
+ │ └── adr/
31
+ │ ├── 0001-event-sourced-orders.md
32
+ │ └── 0002-postgres-for-write-model.md
33
+ └── src/
34
+ ```
35
+
36
+ If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
37
+
38
+ ```
39
+ /
40
+ ├── CONTEXT-MAP.md
41
+ ├── docs/
42
+ │ └── adr/ ← system-wide decisions
43
+ ├── src/
44
+ │ ├── ordering/
45
+ │ │ ├── CONTEXT.md
46
+ │ │ └── docs/adr/ ← context-specific decisions
47
+ │ └── billing/
48
+ │ ├── CONTEXT.md
49
+ │ └── docs/adr/
50
+ ```
51
+
52
+ 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.
53
+
54
+ ## During the session
55
+
56
+ ### Challenge against the glossary
57
+
58
+ 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?"
59
+
60
+ ### Sharpen fuzzy language
61
+
62
+ 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."
63
+
64
+ ### Discuss concrete scenarios
65
+
66
+ 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.
67
+
68
+ ### Cross-reference with code
69
+
70
+ 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?"
71
+
72
+ ### Update CONTEXT.md inline
73
+
74
+ 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).
75
+
76
+ `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.
77
+
78
+ ### Offer ADRs sparingly
79
+
80
+ Only offer to create an ADR when all three are true:
81
+
82
+ 1. **Hard to reverse** — the cost of changing your mind later is meaningful
83
+ 2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
84
+ 3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
85
+
86
+ If any of the three is missing, skip the ADR. Use the format in [ADR-FORMAT.md](./ADR-FORMAT.md).
87
+
88
+ </supporting-info>