create-harness-vibe-coding 0.2.1 → 0.3.1

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 (51) hide show
  1. package/README-CN.md +58 -57
  2. package/README.md +108 -23
  3. package/package.json +1 -1
  4. package/src/generator.js +2 -0
  5. package/templates/common/.claude/agents/context-master.md +78 -0
  6. package/templates/common/.claude/agents/debugger.md +1 -1
  7. package/templates/common/.claude/agents/docs-researcher.md +1 -1
  8. package/templates/common/.claude/agents/implementer.md +1 -1
  9. package/templates/common/.claude/agents/memory-master.md +67 -0
  10. package/templates/common/.claude/agents/planner.md +1 -1
  11. package/templates/common/.claude/agents/researcher.md +1 -1
  12. package/templates/common/.claude/agents/test-writer.md +1 -1
  13. package/templates/common/.claude/agents/verifier.md +1 -1
  14. package/templates/common/.claude/commands/update.md +11 -0
  15. package/templates/common/.claude/commands/wf-max.md +28 -0
  16. package/templates/common/.claude/commands/wf.md +10 -4
  17. package/templates/common/.claude/rules/ecc/common.md +2 -2
  18. package/templates/common/.claude/skills/harness-build-loop/SKILL.md +2 -1
  19. package/templates/common/.claude/skills/harness-context/SKILL.md +2 -1
  20. package/templates/common/.claude/skills/harness-lifecycle/SKILL.md +2 -1
  21. package/templates/common/.claude/skills/harness-research/SKILL.md +2 -1
  22. package/templates/common/.claude/skills/harness-router/SKILL.md +1 -1
  23. package/templates/common/.claude/skills/readme-optimizer/SKILL.md +3 -2
  24. package/templates/common/.claude/skills/subagent-orchestrator/SKILL.md +5 -3
  25. package/templates/common/.claude/skills/wf-max/SKILL.md +95 -0
  26. package/templates/common/.claude/skills/wf-mode/SKILL.md +9 -4
  27. package/templates/common/.claude/skills/wf-update/SKILL.md +58 -0
  28. package/templates/common/.harness-version +8 -0
  29. package/templates/common/CLAUDE.md +14 -5
  30. package/templates/common/MEMORY.md +8 -1
  31. package/templates/common/README.md +2 -2
  32. package/templates/common/SETUP.md +24 -14
  33. package/templates/common/docs/README.md +28 -16
  34. package/templates/common/docs/features/_template.md +11 -1
  35. package/templates/common/docs/harness/PLAN.md +37 -88
  36. package/templates/common/docs/harness/PROGRESS.md +17 -0
  37. package/templates/common/docs/harness/WF-MAX.md +134 -0
  38. package/templates/common/docs/harness/WF.md +20 -9
  39. package/templates/common/docs/harness/agent-workflow.md +19 -7
  40. package/templates/common/docs/harness/architecture.md +1 -1
  41. package/templates/common/docs/harness/context-loading.md +17 -5
  42. package/templates/common/docs/harness/dispatch.md +13 -6
  43. package/templates/common/docs/harness/extension.md +4 -4
  44. package/templates/common/docs/harness/lifecycle.md +2 -2
  45. package/templates/common/docs/harness/subagents.md +25 -7
  46. package/templates/common/docs/research/README.md +3 -3
  47. package/templates/common/docs/tasks/_template/ARTIFACTS.md +3 -0
  48. package/templates/common/docs/tasks/_template/NOTES.md +3 -0
  49. package/templates/common/docs/tasks/_template/PLAN.md +40 -0
  50. package/templates/common/docs/tasks/_template/PROGRESS.md +29 -0
  51. package/templates/common/scripts/validate-harness.mjs +70 -7
package/README-CN.md CHANGED
@@ -1,8 +1,14 @@
1
1
  # create-harness-vibe-coding 中文说明
2
2
 
3
- 0-1 产品 Harness 脚手架,用于 AI 辅助工程:从想法、调研、PRD、架构、计划,到实现、验证和反馈闭环。
3
+ 0-1 产品 Harness 脚手架,AI 辅助工程全流程。English: [README.md](README.md)
4
4
 
5
- English README: [README.md](README.md)
5
+ ## 一条命令
6
+
7
+ ```bash
8
+ npx create-harness-vibe-coding@latest my-project
9
+ ```
10
+
11
+ ---
6
12
 
7
13
  ## 一句话交给 Agent
8
14
 
@@ -12,77 +18,74 @@ English README: [README.md](README.md)
12
18
 
13
19
  ## 两种安装方式
14
20
 
