@harness-engineering/cli 1.27.1 → 1.28.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 (108) hide show
  1. package/dist/agents/skills/claude-code/harness-architecture-advisor/SKILL.md +17 -5
  2. package/dist/agents/skills/claude-code/harness-architecture-advisor/skill.yaml +1 -1
  3. package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +4 -4
  4. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +1 -1
  5. package/dist/agents/skills/claude-code/harness-design-system/SKILL.md +6 -1
  6. package/dist/agents/skills/claude-code/harness-execution/SKILL.md +4 -4
  7. package/dist/agents/skills/claude-code/harness-i18n-process/SKILL.md +2 -2
  8. package/dist/agents/skills/claude-code/harness-integration/SKILL.md +1 -1
  9. package/dist/agents/skills/claude-code/harness-knowledge-pipeline/SKILL.md +1 -0
  10. package/dist/agents/skills/claude-code/harness-onboarding/SKILL.md +1 -1
  11. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +3 -3
  12. package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +4 -3
  13. package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +150 -10
  14. package/dist/agents/skills/claude-code/initialize-harness-project/skill.yaml +2 -1
  15. package/dist/agents/skills/codex/harness-architecture-advisor/SKILL.md +17 -5
  16. package/dist/agents/skills/codex/harness-architecture-advisor/skill.yaml +1 -1
  17. package/dist/agents/skills/codex/harness-autopilot/SKILL.md +4 -4
  18. package/dist/agents/skills/codex/harness-code-review/SKILL.md +1 -1
  19. package/dist/agents/skills/codex/harness-design-system/SKILL.md +6 -1
  20. package/dist/agents/skills/codex/harness-execution/SKILL.md +4 -4
  21. package/dist/agents/skills/codex/harness-i18n-process/SKILL.md +2 -2
  22. package/dist/agents/skills/codex/harness-integration/SKILL.md +1 -1
  23. package/dist/agents/skills/codex/harness-knowledge-pipeline/SKILL.md +1 -0
  24. package/dist/agents/skills/codex/harness-onboarding/SKILL.md +1 -1
  25. package/dist/agents/skills/codex/harness-planning/SKILL.md +3 -3
  26. package/dist/agents/skills/codex/harness-roadmap/SKILL.md +4 -3
  27. package/dist/agents/skills/codex/initialize-harness-project/SKILL.md +150 -10
  28. package/dist/agents/skills/codex/initialize-harness-project/skill.yaml +2 -1
  29. package/dist/agents/skills/cursor/harness-architecture-advisor/SKILL.md +17 -5
  30. package/dist/agents/skills/cursor/harness-architecture-advisor/skill.yaml +1 -1
  31. package/dist/agents/skills/cursor/harness-autopilot/SKILL.md +4 -4
  32. package/dist/agents/skills/cursor/harness-code-review/SKILL.md +1 -1
  33. package/dist/agents/skills/cursor/harness-design-system/SKILL.md +6 -1
  34. package/dist/agents/skills/cursor/harness-execution/SKILL.md +4 -4
  35. package/dist/agents/skills/cursor/harness-i18n-process/SKILL.md +2 -2
  36. package/dist/agents/skills/cursor/harness-integration/SKILL.md +1 -1
  37. package/dist/agents/skills/cursor/harness-knowledge-pipeline/SKILL.md +1 -0
  38. package/dist/agents/skills/cursor/harness-onboarding/SKILL.md +1 -1
  39. package/dist/agents/skills/cursor/harness-planning/SKILL.md +3 -3
  40. package/dist/agents/skills/cursor/harness-roadmap/SKILL.md +4 -3
  41. package/dist/agents/skills/cursor/initialize-harness-project/SKILL.md +150 -10
  42. package/dist/agents/skills/cursor/initialize-harness-project/skill.yaml +2 -1
  43. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +17 -5
  44. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/skill.yaml +1 -1
  45. package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +4 -4
  46. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +1 -1
  47. package/dist/agents/skills/gemini-cli/harness-design-system/SKILL.md +6 -1
  48. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +4 -4
  49. package/dist/agents/skills/gemini-cli/harness-i18n-process/SKILL.md +2 -2
  50. package/dist/agents/skills/gemini-cli/harness-integration/SKILL.md +1 -1
  51. package/dist/agents/skills/gemini-cli/harness-knowledge-pipeline/SKILL.md +1 -0
  52. package/dist/agents/skills/gemini-cli/harness-onboarding/SKILL.md +1 -1
  53. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +3 -3
  54. package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +4 -3
  55. package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +150 -10
  56. package/dist/agents/skills/gemini-cli/initialize-harness-project/skill.yaml +2 -1
  57. package/dist/{agents-md-2RN666DE.js → agents-md-76IEMV6O.js} +3 -3
  58. package/dist/{architecture-ZR33YKJB.js → architecture-5GVJRRUD.js} +4 -4
  59. package/dist/{assess-project-LLWWEQEV.js → assess-project-WDUFL7SO.js} +1 -1
  60. package/dist/bin/harness-mcp.js +15 -15
  61. package/dist/bin/harness.js +25 -25
  62. package/dist/{check-phase-gate-ZVG56NT2.js → check-phase-gate-QR3ONJYP.js} +4 -4
  63. package/dist/{chunk-FUS4OOGC.js → chunk-3WLXR23L.js} +1 -1
  64. package/dist/{chunk-IBTHD2UA.js → chunk-6JBJ5FSW.js} +2 -1
  65. package/dist/{chunk-C7RPQWBG.js → chunk-77OMOFZL.js} +1 -1
  66. package/dist/{chunk-YZH4I4JO.js → chunk-AJG2LCMA.js} +1 -1
  67. package/dist/{chunk-3AJW7VQ3.js → chunk-CS7K6ZQ3.js} +2 -2
  68. package/dist/{chunk-SDDQPMZK.js → chunk-D25P6763.js} +1 -1
  69. package/dist/{chunk-XKU37HGH.js → chunk-DHGL3SF2.js} +1 -1
  70. package/dist/{chunk-CJYNZMOP.js → chunk-E7QD4YHA.js} +8 -8
  71. package/dist/{chunk-BO4AJZRE.js → chunk-H43UQY6B.js} +1 -1
  72. package/dist/{chunk-SDPHFDQS.js → chunk-ILVO6LZY.js} +1 -1
  73. package/dist/{chunk-BZZNYHRY.js → chunk-K5ZOBBQB.js} +9 -9
  74. package/dist/{chunk-A4ETL34H.js → chunk-KLE6FXWM.js} +23 -1
  75. package/dist/{chunk-F3Y64VNF.js → chunk-L4RURCSF.js} +6 -6
  76. package/dist/{chunk-EGRQHLDM.js → chunk-LINAFNIK.js} +5 -5
  77. package/dist/{chunk-EHTUWULH.js → chunk-OPOSSZJS.js} +97 -93
  78. package/dist/{chunk-L3Y7L4EG.js → chunk-OQS7KURX.js} +1 -1
  79. package/dist/{chunk-T7UZOJF4.js → chunk-QZ46CI6E.js} +9 -9
  80. package/dist/{chunk-MGPVA2EM.js → chunk-TFNQ72RF.js} +5 -5
  81. package/dist/{chunk-3XMOWLK3.js → chunk-USG7DV5N.js} +2 -2
  82. package/dist/{chunk-776JFSPK.js → chunk-VITLE3PS.js} +1 -1
  83. package/dist/{chunk-2FOLD76X.js → chunk-WPSM7WT6.js} +2 -2
  84. package/dist/{chunk-GAIOIINV.js → chunk-X7XQ3ELM.js} +108 -36
  85. package/dist/{chunk-EICASBYP.js → chunk-YZZVOT7I.js} +1 -1
  86. package/dist/{chunk-VCC47EXU.js → chunk-Z63IDQ7Y.js} +860 -412
  87. package/dist/{chunk-Q5DKIL46.js → chunk-Z7ZF2XDL.js} +3 -3
  88. package/dist/{ci-workflow-JFOL4YWW.js → ci-workflow-GYQXE5X4.js} +3 -3
  89. package/dist/{dist-CPKL5Y2R.js → dist-46VOJIG4.js} +2 -2
  90. package/dist/{dist-BZS2XRLG.js → dist-BP6E6QGG.js} +7 -1
  91. package/dist/{docs-FUTRJQHA.js → docs-CVQMSMQC.js} +4 -4
  92. package/dist/{engine-FB3HCNVT.js → engine-23PJMRHA.js} +3 -3
  93. package/dist/{entropy-FIEE4YDA.js → entropy-K2YTZFCP.js} +3 -3
  94. package/dist/{feedback-7EC4T6XG.js → feedback-6HP42GTK.js} +1 -1
  95. package/dist/{generate-agent-definitions-FOSFADNR.js → generate-agent-definitions-6RJKL6VW.js} +4 -4
  96. package/dist/{graph-loader-QEI7SYOQ.js → graph-loader-BI3OFFFS.js} +1 -1
  97. package/dist/index.d.ts +44 -1
  98. package/dist/index.js +25 -25
  99. package/dist/{loader-HXUOBTYA.js → loader-U2WEC3PZ.js} +3 -3
  100. package/dist/{mcp-NUG4BMKJ.js → mcp-N6XVWPXJ.js} +15 -15
  101. package/dist/{performance-TYXBCTR7.js → performance-T3XAESWR.js} +4 -4
  102. package/dist/{review-pipeline-B4WPU6BQ.js → review-pipeline-HTC5HA5X.js} +3 -3
  103. package/dist/{runtime-HQQNOARD.js → runtime-UFXMNN3Q.js} +3 -3
  104. package/dist/{scan-M4EGDAQ2.js → scan-XRGMTO6K.js} +1 -1
  105. package/dist/{security-25VFLIAO.js → security-ROK5IFDA.js} +1 -1
  106. package/dist/{validate-EAVGKZQB.js → validate-IJHHQHT5.js} +4 -4
  107. package/dist/{validate-cross-check-SPL3H4O5.js → validate-cross-check-LUQYIA46.js} +3 -3
  108. package/package.json +6 -6
