create-harness-vibe-coding 0.8.16 → 0.8.17

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 (52) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README-CN.md +98 -127
  3. package/README.md +61 -42
  4. package/package.json +1 -1
  5. package/src/generator.js +15 -24
  6. package/src/index.js +1 -1
  7. package/templates/common/.claude/commands/wf-auto-spark.md +16 -0
  8. package/templates/common/.claude/commands/wf-auto.md +16 -0
  9. package/templates/{optional/skills/browser-e2e/.opencode → common/.claude}/commands/wf-browser.md +1 -1
  10. package/templates/common/.claude/commands/wf-help.md +9 -6
  11. package/templates/common/.claude/commands/wf-learn.md +16 -0
  12. package/templates/common/.claude/commands/wf-max.md +20 -0
  13. package/templates/common/.claude/commands/wf-readme.md +16 -0
  14. package/templates/common/.claude/commands/wf-remove.md +16 -0
  15. package/templates/common/.claude/commands/wf-review.md +16 -0
  16. package/templates/common/.claude/commands/wf.md +16 -0
  17. package/templates/common/.claude/rules/ecc/common.md +1 -1
  18. package/templates/common/.claude/skills/wf-browser/SKILL.md +176 -0
  19. package/templates/common/.claude/skills/wf-help/SKILL.md +30 -0
  20. package/templates/common/.claude/skills/wf-max/SKILL.md +21 -7
  21. package/templates/common/.codex/config.toml +3 -5
  22. package/templates/common/.harness-version +69 -36
  23. package/templates/common/.opencode/agents/architect-manager.md +7 -1
  24. package/templates/common/.opencode/agents/explore-manager.md +10 -1
  25. package/templates/common/.opencode/agents/implement-manager.md +5 -3
  26. package/templates/common/.opencode/agents/review-manager.md +5 -2
  27. package/templates/common/.opencode/commands/wf-browser.md +16 -0
  28. package/templates/common/.opencode/commands/wf-help.md +9 -6
  29. package/templates/common/.opencode/commands/wf-max.md +12 -7
  30. package/templates/common/CLAUDE.md +2 -2
  31. package/templates/common/Harness/MEMORY.md +3 -3
  32. package/templates/common/Harness/README.md +12 -11
  33. package/templates/common/Harness/ownership.manifest.json +77 -14
  34. package/templates/common/Harness/scripts/archive-tasks.mjs +12 -220
  35. package/templates/common/Harness/scripts/scan-clean.mjs +3 -9
  36. package/templates/common/Harness/scripts/task-state.mjs +889 -0
  37. package/templates/common/Harness/scripts/validate-harness.mjs +233 -28
  38. package/templates/common/Harness/scripts/wf-remove.mjs +3 -3
  39. package/templates/common/Harness/scripts/wf-update-check.mjs +3 -0
  40. package/templates/common/Harness/specs/guides/SETUP.md +2 -2
  41. package/templates/common/Harness/specs/protocols/TASK_ARCHIVE.md +43 -23
  42. package/templates/common/Harness/specs/runtime/dispatch.md +2 -2
  43. package/templates/common/Harness/specs/runtime/subagents.md +9 -5
  44. package/templates/common/Harness/specs/workflows/WF-AUTO.md +6 -6
  45. package/templates/common/Harness/specs/workflows/WF-KERNEL.md +1 -1
  46. package/templates/common/Harness/specs/workflows/WF-MAX.md +30 -2
  47. package/templates/common/Harness/specs/workflows/WF-STATE.md +89 -36
  48. package/templates/common/opencode.json +1 -0
  49. package/templates/optional/catalog.json +2 -9
  50. package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +0 -42
  51. package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +0 -201
  52. package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +0 -119
package/src/generator.js CHANGED
@@ -70,6 +70,9 @@ const TEMPLATES_DIR = path.resolve(__dirname, '..', 'templates', 'common');
70
70
  const OPTIONAL_DIR = path.resolve(__dirname, '..', 'templates', 'optional');