15
- ### 1. npx 安装
16
-
17
- 适合需要确定性写入、明确冲突策略、可重复 dry-run 的场景。
18
-
19
- ### 2. 直接把链接丢给 agent
20
-
21
- 适合老项目、老架构升级、已有复杂 `CLAUDE.md` / `AGENTS.md` / `.claude/` 的场景。agent 应该读取这个仓库 README,理解当前项目结构,执行或模拟 dry-run,然后给出最小迁移方案。
21
+ ### npx 安装
22
+ 适合确定性写入、明确冲突策略、可重复 dry-run 的场景。
23
+
24
+ ### 直接把链接丢给 Agent
25
+ 适合老项目升级。Agent 会读取仓库 README,理解当前项目结构,执行或模拟 dry-run,给出最小迁移方案。如果已有 `CLAUDE.md`,Agent 必须先请求用户确认再合并。
26
+
27
+ ## Harness 工作流
28
+
29
+ ```mermaid
30
+ graph TD
31
+ A[ /wf 进入工作流 ] --> B[ 探索: 3个并行subagent ]
32
+ B --> C[ 二阶段计划 ]
33
+ C --> D[ 构建: test write加implement ]
34
+ D --> E[ 双门禁审查 ]
35
+ E --> F{ 通过? }
36
+ F -->| 否 | G[ debugger 修复 循环 ]
37
+ G --> E
38
+ F -->| 是 | H[ 收尾: context加memory ]
39
+ H --> I[ wf update 增量更新 ]
40
+ ```
22
41
 
23
- 如果项目里已经有 `CLAUDE.md`,agent 必须先告诉用户:`CLAUDE.md` 是根 agent 入口合同,不能静默覆盖或乱合并。正确流程是先请求用户确认是否重构/合并 `CLAUDE.md`,再在保留原项目规则的基础上补入 Harness 的 startup、memory、router、workflow、subagents 编排约束。
42
+ ## 核心文件
24
43
 
25
- Agent-link 安装前置问题,编辑前先问:
44
+ | 文件 | 用途 |
45
+ |------|------|
46
+ | `CLAUDE.md` | Claude Code 根入口,保持短小 |
47
+ | `Harness/README.md` | 文档路由器——按任务关键词加载最少文档 |
48
+ | `Harness/WF.md` | 长任务工作流:摄入 → 探索 → 计划 → 构建 → 审查 → 验证 → 恢复 |
49
+ | `Harness/PROGRESS.md` | 全局任务索引 |
50
+ | `Harness/tasks/<id>/` | 每任务胶囊:PROGRESS.md(进度+心跳)+ PLAN.md(实施+证据) |
51
+ | `.claude/agents/` | 11 个通用 Agent:planner, researcher, architect, implementer, reviewer, debugger, verifier, memory-master, context-master... |
52
+ | `.claude/skills/` | wf-mode, subagent-orchestrator, wf-update, harness-router... |
26
53
 
27
- 只询问会影响写入、架构、安全或工作流的选择。开始时最多问 3 个 blocking 问题,其余采用安全默认值并记录到计划里,等真正触发时再继续追问。
54
+ ## WF 模式
28
55
 
29
- | 主题 | 什么时候问 | 没回答时的默认值 |
30
- | --- | --- | --- |
31
- | 根 agent 入口 | 已存在 `CLAUDE.md`、`AGENTS.md`、`.claude/` 或其他 agent 入口文件 | 保留现有文件;合并 Harness 入口合同前必须询问用户 |
32
- | Harness 存放位置 | `docs/` 已经用于 GitHub Pages、产品文档或生成文档 | 默认使用根目录 `Harness/`;不要把 Harness 文档写进 `docs/` |
33
- | README 归属 | 根 `README.md` 是公开产品页、包文档或已有大量自定义内容 | 保留现有 README,只提议追加最小 Development section |
34
- | README 优化 | 已有 README 过时、太单薄、缺少命令表格,或用户想要架构图/更生动的文档 | 可推荐 `readme-optimizer`;默认只追加 Development notes,结构化优化或重写必须先得到用户确认 |
35
- | 扩展能力 | ECC、Superpowers、自定义 rules 或栈相关 skills 可能有用 | 先推荐;只有用户同意后才安装 |
36
- | Skills | 技术栈已明确,测试、前端、后端、review、浏览器证据可用 optional skills 增强 | 用户同意后只安装 1-2 个最相关 skills |
37
- | CI/CD | 已有 CI 配置,或项目缺少测试/构建 gate | 先记录现有命令;只有用户同意后才新增或规范 CI/CD |
38
- | 验证深度 | 涉及浏览器可见行为、API、数据库、鉴权、支付或部署 | 必须有真实命令证据;相关场景必须有浏览器/API 证据 |
39
- | Memory/隐私 | 仓库包含敏感领域数据、客户数据、密钥或私有流程 | 只启用 memory index;禁止记录 secrets 或私有数据 |
40
- | Branch/worktree | 存在未提交改动、风险迁移或并行实现 lane | 保护当前工作区;大改前先提议 branch/worktree |
41
- | 包管理器/技术栈 | 存在多个包管理器、monorepo apps 或技术栈边界不清 | 写文件前先确认当前 workspace/app 范围 |
42
-
43
- ## 一条命令
56
+ 输入 `/wf`、`wf mode`、`workflow mode` `wk mode` 进入长任务工作流。默认启动 3 个并行只读 subagent 做探索,然后二阶段计划 → 实现 → 双门禁审查 → 验证。失败时自动进入恢复循环(debugger → review → verify)。收尾时 context-master 提取知识,memory-master 写入记忆。
44
57
 
