@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,267 @@
1
+ ---
2
+ name: explore-procedure
3
+ type: meta-rules
4
+ version: 1.0.0
5
+ phase: 28.5
6
+ tags: [explore, procedure, extracted, pipeline-stage, connection-probe, design-interview, i18n]
7
+ last_updated: 2026-05-18
8
+ ---
9
+
10
+ Source: extracted from `skills/explore/SKILL.md` (Phase 28.5 rework — D-10 extract-then-link).
11
+ The skill's load-bearing workflow stays in `../skills/explore/SKILL.md`; this file holds the
12
+ detail the agent reaches for when executing a specific step (six connection probes, 21st.dev
13
+ prior-art check, inventory scan grep, design interview protocol, i18n probe, decision
14
+ recording).
15
+
16
+ # Explore Procedure
17
+
18
+ Detailed procedure for the get-design-done `explore` Stage 2 orchestrator. Companion to
19
+ `../skills/explore/SKILL.md`. Read this file when executing a specific step; the SKILL.md
20
+ keeps the load-bearing workflow + decision tree, this file holds the deep methodology.
21
+
22
+ ---
23
+
24
+ ## Stage entry
25
+
26
+ All STATE.md persistence in this skill goes through `gdd-state` MCP tools — no direct edits. The skill writes to `.design/STATE.md` (connections, decisions, progress, checkpoint) via those tools, and to plain design docs (DESIGN.md / DESIGN-DEBT.md / DESIGN-CONTEXT.md) via `Write`.
27
+
28
+ 1. Call `mcp__gdd_state__transition_stage` with `to: "explore"`.
29
+ - On success: proceed to probes.
30
+ - On gate failure: emit blockers to the user (do not advance). Each blocker is a line in the `error.context.blockers` array; print them verbatim.
31
+ 2. Call `mcp__gdd_state__get` with no arguments — snapshot the parsed state into a local `state` variable for downstream steps.
32
+
33
+ ---
34
+
35
+ ## Step 1 — Connection probe
36
+
37
+ Probe connection availability (the batched write lands at the end of this step — see "Commit probe results" below):
38
+
39
+ **A — Figma probe (variant-agnostic):**
40
+ ```
41
+ ToolSearch({ query: "figma get_metadata use_figma", max_results: 10 })
42
+ Parse tool names matching /^mcp__([^_]*figma[^_]*)__(get_metadata|use_figma)$/i
43
+ into read-capable and write-capable prefix sets.
44
+ Empty read set -> figma: not_configured
45
+ One+ matches -> pick prefix via tiebreaker:
46
+ (1) both-sets > reads-only,
47
+ (2) `figma` > others,
48
+ (3) non-`figma-desktop` > desktop,
49
+ (4) alphabetical.
50
+ Then call {prefix}get_metadata:
51
+ success -> figma: available (prefix=mcp__<prefix>__, writes=<true|false>)
52
+ error -> figma: unavailable
53
+ ```
54
+
55
+ **B — Refero probe:**
56
+ ```
57
+ ToolSearch({ query: "refero", max_results: 5 })
58
+ Empty -> refero: not_configured
59
+ Non-empty -> refero: available
60
+ ```
61
+
62
+ **C — 21st.dev probe:**
63
+ ```
64
+ ToolSearch({ query: "mcp__21st", max_results: 5 })
65
+ Empty -> 21st-dev: not_configured
66
+ Non-empty -> 21st-dev: available
67
+ ```
68
+
69
+ **D — Magic Patterns probe:**
70
+ ```
71
+ ToolSearch({ query: "mcp__magic_patterns", max_results: 5 })
72
+ Empty -> magic-patterns: not_configured
73
+ Non-empty -> magic-patterns: available
74
+ ```
75
+
76
+ **E — paper.design probe:**
77
+ ```
78
+ ToolSearch({ query: "mcp__paper", max_results: 5 })
79
+ Empty -> paper-design: not_configured
80
+ Non-empty -> call mcp__paper-design__get_selection; success -> available; error -> unavailable
81
+ ```
82
+
83
+ **F — pencil.dev probe (file-based):**
84
+ ```bash
85
+ find . -name "*.pen" -not -path "*/node_modules/*" 2>/dev/null | head -1
86
+ Empty -> pencil-dev: not_configured
87
+ Found -> pencil-dev: available
88
+ ```
89
+
90
+ ## Commit probe results
91
+
92
+ After all probes complete, commit results in a single call:
93
+
94
+ `mcp__gdd_state__probe_connections` with `probe_results` = an array of `{ name, status }` entries — one per probed connection. Example:
95
+
96
+ ```json
97
+ {
98
+ "probe_results": [
99
+ { "name": "figma", "status": "available" },
100
+ { "name": "refero", "status": "not_configured" },
101
+ { "name": "preview", "status": "unavailable" }
102
+ ]
103
+ }
104
+ ```
105
+
106
+ Unspecified connections keep their existing value. Do NOT issue multiple `probe_connections` calls — the tool is designed for a single batch write per stage.
107
+
108
+ ## Step 1.5 — 21st.dev Prior-Art Check (when 21st-dev: available)
109
+
110
+ If `state.connections.21st-dev === "not_configured"` (from the snapshot captured at stage entry): skip this step entirely.
111
+
112
+ When the explore stage identifies any greenfield component in scope (component name from BRIEF.md or user request that does not yet have an implementation file):
113
+
114
+ 1. `21st_magic_component_search(component_name, limit: 3)`
115
+ 2. Evaluate top result:
116
+ - **fit >= 80%**: add `<prior-art>` block to DESIGN.md:
117
+ ```xml
118
+ <prior-art source="21st.dev" component="<name>" fit="<score>%" id="<component_id>">
119
+ Recommendation: adopt — do not build custom. Confirm with design-executor.
120
+ </prior-art>
121
+ ```
122
+ - **fit < 80%**: note top candidate in DESIGN.md as a reference, proceed with custom build:
123
+ ```xml
124
+ <prior-art source="21st.dev" component="<name>" fit="<score>%" id="<component_id>">
125
+ Low fit — noted for reference. Building custom component.
126
+ </prior-art>
127
+ ```
128
+ 3. If `svgl_get_brand_logo` is available and explore scope includes brand logo assets: call `svgl_get_brand_logo(brand_name)` for each required brand asset; add SVG results to `.design/assets/` and note in DESIGN.md.
129
+
130
+ If no greenfield components in scope: skip this step.
131
+
132
+ ---
133
+
134
+ ## Step 2 — Inventory scan (unless `--skip-scan`)
135
+
136
+ **Map pre-check:** If `.design/map/` exists and all 5 files (`tokens.md`, `components.md`, `visual-hierarchy.md`, `a11y.md`, `motion.md`) are present AND fresher than `src/` (mtime), consume them as the inventory source and skip the grep pass. Otherwise proceed with grep below and, after Step 4, suggest running `/gdd:map` for richer parallel-scanned data on the next cycle.
137
+
138
+ **Parallelism decision (before any multi-agent spawn):**
139
+ 1. Read `.design/config.json` `parallelism` (or defaults from `reference/config-schema.md`).
140
+ 2. Apply rules from `reference/parallelism-rules.md` (hard -> soft).
141
+ 3. Record the verdict via `mcp__gdd_state__set_status` with a short status label (e.g., `status: "explore_parallel"` or `"explore_serial"`) carrying the stage/verdict/reason/agents payload.
142
+ 4. If verdict is `parallel`, dispatch via multiple `Task()` calls in one response; if `serial`, spawn sequentially.
143
+
144
+ Run the canonical scan grep/glob inventory (preserves PLAT-01/02 POSIX ERE patterns from Phase 1):
145
+
146
+ - **Component detection** — `Glob` for `**/*.{tsx,jsx,vue,svelte}`; count exports, identify shared UI primitives.
147
+ - **Color extraction** — `Grep` for hex (`#[0-9a-fA-F]{3,8}`), `rgb(`, `hsl(`, Tailwind arbitrary color classes; dedupe.
148
+ - **Typography scan** — Grep font-family declarations, Tailwind `font-*`, `text-*` size classes; identify type scale.
149
+ - **Motion scan** — Grep `transition`, `animate-`, `@keyframes`, `framer-motion` imports.
150
+ - **Token detection** — Check for `tailwind.config.{js,cjs,mjs,ts}`, CSS custom properties (`--*`), design-token JSON.
151
+ - **Layout detection** — Ordered fallback: `src/` -> `app/` -> `pages/` -> `lib/` -> unknown.
152
+
153
+ Write findings to:
154
+ - `.design/DESIGN.md` — current design system inventory + baseline score
155
+ - `.design/DESIGN-DEBT.md` — prioritized debt roadmap
156
+
157
+ Record scan progress: call `mcp__gdd_state__update_progress` with `task_progress: "<completed>/<total>"` to reflect the scan pass.
158
+
159
+ ### Step 2.x — i18n readiness probe (informational)
160
+
161
+ Phase 28 D-04 probe — 3-state classification, **informational only**. NO gate, NO blocking, NO required-action. Output appears as a single line in the explore report.
162
+
163
+ Classification logic (matches `./reference/i18n.md` §Explore Integration Spec):
164
+
165
+ ```txt
166
+ 1. Read package.json (dependencies + devDependencies).
167
+
168
+ 2. Check against library matrix:
169
+ react-intl, next-intl, i18next, vue-i18n, formatjs, lingui
170
+ >=1 library found in deps or devDeps -> state = "framework-managed"
171
+ -> STOP, emit line, exit probe.
172
+
173
+ 3. Else (no library):
174
+ grep -RE "Intl\.(DateTimeFormat|NumberFormat|PluralRules|RelativeTimeFormat|ListFormat|Collator|Segmenter)" src/
175
+ >=1 match -> state = "partial"
176
+ -> emit line, exit probe.
177
+
178
+ 4. Else: state = "none"
179
+ -> emit line, exit probe.
180
+ ```
181
+
182
+ Output line in explore report (single informational line, per D-04):
183
+
184
+ ```txt
185
+ Localization readiness: framework-managed | partial | none
186
+ ```
187
+
188
+ (Exactly one of the three values, single line.) A consumer downstream (a planning agent, a roadmap reviewer, the user) can act on the signal if a gap is meaningful for the project, but the probe itself never forces a step — surface signal, do not bolt on a new pillar (D-07 orthogonal-lens discipline).
189
+
190
+ ## Step 2.5 — Detect prior sketches and project-local conventions
191
+
192
+ **Sketches**: If `.design/sketches/` exists, list all sketch slugs — group by those with `WINNER.md` (completed wrap-ups) vs without (pending). Call `mcp__gdd_state__set_status` with a brief note (e.g., `status: "explore_sketches_present"`) so downstream stages see the history. Include the inventory in DESIGN.md under a "Prior Explorations" section.
193
+
194
+ **Project-local skills**: Read any `./.claude/skills/design-*-conventions.md` files if present. Include their content in DESIGN-CONTEXT.md under a `<project_conventions>` section — these are codified decisions from prior `/gdd:sketch-wrap-up` runs or manual edits, and they override defaults.
195
+
196
+ **Global skills**: If `~/.claude/gdd/global-skills/` exists and contains `.md` files (other than README.md), read them and prepend their content to the `<project_conventions>` section under a `<global_conventions>` sub-block. Global skills represent cross-project personal conventions. They inform but do not override project-local decisions — when a project-local D-XX decision conflicts with a global skill, the project-local decision wins.
197
+
198
+ ---
199
+
200
+ ## Step 3 — Design interview (unless `--skip-interview`)
201
+
202
+ **Run this inline — do NOT spawn `design-discussant` as a subagent.** Subagent UI tools (`AskUserQuestion`) only render the native picker when called from the top-level skill context; spawning a Task() degrades the interview to plain markdown in chat (broken in Claude Desktop).
203
+
204
+ ### 3.a — Pre-load context
205
+
206
+ Read in this order:
207
+ 1. `state.decisions` from the snapshot captured at stage entry — existing D-XX entries (do NOT re-ask anything covered). If the snapshot is stale, refresh by calling `mcp__gdd_state__get`.
208
+ 2. `.design/BRIEF.md` — problem statement, audience, constraints
209
+ 3. `.design/DESIGN.md` — auto-detected inventory from Step 2
210
+ 4. `.design/DESIGN-CONTEXT.md` if it exists — `<gray_areas>` block lists unresolved topics
211
+ 5. `./.claude/skills/design-*-conventions.md` if any — locked project conventions, treat as authoritative
212
+
213
+ If `state.connections` shows `figma: available`, read the resolved `prefix=` from the same entry and call `{prefix}get_variable_defs`, then draft tentative D-XX entries (mark `(tentative — confirm with user)`) before asking.
214
+
215
+ ### 3.b — Identify question set
216
+
217
+ Build the list of areas needing input. Skip any area already answered by an existing D-XX or covered by a project convention. Default coverage:
218
+
219
+ - Cycle goal / outcome that matters most
220
+ - Audience and primary use context
221
+ - Brand direction (only if no tokens detected in DESIGN.md)
222
+ - Color primitives (only if no palette detected)
223
+ - Typography scale (only if no type system detected)
224
+ - Spacing scale (only if no spacing tokens detected)
225
+ - Motion preferences (only if no motion patterns detected)
226
+ - Any `<gray_areas>` from DESIGN-CONTEXT.md
227
+
228
+ ### 3.c — Ask, one question at a time
229
+
230
+ For each area, call `AskUserQuestion` with a single focused question. Provide 4 concrete options plus "Other" / "Skip" where it helps. Do not batch questions into one call. Do not print the question as markdown — always go through the tool.
231
+
232
+ Reject generic answers ("modern", "clean", "professional"). If the answer is vague, ask one follow-up before recording.
233
+
234
+ ### 3.d — Record after each answer
235
+
236
+ After each confirmed answer:
237
+ 1. Call `mcp__gdd_state__add_decision` with the decision payload. The tool assigns the next `D-NN` id and persists atomically. Format the summary as:
238
+ ```
239
+ [Category] Decision summary — short rationale
240
+ ```
241
+ 2. Append one JSON line to `.design/learnings/question-quality.jsonl` (create if absent):
242
+ ```json
243
+ {"ts":"<iso>","question_id":"Q-NN","question_text":"<verbatim>","answer_summary":"<one sentence>","quality":"high|medium|low|skipped","evidence":"<why>","cycle":"<active-cycle-slug>"}
244
+ ```
245
+ Quality classification: `skipped` if user picked Skip / "doesn't matter"; `low` if < 10 words and not a specific value; `medium` if hedged ("maybe", "I think", "not sure"); `high` otherwise.
246
+ 3. `add_decision` commits incrementally — the decision survives a crash mid-interview without an explicit save step.
247
+
248
+ ### 3.e — Produce DESIGN-CONTEXT.md
249
+
250
+ When all questions are answered, write `.design/DESIGN-CONTEXT.md` summarizing the locked decisions, remaining gray areas, and any Figma-sourced tentatives that were confirmed or rejected. Set frontmatter `status: complete`.
251
+
252
+ ---
253
+
254
+ ## Step 4 — Close out explore
255
+
256
+ - If the synthesizer (or equivalent mapper batch) ran in Step 2, call `mcp__gdd_state__update_progress` with `task_progress: "<mappers-completed>/<mappers-total>"` and `status: "explore_mappers_done"` before advancing.
257
+ - Call `mcp__gdd_state__checkpoint` — bumps `frontmatter.last_checkpoint` + appends a timestamp entry.
258
+ - Stage advance to `plan` happens at the next stage's entry (the plan skill will transition from its own entry step); do not edit frontmatter directly from this skill.
259
+
260
+ ## After Writing
261
+
262
+ ```
263
+ === Explore complete ===
264
+ Saved: .design/DESIGN.md, .design/DESIGN-DEBT.md, .design/DESIGN-CONTEXT.md
265
+ Next: @get-design-done plan
266
+ =========================
267
+ ```
@@ -10,6 +10,8 @@ Wroblewski's eye-tracking research measured the number of eye fixations required
10
10
 
