@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,48 @@
1
+ name: harness-soundness-review
2
+ version: "1.0.0"
3
+ description: Deep soundness analysis of specs and plans with auto-fix and convergence loop
4
+ cognitive_mode: meticulous-verifier
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-soundness-review
19
+ args:
20
+ - name: path
21
+ description: Project root path
22
+ required: false
23
+ - name: mode
24
+ description: Review mode — "spec" for spec soundness or "plan" for plan soundness
25
+ required: true
26
+ mcp:
27
+ tool: run_skill
28
+ input:
29
+ skill: harness-soundness-review
30
+ path: string
31
+ type: rigid
32
+ phases:
33
+ - name: check
34
+ description: Run all checks for the current mode and classify findings
35
+ required: true
36
+ - name: fix
37
+ description: Auto-fix inferrable issues and log changes
38
+ required: true
39
+ - name: converge
40
+ description: Re-run checks, compare issue counts, loop or stop
41
+ required: true
42
+ - name: surface
43
+ description: Present remaining issues to user for resolution
44
+ required: true
45
+ state:
46
+ persistent: false
47
+ files: []
48
+ depends_on: []
@@ -13,8 +13,23 @@
13
13
 
14
14
  ## Prerequisites
15
15
 
16
- A knowledge graph must exist at `.harness/graph/`. Run `harness scan` if no graph is available.
17
- If the graph exists but code has changed since the last scan, re-run `harness scan` first — stale graph data leads to inaccurate results.
16
+ A knowledge graph at `.harness/graph/` enables full analysis. If no graph exists,
17
+ the skill uses static analysis fallbacks (see Graph Availability section).
18
+ Run `harness scan` to enable graph-enhanced analysis.
19
+
20
+ ### Graph Availability
21
+
22
+ Before starting, check if `.harness/graph/graph.json` exists.
23
+
24
+ **If graph exists:** Check staleness — compare `.harness/graph/metadata.json`
25
+ scanTimestamp against `git log -1 --format=%ct` (latest commit timestamp).
26
+ If graph is more than 10 commits behind (`git log --oneline <scanTimestamp>..HEAD | wc -l`),
27
+ run `harness scan` to refresh before proceeding. (Staleness sensitivity: **Medium**)
28
+
29
+ **If graph exists and is fresh (or refreshed):** Use graph tools as primary strategy.
30
+
31
+ **If no graph exists:** Output "Running without graph (run `harness scan` to
32
+ enable full analysis)" and use fallback strategies for all subsequent steps.
18
33
 
19
34
  ## Process
20
35
 
@@ -43,6 +58,20 @@ For each changed file, use graph traversal to find test files:
43
58
 
44
59
  3. **Co-change tests**: Check `co_changes_with` edges for test files that historically change alongside the modified files.
45
60
 
61
+ #### Fallback (without graph)
62
+
63
+ When no graph is available, use naming conventions, import parsing, and git history:
64
+
65
+ 1. **Tier 1 — Filename convention matching**: For each changed file `foo.ts`, search for:
66
+ - `foo.test.ts`, `foo.spec.ts` (same directory)
67
+ - `__tests__/foo.ts`, `__tests__/foo.test.ts`
68
+ - Test files in a parallel `tests/` directory mirroring the source path
69
+ 2. **Tier 2 — Import-linked tests**: Parse test files' import statements (grep for `import.*from` in `*.test.*` and `*.spec.*` files). If a test file imports the changed file, it belongs in Tier 2 (if not already in Tier 1).
70
+ 3. **Tier 3 — Co-change correlated tests**: Use `git log --format="%H" --name-only` to find test files that frequently change in the same commit as the target file. Files that co-change in >2 commits are co-change correlated.
71
+ 4. **Rank**: Tier 1 = direct filename match, Tier 2 = import-linked tests, Tier 3 = co-change correlated tests. Output the same tiered format as the graph version.
72
+
73
+ > Fallback completeness: ~80% — naming conventions and imports catch most mappings; misses dynamic imports and indirect coverage.
74
+
46
75
  ### Phase 3: PRIORITIZE — Rank and Generate Commands
47
76
 
48
77
  Organize tests into three tiers:
