@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
|
@@ -13,8 +13,23 @@
|
|
|
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.
|
|
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`** —
|
|
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
|
|
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
|
-
- **
|
|
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
|
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# Harness Verification
|
|
2
|
+
|
|
3
|
+
> 3-level evidence-based verification. No completion claims without fresh evidence. "Should work" is not evidence.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- After completing any implementation task (before claiming "done")
|
|
8
|
+
- After executing a plan or spec (verify all deliverables)
|
|
9
|
+
- When validating work done by another agent or in a previous session
|
|
10
|
+
- When resuming work after a context reset (re-verify before continuing)
|
|
11
|
+
- When `on_commit` or `on_pr` triggers fire and verification is needed
|
|
12
|
+
- NOT as a replacement for tests (verification checks that tests exist and pass, not that logic is correct)
|
|
13
|
+
- NOT for in-progress work (verify at completion boundaries, not mid-stream)
|
|
14
|
+
|
|
15
|
+
### Verification Tiers
|
|
16
|
+
|
|
17
|
+
Harness uses a two-tier verification model:
|
|
18
|
+
|
|
19
|
+
| Tier | Skill | When | What |
|
|
20
|
+
| -------------- | --------------------------------- | -------------------------- | -------------------------------------------------- |
|
|
21
|
+
| **Quick gate** | harness-execution (built-in) | After every task | test + lint + typecheck + build + harness validate |
|
|
22
|
+
| **Deep audit** | harness-verification (this skill) | Milestones, PRs, on-demand | EXISTS → SUBSTANTIVE → WIRED |
|
|
23
|
+
|
|
24
|
+
Use this skill (deep audit) for milestone boundaries, before creating PRs, or when the quick gate passes but something feels wrong. Do NOT invoke this skill after every individual task — that is what the quick gate handles.
|
|
25
|
+
|
|
26
|
+
## Process
|
|
27
|
+
|
|
28
|
+
### Iron Law
|
|
29
|
+
|
|
30
|
+
**No completion claim may be made without fresh verification evidence collected in THIS session.**
|
|
31
|
+
|
|
32
|
+
Cached results, remembered outcomes, and "it worked last time" are not evidence. Run the checks. Read the output. Report what you observed.
|
|
33
|
+
|
|
34
|
+
The words "should", "probably", "seems to", and "I believe" are forbidden in verification reports. Replace with "verified: [evidence]" or "not verified: [what is missing]."
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### Level 1: EXISTS — The Artifact Is Present
|
|
39
|
+
|
|
40
|
+
For every artifact that was supposed to be created or modified:
|
|
41
|
+
|
|
42
|
+
1. **Check that the file exists on disk.** Use `ls`, `stat`, or read the file. Do not assume it exists because you wrote it — file writes can fail silently.
|
|
43
|
+
|
|
44
|
+
2. **Check that the file has content.** An empty file is not an artifact. Read the file and confirm it has non-trivial content.
|
|
45
|
+
|
|
46
|
+
3. **Check the file is in the right location.** Compare the actual path against the spec or plan. A file in the wrong directory is not "present."
|
|
47
|
+
|
|
48
|
+
4. **Record the result.** For each expected artifact:
|
|
49
|
+
```
|
|
50
|
+
[EXISTS: PASS] path/to/file.ts (247 lines)
|
|
51
|
+
[EXISTS: FAIL] path/to/missing-file.ts — file not found
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Do not proceed to Level 2 until all Level 1 checks pass. Missing files must be created first.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### Level 2: SUBSTANTIVE — Not a Stub
|
|
59
|
+
|
|
60
|
+
For every artifact that passed Level 1:
|
|
61
|
+
|
|
62
|
+
1. **Read the file content.** Do not skim — read it thoroughly.
|
|
63
|
+
|
|
64
|
+
2. **Scan for anti-patterns** that indicate stub or placeholder implementations:
|
|
65
|
+
- `TODO` or `FIXME` comments (especially `TODO: implement`)
|
|
66
|
+
- `throw new Error('not implemented')`
|
|
67
|
+
- `() => {}` (empty arrow functions)
|
|
68
|
+
- `return null`, `return undefined`, `return {}` as the only logic
|
|
69
|
+
- `pass` (Python placeholder)
|
|
70
|
+
- `placeholder`, `stub`, `mock` in non-test code
|
|
71
|
+
- Functions with only a comment describing what they should do
|
|
72
|
+
- Interfaces or types defined but never implemented
|
|
73
|
+
|
|
74
|
+
3. **Verify real implementation exists.** The file must contain actual logic that performs the described behavior. A function that only returns a hardcoded value is a stub unless that is the correct behavior.
|
|
75
|
+
|
|
76
|
+
4. **Check for completeness against the spec.** If the spec says "handles errors X, Y, Z," verify all three are handled, not just X.
|
|
77
|
+
|
|
78
|
+
5. **Record the result.** For each artifact:
|
|
79
|
+
```
|
|
80
|
+
[SUBSTANTIVE: PASS] path/to/file.ts — real implementation, no stubs
|
|
81
|
+
[SUBSTANTIVE: FAIL] path/to/file.ts — contains TODO on line 34, empty handler on line 67
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Do not proceed to Level 3 until all Level 2 checks pass. Stubs must be replaced with real implementations first.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### Level 3: WIRED — Connected to the System
|
|
89
|
+
|
|
90
|
+
For every artifact that passed Level 2:
|
|
91
|
+
|
|
92
|
+
1. **Verify the artifact is imported/required** by at least one other file in the system (unless it is an entry point).
|
|
93
|
+
|
|
94
|
+
2. **Verify the artifact is called/used.** An import that is never called is dead code. Trace the usage:
|
|
95
|
+
- Functions: called from at least one other function or test
|
|
96
|
+
- Components: rendered in at least one parent or route
|
|
97
|
+
- Types: used in at least one function signature or variable declaration
|
|
98
|
+
- Configuration: loaded and applied by the system
|
|
99
|
+
- Tests: executed by the test runner
|
|
100
|
+
|
|
101
|
+
3. **Verify the artifact is tested.** There must be at least one test that exercises the artifact's behavior. Check:
|
|
102
|
+
- Test file exists
|
|
103
|
+
- Test imports or references the artifact
|
|
104
|
+
- Test makes assertions about the artifact's behavior
|
|
105
|
+
- Test actually runs (not skipped with `.skip` or `xit`)
|
|
106
|
+
|
|
107
|
+
4. **Run the tests.** Execute the test suite and verify tests pass. Do not trust "they passed earlier" — run them now.
|
|
108
|
+
|
|
109
|
+
5. **Run harness checks.** Execute `harness validate` and verify the artifact integrates correctly with the project's constraints.
|
|
110
|
+
|
|
111
|
+
6. **Record the result.** For each artifact:
|
|
112
|
+
```
|
|
113
|
+
[WIRED: PASS] path/to/file.ts — imported by 3 files, tested in file.test.ts (4 tests, all pass)
|
|
114
|
+
[WIRED: FAIL] path/to/file.ts — exported but not imported by any other file
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### Anti-Pattern Scan
|
|
120
|
+
|
|
121
|
+
Run this scan across all changed files as a final check:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Scan targets: TODO, FIXME, XXX, HACK, PLACEHOLDER, NOT_IMPLEMENTED
|
|
125
|
+
Code patterns: () => {}, return null (as sole body), pass, raise NotImplementedError
|
|
126
|
+
Test patterns: .skip, xit, xdescribe, @pytest.mark.skip, pending
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Any match is a verification failure. Either fix it or explicitly document why it is acceptable (e.g., "TODO is tracked in issue #123 and out of scope for this task").
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### Gap Identification
|
|
134
|
+
|
|
135
|
+
After running all three levels, produce a structured gap report:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
## Verification Report
|
|
139
|
+
|
|
140
|
+
### Level 1: EXISTS
|
|
141
|
+
- [PASS] path/to/file-a.ts (120 lines)
|
|
142
|
+
- [PASS] path/to/file-b.ts (85 lines)
|
|
143
|
+
- [FAIL] path/to/file-c.ts — not found
|
|
144
|
+
|
|
145
|
+
### Level 2: SUBSTANTIVE
|
|
146
|
+
- [PASS] path/to/file-a.ts — real implementation
|
|
147
|
+
- [FAIL] path/to/file-b.ts — TODO on line 22
|
|
148
|
+
|
|
149
|
+
### Level 3: WIRED
|
|
150
|
+
- [PASS] path/to/file-a.ts — imported, tested, harness passes
|
|
151
|
+
- [NOT CHECKED] path/to/file-b.ts — blocked by Level 2 failure
|
|
152
|
+
|
|
153
|
+
### Anti-Pattern Scan
|
|
154
|
+
- path/to/file-b.ts:22 — TODO: implement validation
|
|
155
|
+
|
|
156
|
+
### Gaps
|
|
157
|
+
1. path/to/file-c.ts must be created
|
|
158
|
+
2. path/to/file-b.ts:22 must be implemented (not stub)
|
|
159
|
+
|
|
160
|
+
### Verdict: INCOMPLETE — 2 gaps must be resolved
|
|
161
|
+
```
|
|
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
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
### Regression Test Verification
|
|
230
|
+
|
|
231
|
+
When verifying a bug fix, apply this extended protocol:
|
|
232
|
+
|
|
233
|
+
1. **Write** the regression test that reproduces the bug
|
|
234
|
+
2. **Run** the test — it must PASS (proving the fix works)
|
|
235
|
+
3. **Revert** the fix (temporarily): `git stash` or comment out the fix
|
|
236
|
+
4. **Run** the test — it must FAIL (proving the test actually catches the bug)
|
|
237
|
+
5. **Restore** the fix: `git stash pop` or uncomment
|
|
238
|
+
6. **Run** the test — it must PASS again (proving the fix is the reason)
|
|
239
|
+
|
|
240
|
+
If step 4 passes (test does not fail without the fix), the test is not a valid regression test. It does not catch the bug. Rewrite it.
|
|
241
|
+
|
|
242
|
+
## Harness Integration
|
|
243
|
+
|
|
244
|
+
- **`harness validate`** — Run in Level 3 WIRED check. Verifies project-wide health and constraint compliance.
|
|
245
|
+
- **`harness check-deps`** — Run in Level 3 to verify new artifacts respect dependency boundaries.
|
|
246
|
+
- **`harness check-docs`** — Run to verify documentation is updated for new artifacts. Missing docs for new public APIs is a gap.
|
|
247
|
+
- **Test runner** — Must be run fresh (not cached) during Level 3. Read actual output, check exit codes.
|
|
248
|
+
|
|
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.
|
|
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
|
+
|
|
253
|
+
## Success Criteria
|
|
254
|
+
|
|
255
|
+
- Every claimed deliverable has been verified at all 3 levels
|
|
256
|
+
- No anti-patterns remain in delivered code
|
|
257
|
+
- Verification report uses the structured format with PASS/FAIL per artifact per level
|
|
258
|
+
- All verification evidence was collected fresh in the current session
|
|
259
|
+
- No forbidden language ("should", "probably", "seems to") appears in the report
|
|
260
|
+
- All gaps are explicitly identified with specific remediation steps
|
|
261
|
+
- Regression tests (for bug fixes) pass the 5-step revert check
|
|
262
|
+
|
|
263
|
+
## Non-Determinism Tolerance
|
|
264
|
+
|
|
265
|
+
For mechanical checks (tests pass, lint clean, types check), results are binary — pass or fail. No tolerance.
|
|
266
|
+
|
|
267
|
+
For behavioral verification (did the agent follow a convention, did the output match a style guide), accept threshold-based results:
|
|
268
|
+
|
|
269
|
+
- Run the check multiple times if needed
|
|
270
|
+
- "Agent followed the constraint in 4/5 runs" = pass
|
|
271
|
+
- "Agent followed the constraint in 2/5 runs" = fail — the convention is poorly written, not the agent
|
|
272
|
+
|
|
273
|
+
If a behavioral convention fails more than 40% of the time, the convention needs rewriting. Blame the instruction, not the executor.
|
|
274
|
+
|
|
275
|
+
## Examples
|
|
276
|
+
|
|
277
|
+
### Example: Verifying a New Service Module
|
|
278
|
+
|
|
279
|
+
Task: "Create UserService with create, read, update, delete operations."
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
## Verification Report
|
|
283
|
+
|
|
284
|
+
### Level 1: EXISTS
|
|
285
|
+
- [PASS] src/services/user-service.ts (189 lines)
|
|
286
|
+
- [PASS] src/services/user-service.test.ts (245 lines)
|
|
287
|
+
- [PASS] src/services/index.ts (updated — exports UserService)
|
|
288
|
+
|
|
289
|
+
### Level 2: SUBSTANTIVE
|
|
290
|
+
- [PASS] src/services/user-service.ts — all 4 CRUD methods implemented with
|
|
291
|
+
validation, error handling, and database calls
|
|
292
|
+
- [PASS] src/services/user-service.test.ts — 12 tests covering happy paths,
|
|
293
|
+
error cases, and edge cases (no skipped tests)
|
|
294
|
+
|
|
295
|
+
### Level 3: WIRED
|
|
296
|
+
- [PASS] src/services/user-service.ts — imported by src/api/routes/users.ts,
|
|
297
|
+
tested in user-service.test.ts (12 tests, all pass)
|
|
298
|
+
- [PASS] harness validate — passes
|
|
299
|
+
- [PASS] harness check-deps — no boundary violations
|
|
300
|
+
|
|
301
|
+
### Anti-Pattern Scan
|
|
302
|
+
- No matches found
|
|
303
|
+
|
|
304
|
+
### Gaps
|
|
305
|
+
(none)
|
|
306
|
+
|
|
307
|
+
### Verdict: COMPLETE — all artifacts verified at all levels
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Gates
|
|
311
|
+
|
|
312
|
+
- **No completion without evidence.** You may not say "done," "complete," "finished," or "implemented" without a verification report showing PASS at all 3 levels for all deliverables.
|
|
313
|
+
- **No stale evidence.** Evidence must be from the current session. "I checked earlier" is not evidence. Run it again.
|
|
314
|
+
- **No forbidden language.** "Should work," "probably fine," "seems correct," and "I believe it works" are not verification statements. Replace with observed evidence or state "not verified."
|
|
315
|
+
- **No skipping levels.** Level 1 before Level 2. Level 2 before Level 3. Each level depends on the previous.
|
|
316
|
+
- **No satisfaction before evidence.** The natural inclination after writing code is to feel done. Resist it. Feeling done is not being done. Evidence is being done.
|
|
317
|
+
|
|
318
|
+
## Escalation
|
|
319
|
+
|
|
320
|
+
- **When an artifact cannot pass Level 3 (WIRED) because the system it connects to does not exist yet:** Document the gap explicitly. State what integration is missing and what must be built. Do not mark it as PASS.
|
|
321
|
+
- **When anti-pattern scan finds TODOs that are intentional:** Each must be justified with a tracked issue number. "TODO: implement" with no issue reference is not acceptable. "TODO(#123): add rate limiting after infrastructure is ready" is acceptable.
|
|
322
|
+
- **When tests pass but you suspect they are not testing real behavior:** Read the test assertions carefully. If tests only check "does not throw" or assert on mock return values without verifying real behavior, flag them as SUBSTANTIVE failures.
|
|
323
|
+
- **When verification reveals the spec itself is incomplete:** Do not fill in the gaps yourself. Escalate to the human: "Verification found that the spec does not define behavior for [scenario]. How should this be handled?"
|
|
324
|
+
- **When you cannot run harness checks:** If `harness validate` or `harness check-deps` cannot be run (missing configuration, broken tooling), this is a blocking issue. Do not skip verification — fix the tooling or escalate.
|
|
325
|
+
|
|
326
|
+
After verification completes, append a tagged learning:
|
|
327
|
+
|
|
328
|
+
- **YYYY-MM-DD [skill:harness-verification] [outcome:pass/fail]:** Verified [feature]. [Brief note on what was found or confirmed.]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: harness-verification
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Comprehensive harness verification of project health and compliance
|
|
4
|
+
cognitive_mode: meticulous-verifier
|
|
5
|
+
triggers:
|
|
6
|
+
- manual
|
|
7
|
+
- on_pr
|
|
8
|
+
- on_commit
|
|
9
|
+
platforms:
|
|
10
|
+
- claude-code
|
|
11
|
+
- gemini-cli
|
|
12
|
+
tools:
|
|
13
|
+
- Bash
|
|
14
|
+
- Read
|
|
15
|
+
- Glob
|
|
16
|
+
- emit_interaction
|
|
17
|
+
cli:
|
|
18
|
+
command: harness skill run harness-verification
|
|
19
|
+
args:
|
|
20
|
+
- name: path
|
|
21
|
+
description: Project root path
|
|
22
|
+
required: false
|
|
23
|
+
mcp:
|
|
24
|
+
tool: run_skill
|
|
25
|
+
input:
|
|
26
|
+
skill: harness-verification
|
|
27
|
+
path: string
|
|
28
|
+
type: rigid
|
|
29
|
+
phases:
|
|
30
|
+
- name: check
|
|
31
|
+
description: Run all harness validation commands
|
|
32
|
+
required: true
|
|
33
|
+
- name: report
|
|
34
|
+
description: Summarize findings and violations
|
|
35
|
+
required: true
|
|
36
|
+
- name: remediate
|
|
37
|
+
description: Fix any critical violations
|
|
38
|
+
required: true
|
|
39
|
+
state:
|
|
40
|
+
persistent: false
|
|
41
|
+
files: []
|
|
42
|
+
depends_on: []
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Harness Verify
|
|
2
|
+
|
|
3
|
+
> Binary pass/fail quick gate. Runs test, lint, typecheck — returns structured result. No judgment calls, no deep analysis. Pass or fail.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- After every task as a final sanity check
|
|
8
|
+
- As the final step in any code-producing skill
|
|
9
|
+
- When you need a fast mechanical answer: "does the code compile, lint, and pass tests?"
|
|
10
|
+
- NOT for deep verification or architectural review (use `harness-verification` for that)
|
|
11
|
+
- NOT for AI-powered code review (use `harness-code-review` for that)
|
|
12
|
+
|
|
13
|
+
## Relationship to Other Skills
|
|
14
|
+
|
|
15
|
+
| Skill | What It Does | Time |
|
|
16
|
+
| ------------------------- | ---------------------------------------------- | ----- |
|
|
17
|
+
| **harness-verify** (this) | Mechanical quick gate: typecheck, lint, test | ~30s |
|
|
18
|
+
| **harness-verification** | Deep audit: architecture, patterns, edge cases | ~5min |
|
|
19
|
+
|
|
20
|
+
`harness-verify` is the fast, deterministic gate. `harness-verification` is the slow, thorough audit. They serve different purposes and should not be confused.
|
|
21
|
+
|
|
22
|
+
## Process
|
|
23
|
+
|
|
24
|
+
### Phase 1: DETECT
|
|
25
|
+
|
|
26
|
+
Auto-detect project commands by inspecting the project root:
|
|
27
|
+
|
|
28
|
+
1. **package.json** — Look for `scripts.test`, `scripts.lint`, `scripts.typecheck` (or `scripts.tsc`, `scripts.type-check`)
|
|
29
|
+
2. **Makefile** — Look for `test`, `lint`, `typecheck` targets
|
|
30
|
+
3. **Conventions** — Fall back to common commands:
|
|
31
|
+
- Typecheck: `npx tsc --noEmit`, `mypy .`, `go vet ./...`
|
|
32
|
+
- Lint: `npx eslint .`, `ruff check .`, `golangci-lint run`
|
|
33
|
+
- Test: `npm test`, `pytest`, `go test ./...`
|
|
34
|
+
4. **Language detection** — Use file extensions to determine which convention set applies
|
|
35
|
+
|
|
36
|
+
For each of the three checks (typecheck, lint, test), record either the detected command or `NONE` if no command can be determined.
|
|
37
|
+
|
|
38
|
+
### Phase 2: EXECUTE
|
|
39
|
+
|
|
40
|
+
Run all detected commands in this order: **typecheck -> lint -> test**.
|
|
41
|
+
|
|
42
|
+
Rules:
|
|
43
|
+
|
|
44
|
+
- Run ALL commands regardless of earlier failures. Do not short-circuit.
|
|
45
|
+
- Capture exit code, stdout, and stderr for each command.
|
|
46
|
+
- Exit code 0 = PASS. Any non-zero exit code = FAIL.
|
|
47
|
+
- If a command was `NONE` (not detected), mark that check as `SKIPPED`.
|
|
48
|
+
- Run each command from the project root directory.
|
|
49
|
+
- Do not modify any files. Do not install dependencies. Do not fix errors.
|
|
50
|
+
|
|
51
|
+
### Design Constraint Check (conditional)
|
|
52
|
+
|
|
53
|
+
When `harness.config.json` contains a `design` block:
|
|
54
|
+
|
|
55
|
+
1. **Run design constraint checks** by invoking `harness-accessibility` in scan+evaluate mode against the project.
|
|
56
|
+
2. Apply the `design.strictness` setting to determine severity:
|
|
57
|
+
- `strict`: accessibility violations are FAIL; anti-pattern violations are WARN
|
|
58
|
+
- `standard`: accessibility and anti-pattern violations are WARN; nothing blocks
|
|
59
|
+
- `permissive`: all design violations are INFO
|
|
60
|
+
3. Capture the result as `Design: [PASS/WARN/FAIL/SKIPPED]`.
|
|
61
|
+
4. If no `design` block exists in config, mark Design as `SKIPPED`.
|
|
62
|
+
|
|
63
|
+
The design check runs AFTER test/lint/typecheck. It does not short-circuit on earlier failures.
|
|
64
|
+
|
|
65
|
+
### Phase 3: REPORT
|
|
66
|
+
|
|
67
|
+
Output a structured result in this exact format:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
Verification: [PASS/FAIL]
|
|
71
|
+
- Typecheck: [PASS/FAIL/SKIPPED]
|
|
72
|
+
- Lint: [PASS/FAIL/SKIPPED]
|
|
73
|
+
- Test: [PASS/FAIL/SKIPPED]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
When design config is present, include the design line:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Verification: [PASS/FAIL]
|
|
80
|
+
- Typecheck: [PASS/FAIL/SKIPPED]
|
|
81
|
+
- Lint: [PASS/FAIL/SKIPPED]
|
|
82
|
+
- Test: [PASS/FAIL/SKIPPED]
|
|
83
|
+
- Design: [PASS/WARN/FAIL/SKIPPED]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Rules:
|
|
87
|
+
|
|
88
|
+
- Overall `Verification: PASS` only if all non-skipped checks passed.
|
|
89
|
+
- If all checks are SKIPPED, overall result is `PASS` (nothing to fail).
|
|
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
|
+
|
|
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
|
+
|
|
102
|
+
## Deterministic Checks
|
|
103
|
+
|
|
104
|
+
This skill is entirely deterministic. There are no LLM judgment calls anywhere in the process.
|
|
105
|
+
|
|
106
|
+
- Exit code 0 = PASS. Always.
|
|
107
|
+
- Exit code non-zero = FAIL. Always.
|
|
108
|
+
- No "it looks like this might be okay" reasoning. No interpretation of output.
|
|
109
|
+
- The same codebase with the same commands will always produce the same result.
|
|
110
|
+
|
|
111
|
+
## Harness Integration
|
|
112
|
+
|
|
113
|
+
- Follows Principle 7 (Deterministic-vs-LLM Split) — this skill is entirely deterministic
|
|
114
|
+
- Invoked as the final step by code-producing skills (harness-execution, harness-tdd)
|
|
115
|
+
- Complements harness-verification (deep audit) — use verify for quick checks, verification for milestones
|
|
116
|
+
- Output format is consumed by harness-integrity for the unified pipeline
|
|
117
|
+
- Invokes `harness-accessibility` for design constraint checking when `design` config exists
|
|
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.
|
|
120
|
+
|
|
121
|
+
## Success Criteria
|
|
122
|
+
|
|
123
|
+
- [ ] All detected commands were executed
|
|
124
|
+
- [ ] Report follows the structured format exactly
|
|
125
|
+
- [ ] Overall verdict correctly reflects individual results
|
|
126
|
+
- [ ] Failed checks include error output summary
|
|
127
|
+
|
|
128
|
+
## Examples
|
|
129
|
+
|
|
130
|
+
### Example: Node.js Project
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
Verification: PASS
|
|
134
|
+
- Types: PASS (no errors)
|
|
135
|
+
- Lint: PASS (0 warnings)
|
|
136
|
+
- Tests: PASS (42/42)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Example: Failing Project
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Verification: FAIL
|
|
143
|
+
- Types: FAIL (3 type errors in src/auth/login.ts)
|
|
144
|
+
- Lint: PASS
|
|
145
|
+
- Tests: NOT RUN
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Gates
|
|
149
|
+
|
|
150
|
+
- **No judgment calls.** The exit code is the only signal.
|
|
151
|
+
- **No skipping.** If a command is detected, it runs. Period.
|
|
152
|
+
- **Fresh execution only.** Do not cache results. Do not reuse previous runs. Execute the commands right now.
|
|
153
|
+
- **No file modifications.** This skill is read-only (plus command execution). It must not change the codebase.
|
|
154
|
+
|
|
155
|
+
## Escalation
|
|
156
|
+
|
|
157
|
+
- **Timeout:** Each command has a 120-second timeout. If a command exceeds this, mark it as FAIL with reason "TIMEOUT".
|
|
158
|
+
- **No commands detected:** If no typecheck, lint, or test commands can be detected, all three checks are SKIPPED and the overall result is PASS. Log a note that no verification commands were found.
|
|
159
|
+
- **Environment errors:** If a command fails due to missing tooling (e.g., `tsc` not installed), mark it as FAIL. Do not attempt to install the tooling.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: harness-verify
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Binary pass/fail quick gate — runs test, lint, typecheck commands and returns structured result
|
|
4
|
+
triggers:
|
|
5
|
+
- manual
|
|
6
|
+
- on_task_complete
|
|
7
|
+
platforms:
|
|
8
|
+
- claude-code
|
|
9
|
+
- gemini-cli
|
|
10
|
+
tools:
|
|
11
|
+
- Bash
|
|
12
|
+
- Read
|
|
13
|
+
- Glob
|
|
14
|
+
cli:
|
|
15
|
+
command: harness skill run harness-verify
|
|
16
|
+
args:
|
|
17
|
+
- name: path
|
|
18
|
+
description: Project root path
|
|
19
|
+
required: false
|
|
20
|
+
mcp:
|
|
21
|
+
tool: run_skill
|
|
22
|
+
input:
|
|
23
|
+
skill: harness-verify
|
|
24
|
+
path: string
|
|
25
|
+
type: rigid
|
|
26
|
+
cognitive_mode: meticulous-verifier
|
|
27
|
+
phases:
|
|
28
|
+
- name: detect
|
|
29
|
+
description: Auto-detect project commands from package.json, Makefile, or conventions
|
|
30
|
+
required: true
|
|
31
|
+
- name: execute
|
|
32
|
+
description: Run test, lint, typecheck commands
|
|
33
|
+
required: true
|
|
34
|
+
- name: report
|
|
35
|
+
description: Return structured pass/fail result
|
|
36
|
+
required: true
|
|
37
|
+
state:
|
|
38
|
+
persistent: false
|
|
39
|
+
files: []
|
|
40
|
+
depends_on: []
|