@harness-engineering/cli 1.7.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/agents/personas/documentation-maintainer.yaml +3 -1
  2. package/dist/agents/personas/performance-guardian.yaml +23 -0
  3. package/dist/agents/skills/claude-code/align-documentation/SKILL.md +13 -0
  4. package/dist/agents/skills/claude-code/cleanup-dead-code/SKILL.md +25 -1
  5. package/dist/agents/skills/claude-code/cleanup-dead-code/skill.yaml +5 -2
  6. package/dist/agents/skills/claude-code/detect-doc-drift/SKILL.md +12 -0
  7. package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +48 -1
  8. package/dist/agents/skills/claude-code/enforce-architecture/skill.yaml +5 -2
  9. package/dist/agents/skills/claude-code/harness-accessibility/SKILL.md +7 -0
  10. package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +11 -3
  11. package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +81 -11
  12. package/dist/agents/skills/claude-code/harness-brainstorming/skill.yaml +2 -0
  13. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +487 -234
  14. package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +15 -2
  15. package/dist/agents/skills/claude-code/harness-codebase-cleanup/SKILL.md +226 -0
  16. package/dist/agents/skills/claude-code/harness-codebase-cleanup/skill.yaml +64 -0
  17. package/dist/agents/skills/claude-code/harness-dependency-health/SKILL.md +35 -6
  18. package/dist/agents/skills/claude-code/harness-docs-pipeline/SKILL.md +460 -0
  19. package/dist/agents/skills/claude-code/harness-docs-pipeline/skill.yaml +69 -0
  20. package/dist/agents/skills/claude-code/harness-execution/SKILL.md +73 -8
  21. package/dist/agents/skills/claude-code/harness-execution/skill.yaml +1 -0
  22. package/dist/agents/skills/claude-code/harness-hotspot-detector/SKILL.md +32 -6
  23. package/dist/agents/skills/claude-code/harness-i18n/SKILL.md +484 -0
  24. package/dist/agents/skills/claude-code/harness-i18n/skill.yaml +54 -0
  25. package/dist/agents/skills/claude-code/harness-i18n-process/SKILL.md +388 -0
  26. package/dist/agents/skills/claude-code/harness-i18n-process/skill.yaml +43 -0
  27. package/dist/agents/skills/claude-code/harness-i18n-workflow/SKILL.md +512 -0
  28. package/dist/agents/skills/claude-code/harness-i18n-workflow/skill.yaml +53 -0
  29. package/dist/agents/skills/claude-code/harness-impact-analysis/SKILL.md +35 -6
  30. package/dist/agents/skills/claude-code/harness-integrity/SKILL.md +17 -1
  31. package/dist/agents/skills/claude-code/harness-knowledge-mapper/SKILL.md +46 -5
  32. package/dist/agents/skills/claude-code/harness-perf/SKILL.md +37 -8
  33. package/dist/agents/skills/claude-code/harness-perf/skill.yaml +3 -0
  34. package/dist/agents/skills/claude-code/harness-perf-tdd/SKILL.md +17 -4
  35. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +59 -5
  36. package/dist/agents/skills/claude-code/harness-planning/skill.yaml +2 -0
  37. package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +16 -0
  38. package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +561 -0
  39. package/dist/agents/skills/claude-code/harness-roadmap/skill.yaml +43 -0
  40. package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +36 -2
  41. package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +8 -6
  42. package/dist/agents/skills/claude-code/harness-soundness-review/SKILL.md +1267 -0
  43. package/dist/agents/skills/claude-code/harness-soundness-review/skill.yaml +48 -0
  44. package/dist/agents/skills/claude-code/harness-test-advisor/SKILL.md +35 -6
  45. package/dist/agents/skills/claude-code/harness-verification/SKILL.md +66 -0
  46. package/dist/agents/skills/claude-code/harness-verification/skill.yaml +1 -0
  47. package/dist/agents/skills/claude-code/harness-verify/SKILL.md +11 -0
  48. package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +15 -1
  49. package/dist/agents/skills/claude-code/validate-context-engineering/SKILL.md +12 -0
  50. package/dist/agents/skills/gemini-cli/add-harness-component/SKILL.md +192 -0
  51. package/dist/agents/skills/gemini-cli/add-harness-component/skill.yaml +32 -0
  52. package/dist/agents/skills/gemini-cli/align-documentation/SKILL.md +213 -0
  53. package/dist/agents/skills/gemini-cli/align-documentation/skill.yaml +31 -0
  54. package/dist/agents/skills/gemini-cli/check-mechanical-constraints/SKILL.md +191 -0
  55. package/dist/agents/skills/gemini-cli/check-mechanical-constraints/skill.yaml +32 -0
  56. package/dist/agents/skills/gemini-cli/cleanup-dead-code/SKILL.md +245 -0
  57. package/dist/agents/skills/gemini-cli/cleanup-dead-code/skill.yaml +33 -0
  58. package/dist/agents/skills/gemini-cli/detect-doc-drift/SKILL.md +179 -0
  59. package/dist/agents/skills/gemini-cli/detect-doc-drift/skill.yaml +30 -0
  60. package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +240 -0
  61. package/dist/agents/skills/gemini-cli/enforce-architecture/skill.yaml +34 -0
  62. package/dist/agents/skills/gemini-cli/harness-accessibility/SKILL.md +7 -0
  63. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +397 -0
  64. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/skill.yaml +48 -0
  65. package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +11 -3
  66. package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +317 -0
  67. package/dist/agents/skills/gemini-cli/harness-brainstorming/skill.yaml +49 -0
  68. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +681 -0
  69. package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +45 -0
  70. package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/SKILL.md +226 -0
  71. package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/skill.yaml +64 -0
  72. package/dist/agents/skills/gemini-cli/harness-debugging/SKILL.md +366 -0
  73. package/dist/agents/skills/gemini-cli/harness-debugging/skill.yaml +47 -0
  74. package/dist/agents/skills/gemini-cli/harness-dependency-health/SKILL.md +35 -6
  75. package/dist/agents/skills/gemini-cli/harness-diagnostics/SKILL.md +318 -0
  76. package/dist/agents/skills/gemini-cli/harness-diagnostics/skill.yaml +50 -0
  77. package/dist/agents/skills/gemini-cli/harness-docs-pipeline/SKILL.md +460 -0
  78. package/dist/agents/skills/gemini-cli/harness-docs-pipeline/skill.yaml +69 -0
  79. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +382 -0
  80. package/dist/agents/skills/gemini-cli/harness-execution/skill.yaml +51 -0
  81. package/dist/agents/skills/gemini-cli/harness-git-workflow/SKILL.md +268 -0
  82. package/dist/agents/skills/gemini-cli/harness-git-workflow/skill.yaml +31 -0
  83. package/dist/agents/skills/gemini-cli/harness-hotspot-detector/SKILL.md +32 -6
  84. package/dist/agents/skills/gemini-cli/harness-i18n/SKILL.md +484 -0
  85. package/dist/agents/skills/gemini-cli/harness-i18n/skill.yaml +54 -0
  86. package/dist/agents/skills/gemini-cli/harness-i18n-process/SKILL.md +388 -0
  87. package/dist/agents/skills/gemini-cli/harness-i18n-process/skill.yaml +43 -0
  88. package/dist/agents/skills/gemini-cli/harness-i18n-workflow/SKILL.md +512 -0
  89. package/dist/agents/skills/gemini-cli/harness-i18n-workflow/skill.yaml +53 -0
  90. package/dist/agents/skills/gemini-cli/harness-impact-analysis/SKILL.md +35 -6
  91. package/dist/agents/skills/gemini-cli/harness-integrity/SKILL.md +167 -0
  92. package/dist/agents/skills/gemini-cli/harness-integrity/skill.yaml +47 -0
  93. package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/SKILL.md +46 -5
  94. package/dist/agents/skills/gemini-cli/harness-onboarding/SKILL.md +288 -0
  95. package/dist/agents/skills/gemini-cli/harness-onboarding/skill.yaml +30 -0
  96. package/dist/agents/skills/gemini-cli/harness-parallel-agents/SKILL.md +171 -0
  97. package/dist/agents/skills/gemini-cli/harness-parallel-agents/skill.yaml +33 -0
  98. package/dist/agents/skills/gemini-cli/harness-perf/SKILL.md +37 -8
  99. package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +3 -0
  100. package/dist/agents/skills/gemini-cli/harness-perf-tdd/SKILL.md +17 -4
  101. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +389 -0
  102. package/dist/agents/skills/gemini-cli/harness-planning/skill.yaml +49 -0
  103. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +262 -0
  104. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/skill.yaml +33 -0
  105. package/dist/agents/skills/gemini-cli/harness-refactoring/SKILL.md +169 -0
  106. package/dist/agents/skills/gemini-cli/harness-refactoring/skill.yaml +33 -0
  107. package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +16 -0
  108. package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +561 -0
  109. package/dist/agents/skills/gemini-cli/harness-roadmap/skill.yaml +43 -0
  110. package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +8 -6
  111. package/dist/agents/skills/gemini-cli/harness-skill-authoring/SKILL.md +292 -0
  112. package/dist/agents/skills/gemini-cli/harness-skill-authoring/skill.yaml +32 -0
  113. package/dist/agents/skills/gemini-cli/harness-soundness-review/SKILL.md +1267 -0
  114. package/dist/agents/skills/gemini-cli/harness-soundness-review/skill.yaml +48 -0
  115. package/dist/agents/skills/gemini-cli/harness-state-management/SKILL.md +309 -0
  116. package/dist/agents/skills/gemini-cli/harness-state-management/skill.yaml +32 -0
  117. package/dist/agents/skills/gemini-cli/harness-tdd/SKILL.md +177 -0
  118. package/dist/agents/skills/gemini-cli/harness-tdd/skill.yaml +48 -0
  119. package/dist/agents/skills/gemini-cli/harness-test-advisor/SKILL.md +35 -6
  120. package/dist/agents/skills/gemini-cli/harness-verification/SKILL.md +328 -0
  121. package/dist/agents/skills/gemini-cli/harness-verification/skill.yaml +42 -0
  122. package/dist/agents/skills/gemini-cli/harness-verify/SKILL.md +159 -0
  123. package/dist/agents/skills/gemini-cli/harness-verify/skill.yaml +40 -0
  124. package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +224 -0
  125. package/dist/agents/skills/gemini-cli/initialize-harness-project/skill.yaml +31 -0
  126. package/dist/agents/skills/gemini-cli/validate-context-engineering/SKILL.md +150 -0
  127. package/dist/agents/skills/gemini-cli/validate-context-engineering/skill.yaml +31 -0
  128. package/dist/agents/skills/shared/i18n-knowledge/accessibility/intersection.yaml +142 -0
  129. package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/encoding.yaml +67 -0
  130. package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/formatting.yaml +106 -0
  131. package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/layout.yaml +80 -0
  132. package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/pluralization.yaml +80 -0
  133. package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/string-handling.yaml +106 -0
  134. package/dist/agents/skills/shared/i18n-knowledge/frameworks/android-resources.yaml +47 -0
  135. package/dist/agents/skills/shared/i18n-knowledge/frameworks/apple-strings.yaml +47 -0
  136. package/dist/agents/skills/shared/i18n-knowledge/frameworks/backend-patterns.yaml +50 -0
  137. package/dist/agents/skills/shared/i18n-knowledge/frameworks/flutter-intl.yaml +47 -0
  138. package/dist/agents/skills/shared/i18n-knowledge/frameworks/i18next.yaml +47 -0
  139. package/dist/agents/skills/shared/i18n-knowledge/frameworks/react-intl.yaml +47 -0
  140. package/dist/agents/skills/shared/i18n-knowledge/frameworks/vue-i18n.yaml +47 -0
  141. package/dist/agents/skills/shared/i18n-knowledge/industries/ecommerce.yaml +66 -0
  142. package/dist/agents/skills/shared/i18n-knowledge/industries/fintech.yaml +66 -0
  143. package/dist/agents/skills/shared/i18n-knowledge/industries/gaming.yaml +69 -0
  144. package/dist/agents/skills/shared/i18n-knowledge/industries/healthcare.yaml +66 -0
  145. package/dist/agents/skills/shared/i18n-knowledge/industries/legal.yaml +66 -0
  146. package/dist/agents/skills/shared/i18n-knowledge/locales/ar.yaml +41 -0
  147. package/dist/agents/skills/shared/i18n-knowledge/locales/de.yaml +35 -0
  148. package/dist/agents/skills/shared/i18n-knowledge/locales/en.yaml +32 -0
  149. package/dist/agents/skills/shared/i18n-knowledge/locales/es.yaml +35 -0
  150. package/dist/agents/skills/shared/i18n-knowledge/locales/fi.yaml +35 -0
  151. package/dist/agents/skills/shared/i18n-knowledge/locales/fr.yaml +35 -0
  152. package/dist/agents/skills/shared/i18n-knowledge/locales/he.yaml +41 -0
  153. package/dist/agents/skills/shared/i18n-knowledge/locales/hi.yaml +35 -0
  154. package/dist/agents/skills/shared/i18n-knowledge/locales/it.yaml +32 -0
  155. package/dist/agents/skills/shared/i18n-knowledge/locales/ja.yaml +38 -0
  156. package/dist/agents/skills/shared/i18n-knowledge/locales/ko.yaml +38 -0
  157. package/dist/agents/skills/shared/i18n-knowledge/locales/nl.yaml +32 -0
  158. package/dist/agents/skills/shared/i18n-knowledge/locales/pl.yaml +35 -0
  159. package/dist/agents/skills/shared/i18n-knowledge/locales/pt.yaml +32 -0
  160. package/dist/agents/skills/shared/i18n-knowledge/locales/ru.yaml +35 -0
  161. package/dist/agents/skills/shared/i18n-knowledge/locales/sv.yaml +32 -0
  162. package/dist/agents/skills/shared/i18n-knowledge/locales/th.yaml +35 -0
  163. package/dist/agents/skills/shared/i18n-knowledge/locales/tr.yaml +35 -0
  164. package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hans.yaml +38 -0
  165. package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hant.yaml +35 -0
  166. package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/i18next-mcp.yaml +56 -0
  167. package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lingo-dev.yaml +56 -0
  168. package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lokalise.yaml +60 -0
  169. package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/tolgee.yaml +60 -0
  170. package/dist/agents/skills/shared/i18n-knowledge/testing/locale-testing.yaml +107 -0
  171. package/dist/agents/skills/shared/i18n-knowledge/testing/pseudo-localization.yaml +86 -0
  172. package/dist/bin/harness.js +64 -4
  173. package/dist/{chunk-GA6GN5J2.js → chunk-E2RTDBMG.js} +2263 -41
  174. package/dist/{chunk-FFIX3QVG.js → chunk-KJANDVVC.js} +141 -49
  175. package/dist/{chunk-4WUGOJQ7.js → chunk-RT2LYQHF.js} +1 -1
  176. package/dist/{dist-C4J67MPP.js → dist-CCM3L3UE.js} +95 -1
  177. package/dist/{dist-N4D4QWFV.js → dist-K6KTTN3I.js} +4 -4
  178. package/dist/index.d.ts +187 -7
  179. package/dist/index.js +7 -3
  180. package/dist/validate-cross-check-ZGKFQY57.js +7 -0
  181. package/package.json +9 -9
  182. package/dist/agents/skills/node_modules/.bin/glob +0 -17
  183. package/dist/agents/skills/node_modules/.bin/vitest +0 -17
  184. package/dist/agents/skills/node_modules/.bin/yaml +0 -17
  185. package/dist/templates/advanced/docs/specs/.gitkeep +0 -0
  186. package/dist/templates/intermediate/docs/specs/.gitkeep +0 -0
  187. package/dist/validate-cross-check-WGXQ7K62.js +0 -7
