create-harness-vibe-coding 0.8.18 → 0.8.19

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 (128) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +1 -0
  3. package/package.json +5 -2
  4. package/src/index.js +383 -267
  5. package/src/ui/dist/assets/AgentsRoute-CuSKYmFu.js +17 -0
  6. package/src/ui/dist/assets/AgentsRoute-CuSKYmFu.js.map +1 -0
  7. package/src/ui/dist/assets/RolesRoute-DOzTYVRm.js +7 -0
  8. package/src/ui/dist/assets/RolesRoute-DOzTYVRm.js.map +1 -0
  9. package/src/ui/dist/assets/SettingsRoute-DPU7jSQm.js +12 -0
  10. package/src/ui/dist/assets/SettingsRoute-DPU7jSQm.js.map +1 -0
  11. package/src/ui/dist/assets/TaskList-BN4r8s1i.js +50 -0
  12. package/src/ui/dist/assets/TaskList-BN4r8s1i.js.map +1 -0
  13. package/src/ui/dist/assets/TerminalDrawer-6GBZ9nXN.css +32 -0
  14. package/src/ui/dist/assets/TerminalDrawer-Cej4PxsH.js +74 -0
  15. package/src/ui/dist/assets/TerminalDrawer-Cej4PxsH.js.map +1 -0
  16. package/src/ui/dist/assets/WorkflowRoute-BnuhLJ6X.css +1 -0
  17. package/src/ui/dist/assets/WorkflowRoute-C-clKe-j.js +39 -0
  18. package/src/ui/dist/assets/WorkflowRoute-C-clKe-j.js.map +1 -0
  19. package/src/ui/dist/assets/index-BOVYWntB.js +117 -0
  20. package/src/ui/dist/assets/index-BOVYWntB.js.map +1 -0
  21. package/src/ui/dist/assets/index-DaUObq0H.css +1 -0
  22. package/src/ui/dist/assets/maximize-2-LNrr_rKr.js +7 -0
  23. package/src/ui/dist/assets/maximize-2-LNrr_rKr.js.map +1 -0
  24. package/src/ui/dist/assets/plus-QuTJyoT3.js +7 -0
  25. package/src/ui/dist/assets/plus-QuTJyoT3.js.map +1 -0
  26. package/src/ui/dist/assets/proxy-D0vUbds5.js +2 -0
  27. package/src/ui/dist/assets/proxy-D0vUbds5.js.map +1 -0
  28. package/src/ui/dist/assets/refresh-cw-JNmExijd.js +7 -0
  29. package/src/ui/dist/assets/refresh-cw-JNmExijd.js.map +1 -0
  30. package/src/ui/dist/assets/terminal-BBQvnOAK.js +7 -0
  31. package/src/ui/dist/assets/terminal-BBQvnOAK.js.map +1 -0
  32. package/src/ui/dist/assets/useReducedMotion-BqmH0Tf7.js +7 -0
  33. package/src/ui/dist/assets/useReducedMotion-BqmH0Tf7.js.map +1 -0
  34. package/src/ui/dist/assets/x-DoIOGAJz.js +7 -0
  35. package/src/ui/dist/assets/x-DoIOGAJz.js.map +1 -0
  36. package/src/ui/dist/index.html +18 -0
  37. package/src/ui/index.html +17 -0
  38. package/src/ui/package.json +33 -0
  39. package/src/ui/pnpm-lock.yaml +1582 -0
  40. package/src/ui/pnpm-workspace.yaml +2 -0
  41. package/src/ui/src/App.tsx +86 -0
  42. package/src/ui/src/api.ts +93 -0
  43. package/src/ui/src/components/AgentsRoute.tsx +503 -0
  44. package/src/ui/src/components/Footer.tsx +69 -0
  45. package/src/ui/src/components/Header.tsx +175 -0
  46. package/src/ui/src/components/LoadingView.tsx +22 -0
  47. package/src/ui/src/components/RolesRoute.tsx +169 -0
  48. package/src/ui/src/components/SettingsRoute.tsx +166 -0
  49. package/src/ui/src/components/TaskList.tsx +388 -0
  50. package/src/ui/src/components/TerminalDrawer.tsx +611 -0
  51. package/src/ui/src/components/WorkflowRoute.tsx +670 -0
  52. package/src/ui/src/hooks/useReducedMotion.ts +17 -0
  53. package/src/ui/src/hooks/useServerConnection.ts +114 -0
  54. package/src/ui/src/index.css +281 -0
  55. package/src/ui/src/main.tsx +11 -0
  56. package/src/ui/src/types.ts +108 -0
  57. package/src/ui/tsconfig.json +21 -0
  58. package/src/ui/vite.config.ts +19 -0
  59. package/src/wf-ui-server/__tests__/a2a-store.test.mjs +79 -0
  60. package/src/wf-ui-server/__tests__/peer-capsule.test.mjs +268 -0
  61. package/src/wf-ui-server/__tests__/pty-adapter.test.mjs +70 -0
  62. package/src/wf-ui-server/__tests__/runtime-config.test.mjs +43 -0
  63. package/src/wf-ui-server/__tests__/runtime-detector.test.mjs +90 -0
  64. package/src/wf-ui-server/__tests__/security.test.mjs +59 -0
  65. package/src/wf-ui-server/__tests__/server.integration.test.mjs +150 -0
  66. package/src/wf-ui-server/__tests__/session-registry.test.mjs +238 -0
  67. package/src/wf-ui-server/__tests__/settings.test.mjs +135 -0
  68. package/src/wf-ui-server/__tests__/task-parser.test.mjs +200 -0
  69. package/src/wf-ui-server/__tests__/terminal-store.test.mjs +138 -0
  70. package/src/wf-ui-server/__tests__/token.test.mjs +48 -0
  71. package/src/wf-ui-server/__tests__/ws-events.integration.test.mjs +419 -0
  72. package/src/wf-ui-server/__tests__/ws-terminal.integration.test.mjs +383 -0
  73. package/src/wf-ui-server/a2a-store.mjs +296 -0
  74. package/src/wf-ui-server/peer-capsule.mjs +213 -0
  75. package/src/wf-ui-server/pty-adapter.mjs +155 -0
  76. package/src/wf-ui-server/runtime-config.mjs +153 -0
  77. package/src/wf-ui-server/runtime-detector.mjs +374 -0
  78. package/src/wf-ui-server/security.mjs +67 -0
  79. package/src/wf-ui-server/server.mjs +849 -0
  80. package/src/wf-ui-server/session-registry.mjs +204 -0
  81. package/src/wf-ui-server/settings.mjs +100 -0
  82. package/src/wf-ui-server/task-parser.mjs +133 -0
  83. package/src/wf-ui-server/terminal-store.mjs +225 -0
  84. package/src/wf-ui-server/token.mjs +41 -0
  85. package/src/wf-ui-server/ws-events.mjs +354 -0
  86. package/src/wf-ui-server/ws-terminal.mjs +473 -0
  87. package/templates/common/.claude/commands/wf-help.md +1 -0
  88. package/templates/common/.claude/commands/wf-task-list.md +2 -0
  89. package/templates/common/.claude/commands/wf-ui.md +26 -0
  90. package/templates/common/.claude/commands/wf-update.md +54 -9
  91. package/templates/common/.claude/rules/ecc/common.md +1 -1
  92. package/templates/common/.claude/skills/wf-auto/SKILL.md +3 -3
  93. package/templates/common/.claude/skills/wf-auto-spark/SKILL.md +2 -2
  94. package/templates/common/.claude/skills/wf-ui/SKILL.md +78 -0
  95. package/templates/common/.claude/skills/wf-update/SKILL.md +55 -58
  96. package/templates/common/.harness-version +63 -39
  97. package/templates/common/.opencode/commands/wf-help.md +1 -0
  98. package/templates/common/.opencode/commands/wf-task-list.md +2 -0
  99. package/templates/common/.opencode/commands/wf-ui.md +26 -0
  100. package/templates/common/.opencode/commands/wf-update.md +54 -9
  101. package/templates/common/CLAUDE.md +1 -1
  102. package/templates/common/Harness/MEMORY.md +2 -0
  103. package/templates/common/Harness/README.md +6 -4
  104. package/templates/common/Harness/a2a/role-graph.json +79 -0
  105. package/templates/common/Harness/a2a/runtime-registry.json +5 -0
  106. package/templates/common/Harness/a2a/skills/terminal-control.json +15 -0
  107. package/templates/common/Harness/ownership.manifest.json +57 -2
  108. package/templates/common/Harness/scripts/README.md +134 -0
  109. package/templates/common/Harness/scripts/a2a-terminal.mjs +191 -0
  110. package/templates/common/Harness/scripts/context-budget.mjs +1 -1
  111. package/templates/common/Harness/scripts/sync-host-global.mjs +278 -0
  112. package/templates/common/Harness/scripts/task-state.mjs +556 -23
  113. package/templates/common/Harness/scripts/validate-harness.mjs +229 -19
  114. package/templates/common/Harness/scripts/wf-remove.mjs +8 -3
  115. package/templates/common/Harness/scripts/wf-update-check.mjs +37 -9
  116. package/templates/common/Harness/scripts/wf-update-runner.mjs +325 -0
  117. package/templates/common/Harness/settings.json +35 -0
  118. package/templates/common/Harness/specs/protocols/TASK_ARCHIVE.md +7 -2
  119. package/templates/common/Harness/specs/runtime/command-surface.json +14 -0
  120. package/templates/common/Harness/specs/workflows/WF-AUTO-SPARK.md +8 -8
  121. package/templates/common/Harness/specs/workflows/WF-AUTO.md +12 -12
  122. package/templates/common/Harness/tasks/_template/NAMING.md +16 -16
  123. package/templates/common/Harness/tasks/_template/PLAN.md +17 -60
  124. package/templates/common/Harness/tasks/_template/PROBLEM.md +18 -0
  125. package/templates/common/Harness/tasks/_template/PROGRESS.md +9 -14
  126. package/templates/common/Harness/tasks/_template/REFERENCES.md +26 -0
  127. package/templates/common/Harness/tasks/_template/ARTIFACTS.md +0 -3
  128. package/templates/common/Harness/tasks/_template/NOTES.md +0 -3
