create-harness-vibe-coding 0.7.2 → 0.8.0

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 (82) hide show
  1. package/README-CN.md +91 -155
  2. package/README.md +200 -177
  3. package/bin/create-harness-vibe-coding.js +2 -2
  4. package/package.json +45 -43
  5. package/src/generator.js +115 -77
  6. package/src/index.js +159 -49
  7. package/src/prompts.js +95 -27
  8. package/templates/common/.claude/agents/architect-manager.md +45 -45
  9. package/templates/common/.claude/agents/context-master.md +77 -77
  10. package/templates/common/.claude/agents/debugger.md +41 -41
  11. package/templates/common/.claude/agents/explore-manager.md +41 -41
  12. package/templates/common/.claude/agents/implement-manager.md +49 -49
  13. package/templates/common/.claude/agents/implementer.md +40 -40
  14. package/templates/common/.claude/agents/memory-master.md +66 -66
  15. package/templates/common/.claude/agents/planner.md +34 -34
  16. package/templates/common/.claude/agents/researcher.md +41 -41
  17. package/templates/common/.claude/agents/review-manager.md +56 -56
  18. package/templates/common/.claude/agents/test-writer.md +38 -38
  19. package/templates/common/.claude/agents/verifier.md +32 -32
  20. package/templates/common/.claude/rules/ecc/common.md +45 -45
  21. package/templates/common/.claude/settings.json +68 -68
  22. package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +36 -31
  23. package/templates/common/.claude/skills/wf/SKILL.md +36 -0
  24. package/templates/common/.claude/skills/wf-learn/SKILL.md +13 -28
  25. package/templates/common/.claude/skills/wf-max/SKILL.md +24 -88
  26. package/templates/common/.claude/skills/wf-readme/SKILL.md +49 -49
  27. package/templates/common/.claude/skills/wf-remove/SKILL.md +17 -38
  28. package/templates/common/.claude/skills/wf-review/SKILL.md +19 -69
  29. package/templates/common/.claude/skills/wf-update/SKILL.md +19 -61
  30. package/templates/common/.codex/config.toml +2 -2
  31. package/templates/common/.codex/hooks.json +37 -37
  32. package/templates/common/.harness-version +53 -51
  33. package/templates/common/AGENTS.md +30 -30
  34. package/templates/common/CLAUDE.md +94 -94
  35. package/templates/common/{docs/harness → Harness}/PROGRESS.md +17 -17
  36. package/templates/common/{docs → Harness}/README.md +18 -17
  37. package/templates/common/{docs/harness → Harness}/WF-MAX.md +223 -223
  38. package/templates/common/Harness/WF.md +217 -0
  39. package/templates/common/{docs/harness → Harness}/architecture.md +126 -126
  40. package/templates/common/{docs/harness → Harness}/dispatch.md +99 -99
  41. package/templates/common/{docs → Harness}/research/research-results.md +66 -66
  42. package/templates/common/{docs/harness → Harness}/subagents.md +194 -194
  43. package/templates/common/{docs → Harness}/tasks/_template/ARTIFACTS.md +3 -3
  44. package/templates/common/{docs → Harness}/tasks/_template/NOTES.md +3 -3
  45. package/templates/common/{docs → Harness}/tasks/_template/PLAN.md +40 -40
  46. package/templates/common/{docs → Harness}/tasks/_template/PROGRESS.md +29 -29
  47. package/templates/common/MEMORY.md +68 -66
  48. package/templates/common/README.md +44 -37
  49. package/templates/common/SETUP.md +41 -34
  50. package/templates/common/memory/agent-lessons-patterns.md +21 -21
  51. package/templates/common/memory/tool-usage-reflections.md +21 -21
  52. package/templates/common/memory/user-corrections-preferences.md +21 -21
  53. package/templates/common/scripts/scan-clean.mjs +450 -449
  54. package/templates/common/scripts/validate-harness.mjs +56 -34
  55. package/templates/common/scripts/wf-mode-hook.mjs +318 -318
  56. package/templates/common/scripts/wf-remove.mjs +400 -384
  57. package/templates/common/scripts/wf-statusline.ps1 +38 -38
  58. package/templates/common/scripts/wf-statusline.sh +48 -48
  59. package/templates/common/scripts/wf-update-check.mjs +389 -389
  60. package/templates/optional/catalog.json +63 -29
  61. package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +194 -194
  62. package/templates/optional/skills/browser-e2e/{docs → Harness}/workflows/browser-e2e.md +75 -75
  63. package/templates/optional/skills/github-pr-review/{docs → Harness}/workflows/github-pr-review.md +28 -28
  64. package/templates/optional/skills/python-backend/{docs → Harness}/workflows/python-backend.md +34 -34
  65. package/templates/optional/skills/ts-react-frontend/{docs → Harness}/workflows/ts-react-frontend.md +35 -35
  66. package/templates/optional/skills/ui-ux-review/{docs → Harness}/workflows/ui-ux-review.md +26 -26
  67. package/templates/common/.claude/commands/wf-learn.md +0 -17
  68. package/templates/common/.claude/commands/wf-max.md +0 -49
  69. package/templates/common/.claude/commands/wf-remove.md +0 -23
  70. package/templates/common/.claude/commands/wf-review.md +0 -25
  71. package/templates/common/.claude/commands/wf-update.md +0 -17
  72. package/templates/common/.claude/commands/wf.md +0 -31
  73. package/templates/common/commands/wf-max.toml +0 -18
  74. package/templates/common/commands/wf-review.toml +0 -15
  75. package/templates/common/docs/harness/WF.md +0 -174
  76. package/templates/optional/skills/browser-e2e/.claude/commands/wf-browser.md +0 -25
  77. /package/templates/common/{docs/harness → Harness}/agent-workflow.md +0 -0
  78. /package/templates/common/{docs/harness → Harness}/context-loading.md +0 -0
  79. /package/templates/common/{docs/harness → Harness}/extension.md +0 -0
  80. /package/templates/common/{docs/harness → Harness}/lifecycle.md +0 -0
  81. /package/templates/common/{docs → Harness}/research/PRD.md +0 -0
  82. /package/templates/common/{docs → Harness}/research/README.md +0 -0