@@ -0,0 +1,561 @@
1
+ # Harness Roadmap
2
+
3
+ > Create and manage a unified project roadmap from existing specs and plans. Interactive, human-confirmed, always valid.
4
+
5
+ ## When to Use
6
+
7
+ - When a user asks about project status and a roadmap exists (default -- no args)
8
+ - When a project needs a unified roadmap and none exists yet (`--create`)
9
+ - When adding a new feature to an existing roadmap (`--add <feature-name>`)
10
+ - When roadmap statuses may be stale and need updating from plan execution state (`--sync`)
11
+ - When features need reordering, moving between milestones, or blocker updates (`--edit`)
12
+ - When user asks about project status and no roadmap exists -- suggest `--create`
13
+ - NOT for programmatic CRUD (use `manage_roadmap` MCP tool directly)
14
+
15
+ ## Process
16
+
17
+ ### Iron Law
18
+
19
+ **Never write `docs/roadmap.md` without the human confirming the proposed structure first.**
20
+
21
+ If the human has not seen and approved the milestone groupings and feature list, do not write the file. Present. Wait. Confirm. Then write.
22
+
23
+ ---
24
+
25
+ ### Command: `--create` -- Bootstrap Roadmap
26
+
27
+ #### Phase 1: SCAN -- Discover Artifacts
28
+
29
+ 1. Check if `docs/roadmap.md` already exists.
30
+ - If it exists: warn the human. "A roadmap already exists. Overwriting will replace it. Continue? (y/n)" Wait for confirmation before proceeding. If declined, stop.
31
+ 2. Scan for specs:
32
+ - `docs/changes/*/proposal.md`
33
+ - Record each spec's title, status (if detectable from frontmatter or content), and file path.
34
+ 3. Scan for plans:
35
+ - `docs/plans/*.md`
36
+ - Record each plan's title, estimated tasks, and file path.
37
+ 4. Match plans to specs:
38
+ - Plans often reference their spec in frontmatter (`spec:`) or body text. Link them when a match is found.
39
+ - Unmatched plans become standalone features.
40
+ 5. Infer feature status from artifacts:
41
+ - Has spec + plan + implementation evidence (committed code referenced in plan) -> `in-progress` or `complete`
42
+ - Has spec + plan but no implementation -> `planned`
43
+ - Has spec but no plan -> `backlog`
44
+ - Has plan but no spec -> `planned` (unusual, flag for human review)
45
+ 6. Detect project name from `harness.yaml` `project` field, or `package.json` `name` field, or directory name as fallback.
46
+
47
+ Present scan summary:
48
+
49
+ ```
50
+ SCAN COMPLETE
51
+
52
+ Project: <name>
53
+ Found: N specs, N plans
54
+ Matched: N spec-plan pairs
55
+ Unmatched specs: N (backlog candidates)
56
+ Unmatched plans: N (flag for review)
57
+ ```
58
+
59
+ #### Phase 2: PROPOSE -- Interactive Grouping
60
+
61
+ 1. Present discovered features in default milestone groupings:
62
+ - **Current Work** -- features with status `in-progress`
63
+ - **Backlog** -- everything else
64
+
65
+ ```
66
+ Proposed Roadmap Structure:
67
+
68
+ ## Current Work
69
+ - Feature A (in-progress) -- spec: docs/changes/feature-a/proposal.md
70
+ - Feature B (in-progress) -- spec: docs/changes/feature-b/proposal.md
71
+
72
+ ## Backlog
73
+ - Feature C (planned) -- spec: docs/changes/feature-c/proposal.md
74
+ - Feature D (backlog) -- spec: docs/changes/feature-d/proposal.md
75
+ ```
76
+
77
+ 2. Offer choices:
78
+ - **(A) Accept** -- proceed with this structure
79
+ - **(B) Rename** -- rename milestones or features
80
+ - **(C) Reorganize** -- move features between milestones
81
+ - **(D) Add milestones** -- create additional milestones (e.g., "v2.0", "Q2 2026")
82
+
83
+ 3. Ask: "Are there additional features not captured in specs that should be on the roadmap?"
84
+ - If yes: collect name, summary, and milestone for each.
85
+
86
+ 4. Repeat until the human selects **(A) Accept**.
87
+
88
+ #### Phase 3: WRITE -- Generate Roadmap
89
+
90
+ 1. Build the roadmap structure:
91
+ - Frontmatter: `project`, `version: 1`, `created`, `updated` timestamps
92
+ - One H2 section per milestone
93
+ - One H3 section per feature with 5 fields: `Status`, `Spec`, `Summary`, `Blockers`, `Plan`
94
+
95
+ 2. Write via `manage_roadmap` MCP tool if available. If MCP is unavailable, write directly using the roadmap markdown format:
96
+
97
+ ```markdown
98
+ ---
99
+ project: <name>
100
+ version: 1
101
+ created: YYYY-MM-DD
102
+ updated: YYYY-MM-DD
103
+ ---
104
+
105
+ # Roadmap
106
+
107
+ ## Current Work
108
+
109
+ ### Feature A
110
+
111
+ - **Status:** in-progress
112
+ - **Spec:** docs/changes/feature-a/proposal.md
113
+ - **Summary:** One-line description of the feature
114
+ - **Blockers:** none
115
+ - **Plan:** docs/plans/2026-03-20-feature-a-plan.md
116
+ ```
117
+
118
+ 3. Write to `docs/roadmap.md`.
119
+
120
+ #### Phase 4: VALIDATE -- Verify Output
121
+
122
+ 1. Read back `docs/roadmap.md`.
123
+ 2. Verify via `manage_roadmap show` if MCP is available -- confirms round-trip parsing.
124
+ 3. Run `harness validate`.
125
+ 4. Present summary to human:
126
+
127
+ ```
128
+ Roadmap created: docs/roadmap.md
129
+ Milestones: N
130
+ Features: N
131
+ harness validate: passed
132
+ ```
133
+
134
+ ---
135
+
136
+ ### Command: `--add <feature-name>` -- Add a Feature
137
+
138
+ #### Phase 1: SCAN -- Load Existing Roadmap
139
+
140
+ 1. Check if `docs/roadmap.md` exists.
141
+ - If missing: error with clear message. "No roadmap found at docs/roadmap.md. Run `--create` first to bootstrap one."
142
+ 2. Parse the roadmap (via `manage_roadmap show` or direct read).
143
+ 3. Check for duplicate feature names. If `<feature-name>` already exists: error with message. "Feature '<feature-name>' already exists in milestone '<milestone>'. Use a different name or edit the existing feature."
144
+
145
+ #### Phase 2: PROPOSE -- Collect Feature Details
146
+
147
+ Ask the human for each field interactively:
148
+
149
+ 1. **Milestone:** "Which milestone should this feature belong to?" List existing milestones plus a `[NEW]` option. If `[NEW]`: ask for the new milestone name.
150
+ 2. **Status:** "What is the current status?" Offer: `backlog`, `planned`, `in-progress`, `blocked`.
151
+ 3. **Spec:** "Is there a spec for this feature?" If yes, ask for the path. If no, leave as `none`.
152
+ 4. **Summary:** "One-line summary of the feature."
153
+ 5. **Blockers:** "Any blockers?" If yes, collect. If no, set to `none`.
154
+ 6. **Plan:** "Is there a plan for this feature?" If yes, ask for the path. If no, leave as `none`.
155
+
156
+ Present the collected details for confirmation:
157
+
158
+ ```
159
+ New feature to add:
160
+
161
+ Milestone: Current Work
162
+ Name: Feature E
163
+ Status: planned
164
+ Spec: docs/changes/feature-e/proposal.md
165
+ Summary: Add feature E to the system
166
+ Blockers: none
167
+ Plan: none
168
+
169
+ Confirm? (y/n)
170
+ ```
171
+
172
+ Wait for confirmation before proceeding.
173
+
174
+ #### Phase 3: WRITE -- Add Feature to Roadmap
175
+
176
+ 1. Add via `manage_roadmap add` MCP tool if available. If MCP is unavailable, parse the roadmap, add the feature to the specified milestone, and serialize back.
177
+ 2. If the milestone is `[NEW]`: create the milestone section, then add the feature.
178
+ 3. Write to `docs/roadmap.md`.
179
+
180
+ #### Phase 4: VALIDATE -- Verify Output
181
+
182
+ 1. Read back `docs/roadmap.md`.
183
+ 2. Verify the new feature appears in the correct milestone.
184
+ 3. Run `harness validate`.
185
+ 4. Confirm to human:
186
+
187
+ ```
188
+ Feature added: Feature E -> Current Work
189
+ Total features: N
190
+ harness validate: passed
191
+ ```
192
+
193
+ ---
194
+
195
+ ### Command: _(no args)_ -- Show Roadmap Summary
196
+
197
+ #### Phase 1: SCAN -- Load Roadmap
198
+
199
+ 1. Check if `docs/roadmap.md` exists.
200
+ - If missing: suggest `--create`. "No roadmap found at docs/roadmap.md. Run `--create` to bootstrap one from existing specs and plans."
201
+ 2. Parse the roadmap (via `manage_roadmap show` or direct read).
202
+
203
+ #### Phase 2: PRESENT -- Display Summary
204
+
205
+ 1. Display a compact summary of the roadmap:
206
+
207
+ ```
208
+ ROADMAP: <project-name>
209
+ Last synced: YYYY-MM-DD HH:MM
210
+
211
+ ## <Milestone 1> (N features)
212
+ - Feature A .................. in-progress
213
+ - Feature B .................. planned
214
+ - Feature C .................. blocked (by: Feature A)
215
+
216
+ ## <Milestone 2> (N features)
217
+ - Feature D .................. done
218
+ - Feature E .................. backlog
219
+
220
+ Total: N features | N done | N in-progress | N planned | N blocked | N backlog
221
+ ```
222
+
223
+ 2. If any features have stale sync timestamps (last_synced older than 24 hours), append a note:
224
+
225
+ ```
226
+ Hint: Roadmap may be stale. Run `--sync` to update statuses from plan execution state.
227
+ ```
228
+
229
+ 3. No file writes. This is a read-only operation. No `harness validate` needed.
230
+
231
+ ---
232
+
233
+ ### Command: `--sync` -- Sync Statuses from Execution State
234
+
235
+ #### Phase 1: SCAN -- Load Roadmap and Execution State
236
+
237
+ 1. Check if `docs/roadmap.md` exists.
238
+ - If missing: error with clear message. "No roadmap found at docs/roadmap.md. Run `--create` first to bootstrap one."
239
+ - Do NOT create a roadmap. Do NOT offer alternatives. Stop.
240
+ 2. Parse the roadmap (via `manage_roadmap show` or direct read).
241
+ 3. For each feature with linked plans, scan execution state:
242
+ - `.harness/state.json` (root execution state)
243
+ - `.harness/sessions/*/autopilot-state.json` (session-scoped execution state)
244
+ - Plan file completion markers
245
+
246
+ #### Phase 2: PROPOSE -- Present Status Changes
247
+
248
+ 1. Infer status for each feature:
249
+ - All tasks complete -> suggest `done`
250
+ - Any task started -> suggest `in-progress`
251
+ - Blocker feature not done -> suggest `blocked`
252
+ - No execution data found -> no change
253
+
254
+ 2. Check the **human-always-wins** rule: if `last_manual_edit` is more recent than `last_synced` for a feature, preserve the manually set status. Report it as "skipped (manual override)".
255
+
256
+ 3. Present proposed changes:
257
+
258
+ ```
259
+ SYNC RESULTS
260
+
261
+ Changes detected:
262
+ - Feature A: planned -> in-progress (3/8 tasks started)
263
+ - Feature B: in-progress -> done (all tasks complete)
264
+ - Feature C: planned -> blocked (blocked by: Feature A, not done)
265
+
266
+ Unchanged:
267
+ - Feature D: done (no change)
268
+
269
+ Skipped (manual override):
270
+ - Feature E: kept as "planned" (manually edited 2h ago)
271
+
272
+ Apply these changes? (y/n)
273
+ ```
274
+
275
+ 4. Wait for human confirmation before applying.
276
+
277
+ #### Phase 3: WRITE -- Apply Changes
278
+
279
+ 1. Apply via `manage_roadmap sync` MCP tool if available, or via `manage_roadmap update` for each changed feature. If MCP is unavailable, parse the roadmap, update statuses, and serialize back.
280
+ 2. Update `last_synced` timestamp in frontmatter.
281
+ 3. Write to `docs/roadmap.md`.
282
+
283
+ #### Phase 4: VALIDATE -- Verify Output
284
+
285
+ 1. Read back `docs/roadmap.md`.
286
+ 2. Verify changes applied correctly via `manage_roadmap show` if MCP is available.
287
+ 3. Run `harness validate`.
288
+ 4. Present summary:
289
+
290
+ ```
291
+ Sync complete: docs/roadmap.md
292
+ Updated: N features
293
+ Skipped: N (manual override)
294
+ Unchanged: N
295
+ harness validate: passed
296
+ ```
297
+
298
+ ---
299
+
300
+ ### Command: `--edit` -- Interactive Edit Session
301
+
302
+ #### Phase 1: SCAN -- Load Existing Roadmap
303
+
304
+ 1. Check if `docs/roadmap.md` exists.
305
+ - If missing: error with clear message. "No roadmap found at docs/roadmap.md. Run `--create` first to bootstrap one."
306
+ 2. Parse the roadmap (via `manage_roadmap show` or direct read).
307
+ 3. Present current structure:
308
+
309
+ ```
310
+ Current roadmap: <project-name>
311
+
312
+ ## <Milestone 1>
313
+ 1. Feature A (in-progress)
314
+ 2. Feature B (planned)
315
+
316
+ ## <Milestone 2>
317
+ 3. Feature C (done)
318
+ 4. Feature D (backlog)
319
+ ```
320
+
321
+ #### Phase 2: EDIT -- Interactive Modifications
322
+
323
+ Offer edit actions in a loop until the human is done:
324
+
325
+ 1. **Reorder features within a milestone:**
326
+ - "Move which feature? (number)" -> "To which position?" -> reorder.
327
+
328
+ 2. **Move a feature between milestones:**
329
+ - "Move which feature? (number)" -> "To which milestone?" (list milestones + `[NEW]`) -> move.
330
+ - If `[NEW]`: ask for the new milestone name, create it.
331
+
332
+ 3. **Update blockers:**
333
+ - "Update blockers for which feature? (number)" -> "Blocked by? (feature names, comma-separated, or 'none')" -> update.
334
+
335
+ 4. **Update status:**
336
+ - "Update status for which feature? (number)" -> offer: `backlog`, `planned`, `in-progress`, `blocked`, `done` -> update.
337
+
338
+ 5. **Rename a feature:**
339
+ - "Rename which feature? (number)" -> "New name?" -> rename.
340
+
341
+ 6. **Remove a feature:**
342
+ - "Remove which feature? (number)" -> "Confirm removal of '<name>'? (y/n)" -> remove on confirm.
343
+
344
+ 7. **Rename a milestone:**
345
+ - "Rename which milestone?" -> "New name?" -> rename.
346
+
347
+ 8. **Done:**
348
+ - Exit edit loop, proceed to WRITE phase.
349
+
350
+ Present the menu after each action:
351
+
352
+ ```
353
+ Edit actions:
354
+ (1) Reorder features within a milestone
355
+ (2) Move feature to different milestone
356
+ (3) Update blockers
357
+ (4) Update status
358
+ (5) Rename feature
359
+ (6) Remove feature
360
+ (7) Rename milestone
361
+ (D) Done -- save and exit
362
+
363
+ Choice?
364
+ ```
365
+
366
+ #### Phase 3: WRITE -- Save Changes
367
+
368
+ 1. Present a diff summary of all changes made during the edit session:
369
+
370
+ ```
371
+ Changes to apply:
372
+
373
+ - Moved "Feature B" from "Current Work" to "Q2 Release"
374
+ - Updated "Feature A" blockers: none -> Feature C
375
+ - Reordered "Q2 Release": Feature B now at position 1
376
+
377
+ Apply? (y/n)
378
+ ```
379
+
380
+ 2. Wait for confirmation before writing.
381
+ 3. Apply all changes via `manage_roadmap update` / `manage_roadmap remove` MCP tool calls, or direct file manipulation if MCP is unavailable.
382
+ 4. Update `last_manual_edit` timestamp in frontmatter (since this is a human-driven edit).
383
+ 5. Write to `docs/roadmap.md`.
384
+
385
+ #### Phase 4: VALIDATE -- Verify Output
386
+
387
+ 1. Read back `docs/roadmap.md`.
388
+ 2. Verify changes applied correctly.
389
+ 3. Run `harness validate`.
390
+ 4. Present summary:
391
+
392
+ ```
393
+ Edit complete: docs/roadmap.md
394
+ Changes applied: N
395
+ harness validate: passed
396
+ ```
397
+
398
+ ## Harness Integration
399
+
400
+ - **`manage_roadmap` MCP tool** -- Primary read/write interface for roadmap operations. Supports `show`, `add`, `update`, `remove`, and `query` actions. Use this when MCP is available for structured CRUD.
401
+ - **`harness validate`** -- Run after any roadmap modification to verify project health. Mandatory in the VALIDATE phase of both `--create` and `--add`.
402
+ - **Core `parseRoadmap`/`serializeRoadmap`** -- Fallback when MCP is unavailable. These functions in `packages/core/src/roadmap/` handle parsing and serializing the roadmap markdown format directly.
403
+ - **Roadmap file** -- Always at `docs/roadmap.md`. This is the single source of truth for the project roadmap.
404
+
405
+ ## Success Criteria
406
+
407
+ 1. `--create` discovers all specs (`docs/changes/*/proposal.md`) and plans (`docs/plans/*.md`)
408
+ 2. `--create` proposes groupings and waits for human confirmation before writing
409
+ 3. `--create` produces a valid `docs/roadmap.md` that round-trips through `parseRoadmap`/`serializeRoadmap`
410
+ 4. `--add` collects all fields interactively (milestone, status, spec, summary, blockers, plan)
411
+ 5. `--add` rejects duplicate feature names with a clear error message
412
+ 6. `--add` errors gracefully when no roadmap exists, directing the user to `--create`
413
+ 7. Default (no args) displays a compact status summary with feature counts by status
414
+ 8. Default (no args) suggests `--create` when no roadmap exists
415
+ 9. Default (no args) hints at `--sync` when roadmap may be stale
416
+ 10. `--sync` scans `.harness/state.json` and `.harness/sessions/*/autopilot-state.json` for execution state
417
+ 11. `--sync` respects the human-always-wins rule -- manually edited statuses are preserved
418
+ 12. `--sync` presents proposed changes and waits for human confirmation before applying
419
+ 13. `--sync` errors gracefully when no roadmap exists, directing the user to `--create`
420
+ 14. `--edit` offers reorder, move, blocker update, status update, rename, and remove actions
421
+ 15. `--edit` presents a diff summary and waits for confirmation before writing
422
+ 16. `--edit` updates `last_manual_edit` timestamp (since changes are human-driven)
423
+ 17. Output matches the roadmap markdown format exactly (frontmatter, H2 milestones, H3 features, 5 fields each)
424
+ 18. `harness validate` passes after all operations
425
+
426
+ ## Examples
427
+
428
+ ### Example: `--create` -- Bootstrap a Roadmap from Existing Artifacts
429
+
430
+ **Context:** A project with 3 specs and 2 plans. Two specs have matching plans (in-progress), one spec has no plan (backlog).
431
+
432
+ **Phase 1: SCAN**
433
+
434
+ ```
435
+ SCAN COMPLETE
436
+
437
+ Project: my-project
438
+ Found: 3 specs, 2 plans
439
+ Matched: 2 spec-plan pairs
440
+ Unmatched specs: 1 (backlog candidates)
441
+ Unmatched plans: 0
442
+ ```
443
+
444
+ **Phase 2: PROPOSE**
445
+
446
+ ```
447
+ Proposed Roadmap Structure:
448
+
449
+ ## Current Work
450
+ - Unified Code Review (in-progress) -- spec: docs/changes/unified-code-review/proposal.md
451
+ - Update Checker (in-progress) -- spec: docs/changes/update-checker/proposal.md
452
+
453
+ ## Backlog
454
+ - Design System (backlog) -- spec: docs/changes/design-system/proposal.md
455
+
456
+ Options:
457
+ (A) Accept this structure
458
+ (B) Rename milestones or features
459
+ (C) Reorganize -- move features between milestones
460
+ (D) Add milestones
461
+
462
+ Any additional features not captured in specs? (y/n)
463
+ ```
464
+
465
+ Human selects **(A) Accept**.
466
+
467
+ **Phase 3: WRITE**
468
+
469
+ ```
470
+ Writing docs/roadmap.md...
471
+ 2 milestones, 3 features
472
+ ```
473
+
474
+ **Phase 4: VALIDATE**
475
+
476
+ ```
477
+ Roadmap created: docs/roadmap.md
478
+ Milestones: 2 (Current Work, Backlog)
479
+ Features: 3
480
+ harness validate: passed
481
+ ```
482
+
483
+ ### Example: `--add` -- Add a Feature to an Existing Roadmap
484
+
485
+ **Context:** A roadmap exists with 2 milestones and 3 features. Adding a new feature.
486
+
487
+ **Phase 1: SCAN**
488
+
489
+ ```
490
+ Roadmap loaded: docs/roadmap.md
491
+ Milestones: 2 (Current Work, Backlog)
492
+ Features: 3
493
+ No duplicate found for "Notification System"
494
+ ```
495
+
496
+ **Phase 2: PROPOSE**
497
+
498
+ ```
499
+ Which milestone? [1] Current Work [2] Backlog [NEW] Create new
500
+ > 1
501
+
502
+ Status? [backlog] [planned] [in-progress] [blocked]
503
+ > planned
504
+
505
+ Spec? (path or "none")
506
+ > docs/changes/notification-system/proposal.md
507
+
508
+ One-line summary:
509
+ > Real-time notification delivery with WebSocket and email channels
510
+
511
+ Blockers? (or "none")
512
+ > none
513
+
514
+ Plan? (path or "none")
515
+ > none
516
+
517
+ New feature to add:
518
+
519
+ Milestone: Current Work
520
+ Name: Notification System
521
+ Status: planned
522
+ Spec: docs/changes/notification-system/proposal.md
523
+ Summary: Real-time notification delivery with WebSocket and email channels
524
+ Blockers: none
525
+ Plan: none
526
+
527
+ Confirm? (y/n)
528
+ ```
529
+
530
+ Human confirms **y**.
531
+
532
+ **Phase 3: WRITE**
533
+
534
+ ```
535
+ Adding feature to Current Work...
536
+ ```
537
+
538
+ **Phase 4: VALIDATE**
539
+
540
+ ```
541
+ Feature added: Notification System -> Current Work
542
+ Total features: 4
543
+ harness validate: passed
544
+ ```
545
+
546
+ ## Gates
547
+
548
+ These are hard stops. Violating any gate means the process has broken down.
549
+
550
+ - **No writing `docs/roadmap.md` without human confirmation of structure.** The PROPOSE phase must complete with an explicit accept before any file is written. Skipping confirmation produces a roadmap the human did not agree to.
551
+ - **No overwriting an existing roadmap without explicit user consent.** If `docs/roadmap.md` exists when `--create` runs, the human must confirm the overwrite. Silent overwrites destroy prior work.
552
+ - **No adding features with duplicate names.** If a feature with the same name already exists in any milestone, reject the add with a clear error. Duplicates corrupt the roadmap structure.
553
+ - **No proceeding when `docs/roadmap.md` is missing for `--add`.** If the roadmap does not exist, do not create one silently. Error and direct the user to `--create`.
554
+ - **No syncing when `docs/roadmap.md` does not exist.** `--sync` must error immediately with a message directing the user to `--create`. Do not create a roadmap as a side effect of sync.
555
+ - **No writing changes from `--edit` without showing a diff summary and getting confirmation.** The WRITE phase must present all pending changes and wait for explicit accept before modifying `docs/roadmap.md`.
556
+
557
+ ## Escalation
558
+
559
+ - **When no specs or plans are found during `--create`:** Suggest creating a minimal roadmap with just a Backlog milestone containing features described verbally by the human. Alternatively, suggest running `harness:brainstorming` first to generate specs that can then be discovered by `--create`.
560
+ - **When the roadmap file is malformed and cannot be parsed:** Report the specific parse error with line numbers if available. Suggest manual inspection of `docs/roadmap.md` or recreation with `--create` (after backing up the existing file).
561
+ - **When MCP tool is unavailable:** Fall back to direct file manipulation via Read/Write tools using the roadmap markdown format. The core `parseRoadmap`/`serializeRoadmap` functions handle the format. Report the fallback to the human: "MCP tool unavailable, using direct file operations."
@@ -0,0 +1,43 @@
1
+ name: harness-roadmap
2
+ version: "1.0.0"
3
+ description: Create and manage a unified project roadmap from existing specs and plans
4
+ cognitive_mode: constructive-architect
5
+ triggers:
6
+ - manual
7
+ platforms:
8
+ - claude-code
9
+ - gemini-cli
10
+ tools:
11
+ - Bash
12
+ - Read
13
+ - Write
14
+ - Edit
15
+ - Glob
16
+ - Grep
17
+ cli:
18
+ command: harness skill run harness-roadmap
19
+ args:
20
+ - name: command
21
+ description: "Command: --create (bootstrap roadmap), --add <feature-name> (add feature), --sync (update statuses from execution state), --edit (interactive edit session), or no args (show summary)"
22
+ required: false
23
+ mcp:
24
+ tool: run_skill
25
+ input:
26
+ skill: harness-roadmap
27
+ type: rigid
28
+ phases:
29
+ - name: scan
30
+ description: Discover specs, plans, and existing roadmap state
31
+ required: true
32
+ - name: propose
33
+ description: Present discovered features and groupings for human approval
34
+ required: true
35
+ - name: write
36
+ description: Write or update docs/roadmap.md via manage_roadmap MCP tool or direct file write
37
+ required: true
38
+ - name: validate
39
+ description: Read back, verify round-trip, run harness validate
40
+ required: true
41
+ state:
42
+ persistent: false
43
+ depends_on: []
@@ -11,13 +11,47 @@
11
11
  - NOT for quick pre-commit checks (use harness-pre-commit-review for that)
