create-harness-vibe-coding 0.8.6 → 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.
Files changed (93) hide show
  1. package/README-CN.md +157 -105
  2. package/README.md +160 -244
  3. package/bin/create-harness-vibe-coding.js +2 -2
  4. package/docs/images/harness-architecture-light.png +0 -0
  5. package/docs/images/harness-architecture.drawio +164 -0
  6. package/package.json +46 -44
  7. package/src/generator.js +30 -11
  8. package/src/index.js +143 -14
  9. package/src/prompts.js +37 -37
  10. package/templates/common/.claude/agents/architect-manager.md +45 -45
  11. package/templates/common/.claude/agents/context-master.md +75 -75
  12. package/templates/common/.claude/agents/debugger.md +41 -41
  13. package/templates/common/.claude/agents/explore-manager.md +41 -41
  14. package/templates/common/.claude/agents/implement-manager.md +49 -49
  15. package/templates/common/.claude/agents/implementer.md +40 -40
  16. package/templates/common/.claude/agents/memory-master.md +64 -64
  17. package/templates/common/.claude/agents/planner.md +34 -34
  18. package/templates/common/.claude/agents/reflector.md +35 -0
  19. package/templates/common/.claude/agents/researcher.md +41 -41
  20. package/templates/common/.claude/agents/review-manager.md +56 -56
  21. package/templates/common/.claude/agents/verifier.md +34 -32
  22. package/templates/common/.claude/commands/wf-help.md +2 -3
  23. package/templates/common/.claude/rules/ecc/common.md +44 -44
  24. package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +10 -4
  25. package/templates/common/.claude/skills/wf/SKILL.md +7 -3
  26. package/templates/common/.claude/skills/wf-auto/SKILL.md +61 -107
  27. package/templates/common/.claude/skills/wf-auto-spark/SKILL.md +19 -17
  28. package/templates/common/.claude/skills/wf-max/SKILL.md +40 -21
  29. package/templates/common/.claude/skills/wf-readme/SKILL.md +49 -49
  30. package/templates/common/.claude/skills/wf-remove/SKILL.md +7 -7
  31. package/templates/common/.claude/skills/wf-update/SKILL.md +9 -4
  32. package/templates/common/.codex/config.toml +5 -0
  33. package/templates/common/.harness-version +78 -36
  34. package/templates/common/.opencode/agents/architect-manager.md +52 -0
  35. package/templates/common/.opencode/agents/architect.md +35 -0
  36. package/templates/common/.opencode/agents/context-master.md +81 -0
  37. package/templates/common/.opencode/agents/debugger.md +43 -0
  38. package/templates/common/.opencode/agents/docs-researcher.md +42 -0
  39. package/templates/common/.opencode/agents/explore-manager.md +49 -0
  40. package/templates/common/.opencode/agents/implement-manager.md +56 -0
  41. package/templates/common/.opencode/agents/implementer.md +42 -0
  42. package/templates/common/.opencode/agents/memory-master.md +70 -0
  43. package/templates/common/.opencode/agents/planner.md +38 -0
  44. package/templates/common/.opencode/agents/reflector.md +39 -0
  45. package/templates/common/.opencode/agents/researcher.md +42 -0
  46. package/templates/common/.opencode/agents/review-manager.md +63 -0
  47. package/templates/common/.opencode/agents/reviewer.md +37 -0
  48. package/templates/common/.opencode/agents/tdd-guide.md +83 -0
  49. package/templates/common/.opencode/agents/test-writer.md +54 -0
  50. package/templates/common/.opencode/agents/verifier.md +37 -0
  51. package/templates/common/.opencode/commands/wf-help.md +23 -0
  52. package/templates/common/AGENTS.md +26 -25
  53. package/templates/common/CLAUDE.md +86 -88
  54. package/templates/common/Harness/ACCEPTANCE_PROTOCOL.md +12 -4
  55. package/templates/common/Harness/PROGRESS.md +17 -17
  56. package/templates/common/Harness/README.md +26 -16
  57. package/templates/common/Harness/WF-AUTO-ANGLES.md +170 -0
  58. package/templates/common/Harness/WF-AUTO-SPARK.md +23 -6
  59. package/templates/common/Harness/WF-AUTO.md +508 -493
  60. package/templates/common/Harness/WF-MAX.md +284 -232
  61. package/templates/common/Harness/WF.md +47 -29
  62. package/templates/common/Harness/agent-workflow.md +108 -76
  63. package/templates/common/Harness/architecture.md +124 -124
  64. package/templates/common/Harness/context-loading.md +111 -111
  65. package/templates/common/Harness/dispatch.md +96 -95
  66. package/templates/common/Harness/extension.md +67 -67
  67. package/templates/common/Harness/lifecycle.md +20 -20
  68. package/templates/common/Harness/research/PRD.md +56 -56
  69. package/templates/common/Harness/research/README.md +169 -169
  70. package/templates/common/Harness/research/research-results.md +66 -66
  71. package/templates/common/Harness/subagents.md +192 -170
  72. package/templates/common/Harness/tasks/_template/ARTIFACTS.md +3 -3
  73. package/templates/common/Harness/tasks/_template/NOTES.md +3 -3
  74. package/templates/common/Harness/tasks/_template/PLAN.md +53 -60
  75. package/templates/common/Harness/tasks/_template/PROGRESS.md +26 -29
  76. package/templates/common/MEMORY.md +27 -30
  77. package/templates/common/README.md +36 -36
  78. package/templates/common/SETUP.md +1 -1
  79. package/templates/common/memory/agent-lessons-patterns.md +21 -21
  80. package/templates/common/memory/tool-usage-reflections.md +21 -21
  81. package/templates/common/memory/user-corrections-preferences.md +21 -21
  82. package/templates/common/opencode.json +19 -0
  83. package/templates/common/scripts/scan-clean.mjs +487 -448
  84. package/templates/common/scripts/validate-harness.mjs +245 -146
  85. package/templates/common/scripts/wf-remove.mjs +311 -293
  86. package/templates/common/scripts/wf-update-check.mjs +511 -311
  87. package/templates/optional/catalog.json +41 -33
  88. package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +194 -194
  89. package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +105 -69
  90. package/templates/optional/skills/github-pr-review/Harness/workflows/github-pr-review.md +28 -28
  91. package/templates/optional/skills/python-backend/Harness/workflows/python-backend.md +34 -34
  92. package/templates/optional/skills/ts-react-frontend/Harness/workflows/ts-react-frontend.md +34 -34
  93. package/templates/optional/skills/ui-ux-review/Harness/workflows/ui-ux-review.md +26 -26