@@ -22,7 +22,23 @@ targeted inspection.
22
22
 
23
23
  ## Flow
24
24
 
25
- 1. Run `node Harness/scripts/wf-update-check.mjs --json` first and use the
25
+ Scope resolution is deterministic:
26
+
27
+ - Current project has `Harness/scripts/wf-update-check.mjs`: update the project
28
+ install from that script.
29
+ - A global runtime is discoverable from `Harness/.harness-version.globalDir`,
30
+ `HARNESS_GLOBAL_HOME`, or the default `~/.harness/create-harness-vibe-coding`:
31
+ update that runtime too, then sync its Claude/Codex/OpenCode host-global
32
+ copies.
33
+ - Current project has no Harness install: update only the global runtime and
34
+ host-global copies. Do not scaffold or modify the project unless the user
35
+ explicitly asks to install Harness there.
36
+ `Harness/scripts/wf-update-runner.mjs` implements this multi-scope routing.
37
+ Older installs that do not have the runner fall back to
38
+ `Harness/scripts/wf-update-check.mjs`.
39
+
40
+ 1. Run `node Harness/scripts/wf-update-runner.mjs --json` first when present;
41
+ otherwise run `node Harness/scripts/wf-update-check.mjs --json`. Use the
26
42
  `agent` block as the action plan. Preserve `agent.releaseHighlights` for the