@@ -85,7 +114,7 @@ npx vitest run tests/services/auth.test.ts tests/types/user.test.ts tests/routes
85
114
 
86
115
  ## Harness Integration
87
116
 
88
- - **`harness scan`** — Must run before this skill to ensure graph is current.
117
+ - **`harness scan`** — Recommended before this skill for full graph-enhanced analysis. If graph is missing, skill uses naming convention and import parsing fallbacks.
89
118
  - **`harness validate`** — Run after acting on findings to verify project health.
90
119
  - **Graph tools** — This skill uses `query_graph`, `get_impact`, and `get_relationships` MCP tools.
91
120
 
@@ -95,7 +124,7 @@ npx vitest run tests/services/auth.test.ts tests/types/user.test.ts tests/routes
95
124
  - Executable run commands generated for quick and full test runs
96
125
  - Coverage gaps flagged for changed files with no test coverage
97
126
  - Report follows the structured output format
98
- - All findings are backed by graph query evidence, not heuristics
127
+ - All findings are backed by graph query evidence (with graph) or systematic static analysis (without graph)
99
128
 
100
129
  ## Examples
101
130
 
@@ -122,8 +151,8 @@ Output:
122
151
 
123
152
  ## Gates
124
153
 
125
- - **No advice without graph.** If no graph exists, fall back to: "Run all tests in the same directory as changed files."
126
- - **Always include Tier 1.** Direct test coverage is non-negotiable — always recommend running these.
154
+ - **Graph preferred, fallback available.** If no graph exists, use naming conventions, import parsing, and git co-change analysis to identify relevant tests. Do not stop — produce the best test selection possible.
155
+ - **Always include Tier 1.** Direct test coverage is non-negotiable — always recommend running these (whether found via graph or naming conventions).
127
156
 
128
157
  ## Escalation
129
158
 
@@ -160,6 +160,70 @@ After running all three levels, produce a structured gap report:
160
160
  ### Verdict: INCOMPLETE — 2 gaps must be resolved
