create-harness-vibe-coding 0.8.16 → 0.8.18

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README-CN.md +100 -127
  3. package/README.md +63 -42
  4. package/package.json +1 -1
  5. package/src/generator.js +628 -121
  6. package/src/index.js +174 -43
  7. package/src/prompts.js +18 -0
  8. package/templates/common/.claude/commands/wf-auto-spark.md +16 -0
  9. package/templates/common/.claude/commands/wf-auto.md +16 -0
  10. package/templates/{optional/skills/browser-e2e/.opencode → common/.claude}/commands/wf-browser.md +1 -1
  11. package/templates/common/.claude/commands/wf-command-create.md +58 -0
  12. package/templates/common/.claude/commands/wf-help.md +13 -6
  13. package/templates/common/.claude/commands/wf-learn.md +16 -0
  14. package/templates/common/.claude/commands/wf-max.md +20 -0
  15. package/templates/common/.claude/commands/wf-readme.md +16 -0
  16. package/templates/common/.claude/commands/wf-remove.md +16 -0
  17. package/templates/common/.claude/commands/wf-review.md +16 -0
  18. package/templates/common/.claude/commands/wf-task-archive.md +26 -0
  19. package/templates/common/.claude/commands/wf-task-list.md +24 -0
  20. package/templates/common/.claude/commands/wf-task-record.md +24 -0
  21. package/templates/common/.claude/commands/wf.md +16 -0
  22. package/templates/common/.claude/rules/ecc/common.md +1 -1
  23. package/templates/common/.claude/skills/wf-agents-docs/SKILL.md +15 -30
  24. package/templates/common/.claude/skills/wf-browser/SKILL.md +176 -0
  25. package/templates/common/.claude/skills/wf-command-create/SKILL.md +37 -0
  26. package/templates/common/.claude/skills/wf-help/SKILL.md +30 -0
  27. package/templates/common/.claude/skills/wf-max/SKILL.md +22 -8
  28. package/templates/common/.claude/skills/wf-review/SKILL.md +29 -2
  29. package/templates/common/.claude/skills/wf-task-archive/SKILL.md +28 -0
  30. package/templates/common/.claude/skills/wf-task-list/SKILL.md +28 -0
  31. package/templates/common/.claude/skills/wf-task-record/SKILL.md +28 -0
  32. package/templates/common/.codex/config.toml +3 -5
  33. package/templates/common/.harness-version +108 -41
  34. package/templates/common/.opencode/agents/architect-manager.md +7 -1
  35. package/templates/common/.opencode/agents/explore-manager.md +10 -1
  36. package/templates/common/.opencode/agents/implement-manager.md +5 -3
  37. package/templates/common/.opencode/agents/review-manager.md +5 -2
  38. package/templates/common/.opencode/commands/wf-browser.md +16 -0
  39. package/templates/common/.opencode/commands/wf-command-create.md +61 -0
  40. package/templates/common/.opencode/commands/wf-help.md +13 -6
  41. package/templates/common/.opencode/commands/wf-max.md +12 -7
  42. package/templates/common/.opencode/commands/wf-task-archive.md +29 -0
  43. package/templates/common/.opencode/commands/wf-task-list.md +27 -0
  44. package/templates/common/.opencode/commands/wf-task-record.md +27 -0
  45. package/templates/common/CLAUDE.md +9 -7
  46. package/templates/common/Harness/MEMORY.md +12 -3
  47. package/templates/common/Harness/README.md +23 -41
  48. package/templates/common/Harness/ownership.manifest.json +162 -14
  49. package/templates/common/Harness/scripts/archive-tasks.mjs +12 -220
  50. package/templates/common/Harness/scripts/scan-clean.mjs +3 -9
  51. package/templates/common/Harness/scripts/task-state.mjs +1279 -0
  52. package/templates/common/Harness/scripts/validate-harness.mjs +635 -65
  53. package/templates/common/Harness/scripts/wf-remove.mjs +37 -5
  54. package/templates/common/Harness/scripts/wf-update-check.mjs +3 -0
  55. package/templates/common/Harness/specs/guides/SETUP.md +10 -2
  56. package/templates/common/Harness/specs/protocols/MEMORY_PROTOCOL.md +15 -0
  57. package/templates/common/Harness/specs/protocols/TASK_ARCHIVE.md +49 -23
  58. package/templates/common/Harness/specs/runtime/command-surface.json +215 -0
  59. package/templates/common/Harness/specs/runtime/dispatch.md +2 -2
  60. package/templates/common/Harness/specs/runtime/subagents.md +15 -5
  61. package/templates/common/Harness/specs/workflows/WF-AUTO.md +6 -6
  62. package/templates/common/Harness/specs/workflows/WF-KERNEL.md +1 -1
  63. package/templates/common/Harness/specs/workflows/WF-MAX.md +35 -2
  64. package/templates/common/Harness/specs/workflows/WF-STATE.md +155 -36
  65. package/templates/common/Harness/tasks/_template/STATE.json +6 -0
  66. package/templates/common/opencode.json +1 -0
  67. package/templates/optional/catalog.json +2 -9
  68. package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +0 -42
  69. package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +0 -201
  70. package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +0 -119
