coding-agent-harness 1.0.1 → 1.0.4

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 (262) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/CONTRIBUTING.md +98 -0
  3. package/README.en-US.md +14 -0
  4. package/README.md +230 -80
  5. package/README.zh-CN.md +290 -0
  6. package/SKILL.md +132 -198
  7. package/docs-release/README.md +80 -9
  8. package/docs-release/architecture/overview.md +298 -28
  9. package/docs-release/architecture/overview.zh-CN.md +292 -0
  10. package/docs-release/assets/dashboard-overview.png +0 -0
  11. package/docs-release/assets/harness-architecture.svg +163 -0
  12. package/docs-release/assets/harness-workflow.svg +64 -0
  13. package/docs-release/guides/agent-installation.en-US.md +237 -0
  14. package/docs-release/guides/agent-installation.md +149 -27
  15. package/docs-release/guides/contributing.md +100 -0
  16. package/docs-release/guides/contributing.zh-CN.md +99 -0
  17. package/docs-release/guides/document-audience-and-surfaces.en-US.md +113 -0
  18. package/docs-release/guides/document-audience-and-surfaces.md +113 -0
  19. package/docs-release/guides/full-legacy-migration-subagent-strategy.md +334 -0
  20. package/docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md +334 -0
  21. package/docs-release/guides/legacy-migration-agent-prompt.md +373 -0
  22. package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +350 -0
  23. package/docs-release/guides/migration-playbook.en-US.md +324 -0
  24. package/docs-release/guides/migration-playbook.md +328 -0
  25. package/docs-release/guides/parent-control-repository-pattern.en-US.md +254 -0
  26. package/docs-release/guides/parent-control-repository-pattern.md +254 -0
  27. package/docs-release/guides/preset-development.md +214 -0
  28. package/docs-release/guides/repository-operating-models.en-US.md +197 -0
  29. package/docs-release/guides/repository-operating-models.md +197 -0
  30. package/docs-release/guides/task-state-machine.en-US.md +207 -0
  31. package/docs-release/guides/task-state-machine.md +214 -0
  32. package/docs-release/intl/README.md +15 -0
  33. package/docs-release/intl/de-DE.md +18 -0
  34. package/docs-release/intl/en-US.md +18 -0
  35. package/docs-release/intl/es-ES.md +18 -0
  36. package/docs-release/intl/fr-FR.md +18 -0
  37. package/docs-release/intl/ja-JP.md +18 -0
  38. package/docs-release/intl/ko-KR.md +18 -0
  39. package/docs-release/intl/zh-CN.md +18 -0
  40. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/brief.md +13 -0
  41. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/findings.md +7 -0
  42. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/lesson_candidates.md +24 -0
  43. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/progress.md +1 -1
  44. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/task_plan.md +4 -2
  45. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/{visual_roadmap.md → visual_map.md} +9 -1
  46. package/package.json +10 -3
  47. package/presets/legacy-migration/checks/preset-check.mjs +3 -0
  48. package/presets/legacy-migration/preset.yaml +134 -0
  49. package/presets/legacy-migration/scripts/plan-work-queue.mjs +4 -0
  50. package/presets/legacy-migration/scripts/scaffold-task-contracts.mjs +4 -0
  51. package/presets/legacy-migration/templates/execution_strategy.append.md +18 -0
  52. package/presets/legacy-migration/templates/findings.seed.md +17 -0
  53. package/presets/legacy-migration/templates/review.seed.md +12 -0
  54. package/presets/legacy-migration/templates/task_plan.append.md +9 -0
  55. package/presets/legacy-migration/templates/visual_map.append.md +12 -0
  56. package/presets/legacy-migration/workbench/dashboard-panels.yaml +2 -0
  57. package/presets/legacy-migration/workbench/migration-queue.schema.json +23 -0
  58. package/presets/lesson-sedimentation/preset.yaml +23 -0
  59. package/presets/lesson-sedimentation/templates/prompt.md +23 -0
  60. package/presets/module/preset.yaml +25 -0
  61. package/presets/module/templates/execution_strategy.append.md +8 -0
  62. package/presets/module/templates/task_plan.append.md +17 -0
  63. package/presets/standard-task/preset.yaml +31 -0
  64. package/presets/standard-task/templates/task_plan.append.md +7 -0
  65. package/references/adversarial-review-standard.md +2 -2
  66. package/references/agents-md-pattern.md +5 -5
  67. package/references/delivery-operating-model-standard.md +3 -3
  68. package/references/docs-directory-standard.md +53 -10
  69. package/references/external-source-intake-standard.md +75 -0
  70. package/references/harness-ledger.md +53 -94
  71. package/references/legacy-12-phase-bootstrap.md +41 -0
  72. package/references/lessons-governance.md +100 -88
  73. package/references/module-parallel-standard.md +14 -14
  74. package/references/planning-loop.md +51 -7
  75. package/references/project-onboarding-audit.md +10 -0
  76. package/references/pull-request-standard.md +118 -0
  77. package/references/repo-governance-standard.md +12 -1
  78. package/references/review-routing-standard.md +7 -1
  79. package/references/ssot-governance.md +67 -59
  80. package/references/taskr-gap-analysis.md +600 -0
  81. package/references/testing-standard.md +50 -0
  82. package/references/walkthrough-closeout.md +10 -9
  83. package/scripts/check-harness.mjs +111 -331
  84. package/scripts/commands/dashboard-command.mjs +67 -0
  85. package/scripts/commands/migration-command.mjs +96 -0
  86. package/scripts/commands/preset-command.mjs +73 -0
  87. package/scripts/commands/task-command.mjs +327 -0
  88. package/scripts/harness.mjs +106 -20
  89. package/scripts/lib/capability-registry.mjs +591 -0
  90. package/scripts/lib/check-module-parallel.mjs +237 -0
  91. package/scripts/lib/check-profiles.mjs +418 -0
  92. package/scripts/lib/check-task-contracts.mjs +47 -0
  93. package/scripts/lib/core-shared.mjs +196 -0
  94. package/scripts/lib/dashboard-data.mjs +412 -0
  95. package/scripts/lib/dashboard-workbench.mjs +257 -0
  96. package/scripts/lib/dashboard-writer.mjs +107 -4
  97. package/scripts/lib/git-status-summary.mjs +46 -0
  98. package/scripts/lib/governance-index-generator.mjs +174 -0
  99. package/scripts/lib/governance-sync.mjs +514 -0
  100. package/scripts/lib/governance-table-boundary.mjs +175 -0
  101. package/scripts/lib/harness-core.mjs +15 -1318
  102. package/scripts/lib/lesson-maintenance.mjs +152 -0
  103. package/scripts/lib/markdown-utils.mjs +158 -0
  104. package/scripts/lib/migration-planner.mjs +478 -0
  105. package/scripts/lib/migration-support.mjs +312 -0
  106. package/scripts/lib/preset-audit-contracts.mjs +37 -0
  107. package/scripts/lib/preset-engine.mjs +497 -0
  108. package/scripts/lib/preset-registry.mjs +627 -0
  109. package/scripts/lib/preset-resource-contracts.mjs +83 -0
  110. package/scripts/lib/review-confirm-git-gate.mjs +248 -0
  111. package/scripts/lib/status-dashboard-renderer.mjs +102 -0
  112. package/scripts/lib/subagent-authorization-audit.mjs +196 -0
  113. package/scripts/lib/task-completion-consistency.mjs +16 -0
  114. package/scripts/lib/task-index.mjs +93 -0
  115. package/scripts/lib/task-lesson-candidates.mjs +242 -0
  116. package/scripts/lib/task-lesson-sedimentation.mjs +326 -0
  117. package/scripts/lib/task-lifecycle/review-confirm.mjs +101 -0
  118. package/scripts/lib/task-lifecycle/review-gates.mjs +70 -0
  119. package/scripts/lib/task-lifecycle/text-utils.mjs +24 -0
  120. package/scripts/lib/task-lifecycle.mjs +649 -0
  121. package/scripts/lib/task-review-model.mjs +469 -0
  122. package/scripts/lib/task-scanner.mjs +576 -0
  123. package/scripts/lib/task-tombstone-commands.mjs +140 -0
  124. package/scripts/postinstall.mjs +14 -0
  125. package/skills/preset-creator/SKILL.md +179 -0
  126. package/skills/preset-creator/references/complex-task-skeleton/README.md +31 -0
  127. package/skills/preset-creator/references/complex-task-skeleton/artifacts/INDEX.md +12 -0
  128. package/skills/preset-creator/references/complex-task-skeleton/brief.md +32 -0
  129. package/skills/preset-creator/references/complex-task-skeleton/execution_strategy.md +71 -0
  130. package/skills/preset-creator/references/complex-task-skeleton/findings.md +24 -0
  131. package/skills/preset-creator/references/complex-task-skeleton/lesson_candidates.md +70 -0
  132. package/skills/preset-creator/references/complex-task-skeleton/long-running-task-contract.md +76 -0
  133. package/skills/preset-creator/references/complex-task-skeleton/progress.md +33 -0
  134. package/skills/preset-creator/references/complex-task-skeleton/references/INDEX.md +13 -0
  135. package/skills/preset-creator/references/complex-task-skeleton/review.md +107 -0
  136. package/skills/preset-creator/references/complex-task-skeleton/task_plan.md +111 -0
  137. package/{templates/planning/visual_roadmap.md → skills/preset-creator/references/complex-task-skeleton/visual_map.md} +24 -2
  138. package/skills/preset-creator/references/preset-package-skeleton.md +296 -0
  139. package/templates/AGENTS.md.template +51 -36
  140. package/templates/architecture/Architecture-SSoT.md +21 -0
  141. package/templates/architecture/README.md +49 -0
  142. package/templates/architecture/critical-flows.md +22 -0
  143. package/templates/architecture/local-repo-context.md +20 -0
  144. package/templates/architecture/service-catalog.md +17 -0
  145. package/templates/architecture/services/service-template.md +31 -0
  146. package/templates/architecture/system-map.md +22 -0
  147. package/templates/dashboard/assets/app-src/00-state.js +42 -0
  148. package/templates/dashboard/assets/app-src/10-router.js +77 -0
  149. package/templates/dashboard/assets/app-src/20-overview.js +241 -0
  150. package/templates/dashboard/assets/app-src/30-tasks.js +409 -0
  151. package/templates/dashboard/assets/app-src/35-task-detail.js +246 -0
  152. package/templates/dashboard/assets/app-src/40-modules.js +58 -0
  153. package/templates/dashboard/assets/app-src/45-review.js +347 -0
  154. package/templates/dashboard/assets/app-src/50-migration.js +183 -0
  155. package/templates/dashboard/assets/app-src/60-shared.js +61 -0
  156. package/templates/dashboard/assets/app-src/90-bindings.js +524 -0
  157. package/templates/dashboard/assets/app.css +3107 -300
  158. package/templates/dashboard/assets/app.css.manifest.json +9 -0
  159. package/templates/dashboard/assets/app.js +2068 -306
  160. package/templates/dashboard/assets/app.manifest.json +12 -0
  161. package/templates/dashboard/assets/css-src/00-foundation.css +342 -0
  162. package/templates/dashboard/assets/css-src/10-panels-flow.css +236 -0
  163. package/templates/dashboard/assets/css-src/20-briefs-controls.css +398 -0
  164. package/templates/dashboard/assets/css-src/30-task-index.css +739 -0
  165. package/templates/dashboard/assets/css-src/35-review-workspace.css +507 -0
  166. package/templates/dashboard/assets/css-src/40-detail-modules-migration.css +427 -0
  167. package/templates/dashboard/assets/css-src/50-responsive-overrides.css +551 -0
  168. package/templates/dashboard/assets/i18n.js +531 -44
  169. package/templates/dashboard/assets/mermaid-renderer.js +58 -8
  170. package/templates/development/README.md +52 -0
  171. package/templates/development/codebase-map.md +11 -0
  172. package/templates/development/cross-repo-debugging.md +18 -0
  173. package/templates/development/external-context/service-template.md +33 -0
  174. package/templates/development/external-source-packs/README.md +24 -0
  175. package/templates/development/external-source-packs/digest-template.md +28 -0
  176. package/templates/development/local-setup.md +16 -0
  177. package/templates/development/stubs-and-mocks.md +11 -0
  178. package/templates/integrations/README.md +40 -0
  179. package/templates/integrations/api-contract.md +42 -0
  180. package/templates/integrations/event-contract.md +46 -0
  181. package/templates/integrations/third-party/vendor-template.md +42 -0
  182. package/templates/integrations/webhook-contract.md +41 -0
  183. package/templates/ledger/Harness-Ledger.md +13 -25
  184. package/templates/lessons/lesson-arch-process-change.md +1 -1
  185. package/templates/lessons/lesson-new-doc.md +1 -1
  186. package/templates/lessons/lesson-ref-change.md +1 -1
  187. package/templates/planning/brief.md +32 -0
  188. package/templates/planning/execution_strategy.md +31 -0
  189. package/templates/planning/lesson_candidates.md +70 -0
  190. package/templates/planning/long-running-task-contract.md +7 -0
  191. package/templates/planning/module_brief.md +25 -0
  192. package/templates/planning/module_session_prompt.md +6 -0
  193. package/templates/planning/optional/artifacts/INDEX.md +3 -3
  194. package/templates/planning/optional/references/INDEX.md +3 -3
  195. package/templates/planning/review.md +59 -0
  196. package/templates/planning/task_plan.md +40 -15
  197. package/templates/planning/visual_map.md +50 -0
  198. package/templates/reference/docs-library-standard.md +31 -0
  199. package/templates/reference/execution-workflow-standard.md +5 -2
  200. package/templates/reference/external-source-intake-standard.md +82 -0
  201. package/templates/reference/harness-ledger-standard.md +1 -0
  202. package/templates/reference/pull-request-standard.md +80 -0
  203. package/templates/reference/repo-governance-standard.md +8 -5
  204. package/templates/reference/review-routing-standard.md +6 -0
  205. package/templates/reference/walkthrough-standard.md +3 -1
  206. package/templates/verifier/verifier-output.md +1 -1
  207. package/templates/walkthrough/walkthrough-template.md +2 -2
  208. package/templates-zh-CN/AGENTS.md.template +73 -70
  209. package/templates-zh-CN/architecture/Architecture-SSoT.md +21 -0
  210. package/templates-zh-CN/architecture/README.md +51 -0
  211. package/templates-zh-CN/architecture/critical-flows.md +24 -0
  212. package/templates-zh-CN/architecture/local-repo-context.md +20 -0
  213. package/templates-zh-CN/architecture/service-catalog.md +17 -0
  214. package/templates-zh-CN/architecture/services/service-template.md +31 -0
  215. package/templates-zh-CN/architecture/system-map.md +22 -0
  216. package/templates-zh-CN/development/README.md +54 -0
  217. package/templates-zh-CN/development/codebase-map.md +11 -0
  218. package/templates-zh-CN/development/cross-repo-debugging.md +18 -0
  219. package/templates-zh-CN/development/external-context/service-template.md +33 -0
  220. package/templates-zh-CN/development/external-source-packs/README.md +24 -0
  221. package/templates-zh-CN/development/external-source-packs/digest-template.md +28 -0
  222. package/templates-zh-CN/development/local-setup.md +16 -0
  223. package/templates-zh-CN/development/stubs-and-mocks.md +11 -0
  224. package/templates-zh-CN/integrations/README.md +42 -0
  225. package/templates-zh-CN/integrations/api-contract.md +42 -0
  226. package/templates-zh-CN/integrations/event-contract.md +46 -0
  227. package/templates-zh-CN/integrations/third-party/vendor-template.md +42 -0
  228. package/templates-zh-CN/integrations/webhook-contract.md +41 -0
  229. package/templates-zh-CN/ledger/Harness-Ledger.md +17 -40
  230. package/templates-zh-CN/planning/brief.md +32 -0
  231. package/templates-zh-CN/planning/execution_strategy.md +30 -0
  232. package/templates-zh-CN/planning/lesson_candidates.md +70 -0
  233. package/templates-zh-CN/planning/long-running-task-contract.md +1 -1
  234. package/templates-zh-CN/planning/module_brief.md +25 -0
  235. package/templates-zh-CN/planning/module_plan.md +2 -2
  236. package/templates-zh-CN/planning/module_session_prompt.md +4 -3
  237. package/templates-zh-CN/planning/review.md +59 -1
  238. package/templates-zh-CN/planning/task_plan.md +37 -11
  239. package/templates-zh-CN/planning/{visual_roadmap.md → visual_map.md} +21 -2
  240. package/templates-zh-CN/reference/adversarial-review-standard.md +1 -1
  241. package/templates-zh-CN/reference/docs-library-standard.md +36 -1
  242. package/templates-zh-CN/reference/execution-workflow-standard.md +10 -2
  243. package/templates-zh-CN/reference/external-source-intake-standard.md +82 -0
  244. package/templates-zh-CN/reference/harness-ledger-standard.md +7 -4
  245. package/templates-zh-CN/reference/pull-request-standard.md +106 -0
  246. package/templates-zh-CN/reference/repo-governance-standard.md +4 -1
  247. package/templates-zh-CN/reference/review-routing-standard.md +8 -1
  248. package/templates-zh-CN/reference/walkthrough-standard.md +6 -5
  249. package/templates-zh-CN/walkthrough/Closeout-SSoT.md +2 -2
  250. package/templates-zh-CN/walkthrough/walkthrough-template.md +2 -2
  251. package/scripts/smoke-dashboard.mjs +0 -70
  252. package/scripts/test-harness.mjs +0 -483
  253. package/templates/ssot/Feature-SSoT.md +0 -43
  254. package/templates/ssot/Lessons-SSoT.md +0 -44
  255. package/templates-zh-CN/dashboard/assets/app.css +0 -399
  256. package/templates-zh-CN/dashboard/assets/app.js +0 -435
  257. package/templates-zh-CN/dashboard/assets/i18n.js +0 -47
  258. package/templates-zh-CN/dashboard/assets/markdown-reader.js +0 -116
  259. package/templates-zh-CN/dashboard/assets/mermaid-renderer.js +0 -59
  260. package/templates-zh-CN/dashboard/index.html +0 -18
  261. package/templates-zh-CN/ssot/Feature-SSoT.md +0 -49
  262. package/templates-zh-CN/ssot/Lessons-SSoT.md +0 -49