27
43
  user-facing update summary. Current updaters try npm
28
44
  `create-harness-vibe-coding@latest` first, then the canonical GitHub source
@@ -33,9 +49,11 @@ targeted inspection.
33
49
  starter files may be created, and checksum-matching legacy architecture can
34
50
  move to `Harness/project/architecture.md`. Harness/README.md is merge-tier,
35
51
  not PRESERVE.
36
- 3. If `agent.safeApplyCommand` is present, run it to apply SAFE, NEW, and
37
- adopted metadata-only files before spending AI time on conflicts. Default
38
- command: `node Harness/scripts/wf-update-check.mjs --apply-safe`.
52
+ 3. If `agent.safeApplyCommand` is present, run the runner apply path to apply
53
+ SAFE, NEW, and adopted metadata-only files across every discovered scope
54
+ before spending AI time on conflicts. Default multi-scope command:
55
+ `node Harness/scripts/wf-update-runner.mjs --apply-safe --json`. Single-scope
56
+ fallback command: `node Harness/scripts/wf-update-check.mjs --apply-safe`.
39
57
  Framework-owned templates, commands, skills, agents, and scripts are
40
58
  script-owned and should be overwritten by the updater after checksum
41
59
  validation.
@@ -53,11 +71,38 @@ targeted inspection.
53
71
  `--accept-local <file>`, `--accept-merged <file>`, or
54
72
  `--accept-template <file>`; do not hand-edit `Harness/.harness-version`.
55
73
  Ask the user only when the intent is ambiguous.
56
- 7. Run `node Harness/scripts/wf-update-check.mjs --finalize` after all
57
- conflicts have script-recorded decisions. Use strict `--apply` only when the
58
- JSON plan has zero conflicts.
59
- 8. After update, run `node Harness/scripts/validate-harness.mjs` and then
60
- `node Harness/scripts/scan-clean.mjs`.
74
+ 7. Run `node Harness/scripts/wf-update-runner.mjs --finalize --json` after all
75
+ conflicts have script-recorded decisions. Single-scope fallback:
76
+ `node Harness/scripts/wf-update-check.mjs --finalize`. Use strict `--apply` only when
77
+ the JSON plan has zero conflicts.
78
+ 8. After update, sync and validate all machine surfaces:
79
+ ```
80
+ node Harness/scripts/sync-host-global.mjs --json
81
+ node Harness/scripts/sync-host-global.mjs --apply --json
82
+ node Harness/scripts/validate-harness.mjs
83
+ node Harness/scripts/validate-harness.mjs --manifest-audit
84
+ node Harness/scripts/scan-clean.mjs --json
85
+ ```
86
+ `sync-host-global.mjs` is a no-op for project-only installs. For global
87
+ installs it compares host-global files against the runtime sources listed in
88
+ `.harness-version.hostGlobal.targets`; missing or Harness-marked stale copies
89
+ are repaired by script, while user-looking files stay conflicts.
90
+ 9. If the update reports "Already up to date" but files are missing (e.g.,
91
+ new commands not showing up on a platform), run:
92
+ ```
93
+ node Harness/scripts/wf-update-runner.mjs --repair --json
94
+ node Harness/scripts/wf-update-runner.mjs --repair --apply-safe --json
95
+ node Harness/scripts/wf-update-runner.mjs --repair --finalize --json
96
+ node Harness/scripts/wf-update-check.mjs --repair --json
97
+ node Harness/scripts/wf-update-check.mjs --repair --apply-safe
98
+ node Harness/scripts/wf-update-check.mjs --repair --finalize
99
+ node Harness/scripts/sync-host-global.mjs --apply --json
100
+ node Harness/scripts/validate-harness.mjs --manifest-audit
101
+ ```
102
+ `--repair` bypasses the version check and forces a full file diff against
103
+ the latest remote template. This catches files that were missed during a
104
+ previous partial update where the version was bumped but not all files
105
+ were written.
61
106
 