@@ -0,0 +1,24 @@
1
+ # /wf-task-record
2
+
3
+ Record a task into a Harness task capsule. Do not invoke a skill or start WF mode.
4
+
5
+ ## Classification
6
+
7
+ DIRECT command. Wraps `node Harness/scripts/task-state.mjs record`. Never loads Harness/MEMORY.md.
8
+
9
+ ## Usage
10
+
11
+ /wf-task-record [<task-id>] [--title <slug>] [--note <text>] [--context <text>] [--new] [--create] [--status <status>] [--mode <mode>] [--text "description"]
12
+
13
+ - With <task-id>: record to that task (existing semantics).
14
+ - Without <task-id>: --title/--note/--context required. Deterministically matches open tasks; updates if unique match found; creates new if no match; fails if ambiguous unless --new.
15
+ - Never uses LLM or embeddings — slug + keyword overlap only.
16
+
17
+ ## Execution
18
+
19
+ Run: `node Harness/scripts/task-state.mjs record [<task-id>] [--title <slug>] [--note <text>] [--context <text>] [--new] [--create] [--apply] [--text "..."] [--status <status>] [--mode <mode>] [--json]`
20
+
21
+ ## Return
22
+
23
+ - Output of `node Harness/scripts/task-state.mjs record ... --json`
24
+ - If the command fails, report the error and do not retry.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Run the tiered WF workflow (WF-Light/Standard/Full) via the wf skill
3
+ ---
4
+
5
+ # /wf
6
+
7
+ This is a **workflow command**, not a direct command. Do not execute it as a
8
+ static help or script command.
9
+
10
+ 1. Load `CLAUDE.md`, `Harness/MEMORY.md` (index only per Memory Preflight), then `Harness/README.md`.
11
+ 2. Preserve cache-first order per `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`.
12
+ 3. Execute per the skill adapter `.claude/skills/wf/SKILL.md` (mirror: `.agents/skills/wf/SKILL.md`).
13
+ 4. Do not duplicate the workflow here. The skill adapter and `Harness/specs/workflows/WF.md` are authoritative.
14
+
15
+ If this runtime cannot invoke the skill directly, read
16
+ `.claude/skills/wf/SKILL.md` and follow it in place.
@@ -8,7 +8,7 @@ alwaysApply: true
8
8
  ## Context
9
9
 
10
10
  - Start with `CLAUDE.md`. When `Harness/` exists, also read `Harness/memory/startup-hints.md` (L2 lightweight digest, not full router).
11
- - When the user explicitly invokes a `/wf-*` workflow command, excluding `/wf-help` and `/wf-update`, load `Harness/MEMORY.md` and `Harness/README.md`.
11
+ - When the user explicitly invokes a workflow command (`/wf-*`, `$wf-*`, or `/skills wf-*`), excluding `/wf-help`, `$wf-help`, `/skills wf-help`, `/wf-update`, `$wf-update`, `/skills wf-update`, `/wf-task-record`, `$wf-task-record`, `/skills wf-task-record`, `/wf-task-list`, `$wf-task-list`, `/skills wf-task-list`, `/wf-task-archive`, `$wf-task-archive`, `/skills wf-task-archive`, `/wf-command-create`, `$wf-command-create`, and `/skills wf-command-create`, load `Harness/MEMORY.md` and `Harness/README.md`.
12
12
  - For simple single-step tasks without `/wf-*`, operate in direct mode: skip the Harness router and execute directly.
13
13
  - Do not bulk-read `Harness/`. Load by router trigger.
14
14
  - Keep `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` current when work has multiple steps, files, or agents.