@@ -23,6 +23,18 @@ If you find yourself writing implementation code, STOP. You have left advisory m
23
23
 
24
24
  ## Process
25
25
 
26
+ ### Storage Location
27
+
28
+ Architecture artifacts (discovery, analysis, proposals, ADRs) are human-facing documentation and live under the project's docs directory — NOT under `.harness/` (which is reserved for tool state like debug sessions, graph data, and baselines).
29
+
30
+ Resolve the storage root as follows:
31
+
32
+ 1. Read `docsDir` from `harness.config.json` at the project root. If present, use `<docsDir>/architecture/` (e.g. `docsDir: "./docs"` → `docs/architecture/`).
33
+ 2. If `harness.config.json` is absent or has no `docsDir`, default to `docs/architecture/`.
34
+ 3. If a legacy `.harness/architecture/` directory exists from a prior version of this skill, surface this to the human and offer to migrate it via `git mv .harness/architecture <docsDir>/architecture` before proceeding.
35
+
36
+ All path references below use `<docs>/architecture/` as shorthand for the resolved location.
37
+
26
38
  ### Phase 1: DISCOVER — Understand the Problem Space
27
39
 
28
40
  **Gate: This phase requires human answers. Do not proceed to Phase 2 until the human has responded.**
@@ -42,7 +54,7 @@ Ask these 5 questions. Wait for answers before proceeding.
42
54
  Record the answers verbatim. Do not paraphrase or interpret at this stage.
43
55
 
44
56
  ```
45
- Store answers in: .harness/architecture/<topic>/discovery.md
57
+ Store answers in: <docs>/architecture/<topic>/discovery.md
46
58
  ```
47
59
 
48
60
  ---
@@ -107,7 +119,7 @@ Look for existing issues that may affect the decision:
107
119
  ```
108
120
 
109
121
  ```
110
- Store analysis in: .harness/architecture/<topic>/analysis.md
122
+ Store analysis in: <docs>/architecture/<topic>/analysis.md
111
123
  ```
112
124
 
113
125
  ### Graph-Enhanced Context (when available)
@@ -185,7 +197,7 @@ However, if <condition>, Option <Y> would be stronger.
185
197
  Present the options to the human and wait for their choice.
186
198
 
187
199
  ```