62
107
  Codex users without a direct command surface: use `$wf-update` (skill path) or
63
108
  `node Harness/scripts/wf-update-check.mjs`.
@@ -14,7 +14,7 @@ In direct mode, do not load the full Harness router. Inspect only the files need
14
14
 
15
15
  Complex work may use direct planning, task capsules, tests, and subagents without entering WF. WF execution modes are explicit only: the user must type `/wf`, `$wf`, `/skills wf`, `/wf-max`, `$wf-max`, `/skills wf-max`, `/wf-auto`, `$wf-auto`, `/skills wf-auto`, `/wf-auto-spark`, `$wf-auto-spark`, or `/skills wf-auto-spark` to enter the WF kernel. No other phrasing, complexity heuristic, or inferred intent triggers WF.
16
16
 
17
- `/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` are **direct/compat commands** — do NOT load `Harness/MEMORY.md`, do NOT enter WF. Claude Code and OpenCode execute the direct command files; Codex may invoke the matching compatibility skill shim.
17
+ `/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`, `/skills wf-command-create`, `/wf-ui`, `$wf-ui`, and `/skills wf-ui` are **direct/compat commands** — do NOT load `Harness/MEMORY.md`, do NOT enter WF. Claude Code and OpenCode execute the direct command files; Codex may invoke the matching compatibility skill shim.
18
18
 
19
19
  For non-direct workflow commands (`/wf`, `/wf-max`, `/wf-auto`, `/wf-review`, `/wf-learn`, `/wf-readme`, `/wf-remove`, `/wf-browser`, `/wf-auto-spark`, and matching `$wf-*` or `/skills wf-*` forms except the direct/compat commands above), load `Harness/MEMORY.md` first, then `Harness/README.md`.
20
20
 
@@ -42,6 +42,7 @@ Stack-specific agents can be added after the product shape is known.
42
42
  - [wf-auto](../.claude/skills/wf-auto/SKILL.md) - perpetual adaptive auto-optimization: evidence-selected probes, dynamic obligations, intent checkpoints, evidence ledger.
43
43
  - [wf-auto-spark](../.claude/skills/wf-auto-spark/SKILL.md) - perpetual inspiration mode: external spark search, long-term roadmap with staged milestones, <=50% deviation guard.
44
44
  - [wf-browser](../.claude/skills/wf-browser/SKILL.md) - built-in browser automation/E2E workflow with controllable UI contracts, Browser Use, Playwright, CDP/network evidence, screenshots, traces, and validation matrix.
45
+ - [wf-ui](../.claude/skills/wf-ui/SKILL.md) - Codex compatibility shim for `$wf-ui` / `/skills wf-ui`; direct command starts the local browser control panel without entering WF.
45
46
  - [tdd](../.claude/skills/tdd/SKILL.md) - acceptance-driven TDD: AC-linked RED tests, real UI clicks for browser-visible behavior, Playwright/CDP evidence, and configured coverage gate.
46
47
  - [wf-remove](../.claude/skills/wf-remove/SKILL.md) - safely remove Harness framework files (SAFE/MODIFIED/USER classes), auto-prune empty directories, backup option.
47
48
  - [wf-task-record](../.claude/skills/wf-task-record/SKILL.md) - Codex compatibility: use $wf-task-record or /skills wf-task-record to wrap task-state.mjs record.
@@ -59,6 +60,7 @@ Codex repo-skill mirrors live under `../.agents/skills/` with the same skill nam
59
60
  - [wf-task-list](../.claude/commands/wf-task-list.md) - direct `/wf-task-list` command that wraps `node Harness/scripts/task-state.mjs list`.
60
61
  - [wf-task-archive](../.claude/commands/wf-task-archive.md) - direct `/wf-task-archive` command that wraps `node Harness/scripts/task-state.mjs archive`.
61
62
  - [wf-command-create](../.claude/commands/wf-command-create.md) - direct `/wf-command-create` command for task-backed wf-* command surface changes.
63
+ - [wf-ui](../.claude/commands/wf-ui.md) - direct `/wf-ui` command that starts the local Harness backend and browser control panel.
62
64
 
63
65
  Stack-specific skills can be added after the product shape is known.
64
66
 
@@ -4,7 +4,7 @@ Purpose: route humans and agents to the smallest useful context. `CLAUDE.md` is
4
4
 
5
5
  Default load: `CLAUDE.md`. For workflow commands (`/wf`, `/wf-max`, `/wf-auto`, `/wf-review`, `/wf-learn`, `/wf-readme`, `/wf-remove`, `/wf-browser`, `/wf-auto-spark`), also load `Harness/MEMORY.md` (index only per Memory Preflight), this file, and `Harness/PROGRESS.md` when work is active.
6
6
 
7
- `/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` are **direct/compat commands**: skip the router, do NOT load `Harness/MEMORY.md`, do NOT enter WF. Claude Code and OpenCode execute direct command files; Codex uses the matching compatibility skill shim.
7
+ `/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` `/skills wf-command-create`, `/wf-ui` `$wf-ui` `/skills wf-ui` are **direct/compat commands**: skip router, skip `Harness/MEMORY.md`, never enter WF. Claude/OpenCode use command files; Codex uses shims.
8
8
 