@@ -9,13 +9,10 @@ Use this skill before shelling out to `claude`, `codex`, or `opencode` from Harn
9
9
 
10
10
  ## Source Order
11
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.
12
+ Prefer installed help (`claude --help`, `codex exec --help`, `opencode run --help`), then official docs for cost/auth/JSON/resume/tools/telemetry; record command, source, stdout/stderr shape, and failures.
15
13
 
16
14
  ## Claude Code CLI
17
15
 
18
- - Interactive: `claude`.
19
16
  - Non-interactive JSON: pipe ASCII or UTF-8-safe stdin into `claude -p --output-format json`.
20
17
  - Stream JSON requires verbose mode: `claude -p --output-format stream-json --verbose`.
21
18
  - Continue/resume: `claude -c -p "..."` or `claude -p --resume <session-id> "..."`; for PowerShell automation, prefer stdin and validate non-empty JSON before parsing.
@@ -26,19 +23,15 @@ Use this skill before shelling out to `claude`, `codex`, or `opencode` from Harn
26
23
 
27
24
  ## Codex CLI
28
25
 
29
- - Interactive: `codex`.
30
26
  - 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"`.
27
+ - Stdin modes: `cat prompt.txt | codex exec -`; `some-command | codex exec "summarize this output"`.
33
28
  - Machine output: `codex exec --json "task"` emits JSONL events; parse `turn.completed.usage`, including `cached_input_tokens` when present.
34
29
  - Resume: `codex exec resume --last "..."` or `codex exec resume <SESSION_ID> "..."`.
35
30
  - Permissions: default is read-only; set `--sandbox workspace-write` only when edits are required. Use `--ignore-user-config` / `--ignore-rules` for controlled automation.
36
31
 
37
32
  ## OpenCode CLI
38
33
 
39
- - Interactive: `opencode`.
40
- - Non-interactive: `opencode run [message..]`.
41
- - JSON events: `opencode run --format json "task"`.
34
+ - Non-interactive: `opencode run [message..]`; JSON events: `opencode run --format json "task"`.
42
35
  - Resume: `opencode run --continue "..."` or `opencode run --session <id> "..."`.
43
36
  - Peer role: `opencode run --agent reviewer --dir . "review prompt"`.
44
37
  - Reuse a server to avoid MCP cold boot: `opencode serve`, then `opencode run --attach http://localhost:4096 "task"`.
@@ -48,31 +41,27 @@ Use this skill before shelling out to `claude`, `codex`, or `opencode` from Harn
48
41
 
49
42
  - Prefer stdin over trailing prompt args for `claude -p` in PowerShell.
50
43
  - 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.
44
+ - Do not trust exit code alone. Fail on empty/non-JSON stdout, error/budget/fallback terminal fields, or missing final model text.
52
45
  - Avoid naming function parameters `$Args`; PowerShell treats `$Args` specially.
53
46
  - Store telemetry outside the repo, e.g. `$HOME/.claude/cache-telemetry/*.json`, so git status does not perturb prefixes.
54
47
 
55
48
  ## Evidence-Packet Review Pattern
56
49
 
57
- For peer review, route smokes, cache analysis, and audits, gather evidence
58
- first; the peer judges only the bounded packet.
50
+ For peer review, route smokes, cache analysis, and audits, gather evidence first; the peer judges only the bounded packet.
59
51
 
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.
52
+ - Gather paths, line snippets, command names, exits, and invariants with `rg`, `node` scripts, validators, or small reads.
53
+ - Send only that packet. Exclude full docs, raw logs, timestamps, session IDs, and screenshots unless they are the evidence.
54
+ - Prefer no tools for judgment-only review; otherwise allow only read-only tools and name the exact read set.
66
55
  - Controller accepts, rejects, or escalates findings. Peers do not own scope.
56
+ - Fail on empty/non-JSON stdout, explicit error events, budget errors, fallback warnings, or missing final model text.
57
+ - For `claude -p --output-format json`, check `is_error`, `subtype`, and `result` fields before treating output as review evidence.
58
+ - For `opencode run --format json`, extract `text` from JSONL events; the stream is not a single review result.
67
59
 
68
60
  ## No Scratch-File Rule
69
61
 
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.
62
+ - Do not write CLI probe output under `%TEMP%`, `$env:TEMP`, `/tmp`, or other system temp directories; prefer stdout, JSON/JSONL streaming, or in-memory parsing.
73
63
  - 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.
