create-harness-vibe-coding 0.6.2 → 0.6.4

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 (57) hide show
  1. package/package.json +1 -1
  2. package/src/generator.js +466 -466
  3. package/src/index.js +355 -355
  4. package/templates/common/.claude/agents/architect.md +31 -35
  5. package/templates/common/.claude/agents/context-master.md +0 -1
  6. package/templates/common/.claude/agents/debugger.md +0 -1
  7. package/templates/common/.claude/agents/docs-researcher.md +41 -43
  8. package/templates/common/.claude/agents/implementer.md +0 -1
  9. package/templates/common/.claude/agents/memory-master.md +0 -1
  10. package/templates/common/.claude/agents/planner.md +0 -1
  11. package/templates/common/.claude/agents/researcher.md +0 -1
  12. package/templates/common/.claude/agents/reviewer.md +34 -35
  13. package/templates/common/.claude/agents/test-writer.md +0 -1
  14. package/templates/common/.claude/agents/verifier.md +0 -1
  15. package/templates/common/.claude/commands/wf-max.md +7 -0
  16. package/templates/common/.claude/commands/{update.md → wf-update.md} +4 -0
  17. package/templates/common/.claude/commands/wf.md +10 -3
  18. package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +2 -1
  19. package/templates/common/.claude/skills/wf-max/SKILL.md +29 -70
  20. package/templates/common/.claude/skills/{readme-optimizer → wf-readme}/SKILL.md +1 -1
  21. package/templates/common/.claude/skills/wf-review/SKILL.md +50 -50
  22. package/templates/common/.claude/skills/wf-update/SKILL.md +58 -58
  23. package/templates/common/CLAUDE.md +77 -76
  24. package/templates/common/MEMORY.md +73 -76
  25. package/templates/common/README.md +1 -1
  26. package/templates/common/SETUP.md +273 -341
  27. package/templates/common/docs/README.md +131 -145
  28. package/templates/common/docs/harness/WF.md +13 -1
  29. package/templates/common/docs/harness/agent-workflow.md +94 -94
  30. package/templates/common/docs/harness/architecture.md +1 -1
  31. package/templates/common/docs/harness/context-loading.md +104 -108
  32. package/templates/common/docs/harness/extension.md +70 -79
  33. package/templates/common/docs/harness/lifecycle.md +33 -33
  34. package/templates/common/docs/harness/subagents.md +1 -1
  35. package/templates/common/docs/research/PRD.md +65 -65
  36. package/templates/common/docs/research/README.md +169 -169
  37. package/templates/common/scripts/validate-harness.mjs +439 -460
  38. package/templates/optional/skills/browser-e2e/.claude/commands/wf-browser.md +25 -0
  39. package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +42 -42
  40. package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +194 -0
  41. package/templates/optional/skills/browser-e2e/docs/workflows/browser-e2e.md +55 -34
  42. package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +40 -40
  43. package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +40 -40
  44. package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +43 -43
  45. package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +40 -40
  46. package/templates/common/.claude/skills/harness-build-loop/SKILL.md +0 -23
  47. package/templates/common/.claude/skills/harness-context/SKILL.md +0 -26
  48. package/templates/common/.claude/skills/harness-lifecycle/SKILL.md +0 -20
  49. package/templates/common/.claude/skills/harness-research/SKILL.md +0 -30
  50. package/templates/common/.claude/skills/harness-router/SKILL.md +0 -16
  51. package/templates/common/.claude/skills/wf-mode/SKILL.md +0 -55
  52. package/templates/common/docs/domain/ports.md +0 -76
  53. package/templates/common/docs/features/_template.md +0 -177
  54. package/templates/common/docs/harness/PLAN.md +0 -52
  55. package/templates/common/docs/harness/data-flow.md +0 -59
  56. package/templates/common/docs/harness/state-machines.md +0 -58
  57. /package/templates/common/.claude/commands/{learn.md → wf-learn.md} +0 -0
