create-harness-vibe-coding 0.8.13 → 0.8.16

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 (115) hide show
  1. package/CHANGELOG.md +165 -0
  2. package/README-CN.md +41 -9
  3. package/README.md +39 -9
  4. package/package.json +2 -1
  5. package/src/generator.js +601 -472
  6. package/src/index.js +4 -4
  7. package/templates/common/.claude/agents/architect-manager.md +1 -0
  8. package/templates/common/.claude/agents/architect.md +2 -1
  9. package/templates/common/.claude/agents/codebase-explorer.md +1 -0
  10. package/templates/common/.claude/agents/context-master.md +2 -1
  11. package/templates/common/.claude/agents/debugger.md +1 -0
  12. package/templates/common/.claude/agents/docs-researcher.md +2 -1
  13. package/templates/common/.claude/agents/explore-manager.md +1 -0
  14. package/templates/common/.claude/agents/implement-manager.md +1 -0
  15. package/templates/common/.claude/agents/implementer.md +1 -0
  16. package/templates/common/.claude/agents/memory-master.md +2 -1
  17. package/templates/common/.claude/agents/planner.md +3 -2
  18. package/templates/common/.claude/agents/reflector.md +1 -0
  19. package/templates/common/.claude/agents/researcher.md +1 -0
  20. package/templates/common/.claude/agents/review-manager.md +1 -0
  21. package/templates/common/.claude/agents/reviewer.md +2 -1
  22. package/templates/common/.claude/agents/task-scribe.md +1 -0
  23. package/templates/common/.claude/agents/tdd-guide.md +5 -4
  24. package/templates/common/.claude/agents/test-writer.md +6 -5
  25. package/templates/common/.claude/agents/verifier.md +1 -0
  26. package/templates/common/.claude/commands/wf-help.md +1 -0
  27. package/templates/common/.claude/commands/wf-update.md +68 -10
  28. package/templates/common/.claude/rules/ecc/common.md +6 -5
  29. package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +12 -6
  30. package/templates/common/.claude/skills/tdd/SKILL.md +5 -5
  31. package/templates/common/.claude/skills/wf/SKILL.md +13 -5
  32. package/templates/common/.claude/skills/wf-agents-docs/SKILL.md +119 -0
  33. package/templates/common/.claude/skills/wf-auto/SKILL.md +27 -7
  34. package/templates/common/.claude/skills/wf-auto-spark/SKILL.md +12 -5
  35. package/templates/common/.claude/skills/wf-learn/SKILL.md +6 -0
  36. package/templates/common/.claude/skills/wf-max/SKILL.md +22 -7
  37. package/templates/common/.claude/skills/wf-readme/SKILL.md +8 -2
  38. package/templates/common/.claude/skills/wf-remove/SKILL.md +6 -0
  39. package/templates/common/.claude/skills/wf-review/SKILL.md +10 -3
  40. package/templates/common/.claude/skills/wf-update/SKILL.md +41 -4
  41. package/templates/common/.harness-version +290 -128
  42. package/templates/common/.opencode/agents/architect-manager.md +1 -0
  43. package/templates/common/.opencode/agents/architect.md +2 -1
  44. package/templates/common/.opencode/agents/codebase-explorer.md +1 -0
  45. package/templates/common/.opencode/agents/context-master.md +2 -1
  46. package/templates/common/.opencode/agents/debugger.md +1 -0
  47. package/templates/common/.opencode/agents/docs-researcher.md +2 -1
  48. package/templates/common/.opencode/agents/explore-manager.md +1 -0
  49. package/templates/common/.opencode/agents/implement-manager.md +1 -0
  50. package/templates/common/.opencode/agents/implementer.md +1 -0
  51. package/templates/common/.opencode/agents/memory-master.md +2 -1
  52. package/templates/common/.opencode/agents/planner.md +3 -2
  53. package/templates/common/.opencode/agents/reflector.md +1 -0
  54. package/templates/common/.opencode/agents/researcher.md +1 -0
  55. package/templates/common/.opencode/agents/review-manager.md +1 -0
  56. package/templates/common/.opencode/agents/reviewer.md +2 -1
  57. package/templates/common/.opencode/agents/task-scribe.md +1 -0
  58. package/templates/common/.opencode/agents/tdd-guide.md +5 -4
  59. package/templates/common/.opencode/agents/test-writer.md +6 -5
  60. package/templates/common/.opencode/agents/verifier.md +1 -0
  61. package/templates/common/.opencode/commands/wf-auto-spark.md +3 -2
  62. package/templates/common/.opencode/commands/wf-auto.md +3 -2
  63. package/templates/common/.opencode/commands/wf-help.md +1 -0
  64. package/templates/common/.opencode/commands/wf-learn.md +3 -2
  65. package/templates/common/.opencode/commands/wf-max.md +3 -2
  66. package/templates/common/.opencode/commands/wf-readme.md +3 -2
  67. package/templates/common/.opencode/commands/wf-remove.md +3 -2
  68. package/templates/common/.opencode/commands/wf-review.md +3 -2
  69. package/templates/common/.opencode/commands/wf-update.md +68 -10
  70. package/templates/common/.opencode/commands/wf.md +3 -2
  71. package/templates/common/CLAUDE.md +14 -12
  72. package/templates/common/Harness/MEMORY.md +21 -18
  73. package/templates/common/Harness/README.md +41 -39
  74. package/templates/common/Harness/ownership.manifest.json +815 -0
  75. package/templates/common/Harness/{architecture.md → project/architecture.md} +1 -1
  76. package/templates/common/Harness/research/README.md +3 -3
  77. package/templates/common/Harness/scripts/context-budget.mjs +95 -0
  78. package/templates/common/Harness/scripts/l2-cache-telemetry.mjs +703 -0
  79. package/templates/common/Harness/scripts/scan-clean.mjs +13 -3
  80. package/templates/common/Harness/scripts/validate-harness.mjs +332 -175
  81. package/templates/common/Harness/scripts/wf-remove.mjs +60 -34
  82. package/templates/common/Harness/scripts/wf-update-check.mjs +355 -45
  83. package/templates/common/Harness/settings.json +43 -0
  84. package/templates/common/Harness/{ECC-GUIDE.md → specs/guides/ECC-GUIDE.md} +4 -4
  85. package/templates/common/Harness/{SETUP.md → specs/guides/SETUP.md} +32 -35
  86. package/templates/common/Harness/{extension.md → specs/guides/extension.md} +3 -3
  87. package/templates/common/Harness/{lifecycle.md → specs/guides/lifecycle.md} +2 -2
  88. package/templates/common/Harness/{agent-workflow.md → specs/runtime/agent-workflow.md} +6 -6
  89. package/templates/common/Harness/{context-loading.md → specs/runtime/context-loading.md} +85 -21
  90. package/templates/common/Harness/{dispatch.md → specs/runtime/dispatch.md} +3 -2
  91. package/templates/common/Harness/{subagents.md → specs/runtime/subagents.md} +10 -5
  92. package/templates/common/Harness/{WF-AUTO-SPARK.md → specs/workflows/WF-AUTO-SPARK.md} +2 -2
  93. package/templates/common/Harness/{WF-AUTO.md → specs/workflows/WF-AUTO.md} +6 -1
  94. package/templates/common/Harness/{WF-KERNEL.md → specs/workflows/WF-KERNEL.md} +10 -0
  95. package/templates/common/Harness/{WF-MAX.md → specs/workflows/WF-MAX.md} +10 -5
  96. package/templates/common/Harness/{WF-STATE.md → specs/workflows/WF-STATE.md} +5 -0
  97. package/templates/common/Harness/{WF.md → specs/workflows/WF.md} +12 -1
  98. package/templates/common/README.md +8 -6
  99. package/templates/common/memory/startup-hints.md +19 -17
  100. package/templates/optional/skills/browser-e2e/.claude/skills/browser-e2e/SKILL.md +1 -1
  101. package/templates/optional/skills/browser-e2e/.claude/skills/wf-browser/SKILL.md +7 -0
  102. package/templates/optional/skills/browser-e2e/.opencode/commands/wf-browser.md +3 -2
  103. package/templates/optional/skills/browser-e2e/Harness/workflows/browser-e2e.md +4 -4
  104. package/templates/optional/skills/github-pr-review/.claude/skills/github-pr-review/SKILL.md +1 -1
  105. package/templates/optional/skills/python-backend/.claude/skills/python-backend/SKILL.md +1 -1
  106. package/templates/optional/skills/ts-react-frontend/.claude/skills/ts-react-frontend/SKILL.md +1 -1
  107. package/templates/optional/skills/ui-ux-review/.claude/skills/ui-ux-review/SKILL.md +1 -1
  108. /package/templates/common/Harness/{ACCEPTANCE_PROTOCOL.md → specs/protocols/ACCEPTANCE_PROTOCOL.md} +0 -0
  109. /package/templates/common/Harness/{AGENT_ISOLATION.md → specs/protocols/AGENT_ISOLATION.md} +0 -0
  110. /package/templates/common/Harness/{DEBUG_PROTOCOL.md → specs/protocols/DEBUG_PROTOCOL.md} +0 -0
  111. /package/templates/common/Harness/{HARNESS_BRIDGE.md → specs/protocols/HARNESS_BRIDGE.md} +0 -0
  112. /package/templates/common/Harness/{MEMORY_PROTOCOL.md → specs/protocols/MEMORY_PROTOCOL.md} +0 -0
  113. /package/templates/common/Harness/{TASK_ARCHIVE.md → specs/protocols/TASK_ARCHIVE.md} +0 -0
  114. /package/templates/common/Harness/{TDD-GUIDE.md → specs/protocols/TDD-GUIDE.md} +0 -0
  115. /package/templates/common/Harness/{WF-AUTO-ANGLES.md → specs/workflows/WF-AUTO-ANGLES.md} +0 -0