64
+ - Cache telemetry may live under `$HOME/.claude/cache-telemetry/` to avoid repo prompt-cache churn.
76
65
  - Do not create prompt temp files. Use stdin.
77
66
 
78
67
  ## Subagent Output Contract
@@ -102,8 +91,7 @@ Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`:
102
91
  ## Batch-Test Pattern
103
92
 
104
93
  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.
94
+ 2. Build a compact evidence packet before invoking peer agents; use the peer only for judgment unless the test explicitly requires live agent discovery.
107
95
  3. Run a cold turn and capture session id.
108
96
  4. Resume that session for two warm turns.
109
97
  5. For each turn record input, cache creation, cache read, ratio, cost, model/session id, and exact flags.
@@ -111,9 +99,6 @@ Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`:
111
99
 
112
100
  ## Official References
113
101
 
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
102
+ - Claude Code CLI/cache/statusline: https://code.claude.com/docs/en/cli-reference
117
103
  - Codex CLI: https://developers.openai.com/codex/cli
118
- - Codex non-interactive mode: https://learn.chatgpt.com/docs/non-interactive-mode
119
104
  - OpenCode CLI: https://opencode.ai/docs/cli/
@@ -0,0 +1,176 @@
1
+ ---
2
+ name: wf-browser
3
+ description: Built-in browser automation and E2E verification workflow. Use for Claude /wf-browser, Codex $wf-browser or /skills wf-browser, Browser Use, Playwright, Chrome DevTools/CDP, screenshots, forms, UI verification, and browser-visible acceptance.
4
+ ---
5
+
6
+ # WF Browser
7
+
8
+ This skill is the single Browser E2E entry. Do not use or create a separate
9
+ browser E2E skill. The browser evidence contract lives here plus
10
+ `Harness/specs/protocols/HARNESS_BRIDGE.md`.
11
+
12
+ ## Invocation
13
+
14
+ - Claude Code: use `/wf-browser <task>` or select the `wf-browser` skill.
15
+ - Codex CLI or IDE: use `$wf-browser <task>` or `/skills` then choose `wf-browser`.
16
+ - OpenCode: use `/wf-browser <task>`.
17
+
18
+ ## Load
19
+
20
+ - `CLAUDE.md`
21
+ - `Harness/MEMORY.md` index only per Memory Preflight
22
+ - `Harness/README.md`
23
+ - `Harness/specs/protocols/HARNESS_BRIDGE.md`
24
+ - Project run/build/test instructions
25
+ - Official Browser Use skill text from `browser-use skill` when Browser Use is used
26
+
27
+ ## Cache Discipline
28
+
29
+ Follow `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`: keep stable
30
+ workflow docs first, then append only the current URL, selectors, concise browser
31
+ state, screenshot paths, trace paths, and failing assertions. Do not paste full
32
+ accessibility trees, browser logs, screenshots, videos, or network dumps into
33
+ task state.
34
+
35
+ ## Browser Evidence Contract
36
+
37
+ Every browser-visible claim needs real browser evidence:
38
+
39
+ 1. URL and viewport/browser scope.
40
+ 2. Stable selector contract using `data-testid` and accessible labels/roles.
41
+ 3. Real interaction evidence from Browser Use, Playwright, Chrome DevTools/CDP,
42
+ or documented manual browser checks.
43
+ 4. Console and network checks for runtime exceptions, failed requests, and
44
+ frontend-backend side effects.
45
+ 5. Screenshot, trace, video, state snapshot, or command output path.
46
+ 6. AC-by-AC validation matrix when acceptance criteria exist.
47
+
48
+ No `data-testid` or stable accessible selector, no UI acceptance. No API
49
+ contract, no backend integration acceptance.
50
+
51
+ ## Controllable UI Contract
52
+
53
+ UI built for browser control must expose targetable, user-meaningful controls:
54
+
55
+ | Category | Required control surface |
56
+ | --- | --- |
57
+ | Inputs | `<label>` association or `aria-label`, `data-testid`, disabled/invalid states, deterministic placeholder only as fallback |
58
+ | Buttons | accessible name, `data-testid`, disabled/loading state, no icon-only button without `aria-label` |
59
+ | Filters | stable test id for input/menu/chip, selected state, clear/reset control |
60
+ | Rows/items | stable row/item test id plus durable item key such as `data-row-id`; avoid index-only targeting |
61
+ | Empty state | visible empty container with `data-testid="empty-state"` or feature-specific equivalent |
62
+ | Error state | inline error/toast/banner with stable test id and accessible role when appropriate |
63
+ | Loading state | stable spinner/skeleton/progress test id; verify duplicate submit prevention |
64
+
65
+ Required coverage targets: inputs, buttons, filters, rows, empty/error/loading states.
66
+
67
+ Selector priority:
68
+
69
+ 1. `data-testid`
70
+ 2. accessible labels/roles
71
+ 3. visible text for stable user-facing copy
72
+
73
+ Do not use generated class names, brittle CSS chains, XPath, DOM index selectors,
74
+ or raw coordinates as the primary test contract. Coordinates are acceptable only
75
+ after locating an element through the accessibility tree or when testing canvas
76
+ or other non-DOM UI.
77
+
78
+ ## Browser Use CLI
79
+
80
+ Use the current script-style Browser Use CLI; old `browser-use open/state/click/screenshot/input/wait` subcommands are removed from the current CLI and must not be used in new docs or tests.
81
+
82
+ Health check:
83
+
84
+ ```bash
85
+ browser-use --doctor
86
+ browser-use skill
87
+ ```
88
+
89
+ PowerShell smoke:
90
+
91
+ ```powershell
92
+ @'
93
+ new_tab("https://example.com")
94
+ wait_for_load()
95
+ print(page_info())
96
+ path = capture_screenshot("Harness/tasks/<task-id>/evidence/example.png")
97
+ print(path)
98
+ '@ | browser-use
99
+ ```
100
+
101
+ Bash smoke:
102
+
103
+ ```bash
104
+ browser-use <<'PY'
105
+ new_tab("https://example.com")
106
+ wait_for_load()
107
+ print(page_info())
108
+ path = capture_screenshot("Harness/tasks/<task-id>/evidence/example.png")
109
+ print(path)
110
+ PY
111
+ ```
112
+
113
+ Useful helpers include `new_tab(url)`, `goto_url(url)`, `page_info()`,
114
+ `capture_screenshot(path)`, `click_at_xy(x, y)`, `type_text(text)`,
115
+ `fill_input(selector, text)`, `press_key(key)`, `scroll(x, y)`, `js(code)`,
116
+ `cdp(method, ...)`, `wait_for_load()`, `wait_for_element(selector)`,
117
+ `list_tabs()`, `switch_tab(target)`, and `close_tab(target)`.
118
+
119
+ For local Chrome connection problems, run `browser-use --doctor`. If Chrome asks
120
+ to allow remote debugging, stop and ask the user to approve the browser prompt.
121
+
122
+ ## Playwright Test Pattern
123
+
124
+ Prefer Playwright for repeatable E2E tests and Browser Use/CDP for exploratory
125
+ or interactive checks.
126
+
127
+ ```ts
128
+ import { test, expect } from "@playwright/test";
129
+
130
+ test("AC-001 user can submit the form", async ({ page }) => {
131
+ const requests: Array<{ url: string; method: string; postData: string | null }> = [];
132
+ page.on("request", request => {
133
+ requests.push({
134
+ url: request.url(),
135
+ method: request.method(),
136
+ postData: request.postData(),
137
+ });
138
+ });
139
+
140
+ await page.goto("/example");
141
+ await page.getByTestId("email-input").fill("test@example.com");
142
+ await page.getByRole("button", { name: "Submit" }).click();
143
+
144
+ await expect(page.getByTestId("loading-spinner")).toBeHidden();
145
+ await expect(page.getByTestId("result-row")).toBeVisible();
146
+ expect(requests.some(request => request.url.includes("/api/example"))).toBe(true);
147
+ });
148
+ ```
149
+
150
+ ## Chrome DevTools / CDP Checklist
151
+
152
+ - [ ] Record URL, port, browser, and viewport.
153
+ - [ ] Verify available Browser Use, Playwright, CDP, MCP, or manual tooling.
154
+ - [ ] Check not just HTTP 200.
155
+ - [ ] Verify no runtime exceptions, console errors, and failed network requests.
156
+ - [ ] Confirm stable accessible labels/roles or `data-testid` on interactive elements.
157
+ - [ ] Test the critical flow end-to-end with real user actions.
158
+ - [ ] Capture screenshot, trace, video, state snapshot, or result artifact paths.
159
+ - [ ] Produce an AC-by-AC validation matrix.
160
+ - [ ] Clean up dev server or browser processes that the task started.
161
+
162
+ ## Security
163
+
164
+ - Never log or screenshot real credentials, API keys, tokens, or private data.
165
+ - Use placeholder credentials in examples.
166
+ - Ask before using a real Chrome profile because it contains cookies and private sessions.
167
+ - Ask before leaving a remote/cloud browser running.
168
+ - For scraping or repeated automated visits, confirm the user owns the target or has permission.
169
+
170
+ ## Return
171
+
172
+ - Commands or scripts run
173
+ - Selectors used
174
+ - Screenshot/trace/video/state paths
175
+ - Verified flows and AC matrix
176
+ - Failures and remaining risks
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: wf-command-create
3
+ description: Create or modify Harness wf-* commands atomically. Use for $wf-command-create or /skills wf-command-create in Codex, and for /wf-command-create in Claude Code/OpenCode. Direct/compat maintenance command; creates or resumes a task capsule but does not enter WF mode.
4
+ ---
5
+
6
+ # WF Command Create Adapter
7
+
8
+ This skill is a Codex compatibility shim for the direct `/wf-command-create`
9
+ maintenance command. It does not start WF mode or load `Harness/MEMORY.md`.
10
+
11
+ ## Invocation
12
+
13
+ - Codex: `$wf-command-create` or `/skills` then choose `wf-command-create`.
14
+ - Claude Code: `/wf-command-create` direct command from `.claude/commands/wf-command-create.md`.
15
+ - OpenCode: `/wf-command-create` direct command from `.opencode/commands/wf-command-create.md`.
16
+
17
+ ## Load
18
+
19
+ - `.claude/commands/wf-command-create.md`
20
+ - `Harness/specs/runtime/command-surface.json`
21
+
22
+ ## Rules
23
+
24
+ Execute the command instructions from `.claude/commands/wf-command-create.md`.
25
+
26
+ - Create or resume the task capsule first.
27
+ - Update `command-surface.json` before creating command files.
28
+ - Keep `.agents/skills/<id>/SKILL.md` byte-identical to `.claude/skills/<id>/SKILL.md`.
29
+ - Keep `.opencode/commands/<id>.md` body-identical to `.claude/commands/<id>.md`.
30
+ - Run the validation list from the command file or record why a check could not complete.
31
+
32
+ ## Return
33
+
34
+ - Task capsule path
35
+ - Command classification
36
+ - Changed surface checklist
37
+ - Verification results
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: wf-help
3
+ description: Codex compatibility: use $wf-help or /skills wf-help in Codex to show the Harness WF command table. Claude Code and OpenCode use the direct /wf-help command.
4
+ ---
5
+
6
+ # WF Help Adapter
7
+
8
+ This skill is a Codex compatibility shim. It does not start WF mode, dispatch
9
+ agents, or edit files.
10
+
11
+ ## Invocation
12
+
13
+ - Codex CLI or IDE: use `$wf-help` or `/skills` then choose `wf-help`.
14
+ - Claude Code: use `/wf-help` direct command from `.claude/commands/wf-help.md`.
15
+ - OpenCode: use `/wf-help` direct command from `.opencode/commands/wf-help.md`.
16
+
17
+ ## Load
18
+
19
+ - `.claude/commands/wf-help.md`
20
+
21
+ ## Rules
22
+
23
+ Return the command table from `.claude/commands/wf-help.md` directly.
24
+ Do not load `Harness/MEMORY.md`, do not enter WF, and do not invoke workflow
25
+ skills while answering help.
26
+
27
+ ## Return
28
+
29
+ - WF command table
30
+ - One short note that Codex uses `$wf-*` or `/skills wf-*` for skill-backed entries
@@ -43,7 +43,7 @@ WF-MAX inherits the selected WF tier and the shared WF-KERNEL gates
43
43
  default; WF-Max-Strict only on explicit strict request. Execution expands