45
58
  ```bash
46
- npx create-harness-vibe-coding@latest my-project
59
+ # 进入 WF 模式
60
+ "用 /wf 处理这个长任务迁移。"
61
+ "wf mode — 帮我重构认证层。"
47
62
  ```
48
63
 
49
- ## 现有项目渐进安装
64
+ ## WF Update
50
65
 
51
- 先预览,不写文件:
66
+ 从 GitHub 增量更新脚手架,校验和安全。
52
67
 
53
68
  ```bash
54
- npx create-harness-vibe-coding@latest my-app . -y --dry-run
69
+ /wf update --check # 只检查
70
+ /wf update # 完整更新
55
71
  ```
56
72
 
57
- 再保留现有文件,只补缺失的 Harness 文件:
73
+ ## 已有项目安装
58
74
 
59
75
  ```bash
76
+ # 先预览
77
+ npx create-harness-vibe-coding@latest my-app . -y --dry-run
78
+
79
+ # 保留现有文件,只补缺失
60
80
  npx create-harness-vibe-coding@latest my-app . -y --on-conflict skip
61
81
  ```
62
82
 
63
- 安装后让 agent 先读 `Harness/SETUP.md`,再开始正常工作。
64
-
65
- ## 核心约束
66
-
67
- - `CLAUDE.md` 只做薄入口和路由,不放项目架构、构建脚本、git 规范。
68
- - 项目开发命令、构建、测试、git、发布流程放根目录 `README.md`。
69
- - 架构说明放 `Harness/architecture.md` 或当前 feature 文档。
70
- - Harness 文档、状态、记忆、工作流默认放根目录 `Harness/`。
71
- - 如果已有 `AGENTS.md`,agent 必须先询问用户是否同意修改。
72
- - 长任务、多文件、多 subagents、低置信度或重复失败时使用 `/wf`、`wf-mode` 和 `Harness/WF.md`。
73
-
74
- ## 常用生成物
75
-
76
- | 文件 | 用途 |
77
- | --- | --- |
78
- | `CLAUDE.md` | Claude Code 根入口,保持短小 |
79
- | `Harness/README.md` | Harness 路由器 |
80
- | `Harness/SETUP.md` | 初次安装和 bootstrap 指南 |
81
- | `Harness/MEMORY.md` | agents、skills、记忆文件索引 |
82
- | `Harness/PLAN.md` | 当前计划、heartbeat、handoff、验证证据 |
83
- | `Harness/WF.md` | 长链路 workflow 和恢复循环 |
84
- | `Harness/subagents.md` | 多 subagents 编排方法论 |
85
- | `.claude/skills/*` | Claude Code 可加载的 Harness skills |
83
+ | 冲突模式 | 含义 |
84
+ |----------|------|
85
+ | `fail`(默认) | 目标文件已存在则停止 |
86
+ | `skip` | 保留现有文件,只创建缺失 |
87
+ | `backup` | 备份 → 写入新文件 |
88
+ | `overwrite` | 直接覆盖 |
86
89
 
87
90
  ## 验证
88
91
 
@@ -90,5 +93,3 @@ npx create-harness-vibe-coding@latest my-app . -y --on-conflict skip
90
93
  npm test
91
94
  node Harness/scripts/validate-harness.mjs
92
95
  ```
93
-
94
- 生成项目后,`Harness/scripts/validate-harness.mjs` 用于检查 Harness 结构、注册关系和必要规范是否完整。
package/README.md CHANGED
@@ -8,33 +8,37 @@
8
8
  <h1 align="center">create-harness-vibe-coding</h1>
9
9
  <p align="center">
10
10
  <b>0-1 product harness scaffold for AI-assisted engineering.</b><br>
11
- <sub>Idea -> Research -> PRD -> Architecture -> Harness/PLAN.md -> Build -> Verify -> Feedback.</sub>
11
+ <sub>Idea -> Research -> PRD -> Architecture -> Plan -> Build -> Verify -> Feedback.</sub>
12
12
  </p>
13
13
 
14
- ---
15
-
16
14
  ## One Command
17
15
 
18
16
  ```bash
19
17
  npx create-harness-vibe-coding@latest my-project