@@ -1,45 +1,45 @@
1
- ---
2
- description: "Universal harness constraints"
3
- alwaysApply: true
4
- ---
5
-
6
- # Universal Rules
7
-
8
- ## Context
9
-
10
- - Start with `CLAUDE.md`, `Harness/MEMORY.md`, and `Harness/README.md`.
11
- - Do not bulk-read `Harness/`. Load by router trigger.
12
- - Keep `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` current when work has multiple steps, files, or agents.
13
- - project files are the only durable communication channel. chat/subagent transcript state is non-authoritative.
14
- - Important assumptions, decisions, blockers, evidence, and handoffs must be written to `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
15
-
16
- ## Verification
17
-
18
- - Define acceptance criteria before implementation.
19
- - New behavior: failing test first, or a written manual check if automation is not feasible yet.
20
- - Bug fix: reproduction first.
21
- - Before release, add CI for the chosen stack and run the full verification path.
22
-
23
- ## Subagents
24
-
25
- - Use `Harness/subagents.md` before orchestrating multiple agents.
26
- - Use `Harness/context-loading.md` before spawning.
27
- - Use `Harness/dispatch.md` before parallel or multi-agent work.
28
- - Use `Harness/extension.md` before adding stack-specific agents, skills, rules, or hooks.
29
- - Every subagent needs role, task, read boundary, write boundary, and return format.
30
- - Writing agents must run serially unless write sets are disjoint.
31
- - If the runtime cannot spawn subagents, emulate the same role pack in a separate bounded pass.
32
- - Main agent owns integration and final verification.
33
-
34
- ## Memory
35
-
36
- - Record a lightweight reflection in `Harness/memory/tool-usage-reflections.md` when the same tool/use pattern fails 3+ times.
37
- - Record repeated user corrections or durable preferences in `Harness/memory/user-corrections-preferences.md` when the user corrects the same assumption/pattern 2+ times.
38
- - Record reusable review/debug lessons in `Harness/memory/agent-lessons-patterns.md`.
39
- - Keep memory entries concise and never include secrets.
40
-
41
- ## Security
42
-
43
- - No secrets in source code.
44
- - Validate external input at system boundaries.
45
- - High-risk actions need explicit user approval or documented permission policy.
1
+ ---
2
+ description: "Universal harness constraints"
3
+ alwaysApply: true
4
+ ---
5
+
6
+ # Universal Rules
7
+
8
+ ## Context
9
+
10
+ - Start with `CLAUDE.md`, `Harness/MEMORY.md`, and `Harness/README.md`.
11
+ - Do not bulk-read `Harness/`. Load by router trigger.
12
+ - Keep `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` current when work has multiple steps, files, or agents.
13
+ - project files are the only durable communication channel. chat/subagent transcript state is non-authoritative.
14
+ - Important assumptions, decisions, blockers, evidence, and handoffs must be written to `Harness/tasks/<task-id>/PROGRESS.md`, `Harness/tasks/<task-id>/PLAN.md`, the current feature doc, `Harness/MEMORY.md`, or `Harness/memory/*` as appropriate.
15
+
16
+ ## Verification
17
+
18
+ - Define acceptance criteria before implementation.
19
+ - New behavior: failing test first, or a written manual check if automation is not feasible yet.
20
+ - Bug fix: reproduction first.
21
+ - Before release, add CI for the chosen stack and run the full verification path.
22
+
23
+ ## Subagents
24
+
25
+ - Use `Harness/subagents.md` before orchestrating multiple agents.
26
+ - Use `Harness/context-loading.md` before spawning.
27
+ - Use `Harness/dispatch.md` before parallel or multi-agent work.
28
+ - Use `Harness/extension.md` before adding stack-specific agents, skills, rules, or hooks.
29
+ - Every subagent needs role, task, read boundary, write boundary, and return format.
30
+ - Writing agents must run serially unless write sets are disjoint.
31
+ - If the runtime cannot spawn subagents, emulate the same role pack in a separate bounded pass.
32
+ - Main agent owns integration and final verification.
33
+
34
+ ## Memory
35
+
36
+ - Record a lightweight reflection in `Harness/memory/tool-usage-reflections.md` when the same tool/use pattern fails 3+ times.
37
+ - Record repeated user corrections or durable preferences in `Harness/memory/user-corrections-preferences.md` when the user corrects the same assumption/pattern 2+ times.
38
+ - Record reusable review/debug lessons in `Harness/memory/agent-lessons-patterns.md`.
39
+ - Keep memory entries concise and never include secrets.
40
+
41
+ ## Security
42
+
43
+ - No secrets in source code.
44
+ - Validate external input at system boundaries.
45
+ - High-risk actions need explicit user approval or documented permission policy.
@@ -1,68 +1,68 @@
1
- {
2
- "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
- "permissions": {
4
- "allow": [
5
- "Bash(git *)",
6
- "Bash(npm *)",
7
- "Bash(npx *)",
8
- "Bash(python *)",
9
- "Bash(pytest *)",
10
- "Bash(pip *)",
11
- "Bash(go *)",
12
- "Bash(cargo *)",
13
- "Bash(node *)",
14
- "Read",
15
- "Glob",
16
- "Grep",
17
- "WebFetch",
18
- "WebSearch"
19
- ],
20
- "deny": [
21
- "EnterPlanMode",
22
- "Bash(rm -rf *)",
23
- "Bash(sudo *)",
24
- "Bash(curl *)",
25
- "Bash(wget *)",
26
- "Bash(> *)",
27
- "Read(.env*)",
28
- "Read(**/secrets/**)",
29
- "Read(**/*.key)",
30
- "Read(**/*.pem)"
31
- ]
32
- },
33
- "hooks": {
34
- "SessionStart": [
35
- {
36
- "matcher": "",
37
- "hooks": [
38
- {
39
- "type": "command",
40
- "command": "node Harness/scripts/wf-mode-hook.mjs"
41
- }
42
- ]
43
- }
44
- ],
45
- "UserPromptSubmit": [
46
- {
47
- "matcher": "",
48
- "hooks": [
49
- {
50
- "type": "command",
51
- "command": "node Harness/scripts/wf-mode-hook.mjs"
52
- }
53
- ]
54
- }
55
- ],
56
- "PreToolUse": [
57
- {
58
- "matcher": "Edit|Write|MultiEdit|Bash",
59
- "hooks": [
60
- {
61
- "type": "command",
62
- "command": "node Harness/scripts/wf-mode-hook.mjs"
63
- }
64
- ]
65
- }
66
- ]
67
- }
68
- }
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
+ "permissions": {
4
+ "allow": [
5
+ "Bash(git *)",
6
+ "Bash(npm *)",
7
+ "Bash(npx *)",
8
+ "Bash(python *)",
9
+ "Bash(pytest *)",
10
+ "Bash(pip *)",
11
+ "Bash(go *)",
12
+ "Bash(cargo *)",
13
+ "Bash(node *)",
14
+ "Read",
15
+ "Glob",
16
+ "Grep",
17
+ "WebFetch",
18
+ "WebSearch"
19
+ ],
20
+ "deny": [
21
+ "EnterPlanMode",
22
+ "Bash(rm -rf *)",
23
+ "Bash(sudo *)",
24
+ "Bash(curl *)",
25
+ "Bash(wget *)",
26
+ "Bash(> *)",
27
+ "Read(.env*)",
28
+ "Read(**/secrets/**)",
29
+ "Read(**/*.key)",
30
+ "Read(**/*.pem)"
31
+ ]
32
+ },
33
+ "hooks": {
34
+ "SessionStart": [
35
+ {
36
+ "matcher": "",
37
+ "hooks": [
38
+ {
39
+ "type": "command",
40
+ "command": "node Harness/scripts/wf-mode-hook.mjs"
41
+ }
42
+ ]
43
+ }
44
+ ],
45
+ "UserPromptSubmit": [
46
+ {
47
+ "matcher": "",
48
+ "hooks": [
49
+ {
50
+ "type": "command",
51
+ "command": "node Harness/scripts/wf-mode-hook.mjs"
52
+ }
53
+ ]
54
+ }
55
+ ],
56
+ "PreToolUse": [
57
+ {
58
+ "matcher": "Edit|Write|MultiEdit|Bash",
59
+ "hooks": [
60
+ {
61
+ "type": "command",
62
+ "command": "node Harness/scripts/wf-mode-hook.mjs"
63
+ }
64
+ ]
65
+ }
66
+ ]
67
+ }
68
+ }
@@ -1,42 +1,47 @@
1
1
  ---