188
- Store proposal in: .harness/architecture/<topic>/proposal.md
200
+ Store proposal in: <docs>/architecture/<topic>/proposal.md
189
201
  ```
190
202
 
191
203
  ---
@@ -251,7 +263,7 @@ discussion.>
251
263
  Save the ADR:
252
264
 
253
265
  ```
254
- .harness/architecture/<topic>/ADR-<number>.md
266
+ <docs>/architecture/<topic>/ADR-<number>.md
255
267
  ```
256
268
 
257
269
  Also link from the project's ADR index if one exists.
@@ -261,7 +273,7 @@ Also link from the project's ADR index if one exists.
261
273
  - Extends the human-architect model — the skill is a thinking partner, not a decision maker
262
274
  - Respects architectural constraints defined in harness.config.json
263
275
  - Outputs structured ADR that other skills can reference
264
- - Reads prior ADRs from `.harness/architecture/` for consistency
276
+ - Reads prior ADRs from `<docs>/architecture/` (resolved from `harness.config.json` `docsDir`, default `docs/architecture/`) for consistency
265
277
 
266
278
  ## Success Criteria
267
279
 
@@ -48,5 +48,5 @@ phases:
48
48
  state:
49
49
  persistent: true
50
50
  files:
51
- - .harness/architecture/
51
+ - docs/architecture/
52
52
  depends_on: []
@@ -80,12 +80,12 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → INTEGRATE
80
80
 
81
81
  ```
82
82
  subagent_type: "harness-planner"
83
- prompt: "Phase {N}: {name}. Spec: {specPath}. Session: {sessionSlug}. Rigor: {rigorLevel}. Follow harness-planning. Write plan to docs/plans/. Write {sessionDir}/handoff.json when done."
83
+ prompt: "Phase {N}: {name}. Spec: {specPath}. Session: {sessionSlug}. Rigor: {rigorLevel}. Follow harness-planning. Write plan to docs/changes/<topic>/plans/ (topic from specPath; legacy docs/plans/ if spec is outside docs/changes/). Write {sessionDir}/handoff.json when done."
84
84
  ```
85
85
 
86
86
  On return: read `planPath` from `{sessionDir}/handoff.json`. Complexity override check: `low` + tasks>10 or checkpoints>3 → `"medium"`; tasks>20 or checkpoints>6 → `"high"`. Update state `planPath`. → APPROVE_PLAN.
87
87
 
88
- **Interactive plan (high):** Check for plan file at `docs/plans/*{phase-name}*` or `planPath` in handoff. If found: update `planPath` → APPROVE_PLAN. If not: remind and wait.
88
+ **Interactive plan (high):** Check for plan file at `docs/changes/<topic>/plans/*{phase-name}*` (or legacy `docs/plans/*{phase-name}*`) or `planPath` in handoff. If found: update `planPath` → APPROVE_PLAN. If not: remind and wait.
89
89
 
90
90
  ---
91
91
 
@@ -275,7 +275,7 @@ Persist findings to `{sessionDir}/phase-{N}-review.json`. No blocking → PHASE_
275
275
 
276
276
  **INIT:** 3 phases found: Phase 1: Core Scanner (low), Phase 2: Rule Engine (high), Phase 3: CLI Integration (low).
277
277
 
278
- **Phase 1 — ASSESS → PLAN:** harness-planner dispatched. Returns plan: `docs/plans/2026-03-19-core-scanner-plan.md` (8 tasks).
278
+ **Phase 1 — ASSESS → PLAN:** harness-planner dispatched. Returns plan: `docs/changes/security-scanner/plans/2026-03-19-core-scanner-plan.md` (8 tasks).
279
279
 
280
280
  **Phase 1 — APPROVE_PLAN (auto):** All signals false. "Auto-approved Phase 1: Core Scanner | auto | low | no concerns | 8 tasks."
281
281
 
@@ -287,7 +287,7 @@ Persist findings to `{sessionDir}/phase-{N}-review.json`. No blocking → PHASE_
287
287
 
288
288
  **Phase 2 — ASSESS:** High complexity. "Run `/harness:planning` interactively, then re-invoke." [User plans interactively. Re-invokes.]
289
289
 
290
- **INIT (resume):** "Resuming from PLAN, phase 2: Rule Engine. Found plan: docs/plans/2026-03-19-rule-engine-plan.md"
290
+ **INIT (resume):** "Resuming from PLAN, phase 2: Rule Engine. Found plan: docs/changes/security-scanner/plans/2026-03-19-rule-engine-plan.md"
291
291
 
292
292
  **Phase 2 — APPROVE_PLAN (paused):** Complexity: high triggered. "Approve? → yes" **EXECUTE → VERIFY → REVIEW → PHASE_COMPLETE.** 14 tasks, 1 retry.
293
293
 
@@ -242,7 +242,7 @@ git diff --stat HEAD~1 # measure diff size
242
242
  git diff HEAD~1 -- <file> # per-file diff
243
243
  grep -n "import\|require\|from " <file> # find imports
244
244
  find . -name "*<module>*test*" -o -name "*<module>*spec*"
245
- grep -rl "<component>" docs/changes/ docs/design-docs/ docs/plans/
245
+ grep -rl "<component>" docs/changes/ docs/design-docs/ docs/plans/ # docs/changes/*/plans/ covered by docs/changes/; docs/plans/ kept for legacy
246
246
  grep -rn "interface\|type\|schema" <changed-file> | head -20
