coding-agent-harness 1.0.0 → 1.0.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 (159) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.en-US.md +14 -0
  3. package/README.md +111 -86
  4. package/README.zh-CN.md +270 -0
  5. package/SKILL.md +116 -189
  6. package/docs-release/README.md +72 -5
  7. package/docs-release/architecture/overview.md +286 -28
  8. package/docs-release/architecture/overview.zh-CN.md +288 -0
  9. package/docs-release/assets/dashboard-overview-en.png +0 -0
  10. package/docs-release/assets/harness-architecture.svg +163 -0
  11. package/docs-release/assets/harness-workflow.svg +64 -0
  12. package/docs-release/guides/agent-installation.en-US.md +214 -0
  13. package/docs-release/guides/agent-installation.md +123 -26
  14. package/docs-release/guides/document-audience-and-surfaces.en-US.md +112 -0
  15. package/docs-release/guides/document-audience-and-surfaces.md +112 -0
  16. package/docs-release/guides/full-legacy-migration-subagent-strategy.md +334 -0
  17. package/docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md +334 -0
  18. package/docs-release/guides/legacy-migration-agent-prompt.md +384 -0
  19. package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +361 -0
  20. package/docs-release/guides/migration-playbook.en-US.md +325 -0
  21. package/docs-release/guides/migration-playbook.md +329 -0
  22. package/docs-release/guides/parent-control-repository-pattern.en-US.md +252 -0
  23. package/docs-release/guides/parent-control-repository-pattern.md +252 -0
  24. package/docs-release/guides/repository-operating-models.en-US.md +196 -0
  25. package/docs-release/guides/repository-operating-models.md +196 -0
  26. package/docs-release/intl/README.md +15 -0
  27. package/docs-release/intl/de-DE.md +18 -0
  28. package/docs-release/intl/en-US.md +18 -0
  29. package/docs-release/intl/es-ES.md +18 -0
  30. package/docs-release/intl/fr-FR.md +18 -0
  31. package/docs-release/intl/ja-JP.md +18 -0
  32. package/docs-release/intl/ko-KR.md +18 -0
  33. package/docs-release/intl/zh-CN.md +18 -0
  34. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/brief.md +13 -0
  35. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/lesson_candidates.md +24 -0
  36. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/progress.md +1 -1
  37. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/task_plan.md +4 -2
  38. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/{visual_roadmap.md → visual_map.md} +9 -1
  39. package/package.json +22 -1
  40. package/references/agents-md-pattern.md +3 -3
  41. package/references/docs-directory-standard.md +47 -3
  42. package/references/external-source-intake-standard.md +75 -0
  43. package/references/harness-ledger.md +5 -3
  44. package/references/legacy-12-phase-bootstrap.md +41 -0
  45. package/references/lessons-governance.md +23 -6
  46. package/references/planning-loop.md +41 -3
  47. package/references/project-onboarding-audit.md +10 -0
  48. package/references/repo-governance-standard.md +2 -0
  49. package/references/testing-standard.md +50 -0
  50. package/references/walkthrough-closeout.md +6 -5
  51. package/scripts/check-harness.mjs +76 -35
  52. package/scripts/harness.mjs +303 -12
  53. package/scripts/lib/capability-registry.mjs +533 -0
  54. package/scripts/lib/check-profiles.mjs +510 -0
  55. package/scripts/lib/core-shared.mjs +186 -0
  56. package/scripts/lib/dashboard-data.mjs +389 -0
  57. package/scripts/lib/dashboard-workbench.mjs +217 -0
  58. package/scripts/lib/dashboard-writer.mjs +93 -2
  59. package/scripts/lib/harness-core.mjs +10 -1318
  60. package/scripts/lib/lesson-maintenance.mjs +145 -0
  61. package/scripts/lib/markdown-utils.mjs +158 -0
  62. package/scripts/lib/migration-planner.mjs +478 -0
  63. package/scripts/lib/migration-support.mjs +312 -0
  64. package/scripts/lib/task-lifecycle.mjs +755 -0
  65. package/scripts/lib/task-scanner.mjs +682 -0
  66. package/scripts/smoke-dashboard.mjs +22 -0
  67. package/scripts/test-harness.mjs +928 -15
  68. package/templates/AGENTS.md.template +41 -30
  69. package/templates/architecture/Architecture-SSoT.md +21 -0
  70. package/templates/architecture/README.md +49 -0
  71. package/templates/architecture/critical-flows.md +22 -0
  72. package/templates/architecture/local-repo-context.md +20 -0
  73. package/templates/architecture/service-catalog.md +17 -0
  74. package/templates/architecture/services/service-template.md +31 -0
  75. package/templates/architecture/system-map.md +22 -0
  76. package/templates/dashboard/assets/app-src/00-state.js +41 -0
  77. package/templates/dashboard/assets/app-src/10-router.js +76 -0
  78. package/templates/dashboard/assets/app-src/20-overview.js +235 -0
  79. package/templates/dashboard/assets/app-src/30-tasks.js +563 -0
  80. package/templates/dashboard/assets/app-src/40-modules.js +58 -0
  81. package/templates/dashboard/assets/app-src/45-review.js +128 -0
  82. package/templates/dashboard/assets/app-src/50-migration.js +169 -0
  83. package/templates/dashboard/assets/app-src/60-shared.js +61 -0
  84. package/templates/dashboard/assets/app-src/90-bindings.js +382 -0
  85. package/templates/dashboard/assets/app.css +2575 -310
  86. package/templates/dashboard/assets/app.js +1498 -307
  87. package/templates/dashboard/assets/app.manifest.json +11 -0
  88. package/templates/dashboard/assets/i18n.js +429 -44
  89. package/templates/dashboard/assets/mermaid-renderer.js +58 -8
  90. package/templates/development/README.md +52 -0
  91. package/templates/development/codebase-map.md +11 -0
  92. package/templates/development/cross-repo-debugging.md +18 -0
  93. package/templates/development/external-context/service-template.md +33 -0
  94. package/templates/development/external-source-packs/README.md +24 -0
  95. package/templates/development/external-source-packs/digest-template.md +28 -0
  96. package/templates/development/local-setup.md +16 -0
  97. package/templates/development/stubs-and-mocks.md +11 -0
  98. package/templates/integrations/README.md +40 -0
  99. package/templates/integrations/api-contract.md +42 -0
  100. package/templates/integrations/event-contract.md +46 -0
  101. package/templates/integrations/third-party/vendor-template.md +42 -0
  102. package/templates/integrations/webhook-contract.md +41 -0
  103. package/templates/planning/brief.md +32 -0
  104. package/templates/planning/lesson_candidates.md +58 -0
  105. package/templates/planning/long-running-task-contract.md +7 -0
  106. package/templates/planning/module_brief.md +25 -0
  107. package/templates/planning/module_session_prompt.md +6 -0
  108. package/templates/planning/task_plan.md +7 -5
  109. package/templates/planning/{visual_roadmap.md → visual_map.md} +24 -2
  110. package/templates/reference/docs-library-standard.md +31 -0
  111. package/templates/reference/execution-workflow-standard.md +4 -2
  112. package/templates/reference/external-source-intake-standard.md +82 -0
  113. package/templates/reference/harness-ledger-standard.md +1 -0
  114. package/templates/reference/repo-governance-standard.md +6 -4
  115. package/templates/reference/walkthrough-standard.md +2 -1
  116. package/templates/walkthrough/walkthrough-template.md +2 -2
  117. package/templates-zh-CN/AGENTS.md.template +69 -70
  118. package/templates-zh-CN/architecture/Architecture-SSoT.md +21 -0
  119. package/templates-zh-CN/architecture/README.md +51 -0
  120. package/templates-zh-CN/architecture/critical-flows.md +24 -0
  121. package/templates-zh-CN/architecture/local-repo-context.md +20 -0
  122. package/templates-zh-CN/architecture/service-catalog.md +17 -0
  123. package/templates-zh-CN/architecture/services/service-template.md +31 -0
  124. package/templates-zh-CN/architecture/system-map.md +22 -0
  125. package/templates-zh-CN/development/README.md +54 -0
  126. package/templates-zh-CN/development/codebase-map.md +11 -0
  127. package/templates-zh-CN/development/cross-repo-debugging.md +18 -0
  128. package/templates-zh-CN/development/external-context/service-template.md +33 -0
  129. package/templates-zh-CN/development/external-source-packs/README.md +24 -0
  130. package/templates-zh-CN/development/external-source-packs/digest-template.md +28 -0
  131. package/templates-zh-CN/development/local-setup.md +16 -0
  132. package/templates-zh-CN/development/stubs-and-mocks.md +11 -0
  133. package/templates-zh-CN/integrations/README.md +42 -0
  134. package/templates-zh-CN/integrations/api-contract.md +42 -0
  135. package/templates-zh-CN/integrations/event-contract.md +46 -0
  136. package/templates-zh-CN/integrations/third-party/vendor-template.md +42 -0
  137. package/templates-zh-CN/integrations/webhook-contract.md +41 -0
  138. package/templates-zh-CN/planning/brief.md +32 -0
  139. package/templates-zh-CN/planning/lesson_candidates.md +58 -0
  140. package/templates-zh-CN/planning/long-running-task-contract.md +1 -1
  141. package/templates-zh-CN/planning/module_brief.md +25 -0
  142. package/templates-zh-CN/planning/module_plan.md +2 -2
  143. package/templates-zh-CN/planning/module_session_prompt.md +4 -3
  144. package/templates-zh-CN/planning/task_plan.md +10 -4
  145. package/templates-zh-CN/planning/{visual_roadmap.md → visual_map.md} +21 -2
  146. package/templates-zh-CN/reference/docs-library-standard.md +35 -0
  147. package/templates-zh-CN/reference/execution-workflow-standard.md +9 -2
  148. package/templates-zh-CN/reference/external-source-intake-standard.md +82 -0
  149. package/templates-zh-CN/reference/harness-ledger-standard.md +5 -2
  150. package/templates-zh-CN/reference/repo-governance-standard.md +2 -0
  151. package/templates-zh-CN/reference/walkthrough-standard.md +4 -4
  152. package/templates-zh-CN/walkthrough/Closeout-SSoT.md +2 -2
  153. package/templates-zh-CN/walkthrough/walkthrough-template.md +2 -2
  154. package/templates-zh-CN/dashboard/assets/app.css +0 -399
  155. package/templates-zh-CN/dashboard/assets/app.js +0 -435
  156. package/templates-zh-CN/dashboard/assets/i18n.js +0 -47
  157. package/templates-zh-CN/dashboard/assets/markdown-reader.js +0 -116
  158. package/templates-zh-CN/dashboard/assets/mermaid-renderer.js +0 -59
  159. package/templates-zh-CN/dashboard/index.html +0 -18
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.2
4
+
5
+ - Added the dashboard workbench, review queue, migration rails, lifecycle gates,
6
+ lesson candidate governance, and refreshed public installation guidance.
7
+ - Added bilingual README coverage and restored Star History in the public
8
+ project README.
9
+ - Slimmed the generated `AGENTS.md` templates back to charter and routing
10
+ content instead of install instructions.
11
+ - Removed source-checkout and private maintainer instructions from
12
+ target-facing reports and public install guidance.
13
+ - Replaced old 12-phase labels in the Skill reference/template indexes with
14
+ v1.0 capability and task-context routing.
15
+ - Added README architecture diagrams and separated human CLI commands from
16
+ agent-facing setup prompts.
17
+ - Expanded the public architecture overview with Mermaid diagrams for package
18
+ boundaries, CLI surfaces, dashboard data flow, lifecycle state, migration
19
+ rails, release docs boundaries, and runtime safety.
20
+ - Added a Simplified Chinese mirror for the public architecture overview.
21
+
3
22
  ## 1.0.0
