@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,397 @@
1
+ # Harness Architecture Advisor
2
+
3
+ > Cognitive mode: **advisory-guide**. Ask questions, surface trade-offs, present options. Do NOT execute. The human decides; you inform the decision.
4
+
5
+ ## When to Use
6
+
7
+ - When designing a new feature, module, or system boundary
8
+ - When choosing between architectural approaches (REST vs GraphQL, monolith vs microservice, etc.)
9
+ - When refactoring raises questions about target architecture
10
+ - When `on_new_feature` triggers fire and the feature touches multiple modules
11
+ - When a Design-category error is escalated from harness-diagnostics
12
+ - NOT for implementation (use harness-execution after the decision is made)
13
+ - NOT for bug fixes (use harness-debugging or harness-diagnostics)
14
+ - NOT for code review (use harness-code-review)
15
+
16
+ ## Core Principle
17
+
18
+ **This skill advises. It does not execute.**
19
+
20
+ You will research, analyze, and present options with clear trade-offs. You will not write production code, create files, or make architectural choices. The human makes the decision. You document it.
21
+
22
+ If you find yourself writing implementation code, STOP. You have left advisory mode. Return to presenting options.
23
+
24
+ ## Process
25
+
26
+ ### Phase 1: DISCOVER — Understand the Problem Space
27
+
28
+ **Gate: This phase requires human answers. Do not proceed to Phase 2 until the human has responded.**
29
+
30
+ Ask these 5 questions. Wait for answers before proceeding.
31
+
32
+ 1. **What problem are you solving?** Describe the user-facing or system-facing need. Not the technical solution — the problem.
33
+
34
+ 2. **What are your hard constraints?** Things that cannot change: existing database, specific language/framework, compliance requirements, team size, timeline, budget.
35
+
36
+ 3. **What are your soft preferences?** Things you would like but could trade away: specific patterns, technology preferences, performance targets, consistency with other systems.
37
+
38
+ 4. **What have you already considered?** Any approaches you have thought about, tried, or rejected. Include why you rejected them if applicable.
39
+
40
+ 5. **What does success look like in 6 months?** How will you know this decision was correct? What would make you regret it?
41
+
42
+ Record the answers verbatim. Do not paraphrase or interpret at this stage.
43
+
44
+ ```
45
+ Store answers in: .harness/architecture/<topic>/discovery.md
46
+ ```
47
+
48
+ ---
49
+
50
+ ### Phase 2: ANALYZE — Research the Codebase
51
+
52
+ Read the codebase to understand the current state. Do not propose solutions yet — gather facts.
53
+
54
+ #### Step 1: Map Existing Patterns
55
+
56
+ Search for how the codebase currently handles similar concerns:
57
+
58
+ - What architectural patterns are already in use? (MVC, hexagonal, event-driven, etc.)
59
+ - How are similar features structured?
60
+ - What conventions exist for the relevant layer (API, data, UI, infrastructure)?
61
+
62
+ #### Step 2: Identify Integration Points
63
+
64
+ Find where the new feature will touch existing code:
65
+
66
+ - Which modules will it interact with?
67
+ - What are the current API boundaries?
68
+ - Are there shared data models or services?
69
+
70
+ #### Step 3: Assess Technical Debt
71
+
72
+ Look for existing issues that may affect the decision:
73
+
74
+ - Are there known pain points in the relevant area?
75
+ - Is there existing tech debt that one option would worsen and another would improve?
76
+ - Are there pending migrations or deprecations?
77
+
78
+ #### Step 4: Summarize Findings
79
+
80
+ ```markdown
81
+ ## Codebase Analysis: <topic>
82
+
83
+ ### Current Patterns
84
+
85
+ - <pattern 1>: used in <locations>
86
+ - <pattern 2>: used in <locations>
87
+
88
+ ### Integration Points
89
+
90
+ - <module A>: <how it connects>
91
+ - <module B>: <how it connects>
92
+
93
+ ### Technical Debt
94
+
95
+ - <issue 1>: <impact on this decision>
96
+ - <issue 2>: <impact on this decision>
97
+
98
+ ### Relevant Files
99
+
100
+ - <path>: <why it matters>
101
+ ```
102
+
103
+ ```
104
+ Store analysis in: .harness/architecture/<topic>/analysis.md
105
+ ```
106
+
107
+ ### Graph-Enhanced Context (when available)
108
+
109
+ When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate context:
110
+
111
+ - `query_graph` — discover how similar features are structured in the codebase
112
+ - `search_similar` — find analogous patterns and implementations
113
+
114
+ Replaces manual Glob/Grep exploration with graph pattern discovery. Fall back to file-based commands if no graph is available.
115
+
116
+ ---
117
+
118
+ ### Phase 3: PROPOSE — Present Options with Trade-Offs
119
+
120
+ **Gate: This phase requires human choice at the end. Do not proceed to Phase 4 until the human has selected an option.**
121
+
122
+ Present 2-3 architectural options. Never present only one option — a single option is not a decision, it is a directive. Never present more than 3 — too many options cause decision paralysis.
123
+
124
+ #### For Each Option
125
+
126
+ ```markdown
127
+ ### Option [A/B/C]: <Name>
128
+
129
+ **Summary:** One paragraph describing the approach.
130
+
131
+ **How it works:**
132
+
133
+ 1. <Step 1>
134
+ 2. <Step 2>
135
+ 3. <Step 3>
136
+
137
+ **Pros:**
138
+
139
+ - <Advantage 1> — <why it matters given the constraints>
140
+ - <Advantage 2> — <why it matters given the constraints>
141
+
142
+ **Cons:**
143
+
144
+ - <Disadvantage 1> — <severity: low/medium/high> — <mitigation if any>
145
+ - <Disadvantage 2> — <severity: low/medium/high> — <mitigation if any>
146
+
147
+ **Effort:** <Small / Medium / Large> — <rough description of what is involved>
148
+
149
+ **Risk:** <Low / Medium / High> — <what could go wrong>
150
+
151
+ **Best when:** <the scenario where this option is clearly the right choice>
152
+ ```
153
+
154
+ #### Comparison Matrix
155
+
156
+ After presenting all options, provide a direct comparison:
157
+
158
+ ```markdown
159
+ | Criterion | Option A | Option B | Option C |
160
+ | ---------------- | -------- | -------- | -------- |
161
+ | Complexity | | | |
162
+ | Performance | | | |
163
+ | Maintainability | | | |
164
+ | Effort to build | | | |
165
+ | Effort to change | | | |
166
+ | Risk | | | |
167
+ | Fits constraints | | | |
168
+ ```
169
+
170
+ #### Recommendation
171
+
172
+ State which option you would lean toward and why, but frame it as a recommendation, not a decision:
173
+
174
+ ```
175
+ Based on the constraints (especially <key constraint>), I would lean toward Option <X> because <reason>.
176
+ However, if <condition>, Option <Y> would be stronger.
177
+ ```
178
+
179
+ Present the options to the human and wait for their choice.
180
+
181
+ ```
182
+ Store proposal in: .harness/architecture/<topic>/proposal.md
183
+ ```
184
+
185
+ ---
186
+
187
+ ### Phase 4: DOCUMENT — Write the Architecture Decision Record
188
+
189
+ After the human selects an option, write a formal ADR.
190
+
191
+ #### ADR Template
192
+
193
+ ```markdown
194
+ # ADR-<number>: <Title>
195
+
196
+ **Date:** <date>
197
+ **Status:** Accepted
198
+ **Deciders:** <who was involved>
199
+
200
+ ## Context
201
+
202
+ <What is the problem or need that prompted this decision? Include relevant
203
+ background, constraints, and the current state of the system. A reader who
204
+ was not part of the discussion should understand why this decision was needed.>
205
+
206
+ ## Decision
207
+
208
+ <What is the architectural decision? State it clearly and specifically.
209
+ Include enough detail that someone could implement it without further
210
+ discussion.>
211
+
212
+ ## Alternatives Considered
213
+
214
+ ### <Alternative 1 name>
215
+
216
+ <Brief description and why it was not chosen.>
217
+
218
+ ### <Alternative 2 name>
219
+
220
+ <Brief description and why it was not chosen.>
221
+
222
+ ## Consequences
223
+
224
+ ### Positive
225
+
226
+ - <Benefit 1>
227
+ - <Benefit 2>
228
+
229
+ ### Negative
230
+
231
+ - <Trade-off 1> — <mitigation plan>
232
+ - <Trade-off 2> — <mitigation plan>
233
+
234
+ ### Neutral
235
+
236
+ - <Side effect that is neither positive nor negative>
237
+
238
+ ## Action Items
239
+
240
+ - [ ] <Concrete next step 1> — owner: <who> — by: <when>
241
+ - [ ] <Concrete next step 2> — owner: <who> — by: <when>
242
+ - [ ] <Concrete next step 3> — owner: <who> — by: <when>
243
+ ```
244
+
245
+ Save the ADR:
246
+
247
+ ```
248
+ .harness/architecture/<topic>/ADR-<number>.md
249
+ ```
250
+
251
+ Also link from the project's ADR index if one exists.
252
+
253
+ ## Harness Integration
254
+
255
+ - Extends the human-architect model — the skill is a thinking partner, not a decision maker
256
+ - Respects architectural constraints defined in harness.config.json
257
+ - Outputs structured ADR that other skills can reference
258
+ - Reads prior ADRs from `.harness/architecture/` for consistency
259
+
260
+ ## Success Criteria
261
+
262
+ - [ ] All 5 discovery questions are asked (or explicitly deferred by human)
263
+ - [ ] At least 2 options are presented with concrete trade-offs
264
+ - [ ] Human makes an explicit choice before documentation proceeds
265
+ - [ ] ADR follows the template structure with all sections filled
266
+ - [ ] ADR references specific files or components (not abstract generalities)
267
+
268
+ ## Gates
269
+
270
+ - **Phase 1 to Phase 2: Requires human answers.** Do not proceed to codebase analysis until the human has answered the discovery questions. Without understanding constraints, analysis is directionless.
271
+ - **Phase 3 to Phase 4: Requires human choice.** Do not write the ADR until the human has selected an option. The ADR documents a decision, not a recommendation.
272
+ - **Always 2-3 options.** Never present 1 option (that is a directive, not advice). Never present more than 3 (that causes paralysis).
273
+ - **No implementation in this skill.** If you write production code, you have broken the advisory boundary. Stop and return to presenting options.
274
+ - **Trade-offs must be honest.** Every option has downsides. If you cannot articulate the cons of an option, you do not understand it well enough to recommend it.
275
+
276
+ ## Escalation
277
+
278
+ - **Human cannot choose between options:** Help narrow by asking which constraint matters most. If two options are genuinely equivalent, say so — flip a coin on equivalent options rather than agonizing.
279
+ - **Analysis reveals the problem is already solved:** If the codebase already has a pattern that handles this, say so. No need to architect what already exists.
280
+ - **Constraints are contradictory:** If hard constraints rule out all reasonable options, escalate this back to the human. Something in the constraints must give.
281
+ - **Decision has organization-wide impact:** If the decision affects teams or systems beyond the current codebase, flag this. The decision may need a broader audience.
282
+
283
+ ## Examples
284
+
285
+ ### Example 1: API Design for a New Resource
286
+
287
+ **Phase 1 — DISCOVER:**
288
+
289
+ ```
290
+ 1. Problem: We need to expose order history to mobile clients and third-party integrations.
291
+ 2. Hard constraints: Must work with existing PostgreSQL database. REST API already
292
+ serves other resources. Team of 3 backend engineers. Ship in 6 weeks.
293
+ 3. Soft preferences: Would like to use GraphQL eventually. Want pagination.
294
+ Want to keep response times under 200ms.
295
+ 4. Already considered: Adding REST endpoints like the other resources. Wondered
296
+ about GraphQL but unsure if it is worth the investment for one resource.
297
+ 5. Success in 6 months: Mobile app and 2 integrations consuming the API without
298
+ complaints about performance or missing data.
299
+ ```
300
+
301
+ **Phase 2 — ANALYZE:**
302
+
303
+ ```
304
+ Current patterns: REST with Express, controller-service-repository layers.
305
+ 15 existing resources follow this pattern.
306
+ Integration points: Order model joins with Users and Products.
307
+ Existing /users and /products endpoints.
308
+ Tech debt: No pagination on existing endpoints — they return all records.
309
+ This is fine for small datasets but orders could be large.
310
+ ```
311
+
312
+ **Phase 3 — PROPOSE:**
313
+
314
+ Option A: REST endpoints following existing patterns. Add pagination.
315
+
316
+ - Pros: Consistent with codebase, team knows how to build it, fast to ship.
317
+ - Cons: Mobile may over-fetch (gets all fields even when it needs few), no subscription support.
318
+ - Effort: Small (2-3 weeks).
319
+
320
+ Option B: GraphQL for orders only, REST for everything else.
321
+
322
+ - Pros: Mobile gets exactly the fields it needs, natural pagination with cursors, foundation for future migration.
323
+ - Cons: Two API paradigms to maintain, team learning curve, more infrastructure (Apollo/Yoga server).
324
+ - Effort: Medium (4-5 weeks).
325
+
326
+ Option C: REST with sparse fieldsets (JSON:API style `?fields=id,total,date`).
327
+
328
+ - Pros: Stays REST, solves over-fetching for mobile, no new infrastructure.
329
+ - Cons: Custom implementation of field filtering, not a standard the team has used before, still no subscriptions.
330
+ - Effort: Small-Medium (3-4 weeks).
331
+
332
+ Recommendation: Option A with pagination. It ships fastest, matches the existing codebase, and the team can migrate to GraphQL later as a separate initiative when there are more consumers with diverse needs.
333
+
334
+ **Phase 4 — DOCUMENT:**
335
+ ADR written after human selects Option A. Action items: implement pagination middleware (reusable for other endpoints), create /orders endpoints, update API documentation.
336
+
337
+ ### Example 2: Component Decomposition for a Dashboard
338
+
339
+ **Phase 1 — DISCOVER:**
340
+
341
+ ```
342
+ 1. Problem: The dashboard page component is 1200 lines and growing. It handles
343
+ data fetching, state management, filtering, sorting, and rendering for
344
+ 5 different widget types.
345
+ 2. Hard constraints: React with TypeScript. Must not break existing widget
346
+ behavior. Cannot change the API contract — backend team is on a different
347
+ release cycle.
348
+ 3. Soft preferences: Want widgets to be independently testable. Want to add
349
+ 2 new widget types next quarter without touching the main component.
350
+ 4. Already considered: Just splitting into smaller files. Worried that without
351
+ a clear boundary, it will re-tangle.
352
+ 5. Success in 6 months: Adding a new widget type requires creating one new
353
+ file and registering it, not modifying the dashboard component.
354
+ ```
355
+
356
+ **Phase 2 — ANALYZE:**
357
+
358
+ ```
359
+ Current patterns: Dashboard uses a single useEffect for all data fetching.
360
+ State is a large object with fields for each widget type. Rendering uses
361
+ a switch statement on widget type.
362
+ Integration points: 3 API endpoints supply data. Shared filter context
363
+ affects all widgets. URL query params drive initial state.
364
+ Tech debt: Two widget types share copy-pasted filtering logic. The sort
365
+ function has special cases for each widget type.
366
+ ```
367
+
368
+ **Phase 3 — PROPOSE:**
369
+
370
+ Option A: Widget plugin architecture with a registry.
371
+
372
+ - Each widget is a self-contained module (component + hook + types).
373
+ - A registry maps widget type strings to widget modules.
374
+ - Dashboard iterates the registry, renders each widget, passes shared context.
375
+ - Pros: Adding a widget means adding one module and one registry entry. Widgets are independently testable. Clear boundaries.
376
+ - Cons: Requires upfront refactoring of all 5 existing widgets. Shared filter logic needs a common abstraction.
377
+ - Effort: Medium (2-3 weeks to extract, then new widgets are fast).
378
+
379
+ Option B: Compound component pattern with slots.
380
+
381
+ - Dashboard defines layout slots. Each widget fills a slot.
382
+ - Shared state via React context. Each widget manages its own data fetching.
383
+ - Pros: Simpler than a registry. Familiar React patterns. Widgets own their data.
384
+ - Cons: Less structured than a registry — no formal contract. Could re-tangle if disciplines slip. Adding a widget still requires modifying the dashboard layout.
385
+ - Effort: Small-Medium (1-2 weeks).
386
+
387
+ Option C: Micro-frontend approach with module federation.
388
+
389
+ - Each widget is a separate build artifact loaded at runtime.
390
+ - Pros: Maximum independence. Widgets can use different libraries. Independent deployment.
391
+ - Cons: Massive overkill for 5-7 widgets in one app. Complex build setup. Runtime overhead. Team of 3 does not need this level of isolation.
392
+ - Effort: Large (4-6 weeks).
393
+
394
+ Recommendation: Option A. The plugin registry provides the clear boundary you need to prevent re-tangling, and the upfront cost pays off immediately when you add the 2 new widget types next quarter. Option C is overengineered for your scale.
395
+
396
+ **Phase 4 — DOCUMENT:**
397
+ ADR written after human selects Option A. Action items: define widget interface contract, extract existing widgets one at a time (one PR per widget), create registry with type-safe registration, add documentation for "how to add a new widget."
@@ -0,0 +1,48 @@
1
+ name: harness-architecture-advisor
2
+ version: "1.0.0"
3
+ description: Interactive architecture advisor that surfaces trade-offs and helps humans choose
4
+ cognitive_mode: advisory-guide
5
+ triggers:
6
+ - manual
7
+ - on_new_feature
8
+ platforms:
9
+ - claude-code
10
+ - gemini-cli
11
+ tools:
12
+ - Read
13
+ - Glob
14
+ - Grep
15
+ - Bash
16
+ cli:
17
+ command: harness skill run harness-architecture-advisor
18
+ args:
19
+ - name: path
20
+ description: Project root path
21
+ required: false
22
+ - name: topic
23
+ description: "Architecture topic (e.g., api-design, data-modeling, decomposition)"
24
+ required: false
25
+ mcp:
26
+ tool: run_skill
27
+ input:
28
+ skill: harness-architecture-advisor
29
+ path: string
30
+ type: flexible
31
+ phases:
32
+ - name: discover
33
+ description: Ask questions about the problem space and constraints
34
+ required: true
35
+ - name: analyze
36
+ description: Research the codebase and identify relevant patterns
37
+ required: true
38
+ - name: propose
39
+ description: Present 2-3 architectural options with trade-offs
40
+ required: true
41
+ - name: document
42
+ description: Write an Architecture Decision Record for the chosen option
43
+ required: true
44
+ state:
45
+ persistent: true
46
+ files:
47
+ - .harness/architecture/
48
+ depends_on: []
@@ -97,7 +97,14 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
97
97
 