247
247
  ```
248
248
 
@@ -25,7 +25,12 @@
25
25
  - CSS files with custom properties (`--color-*`, `--font-*`, `--space-*`)
26
26
  - `theme.ts`, `theme.js`, `styles/variables.*` -- CSS-in-JS or preprocessor variables
27
27
 
28
- 2. **Check harness configuration.** Read `harness.config.json` for:
28
+ 2. **Check harness configuration.** Read `harness.config.json` and apply the `design.enabled` short-circuit _before_ doing anything else in Phase 1:
29
+ - If `design.enabled` is `false`: the project explicitly declined a design system during init. Log `"design.enabled is false in harness.config.json — project explicitly declined the design system. Skipping."` and stop. Do not run the rest of Phase 1 or any subsequent phase.
30
+ - If `design.enabled` is `true`: proceed normally with the rest of Phase 1.
31
+ - If `design.enabled` is absent (the field does not appear under `design`): the project has not decided yet. Surface a gentle prompt: "This project has not configured a design system. Would you like to enable one now? (yes / no / not sure)". On `yes`, proceed with Phase 1 — note that this answer is not persisted to `harness.config.json` (the init skill is the canonical writer of that field), so this prompt will fire again on the next `on_new_feature` invocation; run `harness init --migrate` to make the choice permanent. On `no` or `not sure`, stop without writing anything to `harness.config.json`.
32
+
33
+ After the gate, read the remaining design configuration fields:
29
34
  - `design.strictness` -- enforcement level (`strict`, `standard`, `permissive`)
30
35
  - `design.platforms` -- which platforms are enabled (web, mobile)
31
36
  - `design.tokenPath` -- path to tokens file (default: `design-system/tokens.json`)
@@ -27,15 +27,15 @@ Deviating mid-execution introduces untested assumptions, breaks atomicity, and m
27
27
  When invoked by autopilot (or with explicit arguments), resolve paths before starting:
28
28
 
29
29
  1. **Session slug:** If `session-slug` argument provided, set `{sessionDir} = .harness/sessions/<session-slug>/`. Pass to `gather_context({ session: "<session-slug>" })`. All state/handoff writes go to `{sessionDir}/`.
30
- 2. **Plan path:** If `plan-path` argument provided, read plan from that path. Otherwise, discover from `{sessionDir}/handoff.json` (read upstream planning output) or search `docs/plans/`.
30
+ 2. **Plan path:** If `plan-path` argument provided, read plan from that path. Otherwise, discover from `{sessionDir}/handoff.json` (read upstream planning output) or search `docs/changes/<topic>/plans/` (preferred) and `docs/plans/` (legacy fallback).
31
31
 
32
- When no arguments are provided (standalone invocation), discover plan from `docs/plans/` or prompt. Global `.harness/` paths used as fallback.
32
+ When no arguments are provided (standalone invocation), discover plan from `docs/changes/<topic>/plans/` (or legacy `docs/plans/`) or prompt. Global `.harness/` paths used as fallback.
33
33
 
34
34
  ---
35
35
 
36
36
  ### Phase 1: PREPARE — Load State and Verify Prerequisites
37
37
 
38
- 1. **Load the plan.** If `plan-path` argument was resolved, read from that path. Otherwise read from `docs/plans/`. Identify total task count and checkpoints.
38
+ 1. **Load the plan.** If `plan-path` argument was resolved, read from that path. Otherwise read from the resolved discovery location (`docs/changes/<topic>/plans/` preferred, `docs/plans/` legacy fallback). Identify total task count and checkpoints.
39
39
 
40
40
  2. **Gather context in one call.** Use `gather_context` to load all working context:
41
41
 
@@ -384,7 +384,7 @@ Claims about task completion, test results, or code behavior MUST cite evidence:
384
384
  **Session Start (fresh):**
385
385
 
386
386
  ```
387
- Read plan: docs/plans/2026-03-14-notifications-plan.md (5 tasks)
387
+ Read plan: docs/changes/notifications/plans/2026-03-14-notifications-plan.md (5 tasks)
388
388
  Read state: .harness/state.json — not found (fresh start, Task 1)
389
389
  Read learnings: .harness/learnings.md — not found
390
390
  Run: harness validate — passes. Clean baseline.
@@ -207,7 +207,7 @@ i18n Process Validation
207
207
  =======================
208
208
  Mode: gate (standard)
209
209
  Workflow: planning
210
- Artifact: docs/plans/2026-03-20-checkout-redesign-plan.md
210
+ Artifact: docs/changes/checkout-redesign/plans/2026-03-20-checkout-redesign-plan.md
211
211
 
212
212
  Checks:
213
213
  [PASS] Plan contains i18n-related task (Task 7: "Extract checkout strings")
@@ -319,7 +319,7 @@ i18n Process Validation
319
319
  =======================
320
320
  Mode: gate (standard)
321
321
  Workflow: planning
322
- Artifact: docs/plans/2026-03-20-product-reviews-plan.md
322
+ Artifact: docs/changes/product-reviews/plans/2026-03-20-product-reviews-plan.md
323
323
 
324
324
  Checks:
325
325
  [FAIL] No i18n-related tasks found in plan
@@ -33,7 +33,7 @@ When invoked by autopilot (or with explicit arguments), resolve paths before sta
33
33
  2. **Plan path:** Discover from `{sessionDir}/handoff.json` (read upstream execution/verification output). The plan contains integration tasks tagged `category: "integration"` and the `integrationTier` field.
34
34
  3. **Rigor level:** If `fast`/`thorough` argument provided, use it. Otherwise default to `standard`.
35
35
 
36
- When no arguments are provided (standalone invocation), discover plan from `docs/plans/` or prompt. Global `.harness/` paths used as fallback.
36
+ When no arguments are provided (standalone invocation), discover plan from `docs/changes/<topic>/plans/` (preferred) or `docs/plans/` (legacy fallback) or prompt. Global `.harness/` paths used as fallback.
37
37
 
38
38
  ---
39
39
 
@@ -70,6 +70,7 @@ Extract business knowledge from all available sources into a fresh snapshot.
70
70
 
71
71
  4. **Build Fresh Snapshot:** Collect all extraction results into a `KnowledgeSnapshot`.
72
72
  - Each entry has: `id`, `type`, `contentHash`, `source`, `name`
73
+ - Each entry's `domain` is resolved via path-based inference (`packages/<dir>`, `apps/<dir>`, etc.) unless an explicit `metadata.domain` is set; projects can extend or override via `knowledge.domainPatterns` and `knowledge.domainBlocklist` in `harness.config.json` — see [`docs/knowledge/graph/node-edge-taxonomy.md`](../../../../docs/knowledge/graph/node-edge-taxonomy.md#domain-inference) for full precedence.
73
74
 
74
75
  **Output:** `context.extractionSnapshot` populated.
75
76
 
@@ -259,7 +259,7 @@ State: Mid-execution on a 6-task notification feature plan
259
259
 