2
2
  name: subagent-orchestrator
3
- description: Use when work needs bounded subagent coordination, parallel read-only exploration, independent review gates, broad context partitioning, or controlled handoffs for coordination-heavy tasks.
3
+ description: Use when work needs bounded subagent coordination, parallel read-only exploration, independent review gates, broad context partitioning, or controlled handoffs.
4
4
  ---
5
5
 
6
6
  # Subagent Orchestrator
7
7
 
8
- Load:
8
+ This skill is runtime-neutral. Claude Code and Codex expose different
9
+ subagent surfaces; follow the same Harness role contract either way.
10
+
11
+ ## Load
9
12
 
10
13
  - `Harness/subagents.md`
11
14
  - `Harness/dispatch.md`
12
15
  - `Harness/context-loading.md`
13
- - `Harness/PROGRESS.md`
14
- - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when active
15
16
  - `Harness/agent-workflow.md`
16
- - `Harness/WF.md` when in `/wf`, `wf mode`, `workflow mode`, `wk mode`, or recovery loop
17
- - `.claude/agents/` roster names before choosing roles
18
-
19
- Follow:
20
-
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
- - 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.
24
- - Use the efficiency ladder in `Harness/subagents.md`: solo pass -> single reviewer -> parallel read-only -> serial build lane -> isolated lanes.
25
- - Explicit WF/WK mode requires at least 3 distinct agents from `.claude/agents/` before second planning.
26
- - Prefer the built-in roles `planner`, `researcher`, `docs-researcher`, `architect`, `test-writer`, `implementer`, `reviewer`, `debugger`, and `verifier` before inventing custom roles.
27
- - Every subagent dispatch needs a complete dispatch pack: role, goal, mode, read set, write set, forbidden scope, injected docs, dependencies, expected evidence, stop condition, and return format.
28
- - Prefer parallel read-only exploration first. Run writing agents serially unless write sets are disjoint and isolated.
29
- - Use two review gates after implementation: spec review first, then code-quality or architecture review.
30
- - If verification fails, dispatch debugger/fixer with the smallest reproduced failure, then re-review and re-verify.
31
- - If subagents are unavailable, emulate the same roles as separate bounded passes and record that fallback.
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.
33
-
34
- Return:
35
-
36
- - agents or bounded passes used
37
- - dispatch table status
38
- - accepted/rejected findings
39
- - conflicts and decisions
40
- - commands and evidence
41
- - remaining risks
42
- - updated heartbeat or next recovery action
17
+ - `Harness/PROGRESS.md`
18
+ - Active `Harness/tasks/<task-id>/PROGRESS.md` and `PLAN.md`, when present
19
+ - `Harness/WF.md` when in `/wf`, `wf mode`, `workflow mode`, or `wk mode`
20
+
21
+ ## Runtime Mapping
22
+
23
+ - Claude Code: use the `.claude/agents/` role roster and the available
24
+ subagent/task tool.
25
+ - Codex: use the available subagent tool or role mechanism in the current
26
+ surface. If unavailable, emulate the same roles as separate bounded passes.
27
+ - In every runtime, record fallback and role coverage in the task plan.
28
+
29
+ ## Rules
30
+
31
+ - The main agent is the controller. It decomposes work, writes task state,
32
+ integrates returns, and owns final verification.
33
+ - Subagents or bounded passes are readers and reporters unless a write set is
34
+ explicitly assigned and disjoint.
35
+ - Explicit WF/WK mode requires at least three distinct role passes before the
36
+ second plan.
37
+ - Every dispatch needs role, goal, mode, read set, write set, forbidden scope,
38
+ injected docs, dependencies, evidence, stop condition, and return format.
39
+ - Prefer parallel read-only exploration first. Serialize writers unless write
40
+ sets are disjoint and isolated.
41
+ - After implementation, run a spec review gate and a code/architecture review
42
+ gate before final verification.
43
+
44
+ ## Return
45
+
46
+ Report roles or bounded passes used, dispatch table status, accepted/rejected
47
+ findings, conflicts, decisions, commands, evidence, and remaining risks.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: wf
3
+ description: Use for /wf in Claude Code, $wf or /skills wf in Codex, or any long, uncertain, multi-file, migration, recovery, or architecture-heavy task that should follow Harness WF mode.
4
+ ---
5
+
6
+ # WF Mode Adapter
7
+
8
+ This skill is a thin tool adapter. The authoritative workflow lives in
9
+ `Harness/WF.md`; do not duplicate or override it here.
10
+
11
+ ## Invocation
12
+
13
+ - Claude Code: use `/wf <task>` or select the `wf` skill.
14
+ - Codex CLI or IDE: use `$wf` or `/skills` then choose `wf`.
15
+ - Codex app may also list enabled skills in the `/` menu, depending on the
16
+ current surface and feature state.
17
+
18
+ ## Load
19
+
20
+ 1. `CLAUDE.md`
21
+ 2. `Harness/MEMORY.md`
22
+ 3. `Harness/README.md`
23
+ 4. `Harness/PROGRESS.md`
24
+ 5. `Harness/WF.md`
25
+ 6. `Harness/subagents.md` before any role split
26
+
27
+ ## Rules
28
+
29
+ - Create or update a task capsule under `Harness/tasks/<task-id>/`.
30
+ - Run the WF loop from `Harness/WF.md`: intake, bounded exploration, second
31
+ plan, implementation, review, verification, recovery, and closeout.
32
+ - For explicit WF invocation, use at least three distinct role passes before
33
+ the second plan. Use real subagents when the runtime supports them; otherwise
34
+ record a bounded-pass fallback in the task plan.
35
+ - Keep `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` current before long
36
+ commands, after failures, and at closeout.
@@ -1,11 +1,14 @@
1
1
  ---