9
9
  Do not read the whole `Harness/` tree.
10
10
 
@@ -55,8 +55,8 @@ For the full phase contract, load [lifecycle.md](specs/guides/lifecycle.md).
55
55
  - This file is a router, not a full spec.
56
56
  - If the task does not clearly match a row below, search by keywords before loading more docs.
57
57
  - project files are the only durable communication channel; chat/subagent transcript state is non-authoritative.
58
- - Important assumptions, decisions, blockers, evidence, and handoffs must be written to the current task's `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
59
- - Task records are compact by default: PLAN holds goal, decisions, scope, risks; PROGRESS holds status/next, changes, verification. Do not paste command logs, full transcripts, or broad PRDs when a link or one-line evidence entry is enough.
58
+ - Write assumptions, decisions, blockers, evidence, and handoffs to the current task docs, feature doc, `Harness/MEMORY.md`, or `Harness/memory/*`.
59
+ - Task records are compact by default: PLAN holds goal, decisions, scope, risks; PROGRESS holds status/next, changes, verification. Link logs/transcripts instead of pasting them.
60
60
  - Build commands, git conventions, and release notes belong in root `README.md`, not `CLAUDE.md`.
61
61
  - README rewrites are optional project-doc work. Use `wf-readme` and preserve existing public docs unless the user approves a broader restructure.
62
62
  - Code architecture belongs in [architecture.md](project/architecture.md) or the current feature doc, not `CLAUDE.md`.
@@ -107,6 +107,7 @@ Routing priority: **direct mode is the default** when no explicit WF token is pr
107
107
  | Need perpetual auto-optimization | /wf-auto, $wf-auto, /skills wf-auto (explicit user token only) | [WF-AUTO.md](specs/workflows/WF-AUTO.md), [WF-AUTO-ANGLES.md](specs/workflows/WF-AUTO-ANGLES.md), [subagents.md](specs/runtime/subagents.md), [dispatch.md](specs/runtime/dispatch.md) | perpetual loop, adaptive probe selection, dynamic risk obligations, spark search, intent checkpoint, evidence ledger; CEO never writes code |
108
108
  | Need perpetual inspiration mode | /wf-auto-spark, $wf-auto-spark, /skills wf-auto-spark (explicit user token only) | [WF-AUTO-SPARK.md](specs/workflows/WF-AUTO-SPARK.md), [WF-AUTO.md](specs/workflows/WF-AUTO.md), [subagents.md](specs/runtime/subagents.md), [dispatch.md](specs/runtime/dispatch.md) | roadmap-anchored: North Star + milestones; external spark search; <=50% deviation guard; never auto-stops |
109
109
  | Need WF-MAX mode (explicit only) | /wf-max, $wf-max, /skills wf-max (explicit user token only) | [WF-MAX.md](specs/workflows/WF-MAX.md), [WF-KERNEL.md](specs/workflows/WF-KERNEL.md), [subagents.md](specs/runtime/subagents.md), [dispatch.md](specs/runtime/dispatch.md) | /wf kernel + max safe fan-out (WF-Max-Useful default, WF-Max-Strict override) |
110
+ | Need Harness control panel | /wf-ui, $wf-ui, /skills wf-ui (direct command) | `.claude/commands/wf-ui.md`, `.opencode/commands/wf-ui.md`; Codex shim: `.claude/skills/wf-ui/SKILL.md` | start local backend + browser UI directly; no WF/router load |
110
111
  | Need peer review | /wf-review, $wf-review, peer review, second opinion, cross-check, stuck | `.claude/skills/wf-review/SKILL.md`, `.agents/skills/wf-review/SKILL.md`, `Harness/README.md`, `.opencode/commands/wf-review.md` | peer CLI when available; otherwise installed `reviewer` role subagent; controller decides |
111
112
  | Adding harness to existing project | existing project, onboarding, migrate, bootstrap, preserve, conflict | [extension.md](specs/guides/extension.md), [PROGRESS.md](PROGRESS.md), root `README.md` and package/CI files | discovered project facts, preserved config, manual registration plan |
112
113
  | README optimization | README, docs, quickstart, install docs, architecture diagram, command table, documentation polish | root `README.md`, `.claude/skills/wf-readme/SKILL.md`, [PROGRESS.md](PROGRESS.md), [architecture.md](project/architecture.md) as needed | approved README mode, preserved sections, proposed diff plan |
@@ -162,7 +163,8 @@ Routing priority: **direct mode is the default** when no explicit WF token is pr
162
163
  | `/wf-task-list`, `$wf-task-list` | List tasks with dependency view, open tasks filter, and archive summary. Direct/compat — no Harness/MEMORY.md load. |
163
164
  | `/wf-task-archive`, `$wf-task-archive` | Archive completed/verified task capsules. Direct/compat — no Harness/MEMORY.md load. |
164
165
  | `/wf-command-create`, `$wf-command-create` | Create or modify wf-* command surfaces from `command-surface.json`. Direct/compat — creates/resumes a task capsule, no Harness/MEMORY.md load. |
166
+ | `/wf-ui`, `$wf-ui` | Start the local Harness backend and browser control panel. Direct/compat — no Harness/MEMORY.md load. |
165
167
 
166
168
  ## Skill Commands