11
11
  **Top-aligned labels** are the default for most forms. Completion time is fastest because the label and input form a single vertical unit. They also accommodate longer translated strings without breaking layout, making them the correct default for internationalised products. Use top-aligned labels whenever form complexity is moderate to high or field types are mixed.
12
12
 
13
+ **See:** [`./i18n.md`](./i18n.md) §Locale Formatting for the full `Intl.*` family (`NumberFormat`, `DateTimeFormat`, `PluralRules`, `RelativeTimeFormat`, `ListFormat`) over hand-rolled string concatenation — never assemble locale-aware strings via template literals. §Text Expansion explains the +30–40% LTR budget that top-aligned labels accommodate.
14
+
13
15
  **Left-aligned labels** create the slowest completion time because the eye must saccade horizontally from label to field on every row. They earn their place only when scannability of values matters more than speed — settings pages, data-entry tables, or read-heavy forms where users compare label and value together. In these contexts the horizontal alignment aids review, not input.
14
16
 
15
17
  **Floating labels (Material 3 style)** are an acceptable middle ground when screen real estate is severely constrained. The label begins as visible hint text above the field and remains visible (shrunk, repositioned) after the user starts typing. This pattern is distinct from — and incompatible with — placeholder-as-label. Never use placeholder text as the sole label: when the field receives focus the placeholder disappears, leaving the user to recall what was asked. This is a WCAG 2.1 failure under criterion 1.3.5 (Identify Input Purpose) and a general usability failure on any form longer than three fields.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: health-mcp-detection