2
2
  name: wf-learn
3
- description: Use for /wf-learn or when the user wants to force a learning cycle from repeated errors, patterns, or session history. Dispatches context-master → memory-master pipeline to extract and consolidate durable knowledge.
3
+ description: Use for /wf-learn in Claude Code, $wf-learn or /skills wf-learn in Codex, or when the user wants a learning cycle from repeated errors, corrections, patterns, or session history.
4
4
  ---
5
5
 
6
- # WF Learn
6
+ # WF Learn Adapter
7
7
 
8
- Force a memory learning cycle. Context-master analyzes, memory-master consolidates. Writes to project-level `Harness/memory/*` and cross-project global memory.
8
+ Force a memory learning cycle. Context-master analyzes; memory-master
9
+ consolidates. Use the active runtime's available subagent mechanism when
10
+ present, otherwise emulate the same roles as bounded passes and record that
11
+ fallback.
9
12
 
10
13
  ## Load
11
14
 
@@ -13,34 +16,16 @@ Force a memory learning cycle. Context-master analyzes, memory-master consolidat
13
16
  - `Harness/memory/tool-usage-reflections.md`
14
17
  - `Harness/memory/user-corrections-preferences.md`
15
18
  - `Harness/memory/agent-lessons-patterns.md`
16
- - Current `Harness/PROGRESS.md` for active task context
19
+ - Current `Harness/PROGRESS.md` and active task capsule, if any
17
20
 
