create-harness-vibe-coding 0.5.2 → 0.6.1
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 +1 -1
- package/package.json +1 -1
- package/src/generator.js +8 -2
- package/templates/common/.claude/agents/context-master.md +1 -1
- package/templates/common/.claude/agents/reviewer.md +1 -0
- package/templates/common/.claude/commands/wf-review.md +32 -0
- package/templates/common/.claude/skills/wf-review/SKILL.md +50 -0
- package/templates/common/CLAUDE.md +3 -1
- package/templates/common/MEMORY.md +1 -0
- package/templates/common/docs/README.md +3 -0
- package/templates/common/docs/harness/WF-MAX.md +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ Follow the README at https://github.com/zingspark/create-harness-vibe-coding to
|
|
|
26
26
|
|
|
27
27
|
That's it. Two paths into the harness — you type `npx`, or your agent reads the sentence.
|
|
28
28
|
|
|
29
|
-
[README-CN.md](README-CN.md)
|
|
29
|
+
Chinese README: [README-CN.md](README-CN.md)
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
package/package.json
CHANGED
package/src/generator.js
CHANGED
|
@@ -2,7 +2,9 @@ import fs from 'node:fs';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../package.json'), 'utf8'));
|
|
6
8
|
const TEMPLATES_DIR = path.resolve(__dirname, '..', 'templates', 'common');
|
|
7
9
|
const OPTIONAL_DIR = path.resolve(__dirname, '..', 'templates', 'optional');
|
|
8
10
|
const OPTIONAL_CATALOG = path.join(OPTIONAL_DIR, 'catalog.json');
|
|
@@ -327,7 +329,11 @@ export function generate({
|
|
|
327
329
|
|
|
328
330
|
// Resolve targetDir relative to cwd
|
|
329
331
|
const resolvedDir = path.resolve(process.cwd(), targetDir);
|
|
330
|
-
const vars = {
|
|
332
|
+
const vars = {
|
|
333
|
+
projectName,
|
|
334
|
+
generatorVersion: pkg.version,
|
|
335
|
+
generatedTimestamp: new Date().toISOString(),
|
|
336
|
+
};
|
|
331
337
|
|
|
332
338
|
const optional = resolveOptionalSelection({ withOptions, withoutOptions, preset });
|
|
333
339
|
const fileSpecs = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-master
|
|
3
3
|
description: Use when context exceeds ~85% of the window, or during WF closeout to extract durable knowledge before compression. Read-only analysis except for writing compression suggestions to PROGRESS.md#Heartbeat.
|
|
4
|
-
tools: Read, Grep, Glob
|
|
4
|
+
tools: Read, Grep, Glob, Write
|
|
5
5
|
model: haiku
|
|
6
6
|
skills: harness-context
|
|
7
7
|
---
|
|
@@ -22,6 +22,7 @@ Rules:
|
|
|
22
22
|
- Do not write files.
|
|
23
23
|
- Prioritize bugs, regressions, missing tests, boundary violations, and security risks.
|
|
24
24
|
- Findings must include file and line when possible.
|
|
25
|
+
- Flag unsupported factual claims: if a code comment, doc line, or agent output asserts a fact you cannot confirm by reading the referenced file, report it as a "Hallucination Risk" finding.
|
|
25
26
|
- Separate critical/high findings from minor cleanup.
|
|
26
27
|
- If no issues are found, state residual risk and test gaps.
|
|
27
28
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# /wf-review [focus]
|
|
2
|
+
|
|
3
|
+
Cross-model peer review. Invokes the OTHER agent CLI to review changes from a fresh perspective.
|
|
4
|
+
|
|
5
|
+
## How it works
|
|
6
|
+
|
|
7
|
+
1. Detect which runtime we're running under
|
|
8
|
+
2. Prepare context: diff, relevant files, architecture docs, problem description
|
|
9
|
+
3. Pipe to the OTHER CLI for independent review
|
|
10
|
+
4. Synthesize the response
|
|
11
|
+
|
|
12
|
+
## Required
|
|
13
|
+
|
|
14
|
+
- Load `wf-review` skill.
|
|
15
|
+
- MUST use `Bash` to invoke the other CLI — never simulate or fake the review.
|
|
16
|
+
- Present the raw review output to the user, then add your own analysis.
|
|
17
|
+
|
|
18
|
+
## CLI Detection
|
|
19
|
+
|
|
20
|
+
- Check `which codex && echo CODEX || echo NO_CODEX` to detect Codex
|
|
21
|
+
- Check `which claude && echo CLAUDE || echo NO_CLAUDE` to detect Claude
|
|
22
|
+
- Use the OTHER CLI — the one NOT running this session. Never self-review.
|
|
23
|
+
- If only one CLI is available: warn, then use it (single-model review is better than none).
|
|
24
|
+
|
|
25
|
+
## Flow
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
CEO prepares context (diff + architecture docs + focus prompt)
|
|
29
|
+
→ Bash: codex exec "..." (or claude -p "...")
|
|
30
|
+
→ CEO reads output
|
|
31
|
+
→ CEO presents findings + own analysis
|
|
32
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wf-review
|
|
3
|
+
description: Cross-model peer review. Invokes the other agent CLI (Codex or Claude) to independently review changes, architecture, or bug fixes. Use for /wf-review, peer review, second opinion, or when stuck.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WF Review
|
|
7
|
+
|
|
8
|
+
Cross-model peer review via the OTHER agent CLI. Fresh eyes on your changes.
|
|
9
|
+
|
|
10
|
+
## Load
|
|
11
|
+
|
|
12
|
+
- `Harness/README.md` for project context
|
|
13
|
+
- Current diff or target files
|
|
14
|
+
|
|
15
|
+
## How It Works
|
|
16
|
+
|
|
17
|
+
1. **Detect runtime**: Check `which codex` and `which claude`
|
|
18
|
+
2. **Prepare context**: Gather diff (`git diff`), relevant architecture docs, the specific question
|
|
19
|
+
3. **Invoke the OTHER CLI** — the one we're NOT currently running under
|
|
20
|
+
4. **Read and synthesize**: Present the raw output, then add analysis
|
|
21
|
+
|
|
22
|
+
## CLI Commands
|
|
23
|
+
|
|
24
|
+
| Runtime | Review Command |
|
|
25
|
+
|---|---|
|
|
26
|
+
| Claude → Codex | `git diff \| codex exec "..."` (include full diff, not just commit message) |
|
|
27
|
+
| Codex → Claude | `git diff \| claude -p "..."` |
|
|
28
|
+
| Either (fallback) | try the other CLI; if only one installed, use it (still better than self-review) |
|
|
29
|
+
|
|
30
|
+
**Anti-self-review rule**: Detect which runtime we're in, then use the OTHER one. Never invoke the same CLI that's running the session.
|
|
31
|
+
|
|
32
|
+
## Context to Include
|
|
33
|
+
|
|
34
|
+
For a good review, pipe or include:
|
|
35
|
+
- `git diff` or `git diff --cached`
|
|
36
|
+
- Relevant `Harness/` docs (architecture.md, domain/ports.md if filled)
|
|
37
|
+
- The specific focus: "find bugs", "critique architecture from 4+ dimensions", "fix this bug", "check for security issues"
|
|
38
|
+
|
|
39
|
+
## Rules
|
|
40
|
+
|
|
41
|
+
- Never simulate or fake the review. The Bash tool MUST invoke the other CLI.
|
|
42
|
+
- If both CLIs fail, report the error — don't silently skip.
|
|
43
|
+
- Present the raw review output to the user before adding your own analysis.
|
|
44
|
+
- Distinguish between: the peer's findings (authoritative) and your interpretation (supplementary).
|
|
45
|
+
|
|
46
|
+
## Return
|
|
47
|
+
|
|
48
|
+
- Which CLI was used for review
|
|
49
|
+
- Raw review output
|
|
50
|
+
- CEO's synthesis and action items
|
|
@@ -11,7 +11,7 @@ Root entry for Claude Code. Keep this file short.
|
|
|
11
11
|
- `Harness/README.md` is the task router. For every request, check `Harness/README.md#Load By Task`; if a row matches, read and follow those docs before acting.
|
|
12
12
|
- `Harness/PROGRESS.md` is the global task index. Load at session start to see active task and task history.
|
|
13
13
|
- If work spans more than one step, create a task capsule from `Harness/tasks/_template/` and update `Harness/tasks/<task-id>/PROGRESS.md`.
|
|
14
|
-
- Use `/wf <task>`, `/wf-max [task]`, `/wf-learn`, `wf mode`, `wf max`, `workflow mode`, `wk mode`, `Harness/WF.md`, or `Harness/WF-MAX.md` for long, difficult, uncertain, multi-file, or repeated-failure work.
|
|
14
|
+
- Use `/wf <task>`, `/wf-max [task]`, `/wf-learn`, `/wf-review [focus]`, `wf mode`, `wf max`, `workflow mode`, `wk mode`, `Harness/WF.md`, or `Harness/WF-MAX.md` for long, difficult, uncertain, multi-file, or repeated-failure work.
|
|
15
15
|
- Use `subagent-orchestrator` and `Harness/subagents.md` when coordinating multiple subagents.
|
|
16
16
|
- Use `/wf update` to check for and apply scaffold updates from GitHub. See `.claude/skills/wf-update/SKILL.md`.
|
|
17
17
|
- Subagents are readers and reporters. Only the main agent writes to `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`.
|
|
@@ -27,6 +27,7 @@ Root entry for Claude Code. Keep this file short.
|
|
|
27
27
|
- If multiple valid approaches exist and the choice affects architecture, scope, stack, or user-facing behavior, present trade-offs instead of picking silently.
|
|
28
28
|
- State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
|
|
29
29
|
- If something is unclear, stop. Name what is unclear and ask instead of guessing.
|
|
30
|
+
- Before asserting a fact about the codebase, read the file that proves it. If you cannot cite the file and line, do not assert.
|
|
30
31
|
|
|
31
32
|
## 3. Simplicity First
|
|
32
33
|
|
|
@@ -72,3 +73,4 @@ Root entry for Claude Code. Keep this file short.
|
|
|
72
73
|
|
|
73
74
|
- Never call `EnterPlanMode` — delegate planning to `planner` subagents (see `Harness/WF.md`).
|
|
74
75
|
- Never write code directly in `/wf` or `/wf-max` mode — delegate all implementation to subagents (see `Harness/WF-MAX.md`).
|
|
76
|
+
- **Enforcement**: `.claude/settings.json` hooks prevent `EnterPlanMode` calls. Settings include `allowTools: ["!EnterPlanMode"]` for the main session.
|
|
@@ -29,6 +29,7 @@ Stack-specific agents can be added after the product shape is known.
|
|
|
29
29
|
- [wf-mode](../.claude/skills/wf-mode/SKILL.md) — long-task workflow: exploration, second plan, implementation, review, verification, heartbeat, and recovery loop.
|
|
30
30
|
- [subagent-orchestrator](../.claude/skills/subagent-orchestrator/SKILL.md) — controller-led subagent orchestration, parallel read-only passes, review gates, and recovery handoffs.
|
|
31
31
|
- [readme-optimizer](../.claude/skills/readme-optimizer/SKILL.md) — README preservation, append-only development sections, structured tables, and approved architecture diagrams.
|
|
32
|
+
- [wf-review](../.claude/skills/wf-review/SKILL.md) — cross-model peer review: invoke the other agent CLI (Codex/Claude) for independent review.
|
|
32
33
|
- [wf-learn](../.claude/skills/wf-learn/SKILL.md) — force memory learning cycle: context-master → memory-master → project + global memory.
|
|
33
34
|
- [wf-update](../.claude/skills/wf-update/SKILL.md) — GitHub-based incremental harness update, checksum comparison, and safe in-place updates.
|
|
34
35
|
- [wf-max](../.claude/skills/wf-max/SKILL.md) — maximum-parallelism workflow: write-set coloring, wave dispatch, parallel review per dimension.
|
|
@@ -61,6 +61,7 @@ Routing priority: if a request explicitly says `/wf <task>`, `/wf-max [task]`, `
|
|
|
61
61
|
| Need architecture or boundaries | architecture, boundary, layer, domain, port, adapter, dependency | [architecture.md](architecture.md), [domain/ports.md](domain/ports.md) | layer map, ports, constraints |
|
|
62
62
|
| Need WF mode | wf, /wf, wf mode, workflow mode, wk mode, long task, difficult, stuck, repeated failure | [WF.md](WF.md), [PROGRESS.md](PROGRESS.md), the current task `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md` | exploration plan, second plan, heartbeat, recovery loop; explicit WF/WK loads subagent docs immediately |
|
|
63
63
|
| Need to learn from errors | /wf-learn, wf learn, learn, remember, memory, lesson | [MEMORY.md](MEMORY.md), `.claude/skills/wf-learn/SKILL.md`, `Harness/memory/*` | context-master → memory-master → project + global memory |
|
|
64
|
+
| Need peer review | /wf-review, peer review, second opinion, cross-check, stuck | `.claude/skills/wf-review/SKILL.md`, `Harness/README.md` | cross-model review via other CLI (Codex/Claude) |
|
|
64
65
|
| Need WF Max mode | /wf-max, wf max, maximum parallelism, max parallel | [WF-MAX.md](WF-MAX.md), [WF.md](WF.md), [subagents.md](subagents.md), [dispatch.md](dispatch.md) | max-parallel exploration, write-set coloring, wave dispatch |
|
|
65
66
|
| Adding harness to existing project | existing project, onboarding, migrate, bootstrap, preserve, conflict | [extension.md](extension.md), [PROGRESS.md](PROGRESS.md), root `README.md` and package/CI files | discovered project facts, preserved config, manual registration plan |
|
|
66
67
|
| README optimization | README, docs, quickstart, install docs, architecture diagram, command table, documentation polish | root `README.md`, `.claude/skills/readme-optimizer/SKILL.md`, [PROGRESS.md](PROGRESS.md), [architecture.md](architecture.md) as needed | approved README mode, preserved sections, proposed diff plan |
|
|
@@ -111,8 +112,10 @@ Harness/tasks/_template/ task capsule template (copy to create new tas
|
|
|
111
112
|
Harness/WF.md long-task workflow and recovery loop
|
|
112
113
|
Harness/WF-MAX.md max-parallelism workflow with wave dispatch
|
|
113
114
|
.claude/skills/wf-max/SKILL.md max-parallelism skill loader
|
|
115
|
+
.claude/skills/wf-review/SKILL.md cross-model peer review skill
|
|
114
116
|
.claude/commands/wf-max.md /wf-max slash command bridge
|
|
115
117
|
.claude/commands/learn.md /wf-learn slash command bridge
|
|
118
|
+
.claude/commands/wf-review.md /wf-review slash command bridge
|
|
116
119
|
Harness/lifecycle.md 0-1 product flow
|
|
117
120
|
Harness/subagents.md controller-led subagent orchestration
|
|
118
121
|
Harness/context-loading.md dynamic loading and subagent packs
|
|
@@ -22,7 +22,7 @@ CEO(1) ──┬── Manager₁(span) ──┬── Worker₁..ₙ
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
- CEO: intent, scope, integration, final verification. Direct reports 3-5 Managers. **CEO never writes code directly** — dispatch Workers for all file changes. CEO only synthesizes results and decides next waves.
|
|
25
|
-
- Manager: domain partition → parallel dispatch → synthesize → report. Serial across domains; parallel within domain.
|
|
25
|
+
- Manager: domain partition → parallel dispatch → synthesize → report. Serial across domains; parallel within domain. **Manager agents must be defined by the project** (not shipped by the harness) — create them under `.claude/agents/` with the `Agent` tool enabled for nested spawning.
|
|
26
26
|
- Worker: single file per write Worker (implementer, one file_claim). Single dimension/topic per read Worker (reviewer, researcher). File claims must be file-level disjoint. Topic-level splitting within a single file is only allowed for read-only Workers.
|
|
27
27
|
- depth ≥3: Manager spawns Sub-Manager (span ≤7) instead of Worker. Recursive until leaf condition met.
|
|
28
28
|
|