44
44
  through:
45
45
 
46
- - New task state directories MUST use task ids matching
46
+ - New task capsules / state directories MUST use task ids matching
47
47
  `task-<verb>-<noun>[-detail]` under `Harness/tasks/<task-id>/`; never
48
48
  create bare `fix-*` task ids.
49
49
  1. Global mode: `wf-max`
@@ -75,16 +75,30 @@ WF-Max-Strict (explicit override): user says `--strict`, `strict wf-max`, or
75
75
 
76
76
  ## Fan-Out Discipline
77
77
 
78
+ - MUST attempt native subagent fan-out before implementation planning is
79
+ considered complete. A solo controller path is allowed only after recording
80
+ `fanoutAttempted: true`, the runtime, channel tried, agents requested,
81
+ limit/cap facts, failure reason, and fallback path in task state.
78
82
  - Use as many useful subagents as the runtime safely allows.
79
- - Codex capacity may be configured through official `agents.max_threads` and
80
- `agents.max_depth`; generated Harness config defaults to
81
- `.codex/config.toml` with `max_threads = 12` and `max_depth = 1`.
83
+ - Claude Code documents session, concurrent, and spawn-depth subagent caps:
84
+ `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION`,
85
+ `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`, and
86
+ `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`; Harness still enforces its lower
87
+ WF-MAX caps unless the user explicitly approves a task-local override.
88
+ - Codex capacity is configured through official
89
+ `agents.max_concurrent_threads_per_session`; `agents.max_threads` is a
90
+ legacy alias. Do not scaffold scalar `[agents]` caps into
91
+ `.codex/config.toml`; codex-cli 0.144.x can reject them during TUI
92
+ `skills/list`. Treat Codex capacity as a runtime probe and manage Harness
93
+ caps in the dispatch ledger unless the installed Codex version is verified
94
+ with `codex --strict-config doctor`.
95
+ - OpenCode uses `subagent_depth` for nesting. WF-MAX manager -> worker fan-out
96
+ requires `subagent_depth >= 2` plus manager `permission.task` allowlists; the
97
+ scaffold sets `subagent_depth = 2`.
82
98
  - Close completed agents before declaring the pool exhausted.