20
18
  ```
21
19
 
20
+ Chinese README: [README-CN.md](README-CN.md)
21
+
22
+ ---
23
+
22
24
  | What You Get | Purpose |
23
25
  |-------------|---------|
24
26
  | `CLAUDE.md` + `Harness/README.md` | Thin root entry and dynamic doc router |
25
- | `Harness/PLAN.md` | Active execution state, heartbeat, and handoffs |
26
- | `Harness/WF.md` + `/wf` | Long-task workflow: explore, second-plan, build, review, verify, recover |
27
+ | `Harness/PROGRESS.md` + `Harness/tasks/` | Global task index and per-task progress capsules |
28
+ | `Harness/WF.md` + `/wf` | Long-task workflow: parallel explore, second-plan, build, review, verify, recover |
29
+ | `/wf update` | GitHub-based incremental scaffold update with checksum safety |
27
30
  | `Harness/subagents.md` + `subagent-orchestrator` | Controller-led multi-agent orchestration with source-attributed methods |
31
+ | `memory-master` + `context-master` | Auto-triggered memory writing on repeated failures, and non-blocking context compression alerts |
28
32
  | Research + PRD templates | Clarify idea, scope, non-goals, acceptance criteria |
29
33
  | Research protocol | Route research agents, source search, and fallback tools |
30
- | Built-in common agents | Research, planning, architecture, testing, implementation, debugging, review, verification |
34
+ | Built-in common agents | 11 agents: research, planning, architecture, testing, implementation, debugging, review, verification, memory, context |
31
35
  | Harness architecture docs | Boundaries, ports, data flow, state machines |
32
36
  | Dispatch protocol | Lightweight parallel-agent coordination without a scheduler |
33
37
  | Extension contract | Keep stack-specific agents and skills compatible |
34
38
  | Context-loading protocol | Inject only the right docs into each subagent |
35
39
  | README optimizer skill | Optional README preservation, tables, and approved architecture diagrams |
36
40
  | Skill-style loaders | `.claude/skills/*` route lifecycle, context, and build loops |
37
- | Harness validator | Checks required files and unresolved project placeholders |
41
+ | Harness validator | Checks required files, agent/skill registrations, invariants |
38
42
  | `.claude/` skeleton | Root runtime integration for Claude Code agents, skills, commands, and rules |
39
43
 
40
44
  ---
@@ -45,13 +49,15 @@ Most 0-1 AI coding projects fail before code quality matters:
45
49
 
46
50
  | Without Harness | With This Scaffold |
47
51
  |---|---|
48
- | Idea jumps straight to code | lifecycle forces research, PRD, and scope |
49
- | Agent reads too much context | docs router loads only the needed harness file |
50
- | Subagents get vague prompts | context-loading packs define role, boundaries, and return format |
51
- | Process drift is invisible | validator checks core harness readiness |
52
- | Architecture drifts silently | ports, data-flow, and state docs mark boundary changes |
53
- | Tests come after implementation | workflow requires failing test or manual check first |
54
- | Long tasks stall after failures | `/wf` adds heartbeat, recovery, debugger, review, and verifier loops |
52
+ | Idea jumps straight to code | Lifecycle forces research, PRD, and scope |
53
+ | Agent reads too much context | Docs router loads only the needed harness file |
54
+ | Subagents get vague prompts | Context-loading packs define role, boundaries, and return format |
55
+ | Process drift is invisible | Validator checks core harness readiness |
56
+ | Architecture drifts silently | Ports, data-flow, and state docs mark boundary changes |
57
+ | Tests come after implementation | Workflow requires failing test or manual check first |
58
+ | Long tasks stall after failures | `/wf` adds heartbeat, recovery loop, auto memory-master at 3 failures |
59
+ | Context bloats over long sessions | `context-master` gives non-blocking compression alerts at ~85% window |
60
+ | Scaffold rots after generation | `/wf update` pulls latest improvements from GitHub with checksum safety |
55
61
 
56
62
  ---
57
63
 
@@ -61,9 +67,11 @@ Most 0-1 AI coding projects fail before code quality matters:
61
67
  npx scaffold
62
68
  -> Claude reads Harness/SETUP.md
63
69
  -> Harness router selects only needed harness docs
64
- -> PRD/research/architecture/PLAN are filled
65
- -> first vertical slice is built, tested, reviewed, verified, and fed back
66
- -> validator catches missing project facts before release
70
+ -> PRD/research/architecture are filled
71
+ -> First task capsule created at Harness/tasks/<id>/
72
+ -> First vertical slice is built, tested, reviewed, verified, and fed back
73
+ -> Validator catches missing project facts before release
74
+ -> /wf update pulls latest scaffold improvements from GitHub
67
75
  ```
68
76
 
69
77
  ### Harness idea
@@ -84,7 +92,9 @@ my-project/
84
92
  │ ├── README.md ← Dynamic doc router
85
93
  │ ├── SETUP.md ← Temporary init guide (delete after setup)
86
94
  │ ├── MEMORY.md ← Cross-session resource index
87
- │ ├── PLAN.md Active execution plan, handoffs, heartbeat
95
+ │ ├── PROGRESS.md Global task index and cross-task decisions
96
+ │ ├── PLAN.md ← Deprecated stub → see PROGRESS.md + tasks/
97
+ │ ├── .harness-version ← Scaffold version + file checksums
88
98
  │ ├── WF.md ← Long-task workflow and recovery loop
89
99
  │ ├── lifecycle.md ← 0-1 product flow
90
100
  │ ├── subagents.md ← Controller-led subagent orchestration
@@ -98,7 +108,10 @@ my-project/
98
108
  │ ├── domain/
99
109
  │ │ └── ports.md ← Port contracts: pre/postconditions, errors
100
110
  │ ├── features/
101
- │ │ └── _template.md ← Kiro-lite feature doc template
111
+ │ │ └── _template.md ← Feature doc template
112
+ │ ├── tasks/
113
+ │ │ ├── _template/ ← Task capsule template (copy for new tasks)
114
+ │ │ └── <task-id>/ ← Per-task PROGRESS.md + PLAN.md + artifacts
102
115
  │ ├── research/
103
116
  │ │ ├── README.md
104
117
  │ │ ├── PRD.md
@@ -112,10 +125,11 @@ my-project/
112
125
  │ └── validate-harness.mjs
113
126
  ├── .claude/
114
127
  │ ├── settings.json ← Base permissions
115
- │ ├── agents/ ← Built-in common agents + stack-specific agents later
116
- │ ├── skills/ ← Harness loaders + stack-specific skills
128
+ │ ├── agents/ ← 11 common agents + stack-specific
129
+ │ ├── skills/ ← Harness skills + wf-update + stack-specific
117
130
  │ ├── commands/
118
- │ │ └── wf.md ← Slash-command bridge into wf-mode
131
+ │ │ ├── wf.md ← /wf enter workflow mode
132
+ │ │ └── update.md ← /wf update — GitHub-based scaffold update
119
133
  │ ├── hooks/ ← Configure automation after stack choice
120
134
  │ └── rules/ecc/
121
135
  │ └── common.md ← Universal coding rules
@@ -283,6 +297,75 @@ Presets:
283
297
  | `web-app` | `ts-react-frontend`, `browser-e2e`, `ui-ux-review` |
284
298
  | `fullstack` | `ts-react-frontend`, `python-backend`, `browser-e2e`, `github-pr-review` |
285
299
 
300
+ ### WF Mode
301
+
302
+ For long, difficult, multi-file, multi-agent, or repeated-failure tasks. Enter by typing `/wf`, `wf mode`, `workflow mode`, or `wk mode`.
303
+
304
+ ```text
305
+ /wf — triggers the full Ralph-style harness loop:
306
+ Intake (95% confidence gate)
307
+ -> 3+ parallel read-only subagents (planner + architect + researcher)
308
+ -> Synthesis + second plan → writes to Harness/tasks/<id>/PLAN.md
309
+ -> test-writer → implementer → reviewers → verifier
310
+ -> Failed? debugger → review → verify → loop
311
+ -> Closeout: context-master + memory-master consolidate knowledge
312
+ ```
313
+
314
+ | Phase | What happens | Heartbeat |
315
+ |-------|-------------|-----------|
316
+ | Intake | State goal, confidence, risks, write boundaries | Update before dispatching |
317
+ | Explore | 3-5 parallel read-only subagents | After each subagent return |
318
+ | Second Plan | Synthesize findings into `tasks/<id>/PLAN.md` | After plan written |
319
+ | Build | `test-writer` → `implementer` serial lane | Before/after long commands |
320
+ | Review | Spec review, then code-quality review | After each review gate |
321
+ | Verify | Run declared checks, record evidence | After each verification |
322
+ | Recover | `debugger` → fix → review → verify → loop | After each failure |
323
+ | Close | `context-master` extraction → `memory-master` consolidation → archive | Final heartbeat |
324
+
325
+ WF mode also auto-dispatches:
326
+ - **`memory-master`** at 3 same-class failures (records pattern before asking user)
327
+ - **`context-master`** at ~85% context window (non-blocking compression suggestion)
328
+ - **`context-master` + `memory-master`** at closeout (extract + persist session knowledge)
329
+
330
+ ```bash
331
+ # Tell the agent to use WF mode
332
+ "Use /wf for this migration."
333
+ "This is a long task — enter wf mode."
334
+ "wf mode — help me refactor the auth layer."
335
+ ```
336
+
337
+ ### WF Update
338
+
339
+ Check for scaffold updates from GitHub and apply them incrementally with checksum safety.
340
+
341
+ ```bash
342
+ # Check available updates without applying
343
+ /wf update --check
344
+
345
+ # Full update with safe incremental apply
346
+ /wf update
347
+ ```
348
+
349
+ **How it works:**
350
+
351
+ 1. Reads `Harness/.harness-version` — gets local version + 54 file SHA-256 checksums
352
+ 2. Fetches latest template files from `raw.githubusercontent.com/zingspark/create-harness-vibe-coding/main/templates/common/`
353
+ 3. Compares checksums file-by-file against stored values
354
+ 4. Classifies each file into three tiers:
355
+
356
+ | Tier | Policy | Examples |
357
+ |------|--------|----------|
358
+ | **SAFE** | Overwrite if local checksum matches stored (unmodified) | `Harness/WF.md`, `.claude/agents/*.md`, all skills |
359
+ | **PRESERVE** | Never touch | `Harness/PROGRESS.md`, `Harness/tasks/**`, `Harness/memory/**`, root `README.md` |
360
+ | **MERGE** | Overwrite if unmodified; report and skip if user-modified | `CLAUDE.md`, `Harness/MEMORY.md`, `Harness/README.md` |
361
+
362
+ 5. Reports: `updated/N, merge/N, created/N, skipped/N`
363
+ 6. Updates `.harness-version` checksums after applying
364
+
365
+ **Auto-check on session start:** When `Harness/.harness-version` has `autoCheck: true`, the agent runs a non-blocking `update --check` (10s timeout). If an update is available, it notifies without blocking the current task. Set `autoCheck: false` to disable.
366
+
367
+ **Offline behavior:** If GitHub is unreachable, the update check exits cleanly. All other harness features work without network.
368
+
286
369
  ### Verification
287
370
 
288
371
  ```bash
@@ -303,8 +386,10 @@ The harness validator checks scaffold consistency. It is not a full React, Playw
303
386
  ```
304
387
  "Read Harness/SETUP.md. Bootstrap this project from idea to first vertical slice."
305
388
  "Read Harness/SETUP.md. This is a React TypeScript SaaS idea. Clarify PRD first, then plan the first slice."
306
- "Read Harness/SETUP.md. This is a Python data product. Research the stack, define the MVP, then create Harness/PLAN.md."
389
+ "Read Harness/SETUP.md. This is a Python data product. Research the stack, define the MVP, then create a task capsule."
307
390
  "Use /wf for this long migration. Explore first, make a second plan, then implement, review, verify, and recover with heartbeat updates."
391
+ "/wf update --check — check if the scaffold has been improved since last generation."
392
+ "/wf update — pull the latest harness improvements from GitHub safely."
308
393
  ```
309
394
 
310
395
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-harness-vibe-coding",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "Scaffold a 0-1 product harness for AI-assisted research, PRD, planning, architecture, build, test, and feedback loops",
5
5
  "type": "module",
6
6
  "bin": {
package/src/generator.js CHANGED
@@ -13,6 +13,7 @@ const EMPTY_DIRS = [
13
13
  ];
14
14
 
15
15
  function harnessDest(file) {
16
+ if (file === '.harness-version') return 'Harness/.harness-version';
16
17
  if (file === 'SETUP.md') return 'Harness/SETUP.md';
17
18
  if (file === 'MEMORY.md') return 'Harness/MEMORY.md';
18
19
  if (file === 'scripts/validate-harness.mjs') return 'Harness/scripts/validate-harness.mjs';
@@ -23,6 +24,7 @@ function harnessDest(file) {
23
24
  if (file.startsWith('docs/domain/')) return file.replace(/^docs\/domain\//, 'Harness/domain/');
24
25
  if (file.startsWith('docs/features/')) return file.replace(/^docs\/features\//, 'Harness/features/');
25
26
  if (file.startsWith('docs/workflows/')) return file.replace(/^docs\/workflows\//, 'Harness/workflows/');
27
+ if (file.startsWith('docs/tasks/')) return file.replace(/^docs\/tasks\//, 'Harness/tasks/');
26
28
  return file;
27
29
  }
28
30
 
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: context-master
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
+ tools: Read, Grep, Glob
5
+ model: haiku
6
+ skills: harness-context
7
+ ---
8
+
9
+ # Context Master
10
+
11
+ You are a context analysis agent. You analyze the current conversation and project state without modifying any source or memory files. Your job is to detect when context is bloated and recommend compression, and to extract durable knowledge before context is lost.
12
+
13
+ Load first:
14
+
15
+ - `Harness/MEMORY.md`
16
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
17
+ - The current feature doc (if one exists)
18
+ - `Harness/memory/` files for dedup checking
19
+
20
+ ## Trigger Rules
21
+
22
+ You are dispatched by the controller when:
23
+
24
+ | Trigger | Action |
25
+ | --- | --- |
26
+ | Context exceeds ~85% of window | Analyze context distribution → write compression suggestion to `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` (non-blocking) |
27
+ | WF closeout (before `memory-master`) | Analyze full session → extract durable knowledge → return structured extraction for memory-master to write |
28
+ | Controller explicitly requests analysis | Run targeted analysis and return findings |
29
+
30
+ ## Analysis
31
+
32
+ When triggered, read the current PLAN.md and analyze:
33
+
34
+ 1. **Context distribution**: what fraction is code vs docs vs conversation vs task tracking
35
+ 2. **Stale sections**: loaded docs no longer relevant to the current goal
36
+ 3. **Compressible blocks**: long code outputs, verbose agent returns, repeated context
37
+ 4. **Durable knowledge candidates**: decisions made, lessons learned, patterns discovered that should survive compression
38
+
39
+ ## Compression Suggestion (non-blocking)
40
+
41
+ When context > ~85%, write ONLY to `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat`, appending or updating the `Next beat trigger` line:
42
+
43
+ ```markdown
44
+ Next beat trigger: context-master reports ~XX% usage — [N] stale doc blocks, [M] compressible outputs; suggest compression before next dispatch
45
+ ```
46
+
47
+ Do NOT interrupt the controller. The controller checks Heartbeat at natural pause points.
48
+
49
+ ## WF Closeout Extraction
50
+
51
+ During WF closeout, extract these for `memory-master` to write:
52
+
53
+ - Decisions made and their rationale
54
+ - Failed approaches and what was learned
55
+ - New patterns discovered
56
+ - User preferences observed
57
+ - Files that were key to the solution
58
+ - Commands that were particularly effective
59
+
60
+ Return structured extraction, not free-form narrative.
61
+
62
+ ## Rules
63
+
64
+ - Read-only for all files except `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` (compression suggestion only)
65
+ - Never modify source code, memory files, MEMORY.md, or README
66
+ - Do not interrupt active work — compression suggestions are passive, checked at natural pauses
67
+ - Prefer numbers over adjectives: "87% usage, 3 stale doc blocks" not "context is getting full"
68
+
69
+ ## Return
70
+
71
+ ```
72
+ Context usage: [estimated %]
73
+ Stale blocks: [count and names]
74
+ Compressible: [count and types]
75
+ Durable candidates: [count]
76
+ Compression suggestion: [one line — ready for Heartbeat]
77
+ Extraction for memory-master: [structured facts — only during closeout]
78
+ ```
@@ -14,7 +14,7 @@ Load first:
14
14
 
15
15
  - failing command and error output
16
16
  - related files
17
- - `Harness/PLAN.md`
17
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
18
18
  - current feature doc when present
19
19
 
20
20
  Inputs you must receive:
@@ -15,7 +15,7 @@ Load first:
15
15
  - `Harness/research/README.md`
16
16
  - `Harness/architecture.md` when boundaries may change
17
17
  - `Harness/domain/ports.md` when APIs cross layers
18
- - `Harness/PLAN.md`
18
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
19
19
 
20
20
  Inputs you must receive:
21
21
 
@@ -12,7 +12,7 @@ You are an implementation agent for this project harness.
12
12
 
13
13
  Load first:
14
14
 
15
- - current task from `Harness/PLAN.md`
15
+ - current task from `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
16
16
  - current feature doc when present
17
17
  - failing test or manual check
18
18
  - relevant architecture/ports docs if boundaries are touched
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: memory-master
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
+ tools: Read, Grep, Glob, Write, Edit
5
+ model: sonnet
6
+ skills: harness-context
7
+ ---
8
+
9
+ # Memory Master
10
+
11
+ You are a memory management agent for this project harness. You own durable memory: writing, deduplication, consolidation, and cross-project knowledge extraction.
12
+
13
+ Load first:
14
+
15
+ - `Harness/MEMORY.md`
16
+ - `Harness/memory/tool-usage-reflections.md`
17
+ - `Harness/memory/user-corrections-preferences.md`
18
+ - `Harness/memory/agent-lessons-patterns.md`
19
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` for current task context
20
+
21
+ ## Trigger Rules
22
+
23
+ You are dispatched by the controller when:
24
+
25
+ | Trigger | Action |
26
+ | --- | --- |
27
+ | WF recovery loop — same failure class ≥3 times | Write to `agent-lessons-patterns.md`: failure pattern, attempted paths, root cause hypothesis, resolution |
28
+ | Tool/command pattern fails 3+ times | Write to `tool-usage-reflections.md`: original command, error signature, effective alternative |
29
+ | User corrects same assumption/pattern 2+ times | Write to `user-corrections-preferences.md`: the correction, context, and how to apply |
30
+ | WF closeout (`context-master` runs first) | Consolidate extracted knowledge from context-master into the correct memory files; deduplicate and merge |
31
+ | User explicitly says "remember this" / "记录一下" | Write to the appropriate memory file directly |
32
+
33
+ ## Write Scope
34
+
35
+ **Harness/memory/* (read-write):**
36
+ - `tool-usage-reflections.md` — tool/command patterns and fixes
37
+ - `user-corrections-preferences.md` — user preferences and corrections
38
+ - `agent-lessons-patterns.md` — reusable review/debug/verification lessons
39
+
40
+ **Harness/MEMORY.md (append-only):**
41
+ - Add new agent, skill, or memory file registrations when new assets are created
42
+ - Do not remove or reorder existing entries without explicit user approval
43
+
44
+ **Global memory (cross-project):**
45
+ - Path: the active session's memory directory under the user's `.claude/projects/`
46
+ - Write only when a pattern, lesson, or fix applies across projects (e.g., Windows-specific workarounds, PowerShell escaping rules, universal tool patterns)
47
+ - Follow the same frontmatter format as project memory files
48
+ - Link to the project-level memory entry that spawned it
49
+
50
+ ## Rules
51
+
52
+ - Always read existing memory files before writing — check for duplicates
53
+ - If an existing entry covers the same ground, update it instead of creating a duplicate
54
+ - Keep entries concise: one fact per file, newest-first ordering
55
+ - Never record secrets, credentials, tokens, or private data
56
+ - Do not delete memory entries unless they are provably wrong and the user confirms
57
+ - After writing, update `Harness/MEMORY.md` index only when adding a NEW file (not when updating an existing entry)
58
+ - Return a one-line summary of what was written and where
59
+
60
+ ## Return
61
+
62
+ ```
63
+ Memory action: [written | updated | merged | skipped]
64
+ File(s): [paths]
65
+ Reason: [one sentence]
66
+ Cross-project: [yes | no] — [path if yes]
67
+ ```
@@ -12,7 +12,7 @@ You are a planning agent for this project harness.
12
12
 
13
13
  Load first:
14
14
 
15
- - `Harness/PLAN.md`
15
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
16
16
  - `Harness/lifecycle.md`
17
17
  - `Harness/dispatch.md`
18
18
  - current PRD or feature doc if present
@@ -14,7 +14,7 @@ Load first:
14
14
 
15
15
  - `Harness/research/README.md`
16
16
  - `Harness/research/research-results.md`
17
- - `Harness/PLAN.md`
17
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
18
18
 
19
19
  Inputs you must receive:
20
20
 
@@ -13,7 +13,7 @@ You are a test-first agent for this project harness.
13
13
  Load first:
14
14
 
15
15
  - current PRD or feature doc
16
- - `Harness/PLAN.md`
16
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
17
17
  - `Harness/agent-workflow.md`
18
18
 
19
19
  Inputs you must receive:
@@ -12,7 +12,7 @@ You are a verification agent for this project harness.
12
12
 
13
13
  Load first:
14
14
 
15
- - `Harness/PLAN.md`
15
+ - `Harness/tasks/<task-id>/PROGRESS.md` and `Harness/tasks/<task-id>/PLAN.md` when available
16
16
  - current feature doc when present
17
17
  - verification commands and acceptance criteria
18
18
 
@@ -0,0 +1,11 @@
1
+ # /wf update
2
+
3
+ Check for Harness scaffold updates from GitHub and apply them incrementally.
4
+
5
+ ## Check mode
6
+
7
+ `/wf update --check` — Report available updates without applying.
8
+
9
+ ## Full update
10
+
11
+ `/wf update` — Fetch latest templates, compare checksums, apply safe updates, report merge candidates.
@@ -0,0 +1,28 @@
1
+ # /wf max
2
+
3
+ Enter maximum-parallelism workflow mode. Splits tasks into minimal non-conflicting units and dispatches as many subagents as possible in parallel waves.
4
+
5
+ ## Required
6
+
7
+ - Load `wf-max` skill.
8
+ - MUST run exploration fan-out with as many read-only subagents as useful.
9
+ - MUST partition implementation into disjoint write sets across parallel waves.
10
+ - MUST run parallel reviewers per dimension after each implementation wave.
11
+
12
+ ## Loop
13
+
14
+ ```text
15
+ intake
16
+ -> max-parallel exploration (5-14 read-only agents)
17
+ -> synthesis + write-set coloring → dependency graph
18
+ -> wave 1: N parallel implementers (disjoint file claims)
19
+ -> wave 1 review: parallel spec/code/security reviewers
20
+ -> wave 2: M parallel implementers (depend on wave 1)
21
+ -> wave 2 review
22
+ -> verifier integration
23
+ -> closeout with context-master + memory-master
24
+ ```
25
+
26
+ Full organization model, span formula, Manager types, leaf condition, and synthesis protocol: [WF-MAX.md](Harness/WF-MAX.md).
27
+
28
+ Keep `Harness/tasks/<task-id>/PROGRESS.md#Heartbeat` current.