@@ -0,0 +1,33 @@
1
+ # [Task Name] - Progress
2
+
3
+ ## Current Status
4
+
5
+ planned
6
+
7
+ ## Log
8
+
9
+ | Time | Actor | Action | Evidence | Next |
10
+ | --- | --- | --- | --- | --- |
11
+ | YYYY-MM-DD HH:MM | coordinator | [action taken] | type:path:summary | [next step] |
12
+
13
+ ## Decisions
14
+
15
+ | Date | Decision | Reason | Owner |
16
+ | --- | --- | --- | --- |
17
+ | YYYY-MM-DD | [decision] | [reason] | [owner] |
18
+
19
+ ## Evidence Ledger
20
+
21
+ | Evidence ID | Type | Path or Command | Result | Used For |
22
+ | --- | --- | --- | --- | --- |
23
+ | E-001 | command / file / runtime / review | [path or command] | pass / fail / observed / waived | [claim supported] |
24
+
25
+ ## Residual
26
+
27
+ none
28
+
29
+ ## Coordinator Handoff
30
+
31
+ - Global sync status: pending-coordinator-pass / synced / n/a
32
+ - Owner: coordinator / n/a
33
+ - Required shared updates: [none]
@@ -0,0 +1,13 @@
1
+ # References Index
2
+
3
+ Use this index for sources the task depends on but does not own.
4
+
5
+ | ID | Type | Path | Summary | Used By |
6
+ | --- | --- | --- | --- | --- |
7
+ | [reference-id] | doc / link / transcript / code | TARGET:path or URL:https://example.com | [why this source is relevant] | coordinator |
8
+
9
+ ## Source Rules
10
+
11
+ - Prefer canonical project files over summaries.
12
+ - Record external links with enough context for a reviewer to re-check them.
13
+ - Mark stale or uncertain references in `findings.md`.
@@ -0,0 +1,107 @@
1
+ # [Task Name] - Review
2
+
3
+ ## Reviewer Identity
4
+
5
+ | Reviewer | Type | Scope |
6
+ | --- | --- | --- |
7
+ | [name] | self / subagent / external / human | [files, modules, behavior, or release surface] |
8
+
9
+ ## Review Scope
10
+
11
+ - Review type: adversarial / security / regression / architecture / release / other
12
+ - In scope: [files, modules, behavior]
13
+ - Out of scope: [explicit exclusions]
14
+ - Source materials: [task plan, diff, test output, runtime evidence]
15
+
16
+ ## Agent Review Submission
17
+
18
+ This section is written by the agent or coordinator when the review packet is ready.
19
+ It is not human approval.
20
+
21
+ | Field | Value |
22
+ | --- | --- |
23
+ | Submission ID | [generated by task-review] |
24
+ | Submitted At | [timestamp] |
25
+ | Submitted By | [agent or coordinator identity] |
26
+ | Task Key | {{TASK_ID}} |
27
+ | Materials Checklist Hash | [generated by task-review; informational, not a manual gate] |
28
+ | Evidence Summary | [tests, diff, runtime, and review packet evidence] |
29
+ | Open Findings Count | [number] |
30
+ | Scanner Version | [generated scanner version] |
31
+
32
+ ### Material Checklist
33
+
34
+ | Material | Required? | Status | Evidence |
35
+ | --- | --- | --- | --- |
36
+ | Brief | yes / no | present / missing / incomplete | [path or reason] |
37
+ | Task plan | yes / no | present / missing / incomplete | [path or reason] |
38
+ | Progress and evidence | yes / no | present / missing / incomplete | [path or reason] |
39
+ | Visual map | yes / no | present / missing / incomplete | [path or reason] |
40
+ | Lesson candidate decision | yes / no | present / missing / incomplete | [path or reason] |
41
+ | Walkthrough or closeout link | yes / no | present / missing / incomplete | [path or reason] |
42
+
43
+ The scanner derives `materialsReady` from required files, sections, evidence, and this strict submission block. If materials are not ready, route the task to Missing Materials instead of Human Review Confirmation.
44
+ If there are open P0/P1/P2 blocking findings, route the task to Blocked instead of Human Review Confirmation.
45
+
46
+ ## Confidence Challenge
47
+
48
+ Answer directly: do you have 100% confidence in the plan, implementation, and strategy?
49
+
50
+ - Verdict: yes / no
51
+ - If no, list every plausible gap below and propose fixes.
52
+
53
+ ## Material Findings
54
+
55
+ | ID | Severity | Finding | Evidence Checked | Required Action | Open | Disposition | Blocks Release | Follow-up |
56
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
57
+
58
+ Do not keep sample findings. If there are no material findings, leave only the header and complete the No-Finding Statement.
59
+
60
+ ## No-Finding Statement
61
+
62
+ [If no material findings remain, state what evidence was checked and why no material finding remains.]
63
+
64
+ ## Human Review Confirmation
65
+
66
+ This section must only be completed by a human reviewer or by a command/workbench action acting on explicit human confirmation. Agent review submission, self-review, and subagent review do not satisfy this gate.
67
+
68
+ | Field | Value |
69
+ | --- | --- |
70
+ | Confirmation ID | [generated by review-confirm] |
71
+ | Confirmed At | [timestamp] |
72
+ | Reviewer | [human name] |
73
+ | Reviewer Email | [email, if available] |
74
+ | Task Key | {{TASK_ID}} |
75
+ | Confirm Text | [must match the task id or confirmation phrase required by the command] |
76
+ | Evidence Checked | [review packet / tests / diff summary] |
77
+ | Commit SHA | [confirmation commit SHA generated by review-confirm] |
78
+ | Audit Status | committed / blocked |
79
+
80
+ Do not fill this section when the task still belongs in Missing Materials, Blocked, or Lessons routing. `review-confirm` and the Dashboard Workbench must reject dirty Git state, missing commit identity, hook failures, or writes outside the current task `review.md` / `progress.md` allowlist.
81
+
82
+ ## Evidence Checked
83
+
84
+ | Evidence ID | Type | Path | Summary |
85
+ | --- | --- | --- | --- |
86
+ | E-001 | command / file / runtime | [path or command] | [what was checked and what it showed] |
87
+
88
+ ## Residual Risk
89
+
90
+ | Risk | Owner | Accepted? | Follow-up |
91
+ | --- | --- | --- | --- |
92
+ | [risk] | [owner] | yes / no | [path or next action] |
93
+
94
+ ## Lifecycle Queue Routing
95
+
96
+ | Queue | Applies? | Reason | Exit condition |
97
+ | --- | --- | --- | --- |
98
+ | Review | yes / no | Submitted review packet is ready for human confirmation. | Human confirms or returns it. |
99
+ | Missing Materials | yes / no | Required file, section, evidence, or review submission is absent/incomplete. | Agent repairs materials and resubmits review. |
100
+ | Blocked | yes / no | Open blocking finding, invalid state transition, failed audit, or human waiver needed. | Blocker is fixed, closed, or explicitly waived. |
101
+ | Lessons | yes / no | Lesson candidate needs rejection, task-local retention, dry-run promotion, or a sedimentation task. | Human decides candidate routing; promotion remains a separate maintenance task unless explicitly approved. |
102
+ | Confirmed / Finalized | yes / no | Human confirmation exists; closeout or governance work may still be pending. | Closeout, ledger, and lesson routing are complete. |
103
+ | Soft-deleted / Superseded | yes / no | Task has tombstone, superseded-by, archive, duplicate, or abandoned status. | Reopen or keep as read-only audit history. |
104
+
105
+ ## Final Confidence Basis
106
+
107
+ [Explain the final confidence basis after fixes and verification. If confidence is limited, name the remaining limits and who owns them.]
@@ -0,0 +1,111 @@
1
+ # [Task Name]
2
+
3
+ Task Contract: harness-task/v1
4
+
5
+ ## Goal
6
+
7
+ [State the outcome this task must deliver in one sentence.]
8
+
9
+ ## Scope
10
+
11
+ - In scope: [specific files, modules, behavior, or docs]
12
+ - Out of scope: [explicit exclusions]
13
+
14
+ ## Task Budget
15
+
16
+ | Budget | Use When | Required Structure |
17
+ | --- | --- | --- |
18
+ | simple | One owner, no subagent, L0/L1 evidence, no formal review gate | `brief.md`, `task_plan.md`, `visual_map.md`, `progress.md` |
19
+ | standard | Normal feature, fix, or documentation change | `brief.md`, `task_plan.md`, `execution_strategy.md`, `visual_map.md`, `findings.md`, `lesson_candidates.md`, `progress.md`, `review.md` |
20
+ | complex | Multi-hour work, L2/L3 evidence, subagent/reviewer, or optional artifact/reference indexes | Standard files plus `references/INDEX.md` and `artifacts/INDEX.md` |
21
+
22
+ Selected budget: {{TASK_BUDGET}}
23
+
24
+ ## Context Packet
25
+
26
+ | ID | Type | Path | Why It Matters | Used By |
27
+ | --- | --- | --- | --- | --- |
28
+ | C-001 | public-doc / private-plan / external / code | PUBLIC:path or PRIVATE:path or TARGET:path or URL:https://example.com | [why this source matters] | coordinator / reviewer / worker |
29
+
30
+ ## Required Files
31
+
32
+ Do not hand-copy this template to create task directories. Use `harness new-task`
33
+ so the selected budget creates the correct file set and `harness check` can
34
+ enforce it.
35
+
36
+ | Budget | Required Files |
37
+ | --- | --- |
38
+ | simple | `brief.md`, `task_plan.md`, `visual_map.md`, `progress.md` |
39
+ | standard | simple files plus `execution_strategy.md`, `findings.md`, `lesson_candidates.md`, `review.md` |
40
+ | complex | standard files plus `references/INDEX.md`, `artifacts/INDEX.md` |
41
+ | long-running add-on | `long-running-task-contract.md` when `--long-running` is selected |
42
+
43
+ Optional subdirectories are created only when triggered:
44
+
45
+ - `lessons/LC-*.md`: task-local detail artifacts for lesson candidates marked `needs-promotion`.
46
+ - `references/INDEX.md`: complex-task source package and reference index.
47
+ - `artifacts/INDEX.md`: complex-task generated evidence and artifact index.
48
+
49
+ File purposes:
50
+
51
+ | Contract File | Purpose |
52
+ | --- | --- |
53
+ | `brief.md` | Human-readable task summary and current context packet |
54
+ | `task_plan.md` | Goal, scope, budget, acceptance, and operating decisions |
55
+ | `execution_strategy.md` | Operating model, allocation, conflict control, and evidence strategy |
56
+ | `visual_map.md` | Diagram collection: phase map, optional architecture/sequence/data-flow/state diagrams, completion state, evidence state, and blocking risk |
57
+ | `progress.md` | Execution log, decisions, and handoff |
58
+ | `findings.md` | Findings, research notes, and unresolved risks |
59
+ | `lesson_candidates.md` | Task-local lesson candidate queue. Human review must accept no-candidate, reject candidates, or queue promotion before review confirmation |
60
+ | `lessons/LC-*.md` | Optional task-local lesson detail artifacts written while source context is fresh and linked from `Detail Artifact` |
61
+ | `review.md` | Agent review submission, adversarial review, or specialist review report |
62
+ | `references/INDEX.md` | Complex-task source package and reference index |
63
+ | `artifacts/INDEX.md` | Complex-task generated evidence and artifact index |
64
+ | `long-running-task-contract.md` | Continuous execution permission, loop rules, and stop conditions |
65
+
66
+ ## Steps
67
+
68
+ 1. [First concrete step]
69
+ 2. [Second concrete step]
70
+ 3. [Third concrete step]
71
+
72
+ ## Acceptance Criteria
73
+
74
+ - [ ] [Observable criterion]
75
+ - [ ] [Verification criterion]
76
+ - [ ] [Documentation or handoff criterion]
77
+
78
+ ## Worktree
79
+
80
+ - Path: [worktree path or n/a]
81
+ - Branch: [branch or n/a]
82
+ - Worker owner: coordinator / subagent id / n/a
83
+ - Worker handoff commit required: yes / no / n/a
84
+ - If no worktree, reason: [reason]
85
+
86
+ ## Long-Running Task Decision
87
+
88
+ - Long-running task: yes / no
89
+ - Contract file if yes: `long-running-task-contract.md`
90
+ - Continuous execution permission: granted / not granted / n/a
91
+ - Stop condition summary: [one sentence]
92
+
93
+ ## Review Decision
94
+
95
+ - Adversarial review required: yes / no
96
+ - Report file if yes: `review.md`
97
+ - Reviewer: self / subagent / external / human / n/a
98
+ - No-finding requirement: [requirement or n/a]
99
+
100
+ ## Links
101
+
102
+ - Related Regression Gate: [reference]
103
+ - Review Report: [path / n/a]
104
+ - Generated Ledger: rebuilt by lifecycle CLI / `harness governance rebuild`
105
+ - Prerequisite tasks: [reference or none]
106
+
107
+ ## Coordinator Handoff
108
+
109
+ - Global sync owner: coordinator / n/a
110
+ - Global sync status: pending-coordinator-pass / synced / n/a
111
+ - Shared updates needed: [Module Registry / Harness Ledger / Closeout SSoT / Regression SSoT / none]
@@ -1,4 +1,15 @@
1
- # [Task Name] - Visual Roadmap
1
+ # [Task Name] - Visual Map
2
+
3
+ Visual Map Contract: v1.0
4
+
5
+ This file is the task's diagram collection. It is not only a phase roadmap.
6
+ Include only diagrams that materially help a human or agent understand the task.
7
+
8
+ ## Map Index
9
+
10
+ | ID | Type | Purpose | Required For Understanding | Source Evidence | Promotion Candidate |
11
+ | --- | --- | --- | --- | --- | --- |
12
+ | MAP-01 | phase | Show the execution phases and dependencies | yes | `task_plan.md` | no |
2
13
 