3
+ type: heuristic
4
+ version: 1.0.0
5
+ phase: 28.5
6
+ tags: [health, mcp, detection, gdd-mcp, registration-nudge]
7
+ last_updated: 2026-05-18
8
+ ---
9
+
10
+ # Health MCP-Registration Detection Procedure
11
+
12
+ Extracted from `skills/health/SKILL.md` per Phase 28.5 D-10 (extract-then-link, never delete content).
13
+ This file documents the canonical procedure for inspecting whether `gdd-mcp` (Phase 27.7+) is
14
+ registered with any installed harness and rendering a one-line status row after the health
15
+ table. The procedure is non-blocking by design: any failure path renders `unknown` rather
16
+ than crashing the skill.
17
+
18
+ ## Dismissal check
19
+
20
+ 1. Read `.design/config.json` (if present). Parse JSON inside a try/catch.
21
+ 2. If `config.mcp_nudge === false`, SKIP this step entirely (render nothing).
22
+ 3. On parse failure: default to `mcp_nudge=true` (show the row) — fail-safe per threat T-27.7-04-05.
23
+
24
+ ## Detection
25
+
26
+ 1. Read `.claude/settings.local.json` (or equivalent harness settings file) and inspect its `mcpServers` object — alternatively run `claude mcp list` / `codex mcp list` if a CLI is available (see fallback below).
27
+ 2. Preferred invocation via the install-lib: call `detectMcpRegistration()` from `scripts/lib/install/mcp-register.cjs`. Returns `{harnesses: [{harness, present, registered}], summary}`.
28
+
29
+ ## Row rendering
30
+
31
+ Based on the detection result, render exactly ONE of these row strings:
32
+
33
+ - When `claude` and `codex` both present + both registered:
34
+ `MCP server: registered with claude+codex`
35
+ - When only one harness is present and registered:
36
+ `MCP server: registered with claude` (or `MCP server: registered with codex`)
37
+ - When at least one harness is present but `gdd-mcp` is NOT in its registered list:
38
+ `MCP server: not registered (run: npx @hegemonart/get-design-done --register-mcp; dismiss: .design/config.json#mcp_nudge=false)`
39
+ - When neither harness CLI is found on PATH:
40
+ `MCP server: unknown (claude/codex CLI not found)`
41
+
42
+ ## Fallback (if `mcp-register.cjs` not yet shipped)
43
+
44
+ Skip this step silently with status `MCP server: unknown`. This step is non-blocking — failures here MUST NOT crash the SKILL.
@@ -0,0 +1,69 @@
1
+ # Health skill — skill-length report subsection
2
+
3
+ Phase 28.5-11 / D-11 reference. Read by `skills/health/SKILL.md` to render the
4
+ "Skill-length report" subsection after the standard health checks.
5
+
6
+ ## JSON shape (from `validate-skill-length.cjs --quiet --json`)
7
+
8
+ ```jsonc
9
+ {
10
+ "summary": {
11
+ "total": 70, // number of SKILL.md files under skills/
12
+ "clean": 70, // skills with 0 errors and 0 warnings
13
+ "warnings": 0, // skills with >=100 lines but <250 (D-01 warn band)
14
+ "blockers": 0 // skills with any block-level error (>=250 lines,
15
+ // missing frontmatter field, description out of
16
+ // range, disable-model-invocation non-whitelisted)
17
+ },
18
+ "skills": [
19
+ {
20
+ "name": "...", // skill folder name (matches skills/<name>/SKILL.md)
21
+ "path": "...", // absolute path to the file on disk
22
+ "lines": 0, // wc -l semantics
23
+ "descriptionLength": 0, // length of frontmatter.description string
24
+ "hasRequiredFields": true,
25
+ "level": "clean", // "clean" | "warn" | "block"
26
+ "errors": [{ "code": "...", "message": "..." }],
27
+ "warnings": [{ "code": "...", "message": "..." }],
28
+ "reasons": ["..."] // human-readable summary lines
29
+ }
30
+ ]
31
+ }
32
+ ```
33
+
34
+ ## Render contract
35
+
36
+ The health skill prints two lines after the existing checks table:
37
+
38
+ ```
39
+ Skill-length: <total> total | <clean> clean | <warnings> warn (>=100) | <blockers> block (>=250)
40
+ All skills within contract.
41
+ ```
42
+
43
+ If `summary.blockers > 0`, replace the second line with one indented row per
44
+ blocker entry (skills where `level === "block"`):
45
+
46
+ ```
47
+ Skill-length: 70 total | 67 clean | 2 warn (>=100) | 1 block (>=250)
48
+ - <name> (<lines> lines)
49
+ ```
50
+
51
+ ## Thresholds (D-01)
52
+
53
+ - `warn >=100` — skill flagged as advisory; CI emits `::warning::` annotation
54
+ but does not fail the build.
55
+ - `block >=250` — skill flagged as blocker; CI emits `::error::` and fails
56
+ the build via exit code 2.
57
+
58
+ ## Strict description-format (D-02)
59
+
60
+ `STRICT_DESCRIPTION=1` / `--strict-description` is OFF by default. Phase 33
61
+ will graduate the strict `<what>. Use when <triggers>.` regex from advisory
62
+ to hard-block based on A/B evidence at
63
+ `.design/research/description-format-ab.md`.
64
+
65
+ ## Cross-link from health
66
+
67
+ - `skills/health/SKILL.md` — emits the report after the main checks table.
68
+ - `scripts/validate-skill-length.cjs` — provides the JSON.
69
+ - `tests/phase-28.5-baseline.test.cjs` — locks the post-rework distribution.
@@ -269,3 +269,87 @@ For each NNG heuristic (H-01 through H-10), rate 0–4:
269
269
  - 75–89: Good, minor issues
