create-harness-vibe-coding 0.8.3 → 0.8.5
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/README-CN.md +2 -2
- package/README.md +2 -3
- package/package.json +1 -2
- package/src/generator.js +4 -5
- package/templates/common/.claude/agents/context-master.md +3 -2
- package/templates/common/.claude/agents/memory-master.md +3 -2
- package/templates/common/.claude/agents/tdd-guide.md +45 -19
- package/templates/common/.claude/agents/test-writer.md +52 -38
- package/templates/common/.claude/commands/wf-help.md +21 -0
- package/templates/common/.claude/rules/ecc/common.md +1 -1
- package/templates/common/.claude/settings.json +33 -90
- package/templates/common/.claude/skills/tdd/SKILL.md +18 -11
- package/templates/common/.claude/skills/wf-auto/SKILL.md +1 -1
- package/templates/common/.claude/skills/wf-remove/SKILL.md +26 -13
- package/templates/common/.codex/config.toml +0 -2
- package/templates/common/.harness-version +57 -39
- package/templates/common/AGENTS.md +7 -6
- package/templates/common/CLAUDE.md +3 -4
- package/templates/common/Harness/ACCEPTANCE_PROTOCOL.md +170 -0
- package/templates/common/Harness/AGENT_ISOLATION.md +73 -0
- package/templates/common/Harness/DEBUG_PROTOCOL.md +64 -0
- package/templates/common/Harness/ECC-GUIDE.md +4 -4
- package/templates/common/Harness/HARNESS_BRIDGE.md +128 -0
- package/templates/common/Harness/MEMORY_PROTOCOL.md +114 -0
- package/templates/common/Harness/README.md +31 -16
- package/templates/common/Harness/TDD-GUIDE.md +138 -56
- package/templates/common/Harness/WF-AUTO.md +77 -16
- package/templates/common/Harness/WF-MAX.md +81 -22
- package/templates/common/Harness/WF.md +38 -18
- package/templates/common/Harness/agent-workflow.md +47 -22
- package/templates/common/Harness/context-loading.md +33 -32
- package/templates/common/Harness/dispatch.md +10 -4
- package/templates/common/Harness/extension.md +3 -3
- package/templates/common/Harness/lifecycle.md +19 -13
- package/templates/common/Harness/research/PRD.md +18 -9
- package/templates/common/Harness/subagents.md +41 -14
- package/templates/common/Harness/tasks/_template/NAMING.md +2 -2
- package/templates/common/Harness/tasks/_template/PLAN.md +53 -11
- package/templates/common/Harness/templates/ACCEPTANCE.template.md +20 -0
- package/templates/common/Harness/templates/API_CONTRACT.template.md +40 -0
- package/templates/common/Harness/templates/PLAYWRIGHT_SPEC.template.ts +21 -0
- package/templates/common/Harness/templates/PRD.template.md +45 -0
- package/templates/common/Harness/templates/TEST_PLAN.template.md +14 -0
- package/templates/common/Harness/templates/UI_CONTRACT.template.md +11 -0
- package/templates/common/Harness/templates/VALIDATION_REPORT.template.md +20 -0
- package/templates/common/MEMORY.md +14 -3
- package/templates/common/README.md +1 -1
- package/templates/common/SETUP.md +24 -20
- package/templates/common/scripts/validate-harness.mjs +137 -41
- package/templates/common/scripts/wf-remove.mjs +123 -56
- package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +11 -3
- package/templates/optional/skills/ts-react-frontend/Harness/workflows/ts-react-frontend.md +1 -1
- package/templates/common/.codex/hooks.json +0 -59
- package/templates/common/scripts/wf-mode-hook.mjs +0 -642
- package/templates/common/scripts/wf-statusline.ps1 +0 -62
- package/templates/common/scripts/wf-statusline.sh +0 -67
|
@@ -8,14 +8,14 @@ This scaffold is a 0-1 product harness:
|
|
|
8
8
|
|
|
9
9
|
- short agent entry files
|
|
10
10
|
- dynamic docs router
|
|
11
|
-
- PRD, research protocol, architecture, ports, data-flow, state templates
|
|
11
|
+
- Mini PRD, acceptance protocol, UI/API contracts, research protocol, architecture, ports, data-flow, state templates
|
|
12
12
|
- active `Harness/PROGRESS.md`
|
|
13
13
|
- `Harness/MEMORY.md` plus a `Harness/memory/` folder for durable self-learning, user corrections, and tool reflections
|
|
14
14
|
- built-in common agents
|
|
15
15
|
- subagent orchestration and context-loading protocol
|
|
16
16
|
- skill-style dynamic loaders in `.claude/skills/` for Claude Code and `.agents/skills/` for Codex
|
|
17
17
|
- lightweight harness validator
|
|
18
|
-
- test/review/
|
|
18
|
+
- acceptance/test/review/debug/memory loop
|
|
19
19
|
|
|
20
20
|
It does not guess your stack or business domain. The agent MUST detect or ask, then install the right ECC rules for the project.
|
|
21
21
|
|
|
@@ -26,7 +26,7 @@ Start Claude Code or Codex, then say:
|
|
|
26
26
|
```text
|
|
27
27
|
Read Harness/SETUP.md. Bootstrap this project as a 0-1 product harness.
|
|
28
28
|
Use Harness/README.md as the router. Keep context small.
|
|
29
|
-
First clarify the idea, then create PRD, research, architecture, Harness/PROGRESS.md
|
|
29
|
+
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
30
|
```
|
|
31
31
|
|
|
32
32
|
## Required Bootstrap Sequence
|
|
@@ -34,16 +34,19 @@ First clarify the idea, then create PRD, research, architecture, Harness/PROGRES
|
|
|
34
34
|
Claude must follow this order:
|
|
35
35
|
|
|
36
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`, and `Harness/
|
|
38
|
-
2. Ask up to 3 blocking product questions. If not blocked, record assumptions in `Harness/tasks/<task-id>/PLAN.md`.
|
|
39
|
-
3. Fill `Harness/research/PRD.md` with
|
|
40
|
-
4. Read `Harness/research/README.md`, then fill `Harness/research/research-results.md` with adopted/rejected research choices.
|
|
41
|
-
5.
|
|
42
|
-
6.
|
|
43
|
-
7.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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.
|
|
38
|
+
2. Ask up to 3 blocking product questions. If not blocked, record assumptions in `Harness/tasks/<task-id>/PLAN.md`.
|
|
39
|
+
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
|
+
4. Read `Harness/research/README.md`, then fill `Harness/research/research-results.md` with adopted/rejected research choices.
|
|
41
|
+
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`.
|
|
43
|
+
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.
|
|
45
|
+
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.
|
|
48
|
+
11. Run `node Harness/scripts/validate-harness.mjs --strict`.
|
|
49
|
+
12. 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.
|
|
47
50
|
|
|
48
51
|
## Install or Upgrade Path
|
|
49
52
|
|
|
@@ -61,7 +64,7 @@ When adding this harness to a project that already has source code, docs, CI, or
|
|
|
61
64
|
1. Get the machine-readable install report first with `npx create-harness-vibe-coding@latest <project-name> <target-dir> -y --dry-run --on-conflict skip --json`. Use `scan.markers` and `agent.aiMergeRequired` instead of hand-written root probes for install decisions. Do manual project-fact reading only after the script has created missing Harness files.
|
|
62
65
|
2. Record discovered facts and open questions in `Harness/tasks/<task-id>/PROGRESS.md` before changing harness docs.
|
|
63
66
|
3. Fill `Harness/research/PRD.md`, `Harness/research/research-results.md`, `Harness/architecture.md` from observed project facts plus explicit user input.
|
|
64
|
-
4. Existing configuration is project fact. Do not overwrite `CLAUDE.md`, `AGENTS.md`, `.claude/`, `.agents/`, `.codex/`, `.gitignore`, settings,
|
|
67
|
+
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.
|
|
65
68
|
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`.
|
|
66
69
|
6. Run `node Harness/scripts/validate-harness.mjs --strict` after project-fact placeholders have been resolved or intentionally recorded as open. Use the non-strict validator only for early structural checks.
|
|
67
70
|
|
|
@@ -174,8 +177,9 @@ Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeh
|
|
|
174
177
|
- `{{MUST_1..3}}`: concrete, testable MVP items (checkbox form)
|
|
175
178
|
- `{{NON_GOAL_1..3}}`: explicitly out-of-scope items
|
|
176
179
|
- `{{USER_ROLE}}`, `{{SCENARIO}}`, `{{FREQUENCY}}`, `{{PAIN}}`: one row per user type
|
|
177
|
-
- `
|
|
178
|
-
-
|
|
180
|
+
- `AC-001..003`: verifiable project-level acceptance criteria written as Given/When/Then summaries
|
|
181
|
+
- UI/API contract requirements: stable selectors, endpoint contracts, state changes, and evidence methods for relevant AC IDs
|
|
182
|
+
- `{{DIMENSION}}`, `{{TARGET}}`, `{{MEASUREMENT}}`: non-functional requirements (perf, security, etc.)
|
|
179
183
|
|
|
180
184
|
**`Harness/research/research-results.md`** — Tech decisions. Research before filling:
|
|
181
185
|
- Use `Harness/research/README.md` as the research protocol.
|
|
@@ -210,7 +214,7 @@ False confidence is worse than a question. If you catch yourself thinking "this
|
|
|
210
214
|
|
|
211
215
|
## How to Find Proper Skills
|
|
212
216
|
|
|
213
|
-
After the architecture stage reveals your stack, inspect existing `.claude/skills/`, `.agents/skills/`, plugins,
|
|
217
|
+
After the architecture stage reveals your stack, inspect existing `.claude/skills/`, `.agents/skills/`, plugins, and custom rules before recommending anything. Skills teach Claude Code and Codex domain-specific patterns, testing conventions, and design rules, but duplicate skills create routing noise.
|
|
214
218
|
|
|
215
219
|
**Built-in route**: invoke the `/find-skills` skill (or say "help me find skills for X"). Examples:
|
|
216
220
|
|
|
@@ -239,13 +243,13 @@ ECC and Superpowers overlap ~80% in topic coverage but serve different purposes:
|
|
|
239
243
|
| | ECC Rules | Superpowers Skills |
|
|
240
244
|
|---|------|------|
|
|
241
245
|
| **Role** | Coding STANDARD (what to enforce) | Coding GUIDE (how to execute) |
|
|
242
|
-
| **Enforcement** |
|
|
246
|
+
| **Enforcement** | Validator plus documented command evidence | Agent self-discipline |
|
|
243
247
|
| **Scope** | Universal + per-language (TS/Python/Go/...) | Universal (no language specifics) |
|
|
244
248
|
| **TDD** | `testing.md`: coverage ≥80%, AAA pattern | `test-driven-development`: red-green-refactor workflow |
|
|
245
249
|
| **Code Review** | `code-review.md`: severity levels, checklist | `requesting-code-review`: dispatch reviewer subagent |
|
|
246
250
|
| **Subagents** | `subagents.md` + `dispatch.md`: role packs, write sets | `subagent-driven-development`: two-stage review after each task |
|
|
247
251
|
| **Verification** | `testing.md` + `agent-workflow.md`: evidence before claims | `verification-before-completion`: verification before claiming done |
|
|
248
|
-
| **Unique** | Design quality, performance budgets, security CSP, per-language idioms
|
|
252
|
+
| **Unique** | Design quality, performance budgets, security CSP, per-language idioms | Brainstorming, git worktrees |
|
|
249
253
|
|
|
250
254
|
**Installation rule:**
|
|
251
255
|
1. **ECC is mandatory.** Install `common/` + stack-specific rules during bootstrap step 0. See `Harness/ECC-GUIDE.md`.
|
|
@@ -267,7 +271,7 @@ This scaffold includes built-in harness skills in `.claude/skills/*` and mirrore
|
|
|
267
271
|
|
|
268
272
|
## Optional Agent Assets
|
|
269
273
|
|
|
270
|
-
After the product shape is known, Claude Code may also install or copy stack-specific agents
|
|
274
|
+
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.
|
|
271
275
|
|
|
272
276
|
Examples:
|
|
273
277
|
|
|
@@ -33,11 +33,12 @@ const commonAgents = [
|
|
|
33
33
|
'review-manager',
|
|
34
34
|
];
|
|
35
35
|
|
|
36
|
-
const commonSkills = [
|
|
37
|
-
'wf',
|
|
38
|
-
'
|
|
39
|
-
'wf-
|
|
40
|
-
'wf-
|
|
36
|
+
const commonSkills = [
|
|
37
|
+
'wf',
|
|
38
|
+
'tdd',
|
|
39
|
+
'wf-update',
|
|
40
|
+
'wf-max',
|
|
41
|
+
'wf-review',
|
|
41
42
|
'wf-learn',
|
|
42
43
|
'subagent-orchestrator',
|
|
43
44
|
'wf-readme',
|
|
@@ -56,14 +57,26 @@ const required = [
|
|
|
56
57
|
'AGENTS.md',
|
|
57
58
|
'CLAUDE.md',
|
|
58
59
|
'README.md',
|
|
59
|
-
'Harness/MEMORY.md',
|
|
60
|
-
'Harness/WF.md',
|
|
61
|
-
'Harness/WF-MAX.md',
|
|
62
|
-
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
60
|
+
'Harness/MEMORY.md',
|
|
61
|
+
'Harness/WF.md',
|
|
62
|
+
'Harness/WF-MAX.md',
|
|
63
|
+
'Harness/ACCEPTANCE_PROTOCOL.md',
|
|
64
|
+
'Harness/AGENT_ISOLATION.md',
|
|
65
|
+
'Harness/HARNESS_BRIDGE.md',
|
|
66
|
+
'Harness/DEBUG_PROTOCOL.md',
|
|
67
|
+
'Harness/MEMORY_PROTOCOL.md',
|
|
68
|
+
'Harness/templates/PRD.template.md',
|
|
69
|
+
'Harness/templates/ACCEPTANCE.template.md',
|
|
70
|
+
'Harness/templates/UI_CONTRACT.template.md',
|
|
71
|
+
'Harness/templates/API_CONTRACT.template.md',
|
|
72
|
+
'Harness/templates/TEST_PLAN.template.md',
|
|
73
|
+
'Harness/templates/PLAYWRIGHT_SPEC.template.ts',
|
|
74
|
+
'Harness/templates/VALIDATION_REPORT.template.md',
|
|
75
|
+
...memoryFiles,
|
|
76
|
+
'.codex/config.toml',
|
|
77
|
+
'.claude/settings.json',
|
|
78
|
+
'.claude/commands/wf-help.md',
|
|
79
|
+
'.claude/rules/ecc/common.md',
|
|
67
80
|
...commonAgents.map(agent => `.claude/agents/${agent}.md`),
|
|
68
81
|
...commonSkills.map(skill => `.claude/skills/${skill}/SKILL.md`),
|
|
69
82
|
...commonSkills.map(skill => `.agents/skills/${skill}/SKILL.md`),
|
|
@@ -78,8 +91,8 @@ const required = [
|
|
|
78
91
|
'Harness/architecture.md',
|
|
79
92
|
'Harness/research/README.md',
|
|
80
93
|
'Harness/research/research-results.md',
|
|
81
|
-
'Harness/research/PRD.md',
|
|
82
|
-
'Harness/scripts/wf-update-check.mjs',
|
|
94
|
+
'Harness/research/PRD.md',
|
|
95
|
+
'Harness/scripts/wf-update-check.mjs',
|
|
83
96
|
'Harness/scripts/wf-remove.mjs',
|
|
84
97
|
'Harness/scripts/scan-clean.mjs',
|
|
85
98
|
'Harness/.harness-version',
|
|
@@ -121,11 +134,16 @@ function read(rel) {
|
|
|
121
134
|
return fs.existsSync(file) ? fs.readFileSync(file, 'utf8') : '';
|
|
122
135
|
}
|
|
123
136
|
|
|
124
|
-
function requireText(rel, text, label = text) {
|
|
125
|
-
const body = read(rel);
|
|
126
|
-
if (body && !body.includes(text)) errors.push(`${rel} missing ${label}`);
|
|
127
|
-
}
|
|
128
|
-
|
|
137
|
+
function requireText(rel, text, label = text) {
|
|
138
|
+
const body = read(rel);
|
|
139
|
+
if (body && !body.includes(text)) errors.push(`${rel} missing ${label}`);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function forbidText(rel, text, label = text) {
|
|
143
|
+
const body = read(rel);
|
|
144
|
+
if (body && body.includes(text)) errors.push(`${rel} contains forbidden ${label}`);
|
|
145
|
+
}
|
|
146
|
+
|
|
129
147
|
function frontmatterField(text, field) {
|
|
130
148
|
const match = text.match(new RegExp(`^${field}:\\s*(.+)$`, 'm'));
|
|
131
149
|
return match ? match[1].trim() : '';
|
|
@@ -209,11 +227,25 @@ function registeredWorkflowFiles(...texts) {
|
|
|
209
227
|
return [...files].sort();
|
|
210
228
|
}
|
|
211
229
|
|
|
212
|
-
for (const rel of required) {
|
|
213
|
-
if (!fs.existsSync(path.join(root, rel))) {
|
|
214
|
-
errors.push(`missing required file: ${rel}`);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
230
|
+
for (const rel of required) {
|
|
231
|
+
if (!fs.existsSync(path.join(root, rel))) {
|
|
232
|
+
errors.push(`missing required file: ${rel}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const removedHookArtifacts = [
|
|
237
|
+
'Harness/HOOK_PROTOCOL.md',
|
|
238
|
+
'Harness/scripts/wf-mode-hook.mjs',
|
|
239
|
+
'Harness/scripts/wf-statusline.sh',
|
|
240
|
+
'Harness/scripts/wf-statusline.ps1',
|
|
241
|
+
'tests/e2e-wf-hooks.test.mjs',
|
|
242
|
+
];
|
|
243
|
+
|
|
244
|
+
for (const rel of removedHookArtifacts) {
|
|
245
|
+
if (fs.existsSync(path.join(root, rel))) {
|
|
246
|
+
errors.push(`removed hook artifact should not exist: ${rel}`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
217
249
|
|
|
218
250
|
// Task capsule template files
|
|
219
251
|
const taskTemplateDir = path.join(root, 'Harness', 'tasks', '_template');
|
|
@@ -285,8 +317,9 @@ requireText('CLAUDE.md', 'user corrects the same assumption/pattern 2+ times', '
|
|
|
285
317
|
requireText('CLAUDE.md', 'If `Harness/` exists, this repository is governed by the Harness contract', 'Harness binding contract');
|
|
286
318
|
requireText('CLAUDE.md', 'Harness/MEMORY.md` is the memory/resource router', 'memory/resource router');
|
|
287
319
|
requireText('CLAUDE.md', 'Harness/README.md#Load By Task', 'Harness task router');
|
|
288
|
-
requireText('CLAUDE.md', 'Harness/SETUP.md` exists, follow it before normal project work', 'setup bootstrap contract');
|
|
289
|
-
requireText('
|
|
320
|
+
requireText('CLAUDE.md', 'Harness/SETUP.md` exists, follow it before normal project work', 'setup bootstrap contract');
|
|
321
|
+
requireText('Harness/SETUP.md', 'Harness/MEMORY_PROTOCOL.md', 'setup memory protocol reference');
|
|
322
|
+
requireText('CLAUDE.md', 'subagent-orchestrator` and `Harness/subagents.md', 'subagent orchestrator entry trigger');
|
|
290
323
|
requireText('CLAUDE.md', 'Harness/PROGRESS.md` is the global task index', 'PROGRESS global task index');
|
|
291
324
|
requireText('CLAUDE.md', 'Harness/tasks/', 'task capsule directory reference');
|
|
292
325
|
requireText('CLAUDE.md', 'Subagents are readers and reporters', 'subagent state committer rule');
|
|
@@ -443,17 +476,20 @@ for (const agent of commonAgents) {
|
|
|
443
476
|
}
|
|
444
477
|
}
|
|
445
478
|
|
|
446
|
-
requireText('Harness/extension.md', 'Skills should extend the harness');
|
|
447
|
-
requireText('Harness/agent-workflow.md', 'Harness/tasks/<task-id>/PROGRESS.md');
|
|
448
|
-
requireText('Harness/
|
|
479
|
+
requireText('Harness/extension.md', 'Skills should extend the harness');
|
|
480
|
+
requireText('Harness/agent-workflow.md', 'Harness/tasks/<task-id>/PROGRESS.md');
|
|
481
|
+
requireText('Harness/agent-workflow.md', 'TDD-GUIDE.md', 'agent workflow loads TDD guide');
|
|
482
|
+
requireText('Harness/agent-workflow.md', 'real user-path test', 'agent workflow real user path requirement');
|
|
483
|
+
requireText('Harness/research/README.md', 'research-results.md');
|
|
449
484
|
requireText('Harness/WF.md', 'Ralph-style harness loop', 'WF loop description');
|
|
450
485
|
requireText('Harness/WF.md', 'Heartbeat Protocol', 'heartbeat protocol');
|
|
451
486
|
requireText('Harness/WF.md', 'WF mode requires multi-subagent orchestration by default', 'WF multi-subagent default');
|
|
452
487
|
requireText('Harness/WF.md', 'Explicit `/wf`, `$wf`, `wf mode`, `workflow mode`, or `wk mode` MUST use at least 3 distinct role passes', 'explicit WF/WK role-pass minimum');
|
|
453
488
|
requireText('Harness/WF.md', '.claude/agents/', 'WF built-in agent roster path');
|
|
454
|
-
requireText('Harness/WF.md', 'Collaboration decision tree', 'WF decision tree');
|
|
455
|
-
requireText('Harness/WF.md', 'Harness/tasks/', 'WF task directory reference');
|
|
456
|
-
requireText('Harness/
|
|
489
|
+
requireText('Harness/WF.md', 'Collaboration decision tree', 'WF decision tree');
|
|
490
|
+
requireText('Harness/WF.md', 'Harness/tasks/', 'WF task directory reference');
|
|
491
|
+
requireText('Harness/WF.md', 'IMPLEMENT-GATE', 'WF implement gate naming');
|
|
492
|
+
requireText('Harness/README.md', '`wf mode`, `workflow mode`, or `wk mode`', 'WF/WK router aliases');
|
|
457
493
|
requireText('Harness/README.md', 'explicit WF/WK loads subagent docs immediately', 'explicit WF/WK router output');
|
|
458
494
|
requireText('.claude/skills/wf/SKILL.md', 'Harness/WF.md', 'wf skill loads core WF doc');
|
|
459
495
|
requireText('.agents/skills/wf/SKILL.md', 'Harness/WF.md', 'Codex wf skill loads core WF doc');
|
|
@@ -483,16 +519,76 @@ requireText('Harness/WF-MAX.md', 'agent role', 'WF-MAX agent role separation');
|
|
|
483
519
|
requireText('Harness/WF-MAX.md', 'write-set coloring', 'WF-MAX coloring algorithm');
|
|
484
520
|
requireText('Harness/WF-MAX.md', 'wave dispatch', 'WF-MAX wave dispatch');
|
|
485
521
|
requireText('Harness/README.md', '/wf-max', 'wf max router alias');
|
|
486
|
-
requireText('Harness/README.md', 'WF-MAX.md', 'WF-MAX router reference');
|
|
487
|
-
requireText('Harness/
|
|
522
|
+
requireText('Harness/README.md', 'WF-MAX.md', 'WF-MAX router reference');
|
|
523
|
+
requireText('Harness/README.md', 'ACCEPTANCE_PROTOCOL.md', 'acceptance protocol router reference');
|
|
524
|
+
requireText('Harness/README.md', 'TDD-GUIDE.md', 'TDD guide router reference');
|
|
525
|
+
requireText('Harness/ACCEPTANCE_PROTOCOL.md', 'PRD-GATE', 'acceptance PRD gate');
|
|
526
|
+
requireText('Harness/ACCEPTANCE_PROTOCOL.md', 'AC-GATE', 'acceptance AC gate');
|
|
527
|
+
requireText('Harness/ACCEPTANCE_PROTOCOL.md', 'Acceptance Result', 'acceptance result matrix');
|
|
528
|
+
requireText('Harness/ACCEPTANCE_PROTOCOL.md', 'Syntax-only checks', 'syntax-only checks are not browser acceptance evidence');
|
|
529
|
+
requireText('Harness/AGENT_ISOLATION.md', 'implementer', 'agent isolation implementer rule');
|
|
530
|
+
requireText('Harness/HARNESS_BRIDGE.md', 'Network Trace Collector', 'harness bridge network trace collector');
|
|
531
|
+
requireText('Harness/WF-AUTO.md', 'Intent Checkpoint', 'wf-auto intent checkpoint');
|
|
532
|
+
requireText('Harness/MEMORY_PROTOCOL.md', 'Scenario Memory Hints', 'memory protocol scenario hints');
|
|
533
|
+
requireText('Harness/MEMORY_PROTOCOL.md', 'WF closeout', 'memory protocol WF closeout injection row');
|
|
534
|
+
requireText('Harness/MEMORY_PROTOCOL.md', 'memory-master owns writes', 'memory protocol memory write ownership');
|
|
535
|
+
requireText('Harness/TDD-GUIDE.md', 'Browser/UI Acceptance TDD Gate', 'browser UI acceptance TDD gate');
|
|
536
|
+
requireText('Harness/TDD-GUIDE.md', 'syntax-only', 'syntax-only acceptance prohibition');
|
|
537
|
+
requireText('Harness/TDD-GUIDE.md', 'Playwright/CDP', 'Playwright/CDP acceptance requirement');
|
|
538
|
+
requireText('Harness/TDD-GUIDE.md', 'AC-by-AC result matrix', 'AC-by-AC TDD evidence matrix');
|
|
539
|
+
requireText('Harness/tasks/_template/PLAN.md', 'User Action / API Request', 'task template user action/API test-plan column');
|
|
540
|
+
requireText('Harness/templates/TEST_PLAN.template.md', 'syntax-only checks', 'test plan template syntax-only prohibition');
|
|
541
|
+
requireText('.claude/skills/tdd/SKILL.md', 'Harness/ACCEPTANCE_PROTOCOL.md', 'tdd skill loads acceptance protocol');
|
|
542
|
+
requireText('.claude/skills/tdd/SKILL.md', 'Harness/HARNESS_BRIDGE.md', 'tdd skill loads harness bridge');
|
|
543
|
+
requireText('.claude/skills/tdd/SKILL.md', 'No syntax-only acceptance', 'tdd skill forbids syntax-only acceptance');
|
|
544
|
+
requireText('.claude/skills/wf-remove/SKILL.md', 'User-facing removal is the slash/skill command', 'wf-remove slash command is user-facing');
|
|
545
|
+
requireText('.claude/skills/wf-remove/SKILL.md', 'agent-internal execution steps', 'wf-remove script commands are agent-internal');
|
|
546
|
+
requireText('.claude/skills/wf-remove/SKILL.md', 'verify residual discovery folders', 'wf-remove residual discovery verification');
|
|
547
|
+
requireText('.claude/agents/tdd-guide.md', 'Browser Acceptance Rules', 'tdd-guide browser acceptance rules');
|
|
548
|
+
requireText('.claude/agents/tdd-guide.md', 'real user actions', 'tdd-guide real user action requirement');
|
|
549
|
+
requireText('.claude/agents/test-writer.md', 'Harness/ACCEPTANCE_PROTOCOL.md', 'test-writer loads acceptance protocol');
|
|
550
|
+
requireText('.claude/agents/test-writer.md', 'real user-path test', 'test-writer real user path requirement');
|
|
551
|
+
requireText('.claude/agents/test-writer.md', 'network URL, method, payload', 'test-writer network assertion requirement');
|
|
552
|
+
requireText('Harness/DEBUG_PROTOCOL.md', 'Layer Classification', 'debug layer classification');
|
|
553
|
+
requireText('Harness/MEMORY_PROTOCOL.md', 'AC ID', 'memory AC traceability');
|
|
554
|
+
requireText('Harness/subagents.md', 'Max parallelism', 'subagents max parallelism row');
|
|
488
555
|
requireText('Harness/dispatch.md', 'Concurrency group', 'dispatch concurrency group field');
|
|
489
556
|
requireText('Harness/dispatch.md', 'File claim', 'dispatch file claim field');
|
|
490
|
-
requireText('CLAUDE.md', '/wf-max', 'wf max startup instruction');
|
|
491
|
-
requireText('
|
|
492
|
-
requireText('
|
|
493
|
-
requireText('
|
|
494
|
-
|
|
495
|
-
|
|
557
|
+
requireText('CLAUDE.md', '/wf-max', 'wf max startup instruction');
|
|
558
|
+
requireText('.claude/commands/wf-help.md', 'Do not invoke a skill', 'wf-help direct command boundary');
|
|
559
|
+
requireText('.claude/commands/wf-help.md', '| `/wf-help` |', 'wf-help command row');
|
|
560
|
+
requireText('.claude/commands/wf-help.md', '| `/wf-max <task>` |', 'wf-help wf-max row');
|
|
561
|
+
requireText('.claude/commands/wf-help.md', '| `/wf-auto` |', 'wf-help wf-auto row');
|
|
562
|
+
requireText('.claude/commands/wf-help.md', '| `/wf-readme <task>` |', 'wf-help wf-readme row');
|
|
563
|
+
requireText('Harness/README.md', '## Direct Commands', 'direct commands section');
|
|
564
|
+
requireText('Harness/README.md', '.claude/commands/wf-help.md', 'wf-help router reference');
|
|
565
|
+
requireText('CLAUDE.md', 'three-layer architecture', 'CLAUDE.md three-layer role architecture');
|
|
566
|
+
requireText('CLAUDE.md', 'not hook-enforced', 'CLAUDE no-hook role enforcement statement');
|
|
567
|
+
requireText('Harness/README.md', 'no runtime hook state', 'README no-hook runtime statement');
|
|
568
|
+
requireText('Harness/WF-AUTO.md', 'WF-AUTO Hook Exception', 'wf-auto-only hook exception');
|
|
569
|
+
requireText('Harness/WF-AUTO.md', 'only `/wf-auto` may use a runtime hook', 'wf-auto-only hook boundary');
|
|
570
|
+
forbidText('CLAUDE.md', 'Enforced by hooks', 'WF-MAX hook enforcement claim');
|
|
571
|
+
forbidText('CLAUDE.md', 'WF-MAX hooks', 'WF-MAX hook enforcement claim');
|
|
572
|
+
forbidText('Harness/README.md', 'PreToolUse hook', 'WF-MAX PreToolUse hook claim');
|
|
573
|
+
forbidText('Harness/README.md', 'SessionStart hook', 'WF-MAX SessionStart hook claim');
|
|
574
|
+
forbidText('Harness/README.md', 'hook-managed', 'hook-managed runtime claim');
|
|
575
|
+
forbidText('Harness/README.md', 'HOOK_PROTOCOL.md', 'removed hook protocol reference');
|
|
576
|
+
forbidText('Harness/WF-AUTO.md', 'Hook-Assisted Long Loop', 'wf-auto hook loop section');
|
|
577
|
+
forbidText('Harness/MEMORY_PROTOCOL.md', 'Hooks may', 'hook-triggered memory claim');
|
|
578
|
+
forbidText('.claude/settings.json', 'wf-mode-hook.mjs', 'Claude WF hook command registration');
|
|
579
|
+
forbidText('.codex/hooks.json', 'wf-mode-hook.mjs', 'Codex WF hook command registration');
|
|
580
|
+
const codexHookConfig = read('.codex/hooks.json');
|
|
581
|
+
const claudeSettings = read('.claude/settings.json');
|
|
582
|
+
if (codexHookConfig && !codexHookConfig.includes('wf-auto')) {
|
|
583
|
+
errors.push('.codex/hooks.json may only exist for a wf-auto hook configuration');
|
|
584
|
+
}
|
|
585
|
+
if (claudeSettings.includes('"hooks"') && !claudeSettings.includes('wf-auto')) {
|
|
586
|
+
errors.push('.claude/settings.json hooks may only be used for wf-auto');
|
|
587
|
+
}
|
|
588
|
+
if (read('.codex/config.toml').includes('hooks = true') && !codexHookConfig.includes('wf-auto')) {
|
|
589
|
+
errors.push('.codex/config.toml may enable hooks only with a wf-auto hook configuration');
|
|
590
|
+
}
|
|
591
|
+
if (errors.length) {
|
|
496
592
|
console.error(`Harness validation failed${strict ? ' (strict)' : ''}:`);
|
|
497
593
|
for (const error of errors) console.error(`- ${error}`);
|
|
498
594
|
process.exit(1);
|