@harness-engineering/cli 2.7.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/dist/agents/personas/adversarial-reviewer.yaml +43 -0
  2. package/dist/agents/personas/frontend-races-reviewer.yaml +54 -0
  3. package/dist/agents/personas/typescript-strict-reviewer.yaml +53 -0
  4. package/dist/agents/skills/CHANGELOG.md +12 -0
  5. package/dist/agents/skills/claude-code/align-design-system/SKILL.md +18 -0
  6. package/dist/agents/skills/claude-code/align-design-system/skill.yaml +3 -0
  7. package/dist/agents/skills/claude-code/harness-audit-harness-strength/SKILL.md +188 -0
  8. package/dist/agents/skills/claude-code/harness-audit-harness-strength/skill.yaml +54 -0
  9. package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +2 -0
  10. package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +58 -12
  11. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +107 -22
  12. package/dist/agents/skills/claude-code/harness-code-review/references/confidence-rubric.md +45 -0
  13. package/dist/agents/skills/claude-code/harness-code-review/references/risk-keywords.md +40 -0
  14. package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +3 -0
  15. package/dist/agents/skills/claude-code/harness-compound/SKILL.md +7 -4
  16. package/dist/agents/skills/claude-code/harness-execution/SKILL.md +1 -1
  17. package/dist/agents/skills/claude-code/harness-git-workflow/SKILL.md +2 -0
  18. package/dist/agents/skills/claude-code/harness-ideate/SKILL.md +279 -0
  19. package/dist/agents/skills/claude-code/harness-ideate/references/scoring.md +88 -0
  20. package/dist/agents/skills/claude-code/harness-ideate/skill.yaml +66 -0
  21. package/dist/agents/skills/claude-code/harness-knowledge-pipeline/SKILL.md +2 -0
  22. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +14 -4
  23. package/dist/agents/skills/claude-code/harness-pulse/SKILL.md +12 -16
  24. package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +62 -4
  25. package/dist/agents/skills/claude-code/harness-roadmap-pilot/SKILL.md +36 -6
  26. package/dist/agents/skills/claude-code/harness-strategy/SKILL.md +152 -0
  27. package/dist/agents/skills/claude-code/harness-strategy/references/interview.md +122 -0
  28. package/dist/agents/skills/claude-code/harness-strategy/skill.yaml +54 -0
  29. package/dist/agents/skills/claude-code/harness-test-advisor/SKILL.md +80 -2
  30. package/dist/agents/skills/claude-code/harness-test-advisor/skill.yaml +4 -1
  31. package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +86 -18
  32. package/dist/agents/skills/claude-code/initialize-harness-project/skill.yaml +1 -0
  33. package/dist/agents/skills/claude-code/outcome-eval/SKILL.md +97 -0
  34. package/dist/agents/skills/claude-code/outcome-eval/skill.yaml +51 -0
  35. package/dist/agents/skills/codex/align-design-system/SKILL.md +18 -0
  36. package/dist/agents/skills/codex/align-design-system/skill.yaml +3 -0
  37. package/dist/agents/skills/codex/harness-audit-harness-strength/SKILL.md +188 -0
  38. package/dist/agents/skills/codex/harness-audit-harness-strength/skill.yaml +54 -0
  39. package/dist/agents/skills/codex/harness-autopilot/SKILL.md +2 -0
  40. package/dist/agents/skills/codex/harness-brainstorming/SKILL.md +58 -12
  41. package/dist/agents/skills/codex/harness-code-review/SKILL.md +107 -22
  42. package/dist/agents/skills/codex/harness-code-review/references/confidence-rubric.md +45 -0
  43. package/dist/agents/skills/codex/harness-code-review/references/risk-keywords.md +40 -0
  44. package/dist/agents/skills/codex/harness-code-review/skill.yaml +3 -0
  45. package/dist/agents/skills/codex/harness-compound/SKILL.md +7 -4
  46. package/dist/agents/skills/codex/harness-execution/SKILL.md +1 -1
  47. package/dist/agents/skills/codex/harness-git-workflow/SKILL.md +2 -0
  48. package/dist/agents/skills/codex/harness-ideate/SKILL.md +279 -0
  49. package/dist/agents/skills/codex/harness-ideate/references/scoring.md +88 -0
  50. package/dist/agents/skills/codex/harness-ideate/skill.yaml +66 -0
  51. package/dist/agents/skills/codex/harness-knowledge-pipeline/SKILL.md +2 -0
  52. package/dist/agents/skills/codex/harness-planning/SKILL.md +14 -4
  53. package/dist/agents/skills/codex/harness-pulse/SKILL.md +12 -16
  54. package/dist/agents/skills/codex/harness-roadmap/SKILL.md +62 -4
  55. package/dist/agents/skills/codex/harness-roadmap-pilot/SKILL.md +36 -6
  56. package/dist/agents/skills/codex/harness-strategy/SKILL.md +152 -0
  57. package/dist/agents/skills/codex/harness-strategy/references/interview.md +122 -0
  58. package/dist/agents/skills/codex/harness-strategy/skill.yaml +54 -0
  59. package/dist/agents/skills/codex/harness-test-advisor/SKILL.md +80 -2
  60. package/dist/agents/skills/codex/harness-test-advisor/skill.yaml +4 -1
  61. package/dist/agents/skills/codex/initialize-harness-project/SKILL.md +86 -18
  62. package/dist/agents/skills/codex/initialize-harness-project/skill.yaml +1 -0
  63. package/dist/agents/skills/codex/outcome-eval/SKILL.md +97 -0
  64. package/dist/agents/skills/codex/outcome-eval/skill.yaml +51 -0
  65. package/dist/agents/skills/cursor/align-design-system/SKILL.md +18 -0
  66. package/dist/agents/skills/cursor/align-design-system/skill.yaml +3 -0
  67. package/dist/agents/skills/cursor/harness-audit-harness-strength/SKILL.md +188 -0
  68. package/dist/agents/skills/cursor/harness-audit-harness-strength/skill.yaml +54 -0
  69. package/dist/agents/skills/cursor/harness-autopilot/SKILL.md +2 -0
  70. package/dist/agents/skills/cursor/harness-brainstorming/SKILL.md +58 -12
  71. package/dist/agents/skills/cursor/harness-code-review/SKILL.md +107 -22
  72. package/dist/agents/skills/cursor/harness-code-review/references/confidence-rubric.md +45 -0
  73. package/dist/agents/skills/cursor/harness-code-review/references/risk-keywords.md +40 -0
  74. package/dist/agents/skills/cursor/harness-code-review/skill.yaml +3 -0
  75. package/dist/agents/skills/cursor/harness-compound/SKILL.md +7 -4
  76. package/dist/agents/skills/cursor/harness-execution/SKILL.md +1 -1
  77. package/dist/agents/skills/cursor/harness-git-workflow/SKILL.md +2 -0
  78. package/dist/agents/skills/cursor/harness-ideate/SKILL.md +279 -0
  79. package/dist/agents/skills/cursor/harness-ideate/references/scoring.md +88 -0
  80. package/dist/agents/skills/cursor/harness-ideate/skill.yaml +66 -0
  81. package/dist/agents/skills/cursor/harness-knowledge-pipeline/SKILL.md +2 -0
  82. package/dist/agents/skills/cursor/harness-planning/SKILL.md +14 -4
  83. package/dist/agents/skills/cursor/harness-pulse/SKILL.md +12 -16
  84. package/dist/agents/skills/cursor/harness-roadmap/SKILL.md +62 -4
  85. package/dist/agents/skills/cursor/harness-roadmap-pilot/SKILL.md +36 -6
  86. package/dist/agents/skills/cursor/harness-strategy/SKILL.md +152 -0
  87. package/dist/agents/skills/cursor/harness-strategy/references/interview.md +122 -0
  88. package/dist/agents/skills/cursor/harness-strategy/skill.yaml +54 -0
  89. package/dist/agents/skills/cursor/harness-test-advisor/SKILL.md +80 -2
  90. package/dist/agents/skills/cursor/harness-test-advisor/skill.yaml +4 -1
  91. package/dist/agents/skills/cursor/initialize-harness-project/SKILL.md +86 -18
  92. package/dist/agents/skills/cursor/initialize-harness-project/skill.yaml +1 -0
  93. package/dist/agents/skills/cursor/outcome-eval/SKILL.md +97 -0
  94. package/dist/agents/skills/cursor/outcome-eval/skill.yaml +51 -0
  95. package/dist/agents/skills/gemini-cli/align-design-system/SKILL.md +18 -0
  96. package/dist/agents/skills/gemini-cli/align-design-system/skill.yaml +3 -0
  97. package/dist/agents/skills/gemini-cli/harness-audit-harness-strength/SKILL.md +188 -0
  98. package/dist/agents/skills/gemini-cli/harness-audit-harness-strength/skill.yaml +54 -0
  99. package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +2 -0
  100. package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +58 -12
  101. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +107 -22
  102. package/dist/agents/skills/gemini-cli/harness-code-review/references/confidence-rubric.md +45 -0
  103. package/dist/agents/skills/gemini-cli/harness-code-review/references/risk-keywords.md +40 -0
  104. package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +3 -0
  105. package/dist/agents/skills/gemini-cli/harness-compound/SKILL.md +7 -4
  106. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +1 -1
  107. package/dist/agents/skills/gemini-cli/harness-git-workflow/SKILL.md +2 -0
  108. package/dist/agents/skills/gemini-cli/harness-ideate/SKILL.md +279 -0
  109. package/dist/agents/skills/gemini-cli/harness-ideate/references/scoring.md +88 -0
  110. package/dist/agents/skills/gemini-cli/harness-ideate/skill.yaml +66 -0
  111. package/dist/agents/skills/gemini-cli/harness-knowledge-pipeline/SKILL.md +2 -0
  112. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +14 -4
  113. package/dist/agents/skills/gemini-cli/harness-pulse/SKILL.md +12 -16
  114. package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +62 -4
  115. package/dist/agents/skills/gemini-cli/harness-roadmap-pilot/SKILL.md +36 -6
  116. package/dist/agents/skills/gemini-cli/harness-strategy/SKILL.md +152 -0
  117. package/dist/agents/skills/gemini-cli/harness-strategy/references/interview.md +122 -0
  118. package/dist/agents/skills/gemini-cli/harness-strategy/skill.yaml +54 -0
  119. package/dist/agents/skills/gemini-cli/harness-test-advisor/SKILL.md +80 -2
  120. package/dist/agents/skills/gemini-cli/harness-test-advisor/skill.yaml +4 -1
  121. package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +86 -18
  122. package/dist/agents/skills/gemini-cli/initialize-harness-project/skill.yaml +1 -0
  123. package/dist/agents/skills/gemini-cli/outcome-eval/SKILL.md +97 -0
  124. package/dist/agents/skills/gemini-cli/outcome-eval/skill.yaml +51 -0
  125. package/dist/agents/skills/package.json +1 -1
  126. package/dist/agents/skills/tests/harness-strategy.test.ts +145 -0
  127. package/dist/agents/skills/tests/harness-test-advisor.test.ts +94 -0
  128. package/dist/agents-md-XOJE5ETA.js +13 -0
  129. package/dist/analyzer-V633GUHY-MBCQWKDU.js +26 -0
  130. package/dist/{architecture-LUR2I67H.js → architecture-JEZPJ725.js} +6 -6
  131. package/dist/{assess-project-OJWECOP2.js → assess-project-RHXOQNMM.js} +1 -1
  132. package/dist/bin/harness-mcp.js +17 -17
  133. package/dist/bin/harness.js +27 -27
  134. package/dist/{check-phase-gate-HS5KYLRO.js → check-phase-gate-GNDOMS35.js} +6 -6
  135. package/dist/{chunk-6UHDQP2N.js → chunk-2N4OENGE.js} +1 -1
  136. package/dist/{chunk-O2ASYKA6.js → chunk-3ISHDWO7.js} +2 -2
  137. package/dist/{chunk-GGSNWH7P.js → chunk-527G27VI.js} +5 -5
  138. package/dist/{chunk-N5NSSLMU.js → chunk-6WQCLCBO.js} +2 -2
  139. package/dist/{chunk-OH3NXXUY.js → chunk-BDGTZRZ6.js} +11 -1
  140. package/dist/{chunk-Z3TMCCZB.js → chunk-BYVT5LVO.js} +9 -9
  141. package/dist/{chunk-TIH53QXY.js → chunk-CLI4K2CH.js} +1 -1
  142. package/dist/{chunk-VSIRUZQP.js → chunk-DE5U6KOL.js} +2 -2
  143. package/dist/{chunk-FXZI6NJ2.js → chunk-GGKRA7A7.js} +51 -4
  144. package/dist/{chunk-RJ2WEES5.js → chunk-GSP2XIVS.js} +2 -2
  145. package/dist/{chunk-CZPOPMMI.js → chunk-HEIMJJI4.js} +3 -3
  146. package/dist/{chunk-7AF6C5GE.js → chunk-HWTUUQOW.js} +3 -3
  147. package/dist/{chunk-FC4JPM6W.js → chunk-KAJOS3BA.js} +3 -3
  148. package/dist/{chunk-NIVWM7OW.js → chunk-MGUPSE6D.js} +10 -10
  149. package/dist/{chunk-WZY5U6NS.js → chunk-N24HCQA4.js} +3351 -887
  150. package/dist/{chunk-Y4T6ENKQ.js → chunk-N55WOGN3.js} +86 -17
  151. package/dist/{chunk-INBTDBV2.js → chunk-NWLGL3IR.js} +1 -1
  152. package/dist/{chunk-FEKBXX2J.js → chunk-ONCPJGHY.js} +9 -9
  153. package/dist/{chunk-PTHX545Q.js → chunk-PC2R5RUJ.js} +2 -2
  154. package/dist/{chunk-H2ZJOJ7A.js → chunk-PP6ZRL5T.js} +316 -42
  155. package/dist/{chunk-LECXPXS3.js → chunk-QBC7DI4Q.js} +2 -2
  156. package/dist/{chunk-B2VAYLYI.js → chunk-UX3PQKVZ.js} +8 -3
  157. package/dist/{chunk-7PLIWP7U.js → chunk-WWEVS7RO.js} +4409 -743
  158. package/dist/{chunk-LGYXR2KZ.js → chunk-XFU6SB2Q.js} +1122 -689
  159. package/dist/{chunk-KN3EMDZ5.js → chunk-XX4OLNWQ.js} +23 -3
  160. package/dist/{chunk-VI4IS55S.js → chunk-YQSYCBAH.js} +6 -6
  161. package/dist/{chunk-LYIPI2SJ.js → chunk-Z4AWEIBY.js} +6 -6
  162. package/dist/{ci-workflow-MDSTHJOY.js → ci-workflow-ORZ4F45F.js} +5 -5
  163. package/dist/{dist-E3SAAHCM.js → dist-ICW4QUEW.js} +5 -1
  164. package/dist/{dist-72ID44UE.js → dist-LHINSVK4.js} +136 -4
  165. package/dist/{dist-R3TOOPJ7.js → dist-OWHMNL4W.js} +1 -1
  166. package/dist/{docs-2RFOJ6XY.js → docs-AU3DXFFO.js} +6 -6
  167. package/dist/engine-6GPWOYQH.js +13 -0
  168. package/dist/{entropy-3UX6644G.js → entropy-VLKDRMRT.js} +5 -5
  169. package/dist/{feedback-CVCFYND4.js → feedback-YXYY44ZC.js} +1 -1
  170. package/dist/{generate-agent-definitions-HZ3XENWO.js → generate-agent-definitions-XIHQPKG3.js} +6 -6
  171. package/dist/{glob-helper-EX4YZKZO.js → glob-helper-GLZAURJC.js} +1 -1
  172. package/dist/{graph-loader-EIFEOUVI.js → graph-loader-HHXN5FLP.js} +1 -1
  173. package/dist/hooks/cost-tracker.js +29 -6
  174. package/dist/index.d.ts +202 -0
  175. package/dist/index.js +27 -27
  176. package/dist/{loader-6RHWU5FH.js → loader-YAN56MT3.js} +5 -5
  177. package/dist/{mcp-OYR26JDI.js → mcp-RK3SFVYB.js} +17 -17
  178. package/dist/{performance-JJMIRXCH.js → performance-64DPTLLQ.js} +6 -6
  179. package/dist/{review-pipeline-BHQZIXWZ.js → review-pipeline-NENG6LW7.js} +5 -5
  180. package/dist/{runtime-DALTAVTN.js → runtime-FFIIRT2T.js} +5 -5
  181. package/dist/{scan-LYKLM4EQ.js → scan-P7YFKB77.js} +1 -1
  182. package/dist/{security-RMLMYFPB.js → security-3PIBN35B.js} +1 -1
  183. package/dist/templates/basic/harness.config.json.hbs +34 -0
  184. package/dist/templates/ci/README.md +86 -0
  185. package/dist/templates/ci/required-review.ruleset.json +20 -0
  186. package/dist/templates/ci/required-review.yml.hbs +57 -0
  187. package/dist/templates/ci/template.json +5 -0
  188. package/dist/templates/intermediate/harness.config.json.hbs +36 -0
  189. package/dist/templates/orchestrator/harness.orchestrator.md +9 -0
  190. package/dist/{tool-tiers-B7JC2XC3.js → tool-tiers-OKK5FE57.js} +2 -0
  191. package/dist/{validate-R7DZRDFK.js → validate-7IAF2ES3.js} +6 -6
  192. package/dist/validate-cross-check-QPSAOZKD.js +13 -0
  193. package/package.json +8 -8
  194. package/dist/agents-md-FKMKH6ZF.js +0 -13
  195. package/dist/analyzer-H3AHBFSL-KPOPJYRB.js +0 -26
  196. package/dist/engine-BSFKOGPN.js +0 -13
  197. package/dist/validate-cross-check-AUUZFNVL.js +0 -13