83
99
  - If Codex remains bottlenecked, ask the user before raising
84
- `agents.max_threads` above the scaffold default. Do not silently edit project
85
- or global Codex config.
86
- - Keep `agents.max_depth = 1` unless the user explicitly approves recursive
87
- delegation.
100
+ `agents.max_concurrent_threads_per_session`. Do not silently edit project or
101
+ global Codex config.
88
102
  - If the current runtime is exhausted, overflow to a peer CLI with explicit
89
103
  dispatch packets: `claude -p`, `codex exec`, or
90
104
  `opencode run --agent <role> --dir .`.
@@ -55,12 +55,39 @@ the review prompt.
55
55
 
56
56
  OpenCode note: `opencode run [message..]` is the non-interactive CLI path and
57
57
  `--agent reviewer` selects the installed `.opencode/agents/reviewer.md` role.
58
+ However, the installed agent is `mode: subagent`; OpenCode falls back to the
59
+ default agent. Prefer same-runtime reviewer subagent over `opencode run --agent reviewer`.
60
+
61
+ For `opencode run --format json`, parse JSONL events; the stream is not a single
62
+ review result.
63
+
64
+ ## Evidence-Packet Peer Review Contract
65
+
66
+ When invoking a peer CLI, use stdin prompt transport for PowerShell automation.
67
+ Return the raw evidence packet to the controller for formal acceptance.
68
+
69
+ ### JSON/JSONL Validation
70
+
71
+ For `claude -p` with `--output-format json`:
72
+ - Fail if stdout is empty, non-JSON, `is_error: true`, `subtype` starts with `error_`, or no final model `text`/`result` is present.
73
+ - Do NOT use tiny `--max-budget-usd` values in real reviews; if budget is set and exhausted, record BLOCKED rather than treating it as reviewer output.
74
+
75
+ For `opencode run --format json`:
76
+ - Parse JSONL events, extract final `text` parts.
77
+ - Do NOT treat the whole JSONL stream as the review result.
78
+ - Do NOT claim `opencode run --agent reviewer` used the reviewer role unless a probe confirms the agent is a primary runnable agent. Current evidence: `.opencode/agents/reviewer.md` is `mode: subagent` and OpenCode falls back to the default agent.
79
+ - Prefer native reviewer subagent fallback inside the current runtime when OpenCode cannot run reviewer as a primary CLI agent.
80
+
81
+ General parsing rules: parse JSON/JSONL and fail on empty output, non-JSON output, explicit error events, budget errors, fallback warnings, or missing final model text.
82
+
83
+ ### Controller Adjudication
84
+
85
+ The controller accepts, rejects, or escalates each finding after parsing the evidence packet. Do not pass raw output through as accepted findings without controller review.
58
86
 