4
23
 
5
24
  - Added the `harness` CLI with `check`, `status`, `dashboard`, `init`, and
@@ -0,0 +1,14 @@
1
+ # Coding Agent Harness
2
+
3
+ The English README is now the canonical GitHub entry:
4
+
5
+ [`README.md`](README.md)
6
+
7
+ Other language entries:
8
+
9
+ - [简体中文](README.zh-CN.md)
10
+ - [日本語](docs-release/intl/ja-JP.md)
11
+ - [한국어](docs-release/intl/ko-KR.md)
12
+ - [Français](docs-release/intl/fr-FR.md)
13
+ - [Español](docs-release/intl/es-ES.md)
14
+ - [Deutsch](docs-release/intl/de-DE.md)
package/README.md CHANGED
@@ -2,135 +2,160 @@
2
2
 
3
3
  [![skills.sh](https://skills.sh/b/FairladyZ625/coding-agent-harness)](https://skills.sh/FairladyZ625/coding-agent-harness)
4
4
 
5
- > AI 15 万行代码不难,难的是不让它跑偏。一套经过真实项目验证的工程方法论,帮你在任意项目上构建 Coding Agent harness 体系。
5
+ English | [简体中文](README.zh-CN.md) | [日本語](docs-release/intl/ja-JP.md) | [한국어](docs-release/intl/ko-KR.md) | [Français](docs-release/intl/fr-FR.md) | [Español](docs-release/intl/es-ES.md) | [Deutsch](docs-release/intl/de-DE.md)
6
6
 
7
- ## 这是什么
7
+ Coding agents can write code quickly. The annoying part starts later: one session made a plan, another changed files, and the next agent has to guess what is still risky.
8
8
 
9
- **Coding Agent Harness** 是一套开源的方法论和工具模板,用于规控
10
- Coding Agent(Codex、Claude Code、Gemini CLI 等)在长程项目中的表现。
9
+ Coding Agent Harness keeps that work in the repo: plans, progress, reviews, migration notes, and a dashboard that shows the current state.
11
10
 
12
- 它解决的核心问题:当任务持续几天、几周、上百轮迭代的时候,怎么保证 agent 不跑偏。
11
+ ![Coding Agent Harness dashboard overview](docs-release/assets/dashboard-overview-en.png)
13
12
 
14
- ## 核心理念
13
+ ## What It Looks Like
15
14
 
16
- - **文档是写给 Agent 看的,不是写给人看的。**
17
- - **上下文不是越多越好,是越准越好。**
18
- - **单元测试只是底线,不是保障。**
19
- - **Repo 护栏是地基。**
20
- - **长程任务先设计合同,再开放执行。**
21
- - **对抗性审查必须有报告落点和信心挑战循环。**
22
- - **严肃项目用顶级模型。**
23
- - **强制流程优于口头约定。**
15
+ The harness is just files plus a local dashboard.
24
16
 
25
- ## 它包含什么
17
+ - `AGENTS.md` tells the next agent how this repo works.
18
+ - `task_plan.md`, `progress.md`, and `review.md` keep the task from turning into chat history.
19
+ - Checks and migration reports say what is safe, what is stale, and what still needs a human decision.
20
+ - `harness dev` opens the dashboard for everyday review.
26
21
 
27
- - `SKILL.md`:给 Codex、Claude Code、Gemini CLI 等 agent 读取的执行协议。
28
- - `templates/` 和 `templates-zh-CN/`:英文/中文两套完整项目模板。
29
- - `references/`:AGENTS 入口、Planning Loop、回归、walkthrough、worktree 等方法论。
30
- - `scripts/harness.mjs`:v1.0 CLI,支持初始化、能力声明、状态 JSON 和只读 dashboard。
31
- - `examples/minimal-project/`:最小可检查示例。
32
- - `docs-release/`:公开架构、发布计划和 agent 安装指南。
22
+ ## The Loop
33
23
 
34
- ## 快速开始
24
+ | Step | Human Experience | Agent / CLI Surface |
25
+ | --- | --- | --- |
26
+ | Install | Give the agent one entrypoint. | `npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness` |
27
+ | Start | The agent scans first, then proposes an init or migration plan. | `npx --yes coding-agent-harness init ...` or `migrate-plan` |
28
+ | Review | Open the dashboard and check the task state. | `npx --yes coding-agent-harness dev .` |
29
+ | Verify | Run checks before handoff. | `npx --yes coding-agent-harness check --profile target-project .` |
35
30
 
36
- ### 使用 npx 安装为 Agent Skill
31
+ ## Try It In A Project
37
32
 
38
- 本仓库已经按开放 Agent Skills 生态的 `SKILL.md` 格式发布,可以通过
39
- [`skills`](https://github.com/vercel-labs/skills) CLI 安装到 Codex、Claude Code、
40
- Cursor、OpenClaw、Gemini CLI 等兼容 agent。
41
-
42
- 先预览仓库里可安装的 Skill:
33
+ Use `npx` first. It does not add the CLI to your project dependencies.
43
34
 
44
35
  ```bash
45
- npx skills add FairladyZ625/coding-agent-harness --list
36
+ npx --yes coding-agent-harness init --locale en-US --capabilities core,dashboard .
37
+ npx --yes coding-agent-harness dev .
38
+ npx --yes coding-agent-harness check --profile target-project .
46
39
  ```
47
40
 
48
- 安装到当前项目:
41
+ For Chinese templates:
49
42
 
50
43
  ```bash
51
- npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
44
+ npx --yes coding-agent-harness init --locale zh-CN --capabilities core,dashboard .
52
45
  ```
53
46
 
54
- 安装到 Codex 全局 Skill 目录:
47
+ If you want a static evidence snapshot instead of the live local workbench:
55
48
 
56
49
  ```bash
57
- npx skills add FairladyZ625/coding-agent-harness \
58
- --skill coding-agent-harness \
59
- --agent codex \
60
- --global \
61
- -y
50
+ npx --yes coding-agent-harness dashboard --out-dir tmp/harness-dashboard .
51
+ open tmp/harness-dashboard/index.html
62
52
  ```
63
53
 
64
- 安装后可用下面的命令确认:
54
+ ## What The Agent Reads
65
55
 
66
- ```bash
67
- npx skills list --global --agent codex
56
+ Harness is ordinary repository content. There is no database to run.
57
+
58
+ ```text
59
+ AGENTS.md
60
+ docs/
61
+ 03-ARCHITECTURE/
62
+ 04-DEVELOPMENT/
63
+ 05-TEST-QA/
64
+ 09-PLANNING/TASKS/
65
+ 10-WALKTHROUGH/
66
+ 11-REFERENCE/
68
67
  ```
69
68
 
70
- `skills` CLI 支持的常见安装位置包括:
69
+ Typical task files:
71
70
 
72
- | Agent | Project 目录 | Global 目录 |
73
- | ------ | -------------- | ------------- |
74
- | Codex | `.agents/skills/` | `~/.codex/skills/` |
75
- | Claude Code | `.claude/skills/` | `~/.claude/skills/` |
76
- | OpenClaw | `skills/` | `~/.openclaw/skills/` |
77
- | Gemini CLI | `.agents/skills/` | `~/.gemini/skills/` |
71
+ ```text
72
+ task_plan.md
73
+ execution_strategy.md
74
+ visual_map.md
75
+ progress.md
76
+ review.md
77
+ lesson_candidates.md
78
+ ```
78
79
 
79
- ### Agent 直接执行
80
+ Humans scan the dashboard. Agents read the files. That is the whole trick.
80
81
 
81
- 把下面这段话发给目标项目里的 Agent(Codex / Claude Code / Gemini CLI 等):
82
+ ## Language Support
82
83
 
83
- ```text
84
- 请安装并读取 FairladyZ625/coding-agent-harness coding-agent-harness Skill。
85
- 按照 Diagnose Decide Scaffold Configure → Verify → Deliver 六阶段,
86
- 在当前项目上搭建 harness。先确认使用中文还是英文模板;运行 init 时显式传
87
- --locale zh-CN --locale en-US;如果项目已有旧 harness,只做增量迁移,不覆盖历史文档。
84
+ | Language | Public intro | README / guides | Executable templates |
85
+ | --- | --- | --- | --- |
86
+ | English | Full | Full | Full |
87
+ | Simplified Chinese | Full | Full | Full |
88
+ | Japanese | Intro | Routing only | Use English templates |
89
+ | Korean | Intro | Routing only | Use English templates |
90
+ | French | Intro | Routing only | Use English templates |
91
+ | Spanish | Intro | Routing only | Use English templates |
92
+ | German | Intro | Routing only | Use English templates |
93
+
94
+ Intro-only pages are deliberately small. Agent-executable templates stay in English and Simplified Chinese first, because stale translated instructions are worse than no translation.
95
+
96
+ ## Good Fit
97
+
98
+ This is useful when:
99
+
100
+ - agents work on real repositories for days or weeks;
101
+ - multiple agents or developers share the same project;
102
+ - task state, review evidence, and regression results need to survive across sessions;
103
+ - an existing project has old plans, migration notes, or scattered agent instructions;
104
+ - the important parts of AI work should not live only in chat logs.
105
+
106
+ ## Install The Skill
107
+
108
+ If your agent supports Skills:
109
+
110
+ ```bash
111
+ npx skills add FairladyZ625/coding-agent-harness --list
112
+ npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
88
113
  ```
89
114
 
90
- 面向 agent 的完整安装细则见
91
- [`docs-release/guides/agent-installation.md`](docs-release/guides/agent-installation.md)。
115
+ Install into the global Codex skill directory:
116
+
117
+ ```bash
118
+ npx skills add FairladyZ625/coding-agent-harness \
119
+ --skill coding-agent-harness \
120
+ --agent codex \
121
+ --global \
122
+ -y
123
+ ```
92
124
 
93
- ## v1.0 CLI 快速看
125
+ Agents should not silently run a global npm install. If a long-lived `harness` command is desired, ask the human first:
94
126
 
95
127
  ```bash
96
- node scripts/harness.mjs init --locale zh-CN --capabilities core,dashboard /path/to/project
97
- node scripts/harness.mjs install-user --agent codex --global
98
- node scripts/harness.mjs doctor-user --agent codex
99
- node scripts/harness.mjs add-capability safe-adoption --locale zh-CN /path/to/old-project
100
- node scripts/harness.mjs status --json /path/to/project
101
- node scripts/harness.mjs dashboard --out tmp/harness-dashboard.html /path/to/project
102
- node scripts/harness.mjs check --profile target-project /path/to/project
128
+ npm install -g coding-agent-harness
129
+ harness --help
103
130
  ```
104
131
 
105
- ## Base Harness = 地基
132
+ ## Agent Prompt
106
133
 
107
- 这套 harness **base 骨架**,管的是项目级的治理框架——文档怎么组织、
108
- 任务怎么排期、回归怎么跑、worktree 怎么并行。
134
+ Send this to an agent inside your target project:
109
135
 
110
- 它用四张 SSoT 和一张全局 Ledger 维持上下文透明:
136
+ ```text
137
+ Install and read Coding Agent Harness first:
138
+
139
+ npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
111
140
 
112
- - **Feature SSoT**:保存 feature / wave / implementation 的当前事实
113
- - **Delivery SSoT**:保存多人、多 agent、多仓或传统流程下的 feature block 分配、依赖和集成顺序
114
- - **Regression SSoT**:保存 regression surface、证据深度和 residual 的当前事实
115
- - **Lessons SSoT**:保存经验沉淀建议和规范演进审批状态
116
- - **Lesson Detail Docs**:每条 pending lesson 的完整说明,位于 `docs/01-GOVERNANCE/lessons/`
117
- - **Harness Ledger**:记录每轮任务是否按 SOP 维护了这些事实
118
- - **Closeout SSoT**:记录每个 closed 任务的 walkthrough、evidence、residual 或受控 skip reason
119
- - **Review Report**:保存在任务目录的 `review.md`,记录对抗性审查的 findings、no-finding 结论和残余风险
120
- - **Repo Governance**:保存 PR、branch protection、required checks、worktree concurrency 的当前 contract
121
- - **CI/CD Standard**:保存 workflow、required checks、release/CD residual 的当前事实
141
+ First diagnose the project structure, then give me an initialization or migration plan.
142
+ Do not overwrite existing business docs, historical tasks, regression records, or user changes.
122
143
 
123
- 详细模块说明见 [`references/`](references/)。
144
+ Use npx unless I explicitly approve a global npm install:
145
+ npx --yes coding-agent-harness <command>
124
146
 
125
- 你可以在这个地基上叠加任何工作流:
147
+ After confirmation, execute Diagnose -> Decide -> Scaffold -> Configure -> Verify -> Deliver.
148
+ When finished, report created files, check results, Dashboard URL or HTML path, and recommended next steps.
149
+ ```
126
150
 
127
- - [gstack](https://github.com/garrytan/gstack) — Garry Tan 的虚拟工程团队
128
- (23 个 slash command)
129
- - [everything-claude-code](https://github.com/affaan-m/everything-claude-code) —
130
- Agent harness 性能优化系统
131
- - [Superpowers](https://github.com/anthropics/superpowers) — Anthropic 官方增强工具集
151
+ ## Learn More
132
152
 
133
- 三者不冲突,可以自由组合。
153
+ - Docs release index: [`docs-release/README.md`](docs-release/README.md)
154
+ - Agent installation guide: [`docs-release/guides/agent-installation.en-US.md`](docs-release/guides/agent-installation.en-US.md)
155
+ - Architecture overview: [`docs-release/architecture/overview.md`](docs-release/architecture/overview.md)
156
+ - Migration playbook: [`docs-release/guides/migration-playbook.en-US.md`](docs-release/guides/migration-playbook.en-US.md)
157
+ - Operating models: [`docs-release/guides/repository-operating-models.en-US.md`](docs-release/guides/repository-operating-models.en-US.md)
158
+ - Minimal project example: [`examples/minimal-project/`](examples/minimal-project/)
134
159
 
135
160
  ## Star History
136
161
 
@@ -0,0 +1,270 @@
1
+ # Coding Agent Harness
2
+
3
+ [![skills.sh](https://skills.sh/b/FairladyZ625/coding-agent-harness)](https://skills.sh/FairladyZ625/coding-agent-harness)
4
+
5
+ [English](README.md) | 简体中文 | [日本語](docs-release/intl/ja-JP.md) | [한국어](docs-release/intl/ko-KR.md) | [Français](docs-release/intl/fr-FR.md) | [Español](docs-release/intl/es-ES.md) | [Deutsch](docs-release/intl/de-DE.md)
6
+
7
+ AI 写代码不难。
8
+
9
+ 难的是一个任务跑到第五个小时以后,谁还记得上一个 Agent 为什么这么改、哪些风险没处理、哪些证据是真的。
10
+
11
+ Coding Agent Harness 做的事很朴素:把这些东西放回仓库里,再用一个 Dashboard 展示出来。
12
+
13
+ ![Coding Agent Harness Dashboard 总览](docs-release/assets/dashboard-overview-en.png)
14
+
15
+ ## 先看它怎么玩
16
+
17
+ | 步骤 | 人看到什么 | Agent / CLI 做什么 |
18
+ | --- | --- | --- |
19
+ | 1. 安装入口 | 把 Harness 入口发给 Agent | `npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness` |
20
+ | 2. 初始化或迁移 | Agent 先诊断仓库,再给计划 | `init` / `migrate-plan` |
21
+ | 3. 打开 Dashboard | 看任务、风险、审查和证据 | `npx --yes coding-agent-harness dev .` |
22
+ | 4. 交付前检查 | 用检查结果证明状态 | `check --profile target-project` |
23
+
24
+ ## 一眼看懂
25
+
26
+ Coding Agent Harness 不是另一个聊天提示词集合。它把 Agent 长程开发需要依赖的事实沉淀到仓库:入口协议、任务计划、执行证据、回归结果、Dashboard 和收口记录。
27
+
28
+ 最小闭环是:
29
+
30
+ - 人提出目标,Agent 先读仓库里的 Harness 协议。
31
+ - Agent 按 Diagnose → Decide → Scaffold → Configure → Verify → Deliver 执行。
32
+ - CLI 和 Dashboard 把状态、风险、迁移计划和审查证据暴露出来。
33
+ - 下一个 Agent 不靠上一轮聊天记忆,而是从仓库事实继续。
34
+
35
+ ## 这是什么
36
+
37
+ Coding Agent Harness 是一套给 AI Coding Agent 使用的项目工程框架。
38
+
39
+ 它把清晰的工作协议、文档结构、任务生命周期、回归证据和审查流程放进你的仓库,让 Agent 可以直接读取、执行、更新和验证。
40
+
41
+ ## 为什么需要
42
+
43
+ 用 AI 写几千行代码并不难。真正难的是:任务跑了几天以后,Agent 还知道自己在做什么;多个 Agent 并行时不互相覆盖;新 Agent 接手项目时,不靠聊天记忆,而靠仓库里的事实继续工作。
44
+
45
+ Coding Agent Harness 的目标,是把这些事实变成项目的一部分。
46
+
47
+ ## 核心特点
48
+
49
+ ### 开源、简单、开箱即用
50
+
51
+ Harness 以普通项目文件运行:Markdown、模板、检查脚本、静态 Dashboard 快照和可选的本地动态 Workbench。核心包没有第三方运行时依赖,也不需要额外后台服务或数据库;需要网页操作时,用 `harness dev` 启动只绑定本机的临时操作台。
52
+
53
+ 你把安装提示发给 Agent,它就可以在目标项目里完成初始化、扫描、迁移和验证。
54
+
55
+ ### 兼容主流 Coding Agent
56
+
57
+ 只要 Agent 能读文件、写文件、执行命令,就可以使用这套 Harness。Codex、Claude Code、Gemini CLI、Cursor 风格 Agent、OpenClaw 等都可以接入。
58
+
59
+ ### 文档驱动,过程透明
60
+
61
+ 所有关键状态都在仓库里可见:
62
+
63
+ - 当前任务是什么
64
+ - 为什么做
65
+ - 执行策略是什么
66
+ - 证据在哪里
67
+ - 回归是否通过
68
+ - 有哪些残余风险
69
+ - 哪些任务已经完成,哪些还需要处理
70
+
71
+ 人可以看 Brief、Dashboard 和迁移报告。Agent 可以看结构化文档、任务合同和检查结果。
72
+
73
+ ### 为长程任务设计
74
+
75
+ Harness 覆盖长程开发里的持续性问题:任务生命周期、Brief、Execution Strategy、Visual Map、Progress Log、Review、Regression Evidence、Closeout 和 Lessons。
76
+
77
+ 它让 Agent 每一步都有上下文、证据和收口标准。
78
+
79
+ ### 旧项目也能迁移
80
+
81
+ 旧项目迁移不是直接套模板。标准流程是:先扫描项目,生成迁移计划,推荐迁移模式,向用户提问确认,再执行迁移,最后用 Dashboard 和检查结果证明迁移状态。
82
+
83
+ ## 适合什么项目
84
+
85
+ Coding Agent Harness 适合:
86
+
87
+ - 正在用 Coding Agent 做真实软件项目的团队。
88
+ - 任务会持续多天、多周、多轮迭代的项目。
89
+ - 需要多个 Agent 或多个开发者协作的项目。
90
+ - 已经积累大量任务文档、回归记录、迁移记录的项目。
91
+ - 希望 AI 开发过程可见、可审查、可复用的项目。
92
+
93
+ ## 快速开始
94
+
95
+ ### 安装 Skill
96
+
97
+ 如果你的 Agent 支持 Skills,用 `npx` 安装本 Skill:
98
+
99
+ ```bash
100
+ npx skills add FairladyZ625/coding-agent-harness --list
101
+ npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
102
+ ```
103
+
104
+ 安装到 Codex 全局 Skill 目录:
105
+
106
+ ```bash
107
+ npx skills add FairladyZ625/coding-agent-harness \
108
+ --skill coding-agent-harness \
109
+ --agent codex \
110
+ --global \
111
+ -y
112
+ ```
113
+
114
+ CLI 不会自动写进目标项目依赖。需要运行 Harness 命令时,用 `npx` 即可;第一次执行会从 npm 拉取包到本机 npm 缓存,不会写入目标项目:
115
+
116
+ ```bash
117
+ npx --yes coding-agent-harness init --locale zh-CN --capabilities core,dashboard .
118
+ npx --yes coding-agent-harness dev .
119
+ npx --yes coding-agent-harness check --profile target-project .
120
+ ```
121
+
122
+ 如果你希望长期直接使用 `harness` 命令,可以全局安装:
123
+
124
+ ```bash
125
+ npm install -g coding-agent-harness
126
+ harness --help
127
+ ```
128
+
129
+ Agent 不应静默执行全局安装。只有用户明确同意修改全局 npm 环境后,Agent 才能运行 `npm install -g coding-agent-harness`;否则继续使用 `npx --yes coding-agent-harness ...`。
130
+
131
+ ### 人看的常用命令
132
+
133
+ 初始化一个中文 Harness:
134
+
135
+ ```bash
136
+ npx --yes coding-agent-harness init --locale zh-CN --capabilities core,dashboard .
137
+ ```
138
+
139
+ 启动本地动态 Workbench:
140
+
141
+ ```bash
142
+ npx --yes coding-agent-harness dev .
143
+ ```
144
+
145
+ 生成可离线打开的静态 Dashboard:
146
+
147
+ ```bash
148
+ npx --yes coding-agent-harness dashboard --out-dir tmp/harness-dashboard .
149
+ open tmp/harness-dashboard/index.html
150
+ ```
151
+
152
+ 运行目标项目检查:
153
+
154
+ ```bash
155
+ npx --yes coding-agent-harness check --profile target-project .
156
+ ```
157
+
158
+ ### 给 Agent 的提示词
159
+
160
+ 把下面这段话发给目标项目里的 Agent:
161
+
162
+ ```text
163
+ 请先安装并读取 Coding Agent Harness:
164
+
165
+ npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
166
+
167
+ 注意:这一步会在目标仓写入 .agents/skills/coding-agent-harness/ 和 skills-lock.json。
168
+ 如果本轮只允许零写入扫描,请先跳过本步,直接使用 npx --yes coding-agent-harness ... 扫描;获准写入后再安装 Skill。
169
+
170
+ 先检查当前环境是否有 harness 命令。
171
+
172
+ 如果没有,不要静默全局安装。请先问我:
173
+ “当前环境没有 harness 命令。是否允许我运行 npm install -g coding-agent-harness?
174
+ 这会修改全局 npm 环境,之后可以直接使用 harness。
175
+ 如果不同意,我会用 npx --yes coding-agent-harness ... 临时执行,不写入项目依赖。”
176
+
177
+ 只有我明确同意后,才运行:
178
+ npm install -g coding-agent-harness
179
+
180
+ 如果我不同意或没有回复,后续 CLI 都用:
181
+ npx --yes coding-agent-harness <command>
182
+ 这是“全局 npm 安装确认”,和后面的“初始化计划确认”是两个不同确认点。
183
+
184
+ 在当前项目上搭建 Coding Agent Harness。
185
+ 默认使用中文模板;如果项目明确是英文团队或英文文档,请先询问我是否改用英文。
186
+
187
+ 请先诊断项目结构,再给出初始化计划。
188
+ 如果项目是微服务、多仓、前后端分仓,或依赖外部系统,请主动询问我是否有外部架构文档、接口文档、流程图、会议纪要、链接或导出包。
189
+ 外部资料很多时,请先建立 external-source-packs 索引和摘要,再把稳定结论投影到 03-ARCHITECTURE / 04-DEVELOPMENT / 06-INTEGRATIONS。
190
+ 确认后,按照 Diagnose → Decide → Scaffold → Configure → Verify → Deliver 六阶段执行。
191
+ 这里的确认是“初始化计划确认”;如果我已经在本消息里明确要求直接搭建,可视为已确认。
192
+ 执行初始化时使用:
193
+ npx --yes coding-agent-harness init --locale zh-CN --capabilities core,dashboard .
194
+
195
+ 初始化完成后,日常查看和人工确认使用动态网页:
196
+ npx --yes coding-agent-harness dev .
197
+
198
+ 如果只需要离线证据快照,再生成静态 dashboard:
199
+ npx --yes coding-agent-harness dashboard --out-dir tmp/harness-dashboard .
200
+
201
+ 不要覆盖已有业务文档、历史任务、回归记录或用户改动。
202
+ 完成后请给出创建文件、检查结果和下一步建议。
203
+ ```
204
+
205
+ 如果目标项目已经有旧版 Harness,用这段:
206
+
207
+ ```text
208
+ 请先安装并读取 Coding Agent Harness:
209
+
210
+ npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness
211
+
212
+ 注意:这一步会在目标仓写入 .agents/skills/coding-agent-harness/ 和 skills-lock.json。
213
+ 如果本轮只允许零写入扫描,请先跳过本步,直接使用 npx --yes coding-agent-harness ... 扫描;获准写入后再安装 Skill。
214
+
215
+ 先检查当前环境是否有 harness 命令。
216
+
217
+ 如果没有,不要静默全局安装。请先问我:
218
+ “当前环境没有 harness 命令。是否允许我运行 npm install -g coding-agent-harness?
219
+ 这会修改全局 npm 环境,之后可以直接使用 harness。
220
+ 如果不同意,我会用 npx --yes coding-agent-harness ... 临时执行,不写入项目依赖。”
221
+
222
+ 只有我明确同意后,才运行:
223
+ npm install -g coding-agent-harness
224
+
225
+ 如果我不同意或没有回复,后续 CLI 都用:
226
+ npx --yes coding-agent-harness <command>
227
+ 这是“全局 npm 安装确认”,和后面的“迁移计划确认”是两个不同确认点。
228
+
229
+ 这个项目已有旧版 Harness。除上面 Skill 安装可能产生的 .agents/skills/coding-agent-harness/ 和 skills-lock.json 外,先不要改业务文件或 Harness 文件。
230
+
231
+ 请先执行详尽扫描,并给我一个迁移计划:
232
+ 1. 检查当前 git 状态、Harness 状态、任务数量、brief 覆盖、visual_map 覆盖、warning/action/residual、strict 状态和 dashboard 可用性。
233
+ 2. 如果项目是微服务、多仓、前后端分仓,或依赖外部系统,主动询问我是否有外部资料;资料很多时先建立 external-source-packs 索引和摘要,再投影到 03/04/06。
234
+ 3. 根据项目证据主动推荐迁移模式:
235
+ - baseline-preserve:先安全接入,只补必要结构和可见性。
236
+ - status-aware-rewrite:按 SSoT、Ledger、progress、review、git 证据重写当前或重新打开的任务。
237
+ - full-semantic-rewrite:全量重写任务的 brief / execution_strategy / visual_map,让旧项目整体变成 v1.0 可读项目。
238
+ 4. 给出推荐模式、原因、预计改动范围、预计 token/时间成本、风险和是否需要 subagent。
239
+ 5. 向我提出需要确认的问题,等我确认后再开始写文件。
240
+ 这里的确认是“迁移计划确认”,不是全局 npm 安装确认。
241
+
242
+ 扫描阶段至少运行:
243
+ npx --yes coding-agent-harness status --json .
244
+ npx --yes coding-agent-harness migrate-plan --json --limit 1000 .
245
+
246
+ 确认执行迁移后,先生成并验证 baseline session,再创建 Complex Task preset:
247
+ npx --yes coding-agent-harness migrate-run --locale zh-CN --session-dir /tmp/cah-migration-project --out-dir /tmp/cah-migration-project/dashboard .
248
+ npx --yes coding-agent-harness migrate-verify /tmp/cah-migration-project/session.json
249
+ npx --yes coding-agent-harness new-task --budget complex --preset legacy-migration --from-session /tmp/cah-migration-project/session.json
250
+
251
+ 这个 preset 只创建任务骨架和证据包,不会继续迁移、改写历史、stage 或 commit。后续迁移工作必须在这个 Complex Task 里推进。
252
+
253
+ 最终迁移完成时,必须给出动态 workbench 入口或静态 dashboard HTML、session.json、normal/strict check、migrate-plan summary,以及 full-cutover 验证是否通过。需要人工确认审查时,必须通过本地网页 workbench 暴露确认操作;静态 dashboard 只作为只读证据快照。
254
+ ```
255
+
256
+ ## 了解更多
257
+
258
+ - Agent 安装指南:[`docs-release/guides/agent-installation.md`](docs-release/guides/agent-installation.md)
259
+ - 新项目安装冒烟:[`examples/minimal-project/`](examples/minimal-project/)
260
+ - 旧项目迁移指南:[`docs-release/guides/migration-playbook.md`](docs-release/guides/migration-playbook.md)
261
+ - 完整旧项目迁移策略:[`docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md`](docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md)
262
+ - 架构说明:[`docs-release/architecture/overview.md`](docs-release/architecture/overview.md)
263
+
264
+ ## Star History
265
+
266
+ [![Star History Chart](https://api.star-history.com/svg?repos=FairladyZ625/coding-agent-harness&type=Date)](https://star-history.com/#FairladyZ625/coding-agent-harness&Date)
267
+
268
+ ## License
269
+
270
+ MIT