coding-agent-harness 1.0.2 → 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 (177) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/CONTRIBUTING.md +98 -0
  3. package/README.md +211 -86
  4. package/README.zh-CN.md +54 -34
  5. package/SKILL.md +25 -18
  6. package/docs-release/README.md +9 -5
  7. package/docs-release/architecture/overview.md +17 -5
  8. package/docs-release/architecture/overview.zh-CN.md +9 -5
  9. package/docs-release/assets/dashboard-overview.png +0 -0
  10. package/docs-release/guides/agent-installation.en-US.md +31 -8
  11. package/docs-release/guides/agent-installation.md +34 -9
  12. package/docs-release/guides/contributing.md +100 -0
  13. package/docs-release/guides/contributing.zh-CN.md +99 -0
  14. package/docs-release/guides/document-audience-and-surfaces.en-US.md +3 -2
  15. package/docs-release/guides/document-audience-and-surfaces.md +3 -2
  16. package/docs-release/guides/full-legacy-migration-subagent-strategy.md +2 -2
  17. package/docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md +2 -2
  18. package/docs-release/guides/legacy-migration-agent-prompt.md +0 -11
  19. package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +0 -11
  20. package/docs-release/guides/migration-playbook.en-US.md +14 -15
  21. package/docs-release/guides/migration-playbook.md +14 -15
  22. package/docs-release/guides/parent-control-repository-pattern.en-US.md +7 -5
  23. package/docs-release/guides/parent-control-repository-pattern.md +7 -5
  24. package/docs-release/guides/preset-development.md +214 -0
  25. package/docs-release/guides/repository-operating-models.en-US.md +5 -4
  26. package/docs-release/guides/repository-operating-models.md +5 -4
  27. package/docs-release/guides/task-state-machine.en-US.md +207 -0
  28. package/docs-release/guides/task-state-machine.md +214 -0
  29. package/docs-release/intl/en-US.md +1 -1
  30. package/docs-release/intl/zh-CN.md +1 -1
  31. package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/findings.md +7 -0
  32. package/package.json +8 -3
  33. package/presets/legacy-migration/checks/preset-check.mjs +3 -0
  34. package/presets/legacy-migration/preset.yaml +134 -0
  35. package/presets/legacy-migration/scripts/plan-work-queue.mjs +4 -0
  36. package/presets/legacy-migration/scripts/scaffold-task-contracts.mjs +4 -0
  37. package/presets/legacy-migration/templates/execution_strategy.append.md +18 -0
  38. package/presets/legacy-migration/templates/findings.seed.md +17 -0
  39. package/presets/legacy-migration/templates/review.seed.md +12 -0
  40. package/presets/legacy-migration/templates/task_plan.append.md +9 -0
  41. package/presets/legacy-migration/templates/visual_map.append.md +12 -0
  42. package/presets/legacy-migration/workbench/dashboard-panels.yaml +2 -0
  43. package/presets/legacy-migration/workbench/migration-queue.schema.json +23 -0
  44. package/presets/lesson-sedimentation/preset.yaml +23 -0
  45. package/presets/lesson-sedimentation/templates/prompt.md +23 -0
  46. package/presets/module/preset.yaml +25 -0
  47. package/presets/module/templates/execution_strategy.append.md +8 -0
  48. package/presets/module/templates/task_plan.append.md +17 -0
  49. package/presets/standard-task/preset.yaml +31 -0
  50. package/presets/standard-task/templates/task_plan.append.md +7 -0
  51. package/references/adversarial-review-standard.md +2 -2
  52. package/references/agents-md-pattern.md +2 -2
  53. package/references/delivery-operating-model-standard.md +3 -3
  54. package/references/docs-directory-standard.md +6 -7
  55. package/references/harness-ledger.md +53 -96
  56. package/references/lessons-governance.md +88 -93
  57. package/references/module-parallel-standard.md +14 -14
  58. package/references/planning-loop.md +12 -6
  59. package/references/pull-request-standard.md +118 -0
  60. package/references/repo-governance-standard.md +11 -2
  61. package/references/review-routing-standard.md +7 -1
  62. package/references/ssot-governance.md +67 -59
  63. package/references/taskr-gap-analysis.md +600 -0
  64. package/references/walkthrough-closeout.md +7 -7
  65. package/scripts/check-harness.mjs +40 -301
  66. package/scripts/commands/dashboard-command.mjs +67 -0
  67. package/scripts/commands/migration-command.mjs +96 -0
  68. package/scripts/commands/preset-command.mjs +73 -0
  69. package/scripts/commands/task-command.mjs +327 -0
  70. package/scripts/harness.mjs +55 -260
  71. package/scripts/lib/capability-registry.mjs +66 -8
  72. package/scripts/lib/check-module-parallel.mjs +237 -0
  73. package/scripts/lib/check-profiles.mjs +61 -153
  74. package/scripts/lib/check-task-contracts.mjs +47 -0
  75. package/scripts/lib/core-shared.mjs +10 -0
  76. package/scripts/lib/dashboard-data.mjs +29 -6
  77. package/scripts/lib/dashboard-workbench.mjs +52 -12
  78. package/scripts/lib/dashboard-writer.mjs +14 -2
  79. package/scripts/lib/git-status-summary.mjs +46 -0
  80. package/scripts/lib/governance-index-generator.mjs +174 -0
  81. package/scripts/lib/governance-sync.mjs +514 -0
  82. package/scripts/lib/governance-table-boundary.mjs +175 -0
  83. package/scripts/lib/harness-core.mjs +5 -0
  84. package/scripts/lib/lesson-maintenance.mjs +36 -29
  85. package/scripts/lib/migration-support.mjs +1 -1
  86. package/scripts/lib/preset-audit-contracts.mjs +37 -0
  87. package/scripts/lib/preset-engine.mjs +497 -0
  88. package/scripts/lib/preset-registry.mjs +627 -0
  89. package/scripts/lib/preset-resource-contracts.mjs +83 -0
  90. package/scripts/lib/review-confirm-git-gate.mjs +248 -0
  91. package/scripts/lib/status-dashboard-renderer.mjs +102 -0
  92. package/scripts/lib/subagent-authorization-audit.mjs +196 -0
  93. package/scripts/lib/task-completion-consistency.mjs +16 -0
  94. package/scripts/lib/task-index.mjs +93 -0
  95. package/scripts/lib/task-lesson-candidates.mjs +242 -0
  96. package/scripts/lib/task-lesson-sedimentation.mjs +326 -0
  97. package/scripts/lib/task-lifecycle/review-confirm.mjs +101 -0
  98. package/scripts/lib/task-lifecycle/review-gates.mjs +70 -0
  99. package/scripts/lib/task-lifecycle/text-utils.mjs +24 -0
  100. package/scripts/lib/task-lifecycle.mjs +297 -403
  101. package/scripts/lib/task-review-model.mjs +469 -0
  102. package/scripts/lib/task-scanner.mjs +130 -236
  103. package/scripts/lib/task-tombstone-commands.mjs +140 -0
  104. package/scripts/postinstall.mjs +14 -0
  105. package/skills/preset-creator/SKILL.md +179 -0
  106. package/skills/preset-creator/references/complex-task-skeleton/README.md +31 -0
  107. package/skills/preset-creator/references/complex-task-skeleton/artifacts/INDEX.md +12 -0
  108. package/skills/preset-creator/references/complex-task-skeleton/brief.md +32 -0
  109. package/skills/preset-creator/references/complex-task-skeleton/execution_strategy.md +71 -0
  110. package/skills/preset-creator/references/complex-task-skeleton/findings.md +24 -0
  111. package/skills/preset-creator/references/complex-task-skeleton/lesson_candidates.md +70 -0
  112. package/skills/preset-creator/references/complex-task-skeleton/long-running-task-contract.md +76 -0
  113. package/skills/preset-creator/references/complex-task-skeleton/progress.md +33 -0
  114. package/skills/preset-creator/references/complex-task-skeleton/references/INDEX.md +13 -0
  115. package/skills/preset-creator/references/complex-task-skeleton/review.md +107 -0
  116. package/skills/preset-creator/references/complex-task-skeleton/task_plan.md +111 -0
  117. package/skills/preset-creator/references/complex-task-skeleton/visual_map.md +50 -0
  118. package/skills/preset-creator/references/preset-package-skeleton.md +296 -0
  119. package/templates/AGENTS.md.template +19 -15
  120. package/templates/dashboard/assets/app-src/00-state.js +1 -0
  121. package/templates/dashboard/assets/app-src/10-router.js +2 -1
  122. package/templates/dashboard/assets/app-src/20-overview.js +11 -5
  123. package/templates/dashboard/assets/app-src/30-tasks.js +92 -246
  124. package/templates/dashboard/assets/app-src/35-task-detail.js +246 -0
  125. package/templates/dashboard/assets/app-src/45-review.js +241 -22
  126. package/templates/dashboard/assets/app-src/50-migration.js +24 -10
  127. package/templates/dashboard/assets/app-src/90-bindings.js +171 -29
  128. package/templates/dashboard/assets/app.css +698 -156
  129. package/templates/dashboard/assets/app.css.manifest.json +9 -0
  130. package/templates/dashboard/assets/app.js +662 -91
  131. package/templates/dashboard/assets/app.manifest.json +1 -0
  132. package/templates/dashboard/assets/css-src/00-foundation.css +342 -0
  133. package/templates/dashboard/assets/css-src/10-panels-flow.css +236 -0
  134. package/templates/dashboard/assets/css-src/20-briefs-controls.css +398 -0
  135. package/templates/dashboard/assets/css-src/30-task-index.css +739 -0
  136. package/templates/dashboard/assets/css-src/35-review-workspace.css +507 -0
  137. package/templates/dashboard/assets/css-src/40-detail-modules-migration.css +427 -0
  138. package/templates/dashboard/assets/css-src/50-responsive-overrides.css +551 -0
  139. package/templates/dashboard/assets/i18n.js +123 -21
  140. package/templates/ledger/Harness-Ledger.md +13 -25
  141. package/templates/lessons/lesson-arch-process-change.md +1 -1
  142. package/templates/lessons/lesson-new-doc.md +1 -1
  143. package/templates/lessons/lesson-ref-change.md +1 -1
  144. package/templates/planning/execution_strategy.md +31 -0
  145. package/templates/planning/lesson_candidates.md +18 -6
  146. package/templates/planning/optional/artifacts/INDEX.md +3 -3
  147. package/templates/planning/optional/references/INDEX.md +3 -3
  148. package/templates/planning/review.md +59 -0
  149. package/templates/planning/task_plan.md +36 -13
  150. package/templates/reference/execution-workflow-standard.md +4 -3
  151. package/templates/reference/pull-request-standard.md +80 -0
  152. package/templates/reference/repo-governance-standard.md +7 -6
  153. package/templates/reference/review-routing-standard.md +6 -0
  154. package/templates/reference/walkthrough-standard.md +2 -1
  155. package/templates/verifier/verifier-output.md +1 -1
  156. package/templates-zh-CN/AGENTS.md.template +20 -16
  157. package/templates-zh-CN/ledger/Harness-Ledger.md +17 -40
  158. package/templates-zh-CN/planning/execution_strategy.md +30 -0
  159. package/templates-zh-CN/planning/lesson_candidates.md +18 -6
  160. package/templates-zh-CN/planning/review.md +59 -1
  161. package/templates-zh-CN/planning/task_plan.md +30 -10
  162. package/templates-zh-CN/reference/adversarial-review-standard.md +1 -1
  163. package/templates-zh-CN/reference/docs-library-standard.md +1 -1
  164. package/templates-zh-CN/reference/execution-workflow-standard.md +4 -3
  165. package/templates-zh-CN/reference/harness-ledger-standard.md +2 -2
  166. package/templates-zh-CN/reference/pull-request-standard.md +106 -0
  167. package/templates-zh-CN/reference/repo-governance-standard.md +4 -3
  168. package/templates-zh-CN/reference/review-routing-standard.md +8 -1
  169. package/templates-zh-CN/reference/walkthrough-standard.md +3 -2
  170. package/templates-zh-CN/walkthrough/Closeout-SSoT.md +1 -1
  171. package/docs-release/assets/dashboard-overview-en.png +0 -0
  172. package/scripts/smoke-dashboard.mjs +0 -92
  173. package/scripts/test-harness.mjs +0 -1395
  174. package/templates/ssot/Feature-SSoT.md +0 -43
  175. package/templates/ssot/Lessons-SSoT.md +0 -44
  176. package/templates-zh-CN/ssot/Feature-SSoT.md +0 -49
  177. package/templates-zh-CN/ssot/Lessons-SSoT.md +0 -49