59
87
  ## Review Dimensions
60
88
 
61
89
  Cover correctness, security, architecture, performance, and tests. Classify
62
- findings as Critical, High, Medium, or Low. Return raw peer or subagent output
63
- first, then the controller's severity-classified synthesis.
90
+ findings as Critical, High, Medium, or Low.
64
91
 
65
92
  ## Reviewer Role Fallback
66
93
 
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: wf-task-archive
3
+ description: Archive completed task capsules. Use for $wf-task-archive or /skills wf-task-archive in Codex. Direct/compat command wrapping task-state.mjs — does not enter WF mode.
4
+ ---
5
+
6
+ # WF Task Archive Adapter
7
+
8
+ This skill is a Codex compatibility shim. It does not start WF mode, dispatch agents, or edit files directly.
9
+
10
+ ## Invocation
11
+
12
+ - Codex: `$wf-task-archive` or `/skills` then choose `wf-task-archive`.
13
+ - Claude Code: `/wf-task-archive` direct command from `.claude/commands/wf-task-archive.md`.
14
+ - OpenCode: `/wf-task-archive` direct command from `.opencode/commands/wf-task-archive.md`.
15
+
16
+ ## Load
17
+
18
+ - `.claude/commands/wf-task-archive.md`
19
+
20
+ ## Rules
21
+
22
+ Execute the command instructions from `.claude/commands/wf-task-archive.md` directly.
23
+ Do not load `Harness/MEMORY.md`, do not enter WF.
24
+
25
+ ## Return
26
+
27
+ - Task archive result
28
+ - Note that Codex uses `$wf-task-archive` or `/skills wf-task-archive`
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: wf-task-list
3
+ description: List task capsules. Use for $wf-task-list or /skills wf-task-list in Codex. Direct/compat command wrapping task-state.mjs — does not enter WF mode.
4
+ ---
5
+
6
+ # WF Task List Adapter
7
+
8
+ This skill is a Codex compatibility shim. It does not start WF mode, dispatch agents, or edit files directly.
9
+
10
+ ## Invocation
11
+
12
+ - Codex: `$wf-task-list` or `/skills` then choose `wf-task-list`.
13
+ - Claude Code: `/wf-task-list` direct command from `.claude/commands/wf-task-list.md`.
14
+ - OpenCode: `/wf-task-list` direct command from `.opencode/commands/wf-task-list.md`.
15
+
16
+ ## Load
17
+
18
+ - `.claude/commands/wf-task-list.md`
19
+
20
+ ## Rules
21
+
22
+ Execute the command instructions from `.claude/commands/wf-task-list.md` directly.
23
+ Do not load `Harness/MEMORY.md`, do not enter WF.
24
+
25
+ ## Return
26
+
27
+ - Task listing result
28
+ - Note that Codex uses `$wf-task-list` or `/skills wf-task-list`
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: wf-task-record
3
+ description: Record user intent into a task capsule. Use for $wf-task-record or /skills wf-task-record in Codex. Direct/compat command wrapping task-state.mjs — does not enter WF mode.
4
+ ---
5
+
6
+ # WF Task Record Adapter
7
+
8
+ This skill is a Codex compatibility shim. It does not start WF mode, dispatch agents, or edit files directly.
9
+
10
+ ## Invocation
11
+
12
+ - Codex: `$wf-task-record` or `/skills` then choose `wf-task-record`.
13
+ - Claude Code: `/wf-task-record` direct command from `.claude/commands/wf-task-record.md`.
14
+ - OpenCode: `/wf-task-record` direct command from `.opencode/commands/wf-task-record.md`.
15
+
16
+ ## Load
17
+
18
+ - `.claude/commands/wf-task-record.md`
19
+
20
+ ## Rules
21
+
22
+ Execute the command instructions from `.claude/commands/wf-task-record.md` directly.
23
+ Do not load `Harness/MEMORY.md`, do not enter WF.
24
+
25
+ ## Return
26
+
27
+ - Task record result
28
+ - Note that Codex uses `$wf-task-record` or `/skills wf-task-record`
@@ -1,5 +1,3 @@
1
- [agents]
2
- # Harness WF-MAX default: higher than Codex's unset default of 6.
3
- # Keep depth at 1 unless the user explicitly approves recursive delegation.
4
- max_threads = 12
5
- max_depth = 1
1
+ # Codex project config intentionally avoids WF-MAX capacity defaults.
2
+ # codex-cli 0.144.x can reject scalar agent-capacity caps during TUI skills/list.
3
+ # WF-MAX manages fan-out caps in Harness docs and task state instead.