@hegemonart/get-design-done 1.27.7 → 1.28.5

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 (115) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/CHANGELOG.md +142 -0
  4. package/SKILL.md +1 -1
  5. package/agents/design-verifier.md +17 -0
  6. package/hooks/gdd-decision-injector.js +149 -3
  7. package/package.json +1 -1
  8. package/reference/accessibility.md +4 -0
  9. package/reference/adr-format.md +96 -0
  10. package/reference/apply-reflections-procedure.md +68 -0
  11. package/reference/architecture-vocabulary.md +102 -0
  12. package/reference/audit-scoring.md +14 -0
  13. package/reference/cache-policy.md +126 -0
  14. package/reference/color-theory.md +279 -0
  15. package/reference/compare-rubric.md +171 -0
  16. package/reference/composition.md +349 -0
  17. package/reference/connections-onboarding.md +417 -0
  18. package/reference/context-md-format.md +106 -0
  19. package/reference/contrast-advanced.md +205 -0
  20. package/reference/darkmode-audit-procedure.md +258 -0
  21. package/reference/debug-feedback-loops.md +119 -0
  22. package/reference/design-procedure.md +304 -0
  23. package/reference/design-system-guidance.md +2 -0
  24. package/reference/discover-procedure.md +204 -0
  25. package/reference/explore-procedure.md +267 -0
  26. package/reference/form-patterns.md +2 -0
  27. package/reference/health-mcp-detection.md +44 -0
  28. package/reference/health-skill-length-report.md +69 -0
  29. package/reference/heuristics.md +84 -0
  30. package/reference/i18n.md +554 -0
  31. package/reference/iconography.md +2 -0
  32. package/reference/milestone-completeness-rubric.md +87 -0
  33. package/reference/motion-interpolate.md +1 -0
  34. package/reference/palette-catalog.md +2 -0
  35. package/reference/peer-cli-protocol.md +161 -0
  36. package/reference/plan-procedure.md +278 -0
  37. package/reference/proportion-systems.md +267 -0
  38. package/reference/registry.json +204 -1
  39. package/reference/registry.schema.json +1 -1
  40. package/reference/router-rules.md +84 -0
  41. package/reference/rtl-cjk-cultural.md +2 -0
  42. package/reference/scan-procedure.md +731 -0
  43. package/reference/shared-preamble.md +78 -6
  44. package/reference/skill-authoring-contract.md +128 -0
  45. package/reference/start-procedure.md +115 -0
  46. package/reference/style-doc-procedure.md +150 -0
  47. package/reference/style-vocabulary.md +2 -0
  48. package/reference/threat-modeling.md +101 -0
  49. package/reference/typography.md +4 -0
  50. package/reference/verify-procedure.md +512 -0
  51. package/reference/visual-hierarchy-layout.md +4 -0
  52. package/scripts/validate-skill-length.cjs +283 -0
  53. package/skills/add-backlog/SKILL.md +1 -0
  54. package/skills/analyze-dependencies/SKILL.md +33 -122
  55. package/skills/apply-reflections/SKILL.md +1 -40
  56. package/skills/audit/SKILL.md +3 -1
  57. package/skills/bandit-status/SKILL.md +31 -66
  58. package/skills/benchmark/SKILL.md +15 -55
  59. package/skills/brief/SKILL.md +12 -1
  60. package/skills/cache-manager/SKILL.md +3 -57
  61. package/skills/check-update/SKILL.md +38 -75
  62. package/skills/compare/SKILL.md +29 -269
  63. package/skills/complete-cycle/SKILL.md +1 -1
  64. package/skills/connections/SKILL.md +21 -427
  65. package/skills/continue/SKILL.md +1 -0
  66. package/skills/darkmode/SKILL.md +32 -287
  67. package/skills/debug/SKILL.md +11 -8
  68. package/skills/design/SKILL.md +27 -245
  69. package/skills/discover/SKILL.md +26 -133
  70. package/skills/discuss/SKILL.md +18 -2
  71. package/skills/explore/SKILL.md +42 -176
  72. package/skills/fast/SKILL.md +1 -0
  73. package/skills/figma-write/SKILL.md +2 -2
  74. package/skills/health/SKILL.md +11 -33
  75. package/skills/help/SKILL.md +1 -0
  76. package/skills/list-assumptions/SKILL.md +1 -0
  77. package/skills/map/SKILL.md +8 -31
  78. package/skills/new-cycle/SKILL.md +3 -1
  79. package/skills/next/SKILL.md +1 -0
  80. package/skills/note/SKILL.md +1 -0
  81. package/skills/optimize/SKILL.md +21 -44
  82. package/skills/pause/SKILL.md +1 -0
  83. package/skills/peer-cli-add/SKILL.md +26 -108
  84. package/skills/peer-cli-customize/SKILL.md +22 -42
  85. package/skills/peers/SKILL.md +33 -57
  86. package/skills/plan/SKILL.md +33 -220
  87. package/skills/plant-seed/SKILL.md +1 -0
  88. package/skills/pr-branch/SKILL.md +1 -0
  89. package/skills/progress/SKILL.md +1 -7
  90. package/skills/quality-gate/SKILL.md +34 -166
  91. package/skills/quick/SKILL.md +1 -0
  92. package/skills/reapply-patches/SKILL.md +1 -0
  93. package/skills/recall/SKILL.md +1 -0
  94. package/skills/resume/SKILL.md +1 -0
  95. package/skills/review-backlog/SKILL.md +1 -0
  96. package/skills/router/SKILL.md +3 -59
  97. package/skills/scan/SKILL.md +36 -675
  98. package/skills/settings/SKILL.md +1 -0
  99. package/skills/ship/SKILL.md +1 -0
  100. package/skills/sketch/SKILL.md +1 -1
  101. package/skills/sketch-wrap-up/SKILL.md +13 -54
  102. package/skills/spike/SKILL.md +1 -1
  103. package/skills/spike-wrap-up/SKILL.md +12 -46
  104. package/skills/start/SKILL.md +13 -112
  105. package/skills/stats/SKILL.md +1 -0
  106. package/skills/style/SKILL.md +18 -140
  107. package/skills/synthesize/SKILL.md +1 -0
  108. package/skills/timeline/SKILL.md +1 -0
  109. package/skills/todo/SKILL.md +1 -0
  110. package/skills/turn-closeout/SKILL.md +36 -56
  111. package/skills/undo/SKILL.md +1 -0
  112. package/skills/update/SKILL.md +1 -0
  113. package/skills/verify/SKILL.md +42 -457
  114. package/skills/warm-cache/SKILL.md +3 -35
  115. package/skills/zoom-out/SKILL.md +26 -0