@@ -1,88 +1,86 @@
1
- # CLAUDE.md
2
-
3
- This repository dogfoods the generated Harness scaffold. Scaffold source files live under `templates/common/` and `templates/optional/`; generated dogfood runtime files live under root `Harness/` and `.claude/`.
4
-
5
- ## 1. Harness Binding & Startup
6
-
7
- - If `Harness/` exists, this repository is governed by the Harness contract. Treat these files as mandatory operating instructions, not optional references.
8
- - Every session: load `Harness/MEMORY.md` first, then `Harness/README.md`.
9
- - 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.
10
-
11
- ### 1a. WF-MAX Role Contract (ACTIVE ONLY when /wf-max invoked)
12
-
13
- `/wf-max` active -> top-level orchestrator is **CEO**. Delegated Workers follow dispatch packet, edit only assigned writeSet. **Global mode != every agent is CEO.** There is no runtime hook enforcement; role/writeSet compliance is enforced by dispatch packets, review, validation, and durable task evidence.
14
-
15
- | ALLOWED (W0 CEO) | FORBIDDEN (always on source) |
16
- |---|---|
17
- | Read Harness docs, CLAUDE.md | Edit / Write / MultiEdit |
18
- | Grep/Glob for scoping | Bash (except `ls`/`dir`/`tree`/`git`) |
19
- | Agent spawn (ONE message) | Deep source reads → delegate to Worker |
20
- | Write PLAN.md / PROGRESS.md | Sequential spawn (AP6) |
21
-
22
- **Tempted to edit source? STOP. Spawn a Worker with explicit writeSet.**
23
-
24
- - `Harness/MEMORY.md` is the memory/resource router: agents, skills, durable memories, and cross-session lessons. Follow its registrations when selecting agents/skills or recording memory.
25
- - `Harness/README.md` is the task router. For every request, check `Harness/README.md#Load By Task` and `Harness/README.md#Skill Commands`; invoke via `/wf-*` skills or `$wf-*` skills.
26
- - `Harness/PROGRESS.md` is the global task index. Load at session start to see active task and task history.
27
- - If work spans more than one step, create a task capsule from `Harness/tasks/_template/` and update `Harness/tasks/<task-id>/PROGRESS.md`.
28
- - Subagents are readers and reporters. Only the main agent writes to `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`.
29
- - Invoke multi-agent work via `subagent-orchestrator` and `Harness/subagents.md`. Update harness via `/wf-update` (see `.claude/skills/wf-update/SKILL.md`).
30
- - For memory writing, dispatch `memory-master`. For context analysis, dispatch `context-master`.
31
- - Never bulk-read `Harness/`; route through `Harness/README.md` and `Harness/MEMORY.md`.
32
- - Scaffold source files live under `templates/common/` and `templates/optional/`; generated dogfood runtime files live under root `Harness/` and `.claude/`.
33
-
34
- ## 2. Think Before Coding
35
-
36
- - You must have **>=95% confidence** in user intent before writing implementation code.
37
- - If confidence is below 95%, stop and ask up to 3 blocking questions.
38
- - If multiple valid approaches exist and the choice affects architecture, scope, stack, or user-facing behavior, present trade-offs instead of picking silently.
39
- - State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
40
- - If something is unclear, stop. Name what is unclear and ask instead of guessing.
41
- - Before asserting a fact about the codebase, read the file that proves it. If you cannot cite the file and line, do not assert.
42
-
43
- ## 3. Simplicity First
44
-
45
- - No features beyond what was asked.
46
- - No abstractions for single-use code.
47
- - No unrequested flexibility, configurability, or speculative error handling.
48
- - Use explicit interfaces or state models only when they protect a real boundary, clarify ownership, or make verification/recovery simpler.
49
- - If a simpler approach exists, say so and prefer the smallest change that satisfies the request.
50
- - If the solution is growing faster than the problem, reduce scope before coding more.
51
-
52
- ## 4. Surgical Changes
53
-
54
- - Touch only files and lines required by the task.
55
- - Do not improve adjacent code, comments, formatting, or architecture unless it is required for the task.
56
- - Match existing style even when you would choose a different style in a new project.
57
- - Clean up imports, variables, functions, and files made unused by your own changes; do not delete pre-existing dead code unless asked.
58
- - Keep every changed line traceable to the user's request.
59
-
60
- ## 5. Goal-Driven Execution
61
-
62
- - Define verifiable success criteria before implementation.
63
- - For bugs, reproduce the failure or document why reproduction is impossible before fixing.
64
- - 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.
65
- - State assumptions before implementation and record durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
66
- - Every task needs a test, build check, validator run, or recorded manual check.
67
- - Do not claim web/UI acceptance without real-browser evidence from Chrome DevTools, CDP, Playwright, or documented manual browser checks.
68
- - Do not place project build scripts, git conventions, run commands, or release process in this file. Put them in `README.md`.
69
- - Do not place code architecture here. Put architecture in `Harness/architecture.md` or the current feature doc.
70
- - 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.
71
-
72
- ## 6. Memory & Self-Learning
73
-
74
- - `Harness/MEMORY.md` is the resource index. Detailed durable memory lives in `Harness/memory/`.
75
- - **Tool reflection trigger**: record a lightweight reflection when the same tool/use pattern fails 3+ times, or when a better command pattern/environment fix is found. Write it newest-first in `Harness/memory/tool-usage-reflections.md`.
76
- - **User correction trigger**: record a lightweight preference/correction when the user asks to remember it, or when the user corrects the same assumption/pattern 2+ times. Write it newest-first in `Harness/memory/user-corrections-preferences.md`.
77
- - **Agent lesson trigger**: record reusable lessons from review/debug loops in `Harness/memory/agent-lessons-patterns.md` when they would prevent recurrence.
78
- - **WF auto-trigger**: before WF closeout, dispatch `context-master` then `memory-master` (or use `/wf-learn`). The old "3x same failure" auto-trigger is unreliable — make this a mandatory closeout gate.
79
- - **Context threshold trigger**: when context approaches ~85% of the window, dispatch `context-master` to analyze and write a non-blocking compression suggestion to `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat`.
80
- - **Closeout trigger**: during WF closeout, dispatch `context-master` to extract durable knowledge, then `memory-master` to consolidate into `Harness/memory/*`.
81
- - Never record secrets, credentials, tokens, or private data in memory.
82
-
83
- ## 7. Mode Constraints
84
-
85
- - Never call `EnterPlanMode` — delegate planning to `planner` subagents (see `Harness/WF.md`).
86
- - Never write code directly in `/wf` or `/wf-max` CEO mode delegate all implementation to Workers via dispatch packets with explicit writeSet.
87
- - **WF-MAX three-layer architecture**: global mode (`wf-max`) != agent role (`ceo|manager|worker|reviewer`). Workers follow dispatch packet (writeSet, forbidden, verification). Missing role/writeSet means the controller must not proceed with source edits.
88
- - **Enforcement**: `.claude/settings.json` denies `EnterPlanMode` via the `deny` list. WF-MAX role/writeSet compliance is not hook-enforced; it is maintained through dispatch packets, independent review, validation evidence, and the task capsule. Role contract is in [Section 1a](#1a-wf-max-role-contract-active-only-when-wf-max-invoked) - read it first.
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.
36
+ - State assumptions before implementation and record only durable assumptions, decisions, blockers, handoffs, and verification evidence in `Harness/tasks/<task-id>/PLAN.md`.
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`.
@@ -16,8 +16,10 @@ Context Load
16
16
  -> Test Plan
17
17
  -> Implementation Dispatch
18
18
  -> Independent Validation
19
- -> Review
20
- -> Debug
19
+ -> Cross-Review
20
+ -> Reflector PASS
21
+ -> Final Acceptance
22
+ -> Debug/iterate if needed
21
23
  -> Memory
22
24
  ```
23
25
 
@@ -25,8 +27,8 @@ Mode differences are organizational only:
25
27
 
26
28
  | Mode | Organization | Same Acceptance Flow |
27
29
  | --- | --- | --- |
28
- | `/wf` / `$wf` | Small team, mostly serial | yes |
29
- | `/wf-max` / `$wf-max` | CEO -> Manager -> Worker hierarchy | yes |
30
+ | `/wf` / `$wf` | Complete role chain | yes |
31
+ | `/wf-max` / `$wf-max` | Complete role chain plus CEO -> Manager -> Worker fan-out | yes |
30
32
  | `/wf-auto` / `$wf-auto` | Repeating optimization loop | yes, per cycle |
31
33
 
32
34
  ## Gates
@@ -42,6 +44,7 @@ These gates apply before implementation unless the user explicitly asks for a sm
42
44
  | IMPLEMENT-GATE | Implementer may not modify acceptance truth files except through Change Request. | dispatch write set and forbidden set |
43
45
  | VALIDATION-GATE | Validator must be independent and must validate AC IDs against running behavior. | validation report with evidence matrix |
44
46
  | REVIEW-GATE | Reviewer reads PRD, AC, diff, and run evidence directly. | findings with AC IDs |
47
+ | REFLECT-GATE | Reflector reads verifier evidence and reviewer findings before final acceptance. | PASS, RETURN_TO_DEBUG, or BLOCKED verdict |
45
48
 
46
49
  Truth files are:
47
50
 
@@ -55,6 +58,8 @@ Truth files are:
55
58
  ## Mini PRD Minimum
56
59
 
57
60
  Every task that changes behavior needs a Mini PRD. It can live in `Harness/research/PRD.md`, a feature doc, or `Harness/tasks/<task-id>/PLAN.md`.
61
+ For routine scoped work, keep the Mini PRD compact. Do not expand into a long
62
+ product brief unless scope, risk, or user-facing behavior requires it.
58
63
 
59
64
  Minimum fields:
60
65
 
@@ -71,6 +76,9 @@ Minimum fields:
71
76
  ## Acceptance Criteria Format
72
77
 
73
78
  Each AC must be independently testable and use a stable ID:
79
+ Default to 1-3 concise ACs in the task PLAN. Expand to full UI/API contracts,
80
+ test plan, and AC-by-AC validation matrix only for browser-visible,
81
+ API/integration, security/data-loss, cross-module, or other high-risk behavior.
74
82
 
75
83
  ```markdown
76
84
  ## AC-001: Empty phone number cannot request verification code
@@ -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`, `Harness/MEMORY.md`, this file, and `Harness/PROGRESS.md` when work is active. Do not read the whole `Harness/` tree.
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
 
@@ -18,6 +28,7 @@ For the full phase contract, load [lifecycle.md](lifecycle.md).
18
28
  - If the task does not clearly match a row below, search by keywords before loading more docs.
19
29
  - project files are the only durable communication channel; chat/subagent transcript state is non-authoritative.
20
30
  - 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.
31
+ - 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.
21
32
  - Build commands, git conventions, and release notes belong in root `README.md`, not `CLAUDE.md`.
22
33
  - README rewrites are optional project-doc work. Use `wf-readme` and preserve existing public docs unless the user approves a broader restructure.
23
34
  - Code architecture belongs in [architecture.md](architecture.md) or the current feature doc, not `CLAUDE.md`.
@@ -54,24 +65,24 @@ Keywords are retrieval hints, not project facts.
54
65
 
55
66
  Load the matching row only. Add adjacent docs only when the loaded doc directly names them.
56
67
 
57
- Routing priority: 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`.
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`.
58
69
 
59
70
  | When to Read | Keywords | Load | Output |
60
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 |
61
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 |
62
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 |
63
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 |
64
76
  | Need architecture or boundaries | architecture, boundary, layer, port, adapter, dependency | [architecture.md](architecture.md) | layer map, ports, constraints |
65
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 |
66
- | 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` | exploration plan, second plan, heartbeat, recovery loop; explicit WF/WK loads subagent docs immediately |
67
- | 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, bounded ticks, optional wf-auto-only hook exception, 8-angle scan, spark search, intent checkpoint, evidence ledger; CEO never writes code |
68
- | 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 |
69
- | 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) | CEO-only dispatch, W0 fan-out, D-GATE, wave evidence |
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 |
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 |
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 |
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 |
70
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 |
71
83
  | Adding harness to existing project | existing project, onboarding, migrate, bootstrap, preserve, conflict | [extension.md](extension.md), [PROGRESS.md](PROGRESS.md), root `README.md` and package/CI files | discovered project facts, preserved config, manual registration plan |
72
84
  | 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](architecture.md) as needed | approved README mode, preserved sections, proposed diff plan |
73
85
  | Need implementation plan | plan, task, write set, verify, milestone, progress | [PROGRESS.md](PROGRESS.md), the current task `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md`, [agent-workflow.md](agent-workflow.md), [ACCEPTANCE_PROTOCOL.md](ACCEPTANCE_PROTOCOL.md) | tasks, AC IDs, write set, verification commands |
74
- | Browser E2E testing or automation | /wf-browser, browser, e2e, web automation, form fill, screenshot verify, page test, browser test, Playwright AI, Browser Use, CDP | browser-e2e workflow, [HARNESS_BRIDGE.md](HARNESS_BRIDGE.md), wf-browser skill, Browser Use skill | UI/API contract, CLI commands, screenshots, traces, validation matrix |
75
86
  | Optional workflow installed | workflow, optional, ui-ux-review, github-pr-review, python-backend, ts-react-frontend | matching `workflows/*.md` (if installed), [extension.md](extension.md) | workflow-specific evidence, commands, fallback path |
76
87
  | Need durable memory or reflection | memory, remember, preference, correction, tool failure, lesson, reflection, scenario memory | [MEMORY.md](MEMORY.md), [MEMORY_PROTOCOL.md](MEMORY_PROTOCOL.md), `Harness/memory/tool-usage-reflections.md`, `Harness/memory/user-corrections-preferences.md`, `Harness/memory/agent-lessons-patterns.md` | concise newest-first memory entry, scenario memory hint, or no-op rationale |
77
88
  | Need subagents | subagent, role pack, context, inject, return format, orchestrator, isolation | [subagents.md](subagents.md), [context-loading.md](context-loading.md), [dispatch.md](dispatch.md), [AGENT_ISOLATION.md](AGENT_ISOLATION.md) | controller plan, role-specific context pack, isolation-aware dispatch pack |
@@ -85,9 +96,9 @@ 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 that never stops until 8-angle exhaustion.
89
- - **WF-MAX Role Contract**: Three-layer architecture global mode (`wf-max`), agent role (`ceo|manager|worker|reviewer`), 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
- - **WF-REVIEW Anti-Self-Review**: Must invoke the OTHER CLI (CodexClaude). Same-model simulation is forbidden.
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.
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`.
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`.
92
103
  - Do not code before PRD-GATE, AC-GATE, CONTRACT-GATE, and TEST-GATE are satisfied or explicitly compressed into a documented fast lane.
93
104
  - PRD-derived Acceptance Criteria are the source of truth. Code, tests, reviews, validation, debug, and memory must trace to AC IDs.
@@ -102,7 +113,7 @@ Routing priority: if a request explicitly says `/wf <task>`, `$wf`, `wf mode`, `
102
113
  - In WF Max mode, D-GATE (Dispatch Table + Self-Audit Checklist) is mandatory before W2 implementation dispatch.
103
114
  - Do not add stack-specific agents or skills without following `extension.md`.
104
115
  - Do not close work without tests or recorded manual verification.
105
- - Do not mark work `Verified` until evidence is recorded in the current task's `tasks/<id>/PROGRESS.md` and `tasks/<id>/PLAN.md` or the feature doc.
116
+ - Do not mark work `Verified` until evidence is recorded, cross-review has passed, and reflector verdict is PASS.
106
117
  - Run `node Harness/scripts/validate-harness.mjs` for install-complete scaffold structure; run `node Harness/scripts/validate-harness.mjs --strict` only after bootstrap resolves project-fact placeholders and before release.
107
118
  - If a doc still has `{{...}}`, treat that section as a template, not project fact.
108
119
 
@@ -134,13 +145,12 @@ Routing priority: if a request explicitly says `/wf <task>`, `$wf`, `wf mode`, `
134
145
 
135
146
  | Claude Code | Codex | Purpose |
136
147
  |---|---|---|
137
- | `/wf <task>` | `$wf <task>` | Long-task workflow: explore -> plan -> implement -> review -> verify |
138
- | `/wf-max [task]` | `$wf-max [task]` | Maximum parallelism: CEO -> Manager -> Worker hierarchy |
139
- | `/wf-auto` | `$wf-auto` | Perpetual auto-optimization: never stops until 8-angle exhaustion |
140
- | `/wf-auto-spark` | `$wf-auto-spark` | Perpetual inspiration: spark search, roadmap-anchored, 50% deviation guard, never auto-stops |
148
+ | `/wf <task>` | `$wf <task>` | Complete role chain: plan, research/docs, architecture, test, implement, validation, cross-review, reflector, acceptance |
149
+ | `/wf-max [task]` | `$wf-max [task]` | WF strict superset with maximum parallelism: CEO -> Manager -> Worker, cross-CLI overflow |
150
+ | `/wf-auto` | `$wf-auto` | Perpetual adaptive auto-optimization: dynamic probes, risk obligations, evidence-based exhaustion |
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 |
143
- | `/wf-browser [task]` | `$wf-browser [task]` | AI-driven browser automation for E2E testing |
144
154
  | `/wf-readme [task]` | `$wf-readme [task]` | README preservation, merge, and documentation improvement workflow |
145
155
  | `/wf-update` | `$wf-update` | Script-driven harness update: fetch + compare + apply |
146
156
  | `/wf-remove` | `$wf-remove` | Safe harness removal: auto-delete SAFE, confirm MODIFIED, preserve USER DATA |
@@ -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.