@harness-engineering/cli 1.13.1 → 1.14.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/skills/claude-code/harness-brainstorming/SKILL.md +39 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +44 -0
- package/dist/agents/skills/claude-code/harness-execution/SKILL.md +44 -0
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +39 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +3 -3
- package/dist/agents/skills/claude-code/harness-verification/SKILL.md +35 -0
- package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +11 -3
- package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +39 -0
- package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +44 -0
- package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +44 -0
- package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +39 -0
- package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +3 -3
- package/dist/agents/skills/gemini-cli/harness-verification/SKILL.md +35 -0
- package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +11 -3
- package/dist/agents-md-YTYQDA3P.js +8 -0
- package/dist/{architecture-2R5Z4ZAF.js → architecture-JQZYM4US.js} +4 -4
- package/dist/bin/harness-mcp.js +14 -14
- package/dist/bin/harness.js +24 -24
- package/dist/{check-phase-gate-2OFZ7OWW.js → check-phase-gate-L3RADYWO.js} +4 -4
- package/dist/{chunk-QY4T6YAZ.js → chunk-3C2MLBPJ.js} +4 -4
- package/dist/{chunk-UAX4I5ZE.js → chunk-6KTUUFRN.js} +2 -2
- package/dist/{chunk-ND6PNADU.js → chunk-7IP4JIFL.js} +9 -9
- package/dist/{chunk-C2ERUR3L.js → chunk-7MJAPE3Z.js} +165 -49
- package/dist/{chunk-PQ5YK4AY.js → chunk-ABQHQ6I5.js} +1583 -1169
- package/dist/{chunk-QPEH2QPG.js → chunk-DBSOCI3G.js} +53 -54
- package/dist/{chunk-MHBMTPW7.js → chunk-ERS5EVUZ.js} +9 -0
- package/dist/{chunk-JSTQ3AWB.js → chunk-FIAPHX37.js} +1 -1
- package/dist/{chunk-IMFVFNJE.js → chunk-FTMXDOR6.js} +1 -1
- package/dist/{chunk-72GHBOL2.js → chunk-GZKSBLQL.js} +1 -1
- package/dist/{chunk-K6XAPGML.js → chunk-H7Y5CKTM.js} +1 -1
- package/dist/{chunk-4ZMOCPYO.js → chunk-NLVUVUGD.js} +1 -1
- package/dist/{chunk-Z77YQRQT.js → chunk-O5OJVPL6.js} +16 -5
- package/dist/{chunk-NKDM3FMH.js → chunk-OD3S2NHN.js} +1 -1
- package/dist/{chunk-65FRIL4D.js → chunk-OSXBPAMK.js} +1 -1
- package/dist/{chunk-DZS7CJKL.js → chunk-OXLLOSSR.js} +45 -47
- package/dist/{chunk-TS3XWPW5.js → chunk-RCWZBSK5.js} +1 -1
- package/dist/{chunk-NOPU4RZ4.js → chunk-S2FXOWOR.js} +3 -3
- package/dist/{chunk-VUCPTQ6G.js → chunk-SD3SQOZ2.js} +1 -1
- package/dist/{chunk-IM32EEDM.js → chunk-TPOTOBR7.js} +9 -9
- package/dist/{chunk-SSKDAOX5.js → chunk-XKECDXJS.js} +436 -340
- package/dist/{chunk-TKJZKICB.js → chunk-YPYGXRDR.js} +7 -7
- package/dist/{chunk-Q6AB7W5Z.js → chunk-YQ6KC6TE.js} +1 -1
- package/dist/{chunk-NERR4TAO.js → chunk-YZD2MRNQ.js} +972 -747
- package/dist/ci-workflow-EQZFVX3P.js +8 -0
- package/dist/{dist-HXHWB7SV.js → dist-B26DFXMP.js} +571 -478
- package/dist/{dist-L7LAAQAS.js → dist-DZ63LLUD.js} +1 -1
- package/dist/{dist-2B363XUH.js → dist-HWXF2C3R.js} +18 -2
- package/dist/{dist-D4RYGUZE.js → dist-USY2C5JL.js} +3 -1
- package/dist/{docs-FZOPM4GK.js → docs-7ECGYMAV.js} +4 -4
- package/dist/engine-EG4EH4IX.js +8 -0
- package/dist/{entropy-LVHJMFGH.js → entropy-5USWKLVS.js} +3 -3
- package/dist/{feedback-IHLVLMRD.js → feedback-UTBXZZHF.js} +1 -1
- package/dist/{generate-agent-definitions-64S3CLEZ.js → generate-agent-definitions-3PM5EU7V.js} +4 -4
- package/dist/{graph-loader-GJZ4FN4Y.js → graph-loader-2M2HXDQI.js} +1 -1
- package/dist/index.d.ts +148 -9
- package/dist/index.js +24 -24
- package/dist/loader-ZPALXIVR.js +10 -0
- package/dist/{mcp-JQUI7BVZ.js → mcp-362EZHF4.js} +14 -14
- package/dist/{performance-ZTVSUANN.js → performance-OQAFMJUD.js} +3 -3
- package/dist/{review-pipeline-76JHKGSV.js → review-pipeline-C4GCFVGP.js} +1 -1
- package/dist/runtime-7YLVK453.js +9 -0
- package/dist/{security-FWQZF2IZ.js → security-PZOX7AQS.js} +1 -1
- package/dist/templates/axum/Cargo.toml.hbs +8 -0
- package/dist/templates/axum/src/main.rs +12 -0
- package/dist/templates/axum/template.json +16 -0
- package/dist/templates/django/manage.py.hbs +19 -0
- package/dist/templates/django/requirements.txt.hbs +1 -0
- package/dist/templates/django/src/settings.py.hbs +44 -0
- package/dist/templates/django/src/urls.py +6 -0
- package/dist/templates/django/src/wsgi.py.hbs +9 -0
- package/dist/templates/django/template.json +21 -0
- package/dist/templates/express/package.json.hbs +15 -0
- package/dist/templates/express/src/app.ts +12 -0
- package/dist/templates/express/src/lib/.gitkeep +0 -0
- package/dist/templates/express/template.json +16 -0
- package/dist/templates/fastapi/requirements.txt.hbs +2 -0
- package/dist/templates/fastapi/src/main.py +8 -0
- package/dist/templates/fastapi/template.json +20 -0
- package/dist/templates/gin/go.mod.hbs +5 -0
- package/dist/templates/gin/main.go +15 -0
- package/dist/templates/gin/template.json +19 -0
- package/dist/templates/go-base/.golangci.yml +16 -0
- package/dist/templates/go-base/AGENTS.md.hbs +35 -0
- package/dist/templates/go-base/go.mod.hbs +3 -0
- package/dist/templates/go-base/harness.config.json.hbs +17 -0
- package/dist/templates/go-base/main.go +7 -0
- package/dist/templates/go-base/template.json +14 -0
- package/dist/templates/java-base/AGENTS.md.hbs +35 -0
- package/dist/templates/java-base/checkstyle.xml +20 -0
- package/dist/templates/java-base/harness.config.json.hbs +16 -0
- package/dist/templates/java-base/pom.xml.hbs +39 -0
- package/dist/templates/java-base/src/main/java/App.java.hbs +5 -0
- package/dist/templates/java-base/template.json +13 -0
- package/dist/templates/nestjs/nest-cli.json +5 -0
- package/dist/templates/nestjs/package.json.hbs +18 -0
- package/dist/templates/nestjs/src/app.module.ts +8 -0
- package/dist/templates/nestjs/src/lib/.gitkeep +0 -0
- package/dist/templates/nestjs/src/main.ts +11 -0
- package/dist/templates/nestjs/template.json +16 -0
- package/dist/templates/nextjs/template.json +15 -1
- package/dist/templates/python-base/.python-version +1 -0
- package/dist/templates/python-base/AGENTS.md.hbs +32 -0
- package/dist/templates/python-base/harness.config.json.hbs +16 -0
- package/dist/templates/python-base/pyproject.toml.hbs +18 -0
- package/dist/templates/python-base/ruff.toml +5 -0
- package/dist/templates/python-base/src/__init__.py +0 -0
- package/dist/templates/python-base/template.json +13 -0
- package/dist/templates/react-vite/index.html +12 -0
- package/dist/templates/react-vite/package.json.hbs +18 -0
- package/dist/templates/react-vite/src/App.tsx +7 -0
- package/dist/templates/react-vite/src/lib/.gitkeep +0 -0
- package/dist/templates/react-vite/src/main.tsx +9 -0
- package/dist/templates/react-vite/template.json +19 -0
- package/dist/templates/react-vite/vite.config.ts +6 -0
- package/dist/templates/rust-base/AGENTS.md.hbs +35 -0
- package/dist/templates/rust-base/Cargo.toml.hbs +6 -0
- package/dist/templates/rust-base/clippy.toml +2 -0
- package/dist/templates/rust-base/harness.config.json.hbs +17 -0
- package/dist/templates/rust-base/src/main.rs +3 -0
- package/dist/templates/rust-base/template.json +14 -0
- package/dist/templates/spring-boot/pom.xml.hbs +50 -0
- package/dist/templates/spring-boot/src/main/java/Application.java.hbs +19 -0
- package/dist/templates/spring-boot/template.json +15 -0
- package/dist/templates/vue/index.html +12 -0
- package/dist/templates/vue/package.json.hbs +16 -0
- package/dist/templates/vue/src/App.vue +7 -0
- package/dist/templates/vue/src/lib/.gitkeep +0 -0
- package/dist/templates/vue/src/main.ts +4 -0
- package/dist/templates/vue/template.json +19 -0
- package/dist/templates/vue/vite.config.ts +6 -0
- package/dist/{validate-GCHZJIL7.js → validate-FD3Z6VJD.js} +4 -4
- package/dist/validate-cross-check-WNJM6H2D.js +8 -0
- package/package.json +5 -5
- package/dist/agents-md-XU3BHE22.js +0 -8
- package/dist/ci-workflow-EHV65NQB.js +0 -8
- package/dist/engine-OL4T6NZS.js +0 -8
- package/dist/loader-DPYFB6R6.js +0 -10
- package/dist/runtime-X7U6SC7K.js +0 -9
- package/dist/validate-cross-check-STFHYMAZ.js +0 -8
|
@@ -259,6 +259,45 @@ For each proposed approach, evaluate from each perspective:
|
|
|
259
259
|
|
|
260
260
|
Converge on a recommendation that addresses all concerns before presenting the design.
|
|
261
261
|
|
|
262
|
+
## Session State
|
|
263
|
+
|
|
264
|
+
This skill reads and writes to the following session sections via `manage_state`:
|
|
265
|
+
|
|
266
|
+
| Section | Read | Write | Purpose |
|
|
267
|
+
| ------------- | ---- | ----- | ----------------------------------------------------------------- |
|
|
268
|
+
| terminology | yes | yes | Captures domain terms discovered during brainstorming |
|
|
269
|
+
| decisions | no | yes | Records design decisions made during exploration |
|
|
270
|
+
| constraints | yes | no | Reads constraints to scope brainstorming |
|
|
271
|
+
| risks | no | yes | Captures risks identified during brainstorming |
|
|
272
|
+
| openQuestions | yes | yes | Adds new questions, resolves answered ones |
|
|
273
|
+
| evidence | no | yes | Cites sources for design recommendations and prior art references |
|
|
274
|
+
|
|
275
|
+
**When to write:** After each phase transition (EXPLORE -> EVALUATE -> PRIORITIZE -> VALIDATE), append relevant entries to the appropriate sections. This ensures downstream skills (planning, execution) inherit accumulated context without re-discovery.
|
|
276
|
+
|
|
277
|
+
**When to read:** At the start of Phase 1 (EXPLORE), read `terminology` and `constraints` from the session to inherit context from prior skills or previous brainstorming sessions on the same feature.
|
|
278
|
+
|
|
279
|
+
## Evidence Requirements
|
|
280
|
+
|
|
281
|
+
When this skill makes claims about existing code behavior, architecture patterns, or technical tradeoffs, it MUST cite evidence using one of:
|
|
282
|
+
|
|
283
|
+
1. **File reference:** `file:line` format (e.g., `src/services/auth.ts:42` -- "existing JWT middleware handles token refresh")
|
|
284
|
+
2. **Prior art reference:** `file` format with description (e.g., `src/utils/email.ts` -- "email utility already exists, can be reused for notifications")
|
|
285
|
+
3. **Documentation reference:** `docs/path` format (e.g., `docs/changes/user-auth/proposal.md` -- "prior spec established OAuth2 as the auth standard")
|
|
286
|
+
4. **Session evidence:** Write to the `evidence` session section:
|
|
287
|
+
```json
|
|
288
|
+
manage_state({
|
|
289
|
+
action: "append_entry",
|
|
290
|
+
session: "<current-session>",
|
|
291
|
+
section: "evidence",
|
|
292
|
+
authorSkill: "harness-brainstorming",
|
|
293
|
+
content: "src/services/auth.ts:42 -- existing JWT middleware supports refresh tokens"
|
|
294
|
+
})
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**When to cite:** During Phase 1 (EXPLORE) when referencing existing code or patterns. During Phase 3 (PRIORITIZE) when justifying tradeoffs with concrete code references. During Phase 4 (VALIDATE) when spec references existing implementation details.
|
|
298
|
+
|
|
299
|
+
**Uncited claims:** Technical assertions without citations MUST be prefixed with `[UNVERIFIED]`. Example: `[UNVERIFIED] The current auth middleware does not support refresh tokens`. Uncited claims are flagged during review (Wave 2.2).
|
|
300
|
+
|
|
262
301
|
## Harness Integration
|
|
263
302
|
|
|
264
303
|
- **`harness validate`** — Run after writing the spec to `docs/`. Verifies project health and that the new spec file is properly placed.
|
|
@@ -138,6 +138,24 @@ Run mechanical checks to establish an exclusion boundary. Any issue caught mecha
|
|
|
138
138
|
|
|
139
139
|
**Output:** A set of mechanical findings (file, line, tool, message). This set becomes the exclusion list for Phase 5.
|
|
140
140
|
|
|
141
|
+
#### Evidence Gate (session-aware)
|
|
142
|
+
|
|
143
|
+
When a `sessionSlug` is available (e.g., via autopilot dispatch or `--session` flag), the pipeline loads evidence entries from the session state and cross-references them with review findings:
|
|
144
|
+
|
|
145
|
+
1. Load evidence entries: `readSessionSection(projectRoot, sessionSlug, 'evidence')`
|
|
146
|
+
2. For each finding, check if any active evidence entry references the same file:line location
|
|
147
|
+
3. Findings without matching evidence are tagged with `[UNVERIFIED]` prefix in their title
|
|
148
|
+
4. An evidence coverage report is appended to the review output:
|
|
149
|
+
```
|
|
150
|
+
Evidence Coverage:
|
|
151
|
+
Evidence entries: 12
|
|
152
|
+
Findings with evidence: 8/10
|
|
153
|
+
Uncited findings: 2 (flagged as [UNVERIFIED])
|
|
154
|
+
Coverage: 80%
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
When no session is available, evidence checking is skipped silently. This is not an error -- evidence checking enhances reviews but does not gate them.
|
|
158
|
+
|
|
141
159
|
**Exit:** If any mechanical check fails (harness validate, typecheck, or tests), report the mechanical failures in Strengths/Issues/Assessment format and stop the pipeline. The code has fundamental issues that must be fixed before AI review adds value. Lint warnings and security scan findings do not stop the pipeline — they are recorded for exclusion only.
|
|
142
160
|
|
|
143
161
|
---
|
|
@@ -628,6 +646,32 @@ _This section is not part of the pipeline. It documents the process for respondi
|
|
|
628
646
|
|
|
629
647
|
---
|
|
630
648
|
|
|
649
|
+
## Evidence Requirements
|
|
650
|
+
|
|
651
|
+
When this skill produces review findings, every finding MUST include evidence citations. The `ReviewFinding.evidence` array field already exists in the finding schema -- this section defines the citation standard for populating it.
|
|
652
|
+
|
|
653
|
+
Every review finding MUST cite evidence using one of:
|
|
654
|
+
|
|
655
|
+
1. **File reference:** `file:line` format (e.g., `src/api/routes/users.ts:12-15` -- "direct import from db/queries.ts bypasses service layer")
|
|
656
|
+
2. **Diff evidence:** Before/after code from the PR diff with file path and line numbers
|
|
657
|
+
3. **Dependency chain:** Import path showing the violation (e.g., `routes/users.ts:3 imports db/queries.ts` -- "violates routes -> services -> db layer direction")
|
|
658
|
+
4. **Test evidence:** Include test command and output when findings relate to missing or failing tests
|
|
659
|
+
5. **Convention reference:** Cite the specific convention file and rule (e.g., `AGENTS.md:45` -- "convention requires services layer between routes and db")
|
|
660
|
+
6. **Session evidence:** Write significant findings to the `evidence` session section:
|
|
661
|
+
```json
|
|
662
|
+
manage_state({
|
|
663
|
+
action: "append_entry",
|
|
664
|
+
session: "<current-session>",
|
|
665
|
+
section: "evidence",
|
|
666
|
+
authorSkill: "harness-code-review",
|
|
667
|
+
content: "src/api/routes/users.ts:12-15 -- layer violation: direct import from db/queries.ts"
|
|
668
|
+
})
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
**When to cite:** In Phase 4 (FAN-OUT), each subagent populates the `evidence` array in every `ReviewFinding`. In Phase 5 (VALIDATE), evidence is used to verify reachability claims. In Phase 7 (OUTPUT), every issue in the review includes its file:line location and rationale backed by evidence.
|
|
672
|
+
|
|
673
|
+
**Uncited claims:** Review findings without evidence in the `evidence` array are discarded during Phase 5 (VALIDATE). Observations that cannot be tied to specific file:line references MUST be prefixed with `[UNVERIFIED]` and downgraded to `severity: 'suggestion'`.
|
|
674
|
+
|
|
631
675
|
## Harness Integration
|
|
632
676
|
|
|
633
677
|
- **`assess_project`** — Used in Phase 2 (MECHANICAL) to run `validate`, `deps`, and `docs` checks in parallel. Must pass for the pipeline to continue to AI review. Failures are Critical issues that stop the pipeline.
|
|
@@ -345,6 +345,50 @@ These are non-negotiable. When any condition is met, stop immediately.
|
|
|
345
345
|
|
|
346
346
|
- **Three consecutive failures on the same task.** After 3 attempts, the task design is likely wrong. Stop. Report: "Task N has failed 3 times. Root cause: [analysis]. The plan may need revision."
|
|
347
347
|
|
|
348
|
+
## Session State
|
|
349
|
+
|
|
350
|
+
This skill reads and writes to the following session sections via `manage_state`:
|
|
351
|
+
|
|
352
|
+
| Section | Read | Write | Purpose |
|
|
353
|
+
| ------------- | ---- | ----- | ------------------------------------------------------------------------------------- |
|
|
354
|
+
| terminology | yes | yes | Reads domain terms for consistent naming; adds terms discovered during implementation |
|
|
355
|
+
| decisions | yes | yes | Reads planning decisions for context; records implementation decisions |
|
|
356
|
+
| constraints | yes | yes | Reads constraints to respect boundaries; adds constraints discovered during coding |
|
|
357
|
+
| risks | yes | yes | Reads risks for awareness; updates risk status as mitigated or realized |
|
|
358
|
+
| openQuestions | yes | yes | Reads questions for context; resolves questions answered by implementation |
|
|
359
|
+
| evidence | yes | yes | Reads prior evidence; writes file:line citations, test outputs, and diff references |
|
|
360
|
+
|
|
361
|
+
**When to write:** After each task completion, append relevant entries. Evidence entries should be written for every significant technical assertion (test result, file reference, performance measurement). Mark openQuestions as resolved when implementation answers them.
|
|
362
|
+
|
|
363
|
+
**When to read:** During Phase 1 (PREPARE), read all sections via `gather_context` with `include: ["sessions"]` to inherit full accumulated context from brainstorming and planning.
|
|
364
|
+
|
|
365
|
+
## Evidence Requirements
|
|
366
|
+
|
|
367
|
+
When this skill makes claims about task completion, test results, or code behavior, it MUST cite evidence using one of:
|
|
368
|
+
|
|
369
|
+
1. **File reference:** `file:line` format (e.g., `src/services/notification-service.ts:42` -- "create method implemented with validation")
|
|
370
|
+
2. **Test output:** Include the actual test command and its output:
|
|
371
|
+
```
|
|
372
|
+
$ npx vitest run src/services/notification-service.test.ts
|
|
373
|
+
PASS src/services/notification-service.test.ts (8 tests)
|
|
374
|
+
```
|
|
375
|
+
3. **Diff evidence:** Before/after with file path for modifications to existing files
|
|
376
|
+
4. **Harness output:** Include `harness validate` output as evidence of project health
|
|
377
|
+
5. **Session evidence:** Write to the `evidence` session section after each task:
|
|
378
|
+
```json
|
|
379
|
+
manage_state({
|
|
380
|
+
action: "append_entry",
|
|
381
|
+
session: "<current-session>",
|
|
382
|
+
section: "evidence",
|
|
383
|
+
authorSkill: "harness-execution",
|
|
384
|
+
content: "src/services/notification-service.ts:42 -- create method returns Notification with all required fields"
|
|
385
|
+
})
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
**When to cite:** After every task completion in Phase 2 (EXECUTE). Every commit message claim ("added X", "fixed Y") must be backed by test output or file reference. During Phase 4 (PERSIST) when writing learnings that reference specific code behavior.
|
|
389
|
+
|
|
390
|
+
**Uncited claims:** Technical assertions without citations MUST be prefixed with `[UNVERIFIED]`. Example: `[UNVERIFIED] The notification service handles duplicate entries`. Uncited claims are flagged during review (Wave 2.2).
|
|
391
|
+
|
|
348
392
|
## Harness Integration
|
|
349
393
|
|
|
350
394
|
- **`harness validate`** — Run after every task completion. Mandatory. No task is complete without a passing validation.
|
|
@@ -312,6 +312,45 @@ One sentence.
|
|
|
312
312
|
|
|
313
313
|
````
|
|
314
314
|
|
|
315
|
+
## Session State
|
|
316
|
+
|
|
317
|
+
This skill reads and writes to the following session sections via `manage_state`:
|
|
318
|
+
|
|
319
|
+
| Section | Read | Write | Purpose |
|
|
320
|
+
|---------|------|-------|---------|
|
|
321
|
+
| terminology | yes | no | Reads domain terms to use consistent language in plan |
|
|
322
|
+
| decisions | yes | yes | Reads brainstorming decisions; records planning-phase decisions |
|
|
323
|
+
| constraints | yes | yes | Reads existing constraints; adds constraints discovered during decomposition |
|
|
324
|
+
| risks | yes | yes | Reads existing risks; adds implementation risks identified during task design |
|
|
325
|
+
| openQuestions | yes | yes | Reads unresolved questions; adds new questions, resolves answered ones |
|
|
326
|
+
| evidence | yes | yes | Reads prior evidence from brainstorming; writes file:line citations for task specifications |
|
|
327
|
+
|
|
328
|
+
**When to write:** During Phase 1 (SCOPE) write newly discovered constraints and risks. During Phase 2 (DECOMPOSE) write decisions about task structure and sequencing. Mark resolved questions during Phase 4 (VALIDATE).
|
|
329
|
+
|
|
330
|
+
**When to read:** At the start of Phase 1 (SCOPE), read all sections via `gather_context` with `include: ["sessions"]` to inherit context from brainstorming. Use terminology for consistent naming in task descriptions.
|
|
331
|
+
|
|
332
|
+
## Evidence Requirements
|
|
333
|
+
|
|
334
|
+
When this skill makes claims about existing code structure, file locations, or implementation patterns in task specifications, it MUST cite evidence using one of:
|
|
335
|
+
|
|
336
|
+
1. **File reference:** `file:line` format (e.g., `src/services/index.ts:15` -- "barrel export exists, will add new export here")
|
|
337
|
+
2. **Code pattern reference:** `file:line` format with pattern description (e.g., `src/services/user-service.ts:1-30` -- "existing service follows constructor injection pattern, new service will match")
|
|
338
|
+
3. **Test output:** Include the command and its observed output when referencing current test state
|
|
339
|
+
4. **Session evidence:** Write to the `evidence` session section:
|
|
340
|
+
```json
|
|
341
|
+
manage_state({
|
|
342
|
+
action: "append_entry",
|
|
343
|
+
session: "<current-session>",
|
|
344
|
+
section: "evidence",
|
|
345
|
+
authorSkill: "harness-planning",
|
|
346
|
+
content: "src/services/index.ts:15 -- barrel export pattern confirmed for new service integration"
|
|
347
|
+
})
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**When to cite:** During Phase 1 (SCOPE) when referencing existing files for observable truths. During Phase 2 (DECOMPOSE) when specifying exact file paths and code patterns in task instructions. When the file map references existing files for modification.
|
|
351
|
+
|
|
352
|
+
**Uncited claims:** Technical assertions about existing code without citations MUST be prefixed with `[UNVERIFIED]`. Example: `[UNVERIFIED] The service barrel exports all services`. Uncited claims are flagged during review (Wave 2.2).
|
|
353
|
+
|
|
315
354
|
## Harness Integration
|
|
316
355
|
|
|
317
356
|
- **`harness validate`** — Run during Phase 4 (before writing the plan) and included as a step in every task.
|
|
@@ -111,14 +111,14 @@ Run every check below. Record each as **pass**, **warn**, or **fail**:
|
|
|
111
111
|
| `test` script exists in root `package.json` | fail |
|
|
112
112
|
| `lint` script exists in root `package.json` | fail |
|
|
113
113
|
| `typecheck` or `tsc` script exists in root `package.json` | fail |
|
|
114
|
-
| `assess_project` passes (harness
|
|
114
|
+
| `assess_project` passes (full harness CI gate) | fail |
|
|
115
115
|
|
|
116
116
|
For the `assess_project` check, run it with all harness-specific checks including lint:
|
|
117
117
|
|
|
118
118
|
```json
|
|
119
119
|
assess_project({
|
|
120
120
|
path: "<project-root>",
|
|
121
|
-
checks: ["validate", "deps", "docs", "lint"],
|
|
121
|
+
checks: ["validate", "deps", "docs", "lint", "perf", "security", "entropy", "arch"],
|
|
122
122
|
mode: "detailed"
|
|
123
123
|
})
|
|
124
124
|
```
|
|
@@ -519,7 +519,7 @@ This framing is informational — it does not block anything. It gives the team
|
|
|
519
519
|
|
|
520
520
|
## Harness Integration
|
|
521
521
|
|
|
522
|
-
- **`assess_project`** — Used in AUDIT Phase 1 (CI/CD section) to run harness validation,
|
|
522
|
+
- **`assess_project`** — Used in AUDIT Phase 1 (CI/CD section) to run the full harness CI gate (validation, dependencies, docs, lint, performance/complexity, security, entropy, and architecture) in a single parallel call. Also run after auto-fixes in Phase 3 to verify project health. Automatically inherits new checks added to `assess_project`.
|
|
523
523
|
- **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`.
|
|
524
524
|
- **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.
|
|
525
525
|
- **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.
|
|
@@ -291,6 +291,41 @@ When verifying a bug fix, apply this extended protocol:
|
|
|
291
291
|
|
|
292
292
|
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.
|
|
293
293
|
|
|
294
|
+
## Evidence Requirements
|
|
295
|
+
|
|
296
|
+
This skill is the primary evidence producer in the workflow. Every pass/fail assertion in the verification report MUST include concrete evidence. The words "should", "probably", and "seems to" are already forbidden by the Iron Law -- this section defines HOW to cite evidence.
|
|
297
|
+
|
|
298
|
+
Every verification claim MUST use one of:
|
|
299
|
+
|
|
300
|
+
1. **File reference:** `file:line` format with observed content (e.g., `src/services/user-service.ts:42` -- "create method validates email format before insert")
|
|
301
|
+
2. **Test output:** Include the actual test command and its complete output:
|
|
302
|
+
```
|
|
303
|
+
$ npx vitest run src/services/user-service.test.ts
|
|
304
|
+
PASS src/services/user-service.test.ts
|
|
305
|
+
UserService
|
|
306
|
+
create (4 tests)
|
|
307
|
+
list (3 tests)
|
|
308
|
+
expiry (2 tests)
|
|
309
|
+
Tests: 9 passed, 9 total
|
|
310
|
+
```
|
|
311
|
+
3. **Harness output:** Include full `harness validate` and `harness check-deps` output
|
|
312
|
+
4. **Anti-pattern scan output:** Include the actual grep/search command and results (or absence of results)
|
|
313
|
+
5. **Import chain evidence:** Include the actual import statements found when verifying WIRED level
|
|
314
|
+
6. **Session evidence:** Write to the `evidence` session section for each verification level:
|
|
315
|
+
```json
|
|
316
|
+
manage_state({
|
|
317
|
+
action: "append_entry",
|
|
318
|
+
session: "<current-session>",
|
|
319
|
+
section: "evidence",
|
|
320
|
+
authorSkill: "harness-verification",
|
|
321
|
+
content: "[EXISTS:PASS] src/services/user-service.ts (189 lines) -- verified via direct file read"
|
|
322
|
+
})
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
**When to cite:** At every verification level. Level 1 (EXISTS) cites file reads. Level 2 (SUBSTANTIVE) cites specific line content. Level 3 (WIRED) cites import statements, test execution output, and harness check output. The verification report format already requires `[PASS]`/`[FAIL]` markers -- each marker must be accompanied by the evidence that produced it.
|
|
326
|
+
|
|
327
|
+
**Uncited claims:** ANY verification assertion without direct evidence is a verification failure, not merely an uncited claim. This skill does not use `[UNVERIFIED]` -- if evidence cannot be produced, the verdict is FAIL or INCOMPLETE.
|
|
328
|
+
|
|
294
329
|
## Harness Integration
|
|
295
330
|
|
|
296
331
|
- **`harness validate`** — Run in Level 3 WIRED check. Verifies project-wide health and constraint compliance.
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
2. **For new projects:** Gather project context — language, framework, test runner, build tool. Ask the human if any of these are undecided. Do not assume defaults.
|
|
22
22
|
|
|
23
|
+
2b. **For existing projects with detectable frameworks:** Run `harness init` without flags first. The command auto-detects frameworks (FastAPI, Django, Gin, Axum, Spring Boot, Next.js, React+Vite, Vue, Express, NestJS) by scanning project files. Present the detection result to the human and ask for confirmation before proceeding. If detection fails, ask the human to specify `--framework` manually.
|
|
24
|
+
|
|
23
25
|
3. **For existing projects:** Run `harness validate` to see what is already configured and what is missing. Read `AGENTS.md` if it exists. Identify the current adoption level:
|
|
24
26
|
- **Basic:** Has `AGENTS.md` and `harness.yaml` with project metadata. No layers, no skills, no dependency constraints.
|
|
25
27
|
- **Intermediate:** Has layers defined, dependency constraints between layers, at least one custom skill. `harness check-deps` runs and passes.
|
|
@@ -30,11 +32,17 @@
|
|
|
30
32
|
### Phase 2: SCAFFOLD — Generate Project Structure
|
|
31
33
|
|
|
32
34
|
1. **Run `harness init` with the appropriate flags:**
|
|
33
|
-
- New basic project: `harness init --level basic
|
|
34
|
-
-
|
|
35
|
+
- New basic JS/TS project: `harness init --level basic`
|
|
36
|
+
- With framework: `harness init --level basic --framework <framework>`
|
|
37
|
+
- Non-JS language: `harness init --language <python|go|rust|java>`
|
|
38
|
+
- Non-JS with framework: `harness init --framework <fastapi|django|gin|axum|spring-boot>`
|
|
39
|
+
- Existing project (auto-detect): `harness init` (no flags -- auto-detection runs)
|
|
35
40
|
- Migration to intermediate: `harness init --level intermediate --migrate`
|
|
36
41
|
- Migration to advanced: `harness init --level advanced --migrate`
|
|
37
42
|
|
|
43
|
+
**Supported frameworks:** nextjs, react-vite, vue, express, nestjs, fastapi, django, gin, axum, spring-boot
|
|
44
|
+
**Supported languages:** typescript, python, go, rust, java
|
|
45
|
+
|
|
38
46
|
2. **Review generated files.** `harness init` creates:
|
|
39
47
|
- `harness.yaml` — Project configuration (name, stack, adoption level)
|
|
40
48
|
- `.harness/` directory — State and learnings storage
|
|
@@ -93,7 +101,7 @@ This creates the `.harness/graph/` directory and populates it with the project's
|
|
|
93
101
|
|
|
94
102
|
## Harness Integration
|
|
95
103
|
|
|
96
|
-
- **`harness init --level <level> --framework <framework
|
|
104
|
+
- **`harness init --level <level> [--framework <framework>] [--language <language>]`** — Scaffold a new project. `--framework` infers language automatically. `--language` without `--framework` gives a bare language scaffold. Running without flags on an existing project directory triggers auto-detection.
|
|
97
105
|
- **`harness init --level <level> --migrate`** — Migrate an existing project to the next adoption level, preserving existing configuration.
|
|
98
106
|
- **`harness persona generate`** — Generate persona definitions based on project stack and team structure.
|
|
99
107
|
- **`harness validate`** — Verify the full project configuration is valid and complete.
|
|
@@ -259,6 +259,45 @@ For each proposed approach, evaluate from each perspective:
|
|
|
259
259
|
|
|
260
260
|
Converge on a recommendation that addresses all concerns before presenting the design.
|
|
261
261
|
|
|
262
|
+
## Session State
|
|
263
|
+
|
|
264
|
+
This skill reads and writes to the following session sections via `manage_state`:
|
|
265
|
+
|
|
266
|
+
| Section | Read | Write | Purpose |
|
|
267
|
+
| ------------- | ---- | ----- | ----------------------------------------------------------------- |
|
|
268
|
+
| terminology | yes | yes | Captures domain terms discovered during brainstorming |
|
|
269
|
+
| decisions | no | yes | Records design decisions made during exploration |
|
|
270
|
+
| constraints | yes | no | Reads constraints to scope brainstorming |
|
|
271
|
+
| risks | no | yes | Captures risks identified during brainstorming |
|
|
272
|
+
| openQuestions | yes | yes | Adds new questions, resolves answered ones |
|
|
273
|
+
| evidence | no | yes | Cites sources for design recommendations and prior art references |
|
|
274
|
+
|
|
275
|
+
**When to write:** After each phase transition (EXPLORE -> EVALUATE -> PRIORITIZE -> VALIDATE), append relevant entries to the appropriate sections. This ensures downstream skills (planning, execution) inherit accumulated context without re-discovery.
|
|
276
|
+
|
|
277
|
+
**When to read:** At the start of Phase 1 (EXPLORE), read `terminology` and `constraints` from the session to inherit context from prior skills or previous brainstorming sessions on the same feature.
|
|
278
|
+
|
|
279
|
+
## Evidence Requirements
|
|
280
|
+
|
|
281
|
+
When this skill makes claims about existing code behavior, architecture patterns, or technical tradeoffs, it MUST cite evidence using one of:
|
|
282
|
+
|
|
283
|
+
1. **File reference:** `file:line` format (e.g., `src/services/auth.ts:42` -- "existing JWT middleware handles token refresh")
|
|
284
|
+
2. **Prior art reference:** `file` format with description (e.g., `src/utils/email.ts` -- "email utility already exists, can be reused for notifications")
|
|
285
|
+
3. **Documentation reference:** `docs/path` format (e.g., `docs/changes/user-auth/proposal.md` -- "prior spec established OAuth2 as the auth standard")
|
|
286
|
+
4. **Session evidence:** Write to the `evidence` session section:
|
|
287
|
+
```json
|
|
288
|
+
manage_state({
|
|
289
|
+
action: "append_entry",
|
|
290
|
+
session: "<current-session>",
|
|
291
|
+
section: "evidence",
|
|
292
|
+
authorSkill: "harness-brainstorming",
|
|
293
|
+
content: "src/services/auth.ts:42 -- existing JWT middleware supports refresh tokens"
|
|
294
|
+
})
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**When to cite:** During Phase 1 (EXPLORE) when referencing existing code or patterns. During Phase 3 (PRIORITIZE) when justifying tradeoffs with concrete code references. During Phase 4 (VALIDATE) when spec references existing implementation details.
|
|
298
|
+
|
|
299
|
+
**Uncited claims:** Technical assertions without citations MUST be prefixed with `[UNVERIFIED]`. Example: `[UNVERIFIED] The current auth middleware does not support refresh tokens`. Uncited claims are flagged during review (Wave 2.2).
|
|
300
|
+
|
|
262
301
|
## Harness Integration
|
|
263
302
|
|
|
264
303
|
- **`harness validate`** — Run after writing the spec to `docs/`. Verifies project health and that the new spec file is properly placed.
|
|
@@ -138,6 +138,24 @@ Run mechanical checks to establish an exclusion boundary. Any issue caught mecha
|
|
|
138
138
|
|
|
139
139
|
**Output:** A set of mechanical findings (file, line, tool, message). This set becomes the exclusion list for Phase 5.
|
|
140
140
|
|
|
141
|
+
#### Evidence Gate (session-aware)
|
|
142
|
+
|
|
143
|
+
When a `sessionSlug` is available (e.g., via autopilot dispatch or `--session` flag), the pipeline loads evidence entries from the session state and cross-references them with review findings:
|
|
144
|
+
|
|
145
|
+
1. Load evidence entries: `readSessionSection(projectRoot, sessionSlug, 'evidence')`
|
|
146
|
+
2. For each finding, check if any active evidence entry references the same file:line location
|
|
147
|
+
3. Findings without matching evidence are tagged with `[UNVERIFIED]` prefix in their title
|
|
148
|
+
4. An evidence coverage report is appended to the review output:
|
|
149
|
+
```
|
|
150
|
+
Evidence Coverage:
|
|
151
|
+
Evidence entries: 12
|
|
152
|
+
Findings with evidence: 8/10
|
|
153
|
+
Uncited findings: 2 (flagged as [UNVERIFIED])
|
|
154
|
+
Coverage: 80%
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
When no session is available, evidence checking is skipped silently. This is not an error -- evidence checking enhances reviews but does not gate them.
|
|
158
|
+
|
|
141
159
|
**Exit:** If any mechanical check fails (harness validate, typecheck, or tests), report the mechanical failures in Strengths/Issues/Assessment format and stop the pipeline. The code has fundamental issues that must be fixed before AI review adds value. Lint warnings and security scan findings do not stop the pipeline — they are recorded for exclusion only.
|
|
142
160
|
|
|
143
161
|
---
|
|
@@ -628,6 +646,32 @@ _This section is not part of the pipeline. It documents the process for respondi
|
|
|
628
646
|
|
|
629
647
|
---
|
|
630
648
|
|
|
649
|
+
## Evidence Requirements
|
|
650
|
+
|
|
651
|
+
When this skill produces review findings, every finding MUST include evidence citations. The `ReviewFinding.evidence` array field already exists in the finding schema -- this section defines the citation standard for populating it.
|
|
652
|
+
|
|
653
|
+
Every review finding MUST cite evidence using one of:
|
|
654
|
+
|
|
655
|
+
1. **File reference:** `file:line` format (e.g., `src/api/routes/users.ts:12-15` -- "direct import from db/queries.ts bypasses service layer")
|
|
656
|
+
2. **Diff evidence:** Before/after code from the PR diff with file path and line numbers
|
|
657
|
+
3. **Dependency chain:** Import path showing the violation (e.g., `routes/users.ts:3 imports db/queries.ts` -- "violates routes -> services -> db layer direction")
|
|
658
|
+
4. **Test evidence:** Include test command and output when findings relate to missing or failing tests
|
|
659
|
+
5. **Convention reference:** Cite the specific convention file and rule (e.g., `AGENTS.md:45` -- "convention requires services layer between routes and db")
|
|
660
|
+
6. **Session evidence:** Write significant findings to the `evidence` session section:
|
|
661
|
+
```json
|
|
662
|
+
manage_state({
|
|
663
|
+
action: "append_entry",
|
|
664
|
+
session: "<current-session>",
|
|
665
|
+
section: "evidence",
|
|
666
|
+
authorSkill: "harness-code-review",
|
|
667
|
+
content: "src/api/routes/users.ts:12-15 -- layer violation: direct import from db/queries.ts"
|
|
668
|
+
})
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
**When to cite:** In Phase 4 (FAN-OUT), each subagent populates the `evidence` array in every `ReviewFinding`. In Phase 5 (VALIDATE), evidence is used to verify reachability claims. In Phase 7 (OUTPUT), every issue in the review includes its file:line location and rationale backed by evidence.
|
|
672
|
+
|
|
673
|
+
**Uncited claims:** Review findings without evidence in the `evidence` array are discarded during Phase 5 (VALIDATE). Observations that cannot be tied to specific file:line references MUST be prefixed with `[UNVERIFIED]` and downgraded to `severity: 'suggestion'`.
|
|
674
|
+
|
|
631
675
|
## Harness Integration
|
|
632
676
|
|
|
633
677
|
- **`assess_project`** — Used in Phase 2 (MECHANICAL) to run `validate`, `deps`, and `docs` checks in parallel. Must pass for the pipeline to continue to AI review. Failures are Critical issues that stop the pipeline.
|
|
@@ -345,6 +345,50 @@ These are non-negotiable. When any condition is met, stop immediately.
|
|
|
345
345
|
|
|
346
346
|
- **Three consecutive failures on the same task.** After 3 attempts, the task design is likely wrong. Stop. Report: "Task N has failed 3 times. Root cause: [analysis]. The plan may need revision."
|
|
347
347
|
|
|
348
|
+
## Session State
|
|
349
|
+
|
|
350
|
+
This skill reads and writes to the following session sections via `manage_state`:
|
|
351
|
+
|
|
352
|
+
| Section | Read | Write | Purpose |
|
|
353
|
+
| ------------- | ---- | ----- | ------------------------------------------------------------------------------------- |
|
|
354
|
+
| terminology | yes | yes | Reads domain terms for consistent naming; adds terms discovered during implementation |
|
|
355
|
+
| decisions | yes | yes | Reads planning decisions for context; records implementation decisions |
|
|
356
|
+
| constraints | yes | yes | Reads constraints to respect boundaries; adds constraints discovered during coding |
|
|
357
|
+
| risks | yes | yes | Reads risks for awareness; updates risk status as mitigated or realized |
|
|
358
|
+
| openQuestions | yes | yes | Reads questions for context; resolves questions answered by implementation |
|
|
359
|
+
| evidence | yes | yes | Reads prior evidence; writes file:line citations, test outputs, and diff references |
|
|
360
|
+
|
|
361
|
+
**When to write:** After each task completion, append relevant entries. Evidence entries should be written for every significant technical assertion (test result, file reference, performance measurement). Mark openQuestions as resolved when implementation answers them.
|
|
362
|
+
|
|
363
|
+
**When to read:** During Phase 1 (PREPARE), read all sections via `gather_context` with `include: ["sessions"]` to inherit full accumulated context from brainstorming and planning.
|
|
364
|
+
|
|
365
|
+
## Evidence Requirements
|
|
366
|
+
|
|
367
|
+
When this skill makes claims about task completion, test results, or code behavior, it MUST cite evidence using one of:
|
|
368
|
+
|
|
369
|
+
1. **File reference:** `file:line` format (e.g., `src/services/notification-service.ts:42` -- "create method implemented with validation")
|
|
370
|
+
2. **Test output:** Include the actual test command and its output:
|
|
371
|
+
```
|
|
372
|
+
$ npx vitest run src/services/notification-service.test.ts
|
|
373
|
+
PASS src/services/notification-service.test.ts (8 tests)
|
|
374
|
+
```
|
|
375
|
+
3. **Diff evidence:** Before/after with file path for modifications to existing files
|
|
376
|
+
4. **Harness output:** Include `harness validate` output as evidence of project health
|
|
377
|
+
5. **Session evidence:** Write to the `evidence` session section after each task:
|
|
378
|
+
```json
|
|
379
|
+
manage_state({
|
|
380
|
+
action: "append_entry",
|
|
381
|
+
session: "<current-session>",
|
|
382
|
+
section: "evidence",
|
|
383
|
+
authorSkill: "harness-execution",
|
|
384
|
+
content: "src/services/notification-service.ts:42 -- create method returns Notification with all required fields"
|
|
385
|
+
})
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
**When to cite:** After every task completion in Phase 2 (EXECUTE). Every commit message claim ("added X", "fixed Y") must be backed by test output or file reference. During Phase 4 (PERSIST) when writing learnings that reference specific code behavior.
|
|
389
|
+
|
|
390
|
+
**Uncited claims:** Technical assertions without citations MUST be prefixed with `[UNVERIFIED]`. Example: `[UNVERIFIED] The notification service handles duplicate entries`. Uncited claims are flagged during review (Wave 2.2).
|
|
391
|
+
|
|
348
392
|
## Harness Integration
|
|
349
393
|
|
|
350
394
|
- **`harness validate`** — Run after every task completion. Mandatory. No task is complete without a passing validation.
|
|
@@ -312,6 +312,45 @@ One sentence.
|
|
|
312
312
|
|
|
313
313
|
````
|
|
314
314
|
|
|
315
|
+
## Session State
|
|
316
|
+
|
|
317
|
+
This skill reads and writes to the following session sections via `manage_state`:
|
|
318
|
+
|
|
319
|
+
| Section | Read | Write | Purpose |
|
|
320
|
+
|---------|------|-------|---------|
|
|
321
|
+
| terminology | yes | no | Reads domain terms to use consistent language in plan |
|
|
322
|
+
| decisions | yes | yes | Reads brainstorming decisions; records planning-phase decisions |
|
|
323
|
+
| constraints | yes | yes | Reads existing constraints; adds constraints discovered during decomposition |
|
|
324
|
+
| risks | yes | yes | Reads existing risks; adds implementation risks identified during task design |
|
|
325
|
+
| openQuestions | yes | yes | Reads unresolved questions; adds new questions, resolves answered ones |
|
|
326
|
+
| evidence | yes | yes | Reads prior evidence from brainstorming; writes file:line citations for task specifications |
|
|
327
|
+
|
|
328
|
+
**When to write:** During Phase 1 (SCOPE) write newly discovered constraints and risks. During Phase 2 (DECOMPOSE) write decisions about task structure and sequencing. Mark resolved questions during Phase 4 (VALIDATE).
|
|
329
|
+
|
|
330
|
+
**When to read:** At the start of Phase 1 (SCOPE), read all sections via `gather_context` with `include: ["sessions"]` to inherit context from brainstorming. Use terminology for consistent naming in task descriptions.
|
|
331
|
+
|
|
332
|
+
## Evidence Requirements
|
|
333
|
+
|
|
334
|
+
When this skill makes claims about existing code structure, file locations, or implementation patterns in task specifications, it MUST cite evidence using one of:
|
|
335
|
+
|
|
336
|
+
1. **File reference:** `file:line` format (e.g., `src/services/index.ts:15` -- "barrel export exists, will add new export here")
|
|
337
|
+
2. **Code pattern reference:** `file:line` format with pattern description (e.g., `src/services/user-service.ts:1-30` -- "existing service follows constructor injection pattern, new service will match")
|
|
338
|
+
3. **Test output:** Include the command and its observed output when referencing current test state
|
|
339
|
+
4. **Session evidence:** Write to the `evidence` session section:
|
|
340
|
+
```json
|
|
341
|
+
manage_state({
|
|
342
|
+
action: "append_entry",
|
|
343
|
+
session: "<current-session>",
|
|
344
|
+
section: "evidence",
|
|
345
|
+
authorSkill: "harness-planning",
|
|
346
|
+
content: "src/services/index.ts:15 -- barrel export pattern confirmed for new service integration"
|
|
347
|
+
})
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
**When to cite:** During Phase 1 (SCOPE) when referencing existing files for observable truths. During Phase 2 (DECOMPOSE) when specifying exact file paths and code patterns in task instructions. When the file map references existing files for modification.
|
|
351
|
+
|
|
352
|
+
**Uncited claims:** Technical assertions about existing code without citations MUST be prefixed with `[UNVERIFIED]`. Example: `[UNVERIFIED] The service barrel exports all services`. Uncited claims are flagged during review (Wave 2.2).
|
|
353
|
+
|
|
315
354
|
## Harness Integration
|
|
316
355
|
|
|
317
356
|
- **`harness validate`** — Run during Phase 4 (before writing the plan) and included as a step in every task.
|
|
@@ -111,14 +111,14 @@ Run every check below. Record each as **pass**, **warn**, or **fail**:
|
|
|
111
111
|
| `test` script exists in root `package.json` | fail |
|
|
112
112
|
| `lint` script exists in root `package.json` | fail |
|
|
113
113
|
| `typecheck` or `tsc` script exists in root `package.json` | fail |
|
|
114
|
-
| `assess_project` passes (harness
|
|
114
|
+
| `assess_project` passes (full harness CI gate) | fail |
|
|
115
115
|
|
|
116
116
|
For the `assess_project` check, run it with all harness-specific checks including lint:
|
|
117
117
|
|
|
118
118
|
```json
|
|
119
119
|
assess_project({
|
|
120
120
|
path: "<project-root>",
|
|
121
|
-
checks: ["validate", "deps", "docs", "lint"],
|
|
121
|
+
checks: ["validate", "deps", "docs", "lint", "perf", "security", "entropy", "arch"],
|
|
122
122
|
mode: "detailed"
|
|
123
123
|
})
|
|
124
124
|
```
|
|
@@ -519,7 +519,7 @@ This framing is informational — it does not block anything. It gives the team
|
|
|
519
519
|
|
|
520
520
|
## Harness Integration
|
|
521
521
|
|
|
522
|
-
- **`assess_project`** — Used in AUDIT Phase 1 (CI/CD section) to run harness validation,
|
|
522
|
+
- **`assess_project`** — Used in AUDIT Phase 1 (CI/CD section) to run the full harness CI gate (validation, dependencies, docs, lint, performance/complexity, security, entropy, and architecture) in a single parallel call. Also run after auto-fixes in Phase 3 to verify project health. Automatically inherits new checks added to `assess_project`.
|
|
523
523
|
- **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`.
|
|
524
524
|
- **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.
|
|
525
525
|
- **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.
|
|
@@ -291,6 +291,41 @@ When verifying a bug fix, apply this extended protocol:
|
|
|
291
291
|
|
|
292
292
|
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.
|
|
293
293
|
|
|
294
|
+
## Evidence Requirements
|
|
295
|
+
|
|
296
|
+
This skill is the primary evidence producer in the workflow. Every pass/fail assertion in the verification report MUST include concrete evidence. The words "should", "probably", and "seems to" are already forbidden by the Iron Law -- this section defines HOW to cite evidence.
|
|
297
|
+
|
|
298
|
+
Every verification claim MUST use one of:
|
|
299
|
+
|
|
300
|
+
1. **File reference:** `file:line` format with observed content (e.g., `src/services/user-service.ts:42` -- "create method validates email format before insert")
|
|
301
|
+
2. **Test output:** Include the actual test command and its complete output:
|
|
302
|
+
```
|
|
303
|
+
$ npx vitest run src/services/user-service.test.ts
|
|
304
|
+
PASS src/services/user-service.test.ts
|
|
305
|
+
UserService
|
|
306
|
+
create (4 tests)
|
|
307
|
+
list (3 tests)
|
|
308
|
+
expiry (2 tests)
|
|
309
|
+
Tests: 9 passed, 9 total
|
|
310
|
+
```
|
|
311
|
+
3. **Harness output:** Include full `harness validate` and `harness check-deps` output
|
|
312
|
+
4. **Anti-pattern scan output:** Include the actual grep/search command and results (or absence of results)
|
|
313
|
+
5. **Import chain evidence:** Include the actual import statements found when verifying WIRED level
|
|
314
|
+
6. **Session evidence:** Write to the `evidence` session section for each verification level:
|
|
315
|
+
```json
|
|
316
|
+
manage_state({
|
|
317
|
+
action: "append_entry",
|
|
318
|
+
session: "<current-session>",
|
|
319
|
+
section: "evidence",
|
|
320
|
+
authorSkill: "harness-verification",
|
|
321
|
+
content: "[EXISTS:PASS] src/services/user-service.ts (189 lines) -- verified via direct file read"
|
|
322
|
+
})
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
**When to cite:** At every verification level. Level 1 (EXISTS) cites file reads. Level 2 (SUBSTANTIVE) cites specific line content. Level 3 (WIRED) cites import statements, test execution output, and harness check output. The verification report format already requires `[PASS]`/`[FAIL]` markers -- each marker must be accompanied by the evidence that produced it.
|
|
326
|
+
|
|
327
|
+
**Uncited claims:** ANY verification assertion without direct evidence is a verification failure, not merely an uncited claim. This skill does not use `[UNVERIFIED]` -- if evidence cannot be produced, the verdict is FAIL or INCOMPLETE.
|
|
328
|
+
|
|
294
329
|
## Harness Integration
|
|
295
330
|
|
|
296
331
|
- **`harness validate`** — Run in Level 3 WIRED check. Verifies project-wide health and constraint compliance.
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
2. **For new projects:** Gather project context — language, framework, test runner, build tool. Ask the human if any of these are undecided. Do not assume defaults.
|
|
22
22
|
|
|
23
|
+
2b. **For existing projects with detectable frameworks:** Run `harness init` without flags first. The command auto-detects frameworks (FastAPI, Django, Gin, Axum, Spring Boot, Next.js, React+Vite, Vue, Express, NestJS) by scanning project files. Present the detection result to the human and ask for confirmation before proceeding. If detection fails, ask the human to specify `--framework` manually.
|
|
24
|
+
|
|
23
25
|
3. **For existing projects:** Run `harness validate` to see what is already configured and what is missing. Read `AGENTS.md` if it exists. Identify the current adoption level:
|
|
24
26
|
- **Basic:** Has `AGENTS.md` and `harness.yaml` with project metadata. No layers, no skills, no dependency constraints.
|
|
25
27
|
- **Intermediate:** Has layers defined, dependency constraints between layers, at least one custom skill. `harness check-deps` runs and passes.
|
|
@@ -30,11 +32,17 @@
|
|
|
30
32
|
### Phase 2: SCAFFOLD — Generate Project Structure
|
|
31
33
|
|
|
32
34
|
1. **Run `harness init` with the appropriate flags:**
|
|
33
|
-
- New basic project: `harness init --level basic
|
|
34
|
-
-
|
|
35
|
+
- New basic JS/TS project: `harness init --level basic`
|
|
36
|
+
- With framework: `harness init --level basic --framework <framework>`
|
|
37
|
+
- Non-JS language: `harness init --language <python|go|rust|java>`
|
|
38
|
+
- Non-JS with framework: `harness init --framework <fastapi|django|gin|axum|spring-boot>`
|
|
39
|
+
- Existing project (auto-detect): `harness init` (no flags -- auto-detection runs)
|
|
35
40
|
- Migration to intermediate: `harness init --level intermediate --migrate`
|
|
36
41
|
- Migration to advanced: `harness init --level advanced --migrate`
|
|
37
42
|
|
|
43
|
+
**Supported frameworks:** nextjs, react-vite, vue, express, nestjs, fastapi, django, gin, axum, spring-boot
|
|
44
|
+
**Supported languages:** typescript, python, go, rust, java
|
|
45
|
+
|
|
38
46
|
2. **Review generated files.** `harness init` creates:
|
|
39
47
|
- `harness.yaml` — Project configuration (name, stack, adoption level)
|
|
40
48
|
- `.harness/` directory — State and learnings storage
|
|
@@ -93,7 +101,7 @@ This creates the `.harness/graph/` directory and populates it with the project's
|
|
|
93
101
|
|
|
94
102
|
## Harness Integration
|
|
95
103
|
|
|
96
|
-
- **`harness init --level <level> --framework <framework
|
|
104
|
+
- **`harness init --level <level> [--framework <framework>] [--language <language>]`** — Scaffold a new project. `--framework` infers language automatically. `--language` without `--framework` gives a bare language scaffold. Running without flags on an existing project directory triggers auto-detection.
|
|
97
105
|
- **`harness init --level <level> --migrate`** — Migrate an existing project to the next adoption level, preserving existing configuration.
|
|
98
106
|
- **`harness persona generate`** — Generate persona definitions based on project stack and team structure.
|
|
99
107
|
- **`harness validate`** — Verify the full project configuration is valid and complete.
|