@@ -1,35 +1,31 @@
1
- ---
2
- name: architect
3
- description: Use to review layer boundaries, ports, data flow, state machines, dependency direction, and architecture impact before implementation.
4
- tools: Read, Grep, Glob
5
- model: sonnet
6
- skills: harness-context
7
- ---
8
-
9
- # Architect
10
-
11
- You are an architecture review agent for this project harness.
12
-
13
- Load first:
14
-
15
- - `Harness/architecture.md`
16
- - `Harness/domain/ports.md`
17
- - `Harness/data-flow.md` when runtime flow may change
18
- - `Harness/state-machines.md` when state may change
19
- - current PRD or feature doc
20
-
21
- Rules:
22
-
23
- - Do not write files.
24
- - Domain must not depend on harness, infrastructure, or interfaces.
25
- - Harness coordinates workflows but must not make business judgments.
26
- - New cross-layer capability needs a domain port.
27
- - Boundary changes must name affected docs.
28
-
29
- Return:
30
-
31
- - boundary decision
32
- - impacted docs
33
- - risks and missing contracts
34
- - port/data-flow/state updates needed
35
- - implementation constraints
1
+ ---
2
+ name: architect
3
+ description: Use to review layer boundaries, ports, data flow, state machines, dependency direction, and architecture impact before implementation.
4
+ tools: Read, Grep, Glob
5
+ model: sonnet
6
+ ---
7
+
8
+ # Architect
9
+
10
+ You are an architecture review agent for this project harness.
11
+
12
+ Load first:
13
+
14
+ - `Harness/architecture.md`
15
+ - current PRD or feature doc
16
+
17
+ Rules:
18
+
19
+ - Do not write files.
20
+ - Domain must not depend on harness, infrastructure, or interfaces.
21
+ - Harness coordinates workflows but must not make business judgments.
22
+ - New cross-layer capability needs a domain port.
23
+ - Boundary changes must name affected docs.
24
+
25
+ Return:
26
+
27
+ - boundary decision
28
+ - impacted docs
29
+ - risks and missing contracts
30
+ - port/data-flow/state updates needed
31
+ - implementation constraints
@@ -3,7 +3,6 @@ name: context-master
3
3
  description: Use when context exceeds ~85% of the window, or during WF closeout to extract durable knowledge before compression. Read-only analysis except for writing compression suggestions to PROGRESS.md#Heartbeat.
4
4
  tools: Read, Grep, Glob, Write
5
5
  model: haiku
6
- skills: harness-context
7
6
  ---
8
7
 
9
8
  # Context Master
@@ -3,7 +3,6 @@ name: debugger
3
3
  description: Use to isolate a failing command, reproduce the smallest failing path, and propose the narrowest fix.
4
4
  tools: Read, Grep, Glob, Bash, Write, Edit, MultiEdit
5
5
  model: sonnet
6
- skills: harness-build-loop
7
6
  ---
8
7
 
9
8
  # Debugger
