@harness-engineering/cli 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +9 -1
- package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +76 -4
- 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 +57 -3
- 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 +562 -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/harness-accessibility/SKILL.md +7 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +9 -1
- 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-dependency-health/SKILL.md +35 -6
- 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-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-knowledge-mapper/SKILL.md +46 -5
- 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-release-readiness/SKILL.md +16 -0
- package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +562 -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-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-test-advisor/SKILL.md +35 -6
- 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-4WUGOJQ7.js → chunk-3JWCBVUZ.js} +1 -1
- package/dist/{chunk-FFIX3QVG.js → chunk-LNI4T7R6.js} +131 -41
- package/dist/{chunk-GA6GN5J2.js → chunk-SJECMKSS.js} +2244 -34
- package/dist/{dist-N4D4QWFV.js → dist-BDO5GFEM.js} +1 -1
- package/dist/{dist-C4J67MPP.js → dist-NT3GXHQZ.js} +95 -1
- package/dist/index.d.ts +187 -7
- package/dist/index.js +7 -3
- package/dist/validate-cross-check-2OPGCGGU.js +7 -0
- package/package.json +7 -7
- package/dist/validate-cross-check-WGXQ7K62.js +0 -7
|
@@ -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
|
|
@@ -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
|
|