create-harness-vibe-coding 0.8.12 → 0.8.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +165 -0
- package/README-CN.md +52 -8
- package/README.md +50 -8
- package/package.json +3 -1
- package/src/generator.js +601 -472
- package/src/index.js +12 -4
- package/templates/common/.claude/agents/architect-manager.md +1 -0
- package/templates/common/.claude/agents/architect.md +2 -1
- package/templates/common/.claude/agents/codebase-explorer.md +1 -0
- package/templates/common/.claude/agents/context-master.md +2 -1
- package/templates/common/.claude/agents/debugger.md +1 -0
- package/templates/common/.claude/agents/docs-researcher.md +2 -1
- package/templates/common/.claude/agents/explore-manager.md +1 -0
- package/templates/common/.claude/agents/implement-manager.md +1 -0
- package/templates/common/.claude/agents/implementer.md +1 -0
- package/templates/common/.claude/agents/memory-master.md +2 -1
- package/templates/common/.claude/agents/planner.md +3 -2
- package/templates/common/.claude/agents/reflector.md +1 -0
- package/templates/common/.claude/agents/researcher.md +1 -0
- package/templates/common/.claude/agents/review-manager.md +1 -0
- package/templates/common/.claude/agents/reviewer.md +2 -1
- package/templates/common/.claude/agents/task-scribe.md +1 -0
- package/templates/common/.claude/agents/tdd-guide.md +5 -4
- package/templates/common/.claude/agents/test-writer.md +6 -5
- package/templates/common/.claude/agents/verifier.md +1 -0
- package/templates/common/.claude/commands/wf-help.md +1 -0
- package/templates/common/.claude/commands/wf-update.md +73 -9
- package/templates/common/.claude/rules/ecc/common.md +6 -5
- package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +12 -6
- package/templates/common/.claude/skills/tdd/SKILL.md +5 -5
- package/templates/common/.claude/skills/wf/SKILL.md +13 -5
- package/templates/common/.claude/skills/wf-agents-docs/SKILL.md +119 -0
- package/templates/common/.claude/skills/wf-auto/SKILL.md +27 -7
- package/templates/common/.claude/skills/wf-auto-spark/SKILL.md +12 -5
- package/templates/common/.claude/skills/wf-learn/SKILL.md +6 -0
- package/templates/common/.claude/skills/wf-max/SKILL.md +22 -7
- package/templates/common/.claude/skills/wf-readme/SKILL.md +8 -2
- package/templates/common/.claude/skills/wf-remove/SKILL.md +6 -0
- package/templates/common/.claude/skills/wf-review/SKILL.md +10 -3
- package/templates/common/.claude/skills/wf-update/SKILL.md +52 -5
- package/templates/common/.harness-version +291 -129
- package/templates/common/.opencode/agents/architect-manager.md +1 -0
- package/templates/common/.opencode/agents/architect.md +2 -1
- package/templates/common/.opencode/agents/codebase-explorer.md +1 -0
- package/templates/common/.opencode/agents/context-master.md +2 -1
- package/templates/common/.opencode/agents/debugger.md +1 -0
- package/templates/common/.opencode/agents/docs-researcher.md +2 -1
- package/templates/common/.opencode/agents/explore-manager.md +1 -0
- package/templates/common/.opencode/agents/implement-manager.md +1 -0
- package/templates/common/.opencode/agents/implementer.md +1 -0
- package/templates/common/.opencode/agents/memory-master.md +2 -1
- package/templates/common/.opencode/agents/planner.md +3 -2
- package/templates/common/.opencode/agents/reflector.md +1 -0
- package/templates/common/.opencode/agents/researcher.md +1 -0
- package/templates/common/.opencode/agents/review-manager.md +1 -0
- package/templates/common/.opencode/agents/reviewer.md +2 -1
- package/templates/common/.opencode/agents/task-scribe.md +1 -0
- package/templates/common/.opencode/agents/tdd-guide.md +5 -4
- package/templates/common/.opencode/agents/test-writer.md +6 -5
- package/templates/common/.opencode/agents/verifier.md +1 -0
- package/templates/common/.opencode/commands/wf-auto-spark.md +3 -2
- package/templates/common/.opencode/commands/wf-auto.md +3 -2
- package/templates/common/.opencode/commands/wf-help.md +1 -0
- package/templates/common/.opencode/commands/wf-learn.md +3 -2
- package/templates/common/.opencode/commands/wf-max.md +3 -2
- package/templates/common/.opencode/commands/wf-readme.md +3 -2
- package/templates/common/.opencode/commands/wf-remove.md +3 -2
- package/templates/common/.opencode/commands/wf-review.md +3 -2
- package/templates/common/.opencode/commands/wf-update.md +73 -9
- package/templates/common/.opencode/commands/wf.md +3 -2
- package/templates/common/CLAUDE.md +14 -12
- package/templates/common/Harness/MEMORY.md +21 -18
- package/templates/common/Harness/README.md +41 -39
- package/templates/common/Harness/ownership.manifest.json +815 -0
- package/templates/common/Harness/{architecture.md → project/architecture.md} +1 -1
- package/templates/common/Harness/research/README.md +3 -3
- package/templates/common/Harness/scripts/context-budget.mjs +95 -0
- package/templates/common/Harness/scripts/l2-cache-telemetry.mjs +703 -0
- package/templates/common/Harness/scripts/scan-clean.mjs +86 -4
- package/templates/common/Harness/scripts/validate-harness.mjs +332 -175
- package/templates/common/Harness/scripts/wf-remove.mjs +60 -34
- package/templates/common/Harness/scripts/wf-update-check.mjs +562 -121
- package/templates/common/Harness/settings.json +43 -0
- package/templates/common/Harness/{ECC-GUIDE.md → specs/guides/ECC-GUIDE.md} +4 -4
- package/templates/common/Harness/{SETUP.md → specs/guides/SETUP.md} +32 -35
- package/templates/common/Harness/{extension.md → specs/guides/extension.md} +3 -3
- package/templates/common/Harness/{lifecycle.md → specs/guides/lifecycle.md} +2 -2
- package/templates/common/Harness/{agent-workflow.md → specs/runtime/agent-workflow.md} +6 -6
- package/templates/common/Harness/{context-loading.md → specs/runtime/context-loading.md} +85 -21
- package/templates/common/Harness/{dispatch.md → specs/runtime/dispatch.md} +3 -2
- package/templates/common/Harness/{subagents.md → specs/runtime/subagents.md} +10 -5
- package/templates/common/Harness/{WF-AUTO-SPARK.md → specs/workflows/WF-AUTO-SPARK.md} +2 -2
- package/templates/common/Harness/{WF-AUTO.md → specs/workflows/WF-AUTO.md} +6 -1
- package/templates/common/Harness/{WF-KERNEL.md → specs/workflows/WF-KERNEL.md} +10 -0
- package/templates/common/Harness/{WF-MAX.md → specs/workflows/WF-MAX.md} +10 -5
- package/templates/common/Harness/{WF-STATE.md → specs/workflows/WF-STATE.md} +5 -0
- package/templates/common/Harness/{WF.md → specs/workflows/WF.md} +12 -1
- package/templates/common/README.md +8 -6
- package/templates/common/memory/startup-hints.md +19 -17
- package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +1 -1
- package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +7 -0
- package/templates/optional/skills/browser-e2e/.opencode/commands/wf-browser.md +3 -2
- package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +4 -4
- package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +1 -1
- package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +1 -1
- package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +1 -1
- package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +1 -1
- /package/templates/common/Harness/{ACCEPTANCE_PROTOCOL.md → specs/protocols/ACCEPTANCE_PROTOCOL.md} +0 -0
- /package/templates/common/Harness/{AGENT_ISOLATION.md → specs/protocols/AGENT_ISOLATION.md} +0 -0
- /package/templates/common/Harness/{DEBUG_PROTOCOL.md → specs/protocols/DEBUG_PROTOCOL.md} +0 -0
- /package/templates/common/Harness/{HARNESS_BRIDGE.md → specs/protocols/HARNESS_BRIDGE.md} +0 -0
- /package/templates/common/Harness/{MEMORY_PROTOCOL.md → specs/protocols/MEMORY_PROTOCOL.md} +0 -0
- /package/templates/common/Harness/{TASK_ARCHIVE.md → specs/protocols/TASK_ARCHIVE.md} +0 -0
- /package/templates/common/Harness/{TDD-GUIDE.md → specs/protocols/TDD-GUIDE.md} +0 -0
- /package/templates/common/Harness/{WF-AUTO-ANGLES.md → specs/workflows/WF-AUTO-ANGLES.md} +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wf-agents-docs
|
|
3
|
+
description: Source-backed CLI invocation guide for Claude Code, Codex, and OpenCode automation. Use when invoking peer CLIs, writing batch tests, collecting cache telemetry, debugging command-line flags, or documenting cross-runtime agent usage for Harness workflows.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WF Agents Docs
|
|
7
|
+
|
|
8
|
+
Use this skill before shelling out to `claude`, `codex`, or `opencode` from Harness workflows, peer review, cache tests, or automation scripts.
|
|
9
|
+
|
|
10
|
+
## Source Order
|
|
11
|
+
|
|
12
|
+
1. Prefer installed help: `claude --help`, `codex exec --help`, `opencode run --help`.
|
|
13
|
+
2. Check official docs for flags that affect cost, auth, JSON, resume, tools/MCP, or telemetry.
|
|
14
|
+
3. When adding automation, record command, source, stdout/stderr shape, and failed patterns.
|
|
15
|
+
|
|
16
|
+
## Claude Code CLI
|
|
17
|
+
|
|
18
|
+
- Interactive: `claude`.
|
|
19
|
+
- Non-interactive JSON: pipe ASCII or UTF-8-safe stdin into `claude -p --output-format json`.
|
|
20
|
+
- Stream JSON requires verbose mode: `claude -p --output-format stream-json --verbose`.
|
|
21
|
+
- Continue/resume: `claude -c -p "..."` or `claude -p --resume <session-id> "..."`; for PowerShell automation, prefer stdin and validate non-empty JSON before parsing.
|
|
22
|
+
- Use `--max-budget-usd <amount>` in scripted probes.
|
|
23
|
+
- Use `--strict-mcp-config` without `--mcp-config` to ignore configured MCP servers for a run. Use `--safe-mode` only to disable project customizations. Use `--bare` only for minimal CLI probes, not for Harness/cache attribution, because it skips `CLAUDE.md`, skills, plugins, MCP, hooks, and auto memory.
|
|
24
|
+
- Use `--tools "Read,Grep,Glob"` or explicit `--allowedTools`/`--disallowedTools` for read-only probes.
|
|
25
|
+
- Prompt-cache telemetry appears in JSON `usage.cache_read_input_tokens` / `usage.cache_creation_input_tokens`, and in statusline `context_window.current_usage.*`.
|
|
26
|
+
|
|
27
|
+
## Codex CLI
|
|
28
|
+
|
|
29
|
+
- Interactive: `codex`.
|
|
30
|
+
- Non-interactive: `codex exec "task"`.
|
|
31
|
+
- Read stdin as the full prompt: `cat prompt.txt | codex exec -`.
|
|
32
|
+
- Prompt plus stdin context: `some-command | codex exec "summarize this output"`.
|
|
33
|
+
- Machine output: `codex exec --json "task"` emits JSONL events; parse `turn.completed.usage`, including `cached_input_tokens` when present.
|
|
34
|
+
- Resume: `codex exec resume --last "..."` or `codex exec resume <SESSION_ID> "..."`.
|
|
35
|
+
- Permissions: default is read-only; set `--sandbox workspace-write` only when edits are required. Use `--ignore-user-config` / `--ignore-rules` for controlled automation.
|
|
36
|
+
|
|
37
|
+
## OpenCode CLI
|
|
38
|
+
|
|
39
|
+
- Interactive: `opencode`.
|
|
40
|
+
- Non-interactive: `opencode run [message..]`.
|
|
41
|
+
- JSON events: `opencode run --format json "task"`.
|
|
42
|
+
- Resume: `opencode run --continue "..."` or `opencode run --session <id> "..."`.
|
|
43
|
+
- Peer role: `opencode run --agent reviewer --dir . "review prompt"`.
|
|
44
|
+
- Reuse a server to avoid MCP cold boot: `opencode serve`, then `opencode run --attach http://localhost:4096 "task"`.
|
|
45
|
+
- On Windows, first verify `opencode` exists before writing automation around it.
|
|
46
|
+
|
|
47
|
+
## PowerShell Automation Rules
|
|
48
|
+
|
|
49
|
+
- Prefer stdin over trailing prompt args for `claude -p` in PowerShell.
|
|
50
|
+
- Use ASCII prompts or explicitly UTF-8-safe input for automated probes.
|
|
51
|
+
- Do not trust exit code alone. Fail on empty/non-JSON stdout or error/budget terminal fields.
|
|
52
|
+
- Avoid naming function parameters `$Args`; PowerShell treats `$Args` specially.
|
|
53
|
+
- Store telemetry outside the repo, e.g. `$HOME/.claude/cache-telemetry/*.json`, so git status does not perturb prefixes.
|
|
54
|
+
|
|
55
|
+
## Evidence-Packet Review Pattern
|
|
56
|
+
|
|
57
|
+
For peer review, route smokes, cache analysis, and audits, gather evidence
|
|
58
|
+
first; the peer judges only the bounded packet.
|
|
59
|
+
|
|
60
|
+
- Gather paths, line snippets, command names, exits, and invariants with `rg`,
|
|
61
|
+
`node` scripts, validators, or small reads.
|
|
62
|
+
- Send only that packet. Exclude full docs, raw logs, timestamps, session IDs,
|
|
63
|
+
and screenshots unless they are the evidence.
|
|
64
|
+
- Prefer no tools for judgment-only review; otherwise allow only read-only
|
|
65
|
+
tools and name the exact read set.
|
|
66
|
+
- Controller accepts, rejects, or escalates findings. Peers do not own scope.
|
|
67
|
+
|
|
68
|
+
## No Scratch-File Rule
|
|
69
|
+
|
|
70
|
+
- Do not write CLI probe output under `%TEMP%`, `$env:TEMP`, `/tmp`, or other
|
|
71
|
+
system temp directories.
|
|
72
|
+
- Prefer stdout, JSON/JSONL streaming, or in-memory parsing.
|
|
73
|
+
- Persistent repo evidence goes under `Harness/tasks/<task-id>/evidence/`.
|
|
74
|
+
- Cache telemetry may live under `$HOME/.claude/cache-telemetry/` to avoid repo
|
|
75
|
+
prompt-cache churn.
|
|
76
|
+
- Do not create prompt temp files. Use stdin.
|
|
77
|
+
|
|
78
|
+
## Subagent Output Contract
|
|
79
|
+
|
|
80
|
+
Require bounded structured returns:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
Agent: <claude|codex|opencode|role name>
|
|
84
|
+
Probe: <what was tested or reviewed>
|
|
85
|
+
Mode: <read-only|review|telemetry|implementation>
|
|
86
|
+
Files examined: <exact paths or none>
|
|
87
|
+
Evidence: <commands, exit codes, paths, line refs>
|
|
88
|
+
Passes: <confirmed invariants>
|
|
89
|
+
Findings: <severity, file/path, reason, suggested fix>
|
|
90
|
+
Risks: <residual uncertainty or none>
|
|
91
|
+
Tool/CLI issues: <auth, timeout, budget, JSON parse, MCP, or none>
|
|
92
|
+
Verdict: PASS | FAIL | BLOCKED
|
|
93
|
+
Next: <smallest next controller action>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
For JSON, use the same keys. Do not return transcripts, full file bodies, decorative logs, or speculation.
|
|
97
|
+
|
|
98
|
+
## Cache Discipline
|
|
99
|
+
|
|
100
|
+
Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: stable instructions first, volatile output in the dynamic suffix, and no provider cache claims without telemetry. Claude Code L2 uses `cache_read_input_tokens`; Codex JSONL may emit `cached_input_tokens`.
|
|
101
|
+
|
|
102
|
+
## Batch-Test Pattern
|
|
103
|
+
|
|
104
|
+
1. Probe command availability with `Get-Command claude,codex,opencode -ErrorAction SilentlyContinue`.
|
|
105
|
+
2. Build a compact evidence packet before invoking peer agents; use the peer
|
|
106
|
+
only for judgment unless the test explicitly requires live agent discovery.
|
|
107
|
+
3. Run a cold turn and capture session id.
|
|
108
|
+
4. Resume that session for two warm turns.
|
|
109
|
+
5. For each turn record input, cache creation, cache read, ratio, cost, model/session id, and exact flags.
|
|
110
|
+
6. Compare against a control mode. Do not attribute a provider-wide cache feature to Harness unless the Harness-shaped run improves or stabilizes cache behavior against a comparable baseline.
|
|
111
|
+
|
|
112
|
+
## Official References
|
|
113
|
+
|
|
114
|
+
- Claude Code CLI reference: https://code.claude.com/docs/en/cli-reference
|
|
115
|
+
- Claude Code prompt caching: https://code.claude.com/docs/en/prompt-caching
|
|
116
|
+
- Claude Code status line schema: https://code.claude.com/docs/en/statusline
|
|
117
|
+
- Codex CLI: https://developers.openai.com/codex/cli
|
|
118
|
+
- Codex non-interactive mode: https://learn.chatgpt.com/docs/non-interactive-mode
|
|
119
|
+
- OpenCode CLI: https://opencode.ai/docs/cli/
|
|
@@ -5,15 +5,32 @@ description: Perpetual adaptive auto-optimization mode. Selects probes from proj
|
|
|
5
5
|
|
|
6
6
|
# WF Auto - Perpetual Auto-Optimization
|
|
7
7
|
|
|
8
|
+
## Memory Preflight
|
|
9
|
+
|
|
10
|
+
1. Load `CLAUDE.md`, `Harness/MEMORY.md` index only, then `Harness/README.md`
|
|
11
|
+
before planning, dispatch, edits, validation, or review.
|
|
12
|
+
2. Load detailed `Harness/memory/*` files only when `MEMORY_PROTOCOL.md`
|
|
13
|
+
scenario hints match; otherwise record "memory hints: none".
|
|
14
|
+
|
|
8
15
|
## Load
|
|
9
16
|
|
|
10
|
-
- `
|
|
11
|
-
- `Harness/
|
|
12
|
-
- `Harness/
|
|
13
|
-
- `Harness/
|
|
14
|
-
- `Harness/
|
|
17
|
+
- `CLAUDE.md`
|
|
18
|
+
- `Harness/MEMORY.md` (index only per Memory Preflight)
|
|
19
|
+
- `Harness/README.md`
|
|
20
|
+
- `Harness/specs/workflows/WF-AUTO.md`
|
|
21
|
+
- `Harness/specs/workflows/WF-AUTO-ANGLES.md`
|
|
22
|
+
- `Harness/specs/runtime/subagents.md`
|
|
23
|
+
- `Harness/specs/runtime/dispatch.md`
|
|
24
|
+
- `Harness/specs/runtime/agent-workflow.md`
|
|
15
25
|
- `.claude/skills/wf-review/SKILL.md`
|
|
16
26
|
|
|
27
|
+
## Cache Discipline
|
|
28
|
+
|
|
29
|
+
Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: keep the
|
|
30
|
+
auto-mode docs in listed order, run selected probes only, append fresh probe
|
|
31
|
+
outputs last, and record compact evidence instead of carrying full logs between
|
|
32
|
+
cycles.
|
|
33
|
+
|
|
17
34
|
## Trigger
|
|
18
35
|
|
|
19
36
|
- Claude `/wf-auto`
|
|
@@ -44,6 +61,9 @@ that auto scanning costs more than it helps.
|
|
|
44
61
|
below 3.
|
|
45
62
|
8. Intent Checkpoint is adaptive: 2 -> 5 -> 10 cycles, exactly two questions.
|
|
46
63
|
9. Record compact evidence per cycle; do not paste full logs or transcripts.
|
|
64
|
+
10. A bounded test tick still creates or updates `Harness/tasks/auto/PLAN.md`
|
|
65
|
+
and `Harness/tasks/auto/PROGRESS.md`; missing auto capsule evidence is a
|
|
66
|
+
failed cycle record.
|
|
47
67
|
|
|
48
68
|
## Loop
|
|
49
69
|
|
|
@@ -58,5 +78,5 @@ LOOP: next W0
|
|
|
58
78
|
|
|
59
79
|
## Return
|
|
60
80
|
|
|
61
|
-
Report cycles run, findings addressed by source, evidence ledger,
|
|
62
|
-
evidence if any, weak spark count, final state, and residual risks.
|
|
81
|
+
Report cycles run, findings addressed by source, evidence ledger path/summary,
|
|
82
|
+
exhaustion evidence if any, weak spark count, final state, and residual risks.
|
|
@@ -5,7 +5,7 @@ description: Perpetual inspiration mode for /wf-auto-spark or $wf-auto-spark. In
|
|
|
5
5
|
|
|
6
6
|
# WF-AUTO-SPARK Adapter
|
|
7
7
|
|
|
8
|
-
The authoritative workflow lives in `Harness/WF-AUTO-SPARK.md`; this adapter
|
|
8
|
+
The authoritative workflow lives in `Harness/specs/workflows/WF-AUTO-SPARK.md`; this adapter
|
|
9
9
|
only routes and summarizes hard constraints.
|
|
10
10
|
|
|
11
11
|
## Invocation
|
|
@@ -18,10 +18,17 @@ only routes and summarizes hard constraints.
|
|
|
18
18
|
1. `CLAUDE.md`
|
|
19
19
|
2. `Harness/MEMORY.md`
|
|
20
20
|
3. `Harness/README.md`
|
|
21
|
-
4. `Harness/WF-AUTO-SPARK.md`
|
|
22
|
-
5. `Harness/WF-AUTO.md`
|
|
23
|
-
6. `Harness/subagents.md`
|
|
24
|
-
7. `Harness/dispatch.md`
|
|
21
|
+
4. `Harness/specs/workflows/WF-AUTO-SPARK.md`
|
|
22
|
+
5. `Harness/specs/workflows/WF-AUTO.md`
|
|
23
|
+
6. `Harness/specs/runtime/subagents.md`
|
|
24
|
+
7. `Harness/specs/runtime/dispatch.md`
|
|
25
|
+
|
|
26
|
+
## Cache Discipline
|
|
27
|
+
|
|
28
|
+
Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: keep roadmap
|
|
29
|
+
and workflow docs stable, put fresh spark search results in the dynamic suffix,
|
|
30
|
+
defer unused tools/skills, and let task-scribe write compact state instead of
|
|
31
|
+
replaying search transcripts.
|
|
25
32
|
|
|
26
33
|
## Rules
|
|
27
34
|
|
|
@@ -22,6 +22,12 @@ fallback.
|
|
|
22
22
|
- `Harness/memory/agent-lessons-patterns.md`
|
|
23
23
|
- Current `Harness/PROGRESS.md` and active task capsule, if any
|
|
24
24
|
|
|
25
|
+
## Cache Discipline
|
|
26
|
+
|
|
27
|
+
Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: load memory
|
|
28
|
+
indexes first, then only the routed detailed memory files; summarize durable
|
|
29
|
+
patterns by file path and signal instead of pasting session transcripts.
|
|
30
|
+
|
|
25
31
|
## Flow
|
|
26
32
|
|
|
27
33
|
1. Analyze the session for repeated failures, durable user corrections, and
|
|
@@ -5,7 +5,7 @@ description: Use for /wf-max in Claude Code, $wf-max or /skills wf-max in Codex.
|
|
|
5
5
|
|
|
6
6
|
# WF-MAX Adapter
|
|
7
7
|
|
|
8
|
-
The authoritative workflow lives in `Harness/WF-MAX.md`; this adapter only
|
|
8
|
+
The authoritative workflow lives in `Harness/specs/workflows/WF-MAX.md`; this adapter only
|
|
9
9
|
routes and summarizes hard constraints.
|
|
10
10
|
|
|
11
11
|
## Invocation
|
|
@@ -24,35 +24,50 @@ routes and summarizes hard constraints.
|
|
|
24
24
|
1. `CLAUDE.md`
|
|
25
25
|
2. `Harness/MEMORY.md` (index only per Memory Preflight)
|
|
26
26
|
3. `Harness/README.md`
|
|
27
|
-
4. `Harness/WF-MAX.md`
|
|
28
|
-
5. `Harness/subagents.md`
|
|
29
|
-
6. `Harness/dispatch.md`
|
|
30
|
-
7. `Harness/agent-workflow.md`
|
|
27
|
+
4. `Harness/specs/workflows/WF-MAX.md`
|
|
28
|
+
5. `Harness/specs/runtime/subagents.md`
|
|
29
|
+
6. `Harness/specs/runtime/dispatch.md`
|
|
30
|
+
7. `Harness/specs/runtime/agent-workflow.md`
|
|
31
|
+
|
|
32
|
+
## Cache Discipline
|
|
33
|
+
|
|
34
|
+
Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: keep the
|
|
35
|
+
listed loads in order, defer unused skill/tool schemas, append volatile task
|
|
36
|
+
state and runtime facts last, and bound Worker returns through dispatch
|
|
37
|
+
`MaxReturnTokens`/`ReturnSchema`.
|
|
31
38
|
|
|
32
39
|
## Rules
|
|
33
40
|
|
|
34
41
|
WF-MAX inherits the selected WF tier and the shared WF-KERNEL gates
|
|
35
|
-
(`Harness/WF-KERNEL.md`), then expands safe parallelism. WF-Max-Useful is
|
|
42
|
+
(`Harness/specs/workflows/WF-KERNEL.md`), then expands safe parallelism. WF-Max-Useful is
|
|
36
43
|
default; WF-Max-Strict only on explicit strict request. Execution expands
|
|
37
44
|
through:
|
|
38
45
|
|
|
46
|
+
- New task state directories MUST use task ids matching
|
|
47
|
+
`task-<verb>-<noun>[-detail]` under `Harness/tasks/<task-id>/`; never
|
|
48
|
+
create bare `fix-*` task ids.
|
|
39
49
|
1. Global mode: `wf-max`
|
|
40
50
|
2. Agent role: `ceo | manager | worker | reviewer | verifier | reflector`
|
|
41
51
|
3. Dispatch permission: `writeSet`, `forbidden`, `verification`
|
|
42
52
|
|
|
43
53
|
WF-Max-Useful (default): `/wf-max` fans out only where write sets or review
|
|
44
54
|
lenses are meaningfully independent. Overhead > 0.30 degrades the wave.
|
|
55
|
+
Degrading fan-out does not authorize CEO source edits; source implementation
|
|
56
|
+
still goes through an implementer/Worker role, or the run records an honest
|
|
57
|
+
downgrade before editing.
|
|
45
58
|
|
|
46
59
|
WF-Max-Strict (explicit override): user says `--strict`, `strict wf-max`, or
|
|
47
60
|
`strict mode`. Unconditional fan-out per the original span formula.
|
|
48
61
|
|
|
49
62
|
- CEO reads, plans, dispatches, synthesizes, and writes task state only. CEO
|
|
50
63
|
never edits production source.
|
|
64
|
+
- Task-state updates must preserve required `Harness/PROGRESS.md` headings:
|
|
65
|
+
`## Active Task`, `## Task Index`, and `## Cross-Task Decisions`.
|
|
51
66
|
- Workers edit only the dispatch `writeSet`; outside write set is blocked.
|
|
52
67
|
- Managers coordinate and synthesize. Reviewers read/report only.
|
|
53
68
|
- D-GATE is mandatory before implementation waves: dispatch table, AC IDs,
|
|
54
69
|
disjoint file claims, self-audit, and reviewer plan.
|
|
55
|
-
- Final acceptance is tier-aware per `Harness/WF-KERNEL.md`:
|
|
70
|
+
- Final acceptance is tier-aware per `Harness/specs/workflows/WF-KERNEL.md`:
|
|
56
71
|
- WF-Light + `/wf-max`: verification + state evidence suffices unless risk
|
|
57
72
|
triggers review/reflector.
|
|
58
73
|
- WF-Standard + `/wf-max`: verifier evidence + one independent review PASS.
|
|
@@ -14,7 +14,13 @@ Improve `README.md` without breaking project-owned public docs.
|
|
|
14
14
|
- CI files when present
|
|
15
15
|
- `Harness/PROGRESS.md`
|
|
16
16
|
- `Harness/tasks/<task-id>/PLAN.md` when available
|
|
17
|
-
- `Harness/architecture.md` only when an architecture summary or diagram is requested
|
|
17
|
+
- `Harness/project/architecture.md` only when an architecture summary or diagram is requested
|
|
18
|
+
|
|
19
|
+
## Cache Discipline
|
|
20
|
+
|
|
21
|
+
Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: load project
|
|
22
|
+
facts in the listed order, inspect only relevant README/package/CI sections, and
|
|
23
|
+
keep unknowns or command output in the dynamic suffix.
|
|
18
24
|
|
|
19
25
|
## Mode
|
|
20
26
|
|
|
@@ -34,7 +40,7 @@ If unanswered, use Preserve + append.
|
|
|
34
40
|
- Do not invent features, benchmarks, roadmap, support policy, badges, install commands, or CI status.
|
|
35
41
|
- Use tables for command matrices, environment variables, endpoints, and deployment notes when facts are known.
|
|
36
42
|
- Use Mermaid or ASCII architecture diagrams only when the structure is observed or approved; label uncertain diagrams as proposed.
|
|
37
|
-
- Keep detailed architecture in `Harness/architecture.md`; README may link to it or show a short overview.
|
|
43
|
+
- Keep detailed architecture in `Harness/project/architecture.md`; README may link to it or show a short overview.
|
|
38
44
|
- Keep agent rules in `CLAUDE.md`/`AGENTS.md`, not README.
|
|
39
45
|
- Record the chosen mode and any skipped README improvements in `Harness/tasks/<task-id>/PLAN.md` when available.
|
|
40
46
|
|
|
@@ -18,6 +18,12 @@ description: Use for /wf-remove in Claude Code, $wf-remove or /skills wf-remove
|
|
|
18
18
|
- `Harness/.harness-version`
|
|
19
19
|
- `Harness/scripts/wf-remove.mjs`
|
|
20
20
|
|
|
21
|
+
## Cache Discipline
|
|
22
|
+
|
|
23
|
+
Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: use the
|
|
24
|
+
script's compact JSON plan as the dynamic suffix, avoid manual directory dumps,
|
|
25
|
+
and keep user decisions in task progress rather than chat transcript.
|
|
26
|
+
|
|
21
27
|
## Flow
|
|
22
28
|
|
|
23
29
|
1. On plain `/wf-remove`, run `node Harness/scripts/wf-remove.mjs --json` for
|
|
@@ -22,6 +22,13 @@ The main agent is the controller. It owns final decisions, accepted/rejected
|
|
|
22
22
|
findings, fixes, release claims, and user-facing recommendations. Review
|
|
23
23
|
agents only provide evidence-backed suggestions.
|
|
24
24
|
|
|
25
|
+
## Cache Discipline
|
|
26
|
+
|
|
27
|
+
Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: build review
|
|
28
|
+
context from changed-file lists, ACs, validation evidence, and targeted diffs;
|
|
29
|
+
avoid pasting unrelated history, full transcripts, or unused tool schemas into
|
|
30
|
+
the review prompt.
|
|
31
|
+
|
|
25
32
|
## Runtime Selection
|
|
26
33
|
|
|
27
34
|
1. Build one review prompt containing the relevant diff, task acceptance
|
|
@@ -66,8 +73,8 @@ AgentName: reviewer
|
|
|
66
73
|
Mode: read-only
|
|
67
74
|
Objective: review the current diff for correctness, security, architecture,
|
|
68
75
|
performance, tests, and spec/AC compliance
|
|
69
|
-
Read set: changed files, tests, task PLAN/PROGRESS, Harness/agent-workflow.md,
|
|
70
|
-
Harness/subagents.md, Harness/dispatch.md, architecture docs when affected
|
|
76
|
+
Read set: changed files, tests, task PLAN/PROGRESS, Harness/specs/runtime/agent-workflow.md,
|
|
77
|
+
Harness/specs/runtime/subagents.md, Harness/specs/runtime/dispatch.md, architecture docs when affected
|
|
71
78
|
Write set: none
|
|
72
79
|
Forbidden: file edits, git mutations, formatting-only advice, ungrounded claims
|
|
73
80
|
ReturnSchema: findings by severity, file/line refs, missing verification,
|
|
@@ -80,6 +87,6 @@ deduplicate reviewer output and decide what to accept.
|
|
|
80
87
|
|
|
81
88
|
## Context
|
|
82
89
|
|
|
83
|
-
Include the relevant diff, `Harness/architecture.md` when architecture is in
|
|
90
|
+
Include the relevant diff, `Harness/project/architecture.md` when architecture is in
|
|
84
91
|
scope, and any task acceptance criteria. If the diff is too large, ask for a
|
|
85
92
|
narrower scope before invoking a peer CLI or reviewer subagent.
|
|
@@ -20,25 +20,65 @@ This skill is a Codex compatibility shim plus script-flow reference. Claude Code
|
|
|
20
20
|
- `Harness/scripts/scan-clean.mjs`
|
|
21
21
|
- `Harness/scripts/validate-harness.mjs`
|
|
22
22
|
|
|
23
|
+
## Cache Discipline
|
|
24
|
+
|
|
25
|
+
Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: keep updater
|
|
26
|
+
scripts and ownership docs stable, consume compact `--json` agent plans first,
|
|
27
|
+
and avoid pasting verbose diffs or full remote files unless a conflict requires
|
|
28
|
+
targeted inspection.
|
|
29
|
+
|
|
30
|
+
## Classification
|
|
31
|
+
|
|
32
|
+
MANIFEST-FIRST. The installer and updater read
|
|
33
|
+
`Harness/ownership.manifest.json`:
|
|
34
|
+
|
|
35
|
+
- `preserve[]` — never touched (tasks, memory, research, root README,
|
|
36
|
+
package, architecture). `Harness/tasks/**` is always preserved.
|
|
37
|
+
- `merge[]` — CLAUDE.md, AGENTS.md, MEMORY.md, Harness/MEMORY.md,
|
|
38
|
+
Harness/README.md → merge or accept-local; prior accepted decisions
|
|
39
|
+
carry forward.
|
|
40
|
+
- `frameworkOwned[]` — safe overwrite-upgrade fast path (concurrent
|
|
41
|
+
fetch + hash + all-or-nothing write after checksum validation).
|
|
42
|
+
- `optionalOwned[]` — upgraded only when that option is installed.
|
|
43
|
+
|
|
44
|
+
Content markers (`harness: wf-agent`, `project harness`, `Harness/...`)
|
|
45
|
+
are the FALLBACK when no manifest exists (old installs) and the
|
|
46
|
+
instance-ownership signal that protects a user's same-name file at a
|
|
47
|
+
Harness path. A same-name user file with no marker and no manifest
|
|
48
|
+
declaration → conflict/skip + warning, never overwritten.
|
|
49
|
+
|
|
23
50
|
## Flow
|
|
24
51
|
|
|
25
52
|
1. Run `node Harness/scripts/wf-update-check.mjs --json` first and use the
|
|
26
|
-
`agent` block as the action plan.
|
|
53
|
+
`agent` block as the action plan. Current updaters try npm
|
|
54
|
+
`create-harness-vibe-coding@latest` first, then the canonical GitHub source
|
|
55
|
+
`LiWeny16/create-harness-vibe-coding`, then the legacy compatibility mirror
|
|
56
|
+
`zingspark/create-harness-vibe-coding`.
|
|
27
57
|
2. Preserve all PRESERVE files. Never overwrite user task, memory, research,
|
|
28
|
-
README, package, or architecture files.
|
|
58
|
+
root README.md, package, or architecture files. Harness/README.md is
|
|
59
|
+
merge-tier, not PRESERVE.
|
|
29
60
|
3. If `agent.safeApplyCommand` is present, run it to apply SAFE, NEW, and
|
|
30
61
|
adopted metadata-only files before spending AI time on conflicts. Default command:
|
|
31
62
|
`node Harness/scripts/wf-update-check.mjs --apply-safe`.
|
|
32
|
-
|
|
63
|
+
Framework-owned templates, commands, skills, agents, and scripts are
|
|
64
|
+
script-owned and should be overwritten by the updater after checksum validation.
|
|
65
|
+
4. Previously accepted decisions for any merge-tier file (CLAUDE.md, AGENTS.md,
|
|
66
|
+
MEMORY.md, Harness/MEMORY.md, Harness/README.md) are carried forward
|
|
67
|
+
automatically when both the local hash and remote template hash are unchanged.
|
|
68
|
+
5. If a new agent/command/skill path collides with an existing file, do not
|
|
69
|
+
decide by filename alone. Treat it as Harness-owned only when the file
|
|
70
|
+
content has Harness/WF markers such as `harness: wf-agent`, `project harness`,
|
|
71
|
+
or `Harness/...`; otherwise leave it as a real conflict.
|
|
72
|
+
6. For every remaining `agent.aiMergeRequired` entry, compare the local file with
|
|
33
73
|
`templateHint` or `remoteUrl`, then choose merge, keep-local, or
|
|
34
74
|
overwrite-from-template. Record the decision through the script with
|
|
35
75
|
`--accept-local <file>`, `--accept-merged <file>`, or
|
|
36
76
|
`--accept-template <file>`; do not hand-edit `Harness/.harness-version`.
|
|
37
77
|
Ask the user only when the intent is ambiguous.
|
|
38
|
-
|
|
78
|
+
7. Run `node Harness/scripts/wf-update-check.mjs --finalize` after all
|
|
39
79
|
conflicts have script-recorded decisions. Use strict `--apply` only when the
|
|
40
80
|
JSON plan has zero conflicts.
|
|
41
|
-
|
|
81
|
+
8. After update, run the validator and then scan-clean.
|
|
42
82
|
|
|
43
83
|
## Recovery
|
|
44
84
|
|
|
@@ -50,6 +90,13 @@ npx create-harness-vibe-coding@latest <project-name> . -y --on-conflict skip
|
|
|
50
90
|
|
|
51
91
|
The `--on-conflict skip` policy preserves all existing user files (CLAUDE.md, README.md, tasks, memory, research, architecture) and only creates missing Harness infrastructure files. After recovery, re-run the update check.
|
|
52
92
|
|
|
93
|
+
If an old updater reports only `0.8.10`, run the latest installer command above
|
|
94
|
+
or re-run the checker with:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
node Harness/scripts/wf-update-check.mjs --json --source-base https://raw.githubusercontent.com/LiWeny16/create-harness-vibe-coding/main/templates/common/
|
|
98
|
+
```
|
|
99
|
+
|
|
53
100
|
## Return
|
|
54
101
|
|
|
55
102
|
Report version, SAFE/NEW updates, conflicts and decisions, preserved files,
|