@harness-engineering/cli 2.6.1 → 2.7.1

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 (156) hide show
  1. package/dist/agents/skills/claude-code/align-design-system/SKILL.md +174 -0
  2. package/dist/agents/skills/claude-code/align-design-system/skill.yaml +57 -0
  3. package/dist/agents/skills/claude-code/audit-brand-compliance/SKILL.md +189 -0
  4. package/dist/agents/skills/claude-code/audit-brand-compliance/skill.yaml +50 -0
  5. package/dist/agents/skills/claude-code/audit-component-anatomy/SKILL.md +181 -0
  6. package/dist/agents/skills/claude-code/audit-component-anatomy/skill.yaml +51 -0
  7. package/dist/agents/skills/claude-code/copy-craft/SKILL.md +192 -0
  8. package/dist/agents/skills/claude-code/copy-craft/skill.yaml +52 -0
  9. package/dist/agents/skills/claude-code/detect-design-drift/SKILL.md +139 -0
  10. package/dist/agents/skills/claude-code/detect-design-drift/skill.yaml +50 -0
  11. package/dist/agents/skills/claude-code/harness-accessibility/SKILL.md +10 -0
  12. package/dist/agents/skills/claude-code/harness-design-craft/SKILL.md +212 -0
  13. package/dist/agents/skills/claude-code/harness-design-craft/skill.yaml +57 -0
  14. package/dist/agents/skills/claude-code/harness-design-pipeline/SKILL.md +266 -0
  15. package/dist/agents/skills/claude-code/harness-design-pipeline/skill.yaml +70 -0
  16. package/dist/agents/skills/claude-code/knowledge-craft/SKILL.md +180 -0
  17. package/dist/agents/skills/claude-code/knowledge-craft/skill.yaml +49 -0
  18. package/dist/agents/skills/claude-code/naming-craft/SKILL.md +244 -0
  19. package/dist/agents/skills/claude-code/naming-craft/skill.yaml +51 -0
  20. package/dist/agents/skills/claude-code/security-craft/SKILL.md +205 -0
  21. package/dist/agents/skills/claude-code/security-craft/skill.yaml +58 -0
  22. package/dist/agents/skills/claude-code/spec-craft/SKILL.md +184 -0
  23. package/dist/agents/skills/claude-code/spec-craft/skill.yaml +55 -0
  24. package/dist/agents/skills/claude-code/test-craft/SKILL.md +212 -0
  25. package/dist/agents/skills/claude-code/test-craft/skill.yaml +58 -0
  26. package/dist/agents/skills/codex/align-design-system/SKILL.md +174 -0
  27. package/dist/agents/skills/codex/align-design-system/skill.yaml +57 -0
  28. package/dist/agents/skills/codex/audit-brand-compliance/SKILL.md +189 -0
  29. package/dist/agents/skills/codex/audit-brand-compliance/skill.yaml +50 -0
  30. package/dist/agents/skills/codex/audit-component-anatomy/SKILL.md +181 -0
  31. package/dist/agents/skills/codex/audit-component-anatomy/skill.yaml +51 -0
  32. package/dist/agents/skills/codex/copy-craft/SKILL.md +192 -0
  33. package/dist/agents/skills/codex/copy-craft/skill.yaml +52 -0
  34. package/dist/agents/skills/codex/detect-design-drift/SKILL.md +139 -0
  35. package/dist/agents/skills/codex/detect-design-drift/skill.yaml +50 -0
  36. package/dist/agents/skills/codex/harness-accessibility/SKILL.md +10 -0
  37. package/dist/agents/skills/codex/harness-design-craft/SKILL.md +212 -0
  38. package/dist/agents/skills/codex/harness-design-craft/skill.yaml +57 -0
  39. package/dist/agents/skills/codex/harness-design-pipeline/SKILL.md +266 -0
  40. package/dist/agents/skills/codex/harness-design-pipeline/skill.yaml +70 -0
  41. package/dist/agents/skills/codex/knowledge-craft/SKILL.md +180 -0
  42. package/dist/agents/skills/codex/knowledge-craft/skill.yaml +49 -0
  43. package/dist/agents/skills/codex/naming-craft/SKILL.md +244 -0
  44. package/dist/agents/skills/codex/naming-craft/skill.yaml +51 -0
  45. package/dist/agents/skills/codex/security-craft/SKILL.md +205 -0
  46. package/dist/agents/skills/codex/security-craft/skill.yaml +58 -0
  47. package/dist/agents/skills/codex/spec-craft/SKILL.md +184 -0
  48. package/dist/agents/skills/codex/spec-craft/skill.yaml +55 -0
  49. package/dist/agents/skills/codex/test-craft/SKILL.md +212 -0
  50. package/dist/agents/skills/codex/test-craft/skill.yaml +58 -0
  51. package/dist/agents/skills/cursor/align-design-system/SKILL.md +174 -0
  52. package/dist/agents/skills/cursor/align-design-system/skill.yaml +57 -0
  53. package/dist/agents/skills/cursor/audit-brand-compliance/SKILL.md +189 -0
  54. package/dist/agents/skills/cursor/audit-brand-compliance/skill.yaml +50 -0
  55. package/dist/agents/skills/cursor/audit-component-anatomy/SKILL.md +181 -0
  56. package/dist/agents/skills/cursor/audit-component-anatomy/skill.yaml +51 -0
  57. package/dist/agents/skills/cursor/copy-craft/SKILL.md +192 -0
  58. package/dist/agents/skills/cursor/copy-craft/skill.yaml +52 -0
  59. package/dist/agents/skills/cursor/detect-design-drift/SKILL.md +139 -0
  60. package/dist/agents/skills/cursor/detect-design-drift/skill.yaml +50 -0
  61. package/dist/agents/skills/cursor/harness-accessibility/SKILL.md +10 -0
  62. package/dist/agents/skills/cursor/harness-design-craft/SKILL.md +212 -0
  63. package/dist/agents/skills/cursor/harness-design-craft/skill.yaml +57 -0
  64. package/dist/agents/skills/cursor/harness-design-pipeline/SKILL.md +266 -0
  65. package/dist/agents/skills/cursor/harness-design-pipeline/skill.yaml +70 -0
  66. package/dist/agents/skills/cursor/knowledge-craft/SKILL.md +180 -0
  67. package/dist/agents/skills/cursor/knowledge-craft/skill.yaml +49 -0
  68. package/dist/agents/skills/cursor/naming-craft/SKILL.md +244 -0
  69. package/dist/agents/skills/cursor/naming-craft/skill.yaml +51 -0
  70. package/dist/agents/skills/cursor/security-craft/SKILL.md +205 -0
  71. package/dist/agents/skills/cursor/security-craft/skill.yaml +58 -0
  72. package/dist/agents/skills/cursor/spec-craft/SKILL.md +184 -0
  73. package/dist/agents/skills/cursor/spec-craft/skill.yaml +55 -0
  74. package/dist/agents/skills/cursor/test-craft/SKILL.md +212 -0
  75. package/dist/agents/skills/cursor/test-craft/skill.yaml +58 -0
  76. package/dist/agents/skills/gemini-cli/align-design-system/SKILL.md +174 -0
  77. package/dist/agents/skills/gemini-cli/align-design-system/skill.yaml +57 -0
  78. package/dist/agents/skills/gemini-cli/audit-brand-compliance/SKILL.md +189 -0
  79. package/dist/agents/skills/gemini-cli/audit-brand-compliance/skill.yaml +50 -0
  80. package/dist/agents/skills/gemini-cli/audit-component-anatomy/SKILL.md +181 -0
  81. package/dist/agents/skills/gemini-cli/audit-component-anatomy/skill.yaml +51 -0
  82. package/dist/agents/skills/gemini-cli/copy-craft/SKILL.md +192 -0
  83. package/dist/agents/skills/gemini-cli/copy-craft/skill.yaml +52 -0
  84. package/dist/agents/skills/gemini-cli/detect-design-drift/SKILL.md +139 -0
  85. package/dist/agents/skills/gemini-cli/detect-design-drift/skill.yaml +50 -0
  86. package/dist/agents/skills/gemini-cli/harness-accessibility/SKILL.md +10 -0
  87. package/dist/agents/skills/gemini-cli/harness-design-craft/SKILL.md +212 -0
  88. package/dist/agents/skills/gemini-cli/harness-design-craft/skill.yaml +57 -0
  89. package/dist/agents/skills/gemini-cli/harness-design-pipeline/SKILL.md +266 -0
  90. package/dist/agents/skills/gemini-cli/harness-design-pipeline/skill.yaml +70 -0
  91. package/dist/agents/skills/gemini-cli/knowledge-craft/SKILL.md +180 -0
  92. package/dist/agents/skills/gemini-cli/knowledge-craft/skill.yaml +49 -0
  93. package/dist/agents/skills/gemini-cli/naming-craft/SKILL.md +244 -0
  94. package/dist/agents/skills/gemini-cli/naming-craft/skill.yaml +51 -0
  95. package/dist/agents/skills/gemini-cli/security-craft/SKILL.md +205 -0
  96. package/dist/agents/skills/gemini-cli/security-craft/skill.yaml +58 -0
  97. package/dist/agents/skills/gemini-cli/spec-craft/SKILL.md +184 -0
  98. package/dist/agents/skills/gemini-cli/spec-craft/skill.yaml +55 -0
  99. package/dist/agents/skills/gemini-cli/test-craft/SKILL.md +212 -0
  100. package/dist/agents/skills/gemini-cli/test-craft/skill.yaml +58 -0
  101. package/dist/{agents-md-2JUQ4FE2.js → agents-md-FKMKH6ZF.js} +4 -4
  102. package/dist/{analyzer-VY6DJVOU-4AHIJLNS.js → analyzer-H3AHBFSL-KPOPJYRB.js} +8 -8
  103. package/dist/{architecture-CXAVNB5X.js → architecture-LUR2I67H.js} +6 -6
  104. package/dist/{assess-project-M626SSPN.js → assess-project-OJWECOP2.js} +2 -1
  105. package/dist/bin/harness-mcp.js +17 -17
  106. package/dist/bin/harness.js +27 -27
  107. package/dist/{check-phase-gate-XMU6LLUQ.js → check-phase-gate-HS5KYLRO.js} +5 -5
  108. package/dist/{chunk-5XLLIYYL.js → chunk-6UHDQP2N.js} +1 -1
  109. package/dist/{chunk-I6K43QQS.js → chunk-7AF6C5GE.js} +3 -3
  110. package/dist/{chunk-372MGNTI.js → chunk-7PLIWP7U.js} +6899 -133
  111. package/dist/{chunk-VUCGB2KH.js → chunk-B2VAYLYI.js} +1 -1
  112. package/dist/{chunk-HFOB2MPQ.js → chunk-CZPOPMMI.js} +3 -3
  113. package/dist/{chunk-43M3RLFQ.js → chunk-FC4JPM6W.js} +2 -2
  114. package/dist/{chunk-6AX6R3LM.js → chunk-FEKBXX2J.js} +9 -9
  115. package/dist/{chunk-VTTNIZJL.js → chunk-FXZI6NJ2.js} +131 -6
  116. package/dist/{chunk-5JNSFYZU.js → chunk-GGSNWH7P.js} +6 -6
  117. package/dist/{chunk-BCFDGOMA.js → chunk-H2ZJOJ7A.js} +81 -1
  118. package/dist/{chunk-PFZEADQM.js → chunk-INBTDBV2.js} +79 -2
  119. package/dist/{chunk-Q6ZR2L6Q.js → chunk-KN3EMDZ5.js} +2 -2
  120. package/dist/{chunk-JFZOWO7D.js → chunk-LECXPXS3.js} +1 -1
  121. package/dist/{chunk-CQOMVZDC.js → chunk-LGYXR2KZ.js} +2237 -604
  122. package/dist/{chunk-QOKMDDBJ.js → chunk-LYIPI2SJ.js} +6 -6
  123. package/dist/{chunk-L5BCZ5XS.js → chunk-N5NSSLMU.js} +1 -1
  124. package/dist/{chunk-GWE5LL3R.js → chunk-NIVWM7OW.js} +10 -10
  125. package/dist/{chunk-24KCOJJG.js → chunk-O2ASYKA6.js} +1 -1
  126. package/dist/{chunk-K246XQ2L.js → chunk-PTHX545Q.js} +1 -1
  127. package/dist/{chunk-EPUKTTJZ.js → chunk-RC3OI5NK.js} +5 -1
  128. package/dist/{chunk-YP7I25SL.js → chunk-RJ2WEES5.js} +1 -1
  129. package/dist/{chunk-5FDBXUFW.js → chunk-TIH53QXY.js} +1 -1
  130. package/dist/{chunk-OA6SWTU4.js → chunk-VI4IS55S.js} +11 -8
  131. package/dist/{chunk-GWF2OILZ.js → chunk-VSIRUZQP.js} +1 -1
  132. package/dist/{chunk-YYRQCQPZ.js → chunk-WZY5U6NS.js} +178 -109
  133. package/dist/{chunk-SZEFU6XC.js → chunk-Y4T6ENKQ.js} +9 -9
  134. package/dist/{chunk-HMW3VKUF.js → chunk-Z3TMCCZB.js} +10 -10
  135. package/dist/{ci-workflow-3JNDZQYD.js → ci-workflow-MDSTHJOY.js} +4 -4
  136. package/dist/{dist-OHDQBTSO.js → dist-72ID44UE.js} +3 -3
  137. package/dist/{dist-QPWXPCPL.js → dist-R3TOOPJ7.js} +1 -1
  138. package/dist/{docs-5RYMDHN3.js → docs-2RFOJ6XY.js} +6 -6
  139. package/dist/{engine-GKGT5ULT.js → engine-BSFKOGPN.js} +4 -4
  140. package/dist/{entropy-DQTAPSSE.js → entropy-3UX6644G.js} +5 -5
  141. package/dist/{feedback-WH6XPQJS.js → feedback-CVCFYND4.js} +2 -2
  142. package/dist/{generate-agent-definitions-SZA4QIHN.js → generate-agent-definitions-HZ3XENWO.js} +5 -5
  143. package/dist/{glob-helper-XE2UGEOV.js → glob-helper-EX4YZKZO.js} +1 -1
  144. package/dist/{graph-loader-EQBOIHFZ.js → graph-loader-EIFEOUVI.js} +1 -1
  145. package/dist/index.d.ts +1012 -12
  146. package/dist/index.js +27 -27
  147. package/dist/{loader-BNKGM23C.js → loader-6RHWU5FH.js} +4 -4
  148. package/dist/{mcp-YKKPWUMH.js → mcp-OYR26JDI.js} +17 -17
  149. package/dist/{performance-54TMJOEU.js → performance-JJMIRXCH.js} +6 -6
  150. package/dist/{review-pipeline-OTDDVPNY.js → review-pipeline-BHQZIXWZ.js} +4 -4
  151. package/dist/{runtime-W5THSNAL.js → runtime-DALTAVTN.js} +4 -4
  152. package/dist/{scan-4PPP6ZXT.js → scan-LYKLM4EQ.js} +1 -1
  153. package/dist/{security-27HW7CYT.js → security-RMLMYFPB.js} +1 -1
  154. package/dist/{validate-QRVCD4GP.js → validate-R7DZRDFK.js} +5 -5
  155. package/dist/{validate-cross-check-BUAGBAPO.js → validate-cross-check-AUUZFNVL.js} +4 -4
  156. package/package.json +8 -7