71
71
  const OPTIONAL_CATALOG = path.join(OPTIONAL_DIR, 'catalog.json');
72
72
  const VALID_CONFLICT_POLICIES = new Set(['fail', 'skip', 'backup', 'overwrite']);
73
+ const RETIRED_OPTION_MESSAGES = new Map([
74
+ ['browser-e2e', 'Optional workflow "browser-e2e" has been retired; wf-browser is built in by default. Use /wf-browser, $wf-browser, or /skills wf-browser instead.'],
75
+ ]);
73
76
  const EMPTY_DIRS = [
74
77
  'tests',
75
78
  ];
@@ -154,6 +157,7 @@ function resolveOptionalSelection({
154
157
  const recommendationsById = new Map(externalRecommendations(catalog).map(item => [item.id, item]));
155
158
  const selected = [];
156
159
  const errors = [];
160
+ const warnings = [];
157
161
 
158
162
  if (preset) {
159
163
  if (!catalog.presets[preset]) {
@@ -168,12 +172,16 @@ function resolveOptionalSelection({
168
172
  const ids = [...new Set(selected)];
169
173
  const withoutIds = [...new Set(normalizeOptionList(withoutOptions))];
170
174
  for (const id of ids) {
171
- if (!skillsById.has(id)) {
175
+ if (RETIRED_OPTION_MESSAGES.has(id)) {
176
+ warnings.push(RETIRED_OPTION_MESSAGES.get(id));
177
+ } else if (!skillsById.has(id)) {
172
178
  errors.push(`Unknown optional skill "${id}". Run --list-options to see available options.`);
173
179
  }
174
180
  }
175
181
  for (const id of withoutIds) {
176
- if (!skillsById.has(id)) {
182
+ if (RETIRED_OPTION_MESSAGES.has(id)) {
183
+ warnings.push(`Optional workflow "${id}" is retired and built in/no-op for --without.`);
184
+ } else if (!skillsById.has(id)) {
177
185
  errors.push(`Unknown optional skill in --without "${id}". Run --list-options to see available options.`);
178
186
  }
179
187
  }
@@ -186,13 +194,14 @@ function resolveOptionalSelection({
186
194
  }
187
195
 
188
196
  const withoutSet = new Set(withoutIds);
189
- const selectedIds = ids.filter(id => !withoutSet.has(id));
197
+ const selectedIds = ids.filter(id => !withoutSet.has(id) && !RETIRED_OPTION_MESSAGES.has(id));
190
198
 
191
199
  return {
192
200
  catalog,
193
201
  selectedSkills: errors.length ? [] : selectedIds.map(id => skillsById.get(id)),
194
202
  selectedRecommendations: errors.length ? [] : recommendationIds.map(id => recommendationsById.get(id)),
195
203
  errors,
204
+ warnings,
196
205
  };
197
206
  }
198
207
 
@@ -350,7 +359,7 @@ function readOwnershipManifest() {
350
359
  *
351
360
  * Manifest-present: candidate set = manifest.frameworkOwned paths UNION the
352
361
  * selected optional skills' manifest.optionalOwned paths. This includes optional
353
- * skill paths like browser-e2e (fixing the bug where same-name user files at
362
+ * skill paths like ui-ux-review (fixing the bug where same-name user files at
354
363
  * optional-skill paths were clobbered).
355
364
  *
356
365
  * Manifest-absent (null): candidate set = all fileSpec dests (the exact set of
@@ -493,7 +502,6 @@ function nextBackupPath(destPath) {
493
502
 
494
503
  function registerOptionalContent(file, content, selectedSkills) {
495
504
  if (!selectedSkills.length) return content;
496
- const hasBrowserE2e = selectedSkills.some(skill => skill.id === 'browser-e2e');
497
505
 
498
506
  if (file === 'Harness/MEMORY.md') {
499
507
  const lines = selectedSkills.map(skill => (
@@ -509,25 +517,7 @@ function registerOptionalContent(file, content, selectedSkills) {
509
517
  const lines = selectedSkills.map(skill => (
510
518
  `- [${skill.title}](workflows/${skill.id}.md) - ${skill.description}`
511
519
  ));
512
- let next = content;
513
- if (hasBrowserE2e) {
514
- next = next.replace(
515
- '| Optional workflow installed |',
516
- '| Browser E2E testing or automation | /wf-browser, $wf-browser, browser, e2e, web automation, screenshot verify, page test, browser test, Playwright, CDP | [workflows/browser-e2e.md](workflows/browser-e2e.md), [HARNESS_BRIDGE.md](HARNESS_BRIDGE.md) | UI/API contract, CLI commands, screenshots, traces, validation matrix |\n| Optional workflow installed |',
517
- );
518
- next = next.replace(
519
- '| `/wf-readme [task]` |',
520
- '| `/wf-browser [task]` | `$wf-browser [task]` | Optional browser automation/E2E workflow when `browser-e2e` is installed |\n| `/wf-readme [task]` |',
521
- );
522
- }
523
- return `${next.trimEnd()}\n\n## Installed Optional Workflows\n\n${lines.join('\n')}\n`;
524
- }
525
-
526
- if ((file === '.claude/commands/wf-help.md' || file === '.opencode/commands/wf-help.md') && hasBrowserE2e) {
527
- return content.replace(
528
- '| `/wf-readme <task>` |',
529
- '| `/wf-browser <task>` | optional workflow skill | `/wf-browser verify checkout flow` | Browser automation/E2E workflow with real UI interaction, screenshots, traces, and CDP/network evidence. |\n| `/wf-readme <task>` |',
530
- );
520
+ return `${content.trimEnd()}\n\n## Installed Optional Workflows\n\n${lines.join('\n')}\n`;
531
521
  }
532
522
 
533
523
  return content;
@@ -595,6 +585,7 @@ export function generate({
595
585
  };
596
586
 
597
587
  const optional = resolveOptionalSelection({ withOptions, withoutOptions, preset, externalOptions });
588
+ warnings.push(...optional.warnings);
598
589
  const fileSpecs = [
599
590
  ...createCoreFileSpecs(),
600
591
  ...createOptionalFileSpecs(optional.selectedSkills),
package/src/index.js CHANGED
@@ -57,7 +57,7 @@ if (showHelp) {
57
57
  console.log(' npx create-harness-vibe-coding@latest my-project ./dist/my-project -y');
58
58
  console.log(' npx create-harness-vibe-coding@latest legacy ./legacy -y --dry-run');
59
59
  console.log(' npx create-harness-vibe-coding@latest legacy ./legacy -y --on-conflict skip');
60
- console.log(' npx create-harness-vibe-coding@latest web ./web -y --with ts-react-frontend,browser-e2e');
60
+ console.log(' npx create-harness-vibe-coding@latest web ./web -y --with ts-react-frontend,ui-ux-review');
61
61
  console.log(' npx create-harness-vibe-coding@latest web ./web -y --preset web-app');
62
62
  console.log(' npx create-harness-vibe-coding@latest api ./api -y --preset fullstack --without github-pr-review');
63
63
  console.log('');
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Run perpetual inspiration mode via the wf-auto-spark skill
3
+ ---
4
+
5
+ # /wf-auto-spark
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-auto-spark/SKILL.md` (mirror: `.agents/skills/wf-auto-spark/SKILL.md`).
13
+ 4. Do not duplicate the workflow here. The skill adapter and `Harness/specs/workflows/WF-AUTO-SPARK.md` are authoritative.
14
+
15
+ If this runtime cannot invoke the skill directly, read
16
+ `.claude/skills/wf-auto-spark/SKILL.md` and follow it in place.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Run perpetual adaptive auto-optimization via the wf-auto skill
3
+ ---
4
+
5
+ # /wf-auto
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-auto/SKILL.md` (mirror: `.agents/skills/wf-auto/SKILL.md`).
13
+ 4. Do not duplicate the workflow here. The skill adapter and `Harness/specs/workflows/WF-AUTO.md` are authoritative.
14
+
15
+ If this runtime cannot invoke the skill directly, read
16
+ `.claude/skills/wf-auto/SKILL.md` and follow it in place.
@@ -10,7 +10,7 @@ static help or script command.
10
10
  1. Load `CLAUDE.md`, `Harness/MEMORY.md` (index only per Memory Preflight), then `Harness/README.md`.
11
11
  2. Preserve cache-first order per `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`.
12
12
  3. Execute per the skill adapter `.claude/skills/wf-browser/SKILL.md` (mirror: `.agents/skills/wf-browser/SKILL.md`).
13
- 4. Do not duplicate the workflow here. The skill adapter and `Harness/workflows/browser-e2e.md` are authoritative.
13
+ 4. Do not duplicate the workflow here. The skill adapter and `Harness/specs/protocols/HARNESS_BRIDGE.md` are authoritative.
14
14
 
15
15
  If this runtime cannot invoke the skill directly, read
16
16
  `.claude/skills/wf-browser/SKILL.md` and follow it in place.
@@ -3,6 +3,9 @@
3
3
  Return this help table directly. Do not invoke a skill, do not start WF mode,
4
4
  do not dispatch agents, and do not edit files.
5
5
 
6
+ Codex compatibility: `$wf-help` or `/skills wf-help` loads the `wf-help` shim,
7
+ which returns this same table without loading `Harness/MEMORY.md` or entering WF.
8
+
6
9
  | Command | Type | Usage | Purpose |
7
10
  | --- | --- | --- | --- |
8
11
  | `/wf-help` | direct command | `/wf-help` | Show this command table. |
@@ -12,14 +15,14 @@ do not dispatch agents, and do not edit files.
12
15
  | `/wf-auto-spark` | workflow skill | `/wf-auto-spark` | Perpetual inspiration mode with roadmap anchoring and external spark search. |
13
16
  | `/wf-review <focus>` | workflow skill | `/wf-review security and test coverage` | Peer CLI review through Claude/Codex/OpenCode, with reviewer subagent fallback. |
14
17
  | `/wf-learn` | workflow skill | `/wf-learn` | Force context-master -> memory-master learning cycle after repeated failures or closeout. |
15
- | `/wf-browser <task>` | optional workflow skill | `/wf-browser verify checkout flow` | Browser automation/E2E workflow with real UI interaction, screenshots, traces, and CDP/network evidence when installed. |
18
+ | `/wf-browser <task>` | workflow skill | `/wf-browser verify checkout flow` | Built-in browser automation/E2E workflow with real UI interaction, screenshots, traces, and CDP/network evidence. |
16
19
  | `/wf-readme <task>` | workflow skill | `/wf-readme polish quickstart` | Preserve, merge, or improve README docs without trampling existing project documentation. |
17
20
  | `/wf-update` | direct command | `/wf-update` | Check/apply Harness scaffold updates with safe file classification and conflict handling. |
18
21
  | `/wf-remove` | workflow skill | `/wf-remove` | Safely remove Harness files while preserving project/user data unless explicitly purged. |
19
22
 
20
23
  Source of truth: `Harness/README.md#Skill Commands` plus installed skills under
21
- `.claude/skills/` (Claude Code) or `.agents/skills/` (Codex). In OpenCode the
22
- same skills load from `.claude/skills/`, `.agents/skills/`, and `.opencode/skills/`.
23
- In OpenCode, every workflow command above is also visible as a thin command
24
- wrapper under `.opencode/commands/` (e.g. `/wf`, `/wf-max`); each wrapper only
25
- routes to the matching skill adapter and does not duplicate the workflow.
24
+ `.claude/skills/` (Claude Code and OpenCode adapters) or `.agents/skills/`
25
+ (Codex). In OpenCode, every workflow command above is visible as a thin command
26
+ wrapper under `.opencode/commands/` (e.g. `/wf`, `/wf-max`); each wrapper routes
27
+ to the matching `.claude/skills/<command>/SKILL.md` adapter and does not
28
+ duplicate the workflow.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Run the context-master -> memory-master learning cycle via the wf-learn skill
3
+ ---
4
+
5
+ # /wf-learn
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-learn/SKILL.md` (mirror: `.agents/skills/wf-learn/SKILL.md`).
13
+ 4. Do not duplicate the workflow here. The skill adapter and `Harness/specs/protocols/MEMORY_PROTOCOL.md` are authoritative.
14
+
15
+ If this runtime cannot invoke the skill directly, read
16
+ `.claude/skills/wf-learn/SKILL.md` and follow it in place.
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Run WF-MAX with mandatory subagent fan-out and recorded degradation
3
+ ---
4
+
5
+ # /wf-max
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. Load and follow `.claude/skills/wf-max/SKILL.md` (mirror: `.agents/skills/wf-max/SKILL.md`) and `Harness/specs/workflows/WF-MAX.md`.
12
+ 3. Preserve cache-first order per `Harness/specs/runtime/context-loading.md#Cache-First Context Contract`.
13
+ 4. MUST attempt native runtime subagent fan-out before planning is considered complete:
14
+ - start `task-scribe` when available for task ledger/state;
15
+ - start W0 exploration through manager/explorer/researcher roles with disjoint read sets;
16
+ - when running in OpenCode, require project `opencode.json` to have `subagent_depth >= 2` and manager agents to have `permission.task` allowlists for manager -> worker fan-out;
17
+ - if nested manager fan-out is unavailable, dispatch leaf workers directly from the primary agent with exact WF-MAX dispatch packets.
18
+ 5. In every runtime, MUST attempt native subagent fan-out before implementation planning is considered complete; never silently continue as a solo controller.
19
+ 6. If native fan-out fails, record `fanoutAttempted: true`, runtime, channel tried, agents requested, failure/degradation reason, and the fallback path in `Harness/tasks/<task-id>/PLAN.md` or `PROGRESS.md`.
20
+ 7. Continue with WF-Max-Useful by default or WF-Max-Strict only when the user explicitly requests strict mode.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Run the README preservation and improvement workflow via the wf-readme skill
3
+ ---
4
+
5
+ # /wf-readme
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-readme/SKILL.md` (mirror: `.agents/skills/wf-readme/SKILL.md`).
13
+ 4. Do not duplicate the workflow here. The skill adapter and the project root \`README.md\` ownership rules are authoritative.
14
+
15
+ If this runtime cannot invoke the skill directly, read
16
+ `.claude/skills/wf-readme/SKILL.md` and follow it in place.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Run safe harness removal via the wf-remove skill
3
+ ---
4
+
5
+ # /wf-remove
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-remove/SKILL.md` (mirror: `.agents/skills/wf-remove/SKILL.md`).
13
+ 4. Do not duplicate the workflow here. The skill adapter and `Harness/scripts/wf-remove.mjs` are authoritative.
14
+
15
+ If this runtime cannot invoke the skill directly, read
16
+ `.claude/skills/wf-remove/SKILL.md` and follow it in place.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Run peer CLI or reviewer-subagent review via the wf-review skill
3
+ ---
4
+
5
+ # /wf-review
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-review/SKILL.md` (mirror: `.agents/skills/wf-review/SKILL.md`).
13
+ 4. Do not duplicate the workflow here. The skill adapter and the wf-review peer-review contract are authoritative.
14
+
15
+ If this runtime cannot invoke the skill directly, read
16
+ `.claude/skills/wf-review/SKILL.md` and follow it in place.
@@ -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`, and `/skills wf-update`, 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.
@@ -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,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
@@ -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 .`.
@@ -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.