create-harness-vibe-coding 0.8.1 → 0.8.2

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 (34) hide show
  1. package/README-CN.md +15 -11
  2. package/README.md +21 -12
  3. package/package.json +1 -1
  4. package/src/index.js +210 -10
  5. package/templates/common/.claude/agents/tdd-guide.md +55 -0
  6. package/templates/common/.claude/settings.json +22 -0
  7. package/templates/common/.claude/skills/tdd/SKILL.md +30 -0
  8. package/templates/common/.claude/skills/wf-auto/SKILL.md +107 -0
  9. package/templates/common/.claude/skills/wf-auto-spark/SKILL.md +39 -0
  10. package/templates/common/.claude/skills/wf-max/SKILL.md +10 -2
  11. package/templates/common/.claude/skills/wf-remove/SKILL.md +12 -5
  12. package/templates/common/.claude/skills/wf-update/SKILL.md +12 -5
  13. package/templates/common/.codex/hooks.json +59 -37
  14. package/templates/common/.harness-version +48 -25
  15. package/templates/common/AGENTS.md +5 -5
  16. package/templates/common/CLAUDE.md +12 -17
  17. package/templates/common/Harness/ECC-GUIDE.md +246 -0
  18. package/templates/common/Harness/README.md +129 -130
  19. package/templates/common/Harness/TDD-GUIDE.md +83 -0
  20. package/templates/common/Harness/WF-AUTO-SPARK.md +297 -0
  21. package/templates/common/Harness/WF-AUTO.md +508 -0
  22. package/templates/common/Harness/WF-MAX.md +24 -0
  23. package/templates/common/Harness/context-loading.md +38 -1
  24. package/templates/common/Harness/dispatch.md +40 -40
  25. package/templates/common/Harness/subagents.md +7 -21
  26. package/templates/common/Harness/tasks/_template/NAMING.md +47 -0
  27. package/templates/common/MEMORY.md +73 -66
  28. package/templates/common/SETUP.md +100 -78
  29. package/templates/common/scripts/validate-harness.mjs +92 -58
  30. package/templates/common/scripts/wf-mode-hook.mjs +895 -318
  31. package/templates/common/scripts/wf-remove.mjs +301 -81
  32. package/templates/common/scripts/wf-statusline.ps1 +62 -38
  33. package/templates/common/scripts/wf-statusline.sh +67 -48
  34. package/templates/common/scripts/wf-update-check.mjs +179 -81
@@ -19,14 +19,21 @@ description: Use for /wf-update in Claude Code, $wf-update or /skills wf-update
19
19
 
20
20
  ## Flow
21
21
 
22
- 1. Run `node Harness/scripts/wf-update-check.mjs` first.
22
+ 1. Run `node Harness/scripts/wf-update-check.mjs --json` first and use the
23
+ `agent` block as the action plan.
23
24
  2. Preserve all PRESERVE files. Never overwrite user task, memory, research,
24
25
  README, package, or architecture files.
25
- 3. Apply SAFE and NEW files through the script.
26
- 4. Ask the user before every CONFLICT file: merge, overwrite, or keep.
27
- 5. After update, run the validator and then scan-clean.
26
+ 3. If `agent.safeApplyCommand` is present, run it to apply SAFE and NEW files
27
+ before spending AI time on conflicts. Default command:
28
+ `node Harness/scripts/wf-update-check.mjs --apply-safe`.
29
+ 4. For every `agent.aiMergeRequired` entry, compare the local file with
30
+ `templateHint` or `remoteUrl`, then choose merge, keep-local, or
31
+ overwrite-from-template. Ask the user only when the intent is ambiguous.
32
+ 5. Use strict `--apply` only when the JSON plan has zero conflicts.
33
+ 6. After update, run the validator and then scan-clean.
28
34
 
29
35
  ## Return
30
36
 
31
37
  Report version, SAFE/NEW updates, conflicts and decisions, preserved files,