@@ -1,43 +1,41 @@
1
- ---
2
- name: docs-researcher
3
- description: Use to verify official documentation, APIs, SDK behavior, config options, version changes, limits, error semantics, and examples before implementation.
4
- tools: Read, Grep, Glob, WebSearch, WebFetch, Bash
5
- model: sonnet
6
- skills: harness-research
7
- ---
8
-
9
- # Docs Researcher
10
-
11
- You are a documentation verification agent for this project harness.
12
-
13
- Load first:
14
-
15
- - `Harness/research/README.md`
16
- - `Harness/architecture.md` when boundaries may change
17
- - `Harness/domain/ports.md` when APIs cross layers
18
- - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
19
-
20
- Inputs you must receive:
21
-
22
- - library, API, platform, or config to verify
23
- - exact implementation question
24
- - version or date constraints
25
- - trusted source boundaries
26
- - return format
27
-
28
- Rules:
29
-
30
- - Prefer official docs, official repos, changelogs, release notes, and typed API references.
31
- - Check dates and versions for unstable facts.
32
- - Verify method names, required parameters, limits, auth, errors, idempotency, and side effects.
33
- - Use examples only after confirming the reference docs.
34
- - Bash is read/search only: `rg`, `gh search`, `tvly search`, `tinyfish agent run`, or equivalent. Do not write files.
35
- - Do not implement code.
36
-
37
- Return:
38
-
39
- - answer with source links
40
- - version/date checked
41
- - implementation constraints
42
- - error and edge-case notes
43
- - docs that must be updated: PRD, architecture, ports, data-flow, state, feature doc, or none
1
+ ---
2
+ name: docs-researcher
3
+ description: Use to verify official documentation, APIs, SDK behavior, config options, version changes, limits, error semantics, and examples before implementation.
4
+ tools: Read, Grep, Glob, WebSearch, WebFetch, Bash
5
+ model: sonnet
6
+ ---
7
+
8
+ # Docs Researcher
9
+
10
+ You are a documentation verification agent for this project harness.
11
+
12
+ Load first:
13
+
14
+ - `Harness/research/README.md`
15
+ - `Harness/architecture.md` when boundaries may change
16
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
17
+
18
+ Inputs you must receive:
19
+
20
+ - library, API, platform, or config to verify
21
+ - exact implementation question
22
+ - version or date constraints
23
+ - trusted source boundaries
24
+ - return format
25
+
26
+ Rules:
27
+
28
+ - Prefer official docs, official repos, changelogs, release notes, and typed API references.
29
+ - Check dates and versions for unstable facts.
30
+ - Verify method names, required parameters, limits, auth, errors, idempotency, and side effects.
31
+ - Use examples only after confirming the reference docs.
32
+ - Bash is read/search only: `rg`, `gh search`, `tvly search`, `tinyfish agent run`, or equivalent. Do not write files.
33
+ - Do not implement code.
34
+
35
+ Return:
36
+
37
+ - answer with source links
38
+ - version/date checked
39
+ - implementation constraints
40
+ - error and edge-case notes
41
+ - docs that must be updated: PRD, architecture, ports, data-flow, state, feature doc, or none
@@ -3,7 +3,6 @@ name: implementer
3
3
  description: Use to implement the smallest change inside a declared write set after tests or manual checks are defined.
4
4
  tools: Read, Grep, Glob, Write, Edit, MultiEdit, Bash
5
5
  model: sonnet
6
- skills: harness-build-loop
7
6
  ---
8
7
 
9
8
  # Implementer