98
98
  5. **Load context.** Read `.harness/learnings.md` and `.harness/failures.md` (global, at `.harness/` root) if they exist. Note any relevant learnings or known dead ends for the current phase.
99
99
 
100
- 6. **Transition to ASSESS.**
100
+ 6. **Load roadmap context.** If `docs/roadmap.md` exists, read it to understand:
101
+ - Current project priorities (which features are `in-progress`)
102
+ - Blockers that may affect the upcoming phases
103
+ - Overall project status and milestone progress
104
+
105
+ This provides the autopilot with project-level context beyond the individual spec being executed. If the roadmap does not exist, skip this step — the autopilot operates normally without it.
106
+
107
+ 7. **Transition to ASSESS.**
101
108
 
102
109
  ---
103
110
 
@@ -374,6 +381,7 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
374
381
  - **State file** — `.harness/sessions/<slug>/autopilot-state.json` tracks the orchestration state machine. `.harness/sessions/<slug>/state.json` tracks task-level execution state (managed by harness-execution). The slug is derived from the spec path during INIT.
375
382
  - **Handoff** — `.harness/sessions/<slug>/handoff.json` is written by each delegated skill and read by the next. Autopilot writes a final handoff on DONE.
376
383
  - **Learnings** — `.harness/learnings.md` (global) is appended by both delegated skills and autopilot itself.