167
169
 
168
- Workflow commands: `/wf`, `/wf-max`, `/wf-auto`, `/wf-auto-spark`, `/wf-review`, `/wf-learn`, `/wf-browser`, `/wf-readme`, `/wf-remove` with matching Codex `$...` and `/skills ...` forms. They load `Harness/MEMORY.md` and follow the registered task capsule policy. `/wf-update` remains direct.
170
+ Workflow commands: `/wf`, `/wf-max`, `/wf-auto`, `/wf-auto-spark`, `/wf-review`, `/wf-learn`, `/wf-browser`, `/wf-readme`, `/wf-remove` with matching Codex `$...` and `/skills ...` forms. They load `Harness/MEMORY.md` and follow the registered task capsule policy. `/wf-update` and `/wf-ui` remain direct.
@@ -0,0 +1,79 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "rootAgentId": "ceo",
4
+ "agents": [
5
+ {
6
+ "agentId": "ceo",
7
+ "role": "CEO Leader",
8
+ "level": 0,
9
+ "kind": "controller",
10
+ "skills": ["wf", "subagent-orchestrator", "terminal-control"],
11
+ "permissions": ["plan", "dispatch", "read-terminals", "send-terminal-input"]
12
+ },
13
+ {
14
+ "agentId": "product-manager",
15
+ "role": "Product Manager",
16
+ "level": 1,
17
+ "kind": "planner",
18
+ "skills": ["product-shape", "acceptance"],
19
+ "permissions": ["read-state", "define-ac"]
20
+ },
21
+ {
22
+ "agentId": "architect",
23
+ "role": "Architect",
24
+ "level": 1,
25
+ "kind": "architecture",
26
+ "skills": ["architecture", "contracts"],
27
+ "permissions": ["read-code", "define-contracts"]
28
+ },
29
+ {
30
+ "agentId": "backend-expert",
31
+ "role": "Backend Expert",
32
+ "level": 1,
33
+ "kind": "implementer",
34
+ "skills": ["runtime-detection", "terminal-control", "a2a-files"],
35
+ "permissions": ["read-code", "write-backend", "terminal-io"]
36
+ },
37
+ {
38
+ "agentId": "frontend-expert",
39
+ "role": "Frontend Expert",
40
+ "level": 1,
41
+ "kind": "implementer",
42
+ "skills": ["ui-control-plane"],
43
+ "permissions": ["read-code", "write-ui"]
44
+ },
45
+ {
46
+ "agentId": "reviewer",
47
+ "role": "Reviewer",
48
+ "level": 1,
49
+ "kind": "review",
50
+ "skills": ["wf-review"],
51
+ "permissions": ["read-code", "read-evidence"]
52
+ },
53
+ {
54
+ "agentId": "verifier",
55
+ "role": "Verifier",
56
+ "level": 1,
57
+ "kind": "validation",
58
+ "skills": ["wf-browser", "test-runner"],
59
+ "permissions": ["run-tests", "read-evidence"]
60
+ },
61
+ {
62
+ "agentId": "terminal-controller",
63
+ "role": "Terminal Controller",
64
+ "level": 1,
65
+ "kind": "runtime",
66
+ "skills": ["terminal-control"],
67
+ "permissions": ["read-terminals", "send-terminal-input"]
68
+ }
69
+ ],
70
+ "edges": [
71
+ { "from": "ceo", "to": "product-manager", "relation": "defines" },
72
+ { "from": "ceo", "to": "architect", "relation": "routes" },
73
+ { "from": "ceo", "to": "backend-expert", "relation": "dispatches" },
74
+ { "from": "ceo", "to": "frontend-expert", "relation": "dispatches" },
75
+ { "from": "ceo", "to": "reviewer", "relation": "requests-review" },
76
+ { "from": "ceo", "to": "verifier", "relation": "requests-evidence" },
77
+ { "from": "ceo", "to": "terminal-controller", "relation": "controls" }
78
+ ]
79
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "source": "backend-runtime-detector",
4
+ "runtimes": ["claude", "cc", "codex", "opencode", "openclaw", "pi"]
5
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "skillId": "terminal-control",
4
+ "name": "Terminal Control",
5
+ "source": "Harness/a2a/skills/terminal-control.json",
6
+ "description": "Bounded A2A tools for listing terminal sessions, reading output ranges, globbing terminal events, and attach-gated input forwarding.",
7
+ "tools": [
8
+ { "name": "list-sessions", "reads": ["Harness/tasks/**/sessions/**/STATE.json"] },
9
+ { "name": "read-range", "reads": ["Harness/tasks/**/sessions/**/terminal.jsonl"], "args": ["session", "from", "to", "tail"] },
10
+ { "name": "glob-events", "reads": ["Harness/tasks/**/sessions/**/events.jsonl"], "args": ["pattern", "since", "limit"] },
11
+ { "name": "send-input", "writes": ["Harness/tasks/**/sessions/**/input-requests.jsonl"], "args": ["session", "text"] }
12
+ ],
13
+ "defaultMode": "watch",
14
+ "inputPolicy": "attach-mode-required"
15
+ }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generator": "0.8.18",
3
+ "generator": "0.8.19",
4
4
  "source": "https://raw.githubusercontent.com/LiWeny16/create-harness-vibe-coding/main/templates/common/",
