create-harness-vibe-coding 0.8.13 → 0.8.16
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/CHANGELOG.md +165 -0
- package/README-CN.md +41 -9
- package/README.md +39 -9
- package/package.json +2 -1
- package/src/generator.js +601 -472
- package/src/index.js +4 -4
- package/templates/common/.claude/agents/architect-manager.md +1 -0
- package/templates/common/.claude/agents/architect.md +2 -1
- package/templates/common/.claude/agents/codebase-explorer.md +1 -0
- package/templates/common/.claude/agents/context-master.md +2 -1
- package/templates/common/.claude/agents/debugger.md +1 -0
- package/templates/common/.claude/agents/docs-researcher.md +2 -1
- package/templates/common/.claude/agents/explore-manager.md +1 -0
- package/templates/common/.claude/agents/implement-manager.md +1 -0
- package/templates/common/.claude/agents/implementer.md +1 -0
- package/templates/common/.claude/agents/memory-master.md +2 -1
- package/templates/common/.claude/agents/planner.md +3 -2
- package/templates/common/.claude/agents/reflector.md +1 -0
- package/templates/common/.claude/agents/researcher.md +1 -0
- package/templates/common/.claude/agents/review-manager.md +1 -0
- package/templates/common/.claude/agents/reviewer.md +2 -1
- package/templates/common/.claude/agents/task-scribe.md +1 -0
- package/templates/common/.claude/agents/tdd-guide.md +5 -4
- package/templates/common/.claude/agents/test-writer.md +6 -5
- package/templates/common/.claude/agents/verifier.md +1 -0
- package/templates/common/.claude/commands/wf-help.md +1 -0
- package/templates/common/.claude/commands/wf-update.md +68 -10
- package/templates/common/.claude/rules/ecc/common.md +6 -5
- package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +12 -6
- package/templates/common/.claude/skills/tdd/SKILL.md +5 -5
- package/templates/common/.claude/skills/wf/SKILL.md +13 -5
- package/templates/common/.claude/skills/wf-agents-docs/SKILL.md +119 -0
- package/templates/common/.claude/skills/wf-auto/SKILL.md +27 -7
- package/templates/common/.claude/skills/wf-auto-spark/SKILL.md +12 -5
- package/templates/common/.claude/skills/wf-learn/SKILL.md +6 -0
- package/templates/common/.claude/skills/wf-max/SKILL.md +22 -7
- package/templates/common/.claude/skills/wf-readme/SKILL.md +8 -2
- package/templates/common/.claude/skills/wf-remove/SKILL.md +6 -0
- package/templates/common/.claude/skills/wf-review/SKILL.md +10 -3
- package/templates/common/.claude/skills/wf-update/SKILL.md +41 -4
- package/templates/common/.harness-version +290 -128
- package/templates/common/.opencode/agents/architect-manager.md +1 -0
- package/templates/common/.opencode/agents/architect.md +2 -1
- package/templates/common/.opencode/agents/codebase-explorer.md +1 -0
- package/templates/common/.opencode/agents/context-master.md +2 -1
- package/templates/common/.opencode/agents/debugger.md +1 -0
- package/templates/common/.opencode/agents/docs-researcher.md +2 -1
- package/templates/common/.opencode/agents/explore-manager.md +1 -0
- package/templates/common/.opencode/agents/implement-manager.md +1 -0
- package/templates/common/.opencode/agents/implementer.md +1 -0
- package/templates/common/.opencode/agents/memory-master.md +2 -1
- package/templates/common/.opencode/agents/planner.md +3 -2
- package/templates/common/.opencode/agents/reflector.md +1 -0
- package/templates/common/.opencode/agents/researcher.md +1 -0
- package/templates/common/.opencode/agents/review-manager.md +1 -0
- package/templates/common/.opencode/agents/reviewer.md +2 -1
- package/templates/common/.opencode/agents/task-scribe.md +1 -0
- package/templates/common/.opencode/agents/tdd-guide.md +5 -4
- package/templates/common/.opencode/agents/test-writer.md +6 -5
- package/templates/common/.opencode/agents/verifier.md +1 -0
- package/templates/common/.opencode/commands/wf-auto-spark.md +3 -2
- package/templates/common/.opencode/commands/wf-auto.md +3 -2
- package/templates/common/.opencode/commands/wf-help.md +1 -0
- package/templates/common/.opencode/commands/wf-learn.md +3 -2
- package/templates/common/.opencode/commands/wf-max.md +3 -2
- package/templates/common/.opencode/commands/wf-readme.md +3 -2
- package/templates/common/.opencode/commands/wf-remove.md +3 -2
- package/templates/common/.opencode/commands/wf-review.md +3 -2
- package/templates/common/.opencode/commands/wf-update.md +68 -10
- package/templates/common/.opencode/commands/wf.md +3 -2
- package/templates/common/CLAUDE.md +14 -12
- package/templates/common/Harness/MEMORY.md +21 -18
- package/templates/common/Harness/README.md +41 -39
- package/templates/common/Harness/ownership.manifest.json +815 -0
- package/templates/common/Harness/{architecture.md → project/architecture.md} +1 -1
- package/templates/common/Harness/research/README.md +3 -3
- package/templates/common/Harness/scripts/context-budget.mjs +95 -0
- package/templates/common/Harness/scripts/l2-cache-telemetry.mjs +703 -0
- package/templates/common/Harness/scripts/scan-clean.mjs +13 -3
- package/templates/common/Harness/scripts/validate-harness.mjs +332 -175
- package/templates/common/Harness/scripts/wf-remove.mjs +60 -34
- package/templates/common/Harness/scripts/wf-update-check.mjs +355 -45
- package/templates/common/Harness/settings.json +43 -0
- package/templates/common/Harness/{ECC-GUIDE.md → specs/guides/ECC-GUIDE.md} +4 -4
- package/templates/common/Harness/{SETUP.md → specs/guides/SETUP.md} +32 -35
- package/templates/common/Harness/{extension.md → specs/guides/extension.md} +3 -3
- package/templates/common/Harness/{lifecycle.md → specs/guides/lifecycle.md} +2 -2
- package/templates/common/Harness/{agent-workflow.md → specs/runtime/agent-workflow.md} +6 -6
- package/templates/common/Harness/{context-loading.md → specs/runtime/context-loading.md} +85 -21
- package/templates/common/Harness/{dispatch.md → specs/runtime/dispatch.md} +3 -2
- package/templates/common/Harness/{subagents.md → specs/runtime/subagents.md} +10 -5
- package/templates/common/Harness/{WF-AUTO-SPARK.md → specs/workflows/WF-AUTO-SPARK.md} +2 -2
- package/templates/common/Harness/{WF-AUTO.md → specs/workflows/WF-AUTO.md} +6 -1
- package/templates/common/Harness/{WF-KERNEL.md → specs/workflows/WF-KERNEL.md} +10 -0
- package/templates/common/Harness/{WF-MAX.md → specs/workflows/WF-MAX.md} +10 -5
- package/templates/common/Harness/{WF-STATE.md → specs/workflows/WF-STATE.md} +5 -0
- package/templates/common/Harness/{WF.md → specs/workflows/WF.md} +12 -1
- package/templates/common/README.md +8 -6
- package/templates/common/memory/startup-hints.md +19 -17
- package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +1 -1
- package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +7 -0
- package/templates/optional/skills/browser-e2e/.opencode/commands/wf-browser.md +3 -2
- package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +4 -4
- package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +1 -1
- package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +1 -1
- package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +1 -1
- package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +1 -1
- /package/templates/common/Harness/{ACCEPTANCE_PROTOCOL.md → specs/protocols/ACCEPTANCE_PROTOCOL.md} +0 -0
- /package/templates/common/Harness/{AGENT_ISOLATION.md → specs/protocols/AGENT_ISOLATION.md} +0 -0
- /package/templates/common/Harness/{DEBUG_PROTOCOL.md → specs/protocols/DEBUG_PROTOCOL.md} +0 -0
- /package/templates/common/Harness/{HARNESS_BRIDGE.md → specs/protocols/HARNESS_BRIDGE.md} +0 -0
- /package/templates/common/Harness/{MEMORY_PROTOCOL.md → specs/protocols/MEMORY_PROTOCOL.md} +0 -0
- /package/templates/common/Harness/{TASK_ARCHIVE.md → specs/protocols/TASK_ARCHIVE.md} +0 -0
- /package/templates/common/Harness/{TDD-GUIDE.md → specs/protocols/TDD-GUIDE.md} +0 -0
- /package/templates/common/Harness/{WF-AUTO-ANGLES.md → specs/workflows/WF-AUTO-ANGLES.md} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "harness-settings@1",
|
|
3
|
+
"language": {
|
|
4
|
+
"userFacing": "auto"
|
|
5
|
+
},
|
|
6
|
+
"context": {
|
|
7
|
+
"startupProfile": "thin",
|
|
8
|
+
"cacheFirst": true,
|
|
9
|
+
"budgetProfile": "auto"
|
|
10
|
+
},
|
|
11
|
+
"workflow": {
|
|
12
|
+
"defaultTier": "auto",
|
|
13
|
+
"taskCapsuleCap": 5
|
|
14
|
+
},
|
|
15
|
+
"wfMax": {
|
|
16
|
+
"mode": "useful",
|
|
17
|
+
"maxWorkersTotal": 15,
|
|
18
|
+
"maxWorkersPerWave": 7,
|
|
19
|
+
"maxReviewersPerWave": 4,
|
|
20
|
+
"maxManagersTotal": 4,
|
|
21
|
+
"reviewReservePercent": 30,
|
|
22
|
+
"stopDispatchBelowTokens": 50000
|
|
23
|
+
},
|
|
24
|
+
"wfAuto": {
|
|
25
|
+
"enabled": true,
|
|
26
|
+
"maxFilesPerCycle": 3,
|
|
27
|
+
"maxNetLinesPerCycle": 50,
|
|
28
|
+
"checkpointSchedule": [2, 5, 10]
|
|
29
|
+
},
|
|
30
|
+
"wfAutoSpark": {
|
|
31
|
+
"enabled": true,
|
|
32
|
+
"minNorthStarAlignmentPercent": 50,
|
|
33
|
+
"rollingAlignmentFloorPercent": 65,
|
|
34
|
+
"roadmapReviewEveryCycles": 10
|
|
35
|
+
},
|
|
36
|
+
"telemetry": {
|
|
37
|
+
"l2Cache": {
|
|
38
|
+
"claimMinWarmTurns": 10,
|
|
39
|
+
"claimMinReadRatioPercent": 95,
|
|
40
|
+
"claimMinUpliftPoints": 2
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -85,7 +85,7 @@ If rules are missing, the agent MUST install them before proceeding to step 1.
|
|
|
85
85
|
|
|
86
86
|
Beyond coding style, ECC provides design-level guidance for both frontend and backend.
|
|
87
87
|
These are NOT in Harness by default — the agent should consult them when filling
|
|
88
|
-
`Harness/architecture.md` and `Harness/research/research-results.md`.
|
|
88
|
+
`Harness/project/architecture.md` and `Harness/research/research-results.md`.
|
|
89
89
|
|
|
90
90
|
### Frontend Design (web/ + typescript/)
|
|
91
91
|
|
|
@@ -111,7 +111,7 @@ These are NOT in Harness by default — the agent should consult them when filli
|
|
|
111
111
|
|
|
112
112
|
### Architecture Templates
|
|
113
113
|
|
|
114
|
-
Write the project-specific structure in `Harness/architecture.md`. Use the ECC rule combinations above to decide which standards apply to each layer.
|
|
114
|
+
Write the project-specific structure in `Harness/project/architecture.md`. Use the ECC rule combinations above to decide which standards apply to each layer.
|
|
115
115
|
|
|
116
116
|
### API Contract
|
|
117
117
|
|
|
@@ -119,7 +119,7 @@ See [Contract Rules](#contract-rules) below for the full spec.
|
|
|
119
119
|
|
|
120
120
|
## Agent Skills + ECC Rules
|
|
121
121
|
|
|
122
|
-
Dispatch packets MUST include `ecc` and SHOULD include `skills` fields (use `skills: none` when no skill applies). `Harness/context-loading.md#ecc-rules-per-role` owns the role-to-ECC mapping. This guide owns stack detection and the catalog of available ECC rule sets.
|
|
122
|
+
Dispatch packets MUST include `ecc` and SHOULD include `skills` fields (use `skills: none` when no skill applies). `Harness/specs/runtime/context-loading.md#ecc-rules-per-role` owns the role-to-ECC mapping. This guide owns stack detection and the catalog of available ECC rule sets.
|
|
123
123
|
|
|
124
124
|
## API Contract Specification (Frontend ↔ Backend)
|
|
125
125
|
|
|
@@ -243,4 +243,4 @@ When dispatching a subagent, the dispatch packet MUST include:
|
|
|
243
243
|
|
|
244
244
|
Different subagents get different `ecc` and `skills` arrays.
|
|
245
245
|
A frontend implementer loads `web/` rules. A backend implementer loads `python/` or `golang/` rules.
|
|
246
|
-
A reviewer loads `security/` + `testing/` rules. See `Harness/context-loading.md` for the full per-role mapping.
|
|
246
|
+
A reviewer loads `security/` + `testing/` rules. See `Harness/specs/runtime/context-loading.md` for the full per-role mapping.
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# SETUP.md - Bootstrap This Product Harness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Retained install/bootstrap reference. Keep this file available for setup,
|
|
4
|
+
migration, upgrade decisions, and explicit bootstrap requests. Normal sessions
|
|
5
|
+
start from `CLAUDE.md`; `Harness/README.md` is the Harness workflow router when
|
|
6
|
+
a routed task needs it.
|
|
4
7
|
|
|
5
8
|
## What This Is
|
|
6
9
|
|
|
@@ -24,7 +27,7 @@ It does not guess your stack or business domain. The agent MUST detect or ask, t
|
|
|
24
27
|
Start Claude Code or Codex, then say:
|
|
25
28
|
|
|
26
29
|
```text
|
|
27
|
-
Read Harness/SETUP.md. Bootstrap this project as a 0-1 product harness.
|
|
30
|
+
Read Harness/specs/guides/SETUP.md. Bootstrap this project as a 0-1 product harness.
|
|
28
31
|
Use Harness/README.md as the router. Keep context small.
|
|
29
32
|
First clarify the idea, then create Mini PRD, acceptance criteria, UI/API contracts, test plan, research, architecture, Harness/PROGRESS.md, the first per-task plan, and the first vertical-slice task.
|
|
30
33
|
```
|
|
@@ -33,18 +36,18 @@ First clarify the idea, then create Mini PRD, acceptance criteria, UI/API contra
|
|
|
33
36
|
|
|
34
37
|
Claude or Codex must follow this order during bootstrap. This sequence is broader than installation; if the user only asked to install/configure the harness in an existing project, follow the "Existing Project Fast Path" below and stop after the non-strict validator passes.
|
|
35
38
|
|
|
36
|
-
0. **ECC Stack Configuration** — Detect the project's tech stack. If the repo is empty or has no stack markers (`package.json`, `go.mod`, `pyproject.toml`, `Cargo.toml`, `Gemfile`, `composer.json`, `build.gradle`, etc.), ask the user: "What's your tech stack? (language/framework)" Then install the matching ECC rule sets from `~/.claude/rules/ecc/`. See `Harness/ECC-GUIDE.md` for the stack→rules mapping. Minimum: always install `common/`. Verify with `ls .claude/rules/ecc/`.
|
|
37
|
-
1. Read `CLAUDE.md`, `Harness/MEMORY.md`, `Harness/README.md`, `Harness/lifecycle.md`, and `Harness/ACCEPTANCE_PROTOCOL.md`. Load `Harness/memory/*` only when the router or memory trigger applies.
|
|
39
|
+
0. **ECC Stack Configuration** — Detect the project's tech stack. If the repo is empty or has no stack markers (`package.json`, `go.mod`, `pyproject.toml`, `Cargo.toml`, `Gemfile`, `composer.json`, `build.gradle`, etc.), ask the user: "What's your tech stack? (language/framework)" Then install the matching ECC rule sets from `~/.claude/rules/ecc/`. See `Harness/specs/guides/ECC-GUIDE.md` for the stack→rules mapping. Minimum: always install `common/`. Verify with `ls .claude/rules/ecc/`.
|
|
40
|
+
1. Read `CLAUDE.md`, `Harness/MEMORY.md`, `Harness/README.md`, `Harness/specs/guides/lifecycle.md`, and `Harness/specs/protocols/ACCEPTANCE_PROTOCOL.md`. Load `Harness/memory/*` only when the router or memory trigger applies.
|
|
38
41
|
2. Ask up to 3 blocking product questions. If not blocked, record assumptions in `Harness/tasks/<task-id>/PLAN.md`.
|
|
39
42
|
3. Fill `Harness/research/PRD.md` or the first task PLAN with Mini PRD fields: goal, scope, non-scope, user flow, UI elements, API behavior, acceptance criteria, and verification commands.
|
|
40
43
|
4. Read `Harness/research/README.md`, then fill `Harness/research/research-results.md` with adopted/rejected research choices.
|
|
41
44
|
5. Create AC IDs, UI/API contract tables, and a test plan before implementation. Use `Harness/templates/*` when helpful.
|
|
42
|
-
6. Fill `Harness/architecture.md`.
|
|
45
|
+
6. Fill `Harness/project/architecture.md`.
|
|
43
46
|
7. Create a task capsule from `Harness/tasks/_template/` and fill the first vertical-slice plan in `Harness/tasks/<task-id>/PLAN.md`.
|
|
44
|
-
8. Use `Harness/AGENT_ISOLATION.md`, `Harness/subagents.md`, `Harness/context-loading.md`, and `Harness/dispatch.md` when explicit WF/WK mode or any spawned subagents are involved.
|
|
47
|
+
8. Use `Harness/specs/protocols/AGENT_ISOLATION.md`, `Harness/specs/runtime/subagents.md`, `Harness/specs/runtime/context-loading.md`, and `Harness/specs/runtime/dispatch.md` when explicit WF/WK mode or any spawned subagents are involved.
|
|
45
48
|
9. Implement only after PRD-GATE, AC-GATE, CONTRACT-GATE, and TEST-GATE pass.
|
|
46
|
-
10. Independently validate with an AC-by-AC result matrix; use `Harness/HARNESS_BRIDGE.md` for browser/API/CDP flows.
|
|
47
|
-
11. For `/wf-auto` or memory scenario hints, read `Harness/WF-AUTO.md` and `Harness/MEMORY_PROTOCOL.md`; do not enable a background runner by default. The only allowed runtime hook is the optional `/wf-auto` bounded tick hook.
|
|
49
|
+
10. Independently validate with an AC-by-AC result matrix; use `Harness/specs/protocols/HARNESS_BRIDGE.md` for browser/API/CDP flows.
|
|
50
|
+
11. For `/wf-auto` or memory scenario hints, read `Harness/specs/workflows/WF-AUTO.md` and `Harness/specs/protocols/MEMORY_PROTOCOL.md`; do not enable a background runner by default. The only allowed runtime hook is the optional `/wf-auto` bounded tick hook.
|
|
48
51
|
12. Run `node Harness/scripts/validate-harness.mjs --strict` after project-fact placeholders are resolved.
|
|
49
52
|
13. Record final verification and next feedback step in `Harness/tasks/<task-id>/PROGRESS.md`. If repeated tool failures, repeated user corrections, or reusable review/debug lessons appeared, record the concise reflection in the relevant `Harness/memory/` file.
|
|
50
53
|
|
|
@@ -69,7 +72,7 @@ Use this path when the user asks only to install or configure the harness in an
|
|
|
69
72
|
2. Run the JSON `agent.safeMergeCommand` to create only missing files.
|
|
70
73
|
3. Record discovered facts in the final install summary. Create or update task capsules only when bootstrap or multi-step implementation work begins.
|
|
71
74
|
4. Existing configuration is project fact. Do not overwrite `CLAUDE.md`, `AGENTS.md`, `.claude/`, `.agents/`, `.codex/`, `.gitignore`, settings, package files, CI, docs routers, workflow docs, or installed skills/plugins/rules unless the user explicitly approves that exact overwrite.
|
|
72
|
-
5. When a harness file conflicts with an existing file, preserve the existing file and register any missing harness guidance manually using `Harness/extension.md`.
|
|
75
|
+
5. When a harness file conflicts with an existing file, preserve the existing file and register any missing harness guidance manually using `Harness/specs/guides/extension.md`.
|
|
73
76
|
6. Run `node Harness/scripts/validate-harness.mjs` as the install-complete gate.
|
|
74
77
|
7. Defer `node Harness/scripts/validate-harness.mjs --strict` until bootstrap removes project-fact placeholders. If placeholders intentionally remain, report strict validation as deferred rather than treating install as failed.
|
|
75
78
|
|
|
@@ -132,23 +135,23 @@ The harness validator checks for specific structural invariants. When comparing
|
|
|
132
135
|
|
|
133
136
|
| File | Required check |
|
|
134
137
|
|------|----------------|
|
|
135
|
-
| `CLAUDE.md` | Must be merged only after user confirmation when it already exists. Required contract: `## 1. Harness Binding & Startup
|
|
138
|
+
| `CLAUDE.md` | Must be merged only after user confirmation when it already exists. Required contract: `## 1. Harness Binding & Startup`; `## 6. Memory & Self-Learning` section; the tool reflection trigger text (`same tool/use pattern fails 3+ times`); the user correction trigger text (`user corrects the same assumption/pattern 2+ times`); startup-hints routing; no startup dependency on this setup reference |
|
|
136
139
|
| `AGENTS.md` | Root agent entry points to `CLAUDE.md` and `Harness/README.md`; for existing projects, merge only after explicit user consent |
|
|
137
140
|
| `README.md` | Existing README is project-owned. Preserve by default; ask whether to append only Development notes or run `wf-readme` for a structure pass with tables/diagrams before broad edits |
|
|
138
141
|
| `Harness/MEMORY.md` | All common agents registered under `## Agents`; all common harness skills registered under `## Skills`; all 3 `Harness/memory/` files registered under `## Memory Folder`; `Harness/memory/` folder usage guidance; `Project Resource Index` in title |
|
|
139
142
|
| `.claude/rules/ecc/common.md` | Required project-local universal rules. Keep it even when global `~/.claude/rules/ecc/common/` exists; that directory and this file have different scopes. Required sections: `## Context` with the durable communication invariant (`project files are the only durable communication channel`); `## Memory` with three reflection file entries; `## Security` |
|
|
140
143
|
| `Harness/README.md` | `## Keyword Routing` heading; `## Load By Task` table with at minimum the rows: "Need WF mode (explicit only)", "Adding harness to existing project", "Need implementation plan", "Need parallel agents", "Need subagents", "Need durable memory or reflection"; WF routing keywords include `/wf`, `$wf`, `/skills wf`, `/wf-max`, `$wf-max`, `/skills wf-max`; explicit WF entry only — no auto-triggering from task complexity, failure count, or old aliases; `## Doc Map` with `memory/` and `subagents.md` entries; the durable communication invariant text; `Harness/README.md is the primary Harness documentation router` |
|
|
141
|
-
| `Harness/WF.md` | `WF is explicit only`; tier-aware contract: `WF-Light` (planner/test/verifier, no mandatory cross-review/reflector), `WF-Standard` (adds research + one review lens), `WF-Full` (complete role chain with cross-review + reflector PASS); `Collaboration tier guide`; `Heartbeat Protocol` |
|
|
142
|
-
| `Harness/WF-MAX.md` | `WF-MAX is explicit only`; `WF-Max-Useful` (default, fan-out only where independent); `WF-Max-Strict` (explicit strict override); three-layer architecture; D-GATE; span formula |
|
|
143
|
-
| `Harness/extension.md` | `## Non-Invasive Extension Rules` section with the "Preserve existing" rule; `## Agent Contract` section; `## Registration` section |
|
|
144
|
-
| `Harness/dispatch.md` | The durable communication invariant; registered common agent entries; `## Handoff Format` heading |
|
|
145
|
-
| `Harness/context-loading.md` | The durable communication invariant; `Harness/README.md is the primary Harness documentation router`; all 12 subagent context packs (Explorer Pass, Planner, Researcher, Docs Researcher, Architect, Test Writer, Implementer, Reviewer, Debugger, Verifier, Memory Master, Context Master) |
|
|
146
|
-
| `Harness/subagents.md` | `## Source Attribution`; `## Built-in Agent Roster`; `## WF Default Fan-Out`; `Controller Role`; `Efficiency Ladder`; `Review Gates`; `collaboration decision tree`; source markers for `npx skills find`, `dispatching-parallel-agents`, and `subagent-driven-development` |
|
|
147
|
-
| `Harness/architecture.md` | `## 2. Interface Decoupling`; `## 3. State Design`; `Avoid speculative abstraction`; layer constraints derived from actual project facts |
|
|
144
|
+
| `Harness/specs/workflows/WF.md` | `WF is explicit only`; tier-aware contract: `WF-Light` (planner/test/verifier, no mandatory cross-review/reflector), `WF-Standard` (adds research + one review lens), `WF-Full` (complete role chain with cross-review + reflector PASS); `Collaboration tier guide`; `Heartbeat Protocol` |
|
|
145
|
+
| `Harness/specs/workflows/WF-MAX.md` | `WF-MAX is explicit only`; `WF-Max-Useful` (default, fan-out only where independent); `WF-Max-Strict` (explicit strict override); three-layer architecture; D-GATE; span formula |
|
|
146
|
+
| `Harness/specs/guides/extension.md` | `## Non-Invasive Extension Rules` section with the "Preserve existing" rule; `## Agent Contract` section; `## Registration` section |
|
|
147
|
+
| `Harness/specs/runtime/dispatch.md` | The durable communication invariant; registered common agent entries; `## Handoff Format` heading |
|
|
148
|
+
| `Harness/specs/runtime/context-loading.md` | The durable communication invariant; `Harness/README.md is the primary Harness documentation router`; all 12 subagent context packs (Explorer Pass, Planner, Researcher, Docs Researcher, Architect, Test Writer, Implementer, Reviewer, Debugger, Verifier, Memory Master, Context Master) |
|
|
149
|
+
| `Harness/specs/runtime/subagents.md` | `## Source Attribution`; `## Built-in Agent Roster`; `## WF Default Fan-Out`; `Controller Role`; `Efficiency Ladder`; `Review Gates`; `collaboration decision tree`; source markers for `npx skills find`, `dispatching-parallel-agents`, and `subagent-driven-development` |
|
|
150
|
+
| `Harness/project/architecture.md` | `## 2. Interface Decoupling`; `## 3. State Design`; `Avoid speculative abstraction`; layer constraints derived from actual project facts |
|
|
148
151
|
| `Harness/PROGRESS.md` | global task index with Active Task and task history; cross-task decisions |
|
|
149
152
|
| `Harness/tasks/<id>/PROGRESS.md` | `## Current Goal`, `## Phase`, `## Heartbeat`, `## Loaded Context` headings |
|
|
150
153
|
| `Harness/tasks/<id>/PLAN.md` | `## Tasks`, `## Parallel Dispatch`, `## Subagent Synthesis`, `## Verification` headings |
|
|
151
|
-
| `Harness/SETUP.md` |
|
|
154
|
+
| `Harness/specs/guides/SETUP.md` | Retained install/bootstrap guide for new projects, existing projects, legacy upgrades, and Harness update decisions. Keep "Install or Upgrade Path" present. |
|
|
152
155
|
| `Harness/workflows/browser-e2e.md` (if installed as optional) | `data-testid`, `accessible labels/roles`, and `inputs, buttons, filters, rows, empty/error/loading states` requirement |
|
|
153
156
|
| `Harness/workflows/ts-react-frontend.md` (if installed as optional) | Same UI selector contract as above |
|
|
154
157
|
|
|
@@ -161,7 +164,7 @@ The generated file list is authoritative by path, not by stale count labels. Cur
|
|
|
161
164
|
- `.claude/skills/*.md` and mirrored `.agents/skills/*.md` — Claude Code and Codex skill adapters over the same Harness docs
|
|
162
165
|
- `.claude/rules/ecc/common.md` - required project-local universal rules. Do not delete this file as a duplicate of a global `~/.claude/rules/ecc/common/` directory; they are different scopes.
|
|
163
166
|
- `.claude/settings.json` — harness settings
|
|
164
|
-
- `Harness/WF.md`, `Harness/lifecycle.md`, `Harness/subagents.md`, `Harness/agent-workflow.md`, `Harness/architecture.md` — harness runtime docs
|
|
167
|
+
- `Harness/specs/workflows/WF.md`, `Harness/specs/guides/lifecycle.md`, `Harness/specs/runtime/subagents.md`, `Harness/specs/runtime/agent-workflow.md`, `Harness/project/architecture.md` — harness runtime docs
|
|
165
168
|
- `Harness/research/*.md` — research protocol and templates
|
|
166
169
|
- `AGENTS.md` — agent registry; if it already exists, ask for user consent before merging or replacing it
|
|
167
170
|
- `Harness/scripts/validate-harness.mjs` and `tests/.gitkeep` — tooling
|
|
@@ -196,7 +199,7 @@ Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeh
|
|
|
196
199
|
- `{{CONSTRAINT_1..3}}`: hard technical constraints derived from research.
|
|
197
200
|
- `{{ALTERNATIVE_1..2}}`: rejected candidates worth watching for future.
|
|
198
201
|
|
|
199
|
-
**`Harness/architecture.md`** — Layer structure. Derive from research-results:
|
|
202
|
+
**`Harness/project/architecture.md`** — Layer structure. Derive from research-results:
|
|
200
203
|
- Fill the ASCII layer diagram with actual layer names. Do NOT add layers without a proven need.
|
|
201
204
|
- `Interface Decoupling`: document only real boundaries and ports. Do not add speculative factories, plugin systems, generic repositories, or config layers.
|
|
202
205
|
- `State Design`: name state owners, persistence level, legal transitions, and recovery behavior for long-running workflows.
|
|
@@ -261,7 +264,7 @@ ECC and Superpowers overlap ~80% in topic coverage but serve different purposes:
|
|
|
261
264
|
| **Unique** | Design quality, performance budgets, security CSP, per-language idioms | Brainstorming, git worktrees |
|
|
262
265
|
|
|
263
266
|
**Installation rule:**
|
|
264
|
-
1. **ECC is mandatory.** Install `common/` + stack-specific rules during bootstrap step 0. See `Harness/ECC-GUIDE.md`.
|
|
267
|
+
1. **ECC is mandatory.** Install `common/` + stack-specific rules during bootstrap step 0. See `Harness/specs/guides/ECC-GUIDE.md`.
|
|
265
268
|
2. **Superpowers is recommended.** Install after ECC. It adds ~14 workflow skills that teach agents *how* to execute ECC standards.
|
|
266
269
|
3. **No duplicates from other sources.** If a Superpowers skill has an ECC equivalent, keep both — they don't conflict. ECC sets the bar, Superpowers shows the path.
|
|
267
270
|
4. **Priority**: ECC rules take precedence when there's a conflict. ECC is the contract; Superpowers is the training manual.
|
|
@@ -274,13 +277,13 @@ ECC and Superpowers overlap ~80% in topic coverage but serve different purposes:
|
|
|
274
277
|
3. Selected external GitHub links - let the user's agent read that project's README and install only after approval.
|
|
275
278
|
4. GitHub search - when the first three miss niche domains.
|
|
276
279
|
|
|
277
|
-
**What to install**: after finding skills, add the canonical copy to `.claude/skills/<name>/SKILL.md` and mirror the same file to `.agents/skills/<name>/SKILL.md` when Codex should discover it. Follow `Harness/extension.md` for compatibility. Start with 1-2 skills per stack area; more is not better.
|
|
280
|
+
**What to install**: after finding skills, add the canonical copy to `.claude/skills/<name>/SKILL.md` and mirror the same file to `.agents/skills/<name>/SKILL.md` when Codex should discover it. Follow `Harness/specs/guides/extension.md` for compatibility. Start with 1-2 skills per stack area; more is not better.
|
|
278
281
|
|
|
279
282
|
This scaffold includes built-in harness skills in `.claude/skills/*` and mirrored Codex repo skills in `.agents/skills/*`. Keep those. Add stack-specific ones alongside them.
|
|
280
283
|
|
|
281
284
|
## Optional Agent Assets
|
|
282
285
|
|
|
283
|
-
After the product shape is known, Claude Code may also install or copy stack-specific agents and rules into `.claude/`. Codex-discoverable workflow skills belong in `.agents/skills/`. Follow `Harness/extension.md` for every added asset.
|
|
286
|
+
After the product shape is known, Claude Code may also install or copy stack-specific agents and rules into `.claude/`. Codex-discoverable workflow skills belong in `.agents/skills/`. Follow `Harness/specs/guides/extension.md` for every added asset.
|
|
284
287
|
|
|
285
288
|
Examples:
|
|
286
289
|
|
|
@@ -290,18 +293,12 @@ This is a Python data product. Add data pipeline and pytest workflow agents.
|
|
|
290
293
|
This is a Go service. Add API, security, and integration-test agents.
|
|
291
294
|
```
|
|
292
295
|
|
|
293
|
-
##
|
|
296
|
+
## Retention
|
|
294
297
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
```bash
|
|
301
|
-
rm Harness/SETUP.md
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
After both steps, `Harness/SETUP.md` is fully isolated — no file references it, no trace remains. You are free to delete it at any time. It is a bootstrap scaffold, not a permanent fixture.
|
|
298
|
+
Keep this file as a setup reference. It is not part of the normal startup path:
|
|
299
|
+
routine sessions start at `CLAUDE.md` and `Harness/memory/startup-hints.md`;
|
|
300
|
+
`Harness/README.md` is the workflow router when routed. Re-open this file only for install/bootstrap,
|
|
301
|
+
migration, upgrade decisions, or explicit user requests for setup guidance.
|
|
305
302
|
|
|
306
303
|
---
|
|
307
304
|
|
|
@@ -324,4 +321,4 @@ After scaffolding, use the JSON output first. Files in `plan.create[]` were hand
|
|
|
324
321
|
1. Read `CLAUDE.md`, `Harness/MEMORY.md`, and `Harness/README.md`.
|
|
325
322
|
2. Follow the Required Bootstrap Sequence above.
|
|
326
323
|
3. Run `node Harness/scripts/validate-harness.mjs` after install. Run `node Harness/scripts/validate-harness.mjs --strict` after bootstrap resolves project-fact placeholders.
|
|
327
|
-
4.
|
|
324
|
+
4. Keep `Harness/specs/guides/SETUP.md` as a setup reference; normal sessions start at `CLAUDE.md`, and routed workflow work uses `Harness/README.md` as the router.
|
|
@@ -12,7 +12,7 @@ Extensions must preserve project and harness ownership boundaries.
|
|
|
12
12
|
- Treat existing project config as project fact. Read it before adding assets, then adapt new assets to the project instead of replacing the project.
|
|
13
13
|
- Register added agents, skills, workflows, and rules in `Harness/MEMORY.md` and this docs router where applicable.
|
|
14
14
|
- Added assets may extend `.claude/skills/`, `.claude/agents/`, `.claude/rules/`, or `Harness/workflows/`, but they must not replace core harness docs.
|
|
15
|
-
- Core harness docs are `Harness/README.md`, `Harness/PROGRESS.md`, `Harness/subagents.md`, `Harness/context-loading.md`, `Harness/dispatch.md`, `Harness/agent-workflow.md`, and this file.
|
|
15
|
+
- Core harness docs are `Harness/README.md`, `Harness/PROGRESS.md`, `Harness/specs/runtime/subagents.md`, `Harness/specs/runtime/context-loading.md`, `Harness/specs/runtime/dispatch.md`, `Harness/specs/runtime/agent-workflow.md`, and this file.
|
|
16
16
|
- If an optional workflow needs a new command or tool, document the command and fallback in `Harness/workflows/<name>.md` instead of changing core harness behavior.
|
|
17
17
|
|
|
18
18
|
## Agent Contract
|
|
@@ -35,7 +35,7 @@ Agent body must state:
|
|
|
35
35
|
- allowed write set or read-only
|
|
36
36
|
- forbidden scope
|
|
37
37
|
- verification or evidence
|
|
38
|
-
- return format from [subagents.md](subagents.md) and [dispatch.md](dispatch.md)
|
|
38
|
+
- return format from [subagents.md](../runtime/subagents.md) and [dispatch.md](../runtime/dispatch.md)
|
|
39
39
|
|
|
40
40
|
## Skill Contract
|
|
41
41
|
|
|
@@ -47,7 +47,7 @@ Every added skill must state:
|
|
|
47
47
|
- allowed writes
|
|
48
48
|
- output format
|
|
49
49
|
- whether to update `Harness/PROGRESS.md` and task files
|
|
50
|
-
- whether to use [subagents.md](subagents.md) and [dispatch.md](dispatch.md)
|
|
50
|
+
- whether to use [subagents.md](../runtime/subagents.md) and [dispatch.md](../runtime/dispatch.md)
|
|
51
51
|
|
|
52
52
|
Skills should extend the harness. They should not replace `Harness/README.md`, `Harness/PROGRESS.md`, `subagents.md`, `context-loading.md`, `dispatch.md`, or `agent-workflow.md`.
|
|
53
53
|
|
|
@@ -12,8 +12,8 @@ Use when starting a new product, clarifying a vague idea, or deciding the next p
|
|
|
12
12
|
| Acceptance | PRD | AC IDs in `ACCEPTANCE.md` section, feature doc, or task PLAN | every user-visible behavior has Given/When/Then and evidence method |
|
|
13
13
|
| Contract | acceptance criteria | UI/API/state contract tables | UI selectors, API payloads, state changes, and negative assertions are testable |
|
|
14
14
|
| Test Plan | contracts | `TEST_PLAN.md` section or task PLAN verification matrix | tests map to AC IDs before implementation starts |
|
|
15
|
-
| Architecture | PRD and contracts | `Harness/architecture.md` | boundaries and first ports are defined |
|
|
16
|
-
| Plan | PRD, AC, contracts, architecture | `Harness/tasks/<task-id>/PLAN.md`, optional `Harness/dispatch.md` | tasks have owners, write sets, forbidden truth files, and verification |
|
|
15
|
+
| Architecture | PRD and contracts | `Harness/project/architecture.md` | boundaries and first ports are defined |
|
|
16
|
+
| Plan | PRD, AC, contracts, architecture | `Harness/tasks/<task-id>/PLAN.md`, optional `Harness/specs/runtime/dispatch.md` | tasks have owners, write sets, forbidden truth files, and verification |
|
|
17
17
|
| Build | plan and tests | minimal vertical slice | implementation satisfies AC IDs without modifying truth files |
|
|
18
18
|
| Independent Validation | running slice | acceptance result matrix, screenshots/traces/logs | validator is not implementer; no unresolved critical/high findings |
|
|
19
19
|
| Debug | failed AC evidence | root-cause handoff and smallest fix | failing layer identified before edits |
|
|
@@ -4,10 +4,10 @@ Use when implementing, reviewing, debugging, or coordinating subagents.
|
|
|
4
4
|
|
|
5
5
|
This workflow is acceptance-driven. PRD-derived Acceptance Criteria are the
|
|
6
6
|
source of truth; implementation, tests, review, validation, debug, and memory
|
|
7
|
-
must trace to AC IDs. Load [ACCEPTANCE_PROTOCOL.md](ACCEPTANCE_PROTOCOL.md) for
|
|
8
|
-
gate rules, [TDD-GUIDE.md](TDD-GUIDE.md) for AC-linked RED tests,
|
|
9
|
-
[HARNESS_BRIDGE.md](HARNESS_BRIDGE.md) for UI/API/browser evidence, and
|
|
10
|
-
[AGENT_ISOLATION.md](AGENT_ISOLATION.md) before role splits.
|
|
7
|
+
must trace to AC IDs. Load [ACCEPTANCE_PROTOCOL.md](../protocols/ACCEPTANCE_PROTOCOL.md) for
|
|
8
|
+
gate rules, [TDD-GUIDE.md](../protocols/TDD-GUIDE.md) for AC-linked RED tests,
|
|
9
|
+
[HARNESS_BRIDGE.md](../protocols/HARNESS_BRIDGE.md) for UI/API/browser evidence, and
|
|
10
|
+
[AGENT_ISOLATION.md](../protocols/AGENT_ISOLATION.md) before role splits.
|
|
11
11
|
|
|
12
12
|
## ReAct Loop
|
|
13
13
|
|
|
@@ -118,8 +118,8 @@ Use [subagents.md](subagents.md) and [dispatch.md](dispatch.md) for multi-agent
|
|
|
118
118
|
| Mode | Agent Count Rule | Source |
|
|
119
119
|
|------|-----------------|--------|
|
|
120
120
|
| Default (non-WF) | up to 3 active agents by default | This file |
|
|
121
|
-
| `/wf` | WF-KERNEL tier selection (Light/Standard/Full) by risk and scope; full role chain only at WF-Full | [WF.md](WF.md) |
|
|
122
|
-
| `/wf-max` | WF kernel plus maximum useful fan-out (WF-Max-Useful default; WF-Max-Strict explicit only) | [WF-MAX.md](WF-MAX.md) |
|
|
121
|
+
| `/wf` | WF-KERNEL tier selection (Light/Standard/Full) by risk and scope; full role chain only at WF-Full | [WF.md](../workflows/WF.md) |
|
|
122
|
+
| `/wf-max` | WF kernel plus maximum useful fan-out (WF-Max-Useful default; WF-Max-Strict explicit only) | [WF-MAX.md](../workflows/WF-MAX.md) |
|
|
123
123
|
|
|
124
124
|
Prefer parallel read-only work first, then serial writes.
|
|
125
125
|
|
|
@@ -10,33 +10,97 @@ If this file and `Harness/README.md` disagree, follow `Harness/README.md`, recor
|
|
|
10
10
|
|
|
11
11
|
project files are the only durable communication channel; chat/subagent transcript state is non-authoritative. Important assumptions, decisions, blockers, evidence, and handoffs must be written to `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
## Context Tiers
|
|
14
|
+
|
|
15
|
+
These tiers are automatic route profiles, not user-selected modes. The agent
|
|
16
|
+
selects a profile from the explicit command, user request, active task state,
|
|
17
|
+
router row, skill trigger, and concrete file references.
|
|
18
|
+
|
|
19
|
+
Budgets are regression guards, not exclusion rules. If correctness requires a
|
|
20
|
+
file outside the current profile, load that file and record the reason in the
|
|
21
|
+
task notes/progress when the work is in WF. Do not skip required rules, source
|
|
22
|
+
files, contracts, tests, or evidence to stay under budget.
|
|
23
|
+
|
|
24
|
+
| Tier | When | Keep | Do Not Load |
|
|
25
|
+
| --- | --- | --- | --- |
|
|
26
|
+
| Thin startup | New installed-project session before task routing | `CLAUDE.md`, `Harness/memory/startup-hints.md` | `Harness/MEMORY.md`, `Harness/README.md`, `Harness/PROGRESS.md`, workflow docs, skill bodies |
|
|
27
|
+
| Direct task | Simple, single-step, low-risk request | `CLAUDE.md` plus only files needed for the task | full router, task capsules, unrelated Harness docs |
|
|
28
|
+
| Router prefix | Explicit `/wf-*`, `$wf-*`, or `/skills wf-*` command | `CLAUDE.md`, `Harness/MEMORY.md` index, `Harness/README.md`, `Harness/PROGRESS.md` only when active | unrelated workflow docs, all skills, all agents, unused tool schemas |
|
|
29
|
+
| Active task scope | Router found an active task | `STATE.json` first, then task `PROGRESS.md`, task `PLAN.md` only when decisions/scope need review, current feature doc when active | archived tasks, unrelated task directories, broad task history |
|
|
30
|
+
| Routed skill/doc | Router, command, or `tool_search` selects a specific capability | selected skill body and adjacent docs named by that skill/doc | all skill bodies, all tool schemas, whole `Harness/` tree |
|
|
31
|
+
|
|
32
|
+
After the tier is selected, load other docs only by trigger.
|
|
33
|
+
|
|
34
|
+
Escalation rule: when unsure whether a file is required, prefer targeted
|
|
35
|
+
keyword search or a one-file read over guessing from memory. Escalate from a
|
|
36
|
+
smaller profile to the next targeted profile only when the new file directly
|
|
37
|
+
proves or disproves the current decision.
|
|
38
|
+
|
|
39
|
+
## Cache-First Context Contract
|
|
40
|
+
|
|
41
|
+
Prompt-cache hit rate is a context-layout constraint. Preserve this order for
|
|
42
|
+
WF commands, skill adapters, and subagent packets:
|
|
43
|
+
|
|
44
|
+
1. Stable prefix: `CLAUDE.md`, `Harness/MEMORY.md` index, `Harness/README.md`,
|
|
45
|
+
selected workflow docs, and stable skill/agent indexes in deterministic
|
|
46
|
+
order.
|
|
47
|
+
2. Scoped references: task `STATE.json`, `PLAN.md`, contracts, selected source
|
|
48
|
+
files, and selected docs only.
|
|
49
|
+
3. Dynamic suffix: newest user message, active question, current heartbeat,
|
|
50
|
+
current date/time, cwd/runtime/model/channel, fresh search results, tool
|
|
51
|
+
output, command logs, screenshots, and validation evidence.
|
|
52
|
+
|
|
53
|
+
Rules:
|
|
54
|
+
|
|
55
|
+
- Do not reorder stable loads during a task.
|
|
56
|
+
- Put volatile values after the stable prefix; do not place timestamps, request
|
|
57
|
+
IDs, latest tool output, or fresh search results in startup/router text.
|
|
58
|
+
- Load skill bodies and tool schemas only when routed by the explicit command,
|
|
59
|
+
`Harness/README.md`, or `tool_search`; do not preload all skills or tools.
|
|
60
|
+
- Keep dispatch packets deterministic: canonical field order, stable tool/skill
|
|
61
|
+
list order, bounded `MaxReturnTokens`, and short `ReturnSchema`.
|
|
62
|
+
- Prefer file paths and compact task-state summaries over pasted logs or
|
|
63
|
+
transcripts. Append-only `PROGRESS.md`/`STATE.json` beats rewritten summaries
|
|
64
|
+
until compaction is required.
|
|
65
|
+
- Treat a model switch, reasoning/context-size change, enabled-tool/MCP change,
|
|
66
|
+
or compaction as a cache boundary and record it in task progress.
|
|
67
|
+
|
|
68
|
+
## Cache Validation Levels
|
|
69
|
+
|
|
70
|
+
- **L0 structure**: `validate-harness.mjs` proves the Harness still preserves
|
|
71
|
+
stable-prefix/dynamic-suffix routing, deferred skills/tools, and bounded
|
|
72
|
+
summaries. This is regression protection only.
|
|
73
|
+
- **L1 prefix simulation**: compare two serialized dispatch/context packets and
|
|
74
|
+
prove the stable prefix bytes are identical while only the dynamic suffix
|
|
75
|
+
changes. Use this when a runtime exposes prompt assembly locally.
|
|
76
|
+
Covered by `tests/l1-prefix-simulation.test.js` (positive match + negative
|
|
77
|
+
controls + anti-pollution detection).
|
|
78
|
+
- **L2 provider telemetry**: prove real cache behavior from model response
|
|
79
|
+
usage fields, such as OpenAI `cached_tokens` / `cache_write_tokens` or
|
|
80
|
+
Anthropic `cache_read_input_tokens` / `cache_creation_input_tokens`, across a
|
|
81
|
+
warm-up request and repeated same-prefix requests.
|
|
82
|
+
For Claude Code scripted probes, use
|
|
83
|
+
`node Harness/scripts/l2-cache-telemetry.mjs`; it records the exact CLI
|
|
84
|
+
flags, session IDs, usage fields, cost, duration, and claim-gate result in
|
|
85
|
+
`$HOME/.claude/cache-telemetry/`.
|
|
86
|
+
|
|
87
|
+
Do not claim real cache hits or hit-rate improvement from structure checks
|
|
88
|
+
alone. A real cache-hit claim requires L2 telemetry, or an explicit statement
|
|
89
|
+
that the current runtime does not expose provider cache metrics.
|
|
26
90
|
|
|
27
91
|
## Trigger Matrix
|
|
28
92
|
|
|
29
93
|
| Trigger | Load |
|
|
30
94
|
| --- | --- |
|
|
31
|
-
| idea, scope, MVP | `Harness/lifecycle.md`, `Harness/research/PRD.md`, `Harness/ACCEPTANCE_PROTOCOL.md` |
|
|
32
|
-
| acceptance, AC, criteria, contract, validation matrix | `Harness/ACCEPTANCE_PROTOCOL.md`, `Harness/AGENT_ISOLATION.md`, `Harness/HARNESS_BRIDGE.md` as needed |
|
|
95
|
+
| idea, scope, MVP | `Harness/specs/guides/lifecycle.md`, `Harness/research/PRD.md`, `Harness/specs/protocols/ACCEPTANCE_PROTOCOL.md` |
|
|
96
|
+
| acceptance, AC, criteria, contract, validation matrix | `Harness/specs/protocols/ACCEPTANCE_PROTOCOL.md`, `Harness/specs/protocols/AGENT_ISOLATION.md`, `Harness/specs/protocols/HARNESS_BRIDGE.md` as needed |
|
|
33
97
|
| research, competitors, stack choice | `Harness/research/README.md`, `Harness/research/research-results.md` |
|
|
34
|
-
| task split, owner, write set | `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, `Harness/agent-workflow.md` |
|
|
35
|
-
| parallel agents, dispatch, worktree decision | `Harness/subagents.md`, `Harness/dispatch.md`, `Harness/tasks/<task-id>/PLAN.md` |
|
|
36
|
-
| `/wf` mode (explicit only) | [Harness/WF.md](WF.md), [Harness/subagents.md](subagents.md), [Harness/dispatch.md](dispatch.md), [Harness/tasks/<task-id>/PLAN.md](tasks/<task-id>/PLAN.md) |
|
|
37
|
-
| `/wf-max` (explicit only) | [Harness/WF-MAX.md](WF-MAX.md), [Harness/subagents.md](subagents.md), [Harness/dispatch.md](dispatch.md), [Harness/tasks/<task-id>/PLAN.md](tasks/<task-id>/PLAN.md) |
|
|
38
|
-
| memory, scenario memory, repeated tool failure, repeated user correction, reusable lesson | `Harness/MEMORY.md`, `Harness/MEMORY_PROTOCOL.md`, the relevant `Harness/memory/*.md` file |
|
|
39
|
-
| subagent spawn | `Harness/subagents.md`, `Harness/AGENT_ISOLATION.md`, this file plus the role pack below |
|
|
98
|
+
| task split, owner, write set | `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, `Harness/specs/runtime/agent-workflow.md` |
|
|
99
|
+
| parallel agents, dispatch, worktree decision | `Harness/specs/runtime/subagents.md`, `Harness/specs/runtime/dispatch.md`, `Harness/tasks/<task-id>/PLAN.md` |
|
|
100
|
+
| `/wf` mode (explicit only) | [Harness/specs/workflows/WF.md](../workflows/WF.md), [Harness/specs/runtime/subagents.md](subagents.md), [Harness/specs/runtime/dispatch.md](dispatch.md), [Harness/tasks/<task-id>/PLAN.md](../../tasks/<task-id>/PLAN.md) |
|
|
101
|
+
| `/wf-max` (explicit only) | [Harness/specs/workflows/WF-MAX.md](../workflows/WF-MAX.md), [Harness/specs/runtime/subagents.md](subagents.md), [Harness/specs/runtime/dispatch.md](dispatch.md), [Harness/tasks/<task-id>/PLAN.md](../../tasks/<task-id>/PLAN.md) |
|
|
102
|
+
| memory, scenario memory, repeated tool failure, repeated user correction, reusable lesson | `Harness/MEMORY.md`, `Harness/specs/protocols/MEMORY_PROTOCOL.md`, the relevant `Harness/memory/*.md` file |
|
|
103
|
+
| subagent spawn | `Harness/specs/runtime/subagents.md`, `Harness/specs/protocols/AGENT_ISOLATION.md`, this file plus the role pack below |
|
|
40
104
|
|
|
41
105
|
## ECC Rules Per Role
|
|
42
106
|
|
|
@@ -11,14 +11,15 @@ Use when work needs parallel reading, independent review, cross-layer analysis,
|
|
|
11
11
|
- Main agent owns the final decision, integration, and verification.
|
|
12
12
|
- project files are the only durable communication channel; chat/subagent transcript state is non-authoritative.
|
|
13
13
|
- Important assumptions, decisions, blockers, evidence, and handoffs must be written to `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
|
|
14
|
-
- Resumable state is governed by [WF-STATE.md](WF-STATE.md). On session start, the controller reads STATE.json before building a fresh dispatch table.
|
|
14
|
+
- Resumable state is governed by [WF-STATE.md](../workflows/WF-STATE.md). On session start, the controller reads STATE.json before building a fresh dispatch table.
|
|
15
15
|
- PRD-derived Acceptance Criteria are the source of truth. Dispatch packets must carry the relevant AC IDs and contracts.
|
|
16
|
-
- Agent count: default (non-WF) <=3 active agents; `/wf` selects a tier dynamically per [WF-KERNEL.md](WF-KERNEL.md) (Light/Standard/Full); `/wf-max` inherits the selected tier and adds maximum safe fan-out (WF-Max-Useful default; WF-Max-Strict explicit only), removing the Harness default cap through the span formula. Real concurrency is still bounded by runtime thread budget, config, billing, and local resources. Use current runtime subagents first, close completed agents, then peer-CLI overflow (`claude -p`, `codex exec`, or `opencode run --agent <role> --dir .`). Generated Codex config defaults to `agents.max_threads = 12` and `agents.max_depth = 1`; ask the user before raising `agents.max_threads` above that default. See [WF.md](WF.md) and [WF-MAX.md](WF-MAX.md).
|
|
16
|
+
- Agent count: default (non-WF) <=3 active agents; `/wf` selects a tier dynamically per [WF-KERNEL.md](../workflows/WF-KERNEL.md) (Light/Standard/Full); `/wf-max` inherits the selected tier and adds maximum safe fan-out (WF-Max-Useful default; WF-Max-Strict explicit only), removing the Harness default cap through the span formula. Real concurrency is still bounded by runtime thread budget, config, billing, and local resources. Use current runtime subagents first, close completed agents, then peer-CLI overflow (`claude -p`, `codex exec`, or `opencode run --agent <role> --dir .`). Generated Codex config defaults to `agents.max_threads = 12` and `agents.max_depth = 1`; ask the user before raising `agents.max_threads` above that default. See [WF.md](../workflows/WF.md) and [WF-MAX.md](../workflows/WF-MAX.md).
|
|
17
17
|
- Read-only agents may run in parallel.
|
|
18
18
|
- Writing agents run serially unless write sets are disjoint.
|
|
19
19
|
- Use a worktree when two agents may touch overlapping files or long-running branches.
|
|
20
20
|
- Only summaries enter main context. Load named files directly when details are needed.
|
|
21
21
|
- Only the controller or task-scribe writes task state (PROGRESS.md, PLAN.md). Production source agents (implementer, debugger, test-writer) never write task state unless explicitly dispatched as task-scribe.
|
|
22
|
+
- Cache-first dispatch follows `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: canonical field order, stable tool/skill list order, dynamic evidence/logs last, and bounded `MaxReturnTokens`/`ReturnSchema`.
|
|
22
23
|
|
|
23
24
|
## Scope
|
|
24
25
|
|
|
@@ -4,10 +4,15 @@ Purpose: coordinate subagents for speed without losing control of scope, evidenc
|
|
|
4
4
|
|
|
5
5
|
Use this file when work needs multiple roles, parallel reading, independent review, broad context, repeated failures, or explicit `/wf` / `/wf-max` invocation.
|
|
6
6
|
|
|
7
|
+
Cache-first discipline: subagent context packs follow
|
|
8
|
+
`Harness/specs/runtime/context-loading.md#Cache-First Context Contract`. Inject only routed
|
|
9
|
+
docs and selected files, keep dispatch fields in deterministic order, defer
|
|
10
|
+
unused skill/tool schemas, and return bounded summaries instead of transcripts.
|
|
11
|
+
|
|
7
12
|
project files are the only durable communication channel; chat/subagent transcript state is non-authoritative. Important assumptions, decisions, blockers, evidence, and handoffs must be written to `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
|
|
8
13
|
|
|
9
|
-
Subagent work is acceptance-driven. Use [AGENT_ISOLATION.md](AGENT_ISOLATION.md)
|
|
10
|
-
for role/context isolation and [ACCEPTANCE_PROTOCOL.md](ACCEPTANCE_PROTOCOL.md)
|
|
14
|
+
Subagent work is acceptance-driven. Use [AGENT_ISOLATION.md](../protocols/AGENT_ISOLATION.md)
|
|
15
|
+
for role/context isolation and [ACCEPTANCE_PROTOCOL.md](../protocols/ACCEPTANCE_PROTOCOL.md)
|
|
11
16
|
for PRD-GATE, AC-GATE, CONTRACT-GATE, TEST-GATE, VALIDATION-GATE, and
|
|
12
17
|
REVIEW-GATE.
|
|
13
18
|
|
|
@@ -82,7 +87,7 @@ Hard rule: implementer may not be the independent validator for the same AC ID.
|
|
|
82
87
|
|
|
83
88
|
## WF Default Fan-Out
|
|
84
89
|
|
|
85
|
-
Explicit `/wf`, `$wf`, or `/skills wf` requires tier-specific role coverage per `Harness/WF.md`.
|
|
90
|
+
Explicit `/wf`, `$wf`, or `/skills wf` requires tier-specific role coverage per `Harness/specs/workflows/WF.md`.
|
|
86
91
|
WF-Light: planner + test-writer + implementer + verifier.
|
|
87
92
|
WF-Standard: adds research/docs + one review lens.
|
|
88
93
|
WF-Full: complete role-chain coverage from `.claude/agents/` before closeout: plan,
|
|
@@ -106,7 +111,7 @@ Then add phase-specific agents:
|
|
|
106
111
|
- `context-master` before closeout for knowledge extraction
|
|
107
112
|
- `memory-master` after repeated failures and during closeout for consolidation
|
|
108
113
|
|
|
109
|
-
Collaboration mode is determined by WF tier and concrete conditions, not a fixed ratio. See `Harness/WF.md` for the tier decision guide. Summary: WF-Light uses minimal roles. WF-Standard uses moderate roles with one review lens. WF-Full always uses the complete role chain. Non-WF complex work may still use subagents and planning without entering any WF mode. Repeated failure after two attempts escalates to next tier.
|
|
114
|
+
Collaboration mode is determined by WF tier and concrete conditions, not a fixed ratio. See `Harness/specs/workflows/WF.md` for the tier decision guide. Summary: WF-Light uses minimal roles. WF-Standard uses moderate roles with one review lens. WF-Full always uses the complete role chain. Non-WF complex work may still use subagents and planning without entering any WF mode. Repeated failure after two attempts escalates to next tier.
|
|
110
115
|
|
|
111
116
|
## Efficiency Ladder
|
|
112
117
|
|
|
@@ -168,7 +173,7 @@ controller intake
|
|
|
168
173
|
|
|
169
174
|
## Dispatch Pack
|
|
170
175
|
|
|
171
|
-
Use the canonical dispatch input and handoff format in `Harness/dispatch.md`. Every subagent dispatch must be self-contained - inject only the docs selected by `Harness/README.md` and `Harness/context-loading.md`. On session start, the controller reads `Harness/tasks/<task-id>/STATE.json` per [WF-STATE.md](WF-STATE.md) to resume the dispatch ledger and ready queue.
|
|
176
|
+
Use the canonical dispatch input and handoff format in `Harness/specs/runtime/dispatch.md`. Every subagent dispatch must be self-contained - inject only the docs selected by `Harness/README.md` and `Harness/specs/runtime/context-loading.md`. On session start, the controller reads `Harness/tasks/<task-id>/STATE.json` per [WF-STATE.md](../workflows/WF-STATE.md) to resume the dispatch ledger and ready queue.
|
|
172
177
|
|
|
173
178
|
## Parallelism Rules
|
|
174
179
|
|
|
@@ -22,7 +22,7 @@ But perpetual search without direction = drift. The **Roadmap** is the anchor.
|
|
|
22
22
|
|
|
23
23
|
WF-AUTO-SPARK is a `/wf` variant layered on WF-AUTO: it inherits the WF-KERNEL contract via WF-AUTO and WF constraints, and does not define an independent heavy process. External spark search replaces discovery only; it does not replace acceptance, implementation, review, verification, reflection, or evidence.
|
|
24
24
|
|
|
25
|
-
Accepted spark candidates re-enter the standard W2-W5 gates per [WF-KERNEL.md](WF-KERNEL.md): implementer (one file_claim, ≤3 files, ≤50 lines), verifier, reviewer(s), reflector. Spark searchers are read-only. Any implementation must use the dispatch packet from `Harness/dispatch.md` with explicit write set, forbidden truth files, AC IDs, and verification commands. A candidate with no verifier evidence or no reflector PASS is not accepted, even if the idea is valuable.
|
|
25
|
+
Accepted spark candidates re-enter the standard W2-W5 gates per [WF-KERNEL.md](WF-KERNEL.md): implementer (one file_claim, ≤3 files, ≤50 lines), verifier, reviewer(s), reflector. Spark searchers are read-only. Any implementation must use the dispatch packet from `Harness/specs/runtime/dispatch.md` with explicit write set, forbidden truth files, AC IDs, and verification commands. A candidate with no verifier evidence or no reflector PASS is not accepted, even if the idea is valuable.
|
|
26
26
|
|
|
27
27
|
For task-state writes, CEO provides concise bullets and decisions; task-scribe formats task-state writes for roadmap, cycle PLAN, heartbeat, evidence pointers, and closeout. If task-scribe is unavailable, CEO may write the smallest durable checkpoint and must record that degradation in `PROGRESS.md`. This keeps the high-reasoning controller focused on decisions instead of spending tokens formatting process files.
|
|
28
28
|
|
|
@@ -313,7 +313,7 @@ This replaces the broken `/wf-auto` auto-continue. No silent drift across sessio
|
|
|
313
313
|
|
|
314
314
|
| File | Purpose |
|
|
315
315
|
|------|---------|
|
|
316
|
-
| `Harness/WF-AUTO-SPARK.md` | This spec |
|
|
316
|
+
| `Harness/specs/workflows/WF-AUTO-SPARK.md` | This spec |
|
|
317
317
|
| `Harness/tasks/auto/SPARK-ROADMAP.md` | Active roadmap (created at startup) |
|
|
318
318
|
| `Harness/tasks/auto/PLAN.md` | Per-cycle change spec |
|
|
319
319
|
| `Harness/tasks/auto/PROGRESS.md` | Cycle log, heartbeat, evidence ledger |
|
|
@@ -302,6 +302,11 @@ Runtime hooks are disabled by default across the Harness scaffold. The only
|
|
|
302
302
|
allowed exception is an explicitly enabled `/wf-auto` tick hook for long-running
|
|
303
303
|
auto-optimization.
|
|
304
304
|
|
|
305
|
+
Manual or benchmark-driven single-cycle `/wf-auto` runs use the same bounded
|
|
306
|
+
tick contract: they may stop because the caller explicitly requested one tick,
|
|
307
|
+
but they still MUST create or update `Harness/tasks/auto/PLAN.md` and
|
|
308
|
+
`Harness/tasks/auto/PROGRESS.md` before returning.
|
|
309
|
+
|
|
305
310
|
The hook is not a role-enforcement mechanism, not a memory injection mechanism,
|
|
306
311
|
and not WF-MAX state. It is only a bounded tick trigger:
|
|
307
312
|
|
|
@@ -368,7 +373,7 @@ Spark is NOT a separate optimization engine. It is a **candidate provider** plug
|
|
|
368
373
|
- User explicitly requests `/wf-auto-spark` → full perpetual inspiration mode (see `WF-AUTO-SPARK.md`)
|
|
369
374
|
- User says "I don't know" at an Intent Checkpoint
|
|
370
375
|
|
|
371
|
-
**`/wf-auto-spark` is a standalone perpetual mode** (spec: `Harness/WF-AUTO-SPARK.md`). Unlike vanilla spark which is a candidate provider inside `/wf-auto`, the standalone mode:
|
|
376
|
+
**`/wf-auto-spark` is a standalone perpetual mode** (spec: `Harness/specs/workflows/WF-AUTO-SPARK.md`). Unlike vanilla spark which is a candidate provider inside `/wf-auto`, the standalone mode:
|
|
372
377
|
- Never auto-stops — only user can stop it
|
|
373
378
|
- Requires a roadmap (North Star + staged milestones) declared at startup
|
|
374
379
|
- Enforces ≤50% deviation guard against North Star
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
The WF Kernel is the shared engine for `/wf`, `/wf-max`, `/wf-auto`, `/wf-auto-spark`, `/wf-review`, and `/wf-browser`. Variants extend the kernel; they do not duplicate the orchestration logic.
|
|
4
4
|
|
|
5
|
+
## Cache-First Context Contract
|
|
6
|
+
|
|
7
|
+
All WF variants preserve prompt-cache shape: stable workflow instructions and
|
|
8
|
+
deterministic dispatch schema first; task-specific state, current runtime facts,
|
|
9
|
+
and latest tool outputs last. Use
|
|
10
|
+
`Harness/specs/runtime/context-loading.md#Cache-First Context Contract` for load ordering.
|
|
11
|
+
Dispatch packets keep canonical field order, load only selected skills/tools,
|
|
12
|
+
and return bounded summaries through `MaxReturnTokens` and `ReturnSchema`
|
|
13
|
+
instead of transcripts.
|
|
14
|
+
|
|
5
15
|
## Role / Model Matrix
|
|
6
16
|
|
|
7
17
|
The orchestrator dispatches agents by role, model tier, and task type. No single agent type handles all work.
|