@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.
- package/dist/agents/personas/documentation-maintainer.yaml +3 -1
- package/dist/agents/personas/performance-guardian.yaml +23 -0
- package/dist/agents/skills/claude-code/align-documentation/SKILL.md +13 -0
- package/dist/agents/skills/claude-code/cleanup-dead-code/SKILL.md +25 -1
- package/dist/agents/skills/claude-code/cleanup-dead-code/skill.yaml +5 -2
- package/dist/agents/skills/claude-code/detect-doc-drift/SKILL.md +12 -0
- package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +48 -1
- package/dist/agents/skills/claude-code/enforce-architecture/skill.yaml +5 -2
- package/dist/agents/skills/claude-code/harness-accessibility/SKILL.md +7 -0
- package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +11 -3
- package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +81 -11
- package/dist/agents/skills/claude-code/harness-brainstorming/skill.yaml +2 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +487 -234
- package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +15 -2
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/SKILL.md +226 -0
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/skill.yaml +64 -0
- package/dist/agents/skills/claude-code/harness-dependency-health/SKILL.md +35 -6
- package/dist/agents/skills/claude-code/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/claude-code/harness-docs-pipeline/skill.yaml +69 -0
- package/dist/agents/skills/claude-code/harness-execution/SKILL.md +73 -8
- package/dist/agents/skills/claude-code/harness-execution/skill.yaml +1 -0
- package/dist/agents/skills/claude-code/harness-hotspot-detector/SKILL.md +32 -6
- package/dist/agents/skills/claude-code/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/claude-code/harness-i18n/skill.yaml +54 -0
- package/dist/agents/skills/claude-code/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/claude-code/harness-i18n-process/skill.yaml +43 -0
- package/dist/agents/skills/claude-code/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/claude-code/harness-i18n-workflow/skill.yaml +53 -0
- package/dist/agents/skills/claude-code/harness-impact-analysis/SKILL.md +35 -6
- package/dist/agents/skills/claude-code/harness-integrity/SKILL.md +17 -1
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/SKILL.md +46 -5
- package/dist/agents/skills/claude-code/harness-perf/SKILL.md +37 -8
- package/dist/agents/skills/claude-code/harness-perf/skill.yaml +3 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/SKILL.md +17 -4
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +59 -5
- package/dist/agents/skills/claude-code/harness-planning/skill.yaml +2 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +16 -0
- package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +561 -0
- package/dist/agents/skills/claude-code/harness-roadmap/skill.yaml +43 -0
- package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +36 -2
- package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +8 -6
- package/dist/agents/skills/claude-code/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/claude-code/harness-soundness-review/skill.yaml +48 -0
- package/dist/agents/skills/claude-code/harness-test-advisor/SKILL.md +35 -6
- package/dist/agents/skills/claude-code/harness-verification/SKILL.md +66 -0
- package/dist/agents/skills/claude-code/harness-verification/skill.yaml +1 -0
- package/dist/agents/skills/claude-code/harness-verify/SKILL.md +11 -0
- package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +15 -1
- package/dist/agents/skills/claude-code/validate-context-engineering/SKILL.md +12 -0
- package/dist/agents/skills/gemini-cli/add-harness-component/SKILL.md +192 -0
- package/dist/agents/skills/gemini-cli/add-harness-component/skill.yaml +32 -0
- package/dist/agents/skills/gemini-cli/align-documentation/SKILL.md +213 -0
- package/dist/agents/skills/gemini-cli/align-documentation/skill.yaml +31 -0
- package/dist/agents/skills/gemini-cli/check-mechanical-constraints/SKILL.md +191 -0
- package/dist/agents/skills/gemini-cli/check-mechanical-constraints/skill.yaml +32 -0
- package/dist/agents/skills/gemini-cli/cleanup-dead-code/SKILL.md +245 -0
- package/dist/agents/skills/gemini-cli/cleanup-dead-code/skill.yaml +33 -0
- package/dist/agents/skills/gemini-cli/detect-doc-drift/SKILL.md +179 -0
- package/dist/agents/skills/gemini-cli/detect-doc-drift/skill.yaml +30 -0
- package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +240 -0
- package/dist/agents/skills/gemini-cli/enforce-architecture/skill.yaml +34 -0
- package/dist/agents/skills/gemini-cli/harness-accessibility/SKILL.md +7 -0
- package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +397 -0
- package/dist/agents/skills/gemini-cli/harness-architecture-advisor/skill.yaml +48 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +11 -3
- package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +317 -0
- package/dist/agents/skills/gemini-cli/harness-brainstorming/skill.yaml +49 -0
- package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +681 -0
- package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +45 -0
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/SKILL.md +226 -0
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/skill.yaml +64 -0
- package/dist/agents/skills/gemini-cli/harness-debugging/SKILL.md +366 -0
- package/dist/agents/skills/gemini-cli/harness-debugging/skill.yaml +47 -0
- package/dist/agents/skills/gemini-cli/harness-dependency-health/SKILL.md +35 -6
- package/dist/agents/skills/gemini-cli/harness-diagnostics/SKILL.md +318 -0
- package/dist/agents/skills/gemini-cli/harness-diagnostics/skill.yaml +50 -0
- package/dist/agents/skills/gemini-cli/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/gemini-cli/harness-docs-pipeline/skill.yaml +69 -0
- package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +382 -0
- package/dist/agents/skills/gemini-cli/harness-execution/skill.yaml +51 -0
- package/dist/agents/skills/gemini-cli/harness-git-workflow/SKILL.md +268 -0
- package/dist/agents/skills/gemini-cli/harness-git-workflow/skill.yaml +31 -0
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/SKILL.md +32 -6
- package/dist/agents/skills/gemini-cli/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/gemini-cli/harness-i18n/skill.yaml +54 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-process/skill.yaml +43 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-workflow/skill.yaml +53 -0
- package/dist/agents/skills/gemini-cli/harness-impact-analysis/SKILL.md +35 -6
- package/dist/agents/skills/gemini-cli/harness-integrity/SKILL.md +167 -0
- package/dist/agents/skills/gemini-cli/harness-integrity/skill.yaml +47 -0
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/SKILL.md +46 -5
- package/dist/agents/skills/gemini-cli/harness-onboarding/SKILL.md +288 -0
- package/dist/agents/skills/gemini-cli/harness-onboarding/skill.yaml +30 -0
- package/dist/agents/skills/gemini-cli/harness-parallel-agents/SKILL.md +171 -0
- package/dist/agents/skills/gemini-cli/harness-parallel-agents/skill.yaml +33 -0
- package/dist/agents/skills/gemini-cli/harness-perf/SKILL.md +37 -8
- package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +3 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/SKILL.md +17 -4
- package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +389 -0
- package/dist/agents/skills/gemini-cli/harness-planning/skill.yaml +49 -0
- package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +262 -0
- package/dist/agents/skills/gemini-cli/harness-pre-commit-review/skill.yaml +33 -0
- package/dist/agents/skills/gemini-cli/harness-refactoring/SKILL.md +169 -0
- package/dist/agents/skills/gemini-cli/harness-refactoring/skill.yaml +33 -0
- package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +16 -0
- package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +561 -0
- package/dist/agents/skills/gemini-cli/harness-roadmap/skill.yaml +43 -0
- package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +8 -6
- package/dist/agents/skills/gemini-cli/harness-skill-authoring/SKILL.md +292 -0
- package/dist/agents/skills/gemini-cli/harness-skill-authoring/skill.yaml +32 -0
- package/dist/agents/skills/gemini-cli/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/gemini-cli/harness-soundness-review/skill.yaml +48 -0
- package/dist/agents/skills/gemini-cli/harness-state-management/SKILL.md +309 -0
- package/dist/agents/skills/gemini-cli/harness-state-management/skill.yaml +32 -0
- package/dist/agents/skills/gemini-cli/harness-tdd/SKILL.md +177 -0
- package/dist/agents/skills/gemini-cli/harness-tdd/skill.yaml +48 -0
- package/dist/agents/skills/gemini-cli/harness-test-advisor/SKILL.md +35 -6
- package/dist/agents/skills/gemini-cli/harness-verification/SKILL.md +328 -0
- package/dist/agents/skills/gemini-cli/harness-verification/skill.yaml +42 -0
- package/dist/agents/skills/gemini-cli/harness-verify/SKILL.md +159 -0
- package/dist/agents/skills/gemini-cli/harness-verify/skill.yaml +40 -0
- package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +224 -0
- package/dist/agents/skills/gemini-cli/initialize-harness-project/skill.yaml +31 -0
- package/dist/agents/skills/gemini-cli/validate-context-engineering/SKILL.md +150 -0
- package/dist/agents/skills/gemini-cli/validate-context-engineering/skill.yaml +31 -0
- package/dist/agents/skills/shared/i18n-knowledge/accessibility/intersection.yaml +142 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/encoding.yaml +67 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/formatting.yaml +106 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/layout.yaml +80 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/pluralization.yaml +80 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/string-handling.yaml +106 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/android-resources.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/apple-strings.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/backend-patterns.yaml +50 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/flutter-intl.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/i18next.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/react-intl.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/vue-i18n.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/ecommerce.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/fintech.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/gaming.yaml +69 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/healthcare.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/legal.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ar.yaml +41 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/de.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/en.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/es.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/fi.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/fr.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/he.yaml +41 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/hi.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/it.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ja.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ko.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/nl.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/pl.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/pt.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ru.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/sv.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/th.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/tr.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hans.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hant.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/i18next-mcp.yaml +56 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lingo-dev.yaml +56 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lokalise.yaml +60 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/tolgee.yaml +60 -0
- package/dist/agents/skills/shared/i18n-knowledge/testing/locale-testing.yaml +107 -0
- package/dist/agents/skills/shared/i18n-knowledge/testing/pseudo-localization.yaml +86 -0
- package/dist/bin/harness.js +64 -4
- package/dist/{chunk-GA6GN5J2.js → chunk-E2RTDBMG.js} +2263 -41
- package/dist/{chunk-FFIX3QVG.js → chunk-KJANDVVC.js} +141 -49
- package/dist/{chunk-4WUGOJQ7.js → chunk-RT2LYQHF.js} +1 -1
- package/dist/{dist-C4J67MPP.js → dist-CCM3L3UE.js} +95 -1
- package/dist/{dist-N4D4QWFV.js → dist-K6KTTN3I.js} +4 -4
- package/dist/index.d.ts +187 -7
- package/dist/index.js +7 -3
- package/dist/validate-cross-check-ZGKFQY57.js +7 -0
- package/package.json +9 -9
- package/dist/agents/skills/node_modules/.bin/glob +0 -17
- package/dist/agents/skills/node_modules/.bin/vitest +0 -17
- package/dist/agents/skills/node_modules/.bin/yaml +0 -17
- package/dist/templates/advanced/docs/specs/.gitkeep +0 -0
- package/dist/templates/intermediate/docs/specs/.gitkeep +0 -0
- package/dist/validate-cross-check-WGXQ7K62.js +0 -7
|
@@ -54,6 +54,18 @@ When the project has `design` configured in `harness.config.json`:
|
|
|
54
54
|
4. **Error-severity design findings are blocking** in `strict` mode only. In `standard` and `permissive` modes, design findings do not block.
|
|
55
55
|
5. If no `design` block exists, skip this phase entirely.
|
|
56
56
|
|
|
57
|
+
### Phase 1.8: I18N SCAN (conditional)
|
|
58
|
+
|
|
59
|
+
When the project has `i18n.enabled: true` in `harness.config.json`:
|
|
60
|
+
|
|
61
|
+
1. Run `harness-i18n` in scan mode to detect hardcoded strings, missing translations, locale-sensitive formatting issues, and RTL violations.
|
|
62
|
+
2. Combine findings into an i18n health summary:
|
|
63
|
+
- Error count (blocking, based on `i18n.strictness`)
|
|
64
|
+
- Warning count (non-blocking)
|
|
65
|
+
- Info count (advisory)
|
|
66
|
+
3. **Error-severity i18n findings are blocking** in `strict` mode only. In `standard` and `permissive` modes, i18n findings do not block.
|
|
67
|
+
4. If no `i18n` block exists or `i18n.enabled` is false, skip this phase entirely.
|
|
68
|
+
|
|
57
69
|
### Phase 2: REVIEW
|
|
58
70
|
|
|
59
71
|
Run change-type-aware AI review using `harness-code-review`.
|
|
@@ -75,6 +87,7 @@ Integrity Check: [PASS/FAIL]
|
|
|
75
87
|
- Types: [PASS/FAIL/SKIPPED]
|
|
76
88
|
- Security: [PASS/WARN/FAIL] ([count] errors, [count] warnings)
|
|
77
89
|
- Design: [PASS/WARN/FAIL/SKIPPED] ([count] errors, [count] warnings)
|
|
90
|
+
- i18n: [PASS/WARN/FAIL/SKIPPED] ([count] errors, [count] warnings)
|
|
78
91
|
- Review: [PASS/FAIL] ([count] suggestions, [count] blocking)
|
|
79
92
|
|
|
80
93
|
Overall: [PASS/FAIL]
|
|
@@ -82,7 +95,7 @@ Overall: [PASS/FAIL]
|
|
|
82
95
|
|
|
83
96
|
Rules:
|
|
84
97
|
|
|
85
|
-
- Overall `PASS` requires: all non-skipped mechanical checks pass AND zero blocking review findings AND zero blocking design findings (strict mode only).
|
|
98
|
+
- Overall `PASS` requires: all non-skipped mechanical checks pass AND zero blocking review findings AND zero blocking design findings (strict mode only) AND zero blocking i18n findings (strict mode only).
|
|
86
99
|
- Any mechanical failure OR any blocking review finding means `FAIL`.
|
|
87
100
|
- On FAIL, include a summary section listing each failure reason.
|
|
88
101
|
- Non-blocking review suggestions are noted but do not cause FAIL.
|
|
@@ -100,6 +113,7 @@ Rules:
|
|
|
100
113
|
- Output can be written to `.harness/integrity-report.md` for CI integration
|
|
101
114
|
- Invokes `harness-design` and `harness-accessibility` for design health when `design` config exists
|
|
102
115
|
- Design strictness from config controls whether design findings block the overall result
|
|
116
|
+
- Invokes `harness-i18n` for i18n compliance when `i18n.enabled` is true in config. i18n strictness controls whether findings block the overall result.
|
|
103
117
|
|
|
104
118
|
## Success Criteria
|
|
105
119
|
|
|
@@ -119,6 +133,7 @@ Integrity Check: PASS
|
|
|
119
133
|
- Types: PASS
|
|
120
134
|
- Security: PASS (0 errors, 0 warnings)
|
|
121
135
|
- Design: PASS (0 errors, 0 warnings)
|
|
136
|
+
- i18n: PASS (0 errors, 0 warnings)
|
|
122
137
|
- Review: 1 suggestion (0 blocking)
|
|
123
138
|
```
|
|
124
139
|
|
|
@@ -132,6 +147,7 @@ Integrity Check: FAIL
|
|
|
132
147
|
- Security: FAIL (1 error, 0 warnings)
|
|
133
148
|
- [SEC-INJ-002] src/auth/login.ts:42 — SQL query built with string concatenation
|
|
134
149
|
- Design: WARN (0 errors, 2 warnings)
|
|
150
|
+
- i18n: SKIPPED
|
|
135
151
|
- Review: 3 findings (1 blocking)
|
|
136
152
|
|
|
137
153
|
Blocking: [SEC-INJ-002] SQL injection — user input passed directly to query without parameterization.
|
|
@@ -13,8 +13,35 @@
|
|
|
13
13
|
|
|
14
14
|
## Prerequisites
|
|
15
15
|
|
|
16
|
-
A knowledge graph
|
|
17
|
-
|
|
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.
|
|
33
|
+
|
|
34
|
+
### Pipeline Context (when orchestrated)
|
|
35
|
+
|
|
36
|
+
When invoked by `harness-docs-pipeline`, check for a `pipeline` field in `.harness/handoff.json`:
|
|
37
|
+
|
|
38
|
+
- If `pipeline` field exists: read `DocPipelineContext` from it
|
|
39
|
+
- If `pipeline.bootstrapped === true`, this is a bootstrap invocation — generate full AGENTS.md without confirmation prompt
|
|
40
|
+
- Write any generated documentation back as `DocFix[]` to `pipeline.fillsApplied`
|
|
41
|
+
- This enables the orchestrator to track what was generated and verify it
|
|
42
|
+
- If `pipeline` field does not exist: behave exactly as today (standalone mode)
|
|
43
|
+
|
|
44
|
+
No changes to the skill's interface or output format — the pipeline field is purely additive.
|
|
18
45
|
|
|
19
46
|
## Process
|
|
20
47
|
|
|
@@ -40,6 +67,20 @@ If the graph exists but code has changed since the last scan, re-run `harness sc
|
|
|
40
67
|
get_relationships(nodeId=<module>, direction="outbound", depth=1)
|
|
41
68
|
```
|
|
42
69
|
|
|
70
|
+
#### Fallback (without graph)
|
|
71
|
+
|
|
72
|
+
When no graph is available, use directory structure and file analysis:
|
|
73
|
+
|
|
74
|
+
1. **Module hierarchy from directories**: Use the directory structure as the module hierarchy — each directory represents a module. Glob for all source files to build the tree.
|
|
75
|
+
2. **Entry points**: Check `package.json` for `main` and `exports` fields. Glob for `src/index.*` and `index.*` patterns. These are the entry points.
|
|
76
|
+
3. **Source file inventory**: Glob for all source files (`**/*.ts`, `**/*.tsx`, `**/*.js`, `**/*.jsx`, etc.).
|
|
77
|
+
4. **Documentation inventory**: Glob for all doc files (`**/*.md`, `docs/**/*`).
|
|
78
|
+
5. **Undocumented module detection**: Diff the source directory set against the doc directory set. Source directories with no corresponding docs (no README.md, no matching doc file) are undocumented.
|
|
79
|
+
6. **Existing knowledge map**: Read existing AGENTS.md if present for current knowledge map state.
|
|
80
|
+
7. **Dependency flow (approximate)**: Parse import statements in each module's files to determine which modules depend on which others.
|
|
81
|
+
|
|
82
|
+
> Fallback completeness: ~50% — no semantic grouping; modules grouped by directory only; no cross-cutting concern detection.
|
|
83
|
+
|
|
43
84
|
### Phase 2: GENERATE — Build Knowledge Map
|
|
44
85
|
|
|
45
86
|
Generate markdown sections following AGENTS.md conventions:
|
|
@@ -109,7 +150,7 @@ This ensures subsequent graph queries (impact analysis, drift detection) include
|
|
|
109
150
|
|
|
110
151
|
## Harness Integration
|
|
111
152
|
|
|
112
|
-
- **`harness scan`** —
|
|
153
|
+
- **`harness scan`** — Recommended before this skill for full graph-enhanced analysis. If graph is missing, skill uses directory structure fallbacks.
|
|
113
154
|
- **`harness validate`** — Run after acting on findings to verify project health.
|
|
114
155
|
- **Graph tools** — This skill uses `query_graph`, `get_relationships`, and `check_docs` MCP tools.
|
|
115
156
|
|
|
@@ -119,7 +160,7 @@ This ensures subsequent graph queries (impact analysis, drift detection) include
|
|
|
119
160
|
- Coverage gaps identified (undocumented modules, missing descriptions, stale references)
|
|
120
161
|
- Output written to AGENTS.md (or specified path) in proper markdown format
|
|
121
162
|
- Report follows the structured output format
|
|
122
|
-
- All findings are backed by graph query evidence
|
|
163
|
+
- All findings are backed by graph query evidence (with graph) or directory/file analysis (without graph)
|
|
123
164
|
|
|
124
165
|
## Examples
|
|
125
166
|
|
|
@@ -145,7 +186,7 @@ Output:
|
|
|
145
186
|
|
|
146
187
|
## Gates
|
|
147
188
|
|
|
148
|
-
- **
|
|
189
|
+
- **Graph preferred, fallback available.** If no graph exists, use directory structure and file analysis to build the knowledge map. Do not stop — produce the best map possible.
|
|
149
190
|
- **Never overwrite without confirmation.** If AGENTS.md exists, show the diff and ask before replacing.
|
|
150
191
|
|
|
151
192
|
## Escalation
|
|
@@ -45,34 +45,62 @@ Tier 1 violations are non-negotiable blockers. If a Tier 1 violation is detected
|
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
48
|
+
### Graph Availability
|
|
49
|
+
|
|
50
|
+
Hotspot scoring and coupling analysis benefit from the knowledge graph but work without it.
|
|
51
|
+
|
|
52
|
+
**Staleness sensitivity:** Medium -- auto-refresh if >10 commits stale. Hotspot scoring uses churn data which does not change rapidly.
|
|
53
|
+
|
|
54
|
+
| Feature | With Graph | Without Graph |
|
|
55
|
+
| ------------------------------------ | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
56
|
+
| Hotspot scoring (churn x complexity) | `GraphComplexityAdapter` computes from graph nodes | `git log --format="%H" -- <file>` for per-file commit count; complexity from `check-perf --structural` output; multiply manually |
|
|
57
|
+
| Coupling ratio | `GraphCouplingAdapter` computes from graph edges | Parse import statements, count fan-out/fan-in per file |
|
|
58
|
+
| Critical path resolution | Graph inference (high fan-in) + `@perf-critical` annotations | `@perf-critical` annotations only; grep for decorator/comment |
|
|
59
|
+
| Transitive dep depth | Graph BFS depth | Import chain follow, 2 levels deep |
|
|
60
|
+
|
|
61
|
+
**Notice when running without graph:** "Running without graph (run `harness scan` to enable hotspot scoring and coupling analysis)"
|
|
62
|
+
|
|
63
|
+
**Impact on tiers:** Without graph, Tier 1 hotspot detection is degraded. Hotspot scoring falls back to churn-only (no complexity multiplication). This limitation is documented in the performance report output.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
48
67
|
### Phase 2: BENCHMARK — Runtime Performance
|
|
49
68
|
|
|
50
69
|
This phase runs only when `.bench.ts` files exist in the project. If none are found, skip to Phase 3.
|
|
51
70
|
|
|
52
|
-
1. **Check
|
|
71
|
+
1. **Check baseline lock-in.** Before running benchmarks, verify baselines are kept in sync:
|
|
72
|
+
- List all `.bench.ts` files changed in this PR: `git diff --name-only | grep '.bench.ts'`
|
|
73
|
+
- If any `.bench.ts` files are new or modified:
|
|
74
|
+
- Check if `.harness/perf/baselines.json` is also modified in this PR
|
|
75
|
+
- If NOT modified: flag as Tier 2 warning: "Benchmark files changed but baselines not updated. Run `harness perf baselines update` and commit the result."
|
|
76
|
+
- If modified: verify the updated baselines include entries for all changed benchmarks
|
|
77
|
+
- If no `.bench.ts` files changed: skip this check
|
|
78
|
+
- This check also runs standalone via `--check-baselines` flag
|
|
79
|
+
|
|
80
|
+
2. **Check for benchmark files.** Scan the project for `*.bench.ts` files. If none exist, skip this phase entirely.
|
|
53
81
|
|
|
54
|
-
|
|
82
|
+
3. **Verify clean working tree.** Run `git status --porcelain`. If there are uncommitted changes, STOP. Benchmarks on dirty trees produce unreliable results.
|
|
55
83
|
|
|
56
|
-
|
|
84
|
+
4. **Run benchmarks.** Execute `harness perf bench` to run all benchmark suites.
|
|
57
85
|
|
|
58
|
-
|
|
86
|
+
5. **Load baselines.** Read `.harness/perf/baselines.json` for previous benchmark results. If no baselines exist, treat this as a baseline-capture run.
|
|
59
87
|
|
|
60
|
-
|
|
88
|
+
6. **Compare results against baselines** using the `RegressionDetector`:
|
|
61
89
|
- Calculate percentage change for each benchmark
|
|
62
90
|
- Apply noise margin (default: 3%) before flagging regressions
|
|
63
91
|
- Distinguish between critical-path and non-critical-path benchmarks
|
|
64
92
|
|
|
65
|
-
|
|
93
|
+
7. **Resolve critical paths** via `CriticalPathResolver`:
|
|
66
94
|
- Check `@perf-critical` annotations in source files
|
|
67
95
|
- Check graph fan-in data (functions called by many consumers)
|
|
68
96
|
- Functions in the critical path set have stricter thresholds
|
|
69
97
|
|
|
70
|
-
|
|
98
|
+
8. **Flag regressions by tier:**
|
|
71
99
|
- **Tier 1:** >5% regression on a critical path benchmark
|
|
72
100
|
- **Tier 2:** >10% regression on a non-critical-path benchmark
|
|
73
101
|
- **Tier 3:** >5% regression on a non-critical-path benchmark (within noise margin consideration)
|
|
74
102
|
|
|
75
|
-
|
|
103
|
+
9. **If this is a baseline-capture run,** report results without regression comparison. Recommend running `harness perf baselines update` to persist.
|
|
76
104
|
|
|
77
105
|
---
|
|
78
106
|
|
|
@@ -138,6 +166,7 @@ This phase runs only when `.bench.ts` files exist in the project. If none are fo
|
|
|
138
166
|
- **`harness perf bench`** — Run benchmarks only. Requires clean working tree.
|
|
139
167
|
- **`harness perf baselines show`** — View current benchmark baselines.
|
|
140
168
|
- **`harness perf baselines update`** — Persist current benchmark results as new baselines.
|
|
169
|
+
- **`harness perf --check-baselines`** -- Verify baseline file is updated when benchmarks change. Runs the baseline lock-in check standalone.
|
|
141
170
|
- **`harness perf critical-paths`** — View the current critical path set and how it was determined.
|
|
142
171
|
- **`harness validate`** — Run after enforcement to verify overall project health.
|
|
143
172
|
- **`harness graph scan`** — Refresh knowledge graph for accurate hotspot scoring.
|
|
@@ -60,10 +60,23 @@ If you find yourself writing production code before both the test and the benchm
|
|
|
60
60
|
|
|
61
61
|
2. **Run the test** — observe pass. If it fails, fix the implementation until it passes.
|
|
62
62
|
|
|
63
|
-
3. **Run the benchmark**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
63
|
+
3. **Run the benchmark** -- capture initial results and apply thresholds:
|
|
64
|
+
|
|
65
|
+
**When the spec defines a performance requirement** (e.g., "< 50ms"):
|
|
66
|
+
- Use the spec requirement as the benchmark assertion threshold
|
|
67
|
+
- Verify it passes; if not, see step 4
|
|
68
|
+
|
|
69
|
+
**When the spec is vague or silent on performance:**
|
|
70
|
+
- Fall back to harness-perf tier thresholds:
|
|
71
|
+
- Critical path functions (annotated `@perf-critical` or high fan-in): must not regress >5% from baseline (Tier 1)
|
|
72
|
+
- Non-critical functions: must not regress >10% from baseline (Tier 2)
|
|
73
|
+
- Structural complexity: must stay under Tier 2 thresholds (cyclomatic <=15, nesting <=4, function length <=50 lines, params <=5)
|
|
74
|
+
- These thresholds give developers concrete targets even when the spec does not specify performance requirements
|
|
75
|
+
|
|
76
|
+
**When no baseline exists (new code):**
|
|
77
|
+
- This run captures the initial baseline
|
|
78
|
+
- No regression comparison on first run
|
|
79
|
+
- VALIDATE phase (Phase 4) ensures the captured baseline is committed via `harness perf baselines update`
|
|
67
80
|
|
|
68
81
|
4. **If the performance assertion fails,** you have two options:
|
|
69
82
|
- The implementation approach is fundamentally wrong (e.g., O(n^2) when O(n) is needed) — revise the algorithm
|
|
@@ -38,6 +38,19 @@ Work backward from the goal. Do not start with "what should we build?" Start wit
|
|
|
38
38
|
|
|
39
39
|
5. **Apply YAGNI.** For every artifact, ask: "Is this required for an observable truth?" If not, cut it.
|
|
40
40
|
|
|
41
|
+
When scope is ambiguous and requires clarification, use `emit_interaction`:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
emit_interaction({
|
|
45
|
+
path: "<project-root>",
|
|
46
|
+
type: "question",
|
|
47
|
+
question: {
|
|
48
|
+
text: "The spec mentions X but does not define behavior for Y. Should we:",
|
|
49
|
+
options: ["A) Include Y in this plan", "B) Defer Y to a follow-up plan", "C) Update the spec first"]
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
```
|
|
53
|
+
|
|
41
54
|
#### EARS Requirement Patterns
|
|
42
55
|
|
|
43
56
|
When writing observable truths and acceptance criteria, use EARS (Easy Approach to Requirements Syntax) sentence patterns. These patterns eliminate ambiguity by forcing a consistent grammatical structure.
|
|
@@ -73,6 +86,12 @@ Enables accurate effort estimation and task sequencing. Fall back to file-based
|
|
|
73
86
|
|
|
74
87
|
### Phase 2: DECOMPOSE — Map File Structure and Create Tasks
|
|
75
88
|
|
|
89
|
+
When presenting the task breakdown, use progress markers:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
**[Phase 2/4]** DECOMPOSE — mapping file structure and creating tasks
|
|
93
|
+
```
|
|
94
|
+
|
|
76
95
|
1. **Map the file structure first.** Before writing any tasks, list every file that will be created or modified. This is where decomposition decisions are locked. Example:
|
|
77
96
|
|
|
78
97
|
```
|
|
@@ -128,9 +147,11 @@ Enables accurate effort estimation and task sequencing. Fall back to file-based
|
|
|
128
147
|
|
|
129
148
|
5. **Check failures log.** Read `.harness/failures.md` before finalizing. If planned approaches match known failures, flag them with warnings.
|
|
130
149
|
|
|
131
|
-
6. **
|
|
150
|
+
6. **Run soundness review.** After the plan passes completeness verification, invoke `harness-soundness-review --mode plan` against the draft. Do not proceed to write the plan until the soundness review converges with no remaining issues.
|
|
132
151
|
|
|
133
|
-
7. **Write
|
|
152
|
+
7. **Write the plan to `docs/plans/`.** Use naming convention: `YYYY-MM-DD-<feature-name>-plan.md`. If the directory does not exist, create it.
|
|
153
|
+
|
|
154
|
+
8. **Write handoff.** Save `.harness/handoff.json` with the following structure:
|
|
134
155
|
|
|
135
156
|
```json
|
|
136
157
|
{
|
|
@@ -145,7 +166,39 @@ Enables accurate effort estimation and task sequencing. Fall back to file-based
|
|
|
145
166
|
}
|
|
146
167
|
```
|
|
147
168
|
|
|
148
|
-
|
|
169
|
+
9. **Request plan sign-off:**
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
emit_interaction({
|
|
173
|
+
path: "<project-root>",
|
|
174
|
+
type: "confirmation",
|
|
175
|
+
confirmation: {
|
|
176
|
+
text: "Approve plan at <plan-file-path>?",
|
|
177
|
+
context: "<task count> tasks, <estimated time> minutes. <one-sentence summary>"
|
|
178
|
+
}
|
|
179
|
+
})
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
10. **Suggest transition to execution.** After the human approves the plan:
|
|
183
|
+
|
|
184
|
+
Call `emit_interaction`:
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"type": "transition",
|
|
189
|
+
"transition": {
|
|
190
|
+
"completedPhase": "planning",
|
|
191
|
+
"suggestedNext": "execution",
|
|
192
|
+
"reason": "Plan approved with all tasks defined",
|
|
193
|
+
"artifacts": ["<plan file path>"],
|
|
194
|
+
"requiresConfirmation": true,
|
|
195
|
+
"summary": "<Plan title> -- <N> tasks, <N> checkpoints. Estimated <time>."
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
If the user confirms: invoke harness-execution with the plan path.
|
|
201
|
+
If the user declines: stop. The handoff is already written for future invocation.
|
|
149
202
|
|
|
150
203
|
---
|
|
151
204
|
|
|
@@ -155,7 +208,7 @@ Enables accurate effort estimation and task sequencing. Fall back to file-based
|
|
|
155
208
|
# Plan: <Feature Name>
|
|
156
209
|
|
|
157
210
|
**Date:** YYYY-MM-DD
|
|
158
|
-
**Spec:** docs/
|
|
211
|
+
**Spec:** docs/changes/<feature>/proposal.md (if applicable)
|
|
159
212
|
**Estimated tasks:** N
|
|
160
213
|
**Estimated time:** N minutes
|
|
161
214
|
|
|
@@ -211,6 +264,7 @@ One sentence.
|
|
|
211
264
|
- **Plan location** — Plans go to `docs/plans/`. Follow the naming convention: `YYYY-MM-DD-<feature-name>-plan.md`.
|
|
212
265
|
- **Handoff to harness-execution** — Once the plan is approved, invoke harness-execution to begin task-by-task implementation.
|
|
213
266
|
- **Task commands** — Every task includes exact harness CLI commands to run (e.g., `harness validate`, `harness check-deps`).
|
|
267
|
+
- **`emit_interaction`** -- Call at the end of Phase 4 to suggest transitioning to harness-execution. Uses confirmed transition (waits for user approval).
|
|
214
268
|
|
|
215
269
|
## Change Specifications
|
|
216
270
|
|
|
@@ -232,7 +286,7 @@ When planning changes to existing functionality (not greenfield), express requir
|
|
|
232
286
|
|
|
233
287
|
This is not mandatory for greenfield features. Only apply when modifying existing documented behavior.
|
|
234
288
|
|
|
235
|
-
When `docs/
|
|
289
|
+
When `docs/changes/` exists in the project, produce `docs/changes/<feature>/delta.md` alongside the task plan. This keeps the change intent separate from the full spec and makes review easier.
|
|
236
290
|
|
|
237
291
|
## Success Criteria
|
|
238
292
|
|
|
@@ -113,6 +113,20 @@ Run every check below. Record each as **pass**, **warn**, or **fail**:
|
|
|
113
113
|
| `typecheck` or `tsc` script exists in root `package.json` | fail |
|
|
114
114
|
| `harness validate` passes (project-level health check) | fail |
|
|
115
115
|
|
|
116
|
+
##### i18n Coverage (conditional)
|
|
117
|
+
|
|
118
|
+
When `i18n.enabled: true` in `harness.config.json`, run these checks:
|
|
119
|
+
|
|
120
|
+
| Check | Severity if failing |
|
|
121
|
+
| ---------------------------------------------------------------------------------------------- | ------------------------------- |
|
|
122
|
+
| Translation coverage meets `i18n.coverage.minimumPercent` for all target locales | fail (strict) / warn (standard) |
|
|
123
|
+
| No untranslated values (source text in target locale files) when `coverage.detectUntranslated` | warn |
|
|
124
|
+
| All CLDR plural forms present for target locales when `coverage.requirePlurals` | warn |
|
|
125
|
+
| No stale translations (source changed since last translation timestamp) | warn |
|
|
126
|
+
| `harness-i18n` scan passes with zero errors | fail (strict) / warn (standard) |
|
|
127
|
+
|
|
128
|
+
If `i18n.enabled` is false or the `i18n` config block is absent, skip this section entirely and report it as "N/A" in the audit output.
|
|
129
|
+
|
|
116
130
|
#### Comprehensive Checks (only with `--comprehensive`)
|
|
117
131
|
|
|
118
132
|
These checks run only when `--comprehensive` is passed. They are slower and may require network access.
|
|
@@ -160,6 +174,7 @@ Packaging: 8/12 passed, 2 warnings, 2 failures
|
|
|
160
174
|
Docs: 5/6 passed, 1 warning, 0 failures
|
|
161
175
|
Hygiene: 3/5 passed, 2 warnings, 0 failures
|
|
162
176
|
CI/CD: 4/5 passed, 1 warning, 0 failures
|
|
177
|
+
i18n: N/N passed, N warnings, N failures (or: skipped — i18n not enabled)
|
|
163
178
|
[comprehensive] API Docs: skipped (use --comprehensive)
|
|
164
179
|
[comprehensive] Examples: skipped (use --comprehensive)
|
|
165
180
|
[comprehensive] Dep Health: skipped (use --comprehensive)
|
|
@@ -496,6 +511,7 @@ This framing is informational — it does not block anything. It gives the team
|
|
|
496
511
|
- **Sub-skill invocations** — Phase 2 dispatches `detect-doc-drift`, `cleanup-dead-code`, `enforce-architecture`, and `diagnostics` as parallel agents. Phase 3 delegates fixes to `align-documentation` and `cleanup-dead-code`.
|
|
497
512
|
- **State file** — `.harness/release-readiness.json` enables session resumption and progress tracking. This file is read at the start of each invocation and written at the end.
|
|
498
513
|
- **Report file** — `release-readiness-report.md` is written to the project root. It is a snapshot, not a tracked artifact — regenerate it on each run.
|
|
514
|
+
- **i18n coverage** — When `i18n.enabled: true`, Phase 1 checks translation coverage against configured thresholds. Uses `harness-i18n` scan results and `harness-i18n-workflow` coverage tracking. Blocks release in strict mode if coverage is below `i18n.coverage.minimumPercent`.
|
|
499
515
|
|
|
500
516
|
## Success Criteria
|
|
501
517
|
|