5
- "generated": "2026-07-29T06:33:44.000Z",
5
+ "generated": "2026-07-30T14:31:29.365Z",
6
6
  "preserve": [
7
7
  "Harness/PROGRESS.md",
8
8
  "Harness/tasks/**",
@@ -246,6 +246,11 @@
246
246
  "kind": "skill",
247
247
  "overwrite": "safe"
248
248
  },
249
+ {
250
+ "path": ".agents/skills/wf-ui/SKILL.md",
251
+ "kind": "skill",
252
+ "overwrite": "safe"
253
+ },
249
254
  {
250
255
  "path": ".agents/skills/wf-update/SKILL.md",
251
256
  "kind": "skill",
@@ -416,6 +421,11 @@
416
421
  "kind": "command",
417
422
  "overwrite": "safe"
418
423
  },
424
+ {
425
+ "path": ".claude/commands/wf-ui.md",
426
+ "kind": "command",
427
+ "overwrite": "safe"
428
+ },
419
429
  {
420
430
  "path": ".claude/commands/wf-update.md",
421
431
  "kind": "command",
@@ -516,6 +526,11 @@
516
526
  "kind": "skill",
517
527
  "overwrite": "safe"
518
528
  },
529
+ {
530
+ "path": ".claude/skills/wf-ui/SKILL.md",
531
+ "kind": "skill",
532
+ "overwrite": "safe"
533
+ },
519
534
  {
520
535
  "path": ".claude/skills/wf-update/SKILL.md",
521
536
  "kind": "skill",
@@ -696,6 +711,11 @@
696
711
  "kind": "command",
697
712
  "overwrite": "safe"
698
713
  },
714
+ {
715
+ "path": ".opencode/commands/wf-ui.md",
716
+ "kind": "command",
717
+ "overwrite": "safe"
718
+ },
699
719
  {
700
720
  "path": ".opencode/commands/wf-update.md",
701
721
  "kind": "command",
@@ -711,6 +731,21 @@
711
731
  "kind": "config",
712
732
  "overwrite": "safe"
713
733
  },
734
+ {
735
+ "path": "Harness/a2a/role-graph.json",
736
+ "kind": "config",
737
+ "overwrite": "safe"
738
+ },
739
+ {
740
+ "path": "Harness/a2a/runtime-registry.json",
741
+ "kind": "config",
742
+ "overwrite": "safe"
743
+ },
744
+ {
745
+ "path": "Harness/a2a/skills/terminal-control.json",
746
+ "kind": "config",
747
+ "overwrite": "safe"
748
+ },
714
749
  {
715
750
  "path": "Harness/ownership.manifest.json",
716
751
  "kind": "config",
@@ -721,6 +756,16 @@
721
756
  "kind": "config",
722
757
  "overwrite": "safe"
723
758
  },
759
+ {
760
+ "path": "Harness/scripts/README.md",
761
+ "kind": "script",
762
+ "overwrite": "safe"
763
+ },
764
+ {
765
+ "path": "Harness/scripts/a2a-terminal.mjs",
766
+ "kind": "script",
767
+ "overwrite": "safe"
768
+ },
724
769
  {
725
770
  "path": "Harness/scripts/archive-tasks.mjs",
726
771
  "kind": "script",
@@ -741,6 +786,11 @@
741
786
  "kind": "script",
742
787
  "overwrite": "safe"
743
788
  },
789
+ {
790
+ "path": "Harness/scripts/sync-host-global.mjs",
791
+ "kind": "script",
792
+ "overwrite": "safe"
793
+ },
744
794
  {
745
795
  "path": "Harness/scripts/task-state.mjs",
746
796
  "kind": "script",
@@ -766,6 +816,11 @@
766
816
  "kind": "script",
767
817
  "overwrite": "safe"
768
818
  },
