create-harness-vibe-coding 0.8.7 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-CN.md +157 -105
- package/README.md +160 -244
- package/bin/create-harness-vibe-coding.js +2 -2
- package/docs/images/harness-architecture-light.png +0 -0
- package/docs/images/harness-architecture.drawio +164 -0
- package/package.json +46 -44
- package/src/generator.js +5 -5
- package/src/index.js +14 -9
- package/src/prompts.js +37 -37
- package/templates/common/.claude/agents/architect-manager.md +45 -45
- package/templates/common/.claude/agents/context-master.md +75 -75
- package/templates/common/.claude/agents/debugger.md +41 -41
- package/templates/common/.claude/agents/explore-manager.md +41 -41
- package/templates/common/.claude/agents/implement-manager.md +49 -49
- package/templates/common/.claude/agents/implementer.md +40 -40
- package/templates/common/.claude/agents/memory-master.md +64 -64
- package/templates/common/.claude/agents/planner.md +34 -34
- package/templates/common/.claude/agents/researcher.md +41 -41
- package/templates/common/.claude/agents/review-manager.md +56 -56
- package/templates/common/.claude/agents/verifier.md +29 -29
- package/templates/common/.claude/commands/wf-help.md +1 -1
- package/templates/common/.claude/rules/ecc/common.md +44 -44
- package/templates/common/.claude/skills/wf-auto/SKILL.md +8 -6
- package/templates/common/.claude/skills/wf-readme/SKILL.md +49 -49
- package/templates/common/.claude/skills/wf-remove/SKILL.md +7 -7
- package/templates/common/.harness-version +54 -14
- package/templates/common/.opencode/agents/architect-manager.md +52 -0
- package/templates/common/.opencode/agents/architect.md +35 -0
- package/templates/common/.opencode/agents/context-master.md +81 -0
- package/templates/common/.opencode/agents/debugger.md +43 -0
- package/templates/common/.opencode/agents/docs-researcher.md +42 -0
- package/templates/common/.opencode/agents/explore-manager.md +49 -0
- package/templates/common/.opencode/agents/implement-manager.md +56 -0
- package/templates/common/.opencode/agents/implementer.md +42 -0
- package/templates/common/.opencode/agents/memory-master.md +70 -0
- package/templates/common/.opencode/agents/planner.md +38 -0
- package/templates/common/.opencode/agents/reflector.md +39 -0
- package/templates/common/.opencode/agents/researcher.md +42 -0
- package/templates/common/.opencode/agents/review-manager.md +63 -0
- package/templates/common/.opencode/agents/reviewer.md +37 -0
- package/templates/common/.opencode/agents/tdd-guide.md +83 -0
- package/templates/common/.opencode/agents/test-writer.md +54 -0
- package/templates/common/.opencode/agents/verifier.md +37 -0
- package/templates/common/.opencode/commands/wf-help.md +23 -0
- package/templates/common/CLAUDE.md +85 -88
- package/templates/common/Harness/PROGRESS.md +17 -17
- package/templates/common/Harness/README.md +16 -5
- package/templates/common/Harness/WF-AUTO-ANGLES.md +170 -0
- package/templates/common/Harness/WF-AUTO-SPARK.md +5 -5
- package/templates/common/Harness/WF-AUTO.md +85 -96
- package/templates/common/Harness/architecture.md +124 -124
- package/templates/common/Harness/context-loading.md +111 -111
- package/templates/common/Harness/extension.md +66 -66
- package/templates/common/Harness/lifecycle.md +20 -20
- package/templates/common/Harness/research/PRD.md +56 -56
- package/templates/common/Harness/research/README.md +169 -169
- package/templates/common/Harness/research/research-results.md +66 -66
- package/templates/common/Harness/subagents.md +208 -208
- package/templates/common/Harness/tasks/_template/ARTIFACTS.md +2 -2
- package/templates/common/Harness/tasks/_template/NOTES.md +2 -2
- package/templates/common/MEMORY.md +1 -1
- package/templates/common/README.md +36 -36
- package/templates/common/memory/agent-lessons-patterns.md +21 -21
- package/templates/common/memory/tool-usage-reflections.md +21 -21
- package/templates/common/memory/user-corrections-preferences.md +21 -21
- package/templates/common/opencode.json +19 -0
- package/templates/common/scripts/scan-clean.mjs +415 -415
- package/templates/common/scripts/validate-harness.mjs +274 -245
- package/templates/common/scripts/wf-remove.mjs +56 -39
- package/templates/common/scripts/wf-update-check.mjs +599 -599
- package/templates/optional/catalog.json +41 -33
- package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +193 -193
- package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +48 -48
- package/templates/optional/skills/github-pr-review/Harness/workflows/github-pr-review.md +28 -28
- package/templates/optional/skills/python-backend/Harness/workflows/python-backend.md +34 -34
- package/templates/optional/skills/ts-react-frontend/Harness/workflows/ts-react-frontend.md +34 -34
- package/templates/optional/skills/ui-ux-review/Harness/workflows/ui-ux-review.md +26 -26
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Use to run verification commands, inspect results, and record evidence. Final acceptance still waits for cross-review PASS and reflector PASS.
|
|
3
|
+
mode: subagent
|
|
4
|
+
permission:
|
|
5
|
+
edit: deny
|
|
6
|
+
task: deny
|
|
7
|
+
websearch: deny
|
|
8
|
+
webfetch: deny
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Verifier
|
|
12
|
+
|
|
13
|
+
You are a verification agent for this project harness.
|
|
14
|
+
|
|
15
|
+
Load first:
|
|
16
|
+
|
|
17
|
+
- `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
|
|
18
|
+
- current feature doc when present
|
|
19
|
+
- verification commands and acceptance criteria
|
|
20
|
+
|
|
21
|
+
Rules:
|
|
22
|
+
|
|
23
|
+
- Do not write code.
|
|
24
|
+
- Run only declared verification commands unless asked to expand coverage.
|
|
25
|
+
- If a command is unavailable, record why and suggest a manual check.
|
|
26
|
+
- Mark results as pass, fail, or not run with notes.
|
|
27
|
+
- Do not mark work verified without evidence.
|
|
28
|
+
- Do not claim final acceptance. Verification evidence is necessary but final
|
|
29
|
+
acceptance waits for cross-review PASS and reflector PASS.
|
|
30
|
+
|
|
31
|
+
Return:
|
|
32
|
+
|
|
33
|
+
- commands run
|
|
34
|
+
- result per command
|
|
35
|
+
- acceptance criteria status
|
|
36
|
+
- residual risk
|
|
37
|
+
- patch-ready verification update for `PLAN.md` or feature doc
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show the Harness WF command table
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Return this help table directly. Do not invoke a skill, do not start WF mode,
|
|
6
|
+
do not dispatch agents, and do not edit files.
|
|
7
|
+
|
|
8
|
+
| Command | Type | Usage | Purpose |
|
|
9
|
+
| --- | --- | --- | --- |
|
|
10
|
+
| `/wf-help` | direct command | `/wf-help` | Show this command table. |
|
|
11
|
+
| `/wf <task>` | workflow skill | `/wf fix failing login flow` | Standard acceptance-driven workflow for long, uncertain, multi-file, browser/API, or recovery work. |
|
|
12
|
+
| `/wf-max <task>` | workflow skill | `/wf-max refactor auth module` | WF strict superset: complete role chain plus maximum fan-out, CEO -> Manager -> Worker dispatch, cross-CLI overflow when the current runtime agent pool is exhausted. |
|
|
13
|
+
| `/wf-auto` | workflow skill | `/wf-auto` | Perpetual auto-optimization loop using bounded cycles, 8-angle exhaustion, evidence ledger, and optional wf-auto-only tick hook. |
|
|
14
|
+
| `/wf-auto-spark` | workflow skill | `/wf-auto-spark` | Perpetual inspiration mode with roadmap anchoring and external spark search. |
|
|
15
|
+
| `/wf-review <focus>` | workflow skill | `/wf-review security and test coverage` | Cross-model peer review through the other CLI; use for second opinions and risk checks. |
|
|
16
|
+
| `/wf-learn` | workflow skill | `/wf-learn` | Force context-master -> memory-master learning cycle after repeated failures or closeout. |
|
|
17
|
+
| `/wf-readme <task>` | workflow skill | `/wf-readme polish quickstart` | Preserve, merge, or improve README docs without trampling existing project documentation. |
|
|
18
|
+
| `/wf-update` | workflow skill | `/wf-update` | Check/apply Harness scaffold updates with safe file classification and conflict handling. |
|
|
19
|
+
| `/wf-remove` | workflow skill | `/wf-remove` | Safely remove Harness files while preserving project/user data unless explicitly purged. |
|
|
20
|
+
|
|
21
|
+
Source of truth: `Harness/README.md#Skill Commands` plus installed skills under
|
|
22
|
+
`.claude/skills/` (Claude Code) or `.agents/skills/` (Codex). In OpenCode the
|
|
23
|
+
same skills load from `.claude/skills/`, `.agents/skills/`, and `.opencode/skills/`.
|
|
@@ -1,89 +1,86 @@
|
|
|
1
|
-
# CLAUDE.md
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- You must have **>=95% confidence** in user intent before writing implementation code.
|
|
38
|
-
- If confidence is below 95%, stop and ask up to 3 blocking questions.
|
|
39
|
-
- If multiple valid approaches exist and the choice affects architecture, scope, stack, or user-facing behavior, present trade-offs instead of picking silently.
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
## 1. Harness Binding & Startup
|
|
4
|
+
|
|
5
|
+
If `Harness/` exists, this repository is governed by the Harness contract.
|
|
6
|
+
|
|
7
|
+
Use **direct mode** for simple, single-step, low-risk requests: commit, push, one-line fix, file read, code question, git log, git status, or similar small operations.
|
|
8
|
+
|
|
9
|
+
In direct mode, do not load the full Harness router. Inspect only the files needed for the task and execute directly.
|
|
10
|
+
|
|
11
|
+
Use **workflow mode** when the user explicitly invokes a `/wf-*` command, or when the task is multi-step, ambiguous, risky, architectural, cross-file, or requires coordination.
|
|
12
|
+
|
|
13
|
+
In workflow mode, load `Harness/MEMORY.md` first, then `Harness/README.md`.
|
|
14
|
+
|
|
15
|
+
If `Harness/SETUP.md` exists, follow it before normal project work; it is the install/bootstrap contract and may be deleted after setup is complete.
|
|
16
|
+
|
|
17
|
+
### 1a. WF-MAX Role Contract
|
|
18
|
+
|
|
19
|
+
This section is active only when `/wf-max` is invoked.
|
|
20
|
+
|
|
21
|
+
In `/wf-max`, the top-level agent is the **CEO**. The CEO owns task framing, decomposition, dispatch, review coordination, and task evidence.
|
|
22
|
+
|
|
23
|
+
The CEO must not edit source files directly. Source edits must be delegated to Workers through dispatch packets with explicit boundaries.
|
|
24
|
+
|
|
25
|
+
Each Worker dispatch must define: role, objective, allowed writeSet, forbidden files/actions, required verification, and expected return evidence.
|
|
26
|
+
|
|
27
|
+
Workers may edit only inside their assigned writeSet. Reviewers and verifiers must be independent from the Worker whose output they evaluate.
|
|
28
|
+
|
|
29
|
+
Detailed WF-MAX role rules live in `Harness/WF-MAX.md` and `Harness/subagents.md`.
|
|
30
|
+
|
|
31
|
+
## 2. Think Before Coding
|
|
32
|
+
|
|
33
|
+
- You must have **>=95% confidence** in user intent before writing implementation code.
|
|
34
|
+
- If confidence is below 95%, stop and ask up to 3 blocking questions.
|
|
35
|
+
- If multiple valid approaches exist and the choice affects architecture, scope, stack, or user-facing behavior, present trade-offs instead of picking silently.
|
|
40
36
|
- State assumptions before implementation and record only durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
|
|
41
|
-
- If something is unclear, stop. Name what is unclear and ask instead of guessing.
|
|
42
|
-
- Before asserting a fact about the codebase, read the file that proves it. If you cannot cite the file and line, do not assert.
|
|
43
|
-
|
|
44
|
-
## 3. Simplicity First
|
|
45
|
-
|
|
46
|
-
- No features beyond what was asked.
|
|
47
|
-
- No abstractions for single-use code.
|
|
48
|
-
- No unrequested flexibility, configurability, or speculative error handling.
|
|
49
|
-
- Use explicit interfaces or state models only when they protect a real boundary, clarify ownership, or make verification/recovery simpler.
|
|
50
|
-
- If a simpler approach exists, say so and prefer the smallest change that satisfies the request.
|
|
51
|
-
- If the solution is growing faster than the problem, reduce scope before coding more.
|
|
52
|
-
|
|
53
|
-
## 4. Surgical Changes
|
|
54
|
-
|
|
55
|
-
- Touch only files and lines required by the task.
|
|
56
|
-
- Do not improve adjacent code, comments, formatting, or architecture unless it is required for the task.
|
|
57
|
-
- Match existing style even when you would choose a different style in a new project.
|
|
58
|
-
- Clean up imports, variables, functions, and files made unused by your own changes; do not delete pre-existing dead code unless asked.
|
|
59
|
-
- Keep every changed line traceable to the user's request.
|
|
60
|
-
|
|
61
|
-
## 5. Goal-Driven Execution
|
|
62
|
-
|
|
63
|
-
- Define verifiable success criteria before implementation.
|
|
64
|
-
- For bugs, reproduce the failure or document why reproduction is impossible before fixing.
|
|
65
|
-
- For multi-step work, keep `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` current. The main agent is the only state committer; subagents return suggestions only.
|
|
66
|
-
- State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
|
|
67
|
-
- Every task needs a test, build check, validator run, or recorded manual check.
|
|
68
|
-
- Do not claim web/UI acceptance without real-browser evidence from Chrome DevTools, CDP, Playwright, or documented manual browser checks.
|
|
69
|
-
- Do not place project build scripts, git conventions, run commands, or release process in this file. Put them in `README.md`.
|
|
70
|
-
- Do not place code architecture here. Put architecture in `Harness/architecture.md` or the current feature doc.
|
|
71
|
-
- If this file has accumulated unrelated project notes, pause and propose moving them to the right place: `README.md` for development operations, `Harness/architecture.md` for architecture, `Harness/WF.md` or `Harness/workflows/` for workflow rules.
|
|
72
|
-
|
|
73
|
-
## 6. Memory & Self-Learning
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
|
|
37
|
+
- If something is unclear, stop. Name what is unclear and ask instead of guessing.
|
|
38
|
+
- Before asserting a fact about the codebase, read the file that proves it. If you cannot cite the file and line, do not assert.
|
|
39
|
+
|
|
40
|
+
## 3. Simplicity First
|
|
41
|
+
|
|
42
|
+
- No features beyond what was asked.
|
|
43
|
+
- No abstractions for single-use code.
|
|
44
|
+
- No unrequested flexibility, configurability, or speculative error handling.
|
|
45
|
+
- Use explicit interfaces or state models only when they protect a real boundary, clarify ownership, or make verification/recovery simpler.
|
|
46
|
+
- If a simpler approach exists, say so and prefer the smallest change that satisfies the request.
|
|
47
|
+
- If the solution is growing faster than the problem, reduce scope before coding more.
|
|
48
|
+
|
|
49
|
+
## 4. Surgical Changes
|
|
50
|
+
|
|
51
|
+
- Touch only files and lines required by the task.
|
|
52
|
+
- Do not improve adjacent code, comments, formatting, or architecture unless it is required for the task.
|
|
53
|
+
- Match existing style even when you would choose a different style in a new project.
|
|
54
|
+
- Clean up imports, variables, functions, and files made unused by your own changes; do not delete pre-existing dead code unless asked.
|
|
55
|
+
- Keep every changed line traceable to the user's request.
|
|
56
|
+
|
|
57
|
+
## 5. Goal-Driven Execution
|
|
58
|
+
|
|
59
|
+
- Define verifiable success criteria before implementation.
|
|
60
|
+
- For bugs, reproduce the failure or document why reproduction is impossible before fixing.
|
|
61
|
+
- For multi-step work, keep `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` current. The main agent is the only state committer; subagents return suggestions only.
|
|
62
|
+
- State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
|
|
63
|
+
- Every task needs a test, build check, validator run, or recorded manual check.
|
|
64
|
+
- Do not claim web/UI acceptance without real-browser evidence from Chrome DevTools, CDP, Playwright, or documented manual browser checks.
|
|
65
|
+
- Do not place project build scripts, git conventions, run commands, or release process in this file. Put them in `README.md`.
|
|
66
|
+
- Do not place code architecture here. Put architecture in `Harness/architecture.md` or the current feature doc.
|
|
67
|
+
- If this file has accumulated unrelated project notes, pause and propose moving them to the right place: `README.md` for development operations, `Harness/architecture.md` for architecture, `Harness/WF.md` or `Harness/workflows/` for workflow rules.
|
|
68
|
+
|
|
69
|
+
## 6. Memory & Self-Learning
|
|
70
|
+
|
|
71
|
+
`Harness/MEMORY.md` is the memory and resource router. Detailed durable memory lives under `Harness/memory/`.
|
|
72
|
+
|
|
73
|
+
Do not write memory directly unless the selected workflow allows it. For workflow closeout, use the registered context and memory workflow to extract durable lessons, decisions, corrections, and reusable patterns.
|
|
74
|
+
|
|
75
|
+
Keep memory compact, durable, and reusable. Do not record transient logs, raw command output, speculative notes, or information that belongs in task-local PLAN.md / PROGRESS.md.
|
|
76
|
+
|
|
77
|
+
Never record secrets, credentials, tokens, or private data in memory.
|
|
78
|
+
|
|
79
|
+
## 7. Mode Constraints
|
|
80
|
+
|
|
81
|
+
- Never call `EnterPlanMode`. Delegate planning to `planner` subagents (see `Harness/WF.md`).
|
|
82
|
+
- In `/wf` or `/wf-max`, follow the selected workflow role contract instead of improvising execution flow.
|
|
83
|
+
- In `/wf-max`, the CEO must not edit source files directly. Implementation must be delegated to Workers with explicit writeSet boundaries.
|
|
84
|
+
- If a Worker dispatch is missing role, objective, writeSet, forbidden scope, or verification requirements, the controller must not proceed with source edits.
|
|
85
|
+
|
|
86
|
+
Keep CLAUDE.md as a thin routing and global-behavior file. Put detailed workflows in `Harness/WF.md` or `Harness/workflows/`, subagent rules in `Harness/subagents.md`, architecture in `Harness/architecture.md`, and project operations in `README.md`.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# PROGRESS.md
|
|
2
|
-
|
|
3
|
-
Global task index. Load at session start to see what is active and what was done.
|
|
4
|
-
|
|
5
|
-
## Active Task
|
|
6
|
-
|
|
7
|
-
None — create a new task from `Harness/tasks/_template/` when work spans more than one step.
|
|
8
|
-
|
|
9
|
-
## Task Index
|
|
10
|
-
|
|
11
|
-
| ID | Goal | Phase | Closed |
|
|
12
|
-
|----|------|-------|--------|
|
|
13
|
-
|
|
14
|
-
## Cross-Task Decisions
|
|
15
|
-
|
|
16
|
-
| Date | Decision | Reason |
|
|
17
|
-
|------|----------|--------|
|
|
1
|
+
# PROGRESS.md
|
|
2
|
+
|
|
3
|
+
Global task index. Load at session start to see what is active and what was done.
|
|
4
|
+
|
|
5
|
+
## Active Task
|
|
6
|
+
|
|
7
|
+
None — create a new task from `Harness/tasks/_template/` when work spans more than one step.
|
|
8
|
+
|
|
9
|
+
## Task Index
|
|
10
|
+
|
|
11
|
+
| ID | Goal | Phase | Closed |
|
|
12
|
+
|----|------|-------|--------|
|
|
13
|
+
|
|
14
|
+
## Cross-Task Decisions
|
|
15
|
+
|
|
16
|
+
| Date | Decision | Reason |
|
|
17
|
+
|------|----------|--------|
|
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Purpose: route humans and agents to the smallest useful context. `Harness/README.md` is the primary router.
|
|
4
4
|
|
|
5
|
-
Default load: `CLAUDE.md
|
|
5
|
+
Default load: `CLAUDE.md`. When the task is complex or a `/wf-*` command is invoked, also load `Harness/MEMORY.md`, this file, and `Harness/PROGRESS.md` when work is active. Do not read the whole `Harness/` tree.
|
|
6
|
+
|
|
7
|
+
## Direct Mode (Degradation Path)
|
|
8
|
+
|
|
9
|
+
When the user does NOT invoke `/wf-*` and the request is simple, single-step, and low-risk — commit, push, one-line fix, read file, code question, git log, status check — operate in **direct mode**. Skip the router entirely. Execute the task. Do not load `Harness/MEMORY.md`, `Harness/README.md`, or `Harness/PROGRESS.md`.
|
|
10
|
+
|
|
11
|
+
Escalate to the router (next section) only when:
|
|
12
|
+
- User explicitly invokes `/wf-*`, `$wf-*`, `wf mode`, `workflow mode`, or `wk mode`
|
|
13
|
+
- Task is multi-step, ambiguous, high-risk, or touches many files
|
|
14
|
+
- Task involves subagent orchestration, architecture changes, or cross-cutting concerns
|
|
15
|
+
- You've failed the same operation twice and need structured recovery
|
|
6
16
|
|
|
7
17
|
## 0-1 Flow
|
|
8
18
|
|
|
@@ -55,17 +65,18 @@ Keywords are retrieval hints, not project facts.
|
|
|
55
65
|
|
|
56
66
|
Load the matching row only. Add adjacent docs only when the loaded doc directly names them.
|
|
57
67
|
|
|
58
|
-
Routing priority:
|
|
68
|
+
Routing priority: **direct mode is the default** when no `/wf-*` command is present and the task is simple. If a request explicitly says `/wf <task>`, `$wf`, `wf mode`, `workflow mode`, or `wk mode`, or is long, difficult, uncertain, repeated-failure, migration, architecture-heavy, browser-visible, or broad multi-agent implementation work, choose the WF row first. Load `Harness/WF.md` directly, then delegate subagent coordination to `subagent-orchestrator`. If the request says `/wf-auto`, `$wf-auto`, `wf auto`, or `auto mode`, choose the WF-AUTO row and load `Harness/WF-AUTO.md`.
|
|
59
69
|
|
|
60
70
|
| When to Read | Keywords | Load | Output |
|
|
61
71
|
| --- | --- | --- | --- |
|
|
72
|
+
| **Direct mode (default)** | simple, single-step, low-risk, commit, push, one-line, read, question, status, no /wf-* command | Nothing beyond CLAUDE.md | Direct execution; no router load |
|
|
62
73
|
| Raw idea or vague product request | idea, vague, clarify, goal, non-goal, lifecycle | [lifecycle.md](lifecycle.md), [research/PRD.md](research/PRD.md) | clarified goal, non-goals, first questions |
|
|
63
74
|
| Need market/tech direction | research, market, competitor, stack, library, pricing, policy | [research/README.md](research/README.md), [research/research-results.md](research/research-results.md) | research protocol, adopted/rejected choices |
|
|
64
75
|
| Need MVP/spec | PRD, MVP, scope, requirement, acceptance, non-goal | [research/PRD.md](research/PRD.md), [ACCEPTANCE_PROTOCOL.md](ACCEPTANCE_PROTOCOL.md) | Mini PRD with AC IDs and verifiable acceptance criteria |
|
|
65
76
|
| Need architecture or boundaries | architecture, boundary, layer, port, adapter, dependency | [architecture.md](architecture.md) | layer map, ports, constraints |
|
|
66
77
|
| Need WF command help | /wf-help, wf help, command list, list wf commands | `.claude/commands/wf-help.md` | direct command table; no skill invocation |
|
|
67
78
|
| Need WF mode | wf, /wf, $wf, wf mode, workflow mode, wk mode, long task, difficult, stuck, repeated failure | [WF.md](WF.md), [PROGRESS.md](PROGRESS.md), the current task `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md` | complete role chain, heartbeat, recovery loop; explicit WF/WK loads subagent docs immediately |
|
|
68
|
-
| Need perpetual auto-optimization | /wf-auto, $wf-auto, wf auto, auto mode, never stop, self-improve, continuous optimize | [WF-AUTO.md](WF-AUTO.md), [subagents.md](subagents.md), [dispatch.md](dispatch.md) | perpetual loop,
|
|
79
|
+
| Need perpetual auto-optimization | /wf-auto, $wf-auto, wf auto, auto mode, never stop, self-improve, continuous optimize | [WF-AUTO.md](WF-AUTO.md), [WF-AUTO-ANGLES.md](WF-AUTO-ANGLES.md), [subagents.md](subagents.md), [dispatch.md](dispatch.md) | perpetual loop, adaptive probe selection, dynamic risk obligations, spark search, intent checkpoint, evidence ledger; CEO never writes code |
|
|
69
80
|
| Need perpetual inspiration mode | /wf-auto-spark, $wf-auto-spark, wf auto spark, spark mode, external inspiration, discover mode, never stop | [WF-AUTO-SPARK.md](WF-AUTO-SPARK.md), [WF-AUTO.md](WF-AUTO.md), [subagents.md](subagents.md), [dispatch.md](dispatch.md) | roadmap-anchored: North Star + milestones; external spark search; <=50% deviation guard; never auto-stops |
|
|
70
81
|
| Need WF-MAX mode | /wf-max, $wf-max, wf max, maximum parallelism, CEO, Manager, Worker, fan-out | [WF-MAX.md](WF-MAX.md), [subagents.md](subagents.md), [dispatch.md](dispatch.md) | WF strict superset: complete role chain plus maximum fan-out, current runtime subagents first, cross-CLI overflow when available |
|
|
71
82
|
| 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` | cross-model multi-dimension review with severity classification |
|
|
@@ -85,7 +96,7 @@ Routing priority: if a request explicitly says `/wf <task>`, `$wf`, `wf mode`, `
|
|
|
85
96
|
|
|
86
97
|
- Move phases in order unless the user asks for a fast lane.
|
|
87
98
|
- Use `/wf <task>` in Claude Code, `$wf` in Codex, `/wf-max [task]` or `$wf-max`, `wf mode`, `workflow mode`, or `wk mode` when a task is long, difficult, uncertain, multi-file, or repeatedly failing.
|
|
88
|
-
- Use `/wf-auto` for perpetual self-directed optimization
|
|
99
|
+
- Use `/wf-auto` for perpetual self-directed optimization. It selects probes from project evidence and stops only after dynamic risk obligations and two different empty confirmation passes are recorded.
|
|
89
100
|
- **WF-MAX Role Contract**: Three-layer architecture: global mode (`wf-max`), agent role (`ceo|manager|worker|verifier|reviewer|reflector`), dispatch permission (`writeSet`, `forbidden`, `verification`). CEO never writes source code. Workers edit only dispatch.writeSet. Compliance is checked through dispatch packets, independent review, validation evidence, and task capsules. See `CLAUDE.md#1a`.
|
|
90
101
|
- **WF-REVIEW Anti-Self-Review**: Must invoke the OTHER CLI (Codex -> Claude, or Claude -> Codex). Same-model simulation is forbidden.
|
|
91
102
|
- WF-MAX has no runtime hook state. The durable state is the task capsule, dispatch table, review findings, and validation evidence. The only runtime hook exception in Harness is the optional `/wf-auto` bounded tick hook described in `WF-AUTO.md`.
|
|
@@ -136,7 +147,7 @@ Routing priority: if a request explicitly says `/wf <task>`, `$wf`, `wf mode`, `
|
|
|
136
147
|
|---|---|---|
|
|
137
148
|
| `/wf <task>` | `$wf <task>` | Complete role chain: plan, research/docs, architecture, test, implement, validation, cross-review, reflector, acceptance |
|
|
138
149
|
| `/wf-max [task]` | `$wf-max [task]` | WF strict superset with maximum parallelism: CEO -> Manager -> Worker, cross-CLI overflow |
|
|
139
|
-
| `/wf-auto` | `$wf-auto` | Perpetual auto-optimization:
|
|
150
|
+
| `/wf-auto` | `$wf-auto` | Perpetual adaptive auto-optimization: dynamic probes, risk obligations, evidence-based exhaustion |
|
|
140
151
|
| `/wf-auto-spark` | `$wf-auto-spark` | Perpetual inspiration: spark search, roadmap-anchored, <=50% deviation guard, never auto-stops |
|
|
141
152
|
| `/wf-review [focus]` | `$wf-review [focus]` | Cross-model peer review via Codex <-> Claude |
|
|
142
153
|
| `/wf-learn` | `$wf-learn` | Force learning cycle: context-master -> memory-master |
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# WF-AUTO Adaptive Coverage Protocol
|
|
2
|
+
|
|
3
|
+
`wf-auto` does not need a permanent number of angles. It needs enough
|
|
4
|
+
independent evidence to discover a valuable next change without repeatedly
|
|
5
|
+
scanning irrelevant surfaces.
|
|
6
|
+
|
|
7
|
+
## Design goals
|
|
8
|
+
|
|
9
|
+
- Select probes from evidence, not from a fixed checklist.
|
|
10
|
+
- Keep safety and user intent visible in every cycle.
|
|
11
|
+
- Spend more context on risky or recently changed areas.
|
|
12
|
+
- Record skipped probes and the reason they were skipped.
|
|
13
|
+
- Stop only after the relevant coverage obligations are satisfied and two
|
|
14
|
+
different confirmation passes produce no actionable finding.
|
|
15
|
+
|
|
16
|
+
## Probe catalog
|
|
17
|
+
|
|
18
|
+
The catalog is extensible. These are probe families, not mandatory agents:
|
|
19
|
+
|
|
20
|
+
| Probe | Primary question | Trigger signals |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| Goal / value | Is this change still moving the project toward the user's outcome? | user goal, roadmap, product behavior, repeated scope drift |
|
|
23
|
+
| Context / memory quality | Does the agent receive the right context at the right time without noise or loss? | long tasks, repeated rediscovery, oversized prompts, stale memory |
|
|
24
|
+
| Correctness / safety | Can the change be wrong, destructive, or inconsistent? | changed logic, state transitions, file writes, data mutations |
|
|
25
|
+
| Security / privacy | Can an attacker or accidental disclosure exploit this path? | auth, permissions, input, secrets, network, personal data |
|
|
26
|
+
| Reliability / recovery | What happens on timeout, interruption, retry, partial failure, or restart? | external calls, queues, persistence, background work, flaky tests |
|
|
27
|
+
| Performance / cost | Is time, memory, token, I/O, or bundle cost becoming material? | hot paths, large data, repeated scans, slow tests, cost evidence |
|
|
28
|
+
| Architecture / changeability | Will this make the next change harder or violate boundaries? | new dependency, cross-layer edit, duplicated state, large diff |
|
|
29
|
+
| Test / verification | Is the claimed behavior actually checked with the right evidence? | new behavior, changed acceptance criteria, weak or missing tests |
|
|
30
|
+
| Evaluation / outcome quality | Can we tell whether the agent or product actually improved? | AI behavior, subjective output, benchmark drift, vague success claims |
|
|
31
|
+
| Maintainability | Will a future maintainer understand and safely change this? | duplication, dead code, naming, stale comments, complex functions |
|
|
32
|
+
| UX / DX / observability | Can a user or developer understand, operate, and diagnose it? | CLI/API changes, errors, docs, logs, metrics, browser-visible flow |
|
|
33
|
+
| Dependency / ecosystem | Is an external assumption stale, unsafe, or unnecessarily costly? | package changes, deprecations, API version changes, external research |
|
|
34
|
+
|
|
35
|
+
Add a probe when the project domain requires it. Do not force every project to
|
|
36
|
+
run every probe.
|
|
37
|
+
|
|
38
|
+
## Selection algorithm
|
|
39
|
+
|
|
40
|
+
At the start of every W0 cycle, the CEO builds a project profile from the
|
|
41
|
+
repository, task capsule, recent diff, failures, and user direction. For each
|
|
42
|
+
candidate probe, score these signals from 0 to 5:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
priority =
|
|
46
|
+
0.30 * risk
|
|
47
|
+
+ 0.25 * changeRelevance
|
|
48
|
+
+ 0.20 * evidenceGap
|
|
49
|
+
+ 0.15 * expectedUserValue
|
|
50
|
+
+ 0.10 * novelty
|
|
51
|
+
- 0.10 * scanCost
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The score is a ranking aid, not a claim of mathematical precision. The CEO
|
|
55
|
+
must record the evidence behind the top scores.
|
|
56
|
+
|
|
57
|
+
Select probes until one of these conditions is met:
|
|
58
|
+
|
|
59
|
+
1. all high-risk obligations are covered;
|
|
60
|
+
2. the next probe's expected value is below the scan-cost threshold;
|
|
61
|
+
3. the cycle context budget is spent; or
|
|
62
|
+
4. the selected probes have overlapping scope and the next one adds no new
|
|
63
|
+
coverage.
|
|
64
|
+
|
|
65
|
+
Every cycle includes the two guardrails **Goal / value** and
|
|
66
|
+
**Correctness / safety**, unless the CEO records why a project has no relevant
|
|
67
|
+
user outcome or executable behavior. Other probes are conditional. A normal
|
|
68
|
+
low-risk cycle may use only a few probes; a dependency, security, data, or
|
|
69
|
+
production incident cycle should select more.
|
|
70
|
+
|
|
71
|
+
## Dynamic obligations
|
|
72
|
+
|
|
73
|
+
The project profile creates obligations instead of a fixed angle count:
|
|
74
|
+
|
|
75
|
+
| Evidence in the project | Required probe families |
|
|
76
|
+
|---|---|
|
|
77
|
+
| Auth, permissions, secrets, personal data | Security / privacy + Correctness / safety |
|
|
78
|
+
| Database, queue, filesystem, network, background jobs | Reliability / recovery + Correctness / safety |
|
|
79
|
+
| Public API, CLI, SDK, schema, or config contract | Goal / value + Test / verification + UX / DX |
|
|
80
|
+
| Hot path, large data, slow suite, cost complaint | Performance / cost + Test / verification |
|
|
81
|
+
| Cross-layer or dependency-boundary change | Architecture / changeability + Correctness / safety |
|
|
82
|
+
| Browser-visible behavior | UX / DX / observability + Test / verification + real browser evidence |
|
|
83
|
+
| Documentation-only change | Goal / value + UX / DX / observability; skip code probes unless triggered |
|
|
84
|
+
|
|
85
|
+
If multiple rows match, merge their obligations and deduplicate overlapping
|
|
86
|
+
probes. A skipped obligation must have a reason in the cycle ledger.
|
|
87
|
+
|
|
88
|
+
## Common probe recipes
|
|
89
|
+
|
|
90
|
+
These recipes are starting points, not another fixed checklist. Select only the
|
|
91
|
+
probes supported by the current evidence:
|
|
92
|
+
|
|
93
|
+
| Project or change type | Start with | Add when triggered |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| Web app / API | Goal / value, Correctness / safety, Test / verification, UX / DX | Security for auth/input; Reliability for external calls; Performance for hot paths |
|
|
96
|
+
| CLI / SDK / public package | Goal / value, contract compatibility, UX / DX, Test / verification | Dependency for version changes; Maintainability for API surface growth |
|
|
97
|
+
| AI agent / workflow system | Goal / value, Context quality, Correctness / safety, Evaluation / verification | Security for tool access; Cost for token/tool growth; Recovery for long-running state |
|
|
98
|
+
| Data pipeline / async jobs | Correctness / safety, Reliability / recovery, Test / verification | Performance for volume; Security for sensitive data; Observability for production diagnosis |
|
|
99
|
+
| Documentation / README / growth copy | Goal / value, UX / DX / discoverability, factuality, link integrity | Dependency for install commands; Accessibility for rendered UI or diagrams |
|
|
100
|
+
|
|
101
|
+
For an AI agent repository, **context quality**, **tool safety**, **evaluation**,
|
|
102
|
+
and **recovery** are usually more valuable than a generic maintainability scan.
|
|
103
|
+
For a docs-only change, do not spend a cycle pretending to optimize algorithmic
|
|
104
|
+
performance.
|
|
105
|
+
|
|
106
|
+
## Scan strategies
|
|
107
|
+
|
|
108
|
+
Confirmation passes must change the search strategy, not merely repeat the same
|
|
109
|
+
prompt:
|
|
110
|
+
|
|
111
|
+
- **Breadth** — map affected modules, interfaces, tests, and user paths.
|
|
112
|
+
- **Depth** — trace one high-risk path from input to observable outcome.
|
|
113
|
+
- **Change-first** — inspect the latest diff, failures, and touched boundaries.
|
|
114
|
+
- **Failure-first** — start from flaky tests, incidents, TODOs, and user reports.
|
|
115
|
+
- **Contract-first** — compare behavior against PRD, acceptance criteria, API,
|
|
116
|
+
CLI, or documentation promises.
|
|
117
|
+
|
|
118
|
+
Rotate strategies when a pass is empty. Re-run a probe when its confidence is
|
|
119
|
+
below 0.8 or its relevant surface coverage is below 80%.
|
|
120
|
+
|
|
121
|
+
## Exhaustion gate
|
|
122
|
+
|
|
123
|
+
The A-GATE is evidence-based:
|
|
124
|
+
|
|
125
|
+
1. all dynamic high-risk obligations for the current project profile are
|
|
126
|
+
covered;
|
|
127
|
+
2. every selected probe returns structured findings, confidence, and surface
|
|
128
|
+
coverage;
|
|
129
|
+
3. no selected probe has an actionable finding above the current value gate;
|
|
130
|
+
4. two confirmation passes use different strategies and produce no new
|
|
131
|
+
actionable finding; and
|
|
132
|
+
5. the CEO records unresolved uncertainty, skipped probes, and why oracle or
|
|
133
|
+
spark search was or was not needed.
|
|
134
|
+
|
|
135
|
+
The cross-model oracle is triggered by unresolved high-risk uncertainty or a
|
|
136
|
+
borderline exhaustion result. Spark search is triggered by a genuine value gap,
|
|
137
|
+
not merely because a catalog was empty. This prevents both premature stopping
|
|
138
|
+
and pointless full-tree scanning.
|
|
139
|
+
|
|
140
|
+
## Cycle ledger
|
|
141
|
+
|
|
142
|
+
Each W0 entry records compact JSON-like evidence:
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
profile: web-api + public-auth + recent-db-change
|
|
146
|
+
goal: reduce failed checkout recovery time
|
|
147
|
+
selected: correctness/safety, reliability/recovery, security/privacy, test/verification
|
|
148
|
+
skipped: performance/cost (no hot-path signal); dependency/ecosystem (no dependency change)
|
|
149
|
+
strategy: change-first
|
|
150
|
+
coverage: 0.92
|
|
151
|
+
findings: 2
|
|
152
|
+
next: reliability finding, priority 4.3/5
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The ledger makes angle choice explainable, lets the next cycle avoid duplicate
|
|
156
|
+
work, and gives `/wf-review` or the user enough evidence to challenge the
|
|
157
|
+
selection.
|
|
158
|
+
|
|
159
|
+
## User controls
|
|
160
|
+
|
|
161
|
+
Users can steer selection in natural language without learning hidden flags:
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
/wf-auto 重点优化安全和数据恢复,忽略没有证据支持的性能优化
|
|
165
|
+
/wf-auto 只关注 CLI 易用性、文档和错误提示
|
|
166
|
+
/wf-auto 先扫描最近改动和失败测试,再决定本轮分析探针
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The agent must treat these as priorities, not permission to skip safety or
|
|
170
|
+
verification for a change that can affect data or production behavior.
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
- User explicitly invokes `/wf-auto-spark` or `$wf-auto-spark`
|
|
8
8
|
- Auto-degrade from `/wf-auto` when user can't clarify direction at Re-Anchor Gate
|
|
9
|
-
- Auto-activate when
|
|
9
|
+
- Auto-activate when adaptive internal coverage returns empty for 3+ consecutive cycles AND oracle also empty
|
|
10
10
|
|
|
11
11
|
## Core Philosophy
|
|
12
12
|
|
|
13
13
|
**"Inspiration never runs dry, but direction must hold."**
|
|
14
14
|
|
|
15
|
-
Spark mode replaces the
|
|
15
|
+
Spark mode replaces the adaptive internal probe scan with EXTERNAL inspiration search. Unlike vanilla `/wf-auto` which can stop when no internal improvements are found, spark mode NEVER stops — it always looks outward for the next idea.
|
|
16
16
|
|
|
17
17
|
But perpetual search without direction = drift. The **Roadmap** is the anchor.
|
|
18
18
|
|
|
@@ -77,7 +77,7 @@ Answers: "What does success look like in 6-12 months?">
|
|
|
77
77
|
STARTUP: Declare roadmap (North Star + Milestones) → user confirms
|
|
78
78
|
↓
|
|
79
79
|
┌─────────────────────────────────────────────────────────┐
|
|
80
|
-
│ SPARK:
|
|
80
|
+
│ SPARK: parallel external searches → gather sparks │
|
|
81
81
|
│ ↓ │
|
|
82
82
|
│ FILTER: Keep only sparks relevant to project stack/size │
|
|
83
83
|
│ ↓ │
|
|
@@ -207,14 +207,14 @@ If CEO CANNOT write a convincing value reflection → spark was NOT valuable →
|
|
|
207
207
|
| SP3 | **Copycat without context** | "Project X does Y so we should too" | Value Gate question 1 |
|
|
208
208
|
| SP4 | **Silent North Star drift** | Small changes accumulate, direction shifts without noticing | Cumulative deviation check every 10 cycles |
|
|
209
209
|
| SP5 | **Milestone rot** | Milestones become irrelevant but aren't updated | Milestone review at Re-Anchor Gate |
|
|
210
|
-
| SP6 | **Spark tunnel vision** | Only looking at one type of source | Rotate through
|
|
210
|
+
| SP6 | **Spark tunnel vision** | Only looking at one type of source | Rotate through the registered source families and record skipped sources |
|
|
211
211
|
|
|
212
212
|
## Integration with /wf-auto
|
|
213
213
|
|
|
214
214
|
```text
|
|
215
215
|
/wf-auto (autonomous optimization)
|
|
216
216
|
↓
|
|
217
|
-
Internal
|
|
217
|
+
Internal adaptive coverage scan per cycle
|
|
218
218
|
↓
|
|
219
219
|
Re-Anchor Gate (every preset interval)
|
|
220
220
|
├── User gives clear direction → refine, continue /wf-auto
|