12
12
  - NOT for general code review (use harness-code-review for that)
13
13
 
14
+ ## Scope Adaptation
15
+
16
+ This skill adapts its behavior based on invocation context — standalone or as part of the code review pipeline.
17
+
18
+ ### Detection
19
+
20
+ Check for `pipelineContext` in `.harness/handoff.json`. If present, run in **changed-files mode**. Otherwise, run in **full mode**.
21
+
22
+ ```bash
23
+ # Check for pipeline context
24
+ cat .harness/handoff.json 2>/dev/null | grep -q '"pipelineContext"'
25
+ ```
26
+
27
+ ### Changed-Files Mode (Code Review Pipeline)
28
+
29
+ When invoked from the code review pipeline (Phase 4 fan-out, security slot):
30
+
31
+ - **Phase 1 (SCAN): SKIPPED.** The mechanical security scan already ran in code review Phase 2. Read the mechanical findings from `PipelineContext.findings` where `domain === 'security'` instead of re-running `run_security_scan`.
32
+ - **Phase 2 (REVIEW):** Run OWASP baseline + stack-adaptive analysis on **changed files only** plus their direct imports (for data flow tracing). The changed file list is provided in the context bundle from the pipeline.
33
+ - **Phase 3 (THREAT-MODEL): SKIPPED** unless `--deep` flag was passed through from code review.
34
+ - **Phase 4 (REPORT): SKIPPED.** Return findings as `ReviewFinding[]` to the pipeline. The pipeline handles output formatting (Phase 7).
35
+
36
+ Findings returned in this mode **must** use the `ReviewFinding` schema with populated security fields (`cweId`, `owaspCategory`, `confidence`, `remediation`, `references`).
37
+
38
+ ### Full Mode (Standalone)
39
+
40
+ When invoked directly (no PipelineContext):
41
+
42
+ - All phases run as documented below (Phase 1 through Phase 4).
43
+ - Output is the standalone security report format.
44
+ - This is the existing behavior — no changes.
45
+
14
46
  ## Principle: Layered Security