819
+ {
820
+ "path": "Harness/scripts/wf-update-runner.mjs",
821
+ "kind": "script",
822
+ "overwrite": "safe"
823
+ },
769
824
  {
770
825
  "path": "Harness/specs/guides/ECC-GUIDE.md",
771
826
  "kind": "doc",
@@ -0,0 +1,134 @@
1
+ # Harness Scripts
2
+
3
+ Agents: use `task-state.mjs` for all task lifecycle operations. Other scripts are purpose-built tools invoked on demand.
4
+
5
+ ## Task Lifecycle (primary)
6
+
7
+ ### `task-state.mjs`
8
+
9
+ Single entry point for all task capsule operations. Use this for any task CRUD.
10
+
11
+ ```bash
12
+ # Active tasks
13
+ node Harness/scripts/task-state.mjs list [--json]
14
+ node Harness/scripts/task-state.mjs open [--json]
15
+ node Harness/scripts/task-state.mjs validate [--strict] [--json]
16
+ node Harness/scripts/task-state.mjs reconcile [--dry-run|--apply] [--json]
17
+ node Harness/scripts/task-state.mjs set-active <task-id>
18
+ node Harness/scripts/task-state.mjs transition <task-id> --status <s> --phase <p>
19
+
20
+ # Task creation
21
+ node Harness/scripts/task-state.mjs record <task-id> --create --text "goal" [--status <s>] [--dry-run|--apply]
22
+ node Harness/scripts/task-state.mjs record --title "title" --note "note" # auto-generates ID
23
+
24
+ # Archive (moves completed tasks to _archive/YYYY/MM/DD/)
25
+ node Harness/scripts/task-state.mjs archive [--dry-run|--apply] [--keep n] [--task id] [--json]
26
+
27
+ # History (archived task management)
28
+ node Harness/scripts/task-state.mjs history list [--year YYYY] [--month MM] [--json]
29
+ node Harness/scripts/task-state.mjs history search <keyword> [--json]
30
+ node Harness/scripts/task-state.mjs history load <task-id> [--json]
31
+ node Harness/scripts/task-state.mjs history delete <task-id> [--dry-run|--apply] [--json]
32
+ ```
33
+
34
+ **When to use:**
35
+ - `/wf-task-list` calls `task-state.mjs list`
36
+ - `/wf-task-archive` calls `task-state.mjs archive`
37
+ - `/wf-task-record` calls `task-state.mjs record`
38
+ - Resume: check `task-state.mjs open` for blocked/open tasks
39
+ - Closeout: run `task-state.mjs archive --apply` to clean up verified tasks
40
+ - Debug: run `task-state.mjs validate --strict` to check state integrity
41
+ - Research: run `task-state.mjs history search <keyword>` to find past solutions
42
+
43
+ ### `archive-tasks.mjs`
44
+
45
+ Compatibility alias for `task-state.mjs archive`. Delegates all flags.
46
+
47
+ ## Validation
48
+
49
+ ### `validate-harness.mjs`
50
+
51
+ Validates harness structure, task state, file integrity.
52
+
53
+ ```bash
54
+ node Harness/scripts/validate-harness.mjs [--strict] [--json]
55
+ ```
56
+
57
+ **When to use:** pre-commit checks, CI gates, release validation. Strict mode fails on any violation.
58
+
59
+ ## Maintenance
60
+
61
+ ### `wf-remove.mjs`
62
+
63
+ Safely removes the Harness scaffold from a project.
64
+
65
+ ```bash
66
+ node Harness/scripts/wf-remove.mjs [--dry-run|--apply] [--json]
67
+ ```
68
+
69
+ **When to use:** uninstalling Harness, cleaning up test installs. Always dry-run first.
70
+
71
+ ### `wf-update-check.mjs`
72
+
73
+ Checks if a newer Harness version is available.
74
+
75
+ ```bash
76
+ node Harness/scripts/wf-update-check.mjs [--json]
77
+ ```
78
+
79
+ **When to use:** `/wf-update` command, periodic drift detection.
80
+
81
+ ### `wf-auto-update-prompt.mjs`
82
+
83
+ Generates context-aware update prompts for WF-AUTO cycles.
84
+
85
+ ```bash
86
+ node Harness/scripts/wf-auto-update-prompt.mjs
87
+ ```
88
+
89
+ **When to use:** internally by WF-AUTO/WF-AUTO-SPARK cycles. Not invoked directly.
90
+
91
+ ### `scan-clean.mjs`
92
+
93
+ Scans and cleans stale artifacts, temp files, orphaned references.
94
+
95
+ ```bash
96
+ node Harness/scripts/scan-clean.mjs [--dry-run|--apply] [--json]
97
+ ```
98
+
99
+ **When to use:** before releases, after large refactors, periodic housekeeping.
100
+
101
+ ## Telemetry
102
+
103
+ ### `l2-cache-telemetry.mjs`
104
+
105
+ Measures prompt-cache hit rates across CLI runtimes (Claude Code, Codex, OpenCode).
106
+
107
+ ```bash
108
+ node Harness/scripts/l2-cache-telemetry.mjs --groups <g1>,<g2> --turns <n> [--json]
109
+ ```
110
+
111
+ **When to use:** benchmarking cache performance, tuning context loading, regression detection.
112
+
113
+ ### `context-budget.mjs`
114
+
115
+ Estimates context budget usage for a given task or workflow tier.
116
+
117
+ ```bash
118
+ node Harness/scripts/context-budget.mjs [--tier wf-light|wf-standard|wf-full|wf-max]
119
+ ```
120
+
121
+ **When to use:** before large workflows, capacity planning, timeout risk assessment.
122
+
123
+ ## Agent Quick Reference
124
+
125
+ | Goal | Command |
126
+ |------|---------|
127
+ | List active tasks + graph | `node Harness/scripts/task-state.mjs list` |
128
+ | Find blocked tasks | `node Harness/scripts/task-state.mjs open --json` |
129
+ | Create new task | `node Harness/scripts/task-state.mjs record --title "..." --note "..." --apply` |
130
+ | Archive completed tasks | `node Harness/scripts/task-state.mjs archive --apply` |
131
+ | Search history for "timeout" | `node Harness/scripts/task-state.mjs history search timeout --json` |
132
+ | Load old task full record | `node Harness/scripts/task-state.mjs history load <task-id> --json` |
133
+ | Validate state integrity | `node Harness/scripts/validate-harness.mjs --strict` |
134
+ | Pre-release cleanup | `node Harness/scripts/scan-clean.mjs --dry-run` |