@@ -0,0 +1,179 @@
1
+ ---
2
+ name: preset-creator
3
+ description: Use when creating, reviewing, improving, or installing Coding Agent Harness preset packages for repeatable task families.
4
+ ---
5
+
6
+ # Preset Creator
7
+
8
+ Use this skill when a user wants to create, review, improve, or install a Harness preset.
9
+
10
+ A good preset is not just a folder template. It is a reusable task method package: it captures when a class of tasks should exist, what inputs the agent must ask for, what task metadata must be visible, what shared references must be read, what evidence must be produced, and how the created task proves it is using the preset correctly.
11
+
12
+ This skill is standalone. Do not assume the agent already knows Harness task contracts. Before creating a preset for complex tasks, read the included complex task skeleton reference and design the preset as an overlay on that skeleton.
13
+
14
+ ## Preset Methodology
15
+
16
+ Create a preset when at least two future tasks should share the same method or context. Good examples:
17
+
18
+ - A group of API tasks all depend on the same upstream microservice contract.
19
+ - Migration tasks all need the same baseline session evidence and cutover rules.
20
+ - Review tasks all need the same reviewer input packet and required evidence.
21
+ - Repeated lesson-sedimentation tasks need the same prompt, metadata, and audit trail.
22
+
23
+ Do not create a preset for a one-off task. Do not use a preset to hide vague requirements. If the task family is not repeatable yet, write a normal task first and extract the preset after the second or third repetition.
24
+
25
+ ## Design Questions
26
+
27
+ Before writing files, answer these in the task notes or your response:
28
+
29
+ 1. What family of tasks will this preset create?
30
+ 2. What task budget is required: `standard` or `complex`?
31
+ 3. What `task.kind` should downstream scanners see?
32
+ 4. What inputs must the user or agent provide as CLI flags?
33
+ 5. What metadata lines must appear in `task_plan.md`?
34
+ 6. What templates should be appended to task files?
35
+ 7. What evidence or audit files should be generated?
36
+ 8. What shared references should every preset-created task read first?
37
+ 9. What write scopes are strictly necessary?
38
+ 10. How will you prove a task created by this preset is recognized by `status --json` and `task-index --json`?
39
+
40
+ ## Package Layout
41
+
42
+ Use the bundled references before writing files:
43
+
44
+ - `references/complex-task-skeleton/`
45
+ - `references/preset-package-skeleton.md`
46
+
47
+ The complex task skeleton reference contains the base `brief.md`, `task_plan.md`, `execution_strategy.md`, `visual_map.md`, `findings.md`, `lesson_candidates.md`, `progress.md`, `review.md`, `references/INDEX.md`, and `artifacts/INDEX.md` contracts. The preset package skeleton contains a copyable package tree, a complete `preset.yaml`, starter Markdown resources, and the verification checklist. Keep this `SKILL.md` focused on method and judgment; use the references when the task has moved from design to file creation.
48
+
49
+ Use a simple package:
50
+
51
+ ```text
52
+ my-preset/
53
+ preset.yaml
54
+ templates/
55
+ task_plan.append.md
56
+ references/
57
+ upstream-contract.md
58
+ resources/
59
+ service-runbook.md
60
+ artifacts/
61
+ input-packet.md
62
+ ```
63
+
64
+ ## Required Manifest Sections
65
+
66
+ - `id`: lowercase letters, numbers, and hyphens.
67
+ - `version`: integer; increment when generated task behavior changes.
68
+ - `purpose`: one sentence explaining the repeatable method.
69
+ - `compatibleBudgets`: usually `[complex]` when the preset creates references or artifacts.
70
+ - `task.kind`: stable scanner-facing task kind.
71
+ - `entrypoints.newTask`: always declarative for task creation.
72
+ - `inputs`: CLI flags when the preset needs user-provided values.
73
+ - `templateValues`: values used by templates.
74
+ - `metadata`: first-class `Label: value` lines in `task_plan.md`.
75
+ - `resources.references`: shared task-local reference files, when tasks share context.
76
+ - `resources.artifacts`: preset-provided fixtures or input packets, when needed.
77
+ - `context.requiredReads`: reference IDs the agent must read before implementation.
78
+ - `evidence.bundleDir`: task-local directory for preset audit/evidence files, usually `artifacts/preset`.
79
+ - `evidence.files`: optional custom generated files inside the evidence bundle.
80
+ - `audit.manifestRequired`: must be `true`.
81
+ - `audit.evidenceFiles`: built-in audit files to generate, usually `preset-audit.json`, `preset-manifest.json`, and `write-scope.json`.
82
+ - `writeScopes`: narrow paths the preset may write.
83
+
84
+ ## Manifest Format
85
+
86
+ Use the Harness manifest subset only: nested mappings, scalar strings/numbers/booleans, and inline arrays such as `[standard, complex]`. Do not use block strings or dash-list YAML forms.
87
+
88
+ `templateValues` and `metadata` may use literal `value`, `default`, or dot-path `from` references such as `inputs.subject` or `task.title`. Do not use expressions or inline code.
89
+
90
+ Templates and resource index summaries can use `{{valueName}}` placeholders from `templateValues`.
91
+
92
+ Supported input types are `text`, `flag`, and `json-file`. Resource `index.type`, `usedBy`, and `producedBy` are labels for readers; use stable simple words such as `code`, `runbook`, `doc`, `fixture`, `preset`, `worker`, `reviewer`, and `coordinator`.
93
+
94
+ Every value in `entrypoints.newTask.writes` must exactly match one `writeScopes.*.path` entry. Do not rely on partial overlap.
95
+
96
+ ## Reference Bundle Pattern
97
+
98
+ Use `resources.references` when the preset should preload common context for a group of tasks.
99
+
100
+ ```yaml
101
+ resources:
102
+ references:
103
+ upstreamContract:
104
+ path: references/upstream-contract.md
105
+ template: templates/references/upstream-contract.md
106
+ index:
107
+ id: REF-001
108
+ type: code
109
+ summary: Shared upstream {{service}} contract for every task created by this preset.
110
+ usedBy: coordinator,worker,reviewer
111
+ serviceRunbook:
112
+ path: references/service-runbook.md
113
+ source: resources/service-runbook.md
114
+ index:
115
+ id: REF-002
116
+ type: runbook
117
+ summary: Local verification notes for the shared upstream service.
118
+ usedBy: worker
119
+ context:
120
+ requiredReads: [REF-001, REF-002]
121
+ ```
122
+
123
+ Use `template` for Markdown that needs substitution. Use `source` for static files copied from the preset package. The created task should read like this: `task_plan.md` tells the agent which `REF-*` entries to read, `references/INDEX.md` explains why each file matters, and the actual `references/*.md` files contain the context.
124
+
125
+ When `context.requiredReads` is set, Harness appends a `## Preset Required Reads` table to `task_plan.md`. Each row must resolve to the reference ID and exact `TARGET:<task-relative-reference-path>` that also appears in `references/INDEX.md`.
126
+
127
+ ## Artifact Bundle Pattern
128
+
129
+ Use `resources.artifacts` for preset-provided support material that is not a source reference:
130
+
131
+ ```yaml
132
+ resources:
133
+ artifacts:
134
+ inputPacket:
135
+ path: artifacts/input-packet.md
136
+ source: resources/artifacts/input-packet.md
137
+ index:
138
+ id: ART-001
139
+ type: fixture
140
+ summary: Shared fixture packet copied by the preset.
141
+ producedBy: preset
142
+ ```
143
+
144
+ Do not confuse artifacts with evidence. Artifacts can be input packets or fixtures. Evidence proves what happened, such as `preset-audit.json`, `preset-manifest.json`, command output, or verification results.
145
+
146
+ ## Safety Rules
147
+
148
+ - `writeScopes` must be as narrow as possible.
149
+ - Generated files must stay under the created task directory.
150
+ - A preset must not mutate source code, Git state, or global governance tables during `new-task`.
151
+ - Do not add JavaScript for `new-task` behavior.
152
+ - If behavior needs code, identify the missing reusable built-in processor and stop for design review.
153
+ - Reference bundles are task-local snapshots. Do not silently mutate historical tasks when a preset package changes.
154
+ - User-installed presets live in `~/.coding-agent-harness/presets/<preset-id>/`.
155
+
156
+ ## Creation Workflow
157
+
158
+ 1. Ask or infer the preset purpose, task family, target budget, task kind, required inputs, shared references, and evidence needs.
159
+ 2. For complex presets, open `references/complex-task-skeleton/README.md` and inspect the base task files the preset will overlay.
160
+ 3. Open `references/preset-package-skeleton.md` and copy only the files the preset actually needs.
161
+ 4. Create the preset directory with `preset.yaml`, templates, and resources.
162
+ 5. Keep task creation declarative: manifest inputs, `templateValues`, `metadata`, Markdown templates, `resources`, evidence declarations, and `writeScopes`.
163
+ 6. Run `harness preset check <path>`.
164
+ 7. Install with `harness preset install <path> --force` in a disposable or user-approved environment.
165
+ 8. Smoke test with `harness new-task <id> --budget <budget> --preset <preset-id> ... <target>`.
166
+ 9. For reference-bundle presets, create two different tasks from the same preset and verify both contain the same shared references but independent audit/evidence bundles.
167
+ 10. Run `harness status --json <target>`, `harness task-index --json <target>`, and `harness check --profile target-project <target>`.
168
+ 11. Inspect the generated `task_plan.md`, `references/INDEX.md`, and `artifacts/INDEX.md` manually before declaring success.
169
+
170
+ ## Quality Checklist
171
+
172
+ - The preset name describes a task method, not a single task.
173
+ - The generated task can be understood from files alone, without the original chat.
174
+ - `task_plan.md` contains enough context for the next agent to know what to read first.
175
+ - Every required read points to a real `REF-*` row.
176
+ - Every `REF-*` row explains why that reference matters.
177
+ - Every generated artifact has an `ART-*` row when artifacts are used.
178
+ - The preset passes `preset check`, task creation, `status --json`, `task-index --json`, and target check.
179
+ - A downstream agent can create a valid preset from this skill without editing Harness source.
@@ -0,0 +1,31 @@
1
+ # Complex Task Skeleton Reference
2
+
3
+ This folder is a standalone copy of the Harness complex task contract skeleton. Use it when designing a preset so the preset author can see the base files that `harness new-task --budget complex` creates before the preset overlay is applied.
4
+
5
+ ## Required Complex Task Files
6
+
7
+ | File | Purpose |
8
+ | --- | --- |
9
+ | `brief.md` | Human-readable task summary and current context packet. |
10
+ | `task_plan.md` | Goal, scope, budget, required files, acceptance criteria, and operating decisions. |
11
+ | `execution_strategy.md` | Operating model, allocation, conflict control, evidence strategy, and subagent decisions. |
12
+ | `visual_map.md` | Phase map, optional diagrams, completion state, evidence state, and blocking risk. |
13
+ | `findings.md` | Findings, research notes, and unresolved risks. |
14
+ | `lesson_candidates.md` | Task-local lesson candidate queue. |
15
+ | `progress.md` | Execution log, decisions, handoff, and residuals. |
16
+ | `review.md` | Agent review submission, adversarial review, evidence checked, and residual risk. |
17
+ | `references/INDEX.md` | Complex task source/reference index. |
18
+ | `artifacts/INDEX.md` | Complex task generated artifact/evidence index. |
19
+ | `long-running-task-contract.md` | Optional add-on when the task is explicitly long-running. |
20
+
21
+ ## How A Preset Uses This Skeleton
22
+
23
+ A preset should usually not replace these files. Harness creates the base task skeleton first. The preset then overlays method-specific content by:
24
+
25
+ - appending task-plan guidance with `entrypoints.newTask.templates.taskPlanAppend`;
26
+ - adding `metadata` lines that make scanner-visible context first-class;
27
+ - writing `resources.references` and `resources.artifacts` into the task-local folders;
28
+ - adding `context.requiredReads` so the next agent reads the right references before implementation;
29
+ - generating audit/evidence files under a task-local `artifacts/preset` bundle.
30
+
31
+ If a preset needs to change the structure of the complex task skeleton itself, do not hide that inside the preset. Update the Harness task templates or checker instead.
@@ -0,0 +1,12 @@
1
+ # Artifacts Index
2
+
3
+ Use this index for generated outputs that support the task but are not the source of truth.
4
+
5
+ | ID | Type | Path | Summary | Produced By |
6
+ | --- | --- | --- | --- | --- |
7
+ | [artifact-id] | command / diff / fixture / screenshot / review / report | TARGET:path or URL:https://example.com | [why it exists] | coordinator |
8
+
9
+ ## Retention Notes
10
+
11
+ - Keep artifacts that are needed to reproduce evidence or review decisions.
12
+ - Remove or ignore temporary artifacts once their result is captured in `progress.md`.
@@ -0,0 +1,32 @@
1
+ # {{TASK_TITLE}}
2
+
3
+ ## Brief
4
+
5
+ ## Task ID
6
+
7
+ `{{TASK_ID}}`
8
+
9
+ ## Created
10
+
11
+ {{DATE}}
12
+
13
+ ## Outcome
14
+
15
+ State the user-visible or project-visible result this task must deliver.
16
+
17
+ ## Boundaries
18
+
19
+ - In scope: files, behavior, documentation, or verification this task may change.
20
+ - Out of scope: work that must not be folded into this task.
21
+ - Stop conditions: uncertainty, risk, or missing access that requires coordinator or user review.
22
+
23
+ ## Execution Contract
24
+
25
+ - Owner: coordinator
26
+ - Lifecycle state: not_started
27
+ - Required files: `task_plan.md`, `execution_strategy.md`, `visual_map.md`, `progress.md`, `findings.md`, `review.md`
28
+ - Required closeout: verification evidence recorded in `progress.md`
29
+
30
+ ## First Next Step
31
+
32
+ Replace this line with the first concrete action before implementation starts.
@@ -0,0 +1,71 @@
1
+ # [Task Name] - Execution Strategy
2
+
3
+ ## Strategy Summary
4
+
5
+ [Describe the execution approach, including why this operating model fits the risk and scope.]
6
+
7
+ ## Subagent Authorization
8
+
9
+ Read this section at the start of the task and report the current authorization state before delegating.
10
+ This is an audit record, not an execution sandbox.
11
+
12
+ | Role | Status | Permission | Authorized By | Authorized At | Scope | Worktree / Branch | Reuse |
13
+ | --- | --- | --- | --- | --- | --- | --- | --- |
14
+ | reviewer subagent | allowed by default | read-only | harness task policy | task creation | current task review | n/a | allowed within this task |
15
+ | worker subagent | not authorized | write only after user approval | pending | pending | pending | pending | allowed only within approved task/scope |
16
+
17
+ ## Subagent Delegation Decision
18
+
19
+ At task start, the coordinator must make this decision from the user's goal, even if the user never mentions subagents.
20
+ Do not expect the user to know what a subagent or worker is. If delegation would help, explain the benefit in plain language and ask for permission once.
21
+ It is fine to say "subagent" or "worker" to the user; the important rule is that the agent must not wait for the user to ask for them.
22
+ If the task is clearly split into independent slices, decide `ask-user` before implementation. If exact file paths are still unknown, first identify the paths, then immediately ask for the independent execution helper authorization.
23
+
24
+ | Question | Decision | Reason | Next Action |
25
+ | --- | --- | --- | --- |
26
+ | Should a reviewer subagent be used? | yes / no | [why reviewer review helps or is unnecessary] | If yes, call a read-only reviewer without asking for extra permission. |
27
+ | Would a worker subagent materially help? | no / ask-user / already-authorized | [parallel slice, independent implementation, focused investigation, or not useful] | If ask-user, ask directly: "This task is suitable for a worker subagent. Do you authorize me to assign one worker subagent to modify only [scope] in [worktree/branch] while I coordinate and review the result?" |
28
+
29
+ ## User Authorization Decision
30
+
31
+ If the worker decision above is `ask-user`, implementation is blocked until this table records the user's answer.
32
+ Allowed resolved states are `authorized`, `denied`, or `not-needed`. Do not leave this as `pending` after choosing `ask-user`.
33
+
34
+ | Gate | State | Decided By | Decided At | Scope | Worktree / Branch | Notes |
35
+ | --- | --- | --- | --- | --- | --- | --- |
36
+ | worker subagent | pending | pending | pending | pending | pending | Fill only after directly asking the user. |
37
+
38
+ ## Operating Model
39
+
40
+ - Model: solo / team / split-repo / program / waterfall / kanban / module-parallel
41
+ - Primary executor: coordinator / worker / human
42
+ - Shared sync owner: coordinator
43
+ - Worktree required: yes / no
44
+ - Review required: yes / no
45
+
46
+ ## Work Allocation
47
+
48
+ | Role | Input Package | Write Scope | Handoff Required | Owner |
49
+ | --- | --- | --- | --- | --- |
50
+ | coordinator | task plan, strategy, roadmap | shared ledgers and integration | yes | [owner] |
51
+ | worker | assigned slice | assigned files only | yes | [owner] |
52
+
53
+ ## Coordination Rules
54
+
55
+ 1. Shared files are coordinator-owned unless a lock is explicitly assigned.
56
+ 2. Workers update only assigned files and route shared-table changes through handoff.
57
+ 3. Parallel work must use non-overlapping write scopes.
58
+ 4. Integration runs final checks after worker commits are merged or applied.
59
+
60
+ ## Verification Strategy
61
+
62
+ | Check | Command or Evidence | Required | Owner |
63
+ | --- | --- | --- | --- |
64
+ | Static check | [command or path] | yes / no | [owner] |
65
+ | Unit test | [command or path] | yes / no | [owner] |
66
+ | Integration or smoke | [command, URL, or log] | yes / no | [owner] |
67
+ | Review | `review.md` / verifier output / n/a | yes / no | [owner] |
68
+
69
+ ## Closeout Rule
70
+
71
+ Do not mark the task complete until required evidence is present, material findings are closed or accepted, and shared updates are either completed or assigned to the coordinator.
@@ -0,0 +1,24 @@
1
+ # [Task Name] - Findings
2
+
3
+ Use this file for defects, risks, unclear requirements, research notes, and review follow-up that may affect delivery.
4
+
5
+ ## Open Findings
6
+
7
+ | ID | Severity | Finding | Evidence | Owner | Required Action | Status |
8
+ | --- | --- | --- | --- | --- | --- | --- |
9
+
10
+ Do not keep sample findings. Add rows only for real findings discovered during the task.
11
+
12
+ ## Resolved Findings
13
+
14
+ | ID | Resolution | Evidence | Date |
15
+ | --- | --- | --- | --- |
16
+
17
+ Add rows only after a real finding is resolved or accepted with owner-routed risk.
18
+
19
+ ## Severity Guide
20
+
21
+ - P0: Blocks release or risks data loss, security exposure, or production outage.
22
+ - P1: Blocks the task goal or a required workflow.
23
+ - P2: Material quality, maintainability, or evidence gap.
24
+ - P3: Follow-up improvement that does not block closeout.
@@ -0,0 +1,70 @@
1
+ # {{TASK_TITLE}} - Lesson Candidates
2
+
3
+ This file is the task-local lesson candidate queue. Human review decides whether any candidate should stay task-local, be rejected, enter dry-run promotion, become a promoted lesson detail doc, or become a separate sedimentation task.
4
+
5
+ ## Candidate Status
6
+
7
+ | Field | Value |
8
+ | --- | --- |
9
+ | Schema version | lesson-candidate-v1 |
10
+ | Task-level status | pending-review |
11
+ | Review gate | candidate-file-present |
12
+ | Review decision | pending-human-review |
13
+ | Promotion state | not-promoted |
14
+ | Closeout token | pending |
15
+ | Source task | {{TASK_ID}} |
16
+ | Owner | coordinator |
17
+ | Last updated | {{DATE}} |
18
+
19
+ ## Schema
20
+
21
+ Allowed task-level status:
22
+
23
+ - `missing`: candidate file is absent.
24
+ - `pending-review`: candidate file exists, but human decision is not complete.
25
+ - `no-candidate-accepted`: human accepted the agent's no-candidate reason.
26
+ - `needs-promotion`: at least one candidate is queued for governance promotion.
27
+ - `promoted`: all accepted candidates were promoted to the agreed governance target.
28
+ - `rejected`: all candidates were rejected or archived with reasons.
29
+
30
+ Allowed row status:
31
+
32
+ - `ready-for-review`: agent believes this candidate may matter.
33
+ - `needs-promotion`: human marked the candidate worth preserving through dry-run promotion or a follow-up sedimentation task.
34
+ - `promoted`: maintenance CLI or an approved follow-up task promoted the candidate to the agreed governance target.
35
+ - `rejected`: human rejected the candidate with a reason.
36
+
37
+ Aggregation rule:
38
+
39
+ - Any `ready-for-review` row keeps task-level status `pending-review`.
40
+ - Any `needs-promotion` row sets task-level status `needs-promotion` unless another row is still `ready-for-review`.
41
+ - All rows `promoted` sets task-level status `promoted`.
42
+ - All rows `rejected` sets task-level status `rejected`.
43
+ - A no-candidate task must use task-level status `no-candidate-accepted` and fill `No-Candidate Reason`.
44
+
45
+ ## Candidates
46
+
47
+ | ID | Row Status | Title | Scope | Module Key | Detail Artifact | Boundary Reason | Why It Might Matter | Review Decision | Promotion Target | Conflict Check | Required Standard Update | Follow-up Task |
48
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
49
+
50
+ ## No-Candidate Reason
51
+
52
+ Not decided yet. Fill this only when review accepts that the task produced no reusable lesson candidate.
53
+
54
+ ## Promotion Notes
55
+
56
+ - If human review decides a candidate is worth preserving, mark the row `needs-promotion` and record the target governance location.
57
+ - If a candidate is marked `needs-promotion`, write the full task-local detail artifact while the source task context is fresh, then link it in `Detail Artifact`.
58
+ - Use `Scope` values `task`, `module`, or `global`; module-scoped candidates must fill `Module Key`.
59
+ - If human review rejects a candidate, mark the row `rejected` and keep the reason in the review decision.
60
+ - `needs-promotion` does not block task closeout, but it must remain visible in the maintenance queue and closeout record.
61
+ - Default promotion behavior is dry-run or follow-up-task first. Do not write a shared Lessons table; accepted candidates become promoted lesson detail docs.
62
+ - A sedimentation task must classify scope, check conflicts against existing lessons and standards, propose the target change, and report verification before applying.
63
+
64
+ ## Queue Routing
65
+
66
+ | Queue | When this task enters it | Exit condition |
67
+ | --- | --- | --- |
68
+ | Lessons | Any candidate is `ready-for-review` or `needs-promotion`. | Human rejects it, keeps it task-local, creates a sedimentation task, or approves promotion. |
69
+ | Missing Materials | The file is absent, has invalid status, or lacks a required no-candidate reason. | Agent repairs the candidate file. |
70
+ | Confirmed / Finalized | Human review is confirmed but a candidate still has deferred governance work. | Follow-up task or dry-run decision is recorded. |
@@ -0,0 +1,76 @@
1
+ # [Task Name] - Long-Running Task Contract
2
+
3
+ ## Goal
4
+
5
+ [State the single main problem this loop must close.]
6
+
7
+ ## Scope
8
+
9
+ ### In Scope
10
+
11
+ - [Allowed directories, modules, or capability surfaces]
12
+
13
+ ### Out of Scope
14
+
15
+ - [Items explicitly excluded from this loop]
16
+
17
+ ### Shared Files and Conflict Risk
18
+
19
+ - [Shared files that may conflict with other work, or none]
20
+
21
+ ## Primary Caller / Entry
22
+
23
+ - Primary caller: [CLI / local agent / UI / API / automation / integration / other]
24
+ - Entries this task must support: [list]
25
+ - Entries explicitly not required: [list]
26
+
27
+ ## Permission Boundaries
28
+
29
+ - Continuous execution allowed: yes / no
30
+ - Automatic review/fix/test loop allowed: yes / no
31
+ - Reviewer or subagent allowed: yes / no
32
+ - Must pause before: [high-risk actions]
33
+
34
+ ## Required Loop
35
+
36
+ 1. Re-read the goal, scope, and current findings.
37
+ 2. Choose the smallest complete fix for the current finding or phase.
38
+ 3. Implement within the allowed write scope.
39
+ 4. Run required verification.
40
+ 5. Update `progress.md` and `findings.md`.
41
+ 6. Run review when required and update `review.md`.
42
+ 7. Continue, stop, or pause based on the stop and pause conditions below.
43
+
44
+ ## Reviewer / Subagent Contract
45
+
46
+ - Reviewer scope: [files / modules / problem domain]
47
+ - Reviewer output: `review.md`
48
+ - Worker allowed to edit code: yes / no
49
+ - If a worker may edit, handoff must include worktree path, branch, commit SHA, checks, files changed, and residual risks.
50
+
51
+ ## Evidence
52
+
53
+ - [ ] Static checks: [command]
54
+ - [ ] Unit tests: [command]
55
+ - [ ] Integration or smoke tests: [command]
56
+ - [ ] Runtime verification: [URL / command / log]
57
+ - [ ] Review report: `review.md` / n/a
58
+ - [ ] Residual risks recorded: yes / no
59
+ - [ ] Lesson candidate review recorded: `lesson_candidates.md` uses `no-candidate-accepted`, `needs-promotion`, `promoted`, or `rejected`
60
+
61
+ ## Stop Conditions
62
+
63
+ - [ ] Goal is met.
64
+ - [ ] Scope was not exceeded.
65
+ - [ ] Required tests and regression gates pass or have documented waivers.
66
+ - [ ] Runtime, console, and request errors are clear or classified as accepted-risk with owner rationale.
67
+ - [ ] Review has no open P0/P1 material findings.
68
+ - [ ] Residual risks are routed to an owner and do not block the goal.
69
+
70
+ ## Pause Conditions
71
+
72
+ - [ ] Goal or scope becomes invalid.
73
+ - [ ] High-risk product, architecture, security, or data decision is required.
74
+ - [ ] Unknown uncommitted changes conflict with this work.
75
+ - [ ] Environment, permission, quota, or external dependency blocks progress.
76
+ - [ ] Reviewer finding changes task direction.
@@ -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.]