@@ -0,0 +1,122 @@
1
+ # Strategy Interview Reference
2
+
3
+ The first-run interview (and the per-section update flow) converts vague intent ("we want to be the best at X") into a small, concrete `STRATEGY.md`. This document is the rule book the skill quotes when pushing back on input.
4
+
5
+ The interview is heuristic — the agent reading SKILL.md applies the rules. Nothing in `packages/core` parses the user's natural-language answers. The fixture-driven contract test in `agents/skills/tests/harness-strategy.test.ts` asserts the rule _names_ and the presence of repair-script keywords; rewording surrounding prose is free.
6
+
7
+ ## Pushback Rules
8
+
9
+ Three rules, each cited verbatim in the skill output when it fires (so the user sees _why_ the answer was rejected, not just _that_ it was). **Each rule fires AT MOST TWICE per section. After the second pushback, capture what the user offered, flag the section, and move on.** The cap is the disable mechanism — there is no flag, no override, no "I know what I'm doing" path. The cap protects users from infinite loops, not from feedback. Round 1 MUST always fire when a rule matches.
10
+
11
+ ### Rule 1: Fluff detection
12
+
13
+ **What it catches:** Empty modifiers and mission-statement vocabulary that look like answers but state nothing concrete.
14
+
15
+ | Detection signal | Example trigger |
16
+ | ----------------------------------------------------------------------------- | --------------------------------------------------- |
17
+ | Empty modifiers: "best", "leading", "world-class", "best-in-class", "premier" | _"We want to be the best at developer experience."_ |
18
+ | Mission-statement verbs: "delight", "empower", "transform", "revolutionize" | _"Empower engineers to build amazing things."_ |
19
+ | Answers ≤ 5 words with no domain-specific noun | _"Deliver value."_ / _"Win the market."_ |
20
+ | Adjective-only diagnoses: "broken", "bad", "slow" without an object | _"It's slow."_ / _"It's hard."_ |
21
+
22
+ **Repair script:**
23
+
24
+ > Replace `<phrase>` with a concrete diagnosis: _what is broken_, _for whom_, _that we can verify_. "We want to be the best at X" is not a diagnosis — it's an aspiration. Try the next layer down: which _specific_ failure mode are we trying to remove from the world?
25
+
26
+ ### Rule 2: Goal-as-strategy
27
+
28
+ **What it catches:** Targets, KPIs, and fiscal-year aspirations dressed up as strategy. A goal is a destination; strategy is the bet you're making about how to get there.
29
+
30
+ | Detection signal | Example trigger |
31
+ | ------------------------------------------------------------------------ | -------------------------------------------------------- |
32
+ | Numeric targets without an underlying bet | _"Grow revenue by 20% this year."_ / _"Get to 10k DAU."_ |
33
+ | Fiscal-year or quarter phrasing under `Target problem` or `Our approach` | _"By Q4 we'll have shipped the new platform."_ |
34
+ | KPI-shape strings: "increase X by Y%", "reduce X to Z" | _"Reduce churn to under 5%."_ |
35
+ | Sentences that name a metric value but not a mechanism | _"Hit 99.9% uptime."_ |
36
+
37
+ **Repair script:**
38
+
39
+ > That's a goal. What is the **bet** — the choice you're making about _how_ to produce it — that goes underneath? Strategy is the coherent action that, if it works, produces the goal. "Grow revenue 20%" is the destination; _how_ you'll do it (which segment, which channel, which product wedge) is the strategy.
40
+
41
+ ### Rule 3: Feature-list-as-strategy
42
+
43
+ **What it catches:** Roadmap-style enumerations of components dressed up as strategy. Feature lists don't survive contact with reality; the coherent action underneath does.
44
+
45
+ | Detection signal | Example trigger |
46
+ | ----------------------------------------------------------------------------- | ----------------------------------------------------- |
47
+ | Multi-item lists (≥3 bullets) of feature/component names under `Our approach` | _"- Dashboard, - Notifications, - Mobile app, - SSO"_ |
48
+ | Noun-heavy lists with no verbs describing the coherent action | _"- AI agents - Knowledge graph - Skill registry"_ |
49
+ | Track names that are feature names (e.g., `- Dashboard:`, `- Mobile:`) | _"- Dashboard: ship the new dashboard"_ |
50
+ | `Our approach` answered as a roadmap rather than a thesis | _"First we'll do X, then Y, then Z."_ |
51
+
52
+ **Repair script:**
53
+
54
+ > Feature lists don't survive contact with reality. What's the **coherent action** these features are instances of? The features are downstream of the bet. State the bet, then the features become consequences ("we're betting on agent-orchestrated workflows, so dashboard/SSO/mobile fall out of that"), not the strategy itself.
55
+
56
+ ## The 2-Round Cap
57
+
58
+ For every section, each rule fires at most twice:
59
+
60
+ 1. **Round 1** — Rule matches → cite the rule, quote the failing answer, offer the repair script. Wait for revised answer.
61
+ 2. **Round 2** — Rule matches the revised answer → cite the rule a second time, quote the repair script. Wait for the user's third attempt.
62
+ 3. **Cap reached** — Capture whatever the user offered on attempt 3. Emit a section flag in the doc summary:
63
+
64
+ > ⚠ <section name>: flagged for revisit — pushback cap reached without <concrete diagnosis | underlying bet | coherent action>.
65
+
66
+ The flag is informational. It does NOT block the write — STRATEGY.md is the user's commitment, not the skill's gate. The flag lives in the _summary_ shown to the user, not in the on-disk file (the schema rejects unknown content).
67
+
68
+ If the user explicitly says round 1's pushback is wrong (e.g., _"no, that IS the diagnosis — we really mean it this way"_), capture the answer verbatim after round 1. Do NOT push back twice if the user explicitly disagrees with round 1. This is not a third path around the cap; it's recognition that pushback is an offer, not a gate.
69
+
70
+ ## Separation from `docs/roadmap.md`
71
+
72
+ The interview MUST refuse to capture tactical phase tracking (phase numbers, blockers, assignees, external IDs) under any section. That belongs in `docs/roadmap.md`. The two artifacts have different lifecycles:
73
+
74
+ | Artifact | Cadence | Owner | Content |
75
+ | ----------------- | ------------------ | ---------------- | -------------------------------------------------- |
76
+ | `STRATEGY.md` | Quarterly-ish | Product / lead | Target problem, approach, persona, metrics, tracks |
77
+ | `docs/roadmap.md` | Per-phase / weekly | Eng orchestrator | Phase status, blockers, assignees, external-IDs |
78
+
79
+ If the user asks "where do I track that we're blocked on X" or "where do I record the assignee for phase 4" → answer: `docs/roadmap.md`, not `STRATEGY.md`. The separation is Decision 1 of the strategic-anchor proposal.
80
+
81
+ ## Section-by-section interview prompts
82
+
83
+ Phase 1 walks the sections in template order. Each prompt is a single focused question; the rules above govern the response loop.
84
+
85
+ | Section | Opening prompt | Rules to apply |
86
+ | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
87
+ | Target problem | _"In 2-4 sentences: what is specifically broken in the world that this product addresses? Not the goal — the diagnosis."_ | Fluff, Goal-as-strategy |
88
+ | Our approach | _"What is your distinctive bet on how to solve the target problem? The choice you're making about HOW, not WHAT you're building."_ | Fluff, Goal-as-strategy, Feature-list |
89
+ | Who it's for | _"Specific persona — who is the person, what context are they in, what alternatives are they currently using? 'Developers' is not a specific persona."_ | Fluff |
90
+ | Key metrics | _"What 1-5 metrics, measured where, would tell you the bet is paying off? Each metric is a bullet line: `- <name>: <how measured, where it lives>`."_ | Fluff (per bullet) |
91
+ | Tracks | _"What 1-5 tracks of work are you currently investing in to advance the bet? Each track is a bullet line: `- <track name>: <one-sentence current investment>`."_ | Feature-list (per bullet) |
92
+ | Milestones (opt) | _"What 2-3 dated milestones would mark visible progress on the tracks? Skip if none yet."_ | Goal-as-strategy (milestones SHOULD be dated targets — accept them here even though Rule 2 rejects them under `Target problem` / `Our approach`) |
93
+ | Not working on (opt) | _"What did you deliberately decide NOT to invest in this cycle? Explicit non-goals reduce future drift."_ | Fluff |
94
+ | Marketing (opt) | _"What 1-3 sentences describe how you'd pitch this to the persona? Often this is downstream of `Target problem` + `Our approach`."_ | Fluff |
95
+
96
+ ## Anti-pattern fixtures (referenced by the contract test)
97
+
98
+ The skill's contract test (`agents/skills/tests/harness-strategy.test.ts`) asserts the rule names and key repair-script phrases appear in this file. The fixtures below are the canonical anti-patterns each rule must catch.
99
+
100
+ ### Fluff detection fixture
101
+
102
+ > **User answer (Target problem):** _"We want to be the best at developer experience."_
103
+ >
104
+ > **Skill response:** "**Fluff detection** fired. `be the best at` is empty-modifier vocabulary — it states an aspiration, not a diagnosis. Try the next layer down: which _specific_ failure mode in developer experience are we trying to remove from the world?"
105
+
106
+ ### Goal-as-strategy fixture
107
+
108
+ > **User answer (Our approach):** _"Grow revenue 20% this year and reduce churn to under 5%."_
109
+ >
110
+ > **Skill response:** "**Goal-as-strategy** fired. Those are goals, not approach. What is the **bet** — the choice you're making about _how_ to produce them — that goes underneath?"
111
+
112
+ ### Feature-list-as-strategy fixture
113
+
114
+ > **User answer (Our approach):** _"- Ship the new dashboard. - Add notifications. - Build the mobile app. - Wire up SSO."_
115
+ >
116
+ > **Skill response:** "**Feature-list-as-strategy** fired. Feature lists don't survive contact with reality. What's the **coherent action** these features are instances of? The features are downstream of the bet."
117
+
118
+ ## Update-flow guidance
119
+
120
+ Phase 2 of the skill re-interviews ONE user-selected section at a time. The same three rules apply. **Re-running a section does not exempt it from pushback** — "no rubber-stamping" is the proposal Decision 4 phrasing.
121
+
122
+ When the user revisits a section and the new answer also triggers a rule, the 2-round cap still applies — counted _within that revisit_, not cumulatively across all-time runs.
@@ -0,0 +1,54 @@
1
+ name: harness-strategy
2
+ version: "0.1.0"
3
+ description: First-run interview and update flow for STRATEGY.md — the durable upstream product anchor read by harness-brainstorming, harness-ideate, and harness-roadmap-pilot. Enforces three pushback rules (fluff, goal-as-strategy, feature-list-as-strategy) with a 2-round-per-section cap. Phase 2 ships the skill; downstream wiring (init, brainstorming, roadmap-pilot, ideate, knowledge graph) ships in spec Phases 3-7.
4
+ stability: static
5
+ cognitive_mode: configuration-interviewer
6
+ triggers:
7
+ - manual
8
+ platforms:
9
+ - claude-code
10
+ - gemini-cli
11
+ - cursor
12
+ - codex
13
+ tools:
14
+ - Bash
15
+ - Read
16
+ - Write
17
+ - Edit
18
+ - Glob
19
+ - Grep
20
+ cli:
21
+ command: harness skill run harness-strategy
22
+ args: []
23
+ mcp:
24
+ tool: run_skill
25
+ input:
26
+ skill: harness-strategy
27
+ type: rigid
28
+ tier: 2
29
+ phases:
30
+ - name: route
31
+ description: Route by STRATEGY.md presence and validity (absent → first-run; valid → update; invalid → repair offer)
32
+ required: true
33
+ - name: first-run-interview
34
+ description: Walk sections in template order with pushback; cap at 2 rounds per section; write via writeStrategyDoc
35
+ required: true
36
+ - name: update
37
+ description: Re-interview a single user-selected section; bump version and last_updated; preserve untouched sections
38
+ required: false
39
+ - name: handoff
40
+ description: Note which downstream skills (harness-brainstorming, harness-ideate, harness-roadmap-pilot, BusinessKnowledgeIngestor) will pick up STRATEGY.md as grounding
41
+ required: true
42
+ state:
43
+ persistent: true
44
+ files:
45
+ - STRATEGY.md
46
+ - STRATEGY.md.bak
47
+ depends_on: []
48
+ keywords:
49
+ - strategy
50
+ - strategic-anchor
51
+ - product-anchor
52
+ - upstream-grounding
53
+ - compound-engineering
54
+ - rumelt
@@ -8,8 +8,9 @@
8
8
  - In CI — optimize test suite execution order