@@ -0,0 +1,417 @@
1
+ ---
2
+ name: connections-onboarding
3
+ type: meta-rules
4
+ version: 1.0.0
5
+ phase: 28.5
6
+ tags: [connections, onboarding, probes, mcp, wizard, procedure, extracted]
7
+ last_updated: 2026-05-18
8
+ ---
9
+
10
+ Source: extracted from `skills/connections/SKILL.md` (Phase 28.5 rework — D-10 extract-then-link).
11
+ The skill's load-bearing routing + invocation-mode dispatch stays in `../skills/connections/SKILL.md`;
12
+ this file holds the 12 probe scripts, bucket categorization, per-connection setup screen,
13
+ auto-run eligibility matrix, value-prop one-liners, and STATE.md / config.json write contracts.
14
+
15
+ # Connections Onboarding Procedure
16
+
17
+ Detailed procedure for the `/gdd:connections` interactive wizard — companion to
18
+ `../skills/connections/SKILL.md`. Read this file when executing a specific probe, deciding
19
+ auto-run vs manual, writing config.json, or merging STATE.md `<connections>`. The SKILL.md
20
+ keeps the load-bearing top-level flow + AskUserQuestion routing; this file holds the deep
21
+ methodology + per-connection detail.
22
+
23
+ For the cross-skill probe pattern + connection handshake (ToolSearch → live call → STATE.md
24
+ write), see `./shared-preamble.md#connection-handshake-summary`. The canonical per-connection
25
+ specs (setup commands, OAuth flows, capability matrix) live in `../connections/<name>.md` —
26
+ this file does NOT duplicate them; it points at them by name.
27
+
28
+ ---
29
+
30
+ ## Step 1 — Probe all 12 connections
31
+
32
+ Run every probe below in order. MCP probes call `ToolSearch` first (deferred tools fail silently without it). Write every result to `STATE.md <connections>` when done.
33
+
34
+ ### MCP-based probes
35
+
36
+ **figma:**
37
+ ```
38
+ ToolSearch({ query: "select:mcp__figma__get_metadata", max_results: 1 })
39
+ → Empty → figma: not_configured
40
+ → Non-empty → call mcp__figma__get_metadata
41
+ Success → figma: available
42
+ Error → figma: unavailable
43
+ ```
44
+
45
+ **refero:**
46
+ ```
47
+ ToolSearch({ query: "refero", max_results: 5 })
48
+ → Empty → refero: not_configured
49
+ → Non-empty → refero: available
50
+ ```
51
+
52
+ **preview:**
53
+ ```
54
+ ToolSearch({ query: "Claude_Preview", max_results: 5 })
55
+ → Empty → preview: not_configured
56
+ → Non-empty → call mcp__Claude_Preview__preview_list
57
+ Success → preview: available
58
+ Error → preview: unavailable
59
+ ```
60
+
61
+ **pinterest:**
62
+ ```
63
+ ToolSearch({ query: "mcp-pinterest", max_results: 5 })
64
+ → Empty → pinterest: not_configured
65
+ → Non-empty → pinterest: available
66
+ ```
67
+
68
+ **paper-design:**
69
+ ```
70
+ ToolSearch({ query: "mcp__paper", max_results: 5 })
71
+ → Empty → paper_design: not_configured
72
+ → Non-empty → paper_design: available
73
+ ```
74
+
75
+ **21st-dev:**
76
+ ```
77
+ ToolSearch({ query: "mcp__21st", max_results: 5 })
78
+ → Empty → twenty_first: not_configured
79
+ → Non-empty → twenty_first: available
80
+ ```
81
+
82
+ **magic-patterns:**
83
+ ```
84
+ ToolSearch({ query: "mcp__magic_patterns", max_results: 5 })
85
+ → Empty → magic_patterns: not_configured
86
+ → Non-empty → magic_patterns: available
87
+ ```
88
+
89
+ ### Non-MCP probes
90
+
91
+ **storybook** (HTTP):
92
+ ```
93
+ Bash: curl -sf http://localhost:6006/index.json 2>/dev/null
94
+ → Success → storybook: available
95
+ → Fail → curl -sf http://localhost:6006/stories.json 2>/dev/null
96
+ Success → storybook: available
97
+ Fail → storybook: not_configured
98
+ ```
99
+
100
+ **chromatic** (CLI + env):
101
+ ```
102
+ Bash: command -v chromatic >/dev/null 2>&1 || npx --yes chromatic --version 2>/dev/null
103
+ → Fail (non-zero) → chromatic: not_configured
104
+ → Success → check env CHROMATIC_PROJECT_TOKEN
105
+ Empty → chromatic: unavailable
106
+ Set → chromatic: available
107
+ ```
108
+
109
+ **graphify** (CLI + file):
110
+ ```
111
+ Bash: node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" graphify status 2>/dev/null
112
+ → Error or enabled:false → graphify: not_configured
113
+ → enabled:true → check graphify-out/graph.json exists
114
+ Absent → graphify: unavailable
115
+ Present → graphify: available
116
+ ```
117
+
118
+ **pencil-dev** (file probe):
119
+ ```
120
+ Bash: find . -name "*.pen" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null | head -1
121
+ → Empty → pencil_dev: not_configured
122
+ → Non-empty → pencil_dev: available
123
+ ```
124
+
125
+ **claude-design** (file probe — handoff bundle):
126
+ ```
127
+ Bash: ls .design/handoff/ 2>/dev/null || find . -maxdepth 3 \
128
+ \( -name "*.claude-design.html" -o -name "*.claude-design.zip" \
129
+ -o -name "claude-design-*.html" \) 2>/dev/null | head -1
130
+ → Empty → claude_design: not_configured
131
+ → Non-empty → claude_design: available
132
+ ```
133
+
134
+ After all 12 probes complete, merge results into `STATE.md <connections>`. Preserve the three-value schema verbatim (`available | unavailable | not_configured`). Do not add new values.
135
+
136
+ ---
137
+
138
+ ## Step 2 — Bucket categorization
139
+
140
+ ### Project-hint detection
141
+
142
+ Run once, cache in-memory:
143
+
144
+ ```bash
145
+ HAS_TAILWIND=$( ls tailwind.config.* 2>/dev/null | head -1 )
146
+ HAS_STORYBOOK_DIR=$( test -d .storybook && echo yes )
147
+ HAS_PEN_FILES=$( find . -name "*.pen" -not -path "*/node_modules/*" 2>/dev/null | head -1 )
148
+ HAS_REACT=$( grep -l '"react"' package.json 2>/dev/null )
149
+ HAS_FIGMA_HINT=$( grep -r "figma\.com/file" -l . --include="*.md" 2>/dev/null | head -1 )
150
+ ```
151
+
152
+ ### Bucketing rules
153
+
154
+ | Bucket | Criteria |
155
+ |---|---|
156
+ | **available** | probe returned `available` |
157
+ | **recommended** | probe returned `not_configured` AND matches a project hint below |
158
+ | **optional** | probe returned `not_configured` AND no project hint match |
159
+ | **skipped** | name appears in `config.json connections.skip[]` |
160
+ | **unavailable** | probe returned `unavailable` (configured but broken — needs attention) |
161
+
162
+ ### Recommendation mapping
163
+
164
+ | Project hint | Recommend |
165
+ |---|---|
166
+ | `HAS_TAILWIND` or `HAS_FIGMA_HINT` | figma |
167
+ | `HAS_STORYBOOK_DIR` or storybook available | storybook, chromatic |
168
+ | `HAS_PEN_FILES` | pencil-dev |
169
+ | `HAS_REACT` | 21st-dev, magic-patterns |
170
+ | Always | refero, preview |
171
+
172
+ ---
173
+
174
+ ## Step 3 — Summary table
175
+
176
+ ```
177
+ ┌── Connections ──────────────────────────
178
+ Available (<N>)
179
+ • <name> <one-line detail from probe>
180
+ ...
181
+
182
+ Unavailable (<N>) — configured but not responding
183
+ ⚠ <name> <reason>
184
+ ...
185
+
186
+ Recommended for this project (<N>)
187
+ ▸ <name> <one-line value prop>
188
+ ...
189
+
190
+ Optional (<N>)
191
+ ▸ <name> <one-line value prop>
192
+ ...
193
+
194
+ Skipped by you (<N>)
195
+ · <name> (re-enable: /gdd:connections <name>)
196
+ ─────────────────────────────────────────
197
+ ```
198
+
199
+ One-line value props (use verbatim):
200
+
201
+ | Name | Value prop |
202
+ |---|---|
203
+ | figma | design-token extraction, annotations, Code Connect |
204
+ | refero | design reference search for discover stage |
205
+ | preview | live browser screenshots for verify visual checks |
206
+ | storybook | component inventory + per-story a11y |
207
+ | chromatic | visual regression against your Storybook baseline |
208
+ | graphify | knowledge-graph queries over component–token–decision |
209
+ | pinterest | visual inspiration collection |
210
+ | claude-design | Claude Design handoff bundle ingestion |
211
+ | paper-design | bidirectional canvas (free tier: 100 calls/week) |
212
+ | pencil-dev | `.pen` spec files as canonical design source |
213
+ | 21st-dev | AI component generator (marketplace search) |
214
+ | magic-patterns | AI component generator (DS-aware) |
215
+
216
+ ---
217
+
218
+ ## Step 4 — Route by mode
219
+
220
+ ### Mode: `list` or `--auto`
221
+
222
+ After printing the summary, write STATE.md, append one-line hint: `Run /gdd:connections to configure.` Emit `## CONNECTIONS COMPLETE`. Exit.
223
+
224
+ ### Mode: `<connection-name>`
225
+
226
+ Skip the top-level AskUserQuestion. Jump directly to Step 5 for that single connection.
227
+
228
+ ### Mode: interactive (default)
229
+
230
+ AskUserQuestion:
231
+
232
+ ```
233
+ question: "What would you like to do?"
234
+ options:
235
+ - "Configure recommended (<N>)" → loop Step 5 over recommended bucket
236
+ - "Pick one by one" → loop Step 5 over all not_configured
237
+ - "Configure all optional" → loop Step 5 over optional bucket
238
+ - "Re-check a specific connection" → prompt for name, run Step 1 for it only
239
+ - "Exit" → emit ## CONNECTIONS COMPLETE, exit
240
+ ```
241
+
242
+ If recommended bucket is empty, swap that option for "Show all 12 and pick."
243
+
244
+ ---
245
+
246
+ ## Step 5 — Per-connection setup screen
247
+
248
+ ### 5.1 Read the spec
249
+
250
+ Read `connections/<name>.md`. Extract:
251
+ - The "Setup" section (prerequisites + install command)
252
+ - The "Contributes at" row from the capability matrix (stages affected)
253
+
254
+ ### 5.2 Present the screen
255
+
256
+ Print:
257
+
258
+ ```
259
+ ┌─ <name> ────────────────────────────────────────
260
+ │ Status: <current probe result>
261
+ │ Contributes: <one-line value prop from Step 3>
262
+ │ Stages affected: <list from capability matrix>
263
+ │ Requires: <prereqs line from spec>
264
+
265
+ │ Setup command:
266
+ │ <install command from spec>
267
+ └─────────────────────────────────────────────────
268
+ ```
269
+
270
+ ### 5.3 AskUserQuestion
271
+
272
+ ```
273
+ question: "Install <name>?"
274
+ options:
275
+ - "Run install command now" → 5.4a (auto-run path)
276
+ - "Copy command — I'll run it" → 5.4b (manual path)
277
+ - "Skip for now" → 5.4c (no config change)
278
+ - "Never ask again" → 5.4d (add to skip list)
279
+ ```
280
+
281
+ ### 5.4 Auto-run eligibility matrix
282
+
283
+ **Only auto-run if the install command is reversible.** The matrix:
284
+
285
+ | Connection | Install kind | Auto-run? | Rationale |
286
+ |---|---|---|---|
287
+ | figma | `claude mcp add` (remote MCP) | ✓ yes | Reversible via `claude mcp remove` |
288
+ | preview | built-in, no install | — | Already present or not — no command to run |
289
+ | paper-design | `claude mcp add` | ✓ yes | Reversible |
290
+ | magic-patterns | `claude mcp add` | ✓ yes | Reversible |
291
+ | pinterest | `npx -y @smithery/cli install` | ✓ yes | Smithery CLI manages entry |
292
+ | refero | vendor-specific install | ✗ no | Vendor doesn't document a stable CLI — print link only |
293
+ | storybook | `npx storybook init` | ✗ no | Mutates repo files — force manual |
294
+ | chromatic | `npm install --save-dev chromatic` + env var | ✗ no | Writes package.json + needs `CHROMATIC_PROJECT_TOKEN` — force manual |
295
+ | graphify | `pip install` + `gsd-tools config-set` | ✗ no | Python install + cross-tool config — force manual |
296
+ | 21st-dev | `npx @21st-dev/magic init` + env var | ✗ no | Env var required — force manual |
297
+ | pencil-dev | VS Code extension | ✗ no | IDE-level install — force manual |
298
+ | claude-design | handoff bundle drop | ✗ no | User-driven file drop — force manual |
299
+
300
+ For non-auto-run connections, hide the "Run install command now" option entirely in 5.3.
301
+
302
+ ### 5.4a — Auto-run path
303
+
304
+ Bash the install command. On success: print stdout, print `"Installed. Session restart required before <name> is usable."`, append `<name>` to `.design/config.json > connections_onboarding.pending_verification[]`.
305
+
306
+ On failure: print stderr, print `"Install failed. Copy the command and run it manually, then rerun /gdd:connections <name> to verify."` Do not record pending_verification.
307
+
308
+ ### 5.4b — Manual path
309
+
310
+ Print the install command inside a fenced code block for easy copy. Print: `"After installing, restart the session and run /gdd:connections <name> to verify."` Append `<name>` to `connections_onboarding.pending_verification[]`.
311
+
312
+ ### 5.4c — Skip for now
313
+
314
+ No config change. Continue loop.
315
+
316
+ ### 5.4d — Never ask again
317
+
318
+ Read `.design/config.json`. Ensure `connections.skip` is an array. Append `<name>` if not present. Write back.
319
+
320
+ ### 5.5 After every per-connection screen
321
+
322
+ If mode is `<connection-name>` (single-target invocation), skip straight to Step 6. Otherwise continue the loop.
323
+
324
+ ---
325
+
326
+ ## Step 6 — Verification pass
327
+
328
+ Re-probe every connection whose name appears in `connections_onboarding.pending_verification[]`. For each:
329
+
330
+ - Now `available` → remove from `pending_verification[]`. Update STATE.md.
331
+ - Still `not_configured` → leave in `pending_verification[]`. User probably needs a session restart.
332
+ - Now `unavailable` → leave in `pending_verification[]`, print: `"<name> installed but probe errored — OAuth or auth may be required."`
333
+
334
+ Write STATE.md `<connections>` and `.design/config.json`.
335
+
336
+ ### Print summary
337
+
338
+ ```
339
+ ┌── Setup complete ──
340
+ Newly available: <list>
341
+ Still pending (needs session restart): <list>
342
+ Skipped permanently: <list>
343
+ ─────────────────────
344
+ ```
345
+
346
+ If any pending remain, print: `"After restarting the session, run /gdd:connections to verify remaining."`
347
+
348
+ If no pending remain and at least one install happened, print: `"Run /gdd:scan to start your first cycle, or /gdd:brief to capture a design problem."`
349
+
350
+ ---
351
+
352
+ ## Resumability
353
+
354
+ If `.design/config.json > connections_onboarding.pending_verification[]` is non-empty at entry, this is a resumed session (most likely after a restart for a just-installed MCP):
355
+
356
+ 1. Print: `"Resuming — <N> connections pending verification: <list>"`
357
+ 2. Run Step 6 (verification pass) immediately.
358
+ 3. If resumption completes cleanly (empty pending list), emit `## CONNECTIONS COMPLETE` and exit — do not re-enter the wizard.
359
+ 4. Otherwise, fall through to Step 3 (summary) with the still-pending connections visible as `unavailable`.
360
+
361
+ ---
362
+
363
+ ## Config file writes
364
+
365
+ ### `.design/config.json > connections.skip[]`
366
+
367
+ Pattern: read whole file, merge one field, write back (matches `/gdd:settings` pattern).
368
+
369
+ ```json
370
+ {
371
+ "model_profile": "balanced",
372
+ "parallelism": { ... },
373
+ "connections": {
374
+ "skip": ["pinterest", "graphify"]
375
+ }
376
+ }
377
+ ```
378
+
379
+ ### `.design/config.json > connections_onboarding` (scratch block)
380
+
381
+ Deleted automatically when empty after a verification pass:
382
+
383
+ ```json
384
+ {
385
+ "connections_onboarding": {
386
+ "started_at": "<ISO 8601>",
387
+ "pending_verification": ["figma", "chromatic"]
388
+ }
389
+ }
390
+ ```
391
+
392
+ ### `STATE.md <connections>` write
393
+
394
+ Always merge, never replace — other stages may have written entries this skill did not probe.
395
+
396
+ Key normalization:
397
+ - `21st-dev` → `twenty_first` in STATE.md (no leading digit in XML-ish key).
398
+ - `magic-patterns` → `magic_patterns`.
399
+ - `paper-design` → `paper_design`.
400
+ - `pencil-dev` → `pencil_dev`.
401
+ - `claude-design` → `claude_design`.
402
+ - All other names map 1:1.
403
+
404
+ ---
405
+
406
+ ## Do Not
407
+
408
+ - Never run `npm install -g` globals automatically. Always force manual path for globals.
409
+ - Never write to `~/.bashrc`, `~/.zshrc`, or shell RC files. Env-var setup is always manual.
410
+ - Never run `claude mcp add` without explicit `"Run install command now"` confirmation.
411
+ - Never auto-restart the Claude Code session. Print the instruction and let the user act.
412
+ - Never re-prompt for names in `connections.skip[]`. If the user wants to re-enable, they invoke `/gdd:connections <name>` explicitly.
413
+ - Never overwrite existing `<connections>` entries that this skill did not probe. Merge only.
414
+
415
+ ---
416
+
417
+ *Imported by: `../skills/connections/SKILL.md`. Maintained as part of Phase 28.5 (Bucket 2 rework — D-10).*
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: context-md-format
3
+ type: meta-rules
4
+ version: 1.0.0
5
+ phase: 28.5
6
+ tags: [context-md, glossary, ubiquitous-language, ddd, project-scoped]
7
+ last_updated: 2026-05-18
8
+ ---
9
+
10
+ Source: mattpocock/skills (MIT) — adapted with permission. See `../NOTICE` for the full attribution block.
11
+
12
+ # CONTEXT.md Format
13
+
14
+ `CONTEXT.md` is a project-scoped ubiquitous-language glossary kept at the repository root.
15
+ It captures domain terms the user and the agent have agreed upon so the next session does
16
+ not re-litigate naming. `STATE.md` is cycle-scoped and rotates per pipeline run; `CONTEXT.md`
17
+ outlives the cycle and compounds across runs. The `discuss` and `brief` skills write to it
18
+ inline during interviews (no batching) — see Phase 28.5 plan `28.5-08` for the writer
19
+ behavior. See `./adr-format.md` for the heavier project-scoped artifact (decisions that meet
20
+ the 3-criteria gate).
21
+
22
+ ## Term entry
23
+
24
+ Each entry is a `##` heading whose text is the term, followed by a body paragraph that
25
+ defines it. The required surface is the heading and the definition; everything else is
26
+ optional GDD adaptation.
27
+
28
+ ```markdown
29
+ ## <Term Name>
30
+
31
+ <Definition — 1-3 sentences in plain language. Use existing CONTEXT.md vocabulary where
32
+ possible (compounding effect — terms defined earlier in the file are reused in later
33
+ definitions).>
34
+
35
+ **First seen:** <cycle-id-or-NN> *(optional, GDD addition for traceability)*
36
+ **Aliases:** [<term1>, <term2>] *(optional, GDD addition for term-merging — see §Aliases)*
37
+ **Examples:** *(optional)*
38
+
39
+ - <Concrete usage 1>
40
+ - <Concrete usage 2>
41
+ ```
42
+
43
+ - **Required fields.** The heading (term name) and the definition paragraph.
44
+ - **Optional fields.** `**First seen:**`, `**Aliases:**`, `**Examples:**` — added by
45
+ `discuss` / `brief` skills as ergonomic. `first-seen` ties the term to an originating
46
+ cycle's `STATE.md`; `aliases` enables term-merging; examples concretize usage.
47
+
48
+ ## Lazy creation
49
+
50
+ `CONTEXT.md` is created on the FIRST term resolution and never batched. The writing skill
51
+ just appends — no precondition prompts, no "should we create CONTEXT.md?" question (D-04).
52
+
53
+ - **Trigger.** A fuzzy phrase becomes a sharpened term (e.g., "thingy" → "materialization
54
+ cascade"), a new noun gets named, or two phrases collapse to one.
55
+ - **Location.** Project root: `./CONTEXT.md`. Repos that span multiple bounded contexts use
56
+ `CONTEXT-MAP.md` plus per-area `<area>/CONTEXT.md` — see `## Multi-context`.
57
+ - **No batching.** Do NOT wait to gather "enough" terms. Each resolved term lands
58
+ immediately so the file reflects the conversation at every checkpoint.
59
+
60
+ ## Aliases
61
+
62
+ When two terms collapse to one canonical name, the loser becomes an entry in the winner's
63
+ `**Aliases:**` line. The agent never silently drops a term — the alias preserves the prior
64
+ vocabulary for grep, for the `decision-injector` hook, and for the user's mental model.
65
+
66
+ ```markdown
67
+ ## Materialization cascade
68
+
69
+ The chain of steps that turns a sketch into a real, deployable artifact. Triggered by the
70
+ prototype gate; spans sketch → spike → real-thing.
71
+
72
+ **First seen:** v1.28.5
73
+ **Aliases:** [making-things-real, materialize, "real-ification"]
74
+ ```
75
+
76
+ - `decision-injector` (extended in plan `28.5-08`) searches `aliases` against task
77
+ descriptions so the canonical term surfaces even when the user types the old phrase.
78
+ - Aliases are kebab-case OR quoted; mix freely.
79
+
80
+ ## Multi-context
81
+
82
+ When the repo spans multiple bounded contexts (a monorepo with `apps/web` and `apps/api`,
83
+ say), each context gets its own `<area>/CONTEXT.md` and the top-level `CONTEXT-MAP.md` lists
84
+ them. Same entry format inside each file; `CONTEXT-MAP.md` is just an index.
85
+
86
+ ```markdown
87
+ # Context Map
88
+
89
+ ## Web App
90
+ `apps/web/CONTEXT.md`
91
+
92
+ ## API
93
+ `apps/api/CONTEXT.md`
94
+ ```
95
+
96
+ `discuss` / `brief` resolve which `CONTEXT.md` to write to by matching the active file
97
+ paths in the conversation against the map. When no map exists, the single-file default
98
+ (`./CONTEXT.md`) applies.
99
+
100
+ ## Cross-references
101
+
102
+ - Decisions that outlive the cycle AND meet the 3-criteria gate (hard-to-reverse AND
103
+ surprising-without-context AND real-tradeoff) become ADRs — see `./adr-format.md`.
104
+ - Cycle-scoped decisions stay in `STATE.md` — see `./STATE-TEMPLATE.md`.
105
+ - Skill structural rules (length cap, frontmatter, progressive disclosure) — see
106
+ `./skill-authoring-contract.md`.