18
21
  ## Flow
19
22
 
20
- ```text
21
- 1. context-master: analyze session, extract patterns
22
- 2. memory-master: categorize + deduplicate + write to memory files
23
- 3. CEO: commit memory files
24
- ```
25
-
26
- ## Write Targets
27
-
28
- | Scope | Path | When |
29
- |---|---|---|
30
- | Project | `Harness/memory/tool-usage-reflections.md` | tool/command patterns found |
31
- | Project | `Harness/memory/user-corrections-preferences.md` | user preferences found |
32
- | Project | `Harness/memory/agent-lessons-patterns.md` | review/debug lessons found |
33
- | Global | `<user>/.claude/projects/*/memory/` | cross-project patterns |
34
-
35
- ## Rules
36
-
37
- - Never auto-write without context-master analysis first.
38
- - Memory-master handles dedup — if existing entry covers the same ground, update instead of creating duplicate.
39
- - If no new patterns found, report "nothing to learn" — don't force empty writes.
40
- - Subagents are readers and reporters. CEO writes the final memory files.
23
+ 1. Analyze the session for repeated failures, durable user corrections, and
24
+ reusable review/debug lessons.
25
+ 2. Deduplicate against existing memory.
26
+ 3. Write only concise, durable, non-secret lessons to `Harness/memory/*`.
41
27
 