9
9
  - When a test fails — understand which changes could have caused it
10
10
  - When `on_pr` triggers fire
11
- - NOT for writing tests (use harness-tdd)
12
- - NOT for test quality analysis (out of scope)
11
+ - **Coverage Audit mode** — when no diff is available and the user asks for "coverage gaps", "deep dive", "coverage plan", or "what's untested", run project-wide gap analysis instead of test selection
12
+ - NOT for writing tests (use harness-tdd, or `canary:canary-write-test` for uncovered files surfaced by Coverage Audit)
13
+ - NOT for test quality analysis at the test-selection level (Coverage Audit mode does include a capped quality review via `canary:canary-review-test`)
13
14
 
14
15
  ## Prerequisites
15
16
 
@@ -112,6 +113,83 @@ npx vitest run tests/services/auth.test.ts tests/types/user.test.ts tests/routes
112
113
  npx vitest run tests/services/auth.test.ts tests/types/user.test.ts tests/routes/login.test.ts tests/middleware/verify.test.ts tests/integration/auth-flow.test.ts
113
114
  ```
114
115
 
116
+ ## Coverage Audit Mode
117
+
118
+ Activates when `--audit` is passed, OR when no diff is available AND the user's
119
+ language matches audit intent ("coverage gaps", "deep dive", "coverage plan",
120
+ "what's untested"). When this mode is selected, skip Phases 1–3 above and run
121
+ the audit phases below instead.
122
+
123
+ ### Audit Phase 0: PROBE — Detect canary CLI availability
124
+
125
+ Call the `canary_probe` MCP tool once at the start of the audit. It returns
126
+ `{ status: "available" | "degraded", version?, reason? }` and never errors.
127
+
128
+ - **`available`** — the deterministic canary CLI is usable; use `canary_recommend_framework`
129
+ for framework selection in Phase 3 (GAP REPORT).
130
+ - **`degraded`** — the CLI is not usable (reason: `not-installed`, `binary-missing`,
131
+ `exec-failed`, or `bad-output`). Print one line:
132
+
133
+ > canary CLI unavailable (`<reason>`) — install `canary-test-cli` for deterministic
134
+ > framework recommendations. Proceeding; framework picks fall back to the plugin.
135
+
136
+ Then skip `canary_recommend_framework` calls for the rest of the run. This does **not**
137
+ affect the plugin-based Quality Review in Phase 2 (`canary:canary-review-test` is a
138
+ separate Claude Code plugin, installed independently of the CLI).
139
+
140
+ ### Audit Phase 1: INVENTORY — Build the Source-to-Test Map
141
+
142
+ 1. **Enumerate source files**: glob for `.ts`, `.tsx`, `.js`, `.jsx` under the
143
+ project's source roots (e.g., `src/`, `packages/*/src/`). Skip `node_modules`,
144
+ `dist`, build outputs, and fixtures.
145
+ 2. **Enumerate test files**: glob for `*.test.*`, `*.spec.*`, and files under
146
+ `__tests__/` and parallel `tests/` directories.
147
+ 3. **Map source → test**: for each source file, find its test file using the
148
+ Tier 1 / Tier 2 / Tier 3 strategies described in `Phase 2: DISCOVER`. With a
149
+ graph, prefer `get_impact`; without one, use naming conventions and import
150
+ parsing.
151
+ 4. **Split**: produce two lists — `covered` (source files with at least one
152
+ matching test) and `uncovered` (source files with no matching test).
153
+
154
+ ### Audit Phase 2: QUALITY REVIEW — Critique Covered Test Files
155
+
156
+ 1. **Cap at 10 files per run**: a deep quality review is expensive. Pick the
157
+ top 10 covered files prioritized by size (lines of code) and criticality
158
+ (depth in the graph / co-change frequency). The remaining covered files are
159
+ accepted as-is for this run.
160
+ 2. **For each of the 10**: dispatch `canary:canary-review-test` against the
161
+ test file. Collect its findings (missing edge cases, anti-patterns,
162
+ brittleness, oracle gaps).
163
+ 3. **Aggregate**: bin findings by severity (high / medium / low) and by file.
164
+
165
+ ### Audit Phase 3: GAP REPORT — Synthesize a Unified Coverage Plan
166
+
167
+ Emit a single report with three sections:
168
+
169
+ ```
170
+ ## Coverage Audit Report
171
+
172
+ ### Uncovered Files (no test found)
173
+ | File | Lines | Priority | Suggested Action |
174
+ |------|-------|----------|------------------|
175
+ | src/services/billing.ts | 412 | high | canary:canary-write-test |
176
+ | src/utils/format.ts | 38 | low | canary:canary-write-test |
177
+
178
+ ### Quality Gaps (from Quality Review, capped at 10 reviewed)
179
+ | Test File | Severity | Top Gap |
180
+ |-----------|----------|---------|
181
+ | tests/services/auth.test.ts | high | no failure-path assertions |
182
+ | tests/utils/date.test.ts | med | mock leaks across cases |
183
+
184
+ ### Recommended Next Steps
185
+ - Generate tests for high-priority uncovered files via `canary:canary-write-test`.
186
+ - Resolve high-severity quality gaps via `canary:canary-review-test` follow-ups.
187
+ - For uncovered files, pick a framework first: when Phase 0 reported `available`, call
188
+ the `canary_recommend_framework` MCP tool with a prompt describing the file's purpose
189
+ (deterministic, no LLM round-trip) and put its `framework` in the Suggested Action.
190
+ When `degraded`, fall back to the `canary:canary-pick-framework` plugin.
191
+ ```
192
+
115
193
  ## Harness Integration
116
194
 
117
195
  - **`harness scan`** — Recommended before this skill for full graph-enhanced analysis. If graph is missing, skill uses naming convention and import parsing fallbacks.
@@ -1,6 +1,6 @@
1
1
  name: harness-test-advisor
2
2
  version: "1.0.0"
3
- description: Graph-based test selection — answers "what tests should I run?"
3
+ description: Graph-based test selection and project-wide coverage audit — answers "what tests should I run?" or "what's untested?"
4
4
  stability: static
5
5
  cognitive_mode: advisory-guide
6
6
  triggers:
@@ -25,6 +25,9 @@ cli:
25
25
  - name: files
26
26
  description: Comma-separated list of changed files
27
27
  required: false
28
+ - name: audit
29
+ description: Run Coverage Audit mode (project-wide gap analysis) instead of test selection
30
+ required: false
28
31
  mcp:
29
32
  tool: run_skill
30
33
  input:
@@ -29,6 +29,8 @@ Detect plugin-only state by checking whether `harness` resolves on PATH (`comman
29
29
 
30
30
  ## Process
31
31
 
32
+ **Prompt the human in plain text** — every framework confirmation, migration check, and telemetry-identity question in this skill is plain text only. Do not elevate to `AskUserQuestion`: the framework list (~10 options) exceeds its 4-option cap and natural headers like "Confirm framework" exceed its 12-char cap, rendering the call as ERR.
33
+
32
34
  ### Phase 1: ASSESS — Determine Current State
33
35
 
34
36
  1. **Check for existing harness configuration.** Look for `.harness/` directory, `AGENTS.md`, `harness.config.json`, and any skill definitions. Their presence determines whether this is a new project or a migration.
@@ -96,7 +98,7 @@ Detect plugin-only state by checking whether `harness` resolves on PATH (`comman
96
98
  5. **Configure i18n (all levels).** Ask: "Will this project support multiple languages?" Based on the answer:
97
99
  - **Yes:** Invoke `harness-i18n-workflow` configure phase to set up i18n config in `harness.config.json` (source locale, target locales, framework, strictness). Then invoke `harness-i18n-workflow` scaffold phase to create translation file structure and extraction config. Set `i18n.enabled: true`.
98
100
  - **No:** Set `i18n.enabled: false` in `harness.config.json`. The `harness-i18n-process` skill will still fire gentle prompts for unconfigured projects when features touch user-facing strings.
99
- - **Not sure yet:** Skip i18n configuration entirely. Do not set `i18n.enabled`. The project can enable i18n later by running `harness-i18n-workflow` directly.
101
+ - **Not sure:** Skip i18n configuration entirely. Do not set `i18n.enabled`. The project can enable i18n later by running `harness-i18n-workflow` directly.
100
102
 
101
103
  5b. **Configure design system (non-test-suite projects).** Ask: "Will this project have a UI requiring a design system?" Mirror the i18n step's three-way response shape. Use `emit_interaction`:
102
104
 
@@ -136,10 +138,64 @@ Detect plugin-only state by checking whether `harness` resolves on PATH (`comman
136
138
  Based on the answer:
137
139
  - **Yes:** Ask a follow-up: "Which platforms? `web`, `mobile`, or both?" Write `design.enabled: true` and `design.platforms: [...]` (a non-empty array of `web` and/or `mobile`) to `harness.config.json`. Inform the user: "Design tokens will be generated when you start your first design-touching feature — `harness-design-system` fires automatically via `on_new_feature`."
138
140
  - **No:** Write `design.enabled: false` to `harness.config.json`. Do not write `design.platforms`. The `on_new_feature` trigger respects this flag and will not fire `harness-design-system`.
139
- - **Not sure yet:** Do not write `design.enabled` or `design.platforms`. The project can enable design later by running `harness-design-system` directly; `on_new_feature` will prompt gently when a feature touches user-facing UI.
141
+ - **Not sure:** Do not write `design.enabled` or `design.platforms`. The project can enable design later by running `harness-design-system` directly; `on_new_feature` will prompt gently when a feature touches user-facing UI.
140
142
 
141
143
  **Skip this step entirely if Phase 1 step 5 classified the project as a test suite.** Test-suite projects will be dispatched at step 6 below to `initialize-test-suite-project` and have no UI to govern.
142
144
 
145
+ 5c. **Capture strategic anchor (all levels).** Offer a three-way prompt for `STRATEGY.md` — the durable upstream product anchor read by `harness-brainstorming`, `harness-ideate`, and `harness-roadmap-pilot`. Use `emit_interaction`:
146
+
147
+ ```json
148
+ emit_interaction({
149
+ type: "question",
150
+ question: {
151
+ text: "Capture strategic anchor (STRATEGY.md) now?",
152
+ options: [
153
+ {
154
+ label: "Yes — run the strategy interview",
155
+ pros: [
156
+ "Grounds brainstorm/ideate/roadmap-pilot in product-level context",
157
+ "Durable across milestones and phases (peer of README.md)"
158
+ ],
159
+ cons: ["Adds an interview (10-20 minutes) to init"],
160
+ risk: "low",
161
+ effort: "medium"
162
+ },
163
+ {
164
+ label: "No — this project does not need a strategy doc",
165
+ pros: ["Permanent decline recorded; init does not re-ask on rerun"],
166
+ cons: ["Re-running init will not re-offer; user must run /harness:strategy manually"],
167
+ risk: "low",
168
+ effort: "low"
169
+ },
170
+ {
171
+ label: "Not sure yet",
172
+ pros: ["Decision deferred without commitment", "Can run /harness:strategy later"],
173
+ cons: ["No decline flag set; init may re-offer on rerun"],
174
+ risk: "low",
175
+ effort: "low"
176
+ }
177
+ ],
178
+ recommendation: { optionIndex: 0, reason: "Strategy grounds brainstorm/ideate/roadmap-pilot — value compounds as the project grows", confidence: "medium" }
179
+ }
180
+ })
181
+ ```
182
+
183
+ Before prompting, check whether `STRATEGY.md` already exists at repo root. Three cases:
184
+
185
+ - **Absent (most common on init).** Present the prompt above. Apply the answer:
186
+ - **Yes:** delegate to `harness-strategy` (which routes via its own Phase 0 to the first-run interview). When `harness-strategy` completes, continue with step 6.
187
+ - **No:** write `init.strategy.declined: true` to `.harness/state.json` (merge into existing JSON; do not clobber). This is the explicit decline location; re-running init detects the flag and skips the prompt.
188
+ - **Not sure:** no state write. `/harness:strategy` remains available standalone, and a future re-run of init will re-offer.
189
+
190
+ - **Present and valid.** Skip the prompt silently. Surface a one-line note: `STRATEGY.md detected — downstream skills will pick it up as grounding`. No `init.strategy.declined` write.
191
+
192
+ - **Present but invalid.** Surface the validation error verbatim (run a Node one-liner that imports `validateStrategy` from `@harness-engineering/core` and pipes the error). Offer three paths (mirror `harness-strategy` Phase 0):
193
+ - **a) Fix now via `/harness:strategy` update** → delegate to `harness-strategy` with the broken section pre-selected.
194
+ - **b) Move file to `STRATEGY.md.bak.<YYYY-MM-DD-HHmm>` and run a fresh interview** → rename, then delegate to `harness-strategy` Phase 1.
195
+ - **c) Ignore for this init and proceed** → record `init.strategy.declined: true` and continue. Init does NOT block on present-but-invalid STRATEGY.md.
196
+
197
+ Mirror the i18n / design-system pattern: ask once, record the answer, never silently skip.
198
+
143
199
  6. **Test-suite projects only — dispatch to `initialize-test-suite-project`.** If Phase 1 step 5 classified this as a test suite, invoke `initialize-test-suite-project` now and let it own archetype selection, shared-library decision, layer variants (A self-contained vs B consumer), ESLint flat-config fix, tag taxonomy, reporter stack, custom report, and the "prove the guards fire" verification. Return here for Phase 4 step 4+ (knowledge graph, roadmap, commit). Product and service projects skip this step entirely.
144
200
 
145
201
  ### Phase 4: VALIDATE — Confirm Everything Works
@@ -249,7 +305,7 @@ This phase closes the parity gap that the marketplace plugin install does not co
249
305
 
250
306
  Based on the answer:
251
307
  - **Yes:** Invoke `harness-roadmap` (skill) or run `/harness:roadmap --create` to create `docs/roadmap.md`. Verify the file exists. The `manage_roadmap` MCP tool is for managing entries in an existing roadmap, not for creating one.
252
- - **If `design.enabled === true` in `harness.config.json`** (set by Phase 3 step 5b), call `manage_roadmap` with `action: add`, `feature: "Set up design system"`, `status: "planned"`, `milestone: "Current Work"`, `summary: "Run harness-design-system to define palette, typography, and generate W3C DTCG tokens. Deferred from project init — fires on first design-touching feature via on_new_feature."`. Skip silently if `manage_roadmap show` reports a duplicate `(feature, milestone)` pair. This closes the loop between deferred design intent and visible planning work.
308
+ - **If `design.enabled === true` in `harness.config.json`** (set by Phase 3 step 5b), call `manage_roadmap` with `action: add`, `feature: "Set up design system"`, `status: "planned"`, `milestone: "Intake"`, `summary: "Run harness-design-system to define palette, typography, and generate W3C DTCG tokens. Deferred from project init — fires on first design-touching feature via on_new_feature."`. Skip silently if `manage_roadmap show` reports a duplicate `(feature, milestone)` pair. This closes the loop between deferred design intent and visible planning work.
253
309
  - **No:** Skip silently. The user can still run `/harness:roadmap --create` later — that informational fallback remains valid.
254
310
 
255
311
  2. **Commit the initialization.** All generated, configured, and instrumentation files in a single commit. Include `harness.config.json`, `AGENTS.md`, `.harness/arch/baselines.json`, `.harness/telemetry.json` (if created), updates to project `.mcp.json` (if Tier-0 integrations were wired), and any roadmap files.
@@ -269,9 +325,11 @@ This phase closes the parity gap that the marketplace plugin install does not co
269
325
  - **`harness integrations list` / `harness integrations add <name>`** — Phase 5 step 6. Lists Tier-0 (zero-config) and Tier-1 (API-key) MCP integrations and adds them to project `.mcp.json`.
270
326
  - **`harness-i18n-workflow configure` + `harness-i18n-workflow scaffold`** — Invoked during Phase 3 if the project will support multiple languages. Sets up i18n configuration and translation file structure.
271
327
  - **`harness-design-system` (deferred via `on_new_feature`)** — Phase 3 step 5b records `design.enabled` + `design.platforms` in `harness.config.json` but does NOT run the full design-system skill. Token generation defers to the first design-touching feature, where `harness-design-system` fires via `on_new_feature` and reads `design.enabled` to decide whether to proceed.
328
+ - **`harness-strategy`** — Phase 3 step 5c delegates to this skill on "Yes". The skill conducts a first-run interview (pushback rules with a 2-round cap per section) and writes a valid `STRATEGY.md` at repo root via `writeStrategyDoc`. On "No" init writes `init.strategy.declined: true` to `.harness/state.json`. On "not sure" no state is written; the user can run `/harness:strategy` standalone. When `STRATEGY.md` already exists and is valid the prompt is skipped; when present-but-invalid the user gets the three-path repair offer.
329
+ - **`validateStrategy`** — `@harness-engineering/core` helper used by Phase 3 step 5c to detect present-but-invalid `STRATEGY.md`. Invoked through a Node one-liner so init does not require importing core directly.
272
330
  - **`initialize-test-suite-project`** — Sub-skill. Invoked during Phase 3 step 6 when Phase 1 step 5 classified the project as a test suite. Owns archetype selection, shared-library vs in-repo decision, layer variants, tag taxonomy, reporter stack, custom report, and "prove the guards fire" verification.
273
331
  - **`harness-roadmap` skill** — Phase 6 step 1 invokes this skill (or `/harness:roadmap --create`) when the user opts in to creating `docs/roadmap.md`. The `manage_roadmap` MCP tool does not create roadmaps; it manages entries in an existing one.
274
- - **`manage_roadmap` MCP tool** — Phase 6 step 1, when `design.enabled === true`, calls `manage_roadmap` with `action: add` to insert a `planned` "Set up design system" item under milestone `Current Work` with a summary describing the deferred work.
332
+ - **`manage_roadmap` MCP tool** — Phase 6 step 1, when `design.enabled === true`, calls `manage_roadmap` with `action: add` to insert a `planned` "Set up design system" item under milestone `Intake` with a summary describing the deferred work.
275
333
 
276
334
  ## Success Criteria
277
335
 
@@ -284,25 +342,29 @@ This phase closes the parity gap that the marketplace plugin install does not co
284
342
  - The adoption level matches what was agreed upon with the human
285
343
  - All generated files are committed in a single atomic commit
286
344
  - i18n configuration is set if the human chose to enable it during init
287
- - For non-test-suite projects, the design-system question was asked and `harness.config.json` reflects the answer: `design.enabled: true` (with `design.platforms` populated) for yes, `design.enabled: false` for no, or absent for not-sure.
345
+ - For non-test-suite projects, the design-system question was asked and `harness.config.json` reflects the answer: `design.enabled: true` (with `design.platforms` populated) for yes, `design.enabled: false` for no, or absent for not sure.
346
+ - The strategy question (Phase 3 step 5c) was asked unless `STRATEGY.md` already existed and was valid (in which case the prompt was skipped silently with a one-line detection note). The answer was recorded according to the documented semantics: Yes → `STRATEGY.md` exists and `harness validate` passes against `StrategyDocSchema`; No → `.harness/state.json` contains `init.strategy.declined: true`; Not sure → no `STRATEGY.md` and no `init.strategy.declined` flag.
288
347
  - **Phase 5 (INSTRUMENT) outputs:** `.harness/graph/` is populated; `.harness/arch/baselines.json` exists; `harness check-perf` ran without errors (intermediate and above); `.harness/telemetry.json` exists if the human opted into identity tagging; legacy layout warnings were surfaced via `harness migrate --dry-run` and either resolved or explicitly deferred; Tier-0 MCP integrations (context7, sequential-thinking, playwright) are present in the project's `.mcp.json` (or the human declined and that decision is recorded).
289
348
  - The roadmap question was asked. If the user answered yes, `docs/roadmap.md` exists and was created via `harness-roadmap` (or the documented `/harness:roadmap --create` fallback).
290
- - When `design.enabled === true` AND the user answered yes to the roadmap question, `docs/roadmap.md` contains a `planned` entry titled "Set up design system" under milestone `Current Work` with a summary describing the deferred work. The entry is absent in all other answer combinations.
349
+ - When `design.enabled === true` AND the user answered yes to the roadmap question, `docs/roadmap.md` contains a `planned` entry titled "Set up design system" under milestone `Intake` with a summary describing the deferred work. The entry is absent in all other answer combinations.
291
350
  - For test suites: `initialize-test-suite-project` ran to completion and its Success Criteria are also met
292
351
  - For plugin-only invocations: every CLI invocation in this skill ran successfully via `npx @harness-engineering/cli <cmd>` without requiring a global install. If any invocation failed because the npx download failed, the human was prompted to retry or `npm install -g @harness-engineering/cli` instead.
293
352
 
294
353
  ## Rationalizations to Reject
295
354
 
296
- | Rationalization | Why It Is Wrong |
297
- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
298
- | "The generated AGENTS.md template looks fine -- no need to customize it" | Phase 3 says do not blindly accept generated content. Without project-specific descriptions, agents receive generic instructions. |
299
- | "We should start at the advanced level since we want full coverage" | The skill recommends basic for new projects. Each level builds on the previous. Jumping to advanced creates misconfigured rules. |
300
- | "I will skip the i18n question to keep setup fast" | Phase 3 requires asking about i18n and recording the decision. Skipping creates ambiguity about whether the omission was intentional. |
301
- | "I will skip the design-system question to keep setup fast" | Phase 3 step 5b requires asking about design and recording the answer in `design.enabled`. Skipping creates ambiguity about whether the omission was intentional and bypasses the linkage between init and the deferred `harness-design-system` invocation on `on_new_feature`. |
302
- | "Validation passed, so the project is ready" | Phase 5 captures baselines, configures telemetry identity, surfaces legacy warnings, and wires Tier-0 integrations. Validation alone is not sufficient. |
303
- | "Plugin install means setup is done" | The marketplace plugin ships skills, slash commands, subagents, hooks, and MCP but it cannot mutate the user's project state. `harness.config.json`, baselines, telemetry identity, and Tier-0 integrations require running this skill once per project. |
304
- | "Skip Phase 5 if we already ran `harness setup`" | Phase 5 is idempotent. It safely no-ops where setup already wired things and fills gaps where it didn't (common case: setup ran once, then a new Tier-0 integration was added or a layout was migrated). Re-running is the right behavior. |
305
- | "This is a test suite, we'll configure layers in this skill" | Phase 3 step 6 dispatches to `initialize-test-suite-project` for archetype selection, layer variants, and the rest. Do not inline test-suite-specific configuration here the sub-skill owns it and carries the gotchas. |
355
+ | Rationalization | Why It Is Wrong |
356
+ | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
357
+ | "The generated AGENTS.md template looks fine -- no need to customize it" | Phase 3 says do not blindly accept generated content. Without project-specific descriptions, agents receive generic instructions. |
358
+ | "We should start at the advanced level since we want full coverage" | The skill recommends basic for new projects. Each level builds on the previous. Jumping to advanced creates misconfigured rules. |
359
+ | "I will skip the i18n question to keep setup fast" | Phase 3 requires asking about i18n and recording the decision. Skipping creates ambiguity about whether the omission was intentional. |
360
+ | "I will skip the design-system question to keep setup fast" | Phase 3 step 5b requires asking about design and recording the answer in `design.enabled`. Skipping creates ambiguity about whether the omission was intentional and bypasses the linkage between init and the deferred `harness-design-system` invocation on `on_new_feature`. |
361
+ | "I will skip the strategy question — it's just paperwork" | Phase 3 step 5c is the only point in the workflow where init asks the user to capture the strategic anchor. Skipping bypasses the grounding signal that brainstorming, ideate, and roadmap-pilot read; downstream skill output degrades silently. Even a "no" or "not sure" answer is better than no answer because it locks in the decision (or absence of one). |
362
+ | "STRATEGY.md exists already, so I should re-run the interview to refresh it" | When `STRATEGY.md` is present and valid, Phase 3 step 5c skips the prompt silently. Refreshing strategy mid-init is out of scope that is what the standalone `/harness:strategy` update flow is for. Surface a one-line detection note and continue. |
363
+ | "STRATEGY.md is present but invalid, so I should block init" | Phase 3 step 5c explicitly does NOT block. It surfaces the validation error, offers three repair paths (fix now / move-to-bak / ignore), and continues based on the user's choice. Init is the wrong place to gate on strategy correctness. |
364
+ | "Validation passed, so the project is ready" | Phase 5 captures baselines, configures telemetry identity, surfaces legacy warnings, and wires Tier-0 integrations. Validation alone is not sufficient. |
365
+ | "Plugin install means setup is done" | The marketplace plugin ships skills, slash commands, subagents, hooks, and MCP — but it cannot mutate the user's project state. `harness.config.json`, baselines, telemetry identity, and Tier-0 integrations require running this skill once per project. |
366
+ | "Skip Phase 5 if we already ran `harness setup`" | Phase 5 is idempotent. It safely no-ops where setup already wired things and fills gaps where it didn't (common case: setup ran once, then a new Tier-0 integration was added or a layout was migrated). Re-running is the right behavior. |
367
+ | "This is a test suite, we'll configure layers in this skill" | Phase 3 step 6 dispatches to `initialize-test-suite-project` for archetype selection, layer variants, and the rest. Do not inline test-suite-specific configuration here — the sub-skill owns it and carries the gotchas. |
306
368
 
307
369
  ## Examples
308
370
 
@@ -377,6 +439,11 @@ Step 5b (design): "Will this project have a UI requiring a design system?"
377
439
  Inform: "Design tokens will be generated when you start your first design-touching
378
440
  feature — harness-design-system fires automatically via on_new_feature."
379
441
 
442
+ Step 5c (strategy): "Capture strategic anchor (STRATEGY.md) now?"
443
+ Human: "Yes."
444
+ Delegate to harness-strategy → first-run interview → STRATEGY.md written.
445
+ Result: STRATEGY.md exists at repo root; harness validate passes against StrategyDocSchema.
446
+
380
447
  Step 6 (test-suite dispatch): skipped (not a test suite).
381
448
  ```
382
449
 
@@ -393,7 +460,7 @@ Step 4 (roadmap): "Set up a project roadmap now?"
393
460
  design.enabled === true detected → manage_roadmap action: add
394
461
  feature: "Set up design system"
395
462
  status: planned
396
- milestone: Current Work
463
+ milestone: Intake
397
464
  summary: "Run harness-design-system to define palette, typography, and generate W3C DTCG tokens..."
398
465
  Result: docs/roadmap.md contains the planned design item.
399
466
 
@@ -405,7 +472,7 @@ git add harness.config.json .harness/ AGENTS.md docs/roadmap.md
405
472
  git commit -m "feat: initialize harness project with design and roadmap"
406
473
  ```
407
474
 
408
- **Final state:** `harness.config.json` has `design.enabled: true` + `design.platforms: ["web"]`; `docs/roadmap.md` lists "Set up design system" as a `planned` item under `Current Work`; on the first feature touching UI, `on_new_feature` fires `harness-design-system` which reads `design.enabled` and runs the full discover/define/generate/validate flow.
475
+ **Final state:** `harness.config.json` has `design.enabled: true` + `design.platforms: ["web"]`; `docs/roadmap.md` lists "Set up design system" as a `planned` item under `Intake`; on the first feature touching UI, `on_new_feature` fires `harness-design-system` which reads `design.enabled` and runs the full discover/define/generate/validate flow.
409
476
 
410
477
  ### Example: Migrating Existing Project from Basic to Intermediate
411
478
 
@@ -482,6 +549,7 @@ npx @harness-engineering/cli init # auto-detects framework
482
549
  Customize AGENTS.md with project-specific content.
483
550
  Phase 3 step 5 (i18n): "No, English only." → i18n.enabled = false.
484
551
  Phase 3 step 5b (design): "No, this is a backend service." → design.enabled = false.
552
+ Phase 3 step 5c (strategy): "not sure." → no STRATEGY.md, no init.strategy.declined flag; user can run /harness:strategy later.
485
553
  Phase 3 step 6 (test-suite dispatch): not a test suite, skipped.
486
554
  ```
487
555
 
@@ -35,3 +35,4 @@ state:
35
35
  depends_on:
36
36
  - initialize-test-suite-project
37
37
  - harness-design-system
38
+ - harness-roadmap
@@ -0,0 +1,97 @@
1
+ # Outcome Eval
2
+
3
+ > Post-execution LLM-judgment: did the implementation actually satisfy its spec? Reads the spec's acceptance section, the change diff, and test output, and emits a confidence-rated `OutcomeVerdict` (`SATISFIED | NOT_SATISFIED | INCONCLUSIVE`) with a rationale and unmet criteria. Ship authority is derived in TypeScript, never trusted from the LLM: a high-confidence `NOT_SATISFIED` blocks ship; every other verdict is advisory. The harness's first blocking post-execution spec-satisfaction gate (the roadmap's named #1 gap). Each verdict persists as an `execution_outcome` node, compounding into skill-effectiveness baselines.
4
+
5
+ ## When to Use
6
+
7
+ - At orchestrator step 6.5 — after Code Review, before Ship — on every change with a spec.
8
+ - When you need a durable, structured answer to "did this code do what the spec said?"
9
+ - NOT for pre-execution risk simulation (use PESL).
10
+ - NOT for rule-based floors (lint/architecture/entropy) or craft ceilings (naming/spec/security) — those run elsewhere.
11
+ - NOT for auto-remediation. outcome-eval judges; it does not fix.
12
+ - NOT when no judgable spec section exists — the verdict degrades to INCONCLUSIVE/advisory and never blocks.
13
+
14
+ ## Process
15
+
16
+ ### Phase 1: GATHER — Collect inputs
17
+
18
+ 1. Capture the change under judgment as a unified diff: `git diff` (or `git diff <base>...HEAD` for a branch). Record it as `diff`.
19
+ 2. Capture test-runner output. If a test command is known, run it and capture stdout+stderr as `testOutput`; otherwise pass the most recent captured output. Empty/unparseable test output is tolerated (degrades to advisory).
20
+ 3. Resolve the spec path. Prefer the spec under `docs/changes/<feature>/proposal.md` for the current change. Record as `specPath`.
21
+
22
+ ### Phase 2: RESOLVE — Find the judgment section
23
+
24
+ The evaluator resolves the section internally via the fallback chain `## Success Criteria` -> `## User-Visible Behavior` -> `## Overview`, recording the match in `judgedAgainst`. No manual action — pass `specPath` and let `OutcomeEvaluator` resolve. If no section is judgable, the verdict is INCONCLUSIVE/advisory.
25
+
26
+ ### Phase 3: JUDGE — Invoke the evaluator
27
+
28
+ 1. Invoke the MCP tool `mcp__harness__outcome_eval` with `{ specPath, diff, testOutput }` (optional `model`). The tool constructs `OutcomeEvaluator` cli-side and calls `evaluate({ specPath, diff, testOutput })`; the supported v1 provider is the anthropic analysis provider (`ANTHROPIC_API_KEY`).
29
+ 2. **`diff` and `testOutput` are required inputs and the agent MUST supply them** from the session (`git diff` + captured test-runner output). They are the evidence the judge reasons over — passing an empty `diff` or empty `testOutput` is the degradation path, not the normal path: the verdict degrades to INCONCLUSIVE/advisory (never blocking), which defeats the gate. Do not invoke the tool without real diff/test content.
30
+ 3. The LLM returns ONLY `verdict / confidence / rationale / unmetCriteria`. `authority` is computed in TypeScript from `(verdict, confidence)` and is never read from the LLM — do not attempt to override it. The tool returns the verdict exactly as the evaluator derives it.
31
+ 4. The call is degrade-safe: provider failure (incl. no `ANTHROPIC_API_KEY`), empty diff, empty test output, or missing judgable section yields INCONCLUSIVE/low/advisory. It never throws and never blocks.
32
+
33
+ ### Phase 4: GATE — Render and (conditionally) halt
34
+
35
+ 1. Render the verdict: `verdict`, `confidence`, `judgedAgainst`, `rationale`, and `unmetCriteria`.
36
+ 2. Authority rule (must match `deriveAuthority`): authority is `blocking` **iff** `verdict === 'NOT_SATISFIED' && confidence === 'high'`; every other combination — including all `INCONCLUSIVE` and `SATISFIED` cases, and all `medium`/`low` `NOT_SATISFIED` — is `advisory`.
37
+ 3. **On a blocking verdict: HALT before the Ship step.** Report the unmet criteria and stop; do not proceed to step 7. Resolution requires fixing the implementation (or the spec) and re-running outcome-eval.
38
+ 4. On an advisory verdict: report it and proceed. Advisory `NOT_SATISFIED` is surfaced for human attention but does not stop the workflow.
39
+
40
+ ## Harness Integration
41
+
42
+ - **`mcp__harness__outcome_eval`** — MCP tool (the invocation surface). Inputs: `specPath` (required), `diff` (required), `testOutput` (required), `model` (optional), `path` (optional project root for graph persistence). The agent supplies `diff` and `testOutput` from the session; omitting them degrades the verdict to INCONCLUSIVE/advisory (never blocking). The handler builds the cli `AnalysisProvider` + a `GraphStore`, constructs `OutcomeEvaluator`, and returns the `OutcomeVerdict` with authority exactly as derived in TypeScript.
43
+ - **Evaluator surface:** `OutcomeEvaluator`, `deriveAuthority`, `verdictSchema`, `OutcomeVerdict` are exported from `@harness-engineering/intelligence`.
44
+ - **Provider path (v1 supported):** the anthropic analysis provider (`ANTHROPIC_API_KEY`). When no provider is configured the call degrades to INCONCLUSIVE/advisory. The openai-compatible _strict_ structured-output path is a known follow-up (see Known Limitations).
45
+ - **Orchestrator:** runs as step 6.5 between Code Review and Ship in `harness.orchestrator.md`.
46
+ - **Persistence:** each `evaluate()` writes one `execution_outcome` node via `ExecutionOutcomeConnector`, consumable by `effectiveness/scorer.ts`.
47
+
48
+ ## Known Limitations
49
+
50
+ - **INCONCLUSIVE persistence:** the persisted node maps `INCONCLUSIVE -> result: 'failure'` for type-validity, but it OMITS `agentPersona` and writes `affectedSystemNodeIds: []`. The effectiveness scorer (`gatherOutcomes`) ignores any node missing `agentPersona` or `outcome_of` edges, so outcome-eval nodes are **scorer-non-counting** in v1 — the INCONCLUSIVE-as-failure mapping is therefore harmless and does not punish any persona. If a future change attaches persona/affected-system attribution, it MUST first change INCONCLUSIVE modeling (do not persist INCONCLUSIVE, or use a distinct result value the scorer excludes) before the node becomes scorer-counted.
51
+ - **openai-compatible strict mode:** `zodToJsonSchema` does not emit `additionalProperties: false`, which OpenAI strict structured output requires. The v1 supported path is claude-cli / anthropic. Follow-up tracked.
52
+ - **CI required-check wiring:** deferred to roadmap #540 (unbuilt CI workflow template).
53
+
54
+ ## Success Criteria
55
+
56
+ See `docs/changes/outcome-eval/proposal.md` for the full 9 criteria. This skill satisfies SC8 (orchestrator step 6.5 + blocking halt) and SC9 (introduces no new `harness validate` findings; layer rules respected).
57
+
58
+ ## Examples
59
+
60
+ ### Example: NOT_SATISFIED with high confidence (blocks)
61
+
62
+ **Input:** spec Success Criteria require `GET /api/users/:id` to return 404 with `{ error: 'User not found' }`; the diff implements the happy path only, no 404 branch; test output shows the 404 test failing.
63
+
64
+ **Verdict:**
65
+
66
+ ```
67
+ verdict: NOT_SATISFIED
68
+ confidence: high
69
+ judgedAgainst: success-criteria
70
+ authority: blocking
71
+ unmetCriteria:
72
+ - "404 path for nonexistent user is unimplemented; the failing test asserts { error: 'User not found' }."
73
+ rationale: "The diff adds the lookup but returns 200 with an empty body when the user is missing."
74
+ ```
75
+
76
+ **Action:** HALT before Ship. Report unmet criteria; do not open the PR.
77
+
78
+ ### Example: partial implementation (advisory)
79
+
80
+ **Input:** the diff meets most criteria; one acceptance item is ambiguous in the diff.
81
+
82
+ **Verdict:** `NOT_SATISFIED confidence: medium authority: advisory` — surfaced for review, workflow proceeds.
83
+
84
+ ## Gates
85
+
86
+ - **Authority is never read from the LLM.** The verdict's `authority` is always `deriveAuthority(verdict, confidence)` computed in TypeScript. If you find yourself letting the model assert blocking/advisory, STOP — that defeats the entire purpose of this gate.
87
+ - **Block only on high-confidence NOT_SATISFIED.** `authority === 'blocking'` iff `verdict === 'NOT_SATISFIED' && confidence === 'high'`. Every other combination — all `SATISFIED`, all `INCONCLUSIVE`, and every `medium`/`low` `NOT_SATISFIED` — is advisory. Do not halt the workflow on an advisory verdict.
88
+ - **Always supply `diff` and `testOutput`.** Omitting them degrades the verdict to INCONCLUSIVE/advisory (a silent false-negative at the ship gate). Gather them from the session before invoking the tool.
89
+ - **Never block on infrastructure noise.** A provider failure, an unparseable response, or a missing spec must resolve to INCONCLUSIVE/advisory, never a thrown error or a block. The evaluator enforces this; do not reintroduce a hard failure in the wrapper.
90
+ - **Do not skip step 6.5.** The gate runs after Code Review and before Ship. A blocking verdict halts before step 7; it is not optional.
91
+
92
+ ## Escalation
93
+
94
+ - **Blocking verdict the author disputes:** the resolution is to fix the implementation (or amend the spec's Success Criteria if they were wrong) and re-run outcome-eval — not to override the gate. If the spec itself is wrong, that is a spec change, reviewed on its own merits.
95
+ - **Repeated INCONCLUSIVE on a real change:** usually means `diff`/`testOutput` were not supplied, or no judgable section exists in the spec. Confirm inputs and that the spec has a Success Criteria / User-Visible Behavior / Overview section.
96
+ - **No `ANTHROPIC_API_KEY` configured:** every verdict degrades to INCONCLUSIVE/advisory and nothing blocks. Surface this to the human — the gate is effectively disabled until a provider is configured.
97
+ - **Verdict seems wrong (false positive/negative):** capture the spec section, diff, and verdict, and route to the maintainers; do not loosen the conservative-confidence prompt ad hoc.