@@ -67,7 +67,7 @@ State in this repo should be explicit, serializable, and owned by one layer.
67
67
 
68
68
  - **Location**: `src/prompts.js`
69
69
  - **Responsibility**: Ask basic interactive npx questions: project name and target directory.
70
- - **Does NOT handle**: Agent-link install intake. That matrix is read by coding agents from `README.md` and `Harness/SETUP.md`.
70
+ - **Does NOT handle**: Agent-link install intake. That matrix is read by coding agents from `README.md` and `Harness/specs/guides/SETUP.md`.
71
71
 
72
72
  ### 4.3 Generator Core
73
73
 
@@ -21,7 +21,7 @@ Built-in agents:
21
21
  - `.claude/agents/researcher.md`: product, market, open-source, dependency, pricing, policy, and ecosystem research.
22
22
  - `.claude/agents/docs-researcher.md`: official docs, API, SDK, config, limits, errors, and examples verification.
23
23
 
24
- For multi-agent research plus build work, create the dispatch table in `Harness/tasks/<task-id>/PLAN.md` and follow `Harness/dispatch.md`.
24
+ For multi-agent research plus build work, create the dispatch table in `Harness/tasks/<task-id>/PLAN.md` and follow `Harness/specs/runtime/dispatch.md`.
25
25
 