161
161
  ```
162
162
 
163
+ The verification report uses conventional markdown patterns for structured output:
164
+
165
+ ```
166
+ **[CRITICAL]** path/to/file.ts:22 — TODO: implement validation (anti-pattern)
167
+ **[IMPORTANT]** path/to/file.ts — exported but not imported by any other file
168
+ ```
169
+
170
+ ### Verification Sign-Off
171
+
172
+ After producing the verification report, request acceptance:
173
+
174
+ ```json
175
+ emit_interaction({
176
+ path: "<project-root>",
177
+ type: "confirmation",
178
+ confirmation: {
179
+ text: "Verification report: <VERDICT>. Accept and proceed?",
180
+ context: "<summary: N artifacts checked, N gaps found>"
181
+ }
182
+ })
183
+ ```
184
+
185
+ ### Handoff and Transition
186
+
187
+ After producing the verification report, write the handoff and conditionally transition:
188
+
189
+ Write `.harness/handoff.json`:
190
+
191
+ ```json
192
+ {
193
+ "fromSkill": "harness-verification",
194
+ "phase": "COMPLETE",
195
+ "summary": "<verdict summary>",
196
+ "artifacts": ["<verified file paths>"],
197
+ "verdict": "pass | fail",
198
+ "gaps": ["<gap descriptions if any>"]
199
+ }
200
+ ```
201
+
202
+ **If verdict is PASS (all levels passed, no gaps):**
203
+
204
+ Call `emit_interaction`:
205
+
206
+ ```json
207
+ {
208
+ "type": "transition",
209
+ "transition": {
210
+ "completedPhase": "verification",
211
+ "suggestedNext": "review",
212
+ "reason": "Verification passed at all 3 levels",
213
+ "artifacts": ["<verified file paths>"],
214
+ "requiresConfirmation": false,
215
+ "summary": "Verification passed: <N> artifacts checked. EXISTS, SUBSTANTIVE, WIRED all passed."
216
+ }
217
+ }
218
+ ```
219
+
220
+ The response will include `nextAction: "Invoke harness-code-review skill now"`.
221
+ Immediately invoke harness-code-review without waiting for user input.
222
+
223
+ **If verdict is FAIL or INCOMPLETE:**
224
+
225
+ Do NOT emit a transition. Surface gaps to the user for resolution. The handoff is written with the gaps recorded for future reference.
226
+
163
227
  ---
164
228
 
165
229
  ### Regression Test Verification
@@ -184,6 +248,8 @@ If step 4 passes (test does not fail without the fix), the test is not a valid r
184
248
 
185
249
  All commands must be run fresh in the current session. Do not rely on results from a previous session or a previous run in the same session if code has changed since.
186
250
 
251
+ - **`emit_interaction`** -- Call after verification passes to auto-transition to harness-code-review. Only emitted on PASS verdict. Uses auto-transition (proceeds immediately).
252
+
187
253
  ## Success Criteria
188
254
 
189
255
  - Every claimed deliverable has been verified at all 3 levels
@@ -13,6 +13,7 @@ tools:
13
13
  - Bash
14
14
  - Read
15
15
  - Glob
16
+ - emit_interaction
16
17
  cli:
17
18
  command: harness skill run harness-verification
18
19
  args:
@@ -89,6 +89,16 @@ Rules:
89
89
  - If all checks are SKIPPED, overall result is `PASS` (nothing to fail).
90
90
  - On FAIL, include a brief summary of what failed (e.g., "3 type errors", "2 lint errors", "5 tests failed") below the structured block.
91
91
 
92
+ ### Roadmap Sync (conditional)
93
+
94
+ When all non-skipped checks pass (overall `Verification: PASS`) and `docs/roadmap.md` exists:
95
+
96
+ 1. Trigger a roadmap sync to update feature statuses based on the verified state.
97
+ 2. Use the `manage_roadmap` MCP tool with `sync` action if available, or note to the caller that a roadmap sync is recommended.
98
+ 3. Features linked to plans whose tasks are all complete and verified may be marked as `done`.
99
+
100
+ If `docs/roadmap.md` does not exist, skip this step silently. If verification failed, do not sync — the roadmap should only reflect verified completions.
101
+
92
102
  ## Deterministic Checks
93
103
 
94
104
  This skill is entirely deterministic. There are no LLM judgment calls anywhere in the process.
@@ -106,6 +116,7 @@ This skill is entirely deterministic. There are no LLM judgment calls anywhere i
106
116
  - Output format is consumed by harness-integrity for the unified pipeline
107
117
  - Invokes `harness-accessibility` for design constraint checking when `design` config exists
108
118
  - Design violations respect `design.strictness` from `harness.config.json`
119
+ - **Roadmap sync** — When verification passes and `docs/roadmap.md` exists, triggers `manage_roadmap sync` to mark verified features as `done`. Only fires on overall PASS.
109
120
 
110
121
  ## Success Criteria
111
122
 
@@ -59,6 +59,11 @@
59
59
 
60
60
  4. **For advanced:** Configure state management (`.harness/state.json` schema), learnings capture (`.harness/learnings.md` conventions), and CI integration hooks.
61
61
 
62
+ 5. **Configure i18n (all levels).** Ask: "Will this project support multiple languages?" Based on the answer:
63
+ - **Yes:** Invoke `harness-i18n-workflow` configure phase to set up i18n config in `harness.config.json` (source locale, target locales, framework, strictness). Then invoke `harness-i18n-workflow` scaffold phase to create translation file structure and extraction config. Set `i18n.enabled: true`.
64
+ - **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.
65
+ - **Not sure yet:** Skip i18n configuration entirely. Do not set `i18n.enabled`. The project can enable i18n later by running `harness-i18n-workflow` directly.
66
+
62
67
  ### Phase 4: VALIDATE — Confirm Everything Works
63
68
 
64
69
  1. **Run `harness validate`** to verify the full configuration. This checks:
@@ -82,7 +87,9 @@ harness scan [path]
82
87
 
83
88
  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.
84
89
 
85
- 4. **Commit the initialization.** All generated and configured files in a single commit.
90
+ 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.
91
+
92
+ 5. **Commit the initialization.** All generated and configured files in a single commit.
86
93
 
87
94
  ## Harness Integration
88
95
 
@@ -91,6 +98,8 @@ This creates the `.harness/graph/` directory and populates it with the project's
91
98
  - **`harness persona generate`** — Generate persona definitions based on project stack and team structure.
92
99
  - **`harness validate`** — Verify the full project configuration is valid and complete.
93
100
  - **`harness check-deps`** — Verify dependency constraints match the actual codebase (intermediate and above).
101
+ - **`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.
102
+ - **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.
94
103
 