15
47
 
16
48
  This skill follows the Deterministic-vs-LLM Responsibility Split principle. The mechanical scanner runs first and catches what patterns can catch. The AI review then looks for semantic issues that patterns miss — user input flowing through multiple functions to a dangerous sink, missing authorization checks, logic flaws in authentication flows.
17
49
 
18
50
  ## Process
19
51
 
20
- ### Phase 1: SCAN — Mechanical Security Scanner
52
+ ### Phase 1: SCAN — Mechanical Security Scanner (full mode only)
53
+
54
+ > **Note:** This phase is skipped in changed-files mode. See [Scope Adaptation](#scope-adaptation) above.
21
55
 
22
56
  Run the built-in security scanner against the project.
23
57
 
@@ -69,7 +103,7 @@ After the OWASP baseline, add stack-specific checks:
69
103
  - **React:** XSS via `dangerouslySetInnerHTML`, sensitive data in client state, insecure `postMessage` listeners
70
104
  - **Go:** Race conditions in concurrent handlers, `unsafe.Pointer` usage, format string injection
71
105
 
72
- ### Phase 3: THREAT-MODEL (optional, `--deep` flag)
106
+ ### Phase 3: THREAT-MODEL (optional, `--deep` flag; full mode or explicit `--deep` in pipeline)
73
107
 
74
108
  When invoked with `--deep`, build a lightweight threat model:
75
109
 
@@ -24,6 +24,9 @@ cli:
24
24
  - name: deep
25
25
  description: Enable threat modeling phase
26
26
  required: false
27
+ - name: scope
28
+ description: "Scope mode: 'changed-files' or 'full'. Auto-detected from PipelineContext when omitted."
29
+ required: false
27
30
  mcp:
28
31
  tool: run_skill
29
32
  input:
@@ -32,8 +35,8 @@ mcp:
32
35
  type: rigid
33
36
  phases:
34
37
  - name: scan
35
- description: Run mechanical security scanner
36
- required: true
38
+ description: Run mechanical security scanner (skipped in changed-files mode)
39
+ required: false
37
40
  - name: review
38
41
  description: AI-powered security review (OWASP + stack-adaptive)
39
42
  required: true
@@ -41,10 +44,9 @@ phases:
41
44
  description: Lightweight threat model from codebase graph
42
45
  required: false
43
46
  - name: report
44
- description: Generate findings report with remediation guidance
45
- required: true
47
+ description: Generate findings report with remediation guidance (skipped in pipeline mode)
48
+ required: false
46
49
  state:
47
50
  persistent: false
48
51
  files: []
49
- depends_on:
50
- - harness-code-review
52
+ depends_on: []