26
26
  Research Agent input:
27
27
 
@@ -107,11 +107,11 @@ Use these patterns when turning research into PRD or feature docs:
107
107
  - Research process, queries, and limitations: this file or `Harness/tasks/<task-id>/PLAN.md`.
108
108
  - Final research decisions: [research-results.md](research-results.md).
109
109
  - Product scope: [PRD.md](PRD.md).
110
- - Architecture consequences: `Harness/architecture.md`.
110
+ - Architecture consequences: `Harness/project/architecture.md`.
111
111
 
112
112
  ## Architecture Decision References
113
113
 
114
- When filling `Harness/architecture.md` and `Harness/research/research-results.md`, use these high-trust sources as starting points. Search within them; do not read them whole.
114
+ When filling `Harness/project/architecture.md` and `Harness/research/research-results.md`, use these high-trust sources as starting points. Search within them; do not read them whole.
115
115
 
116
116
  ### System Design & Architecture Patterns
117
117
 
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+
5
+ const args = new Set(process.argv.slice(2));
6
+ const rootArgIndex = process.argv.indexOf('--root');
7
+ const root = rootArgIndex !== -1 && process.argv[rootArgIndex + 1]
8
+ ? path.resolve(process.argv[rootArgIndex + 1])
9
+ : process.cwd();
10
+ const json = args.has('--json');
11
+
12
+ const routes = [
13
+ {
14
+ id: 'thin-startup',
15
+ maxBytes: 12500,
16
+ paths: [
17
+ 'CLAUDE.md',
18
+ 'Harness/memory/startup-hints.md',
19
+ ],
20
+ },
21
+ {
22
+ id: 'wf-router-prefix',
23
+ maxBytes: 42000,
24
+ paths: [
25
+ 'CLAUDE.md',
26
+ 'Harness/MEMORY.md',
27
+ 'Harness/README.md',
28
+ ],
29
+ },
30
+ {
31
+ id: 'wf-light-prefix',
32
+ maxBytes: 58000,
33
+ paths: [
34
+ 'CLAUDE.md',
35
+ 'Harness/MEMORY.md',
36
+ 'Harness/README.md',
37
+ 'Harness/specs/workflows/WF.md',
38
+ 'Harness/specs/workflows/WF-KERNEL.md',
39
+ ],
40
+ },
41
+ {
42
+ id: 'cache-diagnostics-route',
43
+ maxBytes: 36000,
44
+ paths: [
45
+ 'Harness/specs/runtime/context-loading.md',
46
+ 'Harness/specs/workflows/WF-KERNEL.md',
47
+ 'Harness/specs/runtime/dispatch.md',
48
+ '.claude/skills/wf-agents-docs/SKILL.md',
49
+ ],
50
+ },
51
+ ];
52
+
53
+ function readBytes(rel) {
54
+ const abs = path.join(root, ...rel.split('/'));
55
+ if (!fs.existsSync(abs)) return { missing: true, bytes: 0 };
56
+ return { missing: false, bytes: Buffer.byteLength(fs.readFileSync(abs)) };
57
+ }
58
+
59
+ function routeResult(route) {
60
+ const files = route.paths.map(rel => ({ path: rel, ...readBytes(rel) }));
61
+ const totalBytes = files.reduce((sum, file) => sum + file.bytes, 0);
62
+ const missing = files.filter(file => file.missing).map(file => file.path);
63
+ return {
64
+ id: route.id,
65
+ maxBytes: route.maxBytes,
66
+ totalBytes,
67
+ approxTokens: Math.ceil(totalBytes / 4),
68
+ status: missing.length > 0 || totalBytes > route.maxBytes ? 'FAIL' : 'PASS',
69
+ missing,
70
+ files,
71
+ };
72
+ }
73
+
74
+ const results = routes.map(routeResult);
75
+ const ok = results.every(result => result.status === 'PASS');
76
+
77
+ if (json) {
78
+ console.log(JSON.stringify({
79
+ ok,
80
+ root,
81
+ note: 'Budgets are route-profile regression guards, not runtime exclusion rules. approxTokens is bytes/4, not provider token accounting.',
82
+ results,
83
+ }, null, 2));
84
+ } else {
85
+ console.log('Context budgets are route-profile regression guards, not runtime exclusion rules.');
86
+ for (const result of results) {
87
+ console.log(`${result.status} ${result.id}: ${result.totalBytes}/${result.maxBytes} bytes (~${result.approxTokens} tokens)`);
88
+ for (const file of result.files) {
89
+ const state = file.missing ? 'MISSING' : `${file.bytes} bytes`;
90
+ console.log(` - ${file.path}: ${state}`);
91
+ }
92
+ }
93
+ }
94
+
95
+ process.exit(ok ? 0 : 1);