384
+ - **Roadmap context** — During INIT, reads `docs/roadmap.md` (if present) for project-level priorities, blockers, and milestone status. Provides broader context for phase execution decisions.
377
385
 
378
386
  ## Success Criteria
379
387
 
@@ -390,7 +398,7 @@ INIT → ASSESS → PLAN → APPROVE_PLAN → EXECUTE → VERIFY → REVIEW →
390
398
 
391
399
  ### Example: 3-Phase Security Scanner
392
400
 
393
- **User invokes:** `/harness:autopilot docs/specs/2026-03-19-security-scanner.md`
401
+ **User invokes:** `/harness:autopilot docs/changes/security-scanner/proposal.md`
394
402
 
395
403
  **INIT:**
396
404
 
@@ -399,7 +407,7 @@ Read spec — found 3 phases:
399
407
  Phase 1: Core Scanner (complexity: low)
400
408
  Phase 2: Rule Engine (complexity: high)
401
409
  Phase 3: CLI Integration (complexity: low)
402
- Created .harness/sessions/specs--2026-03-19-security-scanner/autopilot-state.json. Starting Phase 1.
410
+ Created .harness/sessions/changes--security-scanner--proposal/autopilot-state.json. Starting Phase 1.
403
411
  ```
404
412
 
405
413
  **Phase 1 — ASSESS:**