create-harness-vibe-coding 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +177 -32
- package/package.json +5 -2
- package/src/generator.js +407 -53
- package/src/index.js +236 -22
- package/templates/common/.claude/agents/architect.md +4 -4
- package/templates/common/.claude/agents/debugger.md +1 -1
- package/templates/common/.claude/agents/docs-researcher.md +4 -4
- package/templates/common/.claude/agents/implementer.md +1 -1
- package/templates/common/.claude/agents/planner.md +3 -3
- package/templates/common/.claude/agents/researcher.md +4 -4
- package/templates/common/.claude/agents/reviewer.md +1 -1
- package/templates/common/.claude/agents/test-writer.md +2 -2
- package/templates/common/.claude/agents/verifier.md +1 -1
- package/templates/common/.claude/commands/wf.md +18 -0
- package/templates/common/.claude/rules/ecc/common.md +16 -6
- package/templates/common/.claude/skills/harness-build-loop/SKILL.md +4 -3
- package/templates/common/.claude/skills/harness-context/SKILL.md +4 -3
- package/templates/common/.claude/skills/harness-lifecycle/SKILL.md +3 -3
- package/templates/common/.claude/skills/harness-research/SKILL.md +4 -4
- package/templates/common/.claude/skills/harness-router/SKILL.md +7 -5
- package/templates/common/.claude/skills/readme-optimizer/SKILL.md +48 -0
- package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +36 -0
- package/templates/common/.claude/skills/wf-mode/SKILL.md +48 -0
- package/templates/common/AGENTS.md +2 -2
- package/templates/common/CLAUDE.md +39 -71
- package/templates/common/MEMORY.md +42 -33
- package/templates/common/README.md +41 -0
- package/templates/common/SETUP.md +149 -41
- package/templates/common/docs/README.md +72 -47
- package/templates/common/docs/domain/ports.md +1 -1
- package/templates/common/docs/features/_template.md +20 -10
- package/templates/common/docs/harness/PLAN.md +25 -2
- package/templates/common/docs/harness/WF.md +136 -0
- package/templates/common/docs/harness/agent-workflow.md +8 -8
- package/templates/common/docs/harness/context-loading.md +17 -14
- package/templates/common/docs/harness/data-flow.md +1 -1
- package/templates/common/docs/harness/dispatch.md +6 -0
- package/templates/common/docs/harness/extension.md +20 -8
- package/templates/common/docs/harness/lifecycle.md +2 -2
- package/templates/common/docs/harness/subagents.md +140 -0
- package/templates/common/docs/research/PRD.md +1 -1
- package/templates/common/docs/research/README.md +5 -5
- package/templates/common/memory/agent-lessons-patterns.md +21 -0
- package/templates/common/memory/tool-usage-reflections.md +21 -0
- package/templates/common/memory/user-corrections-preferences.md +21 -0
- package/templates/common/scripts/validate-harness.mjs +217 -46
- package/templates/optional/catalog.json +43 -0
- package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +42 -0
- package/templates/optional/skills/browser-e2e/docs/workflows/browser-e2e.md +42 -0
- package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +40 -0
- package/templates/optional/skills/github-pr-review/docs/workflows/github-pr-review.md +28 -0
- package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +40 -0
- package/templates/optional/skills/python-backend/docs/workflows/python-backend.md +34 -0
- package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +43 -0
- package/templates/optional/skills/ts-react-frontend/docs/workflows/ts-react-frontend.md +35 -0
- package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +40 -0
- package/templates/optional/skills/ui-ux-review/docs/workflows/ui-ux-review.md +26 -0
package/src/index.js
CHANGED
|
@@ -2,14 +2,20 @@
|
|
|
2
2
|
import * as p from '@clack/prompts';
|
|
3
3
|
import pc from 'picocolors';
|
|
4
4
|
import { askProjectName, askTargetDir } from './prompts.js';
|
|
5
|
-
import { generate } from './generator.js';
|
|
5
|
+
import { generate, getOptionalCatalog } from './generator.js';
|
|
6
6
|
|
|
7
7
|
// ── CLI flags ──────────────────────────────────────────────
|
|
8
8
|
const raw = process.argv.slice(2);
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
9
|
+
const parsed = parseArgs(raw);
|
|
10
|
+
const showHelp = parsed.flags.help || parsed.flags.h;
|
|
11
|
+
const skipPrompts = parsed.flags.yes || parsed.flags.y;
|
|
12
|
+
|
|
13
|
+
if (parsed.errors.length > 0) {
|
|
14
|
+
for (const err of parsed.errors) {
|
|
15
|
+
console.error(pc.red(`Error: ${err}`));
|
|
16
|
+
}
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
13
19
|
|
|
14
20
|
if (showHelp) {
|
|
15
21
|
console.log('');
|
|
@@ -23,25 +29,60 @@ if (showHelp) {
|
|
|
23
29
|
console.log(' target-dir Directory to create the project in (default: ./<project-name>)');
|
|
24
30
|
console.log('');
|
|
25
31
|
console.log(' Flags:');
|
|
26
|
-
console.log(' -y, --yes
|
|
27
|
-
console.log(' -h, --help
|
|
32
|
+
console.log(' -y, --yes Skip all prompts, use defaults or provided args');
|
|
33
|
+
console.log(' -h, --help Show this help');
|
|
34
|
+
console.log(' --dry-run Print the planned writes without creating files');
|
|
35
|
+
console.log(' --on-conflict <policy> fail, skip, backup, or overwrite (default: fail)');
|
|
36
|
+
console.log(' --with <id,id> Add optional local workflow skills');
|
|
37
|
+
console.log(' --without <id,id> Remove optional workflow skills selected by --preset or --with');
|
|
38
|
+
console.log(' --preset <name> Add a built-in optional workflow preset');
|
|
39
|
+
console.log(' --list-options Print optional workflow skills and presets');
|
|
40
|
+
console.log(' --json Output machine-readable JSON (use with --dry-run for planning)');
|
|
28
41
|
console.log('');
|
|
29
42
|
console.log(' Examples:');
|
|
30
43
|
console.log(' npx create-harness-vibe-coding@latest');
|
|
31
44
|
console.log(' npx create-harness-vibe-coding@latest -y');
|
|
32
45
|
console.log(' npx create-harness-vibe-coding@latest my-project');
|
|
33
46
|
console.log(' npx create-harness-vibe-coding@latest my-project ./dist/my-project -y');
|
|
47
|
+
console.log(' npx create-harness-vibe-coding@latest legacy ./legacy -y --dry-run');
|
|
48
|
+
console.log(' npx create-harness-vibe-coding@latest legacy ./legacy -y --on-conflict skip');
|
|
49
|
+
console.log(' npx create-harness-vibe-coding@latest web ./web -y --with ts-react-frontend,browser-e2e');
|
|
50
|
+
console.log(' npx create-harness-vibe-coding@latest web ./web -y --preset web-app');
|
|
51
|
+
console.log(' npx create-harness-vibe-coding@latest api ./api -y --preset fullstack --without github-pr-review');
|
|
34
52
|
console.log('');
|
|
35
53
|
process.exit(0);
|
|
36
54
|
}
|
|
37
55
|
|
|
56
|
+
if (parsed.flags.listOptions) {
|
|
57
|
+
printOptions();
|
|
58
|
+
process.exit(0);
|
|
59
|
+
}
|
|
60
|
+
|
|
38
61
|
// Positional args (non-flag)
|
|
39
|
-
const positional =
|
|
62
|
+
const positional = parsed.positionals;
|
|
40
63
|
const argName = positional[0];
|
|
41
64
|
const argDir = positional[1];
|
|
65
|
+
const generationOptions = {
|
|
66
|
+
dryRun: Boolean(parsed.flags.dryRun),
|
|
67
|
+
onConflict: parsed.flags.onConflict || 'fail',
|
|
68
|
+
withOptions: parsed.flags.with || [],
|
|
69
|
+
withoutOptions: parsed.flags.without || [],
|
|
70
|
+
preset: parsed.flags.preset,
|
|
71
|
+
json: Boolean(parsed.flags.json),
|
|
72
|
+
};
|
|
42
73
|
|
|
43
74
|
const DEFAULT_NAME = 'my-vibe-project';
|
|
44
75
|
|
|
76
|
+
// --json: machine-readable output, no prompts, no decorative output
|
|
77
|
+
if (generationOptions.json) {
|
|
78
|
+
const projectName = argName || DEFAULT_NAME;
|
|
79
|
+
const targetDir = argDir || `./${projectName}`;
|
|
80
|
+
const result = generate({ projectName, targetDir, ...generationOptions });
|
|
81
|
+
printJsonResult(result);
|
|
82
|
+
// printJsonResult exits with 1 on failure; we only reach here on success
|
|
83
|
+
process.exit(0);
|
|
84
|
+
}
|
|
85
|
+
|
|
45
86
|
console.log('');
|
|
46
87
|
console.log(pc.magenta('╔══════════════════════════════════════════╗'));
|
|
47
88
|
console.log(pc.magenta('║ create-harness-vibe-coding ║'));
|
|
@@ -59,14 +100,27 @@ if (argName || skipPrompts) {
|
|
|
59
100
|
console.log(pc.dim('────────────────────────────────────────────'));
|
|
60
101
|
console.log(` Project ${pc.green(projectName)}`);
|
|
61
102
|
console.log(` Directory ${pc.green(targetDir)}`);
|
|
62
|
-
console.log(` Creates ${pc.cyan('CLAUDE.md,
|
|
103
|
+
console.log(` Creates ${pc.cyan('CLAUDE.md, README.md, Harness/PLAN.md, Harness/, .claude/, tests/')}`);
|
|
104
|
+
if (generationOptions.dryRun) {
|
|
105
|
+
console.log(` Mode ${pc.yellow('dry-run')}`);
|
|
106
|
+
}
|
|
107
|
+
console.log(` Conflicts ${pc.cyan(generationOptions.onConflict)}`);
|
|
108
|
+
if (generationOptions.withOptions.length > 0) {
|
|
109
|
+
console.log(` Optional ${pc.cyan(generationOptions.withOptions.join(','))}`);
|
|
110
|
+
}
|
|
111
|
+
if (generationOptions.withoutOptions.length > 0) {
|
|
112
|
+
console.log(` Without ${pc.cyan(generationOptions.withoutOptions.join(','))}`);
|
|
113
|
+
}
|
|
114
|
+
if (generationOptions.preset) {
|
|
115
|
+
console.log(` Preset ${pc.cyan(generationOptions.preset)}`);
|
|
116
|
+
}
|
|
63
117
|
if (skipPrompts) {
|
|
64
118
|
console.log(` Mode ${pc.dim('non-interactive (-y)')}`);
|
|
65
119
|
}
|
|
66
120
|
console.log(pc.dim('────────────────────────────────────────────'));
|
|
67
121
|
console.log('');
|
|
68
122
|
|
|
69
|
-
const result = generate({ projectName, targetDir });
|
|
123
|
+
const result = generate({ projectName, targetDir, ...generationOptions });
|
|
70
124
|
printResult(result, targetDir);
|
|
71
125
|
} else {
|
|
72
126
|
// Interactive mode
|
|
@@ -88,14 +142,30 @@ if (argName || skipPrompts) {
|
|
|
88
142
|
console.log(pc.dim('────────────────────────────────────────────'));
|
|
89
143
|
console.log(` Project ${pc.green(projectName)}`);
|
|
90
144
|
console.log(` Directory ${pc.green(targetDir)}`);
|
|
91
|
-
console.log(` Creates ${pc.cyan('CLAUDE.md,
|
|
145
|
+
console.log(` Creates ${pc.cyan('CLAUDE.md, README.md, Harness/PLAN.md, Harness/, .claude/, tests/')}`);
|
|
146
|
+
console.log(` Conflicts ${pc.cyan(generationOptions.onConflict)}`);
|
|
92
147
|
console.log(pc.dim('────────────────────────────────────────────'));
|
|
93
148
|
console.log('');
|
|
94
149
|
|
|
150
|
+
const preview = generate({ projectName, targetDir, ...generationOptions, dryRun: true });
|
|
151
|
+
if (!preview.success) {
|
|
152
|
+
printResult(preview, targetDir);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
console.log(pc.yellow('Planned changes: no files have been written yet.'));
|
|
156
|
+
printSummary(preview.summary);
|
|
157
|
+
printPlan(preview.plan);
|
|
158
|
+
printWarnings(preview);
|
|
159
|
+
console.log('');
|
|
160
|
+
|
|
161
|
+
if (generationOptions.dryRun) {
|
|
162
|
+
process.exit(0);
|
|
163
|
+
}
|
|
164
|
+
|
|
95
165
|
let proceed = true;
|
|
96
166
|
try {
|
|
97
167
|
proceed = await p.confirm({
|
|
98
|
-
message: 'Confirm generation?',
|
|
168
|
+
message: 'Confirm generation with this plan?',
|
|
99
169
|
initialValue: true,
|
|
100
170
|
});
|
|
101
171
|
if (p.isCancel(proceed)) proceed = false;
|
|
@@ -109,28 +179,39 @@ if (argName || skipPrompts) {
|
|
|
109
179
|
}
|
|
110
180
|
|
|
111
181
|
console.log('');
|
|
112
|
-
const result = generate({ projectName, targetDir });
|
|
182
|
+
const result = generate({ projectName, targetDir, ...generationOptions });
|
|
113
183
|
printResult(result, targetDir);
|
|
114
184
|
}
|
|
115
185
|
|
|
116
186
|
function printResult(result, targetDir) {
|
|
117
187
|
if (result.success) {
|
|
118
|
-
|
|
188
|
+
if (result.dryRun) {
|
|
189
|
+
console.log(pc.yellow('\nDry run: no files or directories were written.'));
|
|
190
|
+
printSummary(result.summary);
|
|
191
|
+
printPlan(result.plan);
|
|
192
|
+
if (result.warnings.length > 0) {
|
|
193
|
+
console.log(pc.yellow('\nWarning(s):'));
|
|
194
|
+
for (const warning of result.warnings) {
|
|
195
|
+
console.log(pc.yellow(` - ${warning}`));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
console.log('');
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
console.log(pc.green('\nGeneration complete.\n'));
|
|
203
|
+
printSummary(result.summary);
|
|
204
|
+
|
|
205
|
+
printWarnings(result);
|
|
119
206
|
|
|
120
207
|
console.log(pc.bold('Next steps:'));
|
|
121
208
|
console.log(` ${pc.cyan(`cd ${targetDir}`)}`);
|
|
122
209
|
console.log(` ${pc.cyan('claude')} # Start Claude Code`);
|
|
123
|
-
console.log(` Tell Claude: "${pc.yellow('Read SETUP.md. Bootstrap this project from idea to first vertical slice.')}"`);
|
|
210
|
+
console.log(` Tell Claude: "${pc.yellow('Read Harness/SETUP.md. Bootstrap this project from idea to first vertical slice.')}"`);
|
|
124
211
|
console.log('');
|
|
125
|
-
console.log(pc.dim(' SETUP.md is temporary. Delete it after initialization.'));
|
|
212
|
+
console.log(pc.dim(' Harness/SETUP.md is temporary. Delete it after initialization.'));
|
|
126
213
|
console.log('');
|
|
127
214
|
|
|
128
|
-
if (result.errors.length > 0) {
|
|
129
|
-
console.log(pc.red(`\n${result.errors.length} warning(s):`));
|
|
130
|
-
for (const err of result.errors) {
|
|
131
|
-
console.log(pc.red(` - ${err}`));
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
215
|
} else {
|
|
135
216
|
console.log(pc.red('\nGeneration failed:'));
|
|
136
217
|
for (const err of result.errors) {
|
|
@@ -139,3 +220,136 @@ function printResult(result, targetDir) {
|
|
|
139
220
|
process.exit(1);
|
|
140
221
|
}
|
|
141
222
|
}
|
|
223
|
+
|
|
224
|
+
function parseArgs(args) {
|
|
225
|
+
const flags = {
|
|
226
|
+
with: [],
|
|
227
|
+
without: [],
|
|
228
|
+
};
|
|
229
|
+
const positionals = [];
|
|
230
|
+
const errors = [];
|
|
231
|
+
|
|
232
|
+
function readValue(flagName, index) {
|
|
233
|
+
const value = args[index + 1];
|
|
234
|
+
if (!value || value.startsWith('-')) {
|
|
235
|
+
errors.push(`${flagName} requires a value`);
|
|
236
|
+
return { value: undefined, nextIndex: index };
|
|
237
|
+
}
|
|
238
|
+
return { value, nextIndex: index + 1 };
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function readEqualsValue(flagName, value) {
|
|
242
|
+
if (!value || value.startsWith('-')) {
|
|
243
|
+
errors.push(`${flagName} requires a value`);
|
|
244
|
+
return undefined;
|
|
245
|
+
}
|
|
246
|
+
return value;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
for (let i = 0; i < args.length; i += 1) {
|
|
250
|
+
const arg = args[i];
|
|
251
|
+
|
|
252
|
+
if (arg === '-h') {
|
|
253
|
+
flags.h = true;
|
|
254
|
+
} else if (arg === '--help') {
|
|
255
|
+
flags.help = true;
|
|
256
|
+
} else if (arg === '-y') {
|
|
257
|
+
flags.y = true;
|
|
258
|
+
} else if (arg === '--yes') {
|
|
259
|
+
flags.yes = true;
|
|
260
|
+
} else if (arg === '--dry-run') {
|
|
261
|
+
flags.dryRun = true;
|
|
262
|
+
} else if (arg === '--list-options') {
|
|
263
|
+
flags.listOptions = true;
|
|
264
|
+
} else if (arg === '--json') {
|
|
265
|
+
flags.json = true;
|
|
266
|
+
} else if (arg === '--on-conflict') {
|
|
267
|
+
const parsedValue = readValue('--on-conflict', i);
|
|
268
|
+
flags.onConflict = parsedValue.value;
|
|
269
|
+
i = parsedValue.nextIndex;
|
|
270
|
+
} else if (arg.startsWith('--on-conflict=')) {
|
|
271
|
+
flags.onConflict = readEqualsValue('--on-conflict', arg.slice('--on-conflict='.length));
|
|
272
|
+
} else if (arg === '--with') {
|
|
273
|
+
const parsedValue = readValue('--with', i);
|
|
274
|
+
if (parsedValue.value !== undefined) flags.with.push(parsedValue.value);
|
|
275
|
+
i = parsedValue.nextIndex;
|
|
276
|
+
} else if (arg.startsWith('--with=')) {
|
|
277
|
+
const value = readEqualsValue('--with', arg.slice('--with='.length));
|
|
278
|
+
if (value !== undefined) flags.with.push(value);
|
|
279
|
+
} else if (arg === '--without') {
|
|
280
|
+
const parsedValue = readValue('--without', i);
|
|
281
|
+
if (parsedValue.value !== undefined) flags.without.push(parsedValue.value);
|
|
282
|
+
i = parsedValue.nextIndex;
|
|
283
|
+
} else if (arg.startsWith('--without=')) {
|
|
284
|
+
const value = readEqualsValue('--without', arg.slice('--without='.length));
|
|
285
|
+
if (value !== undefined) flags.without.push(value);
|
|
286
|
+
} else if (arg === '--preset') {
|
|
287
|
+
const parsedValue = readValue('--preset', i);
|
|
288
|
+
flags.preset = parsedValue.value;
|
|
289
|
+
i = parsedValue.nextIndex;
|
|
290
|
+
} else if (arg.startsWith('--preset=')) {
|
|
291
|
+
flags.preset = readEqualsValue('--preset', arg.slice('--preset='.length));
|
|
292
|
+
} else if (arg.startsWith('-')) {
|
|
293
|
+
errors.push(`Unknown flag "${arg}"`);
|
|
294
|
+
} else {
|
|
295
|
+
positionals.push(arg);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
return { flags, positionals, errors };
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function printOptions() {
|
|
303
|
+
const catalog = getOptionalCatalog();
|
|
304
|
+
|
|
305
|
+
console.log('');
|
|
306
|
+
console.log(pc.bold('Optional workflow skills:'));
|
|
307
|
+
for (const skill of catalog.skills) {
|
|
308
|
+
console.log(` ${pc.cyan(skill.id)} - ${skill.description}`);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
console.log('');
|
|
312
|
+
console.log(pc.bold('Presets:'));
|
|
313
|
+
for (const [name, skills] of Object.entries(catalog.presets)) {
|
|
314
|
+
console.log(` ${pc.cyan(name)} - ${skills.join(', ')}`);
|
|
315
|
+
}
|
|
316
|
+
console.log('');
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
function printSummary(summary) {
|
|
320
|
+
console.log(` created ${pc.green(summary.created)}`);
|
|
321
|
+
console.log(` skipped ${pc.yellow(summary.skipped)}`);
|
|
322
|
+
console.log(` backed up ${pc.cyan(summary.backedUp)}`);
|
|
323
|
+
console.log(` overwritten ${pc.cyan(summary.overwritten)}`);
|
|
324
|
+
console.log(` conflicts ${summary.conflicts > 0 ? pc.red(summary.conflicts) : pc.dim(summary.conflicts)}`);
|
|
325
|
+
console.log(` directories ${pc.dim(summary.mkdir)}`);
|
|
326
|
+
console.log('');
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function printPlan(plan) {
|
|
330
|
+
for (const [label, files] of Object.entries(plan)) {
|
|
331
|
+
if (!files.length) continue;
|
|
332
|
+
console.log(` ${label}:`);
|
|
333
|
+
for (const file of files) {
|
|
334
|
+
console.log(` - ${file}`);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
function printWarnings(result) {
|
|
340
|
+
if (!result.warnings.length) return;
|
|
341
|
+
|
|
342
|
+
console.log(pc.yellow('\nWarning(s):'));
|
|
343
|
+
for (const warning of result.warnings) {
|
|
344
|
+
console.log(pc.yellow(` - ${warning}`));
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
function printJsonResult(result) {
|
|
349
|
+
// Remove `created` array from output — it is already in the plan, avoid duplication
|
|
350
|
+
const { created, ...rest } = result;
|
|
351
|
+
console.log(JSON.stringify(rest, null, 2));
|
|
352
|
+
if (!result.success) {
|
|
353
|
+
process.exit(1);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
@@ -12,10 +12,10 @@ You are an architecture review agent for this project harness.
|
|
|
12
12
|
|
|
13
13
|
Load first:
|
|
14
14
|
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
18
|
-
- `
|
|
15
|
+
- `Harness/architecture.md`
|
|
16
|
+
- `Harness/domain/ports.md`
|
|
17
|
+
- `Harness/data-flow.md` when runtime flow may change
|
|
18
|
+
- `Harness/state-machines.md` when state may change
|
|
19
19
|
- current PRD or feature doc
|
|
20
20
|
|
|
21
21
|
Rules:
|
|
@@ -12,10 +12,10 @@ You are a documentation verification agent for this project harness.
|
|
|
12
12
|
|
|
13
13
|
Load first:
|
|
14
14
|
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
18
|
-
- `
|
|
15
|
+
- `Harness/research/README.md`
|
|
16
|
+
- `Harness/architecture.md` when boundaries may change
|
|
17
|
+
- `Harness/domain/ports.md` when APIs cross layers
|
|
18
|
+
- `Harness/PLAN.md`
|
|
19
19
|
|
|
20
20
|
Inputs you must receive:
|
|
21
21
|
|
|
@@ -12,7 +12,7 @@ You are an implementation agent for this project harness.
|
|
|
12
12
|
|
|
13
13
|
Load first:
|
|
14
14
|
|
|
15
|
-
- current task from `
|
|
15
|
+
- current task from `Harness/PLAN.md`
|
|
16
16
|
- current feature doc when present
|
|
17
17
|
- failing test or manual check
|
|
18
18
|
- relevant architecture/ports docs if boundaries are touched
|
|
@@ -12,9 +12,9 @@ You are a planning agent for this project harness.
|
|
|
12
12
|
|
|
13
13
|
Load first:
|
|
14
14
|
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
15
|
+
- `Harness/PLAN.md`
|
|
16
|
+
- `Harness/lifecycle.md`
|
|
17
|
+
- `Harness/dispatch.md`
|
|
18
18
|
- current PRD or feature doc if present
|
|
19
19
|
|
|
20
20
|
Rules:
|
|
@@ -12,9 +12,9 @@ You are a bounded research agent for this project harness.
|
|
|
12
12
|
|
|
13
13
|
Load first:
|
|
14
14
|
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
15
|
+
- `Harness/research/README.md`
|
|
16
|
+
- `Harness/research/research-results.md`
|
|
17
|
+
- `Harness/PLAN.md`
|
|
18
18
|
|
|
19
19
|
Inputs you must receive:
|
|
20
20
|
|
|
@@ -39,4 +39,4 @@ Return:
|
|
|
39
39
|
- sources with links, source type, checked date
|
|
40
40
|
- adopted / rejected / watch decisions
|
|
41
41
|
- risks and unknowns
|
|
42
|
-
- patch-ready update for `
|
|
42
|
+
- patch-ready update for `Harness/research/research-results.md`
|
|
@@ -13,8 +13,8 @@ You are a test-first agent for this project harness.
|
|
|
13
13
|
Load first:
|
|
14
14
|
|
|
15
15
|
- current PRD or feature doc
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
16
|
+
- `Harness/PLAN.md`
|
|
17
|
+
- `Harness/agent-workflow.md`
|
|
18
18
|
|
|
19
19
|
Inputs you must receive:
|
|
20
20
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# /wf
|
|
2
|
+
|
|
3
|
+
Enter `wf-mode`.
|
|
4
|
+
|
|
5
|
+
Read `Harness/WF.md`, then run the full long-task loop:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
intake
|
|
9
|
+
-> exploration
|
|
10
|
+
-> second plan
|
|
11
|
+
-> test
|
|
12
|
+
-> implement
|
|
13
|
+
-> review
|
|
14
|
+
-> verify
|
|
15
|
+
-> debugger recovery loop when needed
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Keep `Harness/PLAN.md#Heartbeat` current.
|
|
@@ -7,9 +7,11 @@ alwaysApply: true
|
|
|
7
7
|
|
|
8
8
|
## Context
|
|
9
9
|
|
|
10
|
-
- Start with `CLAUDE.md`, `MEMORY.md`, and `
|
|
11
|
-
- Do not bulk-read `
|
|
12
|
-
- Keep `
|
|
10
|
+
- Start with `CLAUDE.md`, `Harness/MEMORY.md`, and `Harness/README.md`.
|
|
11
|
+
- Do not bulk-read `Harness/`. Load by router trigger.
|
|
12
|
+
- Keep `Harness/PLAN.md` current when work has multiple steps, files, or agents.
|
|
13
|
+
- project files are the only durable communication channel. chat/subagent transcript state is non-authoritative.
|
|
14
|
+
- Important assumptions, decisions, blockers, evidence, and handoffs must be written to `Harness/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
|
|
13
15
|
|
|
14
16
|
## Verification
|
|
15
17
|
|
|
@@ -20,14 +22,22 @@ alwaysApply: true
|
|
|
20
22
|
|
|
21
23
|
## Subagents
|
|
22
24
|
|
|
23
|
-
- Use `
|
|
24
|
-
- Use `
|
|
25
|
-
- Use `
|
|
25
|
+
- Use `Harness/subagents.md` before orchestrating multiple agents.
|
|
26
|
+
- Use `Harness/context-loading.md` before spawning.
|
|
27
|
+
- Use `Harness/dispatch.md` before parallel or multi-agent work.
|
|
28
|
+
- Use `Harness/extension.md` before adding stack-specific agents, skills, rules, or hooks.
|
|
26
29
|
- Every subagent needs role, task, read boundary, write boundary, and return format.
|
|
27
30
|
- Writing agents must run serially unless write sets are disjoint.
|
|
28
31
|
- If the runtime cannot spawn subagents, emulate the same role pack in a separate bounded pass.
|
|
29
32
|
- Main agent owns integration and final verification.
|
|
30
33
|
|
|
34
|
+
## Memory
|
|
35
|
+
|
|
36
|
+
- Record a lightweight reflection in `Harness/memory/tool-usage-reflections.md` when the same tool/use pattern fails 3+ times.
|
|
37
|
+
- Record repeated user corrections or durable preferences in `Harness/memory/user-corrections-preferences.md` when the user corrects the same assumption/pattern 2+ times.
|
|
38
|
+
- Record reusable review/debug lessons in `Harness/memory/agent-lessons-patterns.md`.
|
|
39
|
+
- Keep memory entries concise and never include secrets.
|
|
40
|
+
|
|
31
41
|
## Security
|
|
32
42
|
|
|
33
43
|
- No secrets in source code.
|
|
@@ -7,9 +7,10 @@ description: Use for implementation, review, debugging, verification, and closin
|
|
|
7
7
|
|
|
8
8
|
Load:
|
|
9
9
|
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
10
|
+
- `Harness/agent-workflow.md`
|
|
11
|
+
- `Harness/subagents.md` when more than one agent, reviewer, or recovery pass is useful
|
|
12
|
+
- `Harness/dispatch.md` when more than one agent is useful
|
|
13
|
+
- `Harness/PLAN.md`
|
|
13
14
|
- current feature doc if present
|
|
14
15
|
|
|
15
16
|
Follow:
|
|
@@ -7,9 +7,10 @@ description: Use before spawning subagents, splitting work, or when context is g
|
|
|
7
7
|
|
|
8
8
|
Load:
|
|
9
9
|
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
10
|
+
- `Harness/subagents.md`
|
|
11
|
+
- `Harness/context-loading.md`
|
|
12
|
+
- `Harness/dispatch.md` when more than one agent is useful
|
|
13
|
+
- `Harness/PLAN.md`
|
|
13
14
|
- current feature doc if present
|
|
14
15
|
|
|
15
16
|
For each subagent or bounded pass, provide:
|
|
@@ -7,9 +7,9 @@ description: Use for raw ideas, vague product requests, 0-1 planning, PRD work,
|
|
|
7
7
|
|
|
8
8
|
Load:
|
|
9
9
|
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
10
|
+
- `Harness/lifecycle.md`
|
|
11
|
+
- `Harness/research/PRD.md`
|
|
12
|
+
- `Harness/PLAN.md`
|
|
13
13
|
|
|
14
14
|
Output:
|
|
15
15
|
|
|
@@ -7,9 +7,9 @@ description: Use for market, product, stack, dependency, API, pricing, legal, se
|
|
|
7
7
|
|
|
8
8
|
Load:
|
|
9
9
|
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
10
|
+
- `Harness/research/README.md`
|
|
11
|
+
- `Harness/research/research-results.md`
|
|
12
|
+
- `Harness/PLAN.md`
|
|
13
13
|
|
|
14
14
|
Define:
|
|
15
15
|
|
|
@@ -26,4 +26,4 @@ Return:
|
|
|
26
26
|
- sources with links and source type
|
|
27
27
|
- adopted / rejected / watch decisions
|
|
28
28
|
- risks and unknowns
|
|
29
|
-
- patch-ready `
|
|
29
|
+
- patch-ready `Harness/research/research-results.md` update
|
|
@@ -5,10 +5,12 @@ description: Use at the start of any task, or when unsure which harness document
|
|
|
5
5
|
|
|
6
6
|
# Harness Router
|
|
7
7
|
|
|
8
|
-
1. Read `
|
|
8
|
+
1. Read `Harness/README.md`.
|
|
9
9
|
2. Identify the current situation from "Load By Task".
|
|
10
|
-
3.
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
3. Apply routing priority before loading extra files:
|
|
11
|
+
- `/wf`, long, difficult, uncertain, repeated-failure, migration, architecture-heavy, browser-visible, or broad multi-agent implementation work routes to `wf-mode` first.
|
|
12
|
+
- Bounded subagent-only coordination routes to `subagent-orchestrator`.
|
|
13
|
+
4. Load only the listed primary doc(s). Let `wf-mode` decide when to load subagent docs.
|
|
14
|
+
5. If the task grows, update `Harness/PLAN.md` and use `harness-context`.
|
|
13
15
|
|
|
14
|
-
Do not bulk-read `
|
|
16
|
+
Do not bulk-read `Harness/`.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: readme-optimizer
|
|
3
|
+
description: Use when a project README already exists and the user asks to preserve, merge, modernize, optimize, or clarify repository documentation during harness install or documentation work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# README Optimizer
|
|
7
|
+
|
|
8
|
+
Improve `README.md` without breaking project-owned public docs.
|
|
9
|
+
|
|
10
|
+
## Load
|
|
11
|
+
|
|
12
|
+
- root `README.md`
|
|
13
|
+
- package files and scripts (`package.json`, `pyproject.toml`, `go.mod`, etc.)
|
|
14
|
+
- CI files when present
|
|
15
|
+
- `Harness/PLAN.md`
|
|
16
|
+
- `Harness/architecture.md` only when an architecture summary or diagram is requested
|
|
17
|
+
|
|
18
|
+
## Mode
|
|
19
|
+
|
|
20
|
+
Ask the user which mode they approve when the existing README is meaningful:
|
|
21
|
+
|
|
22
|
+
| Mode | Use when | Allowed edit |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| Preserve + append | default for existing projects | Add only a compact Development, Test, Build, Git, or Harness section |
|
|
25
|
+
| Structure pass | README is stale, hard to scan, or missing operational docs | Reorganize with headings, tables, command blocks, and links while preserving facts |
|
|
26
|
+
| Full rewrite | user explicitly wants a polished public README | Rewrite after approval; keep claims source-backed |
|
|
27
|
+
|
|
28
|
+
If unanswered, use Preserve + append.
|
|
29
|
+
|
|
30
|
+
## Rules
|
|
31
|
+
|
|
32
|
+
- Preserve existing product, package, API, and public-facing content unless the user approves a rewrite.
|
|
33
|
+
- Do not invent features, benchmarks, roadmap, support policy, badges, install commands, or CI status.
|
|
34
|
+
- Use tables for command matrices, environment variables, endpoints, and deployment notes when facts are known.
|
|
35
|
+
- Use Mermaid or ASCII architecture diagrams only when the structure is observed or approved; label uncertain diagrams as proposed.
|
|
36
|
+
- Keep detailed architecture in `Harness/architecture.md`; README may link to it or show a short overview.
|
|
37
|
+
- Keep agent rules in `CLAUDE.md`/`AGENTS.md`, not README.
|
|
38
|
+
- Record the chosen mode and any skipped README improvements in `Harness/PLAN.md`.
|
|
39
|
+
|
|
40
|
+
## Output
|
|
41
|
+
|
|
42
|
+
Before broad edits, return:
|
|
43
|
+
|
|
44
|
+
1. chosen mode
|
|
45
|
+
2. sections to preserve
|
|
46
|
+
3. sections to add or reorganize
|
|
47
|
+
4. facts still unknown
|
|
48
|
+
5. verification command or manual review step
|