3
14
  ## Phase Graph
4
15
 
@@ -20,7 +31,18 @@ flowchart LR
20
31
 
21
32
  Allowed Evidence Status: missing, partial, present, waived.
22
33
 
23
- ## Roadmap Notes
34
+ ## Supporting Maps
35
+
36
+ Add optional diagrams only when useful:
37
+
38
+ - architecture: module, component, or service structure.
39
+ - sequence: frontend/backend/service/database/agent interaction.
40
+ - data-flow: data movement and ownership.
41
+ - state: state machine or lifecycle.
42
+ - topology: repo, service, worker, or worktree layout.
43
+ - decision: branch and tradeoff tree.
44
+
45
+ ## Map Notes
24
46
 
25
47
  - Use `missing` when no evidence has been checked.
26
48
  - Use `partial` when some evidence exists but required checks remain.
@@ -0,0 +1,296 @@
1
+ # Preset Package Skeleton
2
+
3
+ Use this reference when creating a Coding Agent Harness preset package. Start from the smallest useful subset, then delete files and manifest sections the preset does not need.
4
+
5
+ Before designing a complex-task preset, inspect `references/complex-task-skeleton/`. That folder shows the base task contract the preset overlays. Presets should add method-specific context and resources; they should not silently replace the complex task skeleton itself.
6
+
7
+ ## Copyable Package Tree
8
+
9
+ ```text
10
+ my-preset/
11
+ preset.yaml
12
+ templates/
13
+ task_plan.append.md
14
+ references/
15
+ upstream-contract.md
16
+ resources/
17
+ service-runbook.md
18
+ artifacts/
19
+ input-packet.md
20
+ ```
21
+
22
+ ## Complete Reference Bundle Manifest
23
+
24
+ ```yaml
25
+ id: service-context
26
+ version: 1
27
+ purpose: Create tasks with shared upstream service context
28
+ compatibleBudgets: [complex]
29
+ localeSupport: [en-US]
30
+ task:
31
+ kind: service-integration
32
+ defaultTaskId: service-integration-task
33
+ entrypoints:
34
+ newTask:
35
+ type: template
36
+ writes: [docs/09-PLANNING/TASKS/**]
37
+ audit: true
38
+ templates:
39
+ taskPlanAppend: templates/task_plan.append.md
40
+ inputs:
41
+ service:
42
+ type: text
43
+ flag: --service
44
+ required: true
45
+ templateValues:
46
+ service:
47
+ from: inputs.service
48
+ metadata:
49
+ UpstreamService:
50
+ label: Upstream Service
51
+ from: inputs.service
52
+ resources:
53
+ references:
54
+ upstreamContract:
55
+ path: references/upstream-contract.md
56
+ template: templates/references/upstream-contract.md
57
+ index:
58
+ id: REF-001
59
+ type: code
60
+ summary: Shared upstream {{service}} contract for every task created by this preset.
61
+ usedBy: coordinator,worker,reviewer
62
+ serviceRunbook:
63
+ path: references/service-runbook.md
64
+ source: resources/service-runbook.md
65
+ index:
66
+ id: REF-002
67
+ type: runbook
68
+ summary: Local verification notes for the shared upstream service.
69
+ usedBy: worker
70
+ artifacts:
71
+ inputPacket:
72
+ path: artifacts/input-packet.md
73
+ source: resources/artifacts/input-packet.md
74
+ index:
75
+ id: ART-001
76
+ type: fixture
77
+ summary: Shared fixture packet copied by the preset.
78
+ producedBy: preset
79
+ context:
80
+ requiredReads: [REF-001, REF-002]
81
+ evidence:
82
+ bundleDir: artifacts/preset
83
+ files:
84
+ subject:
85
+ path: subject.txt
86
+ type: text
87
+ value: inputs.subject
88
+ audit:
89
+ manifestRequired: true
90
+ evidenceFiles: [preset-audit.json, preset-manifest.json, write-scope.json]
91
+ writeScopes:
92
+ taskDocs:
93
+ path: docs/09-PLANNING/TASKS/**
94
+ access: write
95
+ ```
96
+
97
+ ## Starter Files
98
+
99
+ ### `templates/task_plan.append.md`
100
+
101
+ ```markdown
102
+ ## Preset Context
103
+
104
+ This task depends on {{service}}. Read the preset required references before implementation and cite any behavior that changes the integration contract.
105
+ ```
106
+
107
+ ### `templates/references/upstream-contract.md`
108
+
109
+ ```markdown
110
+ # {{service}} Contract
111
+
112
+ ## Purpose
113
+
114
+ Record the contract details that every task created by this preset must understand before implementation.
115
+
116
+ ## Required Context
117
+
118
+ - Service owner:
119
+ - Local path or repository:
120
+ - API, event, or data boundary:
121
+ - Compatibility constraints:
122
+ - Known test or smoke command:
123
+
124
+ ## Open Questions
125
+
126
+ - [question]
127
+ ```
128
+
129
+ ### `resources/service-runbook.md`
130
+
131
+ ```markdown
132
+ # Service Runbook
133
+
134
+ ## Local Setup
135
+
136
+ - Command:
137
+ - Required environment:
138
+ - Health check:
139
+
140
+ ## Verification Notes
141
+
142
+ - Integration smoke:
143
+ - Known failure mode:
144
+ ```
145
+
146
+ ### `resources/artifacts/input-packet.md`
147
+
148
+ ```markdown
149
+ # Input Packet
150
+
151
+ ## Fixture Purpose
152
+
153
+ Describe why this shared input packet exists and which tasks should use it.
154
+
155
+ ## Contents
156
+
157
+ - [fixture or packet item]
158
+ ```
159
+
160
+ ## Minimal Non-Resource Preset
161
+
162
+ Use this smaller manifest when the preset only needs metadata, task-plan guidance, and audit evidence.
163
+
164
+ ```yaml
165
+ id: custom-review
166
+ version: 1
167
+ purpose: Create a custom review task
168
+ compatibleBudgets: [standard, complex]
169
+ localeSupport: [en-US]
170
+ task:
171
+ kind: review-task
172
+ defaultTaskId: custom-review-task
173
+ entrypoints:
174
+ newTask:
175
+ type: template
176
+ writes: [docs/09-PLANNING/TASKS/**]
177
+ audit: true
178
+ templates:
179
+ taskPlanAppend: templates/task_plan.append.md
180
+ inputs:
181
+ subject:
182
+ type: text
183
+ flag: --subject
184
+ required: true
185
+ templateValues:
186
+ subject:
187
+ from: inputs.subject
188
+ metadata:
189
+ ReviewSubject:
190
+ label: Review Subject
191
+ from: inputs.subject
192
+ evidence:
193
+ bundleDir: artifacts/preset
194
+ audit:
195
+ manifestRequired: true
196
+ evidenceFiles: [preset-audit.json, preset-manifest.json, write-scope.json]
197
+ writeScopes:
198
+ taskDocs:
199
+ path: docs/09-PLANNING/TASKS/**
200
+ access: write
201
+ ```
202
+
203
+ ## File And Field Rules
204
+
205
+ - `id` uses lowercase letters, numbers, and hyphens only.
206
+ - Supported `inputs.*.type` values are `text`, `flag`, and `json-file`.
207
+ - `entrypoints.newTask.writes` entries must exactly match declared `writeScopes.*.path` entries.
208
+ - `path` for references must stay under `references/`.
209
+ - `path` for artifacts must stay under `artifacts/`.
210
+ - Do not target `references/INDEX.md`, `artifacts/INDEX.md`, `task_plan.md`, or any canonical task contract file.
211
+ - `source` and `template` must point to files inside the preset package, not directories.
212
+ - Resource `index.id` values must be unique inside references or artifacts.
213
+ - Resource destination paths must be unique across references and artifacts.
214
+ - `context.requiredReads` can only list declared reference IDs.
215
+ - `context.requiredReads` generates `## Preset Required Reads` in `task_plan.md`; each generated row must contain the reference ID and the exact `TARGET:<task-relative-reference-path>`.
216
+ - `evidence.bundleDir` names the task-local audit/evidence directory; `evidence.files` is an optional mapping of named custom evidence declarations, while `audit.evidenceFiles` names built-in audit files.
217
+ - Do not write `evidence.files` as an array. Each custom evidence file must be a mapping with `path`, `type`, and `value`.
218
+ - Supported custom evidence types are `text`, `json`, `input-json`, `preset-audit`, `preset-manifest`, `write-scope`, `migration-verify`, `migration-ledger`, `dashboard-hash`, `target-git-status`, `target-commit`, `harness-version`, and `generated-at`.
219
+ - Resource `index.type`, `usedBy`, and `producedBy` are reader-facing labels, not strict enums. Prefer stable simple words: `code`, `doc`, `runbook`, `fixture`, `preset`, `coordinator`, `worker`, `reviewer`.
220
+ - Keep `entrypoints.newTask.type` as `template`; do not add JavaScript for task creation.
221
+ - Keep `writeScopes` narrow and task-doc scoped.
222
+
223
+ ## Custom Evidence Shape
224
+
225
+ Use a mapping, not an array:
226
+
227
+ ```yaml
228
+ evidence:
229
+ bundleDir: artifacts/preset
230
+ files:
231
+ subject:
232
+ path: subject.txt
233
+ type: text
234
+ value: inputs.subject
235
+ resolvedInputs:
236
+ path: resolved-inputs.json
237
+ type: json
238
+ value: inputs
239
+ audit:
240
+ manifestRequired: true
241
+ evidenceFiles: [preset-audit.json, preset-manifest.json, write-scope.json]
242
+ ```
243
+
244
+ This creates named files under the generated task's preset evidence bundle. Arrays such as `evidence.files: [summary.json]` are invalid.
245
+
246
+ ## Generated Required Reads Shape
247
+
248
+ For a declared reference like:
249
+
250
+ ```yaml
251
+ resources:
252
+ references:
253
+ upstreamContract:
254
+ path: references/upstream-contract.md
255
+ index:
256
+ id: REF-001
257
+ context:
258
+ requiredReads: [REF-001]
259
+ ```
260
+
261
+ The generated `task_plan.md` must include:
262
+
263
+ ```markdown
264
+ ## Preset Required Reads
265
+
266
+ Open `references/INDEX.md`, then read these preset-provided references before implementation.
267
+
268
+ | Reference | Path | Why |
269
+ | --- | --- | --- |
270
+ | REF-001 | TARGET:docs/09-PLANNING/TASKS/<task-folder>/references/upstream-contract.md | [rendered summary] |
271
+ ```
272
+
273
+ The same `REF-001` and exact `TARGET:` path must also appear in `references/INDEX.md`.
274
+
275
+ ## Verification Checklist
276
+
277
+ Run these commands in an isolated HOME or disposable target:
278
+
279
+ ```bash
280
+ harness preset check ./my-preset
281
+ harness preset install ./my-preset --force
282
+ harness init --locale en-US --capabilities core /tmp/preset-target
283
+ harness new-task first-api --budget complex --preset service-context --service payment-service /tmp/preset-target
284
+ harness new-task second-api --budget complex --preset service-context --service payment-service /tmp/preset-target
285
+ harness status --json /tmp/preset-target
286
+ harness task-index --json /tmp/preset-target
287
+ harness check --profile target-project /tmp/preset-target
288
+ ```
289
+
290
+ Manually inspect both created tasks:
291
+
292
+ - `task_plan.md` includes preset metadata and `## Preset Required Reads`.
293
+ - `references/INDEX.md` includes every `REF-*` row with a concrete `TARGET:` path.
294
+ - `artifacts/INDEX.md` includes every `ART-*` row with a concrete `TARGET:` path.
295
+ - The copied or rendered reference files exist under each task directory.
296
+ - Evidence bundles are independent per task.