95
104
  ## Success Criteria
96
105
 
@@ -102,6 +111,7 @@ This creates the `.harness/graph/` directory and populates it with the project's
102
111
  - Personas are configured if the project uses them
103
112
  - The adoption level matches what was agreed upon with the human
104
113
  - All generated files are committed in a single atomic commit
114
+ - i18n configuration is set if the human chose to enable it during init
105
115
 
106
116
  ## Examples
107
117
 
@@ -131,6 +141,10 @@ Edit AGENTS.md:
131
141
  - Add stack: TypeScript, Express, Vitest, PostgreSQL
132
142
  - Add conventions: "Use zod for validation, repository pattern for data access"
133
143
  - Add constraints: "No direct SQL queries outside repository layer"
144
+ - Ask: "Will this project support multiple languages?"
145
+ - Human: "Yes, Spanish and French."
146
+ - Run harness-i18n-workflow configure (source: en, targets: es, fr)
147
+ - Run harness-i18n-workflow scaffold (creates locales/ directory structure)
134
148
  ```
135
149
 
136
150
  **VALIDATE:**
@@ -32,6 +32,18 @@ When a knowledge graph exists at `.harness/graph/`, use graph queries for faster
32
32
 
33
33
  When a graph is available, it IS the source of truth for documentation coverage. Drift = stale or missing edges between code and doc nodes. Fall back to file-based commands if no graph is available.
34
34
 
35
+ ### Pipeline Context (when orchestrated)
36
+
37
+ When invoked by `harness-docs-pipeline`, check for a `pipeline` field in `.harness/handoff.json`:
38
+
39
+ - If `pipeline` field exists: read `DocPipelineContext` from it
40
+ - Use `pipeline.exclusions` to skip findings that were already addressed in the FIX phase
41
+ - Write `GapFinding[]` results back to `pipeline.gapFindings` in handoff.json
42
+ - This enables dedup across FIX and AUDIT phases
43
+ - If `pipeline` field does not exist: behave exactly as today (standalone mode)
44
+
45
+ No changes to the skill's interface or output format — the pipeline field is purely additive.
46
+
35
47
  ### Phase 2: Detect Gaps
36
48
 
37
49
  Categorize findings into four types:
@@ -0,0 +1,192 @@
1
+ # Add Harness Component
2
+
3
+ > Add layers, documentation, components, or skills to an existing harness project with proper integration. Validate against existing constraints, wire into architecture, and verify the result.
4
+
5
+ ## When to Use
6
+
7
+ - Adding a new layer to the project's architecture
8
+ - Adding a new documentation file that harness should track
9
+ - Adding a new component (module, service, package) that must be wired into existing layer boundaries
10
+ - Adding a new skill to the project's skill library
11
+ - When a plan calls for introducing a new architectural boundary or module
12
+ - NOT when initializing a project from scratch (use initialize-harness-project)
13
+ - NOT when modifying an existing component (use standard editing workflows)
14
+ - NOT when removing components (manual process — removing requires careful dependency analysis)
15
+
16
+ ## Process
17
+
18
+ ### Phase 1: DETERMINE — Identify What to Add
19
+
20
+ 1. **Clarify the component type.** Ask if not obvious from context:
21
+ - **Layer:** A new architectural boundary (e.g., adding an "infrastructure" layer to a project that only has "business" and "data")
22
+ - **Document:** A documentation file that harness should track for drift detection (e.g., API docs, architecture decision records)
23
+ - **Component:** A code module, service, or package that lives within an existing layer
24
+ - **Skill:** A new harness skill definition for the project's workflow
25
+
26
+ 2. **Gather requirements.** For each type:
27
+ - **Layer:** Name, which directories belong to it, which layers it can import from, which layers can import from it
28
+ - **Document:** Path, what it documents, which code files it relates to
29
+ - **Component:** Name, which layer it belongs to, what it depends on, what will depend on it
30
+ - **Skill:** Name, purpose, type (rigid or flexible), triggers
31
+
32
+ 3. **Check prerequisites.** The project must already be initialized with harness. If `harness.yaml` does not exist, stop and run initialize-harness-project first.
33
+
34
+ ### Phase 2: VALIDATE — Check Against Existing Constraints
35
+
36
+ 1. **Read the current configuration.** Load `harness.yaml` and `AGENTS.md` to understand existing layers, constraints, and architecture.
37
+
38
+ 2. **Verify the new component does not conflict:**
39
+ - Does the layer name already exist?
40
+ - Does the component directory already exist?
41
+ - Would the new dependency relationships create circular imports?
42
+ - Does the component violate any existing forbidden-import rules?
43
+
44
+ 3. **If conflicts are found,** report them clearly: "Adding layer X would conflict with existing layer Y because [reason]. Options: [A] rename, [B] merge into existing layer, [C] restructure. Which do you prefer?"
45
+
46
+ 4. **Run `harness check-deps`** on the current state to establish a clean baseline. If it already fails, fix existing violations before adding new components.
47
+
48
+ ### Phase 3: ADD — Create the Component
49
+
50
+ 1. **Run `harness add` with appropriate arguments:**
51
+ - Layer: `harness add layer <name> --dirs <dir1,dir2> --imports <allowed-layers>`
52
+ - Document: `harness add doc <path> --tracks <related-code-paths>`
53
+ - Component: `harness add component <name> --layer <layer-name>`
54
+ - Skill: `harness add skill <name> --type <rigid|flexible>`
55
+
56
+ 2. **Review generated files and configuration changes.** `harness add` modifies `harness.yaml` and may generate template files. Check that the changes look correct.
57
+
58
+ 3. **Create the actual code or content.** `harness add` creates the configuration entry but not necessarily the implementation. Create the directories, files, and initial code as needed.
59
+
60
+ ### Phase 4: WIRE — Integrate into Architecture
61
+
62
+ 1. **Update imports and exports.** If the new component needs to be imported by existing code, add the imports. If existing code needs to be aware of the new layer, update barrel files or index modules.
63
+
64
+ 2. **Update `AGENTS.md`.** Add the new component to the architecture section. Document its purpose, boundaries, and relationships to other components. This keeps agent instructions accurate.
65
+
66
+ 3. **Update layer configuration** if the new component changes dependency relationships. Ensure `harness.yaml` reflects the actual import graph.
67
+
68
+ 4. **For new skills:** Write the `skill.yaml` and `SKILL.md` files following the harness skill format. Use harness-skill-authoring for guidance on writing good skill content.
69
+
70
+ ### Phase 5: VERIFY — Confirm Integration
71
+
72
+ 1. **Run `harness validate`** to verify the full project configuration is still valid after the addition.
73
+
74
+ 2. **Run `harness check-deps`** to verify no dependency violations were introduced. The new component's imports must respect layer boundaries.
75
+
76
+ ### Graph Refresh
77
+
78
+ If a knowledge graph exists at `.harness/graph/`, refresh it after code changes to keep graph queries accurate:
79
+
80
+ ```
81
+ harness scan [path]
82
+ ```
83
+
84
+ Skipping this step means subsequent graph queries (impact analysis, dependency health, test advisor) may return stale results.
85
+
86
+ 3. **If validation fails,** fix the issues before committing. Common causes:
87
+ - New layer not properly registered in `harness.yaml`
88
+ - Component placed in wrong directory for its declared layer
89
+ - Imports from forbidden layers
90
+ - `AGENTS.md` references outdated architecture
91
+
92
+ 4. **Commit the addition.** All new and modified files in a single atomic commit.
93
+
94
+ ## Harness Integration
95
+
96
+ - **`harness add layer <name>`** — Register a new architectural layer with directory mappings and import rules.
97
+ - **`harness add doc <path>`** — Register a documentation file for drift tracking.
98
+ - **`harness add component <name> --layer <layer>`** — Register a new code component within an existing layer.
99
+ - **`harness add skill <name> --type <type>`** — Scaffold a new skill definition.
100
+ - **`harness validate`** — Verify project configuration after the addition.
101
+ - **`harness check-deps`** — Verify dependency constraints are respected after the addition.
102
+
103
+ ## Success Criteria
104
+
105
+ - The new component is properly registered in `harness.yaml`
106
+ - The component's files exist in the correct directories for its declared layer
107
+ - `AGENTS.md` is updated to reflect the new component
108
+ - `harness validate` passes after the addition
109
+ - `harness check-deps` passes after the addition (no new violations)
110
+ - No circular dependencies were introduced
111
+ - The addition is committed as a single atomic commit
112
+
113
+ ## Examples
114
+
115
+ ### Example: Adding a New Layer
116
+
117
+ ```
118
+ Human: "We need an infrastructure layer for external API clients."
119
+
120
+ DETERMINE: Adding a layer. Name: infrastructure. Dirs: src/infrastructure/.
121
+ Imports from: (none — infrastructure is a leaf layer, no internal dependencies).
122
+ Imported by: business layer (services call external APIs through infrastructure).
123
+
124
+ VALIDATE:
125
+ Read harness.yaml — existing layers: presentation, business, data.
126
+ No conflict with "infrastructure" name.
127
+ Run: harness check-deps — passes (clean baseline).
128
+
129
+ ADD:
130
+ harness add layer infrastructure --dirs src/infrastructure --imports none
131
+ mkdir -p src/infrastructure
132
+
133
+ WIRE:
134
+ Update harness.yaml: allow business → infrastructure imports.
135
+ Update AGENTS.md: document infrastructure layer purpose and boundaries.
136
+
137
+ VERIFY:
138
+ harness validate # Pass
139
+ harness check-deps # Pass
140
+ git add harness.yaml AGENTS.md src/infrastructure/
141
+ git commit -m "feat: add infrastructure layer for external API clients"
142
+ ```
143
+
144
+ ### Example: Adding a Document for Drift Tracking
145
+
146
+ ```
147
+ Human: "Track our API specification for documentation drift."
148
+
149
+ DETERMINE: Adding a document. Path: docs/api-spec.md.
150
+ Tracks: src/routes/, src/models/response.ts.
151
+
152
+ ADD:
153
+ harness add doc docs/api-spec.md --tracks src/routes,src/models/response.ts
154
+
155
+ WIRE:
156
+ Update AGENTS.md: note that docs/api-spec.md is tracked for drift.
157
+
158
+ VERIFY:
159
+ harness validate # Pass
160
+ git add harness.yaml AGENTS.md
161
+ git commit -m "feat: track API spec for documentation drift detection"
162
+ ```
163
+
164
+ ### Example: Adding a Component to an Existing Layer
165
+
166
+ ```
167
+ Human: "Add a notification service to the business layer."
168
+
169
+ DETERMINE: Adding a component. Name: notification-service. Layer: business.
170
+ Depends on: data layer (notification repository). Depended on by: presentation layer (routes).
171
+
172
+ VALIDATE:
173
+ Read harness.yaml — business layer exists, maps to src/services/.
174
+ No existing notification-service directory.
175
+ business → data is an allowed import. Presentation → business is allowed.
176
+ Run: harness check-deps — passes.
177
+
178
+ ADD:
179
+ harness add component notification-service --layer business
180
+ Create src/services/notification-service.ts
181
+ Create src/services/notification-service.test.ts
182
+
183
+ WIRE:
184
+ Add export to src/services/index.ts (if barrel file exists).
185
+ Update AGENTS.md: add notification service to business layer component list.
186
+
187
+ VERIFY:
188
+ harness validate # Pass
189
+ harness check-deps # Pass
190
+ git add harness.yaml AGENTS.md src/services/notification-service.*
191
+ git commit -m "feat: add notification service to business layer"
192
+ ```
@@ -0,0 +1,32 @@
1
+ name: add-harness-component
2
+ version: "1.0.0"
3
+ description: Add a component to an existing harness project
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
+ cli:
17
+ command: harness skill run add-harness-component
18
+ args:
19
+ - name: path
20
+ description: Project root path
21
+ required: false
22
+ mcp:
23
+ tool: run_skill
24
+ input:
25
+ skill: add-harness-component
26
+ path: string
27
+ type: flexible
28
+ state:
29
+ persistent: false
30
+ files: []
31
+ depends_on:
32
+ - initialize-harness-project