42
28
  ## Return
43
29
 
44
- - Files written or updated
45
- - Patterns extracted (one-line each)
46
- - Skipped (with reason)
30
+ Report files updated, patterns extracted, skipped candidates, and why each
31
+ memory entry should survive context loss.
@@ -1,99 +1,35 @@
1
1
  ---
2
2
  name: wf-max
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.
3
+ description: Use for /wf-max in Claude Code, $wf-max or /skills wf-max in Codex, or maximum-parallelism Harness work with CEO to manager to worker decomposition.
4
4
  ---
5
5
 
6
- # WF Max — Maximum Parallelism
6
+ # WF-MAX Adapter
7
7
 
8
- **WF-MAX ACTIVE: You are CEO, not implementer.**
8
+ This skill is a thin tool adapter. The authoritative workflow lives in
9
+ `Harness/WF-MAX.md`; do not duplicate or override it here.
9
10
 
10
- ```
11
- CEO CONTRACT (enforced by hooks + D-GATE):
11
+ ## Invocation
12
12
 
13
- ALLOWED: Read (scoping), Grep/Glob (scoping), Agent (spawn), Task (tracking),
14
- Write (PLAN.md/PROGRESS.md only), Bash (ls/dir/tree/git only)
13
+ - Claude Code: use `/wf-max [task]` or select the `wf-max` skill.
14
+ - Codex CLI or IDE: use `$wf-max` or `/skills` then choose `wf-max`.
15
+ - Codex app may also list enabled skills in the `/` menu.
15
16
 
16
- FORBIDDEN: Edit/Write/MultiEdit on source files, Bash (build/run/edit),
17
- sequential spawn (batch ALL agents in ONE message),
18
- Read (deep source — delegate to Workers)
17
+ ## Load
19
18
 
20
- If tempted to edit source → STOP. Spawn a Worker.
21
- ```
19
+ 1. `CLAUDE.md`
20
+ 2. `Harness/MEMORY.md`
21
+ 3. `Harness/README.md`
22
+ 4. `Harness/WF-MAX.md`
23
+ 5. `Harness/subagents.md`
24
+ 6. `Harness/dispatch.md`
25
+ 7. `Harness/agent-workflow.md`
22
26
 
23
- ## Load (authoritative specs)
27
+ ## Rules
24
28
 