@@ -0,0 +1,212 @@
1
+ # Harness Design Craft
2
+
3
+ > LLM-judgment-based design ceiling-raiser. Three branchable phases — CRITIQUE finds what's mediocre, POLISH applies high-craft moves, BENCHMARK scores against curated exemplars. The ceiling counterpart to harness-design (declared-intent enforcement, rule-based) and the design-pipeline floor audits.
4
+
5
+ ## When to Use
6
+
7
+ - Reviewing UI for craft elevation opportunities the rule-based skills can't surface ("hierarchy is muddy here," "loading spinner where a content-matched skeleton would fit")
8
+ - After harness-design has captured intent and basic checks pass — go from "consistent" to "stunning"
9
+ - Before launching customer-facing surfaces — visual judgment beyond consistency
10
+ - During design-engineering work — POLISH phase suggests concrete craft moves with before/after sketches
11
+ - For competitive benchmarking — BENCHMARK scores how close you are to Linear / Stripe / Raycast tier
12
+ - When `on_new_feature` fires AND the feature touches design surface
13
+ - NOT for declared-anti-pattern enforcement (use harness-design)
14
+ - NOT for component anatomy completeness (use audit-component-anatomy)
15
+ - NOT for token validation (use harness-design-system)
16
+ - NOT for accessibility (use harness-accessibility)
17
+ - NOT for code generation from scratch (use v0 / bolt.new / Lovable — different tool class)
18
+
19
+ ## Process
20
+
21
+ ### Argument Resolution
22
+
23
+ - `mode`: `"fast"` (code-only LLM, cheap, default) or `"deep"` (rendered + vision-LLM, ceiling-raising, requires playwright + vision-capable model)
24
+ - `phases`: subset of `critique`, `polish`, `benchmark`. Default: all three, sequenced.
25
+ - `autoCapture`: B' upgrade behavior. `"prompt"` (default — offer to chain to harness-design if preconditions missing), `"auto"` (chain without prompting), `"skip"` (run with generic-craft rubrics, no offer).
26
+ - `files`: optional scoping. Default: all components/pages discovered.
27
+
28
+ ### B' Precondition Check (every invocation)
29
+
30
+ Before any phase runs, check four preconditions and offer to fulfill missing ones:
31
+
32
+ | Precondition | Source | If missing |
33
+ | ---------------------------- | ----------------------------------------------- | -------------------------------------------------------------------- |
34
+ | `designMdExists` | `design-system/DESIGN.md` present | Offer to chain to harness-design (INTENT + DIRECTION) |
35
+ | `aestheticIntentDeclared` | DESIGN.md Aesthetic Direction section populated | Offer to chain to harness-design (INTENT) |
36
+ | `tokensExist` | `design-system/tokens.json` present | Note in summary; do not auto-chain (harness-design-system territory) |
37
+ | `componentRegistryPopulated` | DESIGN.md Component Registry section | Note in summary; falls back to export-name resolution |
38
+
39
+ `autoCapture` controls behavior:
40
+
41
+ - `prompt`: emit `upgradeOffer` interaction; pause for user choice
42
+ - `auto`: chain to harness-design transition automatically (for autopilot)
43
+ - `skip`: run with generic-craft rubrics (degrades quality but unblocks first-run)
44
+
45
+ ### Phase: CRITIQUE — Find what is craft-mediocre
46
+
47
+ 1. **Identify targets.** Discover components (or pages, when scoped to pages) to critique. Apply `files` scoping if provided.
48
+
49
+ 2. **Load critique rubrics.** Read from catalog (`catalog/rubrics/`). 10 rubrics in v1 covering: hierarchy clarity, typography craft, motion quality, color confidence, density rhythm, restraint, polish details, copy voice, interaction craft, brand coherence. Filter by `catalog.rubrics` config if set.
50
+
51
+ 3. **For each target × each rubric, run an LLM critique pass:**
52
+ - **Fast mode:** pass source code + rubric prompt + AestheticIntent (if present) to text LLM
53
+ - **Deep mode:** render via playwright at three viewports (1440/768/375), pass screenshots + source + rubric prompt + AestheticIntent to vision-capable LLM
54
+ - Parse response into 3-axis finding: `tier` (foundational/polish/aspirational), `impact` (small/medium/large), `confidence` (high/medium/low — essential for honest LLM output)
55
+
56
+ 4. **Apply harness-design overlap deferral.** Per `design.craft.enabled = true`, when a CRITIQUE finding matches a declared anti-pattern in DESIGN.md, defer to harness-design (suppress this finding) and increment `meta.deferralsToHarnessDesign`.
57
+
58
+ 5. **Compute derived `priority` field** for each finding (tier × impact × confidence-weighted score) for single-axis sorting when needed.
59
+
60
+ ### Phase: POLISH — Apply craft pattern library
61
+
62
+ 1. **Load polish patterns.** Read from catalog (`catalog/patterns/`). 15 patterns in v1 across 5 categories: motion (3), skeleton (3), typography (3), interaction (3), layout (3). Filter by `catalog.patterns` config if set.
63
+
64
+ 2. **For each target × each applicable pattern, evaluate fit:**
65
+ - Match pattern's `applicableTo` criteria (jsx-attribute, css-property, component-type, etc.)
66
+ - LLM judgment: would applying this pattern improve craft here?
67
+ - If yes: produce 3-axis finding with `before` and `after` content (codemod-TODO sketch, not actual edit)
68
+
69
+ 3. **No source modification.** POLISH only emits suggestions with before/after sketches. The user applies via codemod tools or by hand.
70
+
71
+ ### Phase: BENCHMARK — Score against curated exemplars
72
+
73
+ 1. **Load exemplar corpus.** Read from catalog (`catalog/exemplars/`). 50 exemplars in v1 across 5 component types (EmptyState, LoadingState, ErrorState, Modal, Button — 10 each). Filter by `catalog.exemplars` config if set.
74
+
75
+ 2. **For each target component, identify matching exemplars** by component-type tag (e.g., target is an EmptyState → load all 10 EmptyState exemplars).
76
+
77
+ 3. **For each target × matching exemplars, run an LLM benchmark pass:**
78
+ - **Fast mode:** structural comparison (code/markup/declared anatomy vs exemplar's reference markup) — limited but useful as a first signal
79
+ - **Deep mode:** visual comparison via vision-LLM (target screenshot vs exemplar screenshot/URL)
80
+ - Parse response into 5-dim radar: `philosophicalCoherence`, `hierarchy`, `craftExecution`, `function`, `innovation` — each with score (0-100), confidence, notes
81
+ - Compute weighted `overall` score
82
+ - Emit narrative `gaps` (where the target falls short of the best exemplars and why)
83
+
84
+ 4. **Cite exemplars used.** Each `BenchmarkScore` lists `exemplars` (ids) consulted. Increment per-exemplar `citationCount` for measurement.
85
+
86
+ ### Phase: REPORT — Format and persist outputs
87
+
88
+ 1. **Write to graph:** CRITIQUE/POLISH findings → `VIOLATES_CRAFT` edges via extended `DesignConstraintAdapter`. BENCHMARK scores → `CRAFT_SCORE` nodes attached to component nodes. All carry `runId` for sub-project #4 fixpoint detection. Idempotent.
89
+
90
+ 2. **Format markdown report.** Grouped by component, with `CRAFT-*` codes linked to `finding-codes.md` and rubric/pattern/exemplar names linked to their catalog entries. Low-confidence findings visually distinguished (italic or `(low confidence:)` prefix).
91
+
92
+ 3. **Emit summary.** Total findings, breakdown by phase, mode (`fast`/`deep`), LLM cost (`llmCalls.{count, costUsd}`), catalog applied, deferrals to harness-design, precondition state.
93
+
94
+ 4. **Signal feedback.** Append to running aggregate: when the same finding-shape recurs N≥5 times across audits (config: `design.craft.signal.proposalThreshold`), emit a candidate pattern proposal to `.harness/design-craft/proposals/`.
95
+
96
+ ## Harness Integration
97
+
98
+ - **`harness validate`** — Fast-mode CRITIQUE hook (subset of rubrics; opt-in). Findings respect `design.strictness`.
99
+ - **`mcp__harness__design_craft`** — Programmatic API. Consumed by harness check-design verifier (#4) and design-pipeline orchestrator (#5). Phase selector exposed.
100
+ - **`harness-design`** — Soft dependency. B' progressive upgrade chains to it when AestheticIntent missing. Defers declared-anti-pattern findings to it.
101
+ - **`harness-design-system`** — Soft dependency. Token-related polish patterns enriched when tokens exist.
102
+ - **`DesignConstraintAdapter`** — Extended for `CRAFT-*` codes (CRAFT-C* critique, CRAFT-P* polish, CRAFT-B\* benchmark identifiers) + `CRAFT_SCORE` node type.
103
+ - **`packages/intelligence/`** — Wrapped by `llm/provider.ts` for vision-capable LLM calls. May need extension if no vision support today.
104
+
105
+ ## Success Criteria
106
+
107
+ See `docs/changes/design-pipeline/design-craft-elevator/proposal.md` for the full 38 success criteria. Highlights:
108
+
109
+ - Three phases independently invocable via `phases` arg
110
+ - 3-axis output for CRITIQUE/POLISH; 5-dim radar for BENCHMARK
111
+ - Confidence is honest (low-confidence findings emitted, not silently dropped)
112
+ - B' detect-and-offer works (preconditions detected, offer payload emitted, chain to harness-design honored)
113
+ - Seed catalog complete (10 rubrics + 15 patterns + 50 exemplars)
114
+ - Growth infrastructure operational (contribution validation, signal loop, usage measurement)
115
+ - Fast-mode ≤ 30s / 50 files; deep-mode ≤ 3min / 10 components
116
+ - LLM cost tracked per audit
117
+
118
+ ## Examples
119
+
120
+ ### Example: CRITIQUE finds hierarchy muddiness
121
+
122
+ **Input:** A Dashboard.tsx page rendering three CTA buttons, all using the same `variant="primary"`.
123
+
124
+ **Output (3-axis finding):**
125
+
126
+ ```
127
+ CRAFT-C001 [foundational | medium | high] Hierarchy muddy: three buttons compete for primary
128
+ File: src/pages/Dashboard.tsx:88
129
+ Rubric: hierarchy-clarity (rubric-hierarchy-clarity)
130
+ Tier: foundational (this is "fix to be not-broken," not polish)
131
+ Impact: medium (users can still complete tasks, but decision fatigue is real)
132
+ Confidence: high (rule is unambiguous; LLM saw the three buttons + their identical styling)
133
+ Priority: derived → 0.78
134
+ Message: Three primary-variant buttons in the same view: "Save", "Export", "Share".
135
+ No visual signal indicates which is the recommended action. Reduce to one
136
+ primary; demote the others to secondary or ghost variant.
137
+ Cite: rubric "hierarchy-clarity" / source: huashu-design#hierarchy
138
+ ```
139
+
140
+ ### Example: POLISH suggests spring physics
141
+
142
+ **Input:** A Modal.tsx using `transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1)`.
143
+
144
+ **Output (3-axis finding with before/after):**
145
+
146
+ ```
147
+ CRAFT-P001 [polish | medium | high] Spring physics would feel more confident here
148
+ File: src/components/Modal.tsx:42
149
+ Pattern: spring-physics-microinteraction
150
+ Tier: polish (Modal already works; this elevates the feel)
151
+ Impact: medium (users notice modal motion every time)
152
+ Before: transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
153
+ After: transition: transform { duration: spring.medium };
154
+ // stiffness:200 damping:25 for modal entries per emil-design-eng#spring-physics
155
+ Fix kind: codemod-todo (POLISH does not modify source; suggestion only)
156
+ ```
157
+
158
+ ### Example: BENCHMARK against Linear
159
+
160
+ **Input:** A custom EmptyState component for the project's task list.
161
+
162
+ **Output (5-dim radar):**
163
+
164
+ ```
165
+ CRAFT-B001 EmptyState component scored against Linear empty list exemplar
166
+
167
+ philosophicalCoherence: 80 [high] "Restraint aligns with declared minimal aesthetic."
168
+ hierarchy: 65 [medium] "Heading and body OK; action button competes
169
+ with secondary 'Learn more' link."
170
+ craftExecution: 55 [medium] "Generic illustration; Linear uses subtle line art
171
+ matching their monochromatic palette. Missing the
172
+ 'breathing room' Linear gets via 64px vertical padding."
173
+ function: 85 [high] "Action is clear and verb-led."
174
+ innovation: 50 [low] "Standard 4-part anatomy; not differentiated."
175
+
176
+ Overall: 67 [medium confidence]
177
+ Gaps:
178
+ - "Reduce the empty-state to one CTA — the secondary link adds noise"
179
+ - "Replace stock illustration with a custom line art aligned to brand"
180
+ - "Increase top padding from 32px to 56px+ to match the breathing-room pattern"
181
+ Exemplars cited: exemplar-linear-empty-list
182
+ ```
183
+
184
+ ## Gates
185
+
186
+ - **No assertion of "stunning" without LLM judgment.** This skill is LLM-judgment-based; if no LLM provider is configured, halt with explanatory error — do not degrade to rule-based output.
187
+ - **Deep mode requires playwright + vision-capable LLM.** If either is missing, surface to user with the documented fallback path (code-only mode); do not silently degrade.
188
+ - **No autofix.** POLISH emits suggestions only; source files are never modified.
189
+ - **Confidence is honest.** Low-confidence outputs MUST be emitted (with the low-confidence flag) — never silently upgraded.
190
+ - **B' deferral honored.** When `design.craft.enabled = true` and DESIGN.md declares an anti-pattern matching a CRITIQUE finding, defer to harness-design; never double-count.
191
+
192
+ ## Escalation
193
+
194
+ - **When deep mode renders fail (component not reachable via URL).** Emit a "render-unreachable" finding for the affected component, fall back to fast mode for that component, continue the audit. Do not abort.
195
+ - **When the vision-LLM rejects the screenshot (size, content, format).** Log the rejection; downgrade that component's run to fast mode; do not abort.
196
+ - **When LLM cost exceeds the configured per-audit budget.** Halt the audit, emit findings collected so far, report the cost overrun. Do not retry. Config: `design.craft.llm.maxCostUsd` (default unset = no cap).
197
+ - **When the catalog is empty or unloadable.** Halt with explanatory error pointing to `agents/skills/shared/design-knowledge/craft-{rubrics,patterns,exemplars}/`. Do not synthesize findings without the catalog.
198
+ - **When B' detect-and-offer produces an offer the user declines.** Run in generic-craft mode (no AestheticIntent context); note the degraded quality in summary. User can re-invoke with `autoCapture: skip` to suppress future offers.
199
+ - **When the same finding-shape recurs across many audits (signal feedback loop).** Auto-export a candidate pattern proposal to `.harness/design-craft/proposals/` after N≥`design.craft.signal.proposalThreshold` recurrences; require human review before promotion to the catalog.
200
+ - **When a graph operation fails.** Skip graph integration for that run; emit findings to the report only. Log a warning that `VIOLATES_CRAFT` edges + `CRAFT_SCORE` nodes were not persisted.
201
+
202
+ ## Status
203
+
204
+ **v1 — in implementation.** See:
205
+
206
+ - Spec: `docs/changes/design-pipeline/design-craft-elevator/proposal.md`
207
+ - Plan: `docs/changes/design-pipeline/design-craft-elevator/plans/2026-05-23-design-craft-elevator-plan.md`
208
+ - Finding codes: `docs/changes/design-pipeline/design-craft-elevator/finding-codes.md`
209
+ - Contribution guide: `docs/changes/design-pipeline/design-craft-elevator/contribution.md`
210
+ - Growth trajectory: `docs/changes/design-pipeline/design-craft-elevator/growth-trajectory.md`
211
+ - Roadmap entry: `design-pipeline sub-project #6` in `docs/roadmap.md`
212
+ - Prior-art references: `docs/changes/design-pipeline/REFERENCES.md` tier-1 entries #2, #3, #4 (impeccable, emil-design-eng, huashu-design)
@@ -0,0 +1,57 @@
1
+ name: harness-design-craft
2
+ version: "0.1.0"
3
+ description: LLM-judgment-based design ceiling-raiser. CRITIQUE finds what's mediocre, POLISH applies high-craft moves, BENCHMARK scores against curated exemplars. The ceiling counterpart to rule-based audit skills.
4
+ stability: draft
5
+ cognitive_mode: constructive-architect
6
+ triggers:
7
+ - manual
8
+ - on_new_feature
9
+ platforms:
10
+ - claude-code
11
+ tools:
12
+ - Bash
13
+ - Read
14
+ - Write
15
+ - Edit
16
+ - Glob
17
+ - Grep
18
+ cli:
19
+ command: harness skill run harness-design-craft
20
+ args:
21
+ - name: path
22
+ description: Project root path
23
+ required: false
24
+ - name: mode
25
+ description: "fast (code-only LLM critique) or deep (rendered + vision-LLM)"
26
+ required: false
27
+ - name: phases
28
+ description: "Subset of critique,polish,benchmark (comma-separated). Default: all three."
29
+ required: false
30
+ - name: files
31
+ description: Optional glob/path scoping
32
+ required: false
33
+ - name: autoCapture
34
+ description: "B' upgrade behavior: prompt | auto | skip. Default: prompt."
35
+ required: false
36
+ mcp:
37
+ tool: run_skill
38
+ input:
39
+ skill: harness-design-craft
40
+ path: string
41
+ type: flexible
42
+ tier: 2
43
+ phases:
44
+ - name: critique
45
+ description: LLM-judgment finding what is craft-mediocre (3-axis tier/impact/confidence output)
46
+ required: false
47
+ - name: polish
48
+ description: Apply polish patterns with before/after sketches (3-axis output)
49
+ required: false
50
+ - name: benchmark
51
+ description: Score against curated exemplars (5-dim radar output)
52
+ required: false
53
+ state:
54
+ persistent: false
55
+ depends_on:
56
+ - harness-design
57
+ - harness-design-system
@@ -0,0 +1,266 @@
1
+ # Harness Design Pipeline
2
+
3
+ > Orchestrator composing all 6 design-pipeline sub-projects into a single sequential pipeline with convergence-based remediation: FRESHEN → DETECT → FIX → AUDIT → FILL → REPORT. Produces a unified `pass` / `warn` / `fail` verdict and a per-phase report. Mirrors harness-docs-pipeline in shape; consumes the formal verifier interface generically so a 5th rule-based verifier composes for free.
4
+
5
+ ## When to Use
6
+
7
+ - When you want a single-command design health check across drift, anatomy, brand, and craft
8
+ - After major UI refactoring that may have caused widespread drift
9
+ - As a periodic hygiene check (per-PR or per-sprint)
10
+ - When onboarding a new project that has no DESIGN.md (bootstrap mode via FILL phase)
11
+ - When `on_pr` triggers fire on a UI-touching change
12
+ - NOT for fixing a single known drift issue (use align-design-system directly)
13
+ - NOT for single-pass verification (use `harness check-design` directly)
14
+ - NOT for authoring DESIGN.md or tokens.json (use `harness-design` skill — orchestrator only stubs absent inputs)
15
+
16
+ ## Relationship to Sub-Skills
17
+
18
+ | Skill | Pipeline Phase | Role |
19
+ | ----------------------- | -------------- | ----------------------------------------------------------- |
20
+ | detect-design-drift | DETECT | Find token bypass + primitive-adoption drift |
21
+ | align-design-system | FIX | Apply codemods + emit suggestions for drift findings |
22
+ | audit-component-anatomy | AUDIT | Find missing required anatomy parts in components |
23
+ | audit-brand-compliance | AUDIT | Find token misuse + forbidden phrases (brand semantics) |
24
+ | harness-design-craft | FILL | Critique copy/hierarchy/polish (LLM-judgment ceiling skill) |
25
+
26
+ This orchestrator delegates to sub-skills — it never reimplements their logic. Each sub-skill retains full standalone functionality.
27
+
28
+ ## Iron Law
29
+
30
+ **The pipeline delegates, never reimplements.** If you find yourself writing drift detection logic, fix application logic, or audit logic inside the orchestrator, STOP. Delegate to the dedicated sub-skill.
31
+
32
+ **Safe fixes are silent, unsafe fixes surface.** v1 follows align-design-system's pre-flight classifier verdict: `applied` outcomes are silent successes; `suggestion` / `skipped-unsafe` / `failed` outcomes surface in the report. Never override the classifier from inside the orchestrator.
33
+
34
+ ## Flags
35
+
36
+ | Flag | Effect |
37
+ | ------------------------- | ----------------------------------------------------------------- |
38
+ | `--fix` | Enable convergence-based auto-fix (default: detect + report only) |
39
+ | `--no-freshen` | Skip the FRESHEN phase |
40
+ | `--no-fill` | Skip the FILL phase (input bootstrap + craft polish) |
41
+ | `--ci` | Non-interactive: safe fixes only, no prompts |
42
+ | `--mode <m>` | Verifier mode (`fast` or `full`); default `fast` |
43
+ | `--files <...>` | Optional file/glob scope passed to each verifier |
44
+ | `--design-strictness <s>` | Override `design.strictness` |
45
+ | `--json` | Machine-readable output |
46
+
47
+ ## Shared Context Object
48
+
49
+ All phases read from and write to a shared `DesignPipelineContext`:
50
+
51
+ ```typescript
52
+ interface DesignPipelineContext {
53
+ graphAvailable: boolean;
54
+ inputs: {
55
+ designMdExists: boolean;
56
+ tokensJsonExists: boolean;
57
+ componentRegistryExists: boolean;
58
+ brandRulesExist: boolean;
59
+ };
60
+ bootstrapped: { designMd; tokensJson; componentRegistry; brandRules: boolean };
61
+ driftFindings: DriftFinding[];
62
+ fixesApplied: FixOutcome[];
63
+ auditFindings: { anatomy: AnatomyFinding[]; brand: BrandFinding[] };
64
+ craftFindings: CraftFinding[];
65
+ craftSuggestions: number;
66
+ exclusions: Set<string>;
67
+ verifiersRun: string[];
68
+ verifiersFailed: Array<{ name: string; error: string }>;
69
+ verdict: 'pass' | 'warn' | 'fail';
70
+ summary: { totalFindings; bySeverity; byCode; fixesApplied; iterationsRun; durationMs };
71
+ }
72
+ ```
73
+
74
+ The context is passed to sub-skills via `.harness/handoff.json` with a `pipeline` field. align-design-system v1 already supports reading `pipeline.driftFindings` and writing `pipeline.fixesApplied`; other sub-skills run in standalone mode when invoked from the orchestrator.
75
+
76
+ ## Process
77
+
78
+ ### Phase 1: FRESHEN — Input Freshness Check
79
+
80
+ **Skip this phase if `--no-freshen` flag is set.**
81
+
82
+ 1. **Check graph existence.** Look for `.harness/graph/` directory; set `context.graphAvailable`.
83
+ 2. **Check input file presence:**
84
+ - `design-system/DESIGN.md` exists?
85
+ - `design-system/tokens.json` exists?
86
+ - `## Component Registry` section present in DESIGN.md?
87
+ - `## Brand Rules` section present in DESIGN.md?
88
+ 3. **Set `context.inputs.*` flags.** Bootstrap action is DEFERRED to FILL phase (clean phase responsibilities).
89
+
90
+ ### Phase 2: DETECT — Find Design Drift
91
+
92
+ 1. Invoke `runDetectDrift({ path, mode, files? })`.
93
+ 2. Populate `context.driftFindings` with all `DRIFT-T*` and `DRIFT-P*` findings.
94
+ 3. Record `'detect-drift'` in `context.verifiersRun`.
95
+ 4. On failure: push to `context.verifiersFailed` and continue (graceful degradation).
96
+ 5. If `design.audit.driftDetection.enabled === false` in config: SKIP this phase entirely.
97
+
98
+ ### Phase 3: FIX — Convergence-Based Drift Remediation
99
+
100
+ **This phase runs only when `--fix` flag is set.**
101
+
102
+ #### Convergence Loop
103
+
104
+ ```
105
+ previousCount = context.driftFindings.length
106
+ maxIterations = 5
107
+
108
+ while iteration < maxIterations:
109
+ 1. Write pipeline.driftFindings to handoff.json
110
+ 2. Invoke align-design-system in pipeline mode
111
+ 3. Append outcomes to context.fixesApplied
112
+ 4. If applied === 0: STOP (converged)
113
+ 5. Re-run detect-design-drift
114
+ 6. newCount = remaining findings
115
+ 7. if newCount >= previousCount: STOP (no progress)
116
+ 8. previousCount = newCount
117
+ 9. iteration++
118
+ ```
119
+
120
+ Each align run mutates source files via its safe codemods (T001/T002/T003 only). Probably-safe / unsafe / failed outcomes are recorded but never auto-applied (align's pre-flight classifier is the gate).
121
+
122
+ ### Phase 4: AUDIT — Rule-Based Verifier Loop
123
+
124
+ 1. Iterate the orchestrator's `VerifierRegistry` generically:
125
+ - `audit-anatomy` runner → populate `context.auditFindings.anatomy`
126
+ - `audit-brand` runner → populate `context.auditFindings.brand`
127
+ 2. Each verifier's failure is captured in `context.verifiersFailed` without aborting the loop.
128
+ 3. **Iron Law:** the orchestrator does NOT branch on verifier name inside the audit logic. Adding a 5th verifier means registering it; the loop body stays unchanged.
129
+
130
+ ### Phase 5: FILL — Bootstrap + Ceiling Polish
131
+
132
+ **Skip this phase if `--no-fill` flag is set.**
133
+
134
+ **5a. Bootstrap missing inputs.** For each absent input declared in Phase 1:
135
+
136
+ - DESIGN.md missing → write a minimal stub with `## Aesthetic Direction`, `## Component Registry`, `## Anti-Patterns`, `## Brand Rules` sections, each containing `<!-- TODO: ... -->` placeholders.
137
+ - tokens.json missing → write a minimal `{ "$description": "TODO: declare design tokens" }` stub.
138
+ - `## Component Registry` missing (DESIGN.md exists but section absent) → append a stub table.
139
+ - `## Brand Rules` missing → append a stub voice subsection.
140
+
141
+ Set `context.bootstrapped.{designMd,tokensJson,componentRegistry,brandRules}` per-input.
142
+
143
+ **5b. Invoke design-craft-elevator POLISH (critique phase).**
144
+
145
+ 1. Call `runDesignCraft({ phases: ['critique'] })`.
146
+ 2. Populate `context.craftFindings` and `context.craftSuggestions`.
147
+ 3. Record `'design-craft-critique'` in `context.verifiersRun`.
148
+
149
+ design-craft suggestions are surfaced in REPORT but do NOT contribute to the `error`/`warn` severity counts — they're ceiling-layer suggestions, not violations.
150
+
151
+ ### Phase 6: REPORT — Verdict + Summary
152
+
153
+ Compute verdict:
154
+
155
+ | Condition | Verdict |
156
+ | ----------------------------------------------------------------------- | ------- |
157
+ | Any error-severity finding remains after FIX | `fail` |
158
+ | Any warn-severity finding OR craft suggestion OR bootstrapped any input | `warn` |
159
+ | Zero findings, zero suggestions, zero bootstrapped | `pass` |
160
+
161
+ Aggregate `summary.bySeverity` and `summary.byCode` across drift + anatomy + brand findings. (Craft findings use tier, not severity — they're tracked separately.)
162
+
163
+ Render human-readable or JSON output.
164
+
165
+ ## Harness Integration
166
+
167
+ - **`harness design-pipeline`** — CLI entry point. Recommended for CI usage with `--ci --fix`.
168
+ - **`mcp__harness__run_design_pipeline`** — MCP tool. Same input/output. Consumed by agents needing the full design health check.
169
+ - **`harness check-design`** — Single-pass verifier. The orchestrator INVOKES check-design's underlying verifiers (anatomy, drift, brand) but expands them into a convergence-loop pipeline. Choose check-design for one-shot verification; choose this orchestrator for the full pipeline with fixes.
170
+ - **`harness validate`** — Stays single-pass (and fast). The orchestrator is opt-in and heavier — different contract.
171
+ - **`.harness/handoff.json`** — Carries the `pipeline` field between orchestrator and align-design-system. Other sub-skills run standalone-mode from the orchestrator's perspective.
172
+
173
+ ## Success Criteria
174
+
175
+ See `docs/changes/design-pipeline/orchestrator/proposal.md` for the full 34 success criteria. Highlights:
176
+
177
+ - Generic Verifier registry: adding a 5th verifier requires only a `register()` call
178
+ - Iron Law compliance: orchestrator imports NO drift/fix/audit logic, only sub-skill entry points
179
+ - Convergence loop bounded at 5 iterations + plateau detection
180
+ - Verdict: `pass`/`warn`/`fail` per documented rules
181
+ - 4-platform skill markdown shipped
182
+ - MCP tool `run_design_pipeline` registered (count 73 → 74)
183
+
184
+ ## Examples
185
+
186
+ ### Example: Clean project, default flags
187
+
188
+ ```
189
+ $ harness design-pipeline
190
+
191
+ Verdict: ✓ pass
192
+
193
+ Phases:
194
+ FRESHEN inputs: DESIGN.md=yes tokens.json=yes registry=yes brand=yes
195
+ DETECT drift findings: 0
196
+ FIX iterations: 0, fixes applied: 0
197
+ AUDIT anatomy: 0, brand: 0
198
+ FILL bootstrapped: none, craft suggestions: 0
199
+
200
+ Summary: 0 total findings (0 error, 0 warn, 0 info) in 142ms
201
+ Verifiers run: detect-drift, audit-anatomy, audit-brand, design-craft-critique
202
+ ```
203
+
204
+ ### Example: Project with drift, `--fix` enabled
205
+
206
+ ```
207
+ $ harness design-pipeline --fix
208
+
209
+ Verdict: ⚠ warn
210
+
211
+ Phases:
212
+ FRESHEN inputs: DESIGN.md=yes tokens.json=yes registry=yes brand=yes
213
+ DETECT drift findings: 14
214
+ FIX iterations: 3, fixes applied: 9
215
+ AUDIT anatomy: 1, brand: 0
216
+ FILL bootstrapped: none, craft suggestions: 4
217
+
218
+ Summary: 5 total findings (0 error, 5 warn, 0 info) in 1842ms
219
+ Verifiers run: detect-drift, align-design-system, audit-anatomy, audit-brand, design-craft-critique
220
+ ```
221
+
222
+ (9 drift fixes auto-applied in convergence loop; 5 remaining warnings + 4 craft suggestions for human review)
223
+
224
+ ### Example: Empty project, FILL bootstraps inputs
225
+
226
+ ```
227
+ $ harness design-pipeline
228
+
229
+ Verdict: ⚠ warn
230
+
231
+ Phases:
232
+ FRESHEN inputs: DESIGN.md=no tokens.json=no registry=no brand=no
233
+ DETECT drift findings: 0
234
+ FIX iterations: 0, fixes applied: 0
235
+ AUDIT anatomy: 0, brand: 0
236
+ FILL bootstrapped: designMd, tokensJson, componentRegistry, brandRules, craft suggestions: 0
237
+
238
+ Summary: 0 total findings (0 error, 0 warn, 0 info) in 89ms
239
+ ```
240
+
241
+ (All inputs absent; FILL wrote minimal stubs; verdict `warn` because bootstrap occurred — author the TODO sections to clear it.)
242
+
243
+ ## Gates
244
+
245
+ - **No new verifier logic.** Iron Law. Delegate to sub-skills exclusively.
246
+ - **No graph schema changes.** Findings persist through the existing `DesignConstraintAdapter.recordFindings()` path.
247
+ - **No interactive prompts in v1.** `--fix` applies safe codemods silently; probably-safe / unsafe surface as suggestions only. `--ci` is the default behavior in v1; v1.x adds `--interactive` for terminal sessions.
248
+ - **No standalone `harness validate` invocation.** validate stays single-pass; the orchestrator is opt-in.
249
+ - **No DESIGN.md content generation.** Bootstrap writes stubs with TODO comments — sample content rots faster than skeletons.
250
+
251
+ ## Escalation
252
+
253
+ - **When the convergence loop hits maxIterations without converging:** check `context.summary.iterationsRun === 5`. Real fix oscillation almost always indicates a conflict between drift findings (e.g., two tokens with the same value). Inspect `fixesApplied` outcomes; the failing pattern is usually visible.
254
+ - **When a verifier consistently fails:** `context.verifiersFailed[].error` carries the message. Run the verifier standalone (e.g. `harness skill run audit-brand-compliance`) to reproduce — orchestrator just propagates the failure.
255
+ - **When FILL bootstraps a file you didn't want bootstrapped:** delete the stub; the orchestrator only writes when the file is absent. Or run with `--no-fill` to suppress the entire phase.
256
+ - **When verdict is `fail` but you want to merge anyway:** the orchestrator exits with code 1; bypass via CI config (treating design-pipeline as advisory not blocking). Not recommended — error-severity findings represent declared violations.
257
+ - **When `--ci` mode is too conservative:** v1's `--ci` only applies align's `safe-codemod`-classified fixes. Use v1.x's `--interactive` (or the standalone `harness align-design-system --dry-run`) to review and apply probably-safe fixes manually.
258
+
259
+ ## Status
260
+
261
+ **v1 — in implementation.** See:
262
+
263
+ - Spec: `docs/changes/design-pipeline/orchestrator/proposal.md`
264
+ - Roadmap entry: `design-pipeline sub-project #5` (the orchestrator)
265
+ - Sibling: `harness-docs-pipeline` (the pattern this mirrors)
266
+ - Floor + ceiling sub-skills: `detect-design-drift` (#1), `align-design-system` (#1), `audit-component-anatomy` (#2), `audit-brand-compliance` (#3), `check-design` (#4), `harness-design-craft` (#6)
@@ -0,0 +1,70 @@
1
+ name: harness-design-pipeline
2
+ version: "0.1.0"
3
+ description: Orchestrator composing detect-design-drift, align-design-system, audit-component-anatomy, audit-brand-compliance, and design-craft-elevator into a sequential pipeline with convergence-based remediation. Mirrors harness-docs-pipeline. Consumes the formal verifier interface generically.
4
+ stability: draft
5
+ cognitive_mode: constructive-architect
6
+ triggers:
7
+ - manual
8
+ - on_pr
9
+ - on_new_feature
10
+ platforms:
11
+ - claude-code
12
+ tools:
13
+ - Bash
14
+ - Read
15
+ - Write
16
+ - Edit
17
+ - Glob
18
+ - Grep
19
+ cli:
20
+ command: harness design-pipeline
21
+ args:
22
+ - name: path
23
+ description: Project root path
24
+ required: false
25
+ - name: fix
26
+ description: Enable convergence-based remediation
27
+ required: false
28
+ - name: no-freshen
29
+ description: Skip the FRESHEN phase
30
+ required: false
31
+ - name: no-fill
32
+ description: Skip the FILL phase
33
+ required: false
34
+ - name: ci
35
+ description: Non-interactive (safe fixes only)
36
+ required: false
37
+ mcp:
38
+ tool: run_design_pipeline
39
+ input:
40
+ path: string
41
+ fix: boolean
42
+ type: rigid
43
+ tier: 2
44
+ phases:
45
+ - name: freshen
46
+ description: Check input freshness (DESIGN.md, tokens.json, graph staleness)
47
+ required: false
48
+ - name: detect
49
+ description: Invoke detect-design-drift; collect DRIFT-* findings
50
+ required: true
51
+ - name: fix
52
+ description: Convergence loop with align-design-system (only when --fix is set)
53
+ required: false
54
+ - name: audit
55
+ description: Generic Verifier<F> registry loop (audit-anatomy + audit-brand)
56
+ required: true
57
+ - name: fill
58
+ description: Bootstrap missing inputs + invoke design-craft POLISH
59
+ required: false
60
+ - name: report
61
+ description: Compute verdict + summary
62
+ required: true
63
+ state:
64
+ persistent: false
65
+ depends_on:
66
+ - detect-design-drift
67
+ - align-design-system
68
+ - audit-component-anatomy
69
+ - audit-brand-compliance
70
+ - harness-design-craft