@hegemonart/get-design-done 1.28.0 → 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 (98) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +78 -0
  4. package/SKILL.md +1 -1
  5. package/hooks/gdd-decision-injector.js +149 -3
  6. package/package.json +1 -1
  7. package/reference/adr-format.md +96 -0
  8. package/reference/apply-reflections-procedure.md +68 -0
  9. package/reference/architecture-vocabulary.md +102 -0
  10. package/reference/cache-policy.md +126 -0
  11. package/reference/compare-rubric.md +171 -0
  12. package/reference/connections-onboarding.md +417 -0
  13. package/reference/context-md-format.md +106 -0
  14. package/reference/darkmode-audit-procedure.md +258 -0
  15. package/reference/debug-feedback-loops.md +119 -0
  16. package/reference/design-procedure.md +304 -0
  17. package/reference/discover-procedure.md +204 -0
  18. package/reference/explore-procedure.md +267 -0
  19. package/reference/health-mcp-detection.md +44 -0
  20. package/reference/health-skill-length-report.md +69 -0
  21. package/reference/heuristics.md +84 -0
  22. package/reference/milestone-completeness-rubric.md +87 -0
  23. package/reference/peer-cli-protocol.md +161 -0
  24. package/reference/plan-procedure.md +278 -0
  25. package/reference/registry.json +169 -1
  26. package/reference/registry.schema.json +1 -1
  27. package/reference/router-rules.md +84 -0
  28. package/reference/scan-procedure.md +731 -0
  29. package/reference/shared-preamble.md +78 -6
  30. package/reference/skill-authoring-contract.md +128 -0
  31. package/reference/start-procedure.md +115 -0
  32. package/reference/style-doc-procedure.md +150 -0
  33. package/reference/threat-modeling.md +101 -0
  34. package/reference/verify-procedure.md +512 -0
  35. package/scripts/validate-skill-length.cjs +283 -0
  36. package/skills/add-backlog/SKILL.md +1 -0
  37. package/skills/analyze-dependencies/SKILL.md +33 -122
  38. package/skills/apply-reflections/SKILL.md +1 -40
  39. package/skills/audit/SKILL.md +3 -1
  40. package/skills/bandit-status/SKILL.md +31 -66
  41. package/skills/benchmark/SKILL.md +15 -55
  42. package/skills/brief/SKILL.md +12 -1
  43. package/skills/cache-manager/SKILL.md +3 -57
  44. package/skills/check-update/SKILL.md +38 -75
  45. package/skills/compare/SKILL.md +29 -269
  46. package/skills/complete-cycle/SKILL.md +1 -1
  47. package/skills/connections/SKILL.md +21 -427
  48. package/skills/continue/SKILL.md +1 -0
  49. package/skills/darkmode/SKILL.md +32 -287
  50. package/skills/debug/SKILL.md +11 -8
  51. package/skills/design/SKILL.md +27 -245
  52. package/skills/discover/SKILL.md +26 -133
  53. package/skills/discuss/SKILL.md +18 -2
  54. package/skills/explore/SKILL.md +40 -205
  55. package/skills/fast/SKILL.md +1 -0
  56. package/skills/figma-write/SKILL.md +2 -2
  57. package/skills/health/SKILL.md +11 -33
  58. package/skills/help/SKILL.md +1 -0
  59. package/skills/list-assumptions/SKILL.md +1 -0
  60. package/skills/map/SKILL.md +8 -31
  61. package/skills/new-cycle/SKILL.md +3 -1
  62. package/skills/next/SKILL.md +1 -0
  63. package/skills/note/SKILL.md +1 -0
  64. package/skills/optimize/SKILL.md +21 -44
  65. package/skills/pause/SKILL.md +1 -0
  66. package/skills/peer-cli-add/SKILL.md +26 -108
  67. package/skills/peer-cli-customize/SKILL.md +22 -42
  68. package/skills/peers/SKILL.md +33 -57
  69. package/skills/plan/SKILL.md +33 -220
  70. package/skills/plant-seed/SKILL.md +1 -0
  71. package/skills/pr-branch/SKILL.md +1 -0
  72. package/skills/progress/SKILL.md +1 -7
  73. package/skills/quality-gate/SKILL.md +34 -166
  74. package/skills/quick/SKILL.md +1 -0
  75. package/skills/reapply-patches/SKILL.md +1 -0
  76. package/skills/recall/SKILL.md +1 -0
  77. package/skills/resume/SKILL.md +1 -0
  78. package/skills/review-backlog/SKILL.md +1 -0
  79. package/skills/router/SKILL.md +3 -59
  80. package/skills/scan/SKILL.md +36 -675
  81. package/skills/settings/SKILL.md +1 -0
  82. package/skills/ship/SKILL.md +1 -0
  83. package/skills/sketch/SKILL.md +1 -1
  84. package/skills/sketch-wrap-up/SKILL.md +13 -54
  85. package/skills/spike/SKILL.md +1 -1
  86. package/skills/spike-wrap-up/SKILL.md +12 -46
  87. package/skills/start/SKILL.md +13 -112
  88. package/skills/stats/SKILL.md +1 -0
  89. package/skills/style/SKILL.md +18 -140
  90. package/skills/synthesize/SKILL.md +1 -0
  91. package/skills/timeline/SKILL.md +1 -0
  92. package/skills/todo/SKILL.md +1 -0
  93. package/skills/turn-closeout/SKILL.md +36 -56
  94. package/skills/undo/SKILL.md +1 -0
  95. package/skills/update/SKILL.md +1 -0
  96. package/skills/verify/SKILL.md +42 -457
  97. package/skills/warm-cache/SKILL.md +3 -35
  98. package/skills/zoom-out/SKILL.md +26 -0
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: cache-policy
3
+ type: heuristic
4
+ version: 1.0.0
5
+ phase: 28.5
6
+ tags: [cache, layer-a, layer-b, sha-256, ttl, warm-cache, cache-manager, anthropic-prompt-cache]
7
+ last_updated: 2026-05-18
8
+ ---
9
+
10
+ # Cache Policy (Layer A + Layer B)
11
+
12
+ Extracted from `skills/cache-manager/SKILL.md` and `skills/warm-cache/SKILL.md` per Phase 28.5
13
+ D-10 (extract-then-link, never delete content). The two skills keep their orchestration
14
+ contracts and step-by-step flows; the deeper algorithmic and operational detail moves here
15
+ so the SKILLs stay under the 100-line cap.
16
+
17
+ The two layers (D-08):
18
+
19
+ - **Layer A** — Anthropic's 5-min prompt cache (owned by `warm-cache`). Keyed on shared-preamble-first prompt prefix. No project-local state.
20
+ - **Layer B** — explicit `.design/cache-manifest.json` (owned by `gdd-cache-manager`). Keyed on deterministic SHA-256 of `(agent-path, sorted-input-file-paths, input-content-hashes)`. Per-repo state.
21
+
22
+ ## Deterministic Input-Hash Algorithm (Layer B)
23
+
24
+ The canonical reference implementation (the single source of truth; `hooks/budget-enforcer.js` imports the same primitive via a shared helper):
25
+
26
+ ```js
27
+ // Deterministic cache-key primitive (reference implementation)
28
+ // hash = SHA-256(
29
+ // agent_path + "\n" +
30
+ // sorted(input_file_paths).join("\n") + "\n" +
31
+ // sorted(input_file_paths)
32
+ // .map(p => sha256(readFileSync(p, "utf8")))
33
+ // .join("\n")
34
+ // )
35
+ const crypto = require('crypto');
36
+ const fs = require('fs');
37
+
38
+ function sha256Hex(s) {
39
+ return crypto.createHash('sha256').update(s, 'utf8').digest('hex');
40
+ }
41
+
42
+ function computeInputHash(agentPath, inputFilePaths) {
43
+ const sortedPaths = [...inputFilePaths].sort();
44
+ const contentHashes = sortedPaths.map(p => {
45
+ try { return sha256Hex(fs.readFileSync(p, 'utf8')); }
46
+ catch { return 'MISSING'; }
47
+ });
48
+ const canonical = [
49
+ agentPath,
50
+ sortedPaths.join('\n'),
51
+ contentHashes.join('\n')
52
+ ].join('\n');
53
+ return sha256Hex(canonical);
54
+ }
55
+ ```
56
+
57
+ Notes for maintainers:
58
+
59
+ - **Sorted-unique paths** — ordering must be stable; caller is expected to de-duplicate. If the same path appears twice the hash still matches as long as caller pre-dedupes before invoking.
60
+ - **Missing file** — the string `MISSING` is used in place of the content hash so a missing dependency doesn't silently collide with an empty file (empty file's SHA-256 is `e3b0c44...`). Missing-file hashes naturally miss on the next read because the real file has a different content hash.
61
+ - **Agent-path** — agents changing their own body (role, tools, output contract) invalidate all their cache entries automatically because the agent file's content is not hashed; but the `agent_path` string is concatenated. Upgrading agents between versions naturally busts the cache only when the path changes. Plan 10.1-04 (shared preamble extraction) is expected to slightly adjust agent bodies — consumers should treat the first post-10.1 run as a full cache miss, which is the intended behavior.
62
+
63
+ ## Manifest Shape (Layer B)
64
+
65
+ See `./config-schema.md` §.design/cache-manifest.json Schema (Phase 10.1) for the authoritative schema. Keyed object, flat SHA-256 hex keys. Example:
66
+
67
+ ```json
68
+ {
69
+ "a3f1e...": {
70
+ "agent": "design-verifier",
71
+ "result": "<base64-or-path>",
72
+ "written_at": "2026-04-18T12:00:00Z",
73
+ "ttl_seconds": 3600,
74
+ "expires_at": "2026-04-18T13:00:00Z"
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## TTL Semantics (Layer B)
80
+
81
+ - Default `ttl_seconds` = `.design/budget.json.cache_ttl_seconds` = 3600s (1 hour) per D-10.
82
+ - `expires_at` is computed at write time and stored; readers do not recompute.
83
+ - Lazy cleanup: stale entries are not actively deleted on read (overhead for no benefit in normal operation). A separate reaper is optional and out of v1 scope.
84
+
85
+ ## Concrete Warm-Cache Command Examples (Layer A)
86
+
87
+ Full invocation:
88
+
89
+ ```
90
+ $ /gdd:warm-cache
91
+
92
+ Warming Anthropic prompt cache for 14 agents (5 min TTL)...
93
+ [1/14] design-verifier ... ok (0.3s)
94
+ [2/14] design-planner ... ok (0.3s)
95
+ [3/14] design-integration-checker ... ok (0.3s)
96
+ ...
97
+ [14/14] design-reflector ... ok (0.3s)
98
+
99
+ ## Warm-cache complete
100
+ - Agents warmed: 14
101
+ - Skipped (no shared preamble import): 3 (agents/README.md not an agent; 2 agents not yet migrated to shared preamble)
102
+ - Duration: 4.2s
103
+ - Next 5 min: repeated spawns of these agents pay cached_input_per_1m rate
104
+ ```
105
+
106
+ Filtered invocation:
107
+
108
+ ```
109
+ $ /gdd:warm-cache --agents design-verifier,design-planner
110
+
111
+ Warming Anthropic prompt cache for 2 agents (filtered from 14)...
112
+ [1/2] design-verifier ... ok (0.3s)
113
+ [2/2] design-planner ... ok (0.3s)
114
+
115
+ ## Warm-cache complete
116
+ - Agents warmed: 2
117
+ - Filtered out by --agents: 12
118
+ - Duration: 0.7s
119
+ ```
120
+
121
+ ## Cost Model (Layer A)
122
+
123
+ - Each no-op Haiku ping: ~50 input tokens (shared preamble + "No-op warm: acknowledge..." system+user) + ~5 output tokens ("ok").
124
+ - At Haiku rates (`./model-prices.md`): `(50 / 1e6) * 1.00 + (5 / 1e6) * 5.00 = $0.00005 + $0.000025 = $0.000075` per agent.
125
+ - 14 agents × $0.000075 = **$0.00105** total for a full warm-cache invocation.
126
+ - Payback: a single subsequent Opus spawn with 40k cached input tokens saves `(40000/1e6) * (15.00 - 1.50) = $0.54`. Warm-cache pays for itself ~500× over on the first repeated planner spawn.
@@ -0,0 +1,171 @@
1
+ ---
2
+ name: compare-rubric
3
+ type: heuristic
4
+ version: 1.0.0
5
+ phase: 28.5
6
+ tags: [compare, delta, drift, scoring, rubric, extracted]
7
+ last_updated: 2026-05-18
8
+ ---
9
+
10
+ Source: extracted from `skills/compare/SKILL.md` (Phase 28.5 rework — D-10 extract-then-link).
11
+ The skill's load-bearing workflow stays in `../skills/compare/SKILL.md`; this file holds the
12
+ delta-computation methodology, anti-pattern set arithmetic, drift-detection coverage map,
13
+ and the `COMPARE-REPORT.md` template the skill writes.
14
+
15
+ # Compare Rubric — Baseline vs Result Delta Methodology
16
+
17
+ Detailed methodology for the `get-design-done:compare` standalone command — companion to
18
+ `../skills/compare/SKILL.md`. Read this file when executing a specific compare step (score
19
+ delta math, anti-pattern set arithmetic, drift coverage map, report layout). The SKILL.md
20
+ keeps the load-bearing pre-flight checks + step routing; this file holds the deep methodology.
21
+
22
+ See `./shared-preamble.md#output-contract-reminders` for the per-skill output discipline and
23
+ `./audit-scoring.md` for the 0–10 category-scoring rubric the delta is computed against.
24
+
25
+ ---
26
+
27
+ ## Step 1 — Parse Category Scores
28
+
29
+ **Extract baseline scores from `.design/DESIGN.md`:** locate the category score table (rows like `| Accessibility | 6/10 | ... |`). Parse each row: extract category name + numeric score. Store as `baseline_scores` map.
30
+
31
+ **Extract result scores from `.design/DESIGN-VERIFICATION.md`:** locate the same table in the Phase 1 output section. Store as `result_scores` map.
32
+
33
+ **Normalize category names:**
34
+ - Strip leading/trailing whitespace.
35
+ - Apply title-case normalization (e.g., `anti-patterns` → `Anti-Patterns`).
36
+ - Match categories case-insensitively between the two tables.
37
+
38
+ **Unmatched categories:**
39
+ - Baseline-only → flag `[UNMATCHED-BASELINE]`, exclude from score delta.
40
+ - Result-only → flag `[UNMATCHED-RESULT]`, exclude from score delta.
41
+ - Report all unmatched categories in the Notes section. Do NOT silently paper over mismatches.
42
+
43
+ ## Step 2 — Compute Score Delta (COMP-03)
44
+
45
+ For each matched category: `delta = result_scores[category] - baseline_scores[category]`.
46
+
47
+ Classify:
48
+ - `improvement` — delta > 0
49
+ - `no_change` — delta == 0
50
+ - `regression` — delta < 0
51
+
52
+ Record per category: name, baseline score, result score, signed delta, classification. Collect regressed categories for drift detection in Step 5.
53
+
54
+ ## Step 3 — Anti-Pattern Delta
55
+
56
+ Enumerate anti-patterns in both files (entries identified by BAN-*, SLOP-*, or labeled as anti-patterns). Collect identifiers or descriptions as sets.
57
+
58
+ Compute set arithmetic:
59
+
60
+ ```
61
+ resolved = baseline_anti_patterns - result_anti_patterns
62
+ (present in baseline, absent in result — fixed)
63
+
64
+ new = result_anti_patterns - baseline_anti_patterns
65
+ (absent in baseline, present in result — introduced)
66
+
67
+ unchanged = intersection of both sets
68
+ (still present in both)
69
+ ```
70
+
71
+ Report all three groups in the output report.
72
+
73
+ ## Step 4 — Must-Have Pass/Fail Change
74
+
75
+ **Skip condition:** if `.design/DESIGN-CONTEXT.md` is absent → emit note and skip this section.
76
+
77
+ Read `<must_haves>` from `DESIGN-CONTEXT.md` (each must-have has ID + description). Read pass/fail status from `DESIGN-VERIFICATION.md` (must-have status table). For each must-have: record `pass`, `fail`, or `not-evaluated`. If `DESIGN.md` contained a prior must-have status section, compute the change (`pass→fail`, `fail→pass`); otherwise report current status only.
78
+
79
+ ## Step 5 — Design Drift Detection (COMP-04)
80
+
81
+ **Skip condition:** if `.design/DESIGN-PLAN.md` is absent → emit `"Drift detection skipped: DESIGN-PLAN.md not found."` in the Drift section.
82
+
83
+ **Coverage map:** read `DESIGN-PLAN.md` and extract the `Type:` field from each task. Build a map of which design categories have at least one task of matching Type:
84
+
85
+ ```
86
+ Type: accessibility → covers "Accessibility" category
87
+ Type: color → covers "Color" category
88
+ Type: typography → covers "Typography" category
89
+ Type: visual-hierarchy → covers "Visual Hierarchy" category
90
+ ```
91
+
92
+ Category-to-Type matching is case-insensitive and normalized.
93
+
94
+ **Drift check:** for each category classified as `regression` in Step 2: if category NOT in coverage_map → emit `DRIFT: [category] regressed from <baseline> to <result> without a design task of Type:<category>`.
95
+
96
+ Emit `"No drift detected. All regressed categories are covered by tasks in DESIGN-PLAN.md."` if all regressed categories are covered. Emit `"No drift detected. No score regressions found."` if no regressions in Step 2.
97
+
98
+ ## Step 5B — Screenshot Delta (when preview: available)
99
+
100
+ Check `preview` status from `.design/STATE.md <connections>` (written by the probe at stage entry — see `./shared-preamble.md#connection-handshake-summary`).
101
+
102
+ **If `preview: available`:**
103
+
104
+ 1. `preview_start` if no session is already running.
105
+ 2. For each route inferred from `DESIGN-PLAN.md` tasks or `src/app/` / `src/pages/` file structure:
106
+ a. `preview_navigate` to route URL (e.g., `http://localhost:3000/<route>`).
107
+ b. `preview_screenshot` → save to `.design/screenshots/before/<route>.png` (only if a prior baseline exists at this path) and `.design/screenshots/after/<route>.png` (current render).
108
+ c. Record reference paths (NOT base64) for embedding in the `## Screenshot Delta` section.
109
+ 3. `preview_stop` when all routes are captured.
110
+
111
+ **If `preview: unavailable` or `preview: not_configured`:** emit exactly `Screenshot delta skipped — preview not configured.`
112
+
113
+ ## Step 6 — COMPARE-REPORT.md Template
114
+
115
+ Output path: `.design/COMPARE-REPORT.md`. This file MUST NOT be written to any pipeline-reserved path.
116
+
117
+ ```markdown
118
+ # Compare Report: Baseline vs Result
119
+
120
+ **Generated:** <ISO 8601 date>
121
+ **Baseline:** .design/DESIGN.md
122
+ **Result:** .design/DESIGN-VERIFICATION.md
123
+
124
+ ## Score Delta by Category
125
+
126
+ | Category | Baseline | Result | Delta | Status |
127
+ |----------|----------|--------|-------|--------|
128
+ | Accessibility | 6 | 8 | +2 | improvement |
129
+ | Visual Hierarchy | 5 | 5 | 0 | no_change |
130
+ | Anti-Patterns | 4 | 3 | -1 | regression |
131
+
132
+ ## Anti-Pattern Delta
133
+
134
+ **Resolved** (present in baseline, absent in result):
135
+ - <anti-pattern id or description>
136
+
137
+ **New** (absent in baseline, present in result):
138
+ - <anti-pattern id or description>
139
+
140
+ **Unchanged:**
141
+ - <anti-pattern id or description>
142
+
143
+ ## Must-Have Status
144
+
145
+ | Must-Have | Status |
146
+ |-----------|--------|
147
+ | <id / description> | pass |
148
+ | <id / description> | fail |
149
+ | <id / description> | not-evaluated |
150
+
151
+ ## Design Drift
152
+
153
+ <One of: "No drift detected. ..." | "DRIFT: [Category] regressed ..." | "Drift detection skipped: DESIGN-PLAN.md not found.">
154
+
155
+ ## Screenshot Delta
156
+
157
+ <Per-route screenshot pairs OR "Screenshot delta skipped — preview not configured.">
158
+
159
+ ## Notes
160
+
161
+ Scope: delta between two existing artifacts (.design/DESIGN.md → .design/DESIGN-VERIFICATION.md).
162
+ No snapshot mechanism — multi-snapshot compare deferred to V2-06.
163
+ This report does not modify DESIGN.md, DESIGN-VERIFICATION.md, or any other pipeline artifact.
164
+ <List any UNMATCHED-BASELINE or UNMATCHED-RESULT categories here, if any.>
165
+ ```
166
+
167
+ If a section has no items (e.g., no anti-patterns in baseline), write "None."
168
+
169
+ ---
170
+
171
+ *Imported by: `../skills/compare/SKILL.md`. Maintained as part of Phase 28.5 (Bucket 2 rework — D-10).*