25
- - `Harness/WF-MAX.md` full spec: organization model, Decomposition Gate, span formula, anti-pattern catalog, wave orchestration
26
- - `Harness/subagents.md` agent roster, controller role, efficiency ladder
27
- - `Harness/dispatch.md` File claim, Concurrency group handoff fields
28
- - `Harness/agent-workflow.md` cohesion rule, completion gate
29
-
30
- ## Trigger & When NOT to Use
31
-
32
- **Explicit invocation always fans out — no file-count escape.** When the user types `/wf-max`, spawning subagents is mandatory and unconditional. File count, task size, and overhead DO NOT apply to explicit invocation — they govern only AUTO-triggering. A 1-file `/wf-max` still fans out. "Degrade to /wf" changes the organization (flat vs CEO→Manager→Worker), never the fact of fan-out — `/wf` itself requires ≥3 subagents. There is NO path from an explicitly typed `/wf-max` to a solo main-thread pass.
33
-
34
- - **Trigger**: `/wf-max [task]`, or auto when write-set ≥5 files AND clear disjoint boundaries (parallelismScore ≥2.0)
35
- - **Auto-trigger degradation only** (never applies to explicit `/wf-max`): files <5, all changes share single interface (serial dependency), import/re-export refactor (global consistency needed), overhead >0.30
36
- - **Leaf conditions** (stop splitting): files ≤ span×2, avgLines <50, overhead >0.30
37
-
38
- ## Hard Constraints
39
-
40
- 1. **CEO never writes production code.** CEO uses Agent, Read, Grep/Glob. No Edit/Write/MultiEdit on source files. Exception: CEO MAY write to `Harness/tasks/<id>/PLAN.md` and `Harness/tasks/<id>/PROGRESS.md` (task artifacts, not production code).
41
- 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 + Self-Audit Checklist).
42
- 3. **Single-message dispatch.** ALL parallel Workers for a wave MUST be spawned in ONE message. Sequential one-per-turn spawning defeats parallelism (AP6).
43
- 4. **Worker rule**: one write file per Worker (anti-bundling, Gate Rule #1). **Manager rule**: Manager count ≥ ceil(sqrt(write_files) / 3) (anti-under-decomposition, Gate Rule #2). Each Manager: 2-7 Workers (Gate Rule #3).
44
- 5. **Manager MUST spawn ≥2 Workers or dissolve.** 0-1 Workers = Phantom Manager (AP5).
45
- 6. **Overhead > 0.30 → degrade to /wf.** Record the decision in PLAN.md.
46
-
47
- ## When to Ask the User (AskUserQuestion)
48
-
49
- CEO MUST use the `AskUserQuestion` tool when:
50
-
51
- - Intent ambiguous after exploration (≥2 valid interpretations)
52
- - Scope trade-off needs user decision (e.g. "full rewrite vs minimal fix")
53
- - Architecture direction has ≥2 viable approaches with different trade-offs
54
- - User gave vague request like "improve performance" or "clean up code"
55
- - D-GATE reveals >7 files — ask user to narrow scope
56
-
57
- Format: 2-4 options per question, `multiSelect: false` for exclusive choices. Each option must include a `description` explaining the trade-off. Example:
58
-
59
- ```
60
- Q: "Auth refactor scope?"
61
- [1] "Minimal" — fix token validation only, 1 file
62
- [2] "Standard" — extract middleware + add tests, 3-5 files
63
- [3] "Full" — new auth module with pluggable providers, 8-12 files
64
- ```
65
-
66
- ## Manager Synthesis (retry/escalation)
67
-
68
- ```
69
- 1. COLLECT → 2. DEDUPLICATE → 3. CONFLICT (flag, no silent resolve) → 4. SYNTHESIZE → 5. REPORT
70
- ```
71
- Worker failure: retry 1× → on 2nd failure, Manager absorbs or escalates to CEO for replan.
72
-
73
- ## Wave Order
74
-
75
- ```
76
- W0 (Explore) → E-GATE → W1 (Architecture) → D-GATE → W2 (Implement, single-message) → W2R (Review) → W3+ (dependent waves) → INTEGRATION → CLOSEOUT
77
- ```
78
-
79
- ## Anti-Pattern Quick Check (before every wave)
80
-
81
- | AP | Pattern | Fix |
82
- |----|---------|-----|
83
- | AP1 | CEO-as-Worker | Re-delegate to Worker |
84
- | AP2 | Under-decomposition | Split files by concern |
85
- | AP3 | Serialization trap | Dispatch X and Y in parallel NOW |
86
- | AP4 | Fake parallelism | One file = one Writer |
87
- | AP5 | Phantom Manager | Dissolve, absorb by sibling |
88
- | AP6 | Sequential spawn | Batch ALL Task() in ONE message |
89
- | AP7 | Silent degrade | Record justification in PLAN.md |
90
-
91
- ## Return Format
92
-
93
- - Dispatch Table (every wave, in PLAN.md)
94
- - Self-Audit Checklist (D-GATE, all items checked)
95
- - Worker returns (raw, per wave)
96
- - Manager synthesis reports
97
- - CEO integration decisions
98
- - Verification evidence
99
- - Agent count used vs minimum required (Manager_min audit)
29
+ - Treat yourself as CEO, not implementer.
30
+ - Do not edit production/source files directly while WF-MAX is active.
31
+ - Use the D-GATE in `Harness/WF-MAX.md` before any implementation wave:
32
+ dispatch table, self-audit, disjoint file claims, and reviewer plan.
33
+ - Use real subagents when the runtime supports them; otherwise record a
34
+ bounded-pass fallback in `Harness/tasks/<task-id>/PLAN.md`.
35
+ - Keep `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` current.
@@ -1,49 +1,49 @@
1
- ---
2
- name: wf-readme
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
- ---
5
-
6
- # README Optimizer
7
-
8
- Improve `README.md` without breaking project-owned public docs.
9
-
10
- ## Load
11
-
12
- - root `README.md`
13
- - package files and scripts (`package.json`, `pyproject.toml`, `go.mod`, etc.)
14
- - CI files when present
15
- - `Harness/PROGRESS.md`
16
- - `Harness/tasks/<task-id>/PLAN.md` when available
17
- - `Harness/architecture.md` only when an architecture summary or diagram is requested
18
-
19
- ## Mode
20
-
21
- Ask the user which mode they approve when the existing README is meaningful:
22
-
23
- | Mode | Use when | Allowed edit |
24
- | --- | --- | --- |
25
- | Preserve + append | default for existing projects | Add only a compact Development, Test, Build, Git, or Harness section |
26
- | Structure pass | README is stale, hard to scan, or missing operational docs | Reorganize with headings, tables, command blocks, and links while preserving facts |
27
- | Full rewrite | user explicitly wants a polished public README | Rewrite after approval; keep claims source-backed |
28
-
29
- If unanswered, use Preserve + append.
30
-
31
- ## Rules
32
-
33
- - Preserve existing product, package, API, and public-facing content unless the user approves a rewrite.
34
- - Do not invent features, benchmarks, roadmap, support policy, badges, install commands, or CI status.
35
- - Use tables for command matrices, environment variables, endpoints, and deployment notes when facts are known.
36
- - Use Mermaid or ASCII architecture diagrams only when the structure is observed or approved; label uncertain diagrams as proposed.
37
- - Keep detailed architecture in `Harness/architecture.md`; README may link to it or show a short overview.
38
- - Keep agent rules in `CLAUDE.md`/`AGENTS.md`, not README.
39
- - Record the chosen mode and any skipped README improvements in `Harness/tasks/<task-id>/PLAN.md` when available.
40
-
41
- ## Output
42
-
43
- Before broad edits, return:
44
-
45
- 1. chosen mode
46
- 2. sections to preserve
47
- 3. sections to add or reorganize
48
- 4. facts still unknown
49
- 5. verification command or manual review step
1
+ ---
2
+ name: wf-readme
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
+ ---
5
+
6
+ # README Optimizer
7
+
8
+ Improve `README.md` without breaking project-owned public docs.
9
+
10
+ ## Load
11
+
12
+ - root `README.md`
13
+ - package files and scripts (`package.json`, `pyproject.toml`, `go.mod`, etc.)
14
+ - CI files when present
15
+ - `Harness/PROGRESS.md`
16
+ - `Harness/tasks/<task-id>/PLAN.md` when available
17
+ - `Harness/architecture.md` only when an architecture summary or diagram is requested
18
+
19
+ ## Mode
20
+
21
+ Ask the user which mode they approve when the existing README is meaningful:
22
+
23
+ | Mode | Use when | Allowed edit |
24
+ | --- | --- | --- |
25
+ | Preserve + append | default for existing projects | Add only a compact Development, Test, Build, Git, or Harness section |
26
+ | Structure pass | README is stale, hard to scan, or missing operational docs | Reorganize with headings, tables, command blocks, and links while preserving facts |
27
+ | Full rewrite | user explicitly wants a polished public README | Rewrite after approval; keep claims source-backed |
28
+
29
+ If unanswered, use Preserve + append.
30
+
31
+ ## Rules
32
+
33
+ - Preserve existing product, package, API, and public-facing content unless the user approves a rewrite.
34
+ - Do not invent features, benchmarks, roadmap, support policy, badges, install commands, or CI status.
35
+ - Use tables for command matrices, environment variables, endpoints, and deployment notes when facts are known.
36
+ - Use Mermaid or ASCII architecture diagrams only when the structure is observed or approved; label uncertain diagrams as proposed.
37
+ - Keep detailed architecture in `Harness/architecture.md`; README may link to it or show a short overview.
38
+ - Keep agent rules in `CLAUDE.md`/`AGENTS.md`, not README.
39
+ - Record the chosen mode and any skipped README improvements in `Harness/tasks/<task-id>/PLAN.md` when available.
40
+
41
+ ## Output
42
+
43
+ Before broad edits, return:
44
+
45
+ 1. chosen mode
46
+ 2. sections to preserve
47
+ 3. sections to add or reorganize
48
+ 4. facts still unknown
49
+ 5. verification command or manual review step