create-harness-vibe-coding 0.6.2 → 0.6.4
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/package.json +1 -1
- package/src/generator.js +466 -466
- package/src/index.js +355 -355
- package/templates/common/.claude/agents/architect.md +31 -35
- package/templates/common/.claude/agents/context-master.md +0 -1
- package/templates/common/.claude/agents/debugger.md +0 -1
- package/templates/common/.claude/agents/docs-researcher.md +41 -43
- package/templates/common/.claude/agents/implementer.md +0 -1
- package/templates/common/.claude/agents/memory-master.md +0 -1
- package/templates/common/.claude/agents/planner.md +0 -1
- package/templates/common/.claude/agents/researcher.md +0 -1
- package/templates/common/.claude/agents/reviewer.md +34 -35
- package/templates/common/.claude/agents/test-writer.md +0 -1
- package/templates/common/.claude/agents/verifier.md +0 -1
- package/templates/common/.claude/commands/wf-max.md +7 -0
- package/templates/common/.claude/commands/{update.md → wf-update.md} +4 -0
- package/templates/common/.claude/commands/wf.md +10 -3
- package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +2 -1
- package/templates/common/.claude/skills/wf-max/SKILL.md +29 -70
- package/templates/common/.claude/skills/{readme-optimizer → wf-readme}/SKILL.md +1 -1
- package/templates/common/.claude/skills/wf-review/SKILL.md +50 -50
- package/templates/common/.claude/skills/wf-update/SKILL.md +58 -58
- package/templates/common/CLAUDE.md +77 -76
- package/templates/common/MEMORY.md +73 -76
- package/templates/common/README.md +1 -1
- package/templates/common/SETUP.md +273 -341
- package/templates/common/docs/README.md +131 -145
- package/templates/common/docs/harness/WF.md +13 -1
- package/templates/common/docs/harness/agent-workflow.md +94 -94
- package/templates/common/docs/harness/architecture.md +1 -1
- package/templates/common/docs/harness/context-loading.md +104 -108
- package/templates/common/docs/harness/extension.md +70 -79
- package/templates/common/docs/harness/lifecycle.md +33 -33
- package/templates/common/docs/harness/subagents.md +1 -1
- package/templates/common/docs/research/PRD.md +65 -65
- package/templates/common/docs/research/README.md +169 -169
- package/templates/common/scripts/validate-harness.mjs +439 -460
- package/templates/optional/skills/browser-e2e/.claude/commands/wf-browser.md +25 -0
- package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +42 -42
- package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +194 -0
- package/templates/optional/skills/browser-e2e/docs/workflows/browser-e2e.md +55 -34
- package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +40 -40
- package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +40 -40
- package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +43 -43
- package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +40 -40
- package/templates/common/.claude/skills/harness-build-loop/SKILL.md +0 -23
- package/templates/common/.claude/skills/harness-context/SKILL.md +0 -26
- package/templates/common/.claude/skills/harness-lifecycle/SKILL.md +0 -20
- package/templates/common/.claude/skills/harness-research/SKILL.md +0 -30
- package/templates/common/.claude/skills/harness-router/SKILL.md +0 -16
- package/templates/common/.claude/skills/wf-mode/SKILL.md +0 -55
- package/templates/common/docs/domain/ports.md +0 -76
- package/templates/common/docs/features/_template.md +0 -177
- package/templates/common/docs/harness/PLAN.md +0 -52
- package/templates/common/docs/harness/data-flow.md +0 -59
- package/templates/common/docs/harness/state-machines.md +0 -58
- /package/templates/common/.claude/commands/{learn.md → wf-learn.md} +0 -0
|
@@ -1,341 +1,273 @@
|
|
|
1
|
-
# SETUP.md - Bootstrap This Product Harness
|
|
2
|
-
|
|
3
|
-
Temporary file. Delete after the first vertical slice is verified.
|
|
4
|
-
|
|
5
|
-
## What This Is
|
|
6
|
-
|
|
7
|
-
This scaffold is a 0-1 product harness:
|
|
8
|
-
|
|
9
|
-
- short agent entry files
|
|
10
|
-
- dynamic docs router
|
|
11
|
-
- PRD, research protocol, architecture, ports, data-flow, state templates
|
|
12
|
-
- active `Harness/PROGRESS.md`
|
|
13
|
-
- `Harness/MEMORY.md` plus a `Harness/memory/` folder for durable self-learning, user corrections, and tool reflections
|
|
14
|
-
- built-in common agents
|
|
15
|
-
- subagent orchestration and context-loading protocol
|
|
16
|
-
- skill-style dynamic loaders in `.claude/skills/`
|
|
17
|
-
- lightweight harness validator
|
|
18
|
-
- test/review/feedback loop
|
|
19
|
-
|
|
20
|
-
It does not guess your stack or business domain. Claude Code should fill those through the lifecycle.
|
|
21
|
-
|
|
22
|
-
## Bootstrap Prompt
|
|
23
|
-
|
|
24
|
-
Start Claude Code, then say:
|
|
25
|
-
|
|
26
|
-
```text
|
|
27
|
-
Read Harness/SETUP.md. Bootstrap this project as a 0-1 product harness.
|
|
28
|
-
Use Harness/README.md as the router. Keep context small.
|
|
29
|
-
First clarify the idea, then create PRD, research, architecture, Harness/PROGRESS.md and the first per-task plan, and the first vertical-slice task.
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Required Bootstrap Sequence
|
|
33
|
-
|
|
34
|
-
Claude must follow this order:
|
|
35
|
-
|
|
36
|
-
1. Read `CLAUDE.md`, `Harness/MEMORY.md`, `Harness/README.md`, and `Harness/lifecycle.md`. Load `Harness/memory/*` only when the router or memory trigger applies.
|
|
37
|
-
2. Ask up to 3 blocking product questions. If not blocked, record assumptions in `Harness/tasks/<task-id>/PLAN.md`.
|
|
38
|
-
3. Fill `Harness/research/PRD.md` with MVP, non-goals, and acceptance criteria.
|
|
39
|
-
4. Read `Harness/research/README.md`, then fill `Harness/research/research-results.md` with adopted/rejected research choices.
|
|
40
|
-
5. Fill
|
|
41
|
-
6. Create a task capsule from `Harness/tasks/_template/` and fill the first vertical-slice plan in `Harness/tasks/<task-id>/PLAN.md`.
|
|
42
|
-
7. Use `Harness/subagents.md`, `Harness/context-loading.md`, and `Harness/dispatch.md` when explicit WF/WK mode or any spawned subagents are involved.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| README
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
- From
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- Read the
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
- If the skipped file is `
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
- **[
|
|
101
|
-
- **[
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
| `
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
| `Harness/
|
|
120
|
-
| `Harness/
|
|
121
|
-
| `Harness/
|
|
122
|
-
| `Harness/
|
|
123
|
-
| `Harness/
|
|
124
|
-
| `Harness/
|
|
125
|
-
| `Harness/
|
|
126
|
-
| `Harness/PROGRESS.md` |
|
|
127
|
-
| `Harness/tasks/<id>/
|
|
128
|
-
| `Harness/
|
|
129
|
-
| `Harness/
|
|
130
|
-
| `Harness/workflows/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
-
|
|
137
|
-
- `.claude/
|
|
138
|
-
- `.claude/
|
|
139
|
-
- `.claude/
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
- `
|
|
143
|
-
- `Harness/
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
- `{{
|
|
161
|
-
- `{{
|
|
162
|
-
- `{{
|
|
163
|
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
- `{{
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
- `
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
**Superpowers**: [Superpowers](https://github.com/obra/superpowers) is a community skill registry. Search it:
|
|
277
|
-
|
|
278
|
-
```bash
|
|
279
|
-
# If superpowers CLI or MCP is configured
|
|
280
|
-
npx skills search "react testing"
|
|
281
|
-
npx skills search "python api"
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
**Manual discovery**: search GitHub and npm directly using patterns from `Harness/research/README.md#Architecture Decision References`.
|
|
285
|
-
|
|
286
|
-
**Priority order**:
|
|
287
|
-
1. `/find-skills` first — fastest discovery, respects your tool environment.
|
|
288
|
-
2. Superpowers registry — broad community coverage.
|
|
289
|
-
3. GitHub search — when the first two miss niche domains.
|
|
290
|
-
|
|
291
|
-
**What to install**: after finding skills, add them to `.claude/skills/<name>/SKILL.md`. Follow `Harness/extension.md` for compatibility. Start with 1-2 skills per stack area; more is not better.
|
|
292
|
-
|
|
293
|
-
This scaffold includes built-in harness skills (`.claude/skills/harness-*`). Keep those. Add stack-specific ones alongside them.
|
|
294
|
-
|
|
295
|
-
## Optional Agent Assets
|
|
296
|
-
|
|
297
|
-
After the product shape is known, Claude may also install or copy stack-specific agents, rules, and hooks into `.claude/`. Follow `Harness/extension.md` for every added asset.
|
|
298
|
-
|
|
299
|
-
Examples:
|
|
300
|
-
|
|
301
|
-
```text
|
|
302
|
-
This is a React TypeScript SaaS app. Add frontend testing and review agents.
|
|
303
|
-
This is a Python data product. Add data pipeline and pytest workflow agents.
|
|
304
|
-
This is a Go service. Add API, security, and integration-test agents.
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
## Cleanup (Isolate & Remove)
|
|
308
|
-
|
|
309
|
-
This file is designed to be orphaned. When all configuration is complete:
|
|
310
|
-
|
|
311
|
-
1. Open `CLAUDE.md`. Delete the setup bootstrap line that starts with: ``If `Harness/SETUP.md` exists, follow it before normal project work``.
|
|
312
|
-
2. Delete this file.
|
|
313
|
-
|
|
314
|
-
```bash
|
|
315
|
-
rm Harness/SETUP.md
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
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.
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
## For Agents (Self-Bootstrapping)
|
|
323
|
-
|
|
324
|
-
If you are an AI agent running `create-harness-vibe-coding` to scaffold your own project harness, use non-interactive mode:
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
npx create-harness-vibe-coding@latest <project-name> <target-dir> -y
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
Example:
|
|
331
|
-
|
|
332
|
-
```bash
|
|
333
|
-
npx create-harness-vibe-coding@latest my-agent-project ./my-agent-project -y
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
After scaffolding, bootstrap the harness yourself:
|
|
337
|
-
|
|
338
|
-
1. Read `CLAUDE.md`, `Harness/MEMORY.md`, and `Harness/README.md`.
|
|
339
|
-
2. Follow the Required Bootstrap Sequence above.
|
|
340
|
-
3. Run `node Harness/scripts/validate-harness.mjs --strict` when done.
|
|
341
|
-
4. Delete `Harness/SETUP.md`.
|
|
1
|
+
# SETUP.md - Bootstrap This Product Harness
|
|
2
|
+
|
|
3
|
+
Temporary file. Delete after the first vertical slice is verified.
|
|
4
|
+
|
|
5
|
+
## What This Is
|
|
6
|
+
|
|
7
|
+
This scaffold is a 0-1 product harness:
|
|
8
|
+
|
|
9
|
+
- short agent entry files
|
|
10
|
+
- dynamic docs router
|
|
11
|
+
- PRD, research protocol, architecture, ports, data-flow, state templates
|
|
12
|
+
- active `Harness/PROGRESS.md`
|
|
13
|
+
- `Harness/MEMORY.md` plus a `Harness/memory/` folder for durable self-learning, user corrections, and tool reflections
|
|
14
|
+
- built-in common agents
|
|
15
|
+
- subagent orchestration and context-loading protocol
|
|
16
|
+
- skill-style dynamic loaders in `.claude/skills/`
|
|
17
|
+
- lightweight harness validator
|
|
18
|
+
- test/review/feedback loop
|
|
19
|
+
|
|
20
|
+
It does not guess your stack or business domain. Claude Code should fill those through the lifecycle.
|
|
21
|
+
|
|
22
|
+
## Bootstrap Prompt
|
|
23
|
+
|
|
24
|
+
Start Claude Code, then say:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
Read Harness/SETUP.md. Bootstrap this project as a 0-1 product harness.
|
|
28
|
+
Use Harness/README.md as the router. Keep context small.
|
|
29
|
+
First clarify the idea, then create PRD, research, architecture, Harness/PROGRESS.md and the first per-task plan, and the first vertical-slice task.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Required Bootstrap Sequence
|
|
33
|
+
|
|
34
|
+
Claude must follow this order:
|
|
35
|
+
|
|
36
|
+
1. Read `CLAUDE.md`, `Harness/MEMORY.md`, `Harness/README.md`, and `Harness/lifecycle.md`. Load `Harness/memory/*` only when the router or memory trigger applies.
|
|
37
|
+
2. Ask up to 3 blocking product questions. If not blocked, record assumptions in `Harness/tasks/<task-id>/PLAN.md`.
|
|
38
|
+
3. Fill `Harness/research/PRD.md` with MVP, non-goals, and acceptance criteria.
|
|
39
|
+
4. Read `Harness/research/README.md`, then fill `Harness/research/research-results.md` with adopted/rejected research choices.
|
|
40
|
+
5. Fill `Harness/architecture.md`.
|
|
41
|
+
6. Create a task capsule from `Harness/tasks/_template/` and fill the first vertical-slice plan in `Harness/tasks/<task-id>/PLAN.md`.
|
|
42
|
+
7. Use `Harness/subagents.md`, `Harness/context-loading.md`, and `Harness/dispatch.md` when explicit WF/WK mode or any spawned subagents are involved.
|
|
43
|
+
9. Implement only after a failing test or manual verification step is defined.
|
|
44
|
+
10. Run `node Harness/scripts/validate-harness.mjs --strict`.
|
|
45
|
+
11. 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.
|
|
46
|
+
|
|
47
|
+
## Existing Project Bootstrap Sequence
|
|
48
|
+
|
|
49
|
+
When adding this harness to a project that already has source code, docs, CI, or tool configuration, treat the existing project as the source of truth before filling harness docs.
|
|
50
|
+
|
|
51
|
+
1. Scan existing project facts first: `README.md`, package files (`package.json`, `pyproject.toml`, `go.mod`, etc.), test commands, app entry points, CI files, existing docs, and current run/build scripts.
|
|
52
|
+
2. Record discovered facts and open questions in `Harness/tasks/<task-id>/PROGRESS.md` before changing harness docs.
|
|
53
|
+
3. Fill `Harness/research/PRD.md`, `Harness/research/research-results.md`, `Harness/architecture.md` from observed project facts plus explicit user input.
|
|
54
|
+
4. Existing configuration is project fact. Do not overwrite `CLAUDE.md`, `AGENTS.md`, `.claude/`, `.gitignore`, settings, hooks, package files, CI, docs routers, or workflow docs unless the user explicitly approves that exact overwrite.
|
|
55
|
+
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`.
|
|
56
|
+
6. Run `node Harness/scripts/validate-harness.mjs` after registration, then run `node Harness/scripts/validate-harness.mjs --strict` only after project-fact placeholders have been resolved or intentionally recorded as open.
|
|
57
|
+
|
|
58
|
+
### Agent-Link Install Intake
|
|
59
|
+
|
|
60
|
+
When the user installs by pasting the GitHub link into an agent, ask intake questions before editing. Ask only questions that affect writes, architecture, security, or workflow. Ask at most three blocking questions up front, record safe defaults for the rest, and ask follow-ups only when that choice becomes active.
|
|
61
|
+
|
|
62
|
+
| Topic | Ask When | Default If Unanswered |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| Root agent entry | `CLAUDE.md`, `AGENTS.md`, `.claude/`, or other agent entry files already exist | Preserve files; ask before merging the Harness entry contract |
|
|
65
|
+
| Harness location | `docs/` is already used for GitHub Pages, product docs, or generated docs | Use root `Harness/`; do not write harness docs into `docs/` |
|
|
66
|
+
| README ownership | root `README.md` is a public product page, package docs, or heavily customized | Preserve existing README and propose a minimal Development section |
|
|
67
|
+
| README optimization | existing README is stale, sparse, missing command tables, or the user asks for diagrams/polished docs | Offer `wf-readme`; default to append-only Development notes until the user approves a structure pass or full rewrite |
|
|
68
|
+
| Extensions | ECC, Superpowers, custom rules, or stack-specific skills may be useful | Recommend first; install only after user approval |
|
|
69
|
+
| Skills | stack is known and optional skills could improve testing, frontend, backend, review, or browser evidence | Install 1-2 relevant skills only after user approval |
|
|
70
|
+
| CI/CD | CI config exists or the project lacks a test/build gate | Document existing commands first; add CI/CD only after user approval |
|
|
71
|
+
| Verification depth | browser-visible, API, database, auth, payment, or deployment behavior is affected | Require real command evidence; require browser/API evidence when relevant |
|
|
72
|
+
| Memory/privacy | repo contains sensitive domain data, customer data, secrets, or private workflows | Enable memory index only; never record secrets or private data |
|
|
73
|
+
| Branch/worktree | project has uncommitted changes, risky migration, or parallel implementation lanes | Preserve current worktree; propose branch/worktree before broad edits |
|
|
74
|
+
| Package manager/stack | multiple package managers, monorepo apps, or unclear stack boundaries exist | Ask which workspace/app is in scope before writing |
|
|
75
|
+
|
|
76
|
+
### Agent Conflict Resolution Protocol
|
|
77
|
+
|
|
78
|
+
When `--on-conflict skip` leaves existing files untouched, the agent resolves each conflict with user supervision.
|
|
79
|
+
|
|
80
|
+
**Workflow:**
|
|
81
|
+
|
|
82
|
+
1. Run the harness tool in planning mode to get the conflict list:
|
|
83
|
+
```
|
|
84
|
+
npx create-harness-vibe-coding@latest . . -y --dry-run --json
|
|
85
|
+
```
|
|
86
|
+
Parse the JSON output. Files in `plan.skip[]` need attention. Files in `plan.create[]` are handled automatically.
|
|
87
|
+
|
|
88
|
+
2. For each skipped file, locate the harness template counterpart:
|
|
89
|
+
- From npm: `node_modules/create-harness-vibe-coding/templates/common/<path>`
|
|
90
|
+
- From GitHub: `https://raw.githubusercontent.com/zingspark/create-harness-vibe-coding/main/templates/common/<path>`
|
|
91
|
+
|
|
92
|
+
3. For each skipped file:
|
|
93
|
+
- Read the existing project file.
|
|
94
|
+
- Read the harness template counterpart.
|
|
95
|
+
- Compare sections and headings. Identify structural sections, registration entries, and required text patterns that exist in the template but are missing from the existing file.
|
|
96
|
+
- If the skipped file is `CLAUDE.md`, tell the user that it is the root agent entry contract. Ask whether they consent to refactor or merge it before editing. Preserve project-specific rules while adding the Harness startup, memory, router, workflow, and subagent orchestration contract.
|
|
97
|
+
- If the skipped file is `AGENTS.md`, tell the user that it is part of the root agent entry contract and ask whether they consent to merge or replace it before editing.
|
|
98
|
+
- Present each gap to the user as a choice:
|
|
99
|
+
- **[Merge]** — Edit the existing file to add only the missing sections. Preserve all existing content, ordering, and formatting.
|
|
100
|
+
- **[Overwrite]** — Replace with the template version. Optionally backup the original first (`--on-conflict backup`).
|
|
101
|
+
- **[Keep]** — Leave the existing file as-is. Skip this file.
|
|
102
|
+
|
|
103
|
+
4. For Merge: use Edit (not Write) to add missing content. Only insert sections, headings, and text that are structurally required. Do not reorder or modify existing content. Do not remove custom project-specific registrations.
|
|
104
|
+
|
|
105
|
+
5. After all merges, run `node Harness/scripts/validate-harness.mjs`. Fix any remaining validation errors, then run `node Harness/scripts/validate-harness.mjs --strict` only after project-fact placeholders are resolved.
|
|
106
|
+
|
|
107
|
+
**File-specific gap checklists:**
|
|
108
|
+
|
|
109
|
+
The harness validator checks for specific structural invariants. When comparing existing files against templates, verify these are present. Most other template content can vary; only the items below are required.
|
|
110
|
+
|
|
111
|
+
| File | Required check |
|
|
112
|
+
|------|----------------|
|
|
113
|
+
| `CLAUDE.md` | Must be merged only after user confirmation when it already exists. Required contract: `## 1. Harness Binding & Startup` with the `Harness/SETUP.md` bootstrap contract line; `## 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`); `Never bulk-read Harness/` in Startup |
|
|
114
|
+
| `AGENTS.md` | Root agent entry points to `CLAUDE.md` and `Harness/README.md`; for existing projects, merge only after explicit user consent |
|
|
115
|
+
| `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 |
|
|
116
|
+
| `Harness/MEMORY.md` | All 9 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 |
|
|
117
|
+
| `.claude/rules/ecc/common.md` | `## Context` section with the durable communication invariant (`project files are the only durable communication channel`); `## Memory` section with three reflection file entries; `## Security` section |
|
|
118
|
+
| `Harness/README.md` | `## Keyword Routing` heading; `## Load By Task` table with at minimum the rows: "Need WF mode", "Adding harness to existing project", "Need implementation plan", "Need parallel agents", "Need subagents", "Need durable memory or reflection"; WF routing keywords include `/wf`, `wf mode`, `workflow mode`, and `wk mode`; explicit WF/WK output says subagent docs load immediately; `## Doc Map` with `memory/` and `subagents.md` entries; the durable communication invariant text; `Harness/README.md is the primary router` |
|
|
119
|
+
| `Harness/WF.md` | `WF mode requires multi-subagent orchestration by default`; explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` requires at least 3 distinct `.claude/agents/` subagents before second planning; `collaboration decision tree`; `Heartbeat Protocol` |
|
|
120
|
+
| `Harness/extension.md` | `## Non-Invasive Extension Rules` section with the "Preserve existing" rule; `## Agent Contract` section; `## Registration` section |
|
|
121
|
+
| `Harness/dispatch.md` | The durable communication invariant; common agent entries for all 9 agents; `## Handoff Format` heading |
|
|
122
|
+
| `Harness/context-loading.md` | The durable communication invariant; `Harness/README.md is the primary router`; all 10 subagent context packs (Explorer Pass, Planner, Researcher, Docs Researcher, Architect, Test Writer, Implementer, Reviewer, Debugger, Verifier) |
|
|
123
|
+
| `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` |
|
|
124
|
+
| `Harness/architecture.md` | `## 2. Interface Decoupling`; `## 3. State Design`; `Avoid speculative abstraction`; layer constraints derived from actual project facts |
|
|
125
|
+
| `Harness/PROGRESS.md` | global task index with Active Task and task history; cross-task decisions |
|
|
126
|
+
| `Harness/tasks/<id>/PROGRESS.md` | `## Current Goal`, `## Phase`, `## Heartbeat`, `## Loaded Context` headings |
|
|
127
|
+
| `Harness/tasks/<id>/PLAN.md` | `## Tasks`, `## Parallel Dispatch`, `## Subagent Synthesis`, `## Verification` headings |
|
|
128
|
+
| `Harness/SETUP.md` | Only meaningful for fresh projects. If the project has its own onboarding docs, skip this file entirely (it is temporary). If kept, ensure the "Existing Project Bootstrap Sequence" is present. |
|
|
129
|
+
| `Harness/workflows/browser-e2e.md` (if installed as optional) | `data-testid`, `accessible labels/roles`, and `inputs, buttons, filters, rows, empty/error/loading states` requirement |
|
|
130
|
+
| `Harness/workflows/ts-react-frontend.md` (if installed as optional) | Same UI selector contract as above |
|
|
131
|
+
|
|
132
|
+
**Files that do NOT need manual merge when the path does not already exist (auto-created by harness):**
|
|
133
|
+
|
|
134
|
+
- `Harness/memory/tool-usage-reflections.md`, `Harness/memory/user-corrections-preferences.md`, `Harness/memory/agent-lessons-patterns.md` — these are new empty files
|
|
135
|
+
- `.claude/agents/*.md` — all 9 common agents
|
|
136
|
+
- `.claude/skills/harness-*/SKILL.md`, `.claude/skills/wf-update/SKILL.md`, and `.claude/skills/subagent-orchestrator/SKILL.md` — core harness skills and subagent orchestration
|
|
137
|
+
- `.claude/commands/update.md` — /wf update command bridge
|
|
138
|
+
- `.claude/rules/ecc/common.md` — universal rules (unless the project has custom rules in this file)
|
|
139
|
+
- `.claude/settings.json` — harness settings
|
|
140
|
+
- `Harness/WF.md`, `Harness/lifecycle.md`, `Harness/subagents.md`, `Harness/agent-workflow.md`, `Harness/architecture.md` — harness runtime docs
|
|
141
|
+
- `Harness/research/*.md` — research protocol and templates
|
|
142
|
+
- `AGENTS.md` — agent registry; if it already exists, ask for user consent before merging or replacing it
|
|
143
|
+
- `Harness/scripts/validate-harness.mjs` and `tests/.gitkeep` — tooling
|
|
144
|
+
|
|
145
|
+
Optional workflow examples:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npx create-harness-vibe-coding@latest my-app ./my-app -y --with browser-e2e,ts-react-frontend
|
|
149
|
+
npx create-harness-vibe-coding@latest my-app ./my-app -y --preset web-app
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Template Fill Guide
|
|
153
|
+
|
|
154
|
+
Each template doc contains `{{PLACEHOLDER}}` markers. Below is what every placeholder expects. Replace all markers in the doc before moving to the next doc. If a section does not apply yet, leave the `{{...}}` but record why in `Harness/tasks/<task-id>/PLAN.md`.
|
|
155
|
+
|
|
156
|
+
**`Harness/research/PRD.md`** — Product scope. Fill with product facts from user input, not guesses:
|
|
157
|
+
- `{{WHY_THIS_PROJECT_EXISTS}}`: one-sentence motivation
|
|
158
|
+
- `{{MUST_1..3}}`: concrete, testable MVP items (checkbox form)
|
|
159
|
+
- `{{NON_GOAL_1..3}}`: explicitly out-of-scope items
|
|
160
|
+
- `{{USER_ROLE}}`, `{{SCENARIO}}`, `{{FREQUENCY}}`, `{{PAIN}}`: one row per user type
|
|
161
|
+
- `{{ACCEPTANCE_1..3}}`: verifiable project-level acceptance criteria
|
|
162
|
+
- `{{DIMENSION}}`, `{{TARGET}}`, `{{MEASUREMENT}}`: non-functional requirements (perf, security, etc.)
|
|
163
|
+
|
|
164
|
+
**`Harness/research/research-results.md`** — Tech decisions. Research before filling:
|
|
165
|
+
- Use `Harness/research/README.md` as the research protocol.
|
|
166
|
+
- `{{CANDIDATE_1..3}}`: each candidate (framework, library, architecture style) with Purpose/Strength/Weakness/Decision/Link.
|
|
167
|
+
- `{{Architecture Style}}`: the chosen architectural style (e.g., Hexagonal, Modular Monolith).
|
|
168
|
+
- `{{CONSTRAINT_1..3}}`: hard technical constraints derived from research.
|
|
169
|
+
- `{{ALTERNATIVE_1..2}}`: rejected candidates worth watching for future.
|
|
170
|
+
|
|
171
|
+
**`Harness/architecture.md`** — Layer structure. Derive from research-results:
|
|
172
|
+
- Fill the ASCII layer diagram with actual layer names. Do NOT add layers without a proven need.
|
|
173
|
+
- `Interface Decoupling`: document only real boundaries and ports. Do not add speculative factories, plugin systems, generic repositories, or config layers.
|
|
174
|
+
- `State Design`: name state owners, persistence level, legal transitions, and recovery behavior for long-running workflows.
|
|
175
|
+
- `Harness Core Components`: describe each core component (Runner, Permission Policy, Event Bus, State Store, Tool Registry) in project-specific terms.
|
|
176
|
+
- `Architectural Constraints`: add project-specific non-negotiables. Keep the domain/harness purity rules.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
**Constraint**: If the research does not give you enough confidence to fill a section, leave the `{{...}}` placeholder and record the open question in `Harness/tasks/<task-id>/PLAN.md`. The strict validator will catch it.
|
|
180
|
+
|
|
181
|
+
## User Confirmation Protocol (Non-Negotiable)
|
|
182
|
+
|
|
183
|
+
> This harness is a design partner, not a solo builder. The user owns product intent.
|
|
184
|
+
|
|
185
|
+
When user intent is unclear or ambiguous:
|
|
186
|
+
|
|
187
|
+
- **Maximum 3 blocking questions per decision point.** Ask the highest-impact questions first.
|
|
188
|
+
- **Do not act on assumptions that affect architecture, scope, stack, or user-facing behavior.**
|
|
189
|
+
- **You must have ≥95% confidence before writing implementation code.** If below that threshold, stop and ask.
|
|
190
|
+
- **Record every assumption explicitly** in `Harness/tasks/<task-id>/PLAN.md` so the user can correct it later.
|
|
191
|
+
- **Silent picks are forbidden.** If two valid approaches exist and you cannot decide with high confidence, present both to the user with trade-offs.
|
|
192
|
+
|
|
193
|
+
False confidence is worse than a question. If you catch yourself thinking "this is probably what they want," stop and ask.
|
|
194
|
+
|
|
195
|
+
## How to Find Proper Skills
|
|
196
|
+
|
|
197
|
+
After the architecture stage reveals your stack, install matching agent skills. Skills teach Claude Code domain-specific patterns, testing conventions, and design rules.
|
|
198
|
+
|
|
199
|
+
**Built-in route**: invoke the `/find-skills` skill (or say "help me find skills for X"). Examples:
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
"Find skills for React TypeScript frontend testing."
|
|
203
|
+
"Find skills for Python FastAPI backend development."
|
|
204
|
+
"What skills exist for Playwright e2e testing?"
|
|
205
|
+
"I need a skill for PostgreSQL schema design."
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Superpowers**: [Superpowers](https://github.com/obra/superpowers) is a community skill registry. Search it:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
# If superpowers CLI or MCP is configured
|
|
212
|
+
npx skills search "react testing"
|
|
213
|
+
npx skills search "python api"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Manual discovery**: search GitHub and npm directly using patterns from `Harness/research/README.md#Architecture Decision References`.
|
|
217
|
+
|
|
218
|
+
**Priority order**:
|
|
219
|
+
1. `/find-skills` first — fastest discovery, respects your tool environment.
|
|
220
|
+
2. Superpowers registry — broad community coverage.
|
|
221
|
+
3. GitHub search — when the first two miss niche domains.
|
|
222
|
+
|
|
223
|
+
**What to install**: after finding skills, add them to `.claude/skills/<name>/SKILL.md`. Follow `Harness/extension.md` for compatibility. Start with 1-2 skills per stack area; more is not better.
|
|
224
|
+
|
|
225
|
+
This scaffold includes built-in harness skills (`.claude/skills/harness-*`). Keep those. Add stack-specific ones alongside them.
|
|
226
|
+
|
|
227
|
+
## Optional Agent Assets
|
|
228
|
+
|
|
229
|
+
After the product shape is known, Claude may also install or copy stack-specific agents, rules, and hooks into `.claude/`. Follow `Harness/extension.md` for every added asset.
|
|
230
|
+
|
|
231
|
+
Examples:
|
|
232
|
+
|
|
233
|
+
```text
|
|
234
|
+
This is a React TypeScript SaaS app. Add frontend testing and review agents.
|
|
235
|
+
This is a Python data product. Add data pipeline and pytest workflow agents.
|
|
236
|
+
This is a Go service. Add API, security, and integration-test agents.
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Cleanup (Isolate & Remove)
|
|
240
|
+
|
|
241
|
+
This file is designed to be orphaned. When all configuration is complete:
|
|
242
|
+
|
|
243
|
+
1. Open `CLAUDE.md`. Delete the setup bootstrap line that starts with: ``If `Harness/SETUP.md` exists, follow it before normal project work``.
|
|
244
|
+
2. Delete this file.
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
rm Harness/SETUP.md
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
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.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## For Agents (Self-Bootstrapping)
|
|
255
|
+
|
|
256
|
+
If you are an AI agent running `create-harness-vibe-coding` to scaffold your own project harness, use non-interactive mode:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
npx create-harness-vibe-coding@latest <project-name> <target-dir> -y
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Example:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
npx create-harness-vibe-coding@latest my-agent-project ./my-agent-project -y
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
After scaffolding, bootstrap the harness yourself:
|
|
269
|
+
|
|
270
|
+
1. Read `CLAUDE.md`, `Harness/MEMORY.md`, and `Harness/README.md`.
|
|
271
|
+
2. Follow the Required Bootstrap Sequence above.
|
|
272
|
+
3. Run `node Harness/scripts/validate-harness.mjs --strict` when done.
|
|
273
|
+
4. Delete `Harness/SETUP.md`.
|