coding-agent-harness 1.0.1 → 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 +3 -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 +926 -14
  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
@@ -0,0 +1,163 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" viewBox="0 0 1400 760" role="img" aria-labelledby="title desc">
2
+ <title id="title">Prompt, context, and harness engineering comparison</title>
3
+ <desc id="desc">A side-by-side architecture diagram comparing prompt engineering, context engineering, and harness engineering for coding agents.</desc>
4
+ <defs>
5
+ <marker id="arrowhead" markerWidth="18" markerHeight="18" refX="15" refY="9" orient="auto" markerUnits="strokeWidth">
6
+ <path d="M2 2L16 9L2 16Z" fill="#476b32"/>
7
+ </marker>
8
+ <filter id="paperShadow" x="-4%" y="-4%" width="108%" height="108%">
9
+ <feDropShadow dx="0" dy="1" stdDeviation="1.4" flood-color="#000000" flood-opacity="0.12"/>
10
+ </filter>
11
+ </defs>
12
+ <style>
13
+ .outer{fill:#fffdf9;stroke:#ddd5c7;stroke-width:2}
14
+ .dash{fill:none;stroke:#2f332e;stroke-width:2;stroke-dasharray:8 7}
15
+ .arrow-band{fill:#d7e1de;opacity:.95}
16
+ .arrow-stroke{fill:none;stroke:#476b32;stroke-width:0}
17
+ .prompt-band{fill:#fee8a7;stroke:#111;stroke-width:4}
18
+ .context-band{fill:#b7d2eb;stroke:#111;stroke-width:4}
19
+ .harness-band{fill:#c5dfb2;stroke:#111;stroke-width:4}
20
+ .prompt-col{fill:#f8f0d8}
21
+ .context-col{fill:#eaf3fb}
22
+ .harness-col{fill:#eaf3e3}
23
+ .prompt-floor{fill:#c6b47a}
24
+ .context-floor{fill:#8ba6bd}
25
+ .harness-floor{fill:#8fa887}
26
+ .card{fill:#fff;stroke:#efe9de;stroke-width:1.2;filter:url(#paperShadow)}
27
+ .card-round{fill:#fff;stroke:#e8ece9;stroke-width:1.2;filter:url(#paperShadow)}
28
+ .prompt-text{fill:#846500}.context-text{fill:#21557f}.harness-text{fill:#3f672e}
29
+ .prompt-icon{stroke:#d79a00}.context-icon{stroke:#2d65ad}.harness-icon{stroke:#5c9d42}
30
+ .ink{fill:#111}.muted{fill:#727272}.caption{fill:#777b82}
31
+ .heading{font-family:Georgia, 'Times New Roman', serif;font-size:31px;font-weight:700}
32
+ .sub{font-family:Georgia, 'Times New Roman', serif;font-size:25px}
33
+ .band{font-family:'Courier New', ui-monospace, monospace;font-size:25px;font-weight:700;letter-spacing:.5px}
34
+ .card-title{font-family:Georgia, 'Times New Roman', serif;font-size:26px;font-weight:700}
35
+ .card-sub{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:18px;font-style:italic;font-weight:500}
36
+ .small{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:16px}
37
+ .caption-text{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:24px;font-style:italic}
38
+ .icon{fill:none;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round}
39
+ </style>
40
+
41
+ <rect x="48" y="42" width="1304" height="636" rx="8" class="outer"/>
42
+ <rect x="56" y="88" width="1288" height="70" class="arrow-band"/>
43
+ <path d="M56 88H1288L1342 123L1288 158H56Z" fill="#d7e1de"/>
44
+ <rect x="56" y="88" width="1288" height="70" class="dash"/>
45
+
46
+ <rect x="82" y="97" width="360" height="52" rx="14" class="prompt-band"/>
47
+ <text x="262" y="131" text-anchor="middle" class="ink band">Prompt Engineering</text>
48
+ <rect x="490" y="97" width="388" height="52" rx="14" class="context-band"/>
49
+ <text x="684" y="131" text-anchor="middle" class="ink band">Context Engineering</text>
50
+ <rect x="926" y="97" width="390" height="52" rx="14" class="harness-band"/>
51
+ <text x="1121" y="131" text-anchor="middle" class="ink band">Harness Engineering</text>
52
+
53
+ <rect x="82" y="158" width="360" height="486" class="prompt-col"/>
54
+ <rect x="82" y="612" width="360" height="32" class="prompt-floor"/>
55
+ <rect x="490" y="158" width="388" height="486" class="context-col"/>
56
+ <rect x="490" y="612" width="388" height="32" class="context-floor"/>
57
+ <rect x="926" y="158" width="390" height="486" class="harness-col"/>
58
+ <rect x="926" y="612" width="390" height="32" class="harness-floor"/>
59
+
60
+ <text x="262" y="187" text-anchor="middle" class="prompt-text heading">Single-call</text>
61
+ <text x="262" y="223" text-anchor="middle" class="prompt-text sub">Optimize the model input</text>
62
+ <text x="684" y="187" text-anchor="middle" class="context-text heading">Multi-step context</text>
63
+ <text x="684" y="223" text-anchor="middle" class="context-text sub">Optimize what the model sees</text>
64
+ <text x="1121" y="187" text-anchor="middle" class="harness-text heading">System-level</text>
65
+ <text x="1121" y="223" text-anchor="middle" class="harness-text sub">Optimize how the agent runs</text>
66
+
67
+ <rect x="124" y="250" width="276" height="94" class="card"/>
68
+ <g transform="translate(148 274)" class="icon prompt-icon">
69
+ <rect x="0" y="0" width="39" height="48" rx="3"/>
70
+ <path d="M9 12H29M9 23H25M9 34H20"/>
71
+ <path d="M33 36L48 51M48 51L58 36M48 51V18"/>
72
+ </g>
73
+ <text x="376" y="288" text-anchor="end" class="prompt-text card-title">Instruction</text>
74
+ <text x="376" y="315" text-anchor="end" class="muted card-sub">role, task, constraints</text>
75
+
76
+ <rect x="124" y="386" width="276" height="94" class="card"/>
77
+ <g transform="translate(147 410)" class="icon prompt-icon">
78
+ <rect x="0" y="0" width="24" height="24" rx="3"/>
79
+ <rect x="33" y="0" width="24" height="24" rx="3"/>
80
+ <rect x="0" y="34" width="24" height="24" rx="3"/>
81
+ <rect x="33" y="34" width="24" height="24" rx="3"/>
82
+ <path d="M7 12H17M40 12H50M7 46H17M40 46H50"/>
83
+ </g>
84
+ <text x="376" y="424" text-anchor="end" class="prompt-text card-title">Examples</text>
85
+ <text x="376" y="451" text-anchor="end" class="muted card-sub">format and persona</text>
86
+
87
+ <rect x="124" y="522" width="276" height="94" class="card"/>
88
+ <g transform="translate(149 545)" class="icon prompt-icon">
89
+ <circle cx="29" cy="29" r="24"/>
90
+ <circle cx="29" cy="29" r="9"/>
91
+ <path d="M29 5V18M53 29H40M29 53V40M5 29H18"/>
92
+ <path d="M49 8L57 1M57 1L57 12M57 1H46"/>
93
+ </g>
94
+ <text x="376" y="560" text-anchor="end" class="prompt-text card-title">Iteration</text>
95
+ <text x="376" y="587" text-anchor="end" class="muted card-sub">refine wording</text>
96
+
97
+ <rect x="522" y="250" width="324" height="94" rx="28" class="card-round"/>
98
+ <g transform="translate(545 274)" class="icon context-icon">
99
+ <ellipse cx="25" cy="8" rx="22" ry="8"/>
100
+ <path d="M3 8V38C3 43 13 48 25 48S47 43 47 38V8"/>
101
+ <path d="M3 23C3 28 13 33 25 33S47 28 47 23"/>
102
+ <circle cx="58" cy="43" r="13"/>
103
+ <path d="M68 53L81 66"/>
104
+ </g>
105
+ <text x="820" y="288" text-anchor="end" class="context-text card-title">Retrieval</text>
106
+ <text x="820" y="315" text-anchor="end" class="muted card-sub">load files, docs, outputs</text>
107
+
108
+ <rect x="522" y="386" width="324" height="94" rx="28" class="card-round"/>
109
+ <g transform="translate(548 411)" class="icon context-icon">
110
+ <rect x="12" y="8" width="48" height="48" rx="4"/>
111
+ <path d="M22 0V8M34 0V8M46 0V8M22 56V64M34 56V64M46 56V64M4 18H12M4 32H12M4 46H12M60 18H68M60 32H68M60 46H68"/>
112
+ </g>
113
+ <text x="820" y="424" text-anchor="end" class="context-text card-title">Memory</text>
114
+ <text x="820" y="451" text-anchor="end" class="muted card-sub">progress and decisions</text>
115
+
116
+ <rect x="522" y="522" width="324" height="94" rx="28" class="card-round"/>
117
+ <g transform="translate(547 546)" class="icon context-icon">
118
+ <path d="M0 8H64L44 31V56L22 66V31Z"/>
119
+ <path d="M13 8V0M32 8V0M51 8V0"/>
120
+ <path d="M16 21H48"/>
121
+ </g>
122
+ <text x="820" y="560" text-anchor="end" class="context-text card-title">Filtering</text>
123
+ <text x="820" y="587" text-anchor="end" class="muted card-sub">remove stale context</text>
124
+
125
+ <rect x="958" y="244" width="326" height="76" rx="34" class="card-round"/>
126
+ <g transform="translate(982 266) scale(.78)" class="icon harness-icon">
127
+ <path d="M12 12L24 24M24 24L12 36M24 24H58"/>
128
+ <rect x="58" y="8" width="42" height="32" rx="5"/>
129
+ <path d="M69 24H90"/>
130
+ </g>
131
+ <text x="1258" y="276" text-anchor="end" class="harness-text card-title">CLI &amp; tools</text>
132
+ <text x="1258" y="301" text-anchor="end" class="muted card-sub">init, status, check</text>
133
+
134
+ <rect x="958" y="340" width="326" height="76" rx="34" class="card-round"/>
135
+ <g transform="translate(984 364) scale(.78)" class="icon harness-icon">
136
+ <rect x="0" y="0" width="68" height="44" rx="4"/>
137
+ <path d="M10 32L26 20L38 27L58 11"/>
138
+ <circle cx="26" cy="20" r="3"/><circle cx="38" cy="27" r="3"/><circle cx="58" cy="11" r="3"/>
139
+ </g>
140
+ <text x="1258" y="372" text-anchor="end" class="harness-text card-title">Dashboard</text>
141
+ <text x="1258" y="397" text-anchor="end" class="muted card-sub">inspect status and risks</text>
142
+
143
+ <rect x="958" y="436" width="326" height="76" rx="34" class="card-round"/>
144
+ <g transform="translate(985 459) scale(.78)" class="icon harness-icon">
145
+ <path d="M35 4L65 16V36C65 55 52 68 35 73C18 68 5 55 5 36V16Z"/>
146
+ <path d="M22 39L32 49L52 27"/>
147
+ </g>
148
+ <text x="1258" y="468" text-anchor="end" class="harness-text card-title">Guardrails</text>
149
+ <text x="1258" y="493" text-anchor="end" class="muted card-sub">boundaries and approvals</text>
150
+
151
+ <rect x="958" y="532" width="326" height="76" rx="34" class="card-round"/>
152
+ <g transform="translate(985 555) scale(.78)" class="icon harness-icon">
153
+ <path d="M8 34C8 19 20 8 36 8S64 19 64 34S52 60 36 60"/>
154
+ <path d="M36 60H16M16 60L25 50M16 60L25 70"/>
155
+ <path d="M28 31L36 39L50 24"/>
156
+ </g>
157
+ <text x="1258" y="564" text-anchor="end" class="harness-text card-title">Review loop</text>
158
+ <text x="1258" y="589" text-anchor="end" class="muted card-sub">regression, closeout, lessons</text>
159
+
160
+ <path d="M442 123H490" stroke="#2f332e" stroke-width="2" fill="none"/>
161
+ <path d="M878 123H926" stroke="#2f332e" stroke-width="2" fill="none"/>
162
+ <text x="700" y="725" text-anchor="middle" class="caption caption-text">From optimizing one prompt, to managing context, to engineering the agent's operating system.</text>
163
+ </svg>
@@ -0,0 +1,64 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" viewBox="0 0 1400 420" role="img" aria-labelledby="title desc">
2
+ <title id="title">Harness adoption workflow</title>
3
+ <desc id="desc">A six-step workflow diagram for adopting Coding Agent Harness: diagnose, decide, scaffold, configure, verify, and deliver.</desc>
4
+ <defs>
5
+ <marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
6
+ <path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </marker>
8
+ <filter id="shadow" x="-4%" y="-4%" width="108%" height="108%">
9
+ <feDropShadow dx="0" dy="1" stdDeviation="1.2" flood-color="#000000" flood-opacity="0.12"/>
10
+ </filter>
11
+ </defs>
12
+ <style>
13
+ .outer{fill:#fffdf9;stroke:#ddd5c7;stroke-width:2}
14
+ .dash{fill:none;stroke:#2f332e;stroke-width:2;stroke-dasharray:8 7}
15
+ .track{fill:#eef2ed}
16
+ .card{fill:#fff;stroke:#eee6d9;stroke-width:1.2;filter:url(#shadow)}
17
+ .teal{fill:#e5f3ed;stroke:#1d9e75}.blue{fill:#e6f1fb;stroke:#378add}.amber{fill:#faeeda;stroke:#ba7517}.green{fill:#eaf3de;stroke:#639922}
18
+ .ink{fill:#111}.muted{fill:#686868}.teal-text{fill:#0f6e56}.blue-text{fill:#185fa5}.amber-text{fill:#854f0b}.green-text{fill:#3b6d11}
19
+ .title{font-family:Georgia,'Times New Roman',serif;font-size:32px;font-weight:700}
20
+ .sub{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:18px;font-style:italic;font-weight:500}
21
+ .mono{font-family:'Courier New',ui-monospace,monospace;font-size:22px;font-weight:700}
22
+ .small{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:16px}
23
+ .connector{stroke:#777;stroke-width:2;fill:none}
24
+ </style>
25
+
26
+ <rect x="58" y="44" width="1284" height="316" rx="8" class="outer"/>
27
+ <text x="86" y="86" class="ink mono">Harness adoption workflow</text>
28
+ <text x="86" y="116" class="muted small">Use the same path for a clean install or a legacy project migration.</text>
29
+ <rect x="86" y="144" width="1228" height="72" rx="0" class="track"/>
30
+ <rect x="86" y="144" width="1228" height="72" class="dash"/>
31
+
32
+ <rect x="110" y="132" width="170" height="96" rx="12" class="card teal"/>
33
+ <text x="195" y="166" text-anchor="middle" class="teal-text title">Diagnose</text>
34
+ <text x="195" y="194" text-anchor="middle" class="muted sub">read repo facts</text>
35
+
36
+ <rect x="320" y="132" width="170" height="96" rx="12" class="card blue"/>
37
+ <text x="405" y="166" text-anchor="middle" class="blue-text title">Decide</text>
38
+ <text x="405" y="194" text-anchor="middle" class="muted sub">choose mode</text>
39
+
40
+ <rect x="530" y="132" width="170" height="96" rx="12" class="card amber"/>
41
+ <text x="615" y="166" text-anchor="middle" class="amber-text title">Scaffold</text>
42
+ <text x="615" y="194" text-anchor="middle" class="muted sub">write docs</text>
43
+
44
+ <rect x="740" y="132" width="170" height="96" rx="12" class="card blue"/>
45
+ <text x="825" y="166" text-anchor="middle" class="blue-text title">Configure</text>
46
+ <text x="825" y="194" text-anchor="middle" class="muted sub">capabilities</text>
47
+
48
+ <rect x="950" y="132" width="170" height="96" rx="12" class="card amber"/>
49
+ <text x="1035" y="166" text-anchor="middle" class="amber-text title">Verify</text>
50
+ <text x="1035" y="194" text-anchor="middle" class="muted sub">checks pass</text>
51
+
52
+ <rect x="1160" y="132" width="130" height="96" rx="12" class="card green"/>
53
+ <text x="1225" y="166" text-anchor="middle" class="green-text title">Deliver</text>
54
+ <text x="1225" y="194" text-anchor="middle" class="muted sub">PR / handoff</text>
55
+
56
+ <path d="M280 180H320" class="connector" marker-end="url(#arrow)"/>
57
+ <path d="M490 180H530" class="connector" marker-end="url(#arrow)"/>
58
+ <path d="M700 180H740" class="connector" marker-end="url(#arrow)"/>
59
+ <path d="M910 180H950" class="connector" marker-end="url(#arrow)"/>
60
+ <path d="M1120 180H1160" class="connector" marker-end="url(#arrow)"/>
61
+
62
+ <rect x="204" y="272" width="992" height="44" rx="22" fill="#fff" stroke="#ddd5c7" stroke-width="1.2" filter="url(#shadow)"/>
63
+ <text x="700" y="300" text-anchor="middle" class="muted sub">Dashboard, session.json, review records, and regression evidence make the handoff inspectable.</text>
64
+ </svg>
@@ -0,0 +1,214 @@
1
+ # Agent Installation Guide
2
+
3
+ Chinese source: `docs-release/guides/agent-installation.md`
4
+
5
+ This guide is written for coding agents that install or upgrade Harness inside a target project. The README keeps only the human-facing positioning, quick start, and minimum commands. Operational details live here and in `SKILL.md`.
6
+
7
+ ## Operating Contract
8
+
9
+ The main operator for this CLI is usually an agent inside the target project, not the end user. The agent should not ask the user to study command flags, template folders, or capability choices. Those decisions must happen during Diagnose / Decide and be explained in the delivery summary.
10
+
11
+ Commands in this guide are written with an installed `harness` command. The agent must first check `command -v harness`. If the target environment does not have `harness`, do not silently install globally. Ask the user whether `npm install -g coding-agent-harness` is allowed. Run that global install only after explicit approval. If the user does not approve or does not respond, run the same CLI with `npx --yes coding-agent-harness <command>`. Maintainers debugging from the source checkout can replace the same command with `node scripts/harness.mjs`.
12
+
13
+ `harness init` does not add this npm package to the target project's dependencies. It only writes Harness docs, templates, and the registry. Delivery summaries must not imply that the target project now has an npm dependency installed. The first `npx` run downloads the package into npm cache; it is not a project dependency or a global command install. When CLI access is needed, keep using `npx --yes coding-agent-harness ...`, a user-approved global `harness`, or `node scripts/harness.mjs` from the source checkout.
14
+
15
+ `npx skills add FairladyZ625/coding-agent-harness --skill coding-agent-harness`
16
+ is not a zero-write operation. It copies the Skill into `.agents/skills/coding-agent-harness/`
17
+ inside the target project and writes `skills-lock.json`. If the user asks for a strict
18
+ read-only scan, skip Skill installation first and use `npx --yes coding-agent-harness status`
19
+ / `migrate-plan` for the scan; install the Skill or run write commands only after the user
20
+ confirms write access.
21
+
22
+ Use the v1.0 six-phase flow:
23
+
24
+ 1. Diagnose: scan project structure, language, existing docs, CI, collaboration model, external dependencies, and risk surfaces.
25
+ 2. Decide: choose locale, delivery model, capability packs, and whether external source intake is needed.
26
+ 3. Scaffold: run `harness init` or `harness add-capability`.
27
+ 4. Configure: adapt generated docs to project facts. Do not present templates as customized standards.
28
+ 5. Verify: run CLI checks and native project evidence.
29
+ 6. Deliver: report residuals, owners, and next actions.
30
+
31
+ If Diagnose finds a microservice, multi-repo, split frontend/backend, or platform subsystem, or the code references external services, SDKs, API gateways, message queues, webhooks, contracts, schemas, or mocks, the agent must ask the user whether external source material exists. Small source sets can be linked from `Source Evidence`; large source sets use `docs/11-REFERENCE/external-source-intake-standard.md` and `docs/04-DEVELOPMENT/external-source-packs/<source-key>/`, then project stable conclusions into `03/04/06`.
32
+
33
+ ## Locale Rules
34
+
35
+ - When the user is present, ask whether Harness docs should use Chinese or English.
36
+ - Non-interactive installation must pass `--locale zh-CN` or `--locale en-US`; do not rely on the default.
37
+ - Use `zh-CN` for Chinese users or Chinese-first projects.
38
+ - Use `en-US` for English teams, English-first repositories, or explicit English requests.
39
+ - Do not mix `templates/` and `templates-zh-CN/` in one target project. Schema fields, filenames, status enums, commands, and cross-tool protocol tokens may remain English.
40
+
41
+ ## New Project Initialization
42
+
43
+ Use this path when the target project has no legacy Harness:
44
+
45
+ ```bash
46
+ harness init \
47
+ --locale zh-CN \
48
+ --capabilities core,dashboard \
49
+ /path/to/project
50
+ ```
51
+
52
+ If the target environment does not have `harness`, ask the user whether global installation is allowed. If approved, run `npm install -g coding-agent-harness`. Without approval, use:
53
+
54
+ ```bash
55
+ npx --yes coding-agent-harness init \
56
+ --locale zh-CN \
57
+ --capabilities core,dashboard \
58
+ /path/to/project
59
+ ```
60
+
61
+ Choose capabilities conservatively:
62
+
63
+ | Capability | Default | When to choose |
64
+ | --- | --- | --- |
65
+ | `core` | Yes | Always install. This is the document kernel. |
66
+ | `dashboard` | No | A user or agent needs a local status page, static evidence snapshot, or localhost dynamic workbench. |
67
+ | `safe-adoption` | No | A legacy Harness project adopts v1.0 while preserving history. |
68
+ | `adversarial-review` | No | Release, architecture, security, data, or policy risk needs independent review artifacts. |
69
+ | `long-running-task` | No | An agent needs to execute across many turns without asking the user at every step. |
70
+ | `module-parallel` | No | Two or more independent modules need owners, a registry, and synchronization rules. |
71
+ | `subagent-worker` | No | Code-editing subagents need independent worktrees and commit-backed handoff; requires `module-parallel`. |
72
+
73
+ The JSON output from `init` includes a `report`. The delivery summary must include:
74
+
75
+ - locale
76
+ - selected capabilities and the reason for every optional capability
77
+ - created / skipped files
78
+ - the recommended daily entry from `nextCommands`, such as `harness dev` or `npx --yes coding-agent-harness dev .`
79
+ - project-specific edits made during Configure
80
+ - verification commands and results
81
+ - residual owner / action / status
82
+ - whether anything was committed, and whether dogfood artifacts were cleaned
83
+
84
+ `init` does not modify `package.json` by default. Use `--add-npm-scripts` only when the user explicitly wants npm scripts in the target project. That option requires an existing `package.json` and does not overwrite existing `harness:dev` or `harness:dashboard` scripts.
85
+
86
+ ## External Source Intake
87
+
88
+ When a project depends on external microservices, repositories, or external-team documents, agents should not drop those materials directly into `03-ARCHITECTURE`, `04-DEVELOPMENT`, or `06-INTEGRATIONS`. Use this order:
89
+
90
+ ```text
91
+ Inventory -> Classify -> Sanitize -> Digest -> Project -> Verify -> Residual
92
+ ```
93
+
94
+ Rules:
95
+
96
+ - Ask the user for external architecture docs, API docs, diagrams, meeting notes, links, source paths, or exported packets.
97
+ - Confirm whether the material may be copied into the repository; non-committable material is represented by path, URL, owner, access condition, and digest only.
98
+ - If there are more than 5 external documents, multiple topics, or continuing growth, create `docs/04-DEVELOPMENT/external-source-packs/<source-key>/`.
99
+ - `external-source-packs/` stores source indexes, digests, and projection status only.
100
+ - Stable facts must be written back to `03-ARCHITECTURE/services/<service-key>.md`, `04-DEVELOPMENT/external-context/<service-key>.md`, or `06-INTEGRATIONS/<contract>.md`.
101
+ - Unconfirmed or conflicting material stays in the source pack or `Do Not Assume`.
102
+
103
+ ## User-Level Registration
104
+
105
+ If the user already has the `harness` CLI from npm or source, register this skill into user-level agent directories so each project does not need a copied skill:
106
+
107
+ ```bash
108
+ harness install-user --agent codex --global
109
+ harness doctor-user --agent codex
110
+ ```
111
+
112
+ Supported agent targets:
113
+
114
+ | Agent | User directory |
115
+ | --- | --- |
116
+ | `codex` | `~/.codex/skills/coding-agent-harness` |
117
+ | `claude` | `~/.claude/skills/coding-agent-harness` |
118
+ | `gemini` | `~/.gemini/skills/coding-agent-harness` |
119
+ | `openclaw` | `~/.openclaw/skills/coding-agent-harness` |
120
+ | `agents` | `~/.agents/skills/coding-agent-harness` |
121
+ | `all` | install into every directory above |
122
+
123
+ Safety rules:
124
+
125
+ - Interactive confirmation is the default. Non-interactive runs must pass `--yes` or first use `--dry-run`.
126
+ - Existing files are not overwritten by default; only missing files are added.
127
+ - Use `--force` only for explicit forced updates.
128
+ - `doctor-user` checks that `SKILL.md`, templates, references, CLI scripts, and this guide exist.
129
+
130
+ ## Legacy Harness Migration
131
+
132
+ Use this path when the target project already has an older Harness. Do not rebuild the old docs tree and do not hand-assemble the process with `add-capability`. Start with the verifiable migration rail:
133
+
134
+ ```bash
135
+ harness migrate-run \
136
+ --locale zh-CN \
137
+ --session-dir /tmp/cah-migration-project \
138
+ --out-dir /tmp/cah-migration-project/dashboard \
139
+ /path/to/old-project
140
+
141
+ harness migrate-verify \
142
+ /tmp/cah-migration-project/session.json
143
+
144
+ harness new-task \
145
+ --budget complex \
146
+ --preset legacy-migration \
147
+ --from-session /tmp/cah-migration-project/session.json
148
+ ```
149
+
150
+ Rules:
151
+
152
+ - Do not overwrite existing `AGENTS.md`, `CLAUDE.md`, `docs/Harness-Ledger.md`, SSoTs, walkthroughs, task progress, or historical task plans.
153
+ - When the old project mixes Chinese and English, explicitly pass `--locale zh-CN` or `--locale en-US`.
154
+ - Only add the missing v1.0 templates and capability registry.
155
+ - Existing project facts may be merged, appended, or recorded as residuals. They must not be replaced with generic templates.
156
+ - Historical contract gaps become `adoption-needed` warnings in normal mode.
157
+ - `--strict` must still fail on legacy checker failures or unresolved historical contract gaps.
158
+ - `migrate-verify` must pass before the migration output is reported as usable, and the dashboard path must be HTML.
159
+ - `new-task --preset legacy-migration --from-session` creates only the Complex Task scaffold and evidence bundle. It does not continue migration, rewrite history, stage files, or commit.
160
+ - For detailed migration strategy, read `docs-release/guides/migration-playbook.md` or `docs-release/guides/migration-playbook.en-US.md`. If the user requires proof that the old project is fully migrated, also read `docs-release/guides/full-legacy-migration-subagent-strategy.md` or `docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md`.
161
+
162
+ The agent must read `session.json` and `migrate-plan.json`, then migrate active tasks, current reviews, and truly adopted capabilities step by step. Subagent review must prove dashboard brief coverage, strict check, and final session all pass.
163
+
164
+ ## Task Lifecycle
165
+
166
+ After initialization or migration, agents should not manually copy task folders. Use lifecycle commands:
167
+
168
+ ```bash
169
+ harness new-task phase-2-lifecycle \
170
+ --title "Phase 2 task lifecycle" \
171
+ --locale en-US \
172
+ /path/to/project
173
+
174
+ harness task-start phase-2-lifecycle \
175
+ --message "Start lifecycle slice implementation" \
176
+ /path/to/project
177
+
178
+ harness task-log phase-2-lifecycle \
179
+ --message "Completed CLI and template updates" \
180
+ --evidence "command:TARGET:npm-test:passed" \
181
+ /path/to/project
182
+
183
+ harness review-confirm TASKS/phase-2-lifecycle \
184
+ --reviewer "Human Reviewer" \
185
+ --confirm phase-2-lifecycle \
186
+ /path/to/project
187
+
188
+ harness task-complete phase-2-lifecycle \
189
+ --message "Verification loop completed" \
190
+ /path/to/project
191
+ ```
192
+
193
+ Rules:
194
+
195
+ - `new-task` creates `brief.md`, `task_plan.md`, `execution_strategy.md`, `visual_map.md`, `findings.md`, `progress.md`, and `review.md`.
196
+ - Existing task directories are not overwritten. Renaming or continuing old tasks is a coordinator decision.
197
+ - `task-start`, `task-block`, and `task-complete` only update lifecycle status and logs in `progress.md`.
198
+ - `task-log` only appends execution records. Evidence uses `type:PATH:summary`, for example `command:TARGET:npm-test:passed`.
199
+ - `review-confirm` appends a human review confirmation to `review.md` and a log entry to `progress.md`. It must reject open P0/P1/P2 findings marked `Open: yes` or `Blocks Release: yes`.
200
+ - `status --json` keeps old `task.state` for compatibility and adds `lifecycleState`, `reviewStatus`, `closeoutStatus`, and `stateConflicts`. `done` means implementation finished; it does not mean `closed`.
201
+ - For human operation, start the local HTML workbench with `harness dev /path/to/project`. It binds to `127.0.0.1`, chooses a port automatically, opens the browser, and refreshes when docs change. In headless or CI contexts, use `harness dev --no-open /path/to/project`.
202
+ - The lower-level compatible entry point remains `harness dashboard --workbench --out-dir /tmp/harness-workbench /path/to/project`. Static dashboard files remain read-only and must not host human confirmation actions.
203
+ - `task-list --json` and `status --json` are the read entry points for dashboards, reviewers, and later agents.
204
+
205
+ ## Verification Commands
206
+
207
+ Before closing installation or upgrade, run at least:
208
+
209
+ ```bash
210
+ harness check --profile target-project /path/to/project
211
+ harness status --json /path/to/project
212
+ harness dev --no-open --out-dir /tmp/harness-workbench /path/to/project
213
+ harness dashboard --out /tmp/harness-dashboard.html /path/to/project
214
+ ```