32
- validation output, scan-clean result, and remaining risks.
38
+ partialUpdate status if any, validation output, scan-clean result, and
39
+ remaining risks.
@@ -1,37 +1,59 @@
1
- {
2
- "hooks": {
3
- "SessionStart": [
4
- {
5
- "matcher": "",
6
- "hooks": [
7
- {
8
- "type": "command",
9
- "command": "node Harness/scripts/wf-mode-hook.mjs"
10
- }
11
- ]
12
- }
13
- ],
14
- "UserPromptSubmit": [
15
- {
16
- "matcher": "",
17
- "hooks": [
18
- {
19
- "type": "command",
20
- "command": "node Harness/scripts/wf-mode-hook.mjs"
21
- }
22
- ]
23
- }
24
- ],
25
- "PreToolUse": [
26
- {
27
- "matcher": "Edit|Write|MultiEdit|Bash",
28
- "hooks": [
29
- {
30
- "type": "command",
31
- "command": "node Harness/scripts/wf-mode-hook.mjs"
32
- }
33
- ]
34
- }
35
- ]
36
- }
37
- }
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node Harness/scripts/wf-mode-hook.mjs"
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "UserPromptSubmit": [
15
+ {
16
+ "matcher": "",
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "node Harness/scripts/wf-mode-hook.mjs"
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "PreToolUse": [
26
+ {
27
+ "matcher": "Edit|Write|MultiEdit|Bash",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "node Harness/scripts/wf-mode-hook.mjs"
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ "PostToolUse": [
37
+ {
38
+ "matcher": "",
39
+ "hooks": [
40
+ {
41
+ "type": "command",
42
+ "command": "node Harness/scripts/wf-mode-hook.mjs"
43
+ }
44
+ ]
45
+ }
46
+ ],
47
+ "Stop": [
48
+ {
49
+ "matcher": "",
50
+ "hooks": [
51
+ {
52
+ "type": "command",
53
+ "command": "node Harness/scripts/wf-mode-hook.mjs"
54
+ }
55
+ ]
56
+ }
57
+ ]
58
+ }
59
+ }
@@ -1,17 +1,20 @@
1
1
  {
2
- "generator": "0.8.1",
3
- "generated": "2026-07-01T06:31:02.525Z",
2
+ "generator": "0.8.2",
3
+ "generated": "2026-07-02T04:28:22.774Z",
4
4
  "options": [],
5
5
  "autoCheck": true,
6
6
  "source": "https://raw.githubusercontent.com/zingspark/create-harness-vibe-coding/main/templates/common/",
7
7
  "checksums": {
8
8
  ".agents/skills/subagent-orchestrator/SKILL.md": "sha256-d17b1e49aa8e3125b17621242f620ac89c10692fac853bf0a682a87f660d86da",
9
+ ".agents/skills/tdd/SKILL.md": "sha256-2a86f45b3685670f5f214fdcc8d21ecc3d04f42af4f7cae2a38e994ab24bfb1e",
10
+ ".agents/skills/wf-auto-spark/SKILL.md": "sha256-b07a3570e232cf47b179b9774daed4c00d7756ccce9e2339556d3544f92cf02b",
11
+ ".agents/skills/wf-auto/SKILL.md": "sha256-ac3177dc7c5f40f99017b79dbb71722325f75c2e608f20aca780fd874c9755ee",
9
12
  ".agents/skills/wf-learn/SKILL.md": "sha256-7f3e1ee0aa83cbb76707698d0c26b703ad5c74b2df95a7dc4d751939a4ba05b2",
10
- ".agents/skills/wf-max/SKILL.md": "sha256-5463c4ac6a34848639c176000ef3f1989c54e7cb795e47251ef465782118a18d",
13
+ ".agents/skills/wf-max/SKILL.md": "sha256-9b37cc3385f6d1a285b617169e91fbf71ffec76135b7b46ec1de2fe94ca220da",
11
14
  ".agents/skills/wf-readme/SKILL.md": "sha256-4d34ee3b6b305fa2581f5d8cb31e9152759f3df8bf8fa08efbb43782f128bdcd",
12
- ".agents/skills/wf-remove/SKILL.md": "sha256-34888c78feade04e8b6d1f22e366c04e3daefc8c0f9e6ea39f52cf0a7f3ec01f",
15
+ ".agents/skills/wf-remove/SKILL.md": "sha256-f27aee81d4d6988186f468ccc5dfd02c7605967636a5aea93d92443e030dbcc2",
13
16
  ".agents/skills/wf-review/SKILL.md": "sha256-cc6d536ec6de25546a0ba96e686f195da50ed11bc03763a76ef46d77243d3537",
14
- ".agents/skills/wf-update/SKILL.md": "sha256-c58d1238d2a5f47dda9c8bea2ccd95d350e39ef0985c9c69d8111e7e84a3a4b6",
17
+ ".agents/skills/wf-update/SKILL.md": "sha256-d57cd89e271b2af63b6a1264af552a30f8d44959cf4782b42f0ab082a90be9cf",
15
18
  ".agents/skills/wf/SKILL.md": "sha256-70766bd2cb02bc489b5cc021797af62596a005d444a026abb511054a1a820a67",
16
19
  ".claude/agents/architect-manager.md": "sha256-d98c3a2d044d5216d9bcde217b4359b1c33f5be152416e242807652ddcd2868b",
17
20
  ".claude/agents/architect.md": "sha256-61cea40c8c3e01bd53f3ad642ef734850fdb931497e7ee20552ea7a8b4e7b70c",
@@ -26,44 +29,55 @@
26
29
  ".claude/agents/researcher.md": "sha256-402fef14dee8f495dc9ddfad5af3ad233d254326b49b831f604014a8cb6d0beb",
27
30
  ".claude/agents/review-manager.md": "sha256-fb8fbd6c6624279cc97aa3dbd50ec20c150ff4a2d195788bc8537d98699cc41b",
28
31
  ".claude/agents/reviewer.md": "sha256-2913b7799fcd8e162f01ae0de09a41ec7083de5f0cae3abcd4ecc62acc675a6b",
32
+ ".claude/agents/tdd-guide.md": "sha256-c1663ffba6e48c7c19b0de1bb3eae674b3e85386fc959b15dd30d696aef6433c",
29
33
  ".claude/agents/test-writer.md": "sha256-9018a9f65f1861a9bade999790e945d258781c1d846eb30a9de23ec3ce5f1d82",
30
34
  ".claude/agents/verifier.md": "sha256-6d8ca8bd13d7bb7680423875269e407c06aca60334df44d9230a015aabd0a8d0",
31
35
  ".claude/rules/ecc/common.md": "sha256-157c300e3b47049998d1bca867da6f9b54efb5de6efbabbb64a22af4cb2b84e8",
32
- ".claude/settings.json": "sha256-3ee53515a829b85267b7330fad9e90d797f1bd16964ec9f876fdd630a0d2c093",
36
+ ".claude/settings.json": "sha256-4a2bdeb15d9911c8fa624e90ef977e857790981017ff10f44de36a343249ce25",
33
37
  ".claude/skills/subagent-orchestrator/SKILL.md": "sha256-d17b1e49aa8e3125b17621242f620ac89c10692fac853bf0a682a87f660d86da",
38
+ ".claude/skills/tdd/SKILL.md": "sha256-2a86f45b3685670f5f214fdcc8d21ecc3d04f42af4f7cae2a38e994ab24bfb1e",
39
+ ".claude/skills/wf-auto-spark/SKILL.md": "sha256-b07a3570e232cf47b179b9774daed4c00d7756ccce9e2339556d3544f92cf02b",
40
+ ".claude/skills/wf-auto/SKILL.md": "sha256-ac3177dc7c5f40f99017b79dbb71722325f75c2e608f20aca780fd874c9755ee",
34
41
  ".claude/skills/wf-learn/SKILL.md": "sha256-7f3e1ee0aa83cbb76707698d0c26b703ad5c74b2df95a7dc4d751939a4ba05b2",
35
- ".claude/skills/wf-max/SKILL.md": "sha256-5463c4ac6a34848639c176000ef3f1989c54e7cb795e47251ef465782118a18d",
42
+ ".claude/skills/wf-max/SKILL.md": "sha256-9b37cc3385f6d1a285b617169e91fbf71ffec76135b7b46ec1de2fe94ca220da",
36
43
  ".claude/skills/wf-readme/SKILL.md": "sha256-4d34ee3b6b305fa2581f5d8cb31e9152759f3df8bf8fa08efbb43782f128bdcd",
37
- ".claude/skills/wf-remove/SKILL.md": "sha256-34888c78feade04e8b6d1f22e366c04e3daefc8c0f9e6ea39f52cf0a7f3ec01f",
44
+ ".claude/skills/wf-remove/SKILL.md": "sha256-f27aee81d4d6988186f468ccc5dfd02c7605967636a5aea93d92443e030dbcc2",
38
45
  ".claude/skills/wf-review/SKILL.md": "sha256-cc6d536ec6de25546a0ba96e686f195da50ed11bc03763a76ef46d77243d3537",
39
- ".claude/skills/wf-update/SKILL.md": "sha256-c58d1238d2a5f47dda9c8bea2ccd95d350e39ef0985c9c69d8111e7e84a3a4b6",
46
+ ".claude/skills/wf-update/SKILL.md": "sha256-d57cd89e271b2af63b6a1264af552a30f8d44959cf4782b42f0ab082a90be9cf",
40
47
  ".claude/skills/wf/SKILL.md": "sha256-70766bd2cb02bc489b5cc021797af62596a005d444a026abb511054a1a820a67",
41
48
  ".codex/config.toml": "sha256-d37497c3278121598a663564ab38b53f658969717f78decb661ddd11c66551ea",
42
- ".codex/hooks.json": "sha256-6d8d237b4a038a48fbadbdd087d9a68dba024bcfd748f59968252ebae7cc2e96",
43
- "AGENTS.md": "sha256-bbc17b119ff579e500dcd36e78f9cf600ccda27fa7b32903f233ad96a97058ff",
44
- "CLAUDE.md": "sha256-432bd4dc9bdf9958d79ae697f72d1c9723be23fb156d43889ede84e305ed5e70",
45
- "Harness/MEMORY.md": "sha256-68b3e2b68880814bad11aa6d444d6b736848ac14c2a758ec3225c688a2c1882e",
46
- "Harness/README.md": "sha256-6608f74400dbae1e73b838d6b74f02e73a0b0e54404e899628dde6ccfbf06cf4",
47
- "Harness/SETUP.md": "sha256-e0fdd6a7751595f62f15d4374e1f201fcd0aa8b8ac44528a39cbf5b04db0e3bd",
48
- "Harness/WF-MAX.md": "sha256-81c788ac56a0c1673a9e6bdf619efbcfa9c961ca7c5065c15b98760775f963a6",
49
+ ".codex/hooks.json": "sha256-ec2322e080b96b1c0cb86161476ff75a4ed00312b57eed979d7d4a379365d0b7",
50
+ "AGENTS.md": "sha256-c6e6f08195c41b49b682291c7b83f55acd9750767a7eef3811bf5bbdaa66f76a",
51
+ "CLAUDE.md": "sha256-b62a1bc5410280ed17f87ba591f571a0917f438589627fc50e9a53b9e9d0bb75",
52
+ "Harness/ECC-GUIDE.md": "sha256-48924c4c0e17dc47be53d616a6690415307688f971ec872d8860c5bbe64c90d7",
53
+ "Harness/MEMORY.md": "sha256-6e01795e787eb809f856cce8d90a15a118f8fac1ebbb71dd746a868f207a9457",
54
+ "Harness/README.md": "sha256-3f33274b01d100f20694efdf6c4633a01a79dcef9c9b8974ad5e8796ef928dc6",
55
+ "Harness/SETUP.md": "sha256-2a59db4e5053faf5f82ceb402491df016fee93bd59449202d4c9e1e7388df977",
56
+ "Harness/TDD-GUIDE.md": "sha256-a038f0aea67c72220684d6854536ad7b2d59ab52342374d4710f2c94828f88c4",
57
+ "Harness/WF-AUTO-SPARK.md": "sha256-48cc08e1a78cd4abb2ae9c2807ef1ac9a09544eb954220b9087b2032fabbd690",
58
+ "Harness/WF-AUTO.md": "sha256-ac0ab13e11ca658cd2c5b6ce73f3d267bea6391a04e850c9f9a24d642f1ad350",
59
+ "Harness/WF-MAX.md": "sha256-98a4a918eb8e97c40422c7e133a0bc33184faf7771ca9645f4161d82a5cac8cb",
49
60
  "Harness/WF.md": "sha256-7cce2568444295cb387fa958cd4ef9711a19697b60ce9cba0e142484e0a165ae",
50
61
  "Harness/agent-workflow.md": "sha256-1aff5e7dc1e082c559cb0a9086c4f93f6702905aff00ebb957300f463ea80b31",
51
- "Harness/context-loading.md": "sha256-0d97d6ec2325063f7158511f3462ca9cbdf3b6db177a79dac8ee7d2cb7930264",
52
- "Harness/dispatch.md": "sha256-e0c6a3a46acc8899574c9b6d6bb4da119adb9e9ed1ce91acc9f7a688ed3aea15",
62
+ "Harness/context-loading.md": "sha256-a2e71435e127c2ff5b70ebfddb1a8bbaa64dfd584505fbd6e14dc059e18cc6a1",
63
+ "Harness/dispatch.md": "sha256-e823b905bbdcae396d759f281bbd413693904c80b6c18f7993718e63a961b2a6",
53
64
  "Harness/extension.md": "sha256-686f76d83e91750c20d4f5aa8e614f5003baeb5a703d0451f469ca7eeab75e37",
54
65
  "Harness/lifecycle.md": "sha256-5979c37e66e35940cb707f8cd71e97d53bb05399c3281c714f69499abdee59a4",
55
66
  "Harness/research/README.md": "sha256-956c154df01cb9376972eb8b88bb3be0fe4e2dda802a72457c0126e3476fa755",
56
67
  "Harness/scripts/scan-clean.mjs": "sha256-7f693faf762c9c8e7657143d651f7c8369ed4823f18babe21daec58a55025593",
57
- "Harness/scripts/validate-harness.mjs": "sha256-f3211c2149918b1cfc83648ea2e992b80c45b0c00f9a5b9f02a6f6094e7791d6",
58
- "Harness/scripts/wf-mode-hook.mjs": "sha256-289f0df4155dd8523507f59add5eac72c0aa92efc85a78d5a46350b9c9bb4f80",
59
- "Harness/scripts/wf-remove.mjs": "sha256-2ae2687c63cd3aea3b36713d67ce78811df6541a19904b153d17518b6268938b",
60
- "Harness/scripts/wf-statusline.ps1": "sha256-53c2e0178e9a0826516731b1145f96f55ff6c57fb1f31bf6f1a7210a8502ca65",
61
- "Harness/scripts/wf-statusline.sh": "sha256-053908cd4d53dea162252077c6cc5544ccd164455739f6edfbf254945f06ea2f",
62
- "Harness/scripts/wf-update-check.mjs": "sha256-8c3fa219e902056c20c55b2abfa5152349d9e00f4faa5bef646f78bfb71c486f",
63
- "Harness/subagents.md": "sha256-e66f4bef8ce6c118cf0ec8c511f727a8c2c40bce25dcf5b754489d89915a47ba"
68
+ "Harness/scripts/validate-harness.mjs": "sha256-fd904202f99cd30ad7ce69f5343c4adca94ab30b7a5f8eab37004d748e0779ab",
69
+ "Harness/scripts/wf-mode-hook.mjs": "sha256-fbf2c398bfe21374fc5d0230133dfa16feff6afe79598bd185aae49643075545",
70
+ "Harness/scripts/wf-remove.mjs": "sha256-ae941d34d7d263f2b65751d177673a3c4fb11c326885ca413245e3f93e99a006",
71
+ "Harness/scripts/wf-statusline.ps1": "sha256-49effdea8b0980e762a9440f4be9011543ede3533f6df1b2008368d78c427fcc",
72
+ "Harness/scripts/wf-statusline.sh": "sha256-6fa034fab9abe9361daae14cdb802f69825ce20d4bf6a9c18f58c04e971693ac",
73
+ "Harness/scripts/wf-update-check.mjs": "sha256-d14ce08f4c05ba118362a56a4b7d5965b114bc2b15a023c08e21d57f32b2cf93",
74
+ "Harness/subagents.md": "sha256-31818b96f4e834087d8ce8887758f303114b3fd67fb9819fd661f78170fb39d3"
64
75
  },
65
76
  "sources": {
66
77
  ".agents/skills/subagent-orchestrator/SKILL.md": ".claude/skills/subagent-orchestrator/SKILL.md",
78
+ ".agents/skills/tdd/SKILL.md": ".claude/skills/tdd/SKILL.md",
79
+ ".agents/skills/wf-auto-spark/SKILL.md": ".claude/skills/wf-auto-spark/SKILL.md",
80
+ ".agents/skills/wf-auto/SKILL.md": ".claude/skills/wf-auto/SKILL.md",
67
81
  ".agents/skills/wf-learn/SKILL.md": ".claude/skills/wf-learn/SKILL.md",
68
82
  ".agents/skills/wf-max/SKILL.md": ".claude/skills/wf-max/SKILL.md",
69
83
  ".agents/skills/wf-readme/SKILL.md": ".claude/skills/wf-readme/SKILL.md",
@@ -84,11 +98,15 @@
84
98
  ".claude/agents/researcher.md": ".claude/agents/researcher.md",
85
99
  ".claude/agents/review-manager.md": ".claude/agents/review-manager.md",
86
100
  ".claude/agents/reviewer.md": ".claude/agents/reviewer.md",
101
+ ".claude/agents/tdd-guide.md": ".claude/agents/tdd-guide.md",
87
102
  ".claude/agents/test-writer.md": ".claude/agents/test-writer.md",
88
103
  ".claude/agents/verifier.md": ".claude/agents/verifier.md",
89
104
  ".claude/rules/ecc/common.md": ".claude/rules/ecc/common.md",
90
105
  ".claude/settings.json": ".claude/settings.json",
91
106
  ".claude/skills/subagent-orchestrator/SKILL.md": ".claude/skills/subagent-orchestrator/SKILL.md",
107
+ ".claude/skills/tdd/SKILL.md": ".claude/skills/tdd/SKILL.md",
108
+ ".claude/skills/wf-auto-spark/SKILL.md": ".claude/skills/wf-auto-spark/SKILL.md",
109
+ ".claude/skills/wf-auto/SKILL.md": ".claude/skills/wf-auto/SKILL.md",
92
110
  ".claude/skills/wf-learn/SKILL.md": ".claude/skills/wf-learn/SKILL.md",
93
111
  ".claude/skills/wf-max/SKILL.md": ".claude/skills/wf-max/SKILL.md",
94
112
  ".claude/skills/wf-readme/SKILL.md": ".claude/skills/wf-readme/SKILL.md",
@@ -102,10 +120,14 @@
102
120
  "AGENTS.md": "AGENTS.md",
103
121
  "CLAUDE.md": "CLAUDE.md",
104
122
  "Harness/.harness-version": ".harness-version",
123
+ "Harness/ECC-GUIDE.md": "Harness/ECC-GUIDE.md",
105
124
  "Harness/MEMORY.md": "MEMORY.md",
106
125
  "Harness/PROGRESS.md": "Harness/PROGRESS.md",
107
126
  "Harness/README.md": "Harness/README.md",
108
127
  "Harness/SETUP.md": "SETUP.md",
128
+ "Harness/TDD-GUIDE.md": "Harness/TDD-GUIDE.md",
129
+ "Harness/WF-AUTO-SPARK.md": "Harness/WF-AUTO-SPARK.md",
130
+ "Harness/WF-AUTO.md": "Harness/WF-AUTO.md",
109
131
  "Harness/WF-MAX.md": "Harness/WF-MAX.md",
110
132
  "Harness/WF.md": "Harness/WF.md",
111
133
  "Harness/agent-workflow.md": "Harness/agent-workflow.md",
@@ -129,6 +151,7 @@
129
151
  "Harness/scripts/wf-update-check.mjs": "scripts/wf-update-check.mjs",
130
152
  "Harness/subagents.md": "Harness/subagents.md",
131
153
  "Harness/tasks/_template/ARTIFACTS.md": "Harness/tasks/_template/ARTIFACTS.md",
154
+ "Harness/tasks/_template/NAMING.md": "Harness/tasks/_template/NAMING.md",
132
155
  "Harness/tasks/_template/NOTES.md": "Harness/tasks/_template/NOTES.md",
133
156
  "Harness/tasks/_template/PLAN.md": "Harness/tasks/_template/PLAN.md",
134
157
  "Harness/tasks/_template/PROGRESS.md": "Harness/tasks/_template/PROGRESS.md",
@@ -7,24 +7,24 @@ Entry point for coding agents. This project uses the Harness scaffold — a 0-1
7
7
  Read `CLAUDE.md` first, then `Harness/MEMORY.md`, then `Harness/README.md`.
8
8
  Do not bulk-read `Harness/`. Let `Harness/README.md#Load By Task` route you.
9
9
 
10
- ## CEO Contract (READ FIRST)
10
+ ## WF-MAX Role Contract (READ FIRST)
11
11
 
12
- `/wf-max` active you are **CEO, not implementer**.
12
+ `/wf-max` activates WF-MAX global mode. Top-level orchestrator is **CEO** — reads, plans, dispatches. Delegated Workers follow dispatch packet (writeSet, forbidden, verification). **Global mode ≠ every agent is CEO.**
13
13
 
14
- | ALLOWED (W0) | FORBIDDEN (always on source) |
14
+ | ALLOWED (W0 CEO) | FORBIDDEN (always on source) |
15
15
  |---|---|
16
16
  | Read Harness docs, CLAUDE.md | Edit / Write / MultiEdit |
17
17
  | Grep/Glob for scoping | Bash (except `ls`/`dir`/`tree`/`git`) |
18
18
  | Agent spawn (ONE message) | Deep source reads → delegate to Worker |
19
19
  | Write PLAN.md / PROGRESS.md | Sequential spawn (AP6) |
20
20
 
21
- **Tempted to edit source? STOP. Spawn a Worker.**
21
+ **Tempted to edit source? STOP. Spawn a Worker with explicit writeSet.**
22
22
 
23
23
  ## Key Commands
24
24
 
25
25
  | Command | Purpose |
26
26
  |---------|---------|
27
- | `/wf-max [task]` | Maximum parallelism: CEO→Manager→Worker |
27
+ | `/wf-max [task]` | Maximum parallelism: CEO→Manager→Worker hierarchy (three-layer architecture: mode / agent role / dispatch permission) |
28
28
  | `/wf-review [focus]` | Cross-model peer review (use OTHER CLI) |
29
29
  | `/wf <task>` | Standard workflow mode |
30
30
  | `/wf-auto` | Perpetual auto-optimization |
@@ -8,32 +8,26 @@ This repository dogfoods the generated Harness scaffold. Scaffold source files l
8
8
  - Every session: load `Harness/MEMORY.md` first, then `Harness/README.md`.
9
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
10
 
11
- ### 1a. CEO Contract (READ BEFORE ANY TOOL USE)
11
+ ### 1a. WF-MAX Role Contract (ACTIVE ONLY when /wf-max invoked)
12
12
 
13
- `/wf-max` active → you are **CEO, not implementer** (enforced by hooks + `.runtime/current-mode.json`).
13
+ `/wf-max` active → top-level orchestrator is **CEO**. Delegated Workers follow dispatch packet, edit only assigned writeSet. **Global mode ≠ every agent is CEO.** (Enforced by hooks + `.runtime/current-mode.json`.)
14
14
 
15
- | ALLOWED (W0) | FORBIDDEN (always on source) |
15
+ | ALLOWED (W0 CEO) | FORBIDDEN (always on source) |
16
16
  |---|---|
17
17
  | Read Harness docs, CLAUDE.md | Edit / Write / MultiEdit |
18
18
  | Grep/Glob for scoping | Bash (except `ls`/`dir`/`tree`/`git`) |
19
19
  | Agent spawn (ONE message) | Deep source reads → delegate to Worker |
20
20
  | Write PLAN.md / PROGRESS.md | Sequential spawn (AP6) |
21
21
 
22
- **Tempted to edit source? STOP. Spawn a Worker.**
22
+ **Tempted to edit source? STOP. Spawn a Worker with explicit writeSet.**
23
23
 
24
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`; if a row matches, read and follow those docs before acting.
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
26
  - `Harness/PROGRESS.md` is the global task index. Load at session start to see active task and task history.
27
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
- - Use `/wf <task>`, `/wf-review [focus]`, `wf mode`, `workflow mode`, or `wk mode` for long, difficult, uncertain, multi-file, or repeated-failure work.
29
- - Use `/wf-max [task]` for maximum parallelism — CEO→Manager→Worker hierarchy. CEO never writes code directly.
30
- - Use `/wf-auto` for perpetual self-directed optimization — never stops, continuously improves until 8-angle exhaustion.
31
- - Use `subagent-orchestrator` and `Harness/subagents.md` when coordinating multiple subagents.
32
- - Use `/wf-update` to check for and apply scaffold updates from GitHub. See `.claude/skills/wf-update/SKILL.md`.
33
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`.
34
- - For memory writing and consolidation (repeated failures, user corrections, closeout), dispatch `memory-master`.
35
- - For context analysis and compression alerts (~85% window), dispatch `context-master`.
36
- - Universal rules live in `.claude/rules/ecc/common.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`.
37
31
  - Never bulk-read `Harness/`; route through `Harness/README.md` and `Harness/MEMORY.md`.
38
32
  - Scaffold source files live under `templates/common/` and `templates/optional/`; generated dogfood runtime files live under root `Harness/` and `.claude/`.
39
33
 
@@ -86,9 +80,10 @@ This repository dogfoods the generated Harness scaffold. Scaffold source files l
86
80
  - **Closeout trigger**: during WF closeout, dispatch `context-master` to extract durable knowledge, then `memory-master` to consolidate into `Harness/memory/*`.
87
81
  - Never record secrets, credentials, tokens, or private data in memory.
88
82
 
89
- ## 7. CEO Constraints
83
+ ## 7. Mode Constraints
90
84
 
91
85
  - Never call `EnterPlanMode` — delegate planning to `planner` subagents (see `Harness/WF.md`).
92
- - Never write code directly in `/wf` or `/wf-max` mode — delegate all implementation to subagents (see `Harness/WF-MAX.md`).
93
- - **Enforcement**: `.claude/settings.json` denies `EnterPlanMode` via the `deny` list. CEO contract is in [Section 1a](#1a-ceo-contract-read-before-any-tool-use) read it first.
94
- - WF-MAX hooks in `.claude/settings.json` block CEO Edit/Write/MultiEdit/Bash on source files. `Harness/.runtime/current-mode.json` persists mode state across sessions.
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 source edits denied by default.
88
+ - **Enforcement**: `.claude/settings.json` denies `EnterPlanMode` via the `deny` list. Role contract is in [Section 1a](#1a-wf-max-role-contract-read-before-any-tool-use) read it first.
89
+ - WF-MAX hooks in `.claude/settings.json` enforce per-agentRole + writeSet. `Harness/.runtime/current-mode.json` persists mode state; stale modes (>30 min) auto-clear.
@@ -0,0 +1,246 @@
1
+ # ECC Rules Guide — Stack to Rule Set Mapping
2
+
3
+ ECC (Engineering Code Conventions) rules are organized by language/domain under `~/.claude/rules/ecc/`. The Harness bootstrap process MUST install the appropriate rule sets for the project's tech stack.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ # From the ECC rules repository:
9
+ cp -r rules/common .claude/rules/ecc/
10
+ cp -r rules/<language> .claude/rules/ecc/
11
+
12
+ # Verify:
13
+ ls .claude/rules/ecc/
14
+ ```
15
+
16
+ ## Stack Detection (Automatic)
17
+
18
+ | File Found | Stack | Install These Rules |
19
+ |------------|-------|-------------------|
20
+ | `package.json` + `tsconfig.json` | TypeScript/Node | `common/`, `typescript/`, `web/` |
21
+ | `package.json` (no tsconfig) | JavaScript/Node | `common/`, `typescript/` (JS mode), `web/` |
22
+ | `go.mod` | Go | `common/`, `golang/` |
23
+ | `pyproject.toml` / `requirements.txt` | Python | `common/`, `python/` |
24
+ | `Cargo.toml` | Rust | `common/`, `rust/` |
25
+ | `Gemfile` | Ruby/Rails | `common/`, `ruby/` |
26
+ | `composer.json` | PHP | `common/`, `php/` |
27
+ | `build.gradle` / `pom.xml` | Java/Kotlin | `common/`, `java/` or `kotlin/` |
28
+ | `*.sln` / `*.csproj` | C#/.NET | `common/`, `csharp/` |
29
+ | `Package.swift` | Swift | `common/`, `swift/` |
30
+ | Multiple frontend files (`.vue`, `.tsx`, `.jsx`) | Web frontend | Add `web/` to any stack |
31
+
32
+ ## Stack Detection (Ask User)
33
+
34
+ If no stack markers are found (empty/new repo), ask:
35
+
36
+ > "What's your tech stack? I need to install the right coding rules.
37
+ > Options: TypeScript/Node, Python, Go, Rust, Ruby, PHP, Java, Kotlin, C#, Swift, or other.
38
+ > Frontend framework? (React, Vue, Next.js, Nuxt, none)"
39
+
40
+ Based on answer, install matching rules.
41
+
42
+ ## Rule Set Catalog
43
+
44
+ | Rule Set | What It Covers | Files |
45
+ |----------|---------------|-------|
46
+ | `common/` | **Required for all projects.** Immutability, error handling, file organization, git workflow, testing, security, agents, hooks, patterns. | `coding-style.md`, `git-workflow.md`, `testing.md`, `security.md`, `patterns.md`, `agents.md`, `hooks.md`, `performance.md`, `development-workflow.md` |
47
+ | `typescript/` | TS/JS types, interfaces, immutability patterns, error handling with try-catch, Zod validation, React props, custom hooks, repository pattern. | `coding-style.md`, `testing.md`, `security.md`, `patterns.md`, `hooks.md` |
48
+ | `web/` | Frontend: CSS custom properties, animation-only properties, semantic HTML, component composition, state management, image optimization, CSP, XSS, Core Web Vitals, bundle budgets. | `coding-style.md`, `design-quality.md`, `testing.md`, `security.md`, `patterns.md`, `performance.md`, `hooks.md` |
49
+ | `python/` | PEP 8, type hints, immutability, async patterns, pytest, input validation. | `coding-style.md`, `testing.md`, `security.md`, `patterns.md` |
50
+ | `golang/` | Idiomatic Go, error handling, concurrency patterns, table-driven tests, security. | `coding-style.md`, `testing.md`, `security.md`, `patterns.md` |
51
+ | `rust/` | Ownership, lifetimes, error handling, unsafe usage, cargo-llvm-cov. | `coding-style.md`, `testing.md`, `security.md`, `patterns.md` |
52
+ | `ruby/` | Ruby idioms, Rails patterns, RSpec, security. | `coding-style.md`, `testing.md`, `security.md` |
53
+ | `php/` | PSR-12, Eloquent ORM, security, testing. | `coding-style.md`, `testing.md`, `security.md` |
54
+ | `swift/` | Protocol-oriented design, value semantics, ARC, Swift Concurrency. | `coding-style.md`, `testing.md`, `security.md` |
55
+ | `arkts/` | HarmonyOS/ArkTS specific. | `coding-style.md`, `testing.md`, `security.md` |
56
+ | `angular/` | Angular specific patterns. | Extends `typescript/` and `web/` |
57
+ | `vue/` | Vue 3 Composition API, reactivity, Pinia. | Extends `typescript/` and `web/` |
58
+ | `nuxt/` | Nuxt 4 specific. | Extends `vue/` |
59
+
60
+ ## Recommended Combinations
61
+
62
+ | Project Type | Rule Sets |
63
+ |-------------|-----------|
64
+ | React + TypeScript frontend | `common/`, `typescript/`, `web/` |
65
+ | Vue 3 frontend | `common/`, `typescript/`, `web/`, `vue/` |
66
+ | Next.js fullstack | `common/`, `typescript/`, `web/` |
67
+ | Python backend (FastAPI) | `common/`, `python/` |
68
+ | Go microservice | `common/`, `golang/` |
69
+ | Rust CLI tool | `common/`, `rust/` |
70
+ | Electron + React desktop | `common/`, `typescript/`, `web/` |
71
+ | React Native mobile | `common/`, `typescript/`, `web/` |
72
+
73
+ ## Bootstrap Verification
74
+
75
+ After installing ECC rules, verify:
76
+
77
+ ```bash
78
+ ls .claude/rules/ecc/common/ # MUST exist
79
+ ls .claude/rules/ecc/<language>/ # MUST exist for detected/declared stack
80
+ ```
81
+
82
+ If rules are missing, the agent MUST install them before proceeding to step 1.
83
+
84
+ ## ECC Design Rules — Frontend + Backend Architecture
85
+
86
+ Beyond coding style, ECC provides design-level guidance for both frontend and backend.
87
+ These are NOT in Harness by default — the agent should consult them when filling
88
+ `Harness/architecture.md` and `Harness/research/research-results.md`.
89
+
90
+ ### Frontend Design (web/ + typescript/)
91
+
92
+ | Rule File | Design Guidance | When to Apply |
93
+ |-----------|----------------|---------------|
94
+ | `web/design-quality.md` | Anti-template policy, required qualities (hierarchy, depth, typography, motion, color semantics), banned patterns (stock hero, default card grids, safe gray-on-white) | Before writing any frontend code |
95
+ | `web/patterns.md` | Compound components, render props, container/presentational split, state management (server/client/URL/form), URL as state, stale-while-revalidate, optimistic updates | When architecting frontend data flow |
96
+ | `web/performance.md` | Core Web Vitals targets, bundle budgets, loading strategy, image optimization, font loading, animation performance | Before production build |
97
+ | `web/security.md` | CSP (nonce-based), XSS prevention, third-party script SRI, HTTPS headers, CSRF protection | Before any user-facing deploy |
98
+ | `web/testing.md` | Visual regression (320/768/1024/1440), a11y, Lighthouse, cross-browser, responsive | Before launch |
99
+ | `web/hooks.md` | PostToolUse format/lint/type-check, PreToolUse file size guard, Stop build verification | CI setup |
100
+ | `typescript/patterns.md` | API response envelope, custom hooks, Repository pattern | Backend-frontend contract |
101
+
102
+ ### Backend Design (python/ + golang/ + rust/)
103
+
104
+ | Rule File | Design Guidance | When to Apply |
105
+ |-----------|----------------|---------------|
106
+ | `python/fastapi.md` | FastAPI patterns: async correctness, dependency injection, Pydantic schemas, OpenAPI quality | Python API projects |
107
+ | `python/patterns.md` | Repository pattern, service layer, API response format | Any Python backend |
108
+ | `golang/patterns.md` | Idiomatic Go patterns, concurrency, error handling | Go microservices |
109
+ | `rust/patterns.md` | Ownership patterns, error handling, unsafe usage | Rust services |
110
+ | `common/patterns.md` | Skeleton projects, Repository pattern, API response format, design pattern guidance | All projects |
111
+
112
+ ### Architecture Templates
113
+
114
+ Write the project-specific structure in `Harness/architecture.md`. Use the ECC rule combinations above to decide which standards apply to each layer.
115
+
116
+ ### API Contract
117
+
118
+ See [Contract Rules](#contract-rules) below for the full spec.
119
+
120
+ ## Agent Skills + ECC Rules
121
+
122
+ Dispatch packets MUST include `ecc` and SHOULD include `skills` fields (use `skills: none` when no skill applies). `Harness/context-loading.md#ecc-rules-per-role` owns the role-to-ECC mapping. This guide owns stack detection and the catalog of available ECC rule sets.
123
+
124
+ ## API Contract Specification (Frontend ↔ Backend)
125
+
126
+ The single most important integration pattern. Without this, frontend and backend drift apart silently.
127
+
128
+ ### Contract Rules
129
+
130
+ 1. **Backend owns the schema.** Define types in the backend language, generate frontend types.
131
+ 2. **Never duplicate types manually.** One source of truth, code-generated copies.
132
+ 3. **Validate at both boundaries.** Backend validates input (Pydantic/Zod), frontend validates API responses.
133
+ 4. **Error envelope is universal.** Use `common/patterns.md` format everywhere.
134
+
135
+ ### OpenAPI 3.0 Example (Generator-Readable)
136
+
137
+ ```yaml
138
+ # api/openapi.yaml — Feed this to openapi-typescript or openapi-generator
139
+ openapi: "3.0.3"
140
+ info:
141
+ title: User API
142
+ version: "1.0.0"
143
+ paths:
144
+ /api/users:
145
+ get:
146
+ operationId: listUsers
147
+ parameters:
148
+ - name: page
149
+ in: query
150
+ schema: { type: integer, default: 1 }
151
+ - name: limit
152
+ in: query
153
+ schema: { type: integer, default: 20 }
154
+ responses:
155
+ "200":
156
+ description: OK
157
+ content:
158
+ application/json:
159
+ schema:
160
+ type: object
161
+ properties:
162
+ success: { type: boolean }
163
+ data:
164
+ type: object
165
+ properties:
166
+ users: { type: array, items: { $ref: "#/components/schemas/User" } }
167
+ meta:
168
+ type: object
169
+ properties:
170
+ total: { type: integer }
171
+ page: { type: integer }
172
+ post:
173
+ operationId: createUser
174
+ requestBody:
175
+ required: true
176
+ content:
177
+ application/json:
178
+ schema: { $ref: "#/components/schemas/CreateUserInput" }
179
+ responses:
180
+ "201":
181
+ description: Created
182
+ content:
183
+ application/json:
184
+ schema:
185
+ type: object
186
+ properties:
187
+ success: { type: boolean }
188
+ data:
189
+ type: object
190
+ properties:
191
+ user: { $ref: "#/components/schemas/User" }
192
+ components:
193
+ schemas:
194
+ User:
195
+ type: object
196
+ required: [id, email, name, role, createdAt]
197
+ properties:
198
+ id: { type: string, format: uuid }
199
+ email: { type: string, format: email }
200
+ name: { type: string }
201
+ role: { type: string, enum: [admin, member] }
202
+ createdAt: { type: string, format: date-time }
203
+ CreateUserInput:
204
+ type: object
205
+ required: [email, name]
206
+ properties:
207
+ email: { type: string, format: email }
208
+ name: { type: string, minLength: 1, maxLength: 100 }
209
+ role: { type: string, enum: [admin, member], default: member }
210
+ ```
211
+
212
+ ```bash
213
+ # Generate TypeScript types from OpenAPI:
214
+ npx openapi-typescript api/openapi.yaml -o src/shared/api-types.ts
215
+ ```
216
+
217
+ ### Implementation Per Stack
218
+
219
+ | Stack | Backend Schema | Frontend Types | Validation |
220
+ |-------|---------------|----------------|------------|
221
+ | Python BE + TS FE | Pydantic models | `openapi-typescript` from OpenAPI | Pydantic (BE) + Zod (FE) |
222
+ | Go BE + TS FE | Go structs + OpenAPI | `openapi-generator` | Go validator (BE) + Zod (FE) |
223
+ | Next.js fullstack | Zod schemas in `shared/` | Same Zod schemas | Zod (both sides) |
224
+ | tRPC | tRPC router definitions | Auto-inferred from router | tRPC built-in |
225
+ | GraphQL | GraphQL schema | `graphql-codegen` | GraphQL middleware + Zod (FE) |
226
+
227
+ ### Agent Dispatch with ECC + Skills
228
+
229
+ When dispatching a subagent, the dispatch packet MUST include:
230
+
231
+ ```json
232
+ {
233
+ "agentRole": "worker",
234
+ "task": "Implement user profile page",
235
+ "writeSet": ["src/components/UserProfile.tsx", "src/hooks/useUser.ts"],
236
+ "forbidden": ["src/backend/", "database/"],
237
+ "verification": ["npm test", "npm run lint"],
238
+ "ecc": ["web/design-quality.md", "web/patterns.md", "typescript/patterns.md"],
239
+ "skills": ["react-review"],
240
+ "apiContract": "api/contract.yaml"
241
+ }
242
+ ```
243
+
244
+ Different subagents get different `ecc` and `skills` arrays.
245
+ A frontend implementer loads `web/` rules. A backend implementer loads `python/` or `golang/` rules.
246
+ A reviewer loads `security/` + `testing/` rules. See `Harness/context-loading.md` for the full per-role mapping.