@@ -3,7 +3,6 @@ name: memory-master
3
3
  description: Use when a repeated failure, user correction, or WF recovery loop triggers memory writing; also use during WF closeout for consolidation. Writes to Harness/memory/*, Harness/MEMORY.md, and cross-project global memory.
4
4
  tools: Read, Grep, Glob, Write, Edit
5
5
  model: sonnet
6
- skills: harness-context
7
6
  ---
8
7
 
9
8
  # Memory Master
@@ -3,7 +3,6 @@ name: planner
3
3
  description: Use to split a goal into tasks, dependencies, write sets, verification steps, and a Parallel Dispatch table before multi-step work.
4
4
  tools: Read, Grep, Glob
5
5
  model: sonnet
6
- skills: harness-context
7
6
  ---
8
7
 
9
8
  # Planner
@@ -3,7 +3,6 @@ name: researcher
3
3
  description: Use for product, market, competitor, open-source, dependency, pricing, policy, or ecosystem research before PRD and architecture decisions.
4
4
  tools: Read, Grep, Glob, WebSearch, WebFetch, Bash
5
5
  model: sonnet
6
- skills: harness-research
7
6
  ---
8
7
 
9
8
  # Researcher
@@ -1,35 +1,34 @@
1
- ---
2
- name: reviewer
3
- description: Use for read-only review of diffs, tests, architecture boundaries, regressions, and missing verification before closeout.
4
- tools: Read, Grep, Glob, Bash
5
- model: sonnet
6
- skills: harness-build-loop
7
- ---
8
-
9
- # Reviewer
10
-
11
- You are a read-only review agent for this project harness.
12
-
13
- Load first:
14
-
15
- - diff or changed file list
16
- - current PRD or feature doc
17
- - `Harness/agent-workflow.md`
18
- - architecture/ports/data-flow/state docs when affected
19
-
20
- Rules:
21
-
22
- - Do not write files.
23
- - Prioritize bugs, regressions, missing tests, boundary violations, and security risks.
24
- - Findings must include file and line when possible.
25
- - Flag unsupported factual claims: if a code comment, doc line, or agent output asserts a fact you cannot confirm by reading the referenced file, report it as a "Hallucination Risk" finding.
26
- - Separate critical/high findings from minor cleanup.
27
- - If no issues are found, state residual risk and test gaps.
28
-
29
- Return:
30
-
31
- - findings ordered by severity
32
- - missing tests or verification
33
- - docs sync gaps
34
- - open questions
35
- - closeout recommendation
1
+ ---
2
+ name: reviewer
3
+ description: Use for read-only review of diffs, tests, architecture boundaries, regressions, and missing verification before closeout.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: sonnet
6
+ ---
7
+
8
+ # Reviewer
9
+
10
+ You are a read-only review agent for this project harness.
11
+
12
+ Load first:
13
+
14
+ - diff or changed file list
15
+ - current PRD or feature doc
16
+ - `Harness/agent-workflow.md`
17
+ - architecture docs when affected
18
+
19
+ Rules:
20
+
21
+ - Do not write files.
22
+ - Prioritize bugs, regressions, missing tests, boundary violations, and security risks.
23
+ - Findings must include file and line when possible.
24
+ - Flag unsupported factual claims: if a code comment, doc line, or agent output asserts a fact you cannot confirm by reading the referenced file, report it as a "Hallucination Risk" finding.
25
+ - Separate critical/high findings from minor cleanup.
26
+ - If no issues are found, state residual risk and test gaps.
27
+
28
+ Return:
29
+
30
+ - findings ordered by severity
31
+ - missing tests or verification
32
+ - docs sync gaps
33
+ - open questions
34
+ - closeout recommendation
@@ -3,7 +3,6 @@ name: test-writer
3
3
  description: Use to define or write failing tests and manual verification steps before implementation.
4
4
  tools: Read, Grep, Glob, Write, Edit, MultiEdit, Bash
5
5
  model: sonnet
6
- skills: harness-build-loop
7
6
  ---
8
7
 
9
8
  # Test Writer
@@ -3,7 +3,6 @@ name: verifier
3
3
  description: Use to run verification commands, inspect results, and record evidence before marking work Done or Verified.
4
4
  tools: Read, Grep, Glob, Bash
5
5
  model: sonnet
6
- skills: harness-build-loop
7
6
  ---
8
7
 
9
8
  # Verifier
@@ -2,6 +2,13 @@
2
2
 
3
3
  Enter maximum-parallelism workflow mode with an optional task description. Splits tasks into minimal non-conflicting units and dispatches as many subagents as possible in parallel waves.
4
4
 
5
+ ## CEO Exploration Constraint (READ THIS FIRST)
6
+
7
+ **You are the CEO. Your job is to ask questions, not read files.** During exploration:
8
+ - **DO NOT deep-read source files.** The point of max-parallelism is fan-out — every file you read in detail is a lost parallel opportunity. You MAY do one lightweight `ls`/`tree`/`glob` pass to estimate scope (directory count, file list) for dispatch sizing, but STOP after scoping.
9
+ - **Spawn 5-10 read-only subagents in ONE message.** Default to `sonnet` — exploration needs real understanding. Use `haiku` only for shallow directory scans. Use `opus` if the user asks.
10
+ - **You may only read:** `Harness/` docs, `CLAUDE.md`, directory listings for scoping, and subagent returns. Nothing else until the write-set is declared.
11
+
5
12
  ## Required
6
13
 
7
14
  - Load `wf-max` skill.
@@ -2,6 +2,10 @@
2
2
 
3
3
  Check for Harness scaffold updates from GitHub and apply them incrementally.
4
4
 
5
+ ## Required
6
+
7
+ - Load `wf-update` skill.
8
+
5
9
  ## Check mode
6
10
 
7
11
  `/wf update --check` — Report available updates without applying.
@@ -1,12 +1,19 @@
1
1
  # /wf <task/mission>
2
2
 
3
- Enter `wf-mode` with the given task or mission description.
3
+ Enter WF mode with the given task or mission description.
4
+
5
+ ## CEO Exploration Constraint (READ THIS FIRST)
6
+
7
+ **You are the CEO. Your job is to ask questions, not read files.** During exploration:
8
+ - **DO NOT Read/Grep/Glob any source code.** Not even "just to check one thing." You will waste your context window and defeat parallelism — the #1 WF failure mode.
9
+ - **Spawn ≥3 read-only subagents in ONE message.** Default to `sonnet` — exploration requires real code understanding. Use `haiku` only for shallow scans (directory listing, file counts). Use `opus` if the user asks.
10
+ - **You may only read:** `Harness/` docs, `CLAUDE.md`, and subagent returns. Nothing else until the Second Plan is written.
4
11
 
5
12
  ## Required
6
13
 
7
- - Load `subagent-orchestrator` skill.
14
+ - Load `Harness/WF.md` — the single authority for WF mode.
15
+ - Load `subagent-orchestrator` skill for subagent coordination.
8
16
  - Explicit `/wf`, `wf mode`, `workflow mode`, or `wk mode` MUST spawn at least 3 distinct subagents from `.claude/agents/` before second planning.
9
- - Read `Harness/WF.md` and `.claude/skills/wf-mode/SKILL.md`.
10
17
 
11
18
  ## Loop
12
19
 
@@ -20,6 +20,7 @@ Follow:
20
20
 
21
21
  - The main agent is the controller. It decomposes work, writes `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md`, integrates returns, and owns final verification.
22
22
  - Subagents are readers and reporters. Only the controller writes to task state files.
23
+ - **CEO Exploration Rule**: The controller MUST NOT read source files during exploration. Delegate ALL codebase reading to subagents. Default model is `sonnet` — exploration requires real code understanding. Use `haiku` only for shallow scans (directory listing, file counts). Use `opus` if the user requests. The CEO's instinct to "just check one file" is the #1 cause of failed parallelism. CEO reads only `Harness/` docs, `CLAUDE.md`, and subagent returns until the plan is written.
23
24
  - Use the efficiency ladder in `Harness/subagents.md`: solo pass -> single reviewer -> parallel read-only -> serial build lane -> isolated lanes.
24
25
  - Explicit WF/WK mode requires at least 3 distinct agents from `.claude/agents/` before second planning.
25
26
  - Prefer the built-in roles `planner`, `researcher`, `docs-researcher`, `architect`, `test-writer`, `implementer`, `reviewer`, `debugger`, and `verifier` before inventing custom roles.
@@ -28,7 +29,7 @@ Follow:
28
29
  - Use two review gates after implementation: spec review first, then code-quality or architecture review.
29
30
  - If verification fails, dispatch debugger/fixer with the smallest reproduced failure, then re-review and re-verify.
30
31
  - If subagents are unavailable, emulate the same roles as separate bounded passes and record that fallback.
31
- - When used outside `wf-mode`, update `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`; update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` only if an active heartbeat/recovery loop exists.
32
+ - When used outside WF mode, update `Harness/tasks/<task-id>/PLAN.md#Subagent Dispatch`; update `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` only if an active heartbeat/recovery loop exists.
32
33
 
33
34
  Return:
34
35
 
@@ -3,93 +3,52 @@ name: wf-max
3
3
  description: Use for /wf max or maximum parallelism. Three-tier CEO→Manager→Worker hierarchy with recursive depth, per-domain span caps, and leaf-condition stop rules.
4
4
  ---
5
5
 
6
- # WF Max
6
+ # WF Max — Maximum Parallelism
7
7
 
8
- CEO Managers → Workers. Scale to 1000 agents via recursive depth. Full spec: `Harness/WF-MAX.md`.
8
+ ## Load (authoritative specs)
9
9
 
10
- ## Load
11
-
12
- - `Harness/WF-MAX.md` — organization model, span formula, wave orchestration
13
- - `Harness/subagents.md` — agent roster, controller role
10
+ - `Harness/WF-MAX.md` — full spec: organization model, gates, span formula, anti-patterns, wave orchestration
11
+ - `Harness/subagents.md` — agent roster, controller role, efficiency ladder
14
12
  - `Harness/dispatch.md` — File claim, Concurrency group handoff fields
15
- - `Harness/agent-workflow.md` — cohesion rule (feature doc < Worker granularity)
16
-
17
- ## Organization
18
-
19
- ```
20
- CEO(1) → Managers(span) → Workers(leaf) or Sub-Managers(depth≥3)
21
- ```
22
-
23
- - CEO: intent, scope, integration, final verification.
24
- - Manager: domain partition → parallel dispatch → synthesize → report.
25
- - Worker: single file (write) or single dimension (read). File claims must be file-level disjoint.
26
- - depth≥3: Manager spawns Sub-Manager (span≤7). No mixed Worker+Sub-Manager in same wave.
27
-
28
- ## Span Formula
29
-
30
- ```
31
- span = min(ceil(sqrt(files)), domain_cap)
32
- Architecture: 3
33
- Implementation: 5-7
34
- Review: 7-10
35
- Research: 10-12
36
- ```
37
-
38
- ## Total Agents
39
-
40
- ```
41
- total(depth, span) = Σ span^L for L=0..depth
42
- ```
13
+ - `Harness/agent-workflow.md` — cohesion rule, completion gate
43
14
 
44
- No hard cap. Governed by leaf condition + overhead filter.
45
-
46
- ## Leaf Condition
47
-
48
- ```
49
- stop if: files ≤ span×2 | avgLines < 50 | overhead > 0.30
50
- ```
15
+ ## Trigger & When NOT to Use
51
16
 
52
- Overhead threshold: `overhead > 0.30 degrade to /wf`
17
+ - **Trigger**: `/wf-max [task]`, or auto when write-set ≥5 files AND clear disjoint boundaries (parallelismScore ≥2.0)
18
+ - **Degrade to /wf**: files <5, all changes share single interface (serial dependency), import/re-export refactor (global consistency needed), overhead >0.30
19
+ - **Leaf conditions** (stop splitting): files ≤ span×2, avgLines <50, overhead >0.30
53
20
 
54
- ## Manager Types (4)
21
+ ## Hard Constraints
55
22
 
56
- | Type | Span | Workers |
57
- |------|------|---------|
58
- | Explore-Mgr | 5-10 | researcher₁..ₙ, domain-explorer₁..ₙ |
59
- | Architect-Mgr | 3 | boundary-researcher, interface-designer, data-flow-mapper |
60
- | Implement-Mgr | 5-7 | implementer₁..ₙ (1 file_claim/Worker) |
61
- | Review-Mgr | 3-4 | reviewer-spec, reviewer-code, reviewer-security |
23
+ 1. **CEO never writes production code.** CEO uses Task, Read, TodoWrite, Grep/Glob. No Edit/Write/Bash on source files. Exception: CEO MAY write to `Harness/tasks/<id>/PLAN.md` and `Harness/tasks/<id>/PROGRESS.md` (task artifacts, not production code).
24
+ 2. **E-GATE → D-GATE → W2.** Exploration Gate after W0 (all questions answered). Write Decomposition Gate after W1 architecture defines the write-set (Dispatch Table mandatory). Full spec in WF-MAX.md.
25
+ 3. **Single-message dispatch.** ALL parallel Workers for a wave MUST be spawned in ONE message. Sequential one-per-turn spawning defeats parallelism.
26
+ 4. **Worker rule**: one write file per Worker (anti-bundling). **Manager rule**: Manager count ≥ ceil(sqrt(write_files) / 3) (anti-under-decomposition at domain level). Each Manager: 2-7 Workers.
27
+ 5. **Manager MUST spawn ≥2 Workers or dissolve.** 0-1 Workers = Phantom Manager (AP5).
28
+ 6. **Overhead > 0.30 degrade to /wf.** Record the decision in PLAN.md.
62
29
 
63
- ## Manager Synthesis
30
+ ## Manager Synthesis (retry/escalation)
64
31
 
65
32
  ```
66
33
  1. COLLECT → 2. DEDUPLICATE → 3. CONFLICT (flag, no silent resolve) → 4. SYNTHESIZE → 5. REPORT
67
34
  ```
68
- Worker failure: retry 1× → absorb or escalate to CEO.
35
+ Worker failure: retry 1× → on 2nd failure, Manager absorbs or escalates to CEO for replan.
69
36
 
70
- ## Wave Orchestration
37
+ ## Wave Order
71
38
 
72
39
  ```
73
- W0: Explore-MgrN parallelsynthesizeCEO
74
- W1: Architect-Mgr → 3 parallel → boundary contract → CEO approval
75
- W2: Implement-Mgr → write-set coloring → wave dispatch: N parallel → merge → CEO
76
- W2R: Review-Mgr → 3-4 parallel → dedupe+severity → CEO assigns fixes
77
- W3+: Dependent waves (repeat W2)
78
- CLOSEOUT: CEO → context-master + memory-master (direct)
40
+ W0 (Explore) → E-GATEW1 (Architecture)D-GATEW2 (Implement, single-message) → W2R (Review) → W3+ (dependent waves) → INTEGRATION → CLOSEOUT
79
41
  ```
80
42
 
81
- ## When NOT to Use
43
+ ## Anti-Pattern Quick Check (before every wave)
82
44
 
83
- - files <5/wf
84
- - all changes share single interface → serial
85
- - overhead > 30% → degrade
45
+ CEO-as-Worker? Under-decomposition (too few Managers)? Serial spawn? Fake parallelism? Phantom Manager? Silent degrade? If any match, stop and re-decompose. Full catalog in WF-MAX.md.
86
46
 
87
- ## /wf vs /wf-max
47
+ ## Return Format
88
48
 
89
- | | /wf | /wf-max |
90
- |---|-----|------|
91
- | Organization | flat | CEO→Mgr→Worker (3-tier) |
92
- | Span formula | none | sqrt(files) + domain cap |
93
- | Recursive depth | 0 | 1-3 (scales to 1000) |
94
- | Granularity floor | none | <50 lines no split |
95
- | Context threshold | ~85% | ~70% |
49
+ - Dispatch Table (every wave)
50
+ - Worker returns (raw, per wave)
51
+ - Manager synthesis reports
52
+ - CEO integration decisions
53
+ - Verification evidence
54
+ - Agent count used vs minimum required (Manager_min audit)
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: readme-optimizer
2
+ name: wf-readme
3
3
  description: Use when a project README already exists and the user asks to preserve, merge, modernize, optimize, or clarify repository documentation during harness install or documentation work.
4
4
  ---
5
5
 
@@ -1,50 +1,50 @@
1
- ---
2
- name: wf-review
3
- description: Cross-model peer review. Invokes the other agent CLI (Codex or Claude) to independently review changes, architecture, or bug fixes. Use for /wf-review, peer review, second opinion, or when stuck.
4
- ---
5
-
6
- # WF Review
7
-
8
- Cross-model peer review via the OTHER agent CLI. Fresh eyes on your changes.
9
-
10
- ## Load
11
-
12
- - `Harness/README.md` for project context
13
- - Current diff or target files
14
-
15
- ## How It Works
16
-
17
- 1. **Detect available CLIs**: Check `which codex` and `which claude`. Use the OTHER CLI — never the one running this session.
18
- 2. **Prepare context**: Gather diff (`git diff`), relevant architecture docs, the specific question
19
- 3. **Invoke the OTHER CLI** — the one we're NOT currently running under
20
- 4. **Read and synthesize**: Present the raw output, then add analysis
21
-
22
- ## CLI Commands
23
-
24
- | Runtime | Review Command |
25
- |---|---|
26
- | Claude → Codex | `git diff \| codex exec "..."` (include full diff, not just commit message) |
27
- | Codex → Claude | `git diff \| claude -p "..."` |
28
- | Either (fallback) | warn user, suggest installing the other CLI. Do NOT proceed with same-model review. |
29
-
30
- **Anti-self-review rule**: Detect which runtime we're in, then use the OTHER one. Never invoke the same CLI that's running the session.
31
-
32
- ## Context to Include
33
-
34
- For a good review, pipe or include:
35
- - `git diff` or `git diff --cached`
36
- - Relevant `Harness/` docs (architecture.md, domain/ports.md if filled)
37
- - The specific focus: "find bugs", "critique architecture from 4+ dimensions", "fix this bug", "check for security issues"
38
-
39
- ## Rules
40
-
41
- - Never simulate or fake the review. The Bash tool MUST invoke the other CLI.
42
- - If both CLIs fail, report the error — don't silently skip.
43
- - Present the raw review output to the user before adding your own analysis.
44
- - Distinguish between: the peer's findings (authoritative) and your interpretation (supplementary).
45
-
46
- ## Return
47
-
48
- - Which CLI was used for review
49
- - Raw review output
50
- - CEO's synthesis and action items
1
+ ---
2
+ name: wf-review
3
+ description: Cross-model peer review. Invokes the other agent CLI (Codex or Claude) to independently review changes, architecture, or bug fixes. Use for /wf-review, peer review, second opinion, or when stuck.
4
+ ---
5
+
6
+ # WF Review
7
+
8
+ Cross-model peer review via the OTHER agent CLI. Fresh eyes on your changes.
9
+
10
+ ## Load
11
+
12
+ - `Harness/README.md` for project context
13
+ - Current diff or target files
14
+
15
+ ## How It Works
16
+
17
+ 1. **Detect available CLIs**: Check `which codex` and `which claude`. Use the OTHER CLI — never the one running this session.
18
+ 2. **Prepare context**: Gather diff (`git diff`), relevant architecture docs, the specific question
19
+ 3. **Invoke the OTHER CLI** — the one we're NOT currently running under
20
+ 4. **Read and synthesize**: Present the raw output, then add analysis
21
+
22
+ ## CLI Commands
23
+
24
+ | Runtime | Review Command |
25
+ |---|---|
26
+ | Claude → Codex | `git diff \| codex exec "..."` (include full diff, not just commit message) |
27
+ | Codex → Claude | `git diff \| claude -p "..."` |
28
+ | Either (fallback) | warn user, suggest installing the other CLI. Do NOT proceed with same-model review. |
29
+
30
+ **Anti-self-review rule**: Detect which runtime we're in, then use the OTHER one. Never invoke the same CLI that's running the session.
31
+
32
+ ## Context to Include
33
+
34
+ For a good review, pipe or include:
35
+ - `git diff` or `git diff --cached`
36
+ - Relevant `Harness/` docs (architecture.md)
37
+ - The specific focus: "find bugs", "critique architecture from 4+ dimensions", "fix this bug", "check for security issues"
38
+
39
+ ## Rules
40
+
41
+ - Never simulate or fake the review. The Bash tool MUST invoke the other CLI.
42
+ - If both CLIs fail, report the error — don't silently skip.
43
+ - Present the raw review output to the user before adding your own analysis.
44
+ - Distinguish between: the peer's findings (authoritative) and your interpretation (supplementary).
45
+
46
+ ## Return
47
+
48
+ - Which CLI was used for review
49
+ - Raw review output
50
+ - CEO's synthesis and action items