260
260
  ```
261
261
  Produce orientation with all sections. Getting Started for this context:
262
- 1. Read the plan at docs/plans/2026-03-14-notifications-plan.md
262
+ 1. Read the plan at docs/changes/notifications/plans/2026-03-14-notifications-plan.md
263
263
  2. Resume execution at Task 4 (state shows Tasks 1-3 complete)
264
264
  3. Note the UTC normalization gotcha from learnings before working with dates
265
265
  ```
@@ -293,7 +293,7 @@ Report progress: `**[Phase 2/4]** DECOMPOSE — mapping file structure and creat
293
293
  4. **Run `harness validate`** to verify project health before writing the plan.
294
294
  5. **Check failures log.** Read `.harness/failures.md`. If planned approaches match known failures, flag them.
295
295
  6. **Run soundness review.** Invoke `harness-soundness-review --mode plan` against the draft. Do not proceed until the review converges with no remaining issues.
296
- 7. **Write the plan to `docs/plans/`.** Naming: `YYYY-MM-DD-<feature-name>-plan.md`. Create directory if needed.
296
+ 7. **Write the plan to `docs/changes/<topic>/plans/`.** Naming: `YYYY-MM-DD-<feature-name>-plan.md`. Resolve `<topic>` from the spec path — if the spec lives at `docs/changes/<topic>/proposal.md`, the plan goes in the sibling `plans/` directory. If the spec is not under `docs/changes/`, fall back to `docs/plans/` and flag the spec location for human review. Create directories as needed.
297
297
  8. **Write handoff.** Write to the session-scoped path when session slug is known, otherwise fall back to global path:
298
298
  - Session-scoped (preferred): `.harness/sessions/<session-slug>/handoff.json`
299
299
  - Global (fallback, **deprecated**): `.harness/handoff.json`
@@ -392,7 +392,7 @@ When referencing existing code in task specs, cite evidence using `file:line` fo
392
392
 
393
393
  - **`harness validate`** — Run in Phase 4 (before writing plan) and included in every task.
394
394
  - **`harness check-deps`** — Referenced in tasks adding imports or creating modules.
395
- - **Plan location** — `docs/plans/YYYY-MM-DD-<feature-name>-plan.md`.
395
+ - **Plan location** — `docs/changes/<topic>/plans/YYYY-MM-DD-<feature-name>-plan.md` when the spec lives under `docs/changes/<topic>/proposal.md`; otherwise `docs/plans/` as a fallback.
396
396
  - **Handoff** — Once approved, invoke harness-execution for task-by-task implementation.
397
397
  - **Session directory** — Session-scoped writes go to `.harness/sessions/<slug>/`. Structure: `handoff.json`, `state.json`, `artifacts.json` (registry of spec/plan paths and produced file lists). Global `.harness/handoff.json` is deprecated for session-aware invocations.
398
398
  - **`emit_interaction`** — Call at end of Phase 4 to suggest transitioning to execution (confirmed transition).
@@ -422,7 +422,7 @@ Only apply when modifying existing documented behavior. When `docs/changes/` exi
422
422
 
423
423
  ## Success Criteria
424
424
 
425
- - Plan document exists in `docs/plans/` with all required sections
425
+ - Plan document exists at the resolved location (`docs/changes/<topic>/plans/` or `docs/plans/` fallback) with all required sections
426
426
  - Every task completable in 2-5 minutes (one context window)
427
427
  - Every task includes exact file paths, exact code, and exact commands
428
428
  - Every code-producing task follows TDD: test first, fail, implement, pass
@@ -32,7 +32,8 @@ If the human has not seen and approved the milestone groupings and feature list,
32
32
  - `docs/changes/*/proposal.md`
33
33
  - Record each spec's title, status (if detectable from frontmatter or content), and file path.
34
34
  3. Scan for plans:
35
- - `docs/plans/*.md`
35
+ - `docs/changes/*/plans/*.md` (preferred — co-located with proposals)
36
+ - `docs/plans/*.md` (legacy fallback for plans not yet migrated)
36
37
  - Record each plan's title, estimated tasks, and file path.
37
38
  4. Match plans to specs:
38
39
  - Plans often reference their spec in frontmatter (`spec:`) or body text. Link them when a match is found.
@@ -112,7 +113,7 @@ Unmatched plans: N (flag for review)
112
113
  - **Spec:** docs/changes/feature-a/proposal.md
113
114
  - **Summary:** One-line description of the feature
114
115
  - **Blockers:** none
115
- - **Plan:** docs/plans/2026-03-20-feature-a-plan.md
116
+ - **Plan:** docs/changes/feature-a/plans/2026-03-20-feature-a-plan.md
116
117
  ```
117
118
 
118
119
  3. Write to `docs/roadmap.md`.
@@ -436,7 +437,7 @@ Choice?
436
437
 
437
438
  ## Success Criteria
438
439
 
439
- 1. `--create` discovers all specs (`docs/changes/*/proposal.md`) and plans (`docs/plans/*.md`)
440
+ 1. `--create` discovers all specs (`docs/changes/*/proposal.md`) and plans (`docs/changes/*/plans/*.md` and legacy `docs/plans/*.md`)
440
441
  2. `--create` proposes groupings and waits for human confirmation before writing
441
442
  3. `--create` produces a valid `docs/roadmap.md` that round-trips through `parseRoadmap`/`serializeRoadmap`
442
443
  4. `--add` collects all fields interactively (milestone, status, spec, summary, blockers, plan)
@@ -36,7 +36,7 @@
36
36
  - Config files like `playwright.config.*`, `cypress.config.*`, `wdio.conf.*`
37
37
  - No production runtime — build output consumed only by other test repos (shared library)
38
38
 
39
- **If a test suite:** complete Phase 2 (scaffolding) here, then dispatch to `initialize-test-suite-project` for Phase 3 configuration and Phase 4 verification, then return here for Phase 4 step 4+ (knowledge graph, roadmap nudge, final commit). The test-suite skill owns archetype selection, layer variants, tags, reporters, and the custom report.
39
+ **If a test suite:** complete Phase 2 (scaffolding) here, then dispatch to `initialize-test-suite-project` for Phase 3 configuration and Phase 4 verification, then return here for Phase 4 step 4+ (knowledge graph, roadmap question, final commit). The test-suite skill owns archetype selection, layer variants, tags, reporters, and the custom report.
40
40
 
41
41
  **If a product/service:** continue with the rest of this skill as written.
42
42
 
@@ -83,6 +83,48 @@
83
83
  - **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.
84
84
  - **Not sure yet:** Skip i18n configuration entirely. Do not set `i18n.enabled`. The project can enable i18n later by running `harness-i18n-workflow` directly.
85
85
 
86
+ 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`:
87
+
88
+ ```json
89
+ emit_interaction({
90
+ type: "question",
91
+ question: {
92
+ text: "Will this project have a UI requiring a design system?",
93
+ options: [
94
+ {
95
+ label: "Yes — capture design intent now",
96
+ pros: ["Records platforms in harness.config.json", "harness-design-system fires automatically on first design-touching feature"],
97
+ cons: ["One extra follow-up question (which platforms)"],
98
+ risk: "low",
99
+ effort: "low"
100
+ },
101
+ {
102
+ label: "No — this project has no UI",
103
+ pros: ["No future design nudges", "Permanent decline recorded"],
104
+ cons: ["Re-running init is required if a UI is added later"],
105
+ risk: "low",
106
+ effort: "low"
107
+ },
108
+ {
109
+ label: "Not sure yet",
110
+ pros: ["Decision deferred without commitment", "Can run harness-design-system later"],
111
+ cons: ["No design.enabled flag set; on_new_feature will prompt later"],
112
+ risk: "low",
113
+ effort: "low"
114
+ }
115
+ ],
116
+ recommendation: { optionIndex: 0, reason: "Most product/service projects benefit from a centralized design system", confidence: "medium" }
117
+ }
118
+ })
119
+ ```
120
+
121
+ Based on the answer:
122
+ - **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`."
123
+ - **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`.
124
+ - **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.
125
+
126
+ **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.
127
+
86
128
  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.
87
129
 
88
130
  ### Phase 4: VALIDATE — Confirm Everything Works
@@ -108,7 +150,38 @@ harness scan [path]
108
150
 
109
151
  This creates the `.harness/graph/` directory and populates it with the project's dependency and relationship data. Subsequent graph queries (impact analysis, dependency health, test advisor) depend on this initial scan.
110
152
 
111
- 4. **Mention roadmap.** After validation passes, inform the user: "When you are ready to set up a project roadmap, run `/harness:roadmap --create`. This creates a unified `docs/roadmap.md` that tracks features, milestones, and status across your specs and plans." This is informational only — do not create the roadmap automatically.
153
+ 4. **Set up project roadmap.** Ask: "Set up a project roadmap now? `docs/roadmap.md` tracks features, milestones, and status across your specs and plans." Use `emit_interaction`:
154
+
155
+ ```json
156
+ emit_interaction({
157
+ type: "question",
158
+ question: {
159
+ text: "Set up a project roadmap now?",
160
+ options: [
161
+ {
162
+ label: "Yes — create docs/roadmap.md now",
163
+ pros: ["Roadmap visible from day one", "Future specs auto-discovered on next sync"],
164
+ cons: ["Adds one file to the initial commit"],
165
+ risk: "low",
166
+ effort: "low"
167
+ },
168
+ {
169
+ label: "No — skip for now",
170
+ pros: ["Smaller initial footprint"],
171
+ cons: ["Run `/harness:roadmap --create` later when ready"],
172
+ risk: "low",
173
+ effort: "low"
174
+ }
175
+ ],
176
+ recommendation: { optionIndex: 0, reason: "Validation has just passed — a tangible 'project works' signal is the right moment to introduce planning artifacts", confidence: "medium" }
177
+ }
178
+ })
179
+ ```
180
+
181
+ Based on the answer:
182
+ - **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.
183
+ - **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.
184
+ - **No:** Skip silently. The user can still run `/harness:roadmap --create` later — that informational fallback remains valid.
112
185
 
113
186
  5. **Commit the initialization.** All generated and configured files in a single commit.
114
187
 
@@ -120,8 +193,10 @@ This creates the `.harness/graph/` directory and populates it with the project's
120
193
  - **`harness validate`** — Verify the full project configuration is valid and complete.
121
194
  - **`harness check-deps`** — Verify dependency constraints match the actual codebase (intermediate and above).
122
195
  - **`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.
196
+ - **`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.
123
197
  - **`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.
124
- - **Roadmap nudge** — After successful initialization, inform the user about `/harness:roadmap --create` for setting up project-level feature tracking. Informational only; does not create the roadmap.
198
+ - **`harness-roadmap` skill** — Phase 4 step 4 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.
199
+ - **`manage_roadmap` MCP tool** — Phase 4 step 4, 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.
125
200
 
126
201
  ## Success Criteria
127
202
 
@@ -134,17 +209,21 @@ This creates the `.harness/graph/` directory and populates it with the project's
134
209
  - The adoption level matches what was agreed upon with the human
135
210
  - All generated files are committed in a single atomic commit
136
211
  - i18n configuration is set if the human chose to enable it during init
212
+ - 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.
213
+ - 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).
214
+ - 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.
137
215
  - For test suites: `initialize-test-suite-project` ran to completion and its Success Criteria are also met
138
216
 
139
217
  ## Rationalizations to Reject
140
218
 
141
- | Rationalization | Why It Is Wrong |
142
- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
143
- | "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. |
144
- | "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. |
145
- | "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. |
146
- | "Validation passed, so the project is ready" | Phase 4 includes harness check-deps for intermediate+ projects and knowledge graph initialization. Validation alone is not sufficient. |
147
- | "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. |
219
+ | Rationalization | Why It Is Wrong |
220
+ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
221
+ | "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. |
222
+ | "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. |
223
+ | "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. |
224
+ | "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`. |
225
+ | "Validation passed, so the project is ready" | Phase 4 includes harness check-deps for intermediate+ projects and knowledge graph initialization. Validation alone is not sufficient. |
226
+ | "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. |
148
227
 
149
228
  ## Examples
150
229
 
@@ -188,6 +267,67 @@ git add harness.config.json .harness/ AGENTS.md
188
267
  git commit -m "feat: initialize harness project at basic level"
189
268
  ```
190
269
 
270
+ ### Example: New TypeScript Web App with Design and Roadmap
271
+
272
+ **ASSESS:**
273
+
274
+ ```
275
+ Human: "I'm starting a new Next.js web app. Single-language, but it definitely needs a design system."
276
+ Check for .harness/ — not found. Recommend: basic level.
277
+ Phase 1 step 5 classification: not a test suite (Next.js app with src/, no playwright/cypress).
278
+ ```
279
+
280
+ **SCAFFOLD:**
281
+
282
+ ```bash
283
+ harness init --level basic --framework nextjs
284
+ ```
285
+
286
+ **CONFIGURE (Phase 3):**
287
+
288
+ ```
289
+ Step 5 (i18n): "Will this project support multiple languages?"
290
+ Human: "No, English only."
291
+ Result: i18n.enabled = false in harness.config.json.
292
+
293
+ Step 5b (design): "Will this project have a UI requiring a design system?"
294
+ Human: "Yes."
295
+ Follow-up: "Which platforms? web, mobile, or both?"
296
+ Human: "Web."
297
+ Result: design.enabled = true, design.platforms = ["web"] in harness.config.json.
298
+ Inform: "Design tokens will be generated when you start your first design-touching
299
+ feature — harness-design-system fires automatically via on_new_feature."
300
+
301
+ Step 6 (test-suite dispatch): skipped (not a test suite).
302
+ ```
303
+
304
+ **VALIDATE (Phase 4):**
305
+
306
+ ```
307
+ Step 1: harness validate — pass.
308
+ Step 3: harness check-deps — pass (basic level, no constraints yet).
309
+ Build initial knowledge graph: harness scan — graph populated.
310
+
311
+ Step 4 (roadmap): "Set up a project roadmap now?"
312
+ Human: "Yes."
313
+ Invoke harness-roadmap (or /harness:roadmap --create) — docs/roadmap.md created.
314
+ design.enabled === true detected → manage_roadmap action: add
315
+ feature: "Set up design system"
316
+ status: planned
317
+ milestone: Current Work
318
+ summary: "Run harness-design-system to define palette, typography, and generate W3C DTCG tokens..."
319
+ Result: docs/roadmap.md contains the planned design item.
320
+
321
+ Step 5: commit.
322
+ ```
323
+
324
+ ```bash
325
+ git add harness.config.json .harness/ AGENTS.md docs/roadmap.md
326
+ git commit -m "feat: initialize harness project with design and roadmap"
327
+ ```
328
+
329
+ **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.
330
+
191
331
  ### Example: Migrating Existing Project from Basic to Intermediate
192
332
 
193
333
  **ASSESS:**
@@ -1,6 +1,6 @@
1
1
  name: initialize-harness-project
2
2
  version: "1.0.0"
3
- description: Scaffold a new harness-compliant project
3
+ description: Scaffold a new harness-compliant project, including design system and roadmap configuration
4
4
  stability: static
5
5
  cognitive_mode: constructive-architect
6
6
  triggers:
@@ -34,3 +34,4 @@ state:
34
34
  files: []
35
35
  depends_on:
36
36
  - initialize-test-suite-project
37
+ - harness-design-system
@@ -23,6 +23,18 @@ If you find yourself writing implementation code, STOP. You have left advisory m
23
23
 
24
24
  ## Process
25
25
 
26
+ ### Storage Location
27
+
28
+ Architecture artifacts (discovery, analysis, proposals, ADRs) are human-facing documentation and live under the project's docs directory — NOT under `.harness/` (which is reserved for tool state like debug sessions, graph data, and baselines).
29
+
30
+ Resolve the storage root as follows:
31
+
32
+ 1. Read `docsDir` from `harness.config.json` at the project root. If present, use `<docsDir>/architecture/` (e.g. `docsDir: "./docs"` → `docs/architecture/`).
33
+ 2. If `harness.config.json` is absent or has no `docsDir`, default to `docs/architecture/`.
34
+ 3. If a legacy `.harness/architecture/` directory exists from a prior version of this skill, surface this to the human and offer to migrate it via `git mv .harness/architecture <docsDir>/architecture` before proceeding.
35
+
36
+ All path references below use `<docs>/architecture/` as shorthand for the resolved location.
37
+
26
38
  ### Phase 1: DISCOVER — Understand the Problem Space
27
39
 
28
40
  **Gate: This phase requires human answers. Do not proceed to Phase 2 until the human has responded.**
@@ -42,7 +54,7 @@ Ask these 5 questions. Wait for answers before proceeding.
42
54
  Record the answers verbatim. Do not paraphrase or interpret at this stage.
43
55
 
44
56
  ```
45
- Store answers in: .harness/architecture/<topic>/discovery.md
57
+ Store answers in: <docs>/architecture/<topic>/discovery.md
46
58
  ```
47
59
 
48
60
  ---
@@ -107,7 +119,7 @@ Look for existing issues that may affect the decision:
107
119
  ```
108
120
 
109
121
  ```
110
- Store analysis in: .harness/architecture/<topic>/analysis.md
122
+ Store analysis in: <docs>/architecture/<topic>/analysis.md
111
123
  ```
112
124
 
113
125
  ### Graph-Enhanced Context (when available)
@@ -185,7 +197,7 @@ However, if <condition>, Option <Y> would be stronger.
185
197
  Present the options to the human and wait for their choice.
186
198
 
187
199
  ```
188
- Store proposal in: .harness/architecture/<topic>/proposal.md
200
+ Store proposal in: <docs>/architecture/<topic>/proposal.md
189
201
  ```
190
202
 
191
203
  ---
@@ -251,7 +263,7 @@ discussion.>
251
263
  Save the ADR:
252
264
 
253
265
  ```
254
- .harness/architecture/<topic>/ADR-<number>.md
266
+ <docs>/architecture/<topic>/ADR-<number>.md
255
267
  ```
256
268
 
257
269
  Also link from the project's ADR index if one exists.
@@ -261,7 +273,7 @@ Also link from the project's ADR index if one exists.
261
273
  - Extends the human-architect model — the skill is a thinking partner, not a decision maker
262
274
  - Respects architectural constraints defined in harness.config.json
263
275
  - Outputs structured ADR that other skills can reference
264
- - Reads prior ADRs from `.harness/architecture/` for consistency
276
+ - Reads prior ADRs from `<docs>/architecture/` (resolved from `harness.config.json` `docsDir`, default `docs/architecture/`) for consistency
265
277
 
266
278
  ## Success Criteria
267
279
 
@@ -48,5 +48,5 @@ phases:
48
48
  state:
49
49
  persistent: true
50
50
  files:
51
- - .harness/architecture/
51
+ - docs/architecture/
52
52
  depends_on: []
@@ -80,12 +80,12 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → INTEGRATE
80
80
 
81
81
  ```
82
82
  subagent_type: "harness-planner"
83
- prompt: "Phase {N}: {name}. Spec: {specPath}. Session: {sessionSlug}. Rigor: {rigorLevel}. Follow harness-planning. Write plan to docs/plans/. Write {sessionDir}/handoff.json when done."
83
+ prompt: "Phase {N}: {name}. Spec: {specPath}. Session: {sessionSlug}. Rigor: {rigorLevel}. Follow harness-planning. Write plan to docs/changes/<topic>/plans/ (topic from specPath; legacy docs/plans/ if spec is outside docs/changes/). Write {sessionDir}/handoff.json when done."
84
84
  ```
85
85
 
86
86
  On return: read `planPath` from `{sessionDir}/handoff.json`. Complexity override check: `low` + tasks>10 or checkpoints>3 → `"medium"`; tasks>20 or checkpoints>6 → `"high"`. Update state `planPath`. → APPROVE_PLAN.
87
87
 
88
- **Interactive plan (high):** Check for plan file at `docs/plans/*{phase-name}*` or `planPath` in handoff. If found: update `planPath` → APPROVE_PLAN. If not: remind and wait.
88
+ **Interactive plan (high):** Check for plan file at `docs/changes/<topic>/plans/*{phase-name}*` (or legacy `docs/plans/*{phase-name}*`) or `planPath` in handoff. If found: update `planPath` → APPROVE_PLAN. If not: remind and wait.
89
89
 
90
90
  ---
91
91
 
@@ -275,7 +275,7 @@ Persist findings to `{sessionDir}/phase-{N}-review.json`. No blocking → PHASE_
275
275
 
276
276
  **INIT:** 3 phases found: Phase 1: Core Scanner (low), Phase 2: Rule Engine (high), Phase 3: CLI Integration (low).
277
277
 
278
- **Phase 1 — ASSESS → PLAN:** harness-planner dispatched. Returns plan: `docs/plans/2026-03-19-core-scanner-plan.md` (8 tasks).
278
+ **Phase 1 — ASSESS → PLAN:** harness-planner dispatched. Returns plan: `docs/changes/security-scanner/plans/2026-03-19-core-scanner-plan.md` (8 tasks).
279
279
 
280
280
  **Phase 1 — APPROVE_PLAN (auto):** All signals false. "Auto-approved Phase 1: Core Scanner | auto | low | no concerns | 8 tasks."
281
281
 
@@ -287,7 +287,7 @@ Persist findings to `{sessionDir}/phase-{N}-review.json`. No blocking → PHASE_
287
287
 
288
288
  **Phase 2 — ASSESS:** High complexity. "Run `/harness:planning` interactively, then re-invoke." [User plans interactively. Re-invokes.]
289
289
 
290
- **INIT (resume):** "Resuming from PLAN, phase 2: Rule Engine. Found plan: docs/plans/2026-03-19-rule-engine-plan.md"
290
+ **INIT (resume):** "Resuming from PLAN, phase 2: Rule Engine. Found plan: docs/changes/security-scanner/plans/2026-03-19-rule-engine-plan.md"
291
291
 
292
292
  **Phase 2 — APPROVE_PLAN (paused):** Complexity: high triggered. "Approve? → yes" **EXECUTE → VERIFY → REVIEW → PHASE_COMPLETE.** 14 tasks, 1 retry.
293
293
 
@@ -242,7 +242,7 @@ git diff --stat HEAD~1 # measure diff size
242
242
  git diff HEAD~1 -- <file> # per-file diff
243
243
  grep -n "import\|require\|from " <file> # find imports
244
244
  find . -name "*<module>*test*" -o -name "*<module>*spec*"
245
- grep -rl "<component>" docs/changes/ docs/design-docs/ docs/plans/
245
+ grep -rl "<component>" docs/changes/ docs/design-docs/ docs/plans/ # docs/changes/*/plans/ covered by docs/changes/; docs/plans/ kept for legacy
246
246
  grep -rn "interface\|type\|schema" <changed-file> | head -20