270
270
  - 60–74: Acceptable, improvement needed
271
271
  - <60: Significant UX problems, redesign required
272
+
273
+ ---
274
+
275
+ ## Dependency-cycle detection
276
+
277
+ Algorithm consumed by `skills/analyze-dependencies/SKILL.md` Analysis 4. Detects cycles
278
+ in the `@`-reference graph (File A → File B → File A) by DFS with path-tracking.
279
+
280
+ **Input:** adjacency map `{from: [to, ...]}` built from `.design/intel/graph.json#edges`.
281
+
282
+ **Algorithm:**
283
+
284
+ ```text
285
+ visited = {}; path = []; cycles = []
286
+ function dfs(node):
287
+ if node in path:
288
+ cycle_start = path.index(node)
289
+ cycles.append(path[cycle_start:] + [node])
290
+ return
291
+ if node in visited: return
292
+ visited.add(node); path.append(node)
293
+ for neighbor in adjacency[node]: dfs(neighbor)
294
+ path.pop()
295
+ ```
296
+
297
+ **Bias notes:** the DFS visits each node at most once per traversal, so duplicate cycles
298
+ across multiple entry points are deduped by the `visited` guard. The `path.index(node)`
299
+ slice captures only the cycle suffix; nodes before the entry point are not part of the
300
+ cycle. Pre-existing acyclic chains stay invisible — only back-edges surface.
301
+
302
+ ---
303
+
304
+ ## Version-cadence
305
+
306
+ Reference for `skills/check-update/SKILL.md` and `skills/complete-cycle/SKILL.md` when
307
+ comparing versions across releases.
308
+
309
+ **Delta classification** (consumer of `.design/update-cache.json#delta`):
310
+
311
+ | Delta | Meaning | When |
312
+ |-------|---------|------|
313
+ | `major` | Breaking change | `current.major < latest.major` |
314
+ | `minor` | New features | Major same; `current.minor < latest.minor` |
315
+ | `patch` | Bug fixes only | Major + minor same; `current.patch < latest.patch` |
316
+ | `off-cadence` | Insertion-style version (`.5`, `.6`, `.7`) | Listed in `OFF_CADENCE_VERSIONS` in `tests/semver-compare.test.cjs` |
317
+ | `none` | Same version | All segments equal |
318
+
319
+ **Off-cadence handling:** versions like `v1.14.5`, `v1.27.5`, `v1.28.5` slot between regular
320
+ minor bumps. They register via `OFF_CADENCE_VERSIONS.add('<version>')` in
321
+ `tests/semver-compare.test.cjs`. The semver-compare test treats them as if they had a
322
+ canonical predecessor (`v1.28.5` after `v1.28.0`, not `v1.28.4`).
323
+
324
+ **Preview-suffix trap:** model IDs with `-preview` (`gpt-5-preview` vs `gpt-5`) drift — today's
325
+ preview is tomorrow's GA. Tooling MUST store the parent name in `provider_model_id` and treat
326
+ the suffix as decorative. See `./peer-cli-protocol.md` for the peer-CLI-side context.
327
+
328
+ ---
329
+
330
+ ## Optimization rules
331
+
332
+ Reference catalog for `skills/optimize/SKILL.md`. Four deterministic rules; rule-based
333
+ analysis applied in order. Each rule inspects per-agent aggregates from
334
+ `.design/agent-metrics.json` and emits zero or more rows to the recommendations table.
335
+
336
+ **R1 — Low cache hit rate.**
337
+ - *Condition:* `total_spawns >= --min-spawns` AND `cache_hit_rate < 0.20`.
338
+ - *Emit:* `"Consider batching tasks for agent {agent} — cache hit rate is {rate*100}%. Investigate cache-aligned ordering (see reference/shared-preamble.md) and whether input paths can be normalized."`
339
+ - *Proposed action:* Batch similar tasks; confirm shared-preamble import ordering.
340
+
341
+ **R2 — Expensive and rarely lazy-skipped.**
342
+ - *Condition:* `total_cost_usd > 0.50` AND `lazy_skip_rate < 0.10`.
343
+ - *Emit:* `"Agent {agent} is expensive (${cost}) and rarely skipped ({rate*100}% lazy-skip). Consider adding a lazy gate heuristic at agents/{agent}-gate.md (see plan 10.1-04 pattern)."`
344
+ - *Proposed action:* Add lazy-gate agent.
345
+
346
+ **R3 — Tier override churn.**
347
+ - *Condition:* Multiple telemetry rows show recorded `tier` differing from frontmatter `default-tier` (e.g., frontmatter `opus` but measured rows consistently `haiku` from budget.json override or soft-threshold downgrade).
348
+ - *Emit:* `"Tier override churn detected for {agent}: frontmatter says {frontmatter-tier} but measured tier is {measured-tier} in {N} of last {M} rows. Consider updating frontmatter default-tier or removing the budget.json override."`
349
+ - *Proposed action:* Update frontmatter default-tier OR prune budget.json `tier_overrides` entry.
350
+
351
+ **R4 — Typical duration drift.**
352
+ - *Condition:* Measured `typical_duration_seconds` (computed as avg wall-clock between paired spawn/complete rows; fall back to frontmatter when pairing unavailable) differs from frontmatter `typical-duration-seconds` by more than 50%.
353
+ - *Emit:* `"Typical duration for {agent} has drifted: frontmatter {old}s vs measured {new}s ({delta_pct}% drift). Update frontmatter typical-duration-seconds: {new}."`
354
+ - *Proposed action:* Edit `agents/{agent}.md` frontmatter.
355
+ - *Note:* v1 only computes wall-clock duration when telemetry ledger carries both spawn AND complete rows with matching correlation IDs. If unavailable, R4 flags "insufficient data" rather than emitting a false proposal. Phase 11 reflector can add a PostToolUse writer.