247
247
  ```
248
248
 
@@ -25,7 +25,12 @@
25
25
  - CSS files with custom properties (`--color-*`, `--font-*`, `--space-*`)
26
26
  - `theme.ts`, `theme.js`, `styles/variables.*` -- CSS-in-JS or preprocessor variables
27
27
 
28
- 2. **Check harness configuration.** Read `harness.config.json` for:
28
+ 2. **Check harness configuration.** Read `harness.config.json` and apply the `design.enabled` short-circuit _before_ doing anything else in Phase 1:
29
+ - If `design.enabled` is `false`: the project explicitly declined a design system during init. Log `"design.enabled is false in harness.config.json — project explicitly declined the design system. Skipping."` and stop. Do not run the rest of Phase 1 or any subsequent phase.
30
+ - If `design.enabled` is `true`: proceed normally with the rest of Phase 1.
31
+ - If `design.enabled` is absent (the field does not appear under `design`): the project has not decided yet. Surface a gentle prompt: "This project has not configured a design system. Would you like to enable one now? (yes / no / not sure)". On `yes`, proceed with Phase 1 — note that this answer is not persisted to `harness.config.json` (the init skill is the canonical writer of that field), so this prompt will fire again on the next `on_new_feature` invocation; run `harness init --migrate` to make the choice permanent. On `no` or `not sure`, stop without writing anything to `harness.config.json`.
32
+
33
+ After the gate, read the remaining design configuration fields:
29
34
  - `design.strictness` -- enforcement level (`strict`, `standard`, `permissive`)
30
35
  - `design.platforms` -- which platforms are enabled (web, mobile)
31
36
  - `design.tokenPath` -- path to tokens file (default: `design-system/tokens.json`)