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
@@ -25,25 +25,35 @@ function parseFlowchart(code) {
25
25
  edges.push([from, to]);
26
26
  }
27
27
  if (nodes.size === 0) return null;
28
- return { nodes: [...nodes.entries()], edges };
28
+ const direction = (lines[0].match(/^flowchart\s+(LR|TB|TD|RL|BT)/i)?.[1] || "LR").toUpperCase();
29
+ return { direction, nodes: [...nodes.entries()], edges };
29
30
  }
30
31
 
31
- function renderSvg({ nodes, edges }) {
32
- const width = Math.max(360, nodes.length * 150);
33
- const height = 150;
34
- const positions = new Map(nodes.map(([id], index) => [id, { x: 70 + index * 140, y: 70 }]));
32
+ function renderSvg({ direction, nodes, edges }) {
33
+ const layout = layoutNodes(nodes, direction);
34
+ const { positions, width, height } = layout;
35
35
  const nodeSvg = nodes.map(([id, label]) => {
36
36
  const pos = positions.get(id);
37
+ const displayLabel = truncateLabel(label);
37
38
  return `<g class="mermaid-node">
38
- <rect x="${pos.x - 54}" y="${pos.y - 24}" width="108" height="48" rx="8"></rect>
39
- <text x="${pos.x}" y="${pos.y + 4}" text-anchor="middle">${escapeMermaid(label).replaceAll("\\n", " ")}</text>
39
+ <title>${escapeMermaid(label).replaceAll("\\n", " ")}</title>
40
+ <rect x="${pos.x - pos.width / 2}" y="${pos.y - 24}" width="${pos.width}" height="48" rx="8"></rect>
41
+ <text x="${pos.x}" y="${pos.y + 4}" text-anchor="middle">${escapeMermaid(displayLabel)}</text>
40
42
  </g>`;
41
43
  }).join("");
42
44
  const edgeSvg = edges.map(([from, to]) => {
43
45
  const a = positions.get(from);
44
46
  const b = positions.get(to);
45
47
  if (!a || !b) return "";
46
- return `<path class="mermaid-edge" d="M ${a.x + 54} ${a.y} L ${b.x - 62} ${b.y}"></path><path class="mermaid-arrow" d="M ${b.x - 62} ${b.y} l -7 -5 v 10 z"></path>`;
48
+ const horizontal = Math.abs(a.x - b.x) > Math.abs(a.y - b.y);
49
+ const startX = horizontal ? a.x + Math.sign(b.x - a.x) * (a.width / 2) : a.x;
50
+ const startY = horizontal ? a.y : a.y + Math.sign(b.y - a.y) * 24;
51
+ const endX = horizontal ? b.x - Math.sign(b.x - a.x) * (b.width / 2 + 8) : b.x;
52
+ const endY = horizontal ? b.y : b.y - Math.sign(b.y - a.y) * 32;
53
+ const arrow = horizontal
54
+ ? `M ${endX} ${endY} l ${b.x > a.x ? -7 : 7} -5 v 10 z`
55
+ : `M ${endX} ${endY} l -5 ${b.y > a.y ? -7 : 7} h 10 z`;
56
+ return `<path class="mermaid-edge" d="M ${startX} ${startY} L ${endX} ${endY}"></path><path class="mermaid-arrow" d="${arrow}"></path>`;
47
57
  }).join("");
48
58
  return `<figure class="mermaid-rendered">
49
59
  <figcaption>Mermaid</figcaption>
@@ -51,6 +61,46 @@ function renderSvg({ nodes, edges }) {
51
61
  </figure>`;
52
62
  }
53
63
 
64
+ function layoutNodes(nodes, direction) {
65
+ const vertical = ["TD", "TB", "BT"].includes(direction);
66
+ const nodeSizes = nodes.map(([id, label]) => [id, nodeWidth(label)]);
67
+ const positions = new Map();
68
+ const margin = 48;
69
+ const rowGap = 104;
70
+ const colGap = 34;
71
+ if (vertical) {
72
+ const maxWidth = Math.max(220, ...nodeSizes.map(([, width]) => width));
73
+ nodeSizes.forEach(([id, width], index) => {
74
+ positions.set(id, { x: margin + maxWidth / 2, y: margin + 24 + index * rowGap, width });
75
+ });
76
+ return { positions, width: maxWidth + margin * 2, height: Math.max(150, margin * 2 + nodeSizes.length * rowGap) };
77
+ }
78
+
79
+ const maxPerRow = nodes.length > 5 ? Math.ceil(Math.sqrt(nodes.length * 1.4)) : nodes.length;
80
+ let y = margin + 24;
81
+ let width = 360;
82
+ for (let index = 0; index < nodeSizes.length; index += maxPerRow) {
83
+ const row = nodeSizes.slice(index, index + maxPerRow);
84
+ let x = margin;
85
+ for (const [id, nodeW] of row) {
86
+ positions.set(id, { x: x + nodeW / 2, y, width: nodeW });
87
+ x += nodeW + colGap;
88
+ }
89
+ width = Math.max(width, x + margin - colGap);
90
+ y += rowGap;
91
+ }
92
+ return { positions, width, height: Math.max(150, y + margin - rowGap) };
93
+ }
94
+
95
+ function nodeWidth(label) {
96
+ return Math.max(112, Math.min(240, String(label || "").replaceAll("\\n", " ").length * 7 + 34));
97
+ }
98
+
99
+ function truncateLabel(label) {
100
+ const text = String(label || "").replaceAll("\\n", " ");
101
+ return text.length > 28 ? `${text.slice(0, 25)}...` : text;
102
+ }
103
+
54
104
  function escapeMermaid(value) {
55
105
  return String(value ?? "")
56
106
  .replaceAll("&", "&amp;")
@@ -0,0 +1,52 @@
1
+ # Development Context
2
+
3
+ Context Doc Type: development-index
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Purpose
9
+
10
+ This folder is the development input pack. It tells agents how to work in this repository, how to face external services during development, and what not to assume when the external repositories are unavailable.
11
+
12
+ ## Boundary
13
+
14
+ - Put local setup, codebase map, external service development summaries, mocks, stubs, and cross-repo debugging here.
15
+ - Put long-lived system structure in `docs/03-ARCHITECTURE/`.
16
+ - Put concrete API/event/webhook contracts in `docs/06-INTEGRATIONS/`.
17
+
18
+ ## Structure Contract
19
+
20
+ | File / Path | Facts to maintain | Write rule |
21
+ | --- | --- | --- |
22
+ | `local-setup.md` | Local startup, dependencies, environment variables, common failures | Development startup facts only; not production architecture |
23
+ | `codebase-map.md` | Local code entry points, directory responsibilities, read order | Agents read this before editing code |
24
+ | `external-context/<service-key>.md` | External service impact on local development, mocks/stubs, debug entry points | One external service per file |
25
+ | `external-source-packs/` | Large external source sets, indexes, digests, and projection status | Intake layer only; not the final fact layer |
26
+ | `stubs-and-mocks.md` | Available mock/stub strategies in this repository | Include executable paths or commands |
27
+ | `cross-repo-debugging.md` | Cross-repo debugging sequence and evidence | Debug workflow only; not a service responsibility overview |
28
+
29
+ ## External Service Rule
30
+
31
+ If this repository depends on multiple microservices, do not write all external knowledge into one large document. For any external service that affects local development or testing, create:
32
+
33
+ - `docs/03-ARCHITECTURE/services/<service-key>.md`: what the service is and what it owns.
34
+ - `docs/04-DEVELOPMENT/external-context/<service-key>.md`: how this repository mocks, stubs, or debugs it.
35
+ - `docs/06-INTEGRATIONS/<contract>.md`: concrete API/event/webhook contracts.
36
+
37
+ `04-DEVELOPMENT` only answers how to work with the external service during development. Do not maintain full system topology here, and do not put payload schemas here.
38
+
39
+ ## External Source Pack Rule
40
+
41
+ If an external team provides many documents, screenshots, exported packets, meeting notes, or links, do not place them directly into `03/04/06`. Read `docs/11-REFERENCE/external-source-intake-standard.md` first, then decide whether `external-source-packs/<source-key>/` is needed.
42
+
43
+ `external-source-packs/` owns source indexes, digests, and projection status only. Stable conclusions must be written back to:
44
+
45
+ - `docs/03-ARCHITECTURE/services/<service-key>.md`
46
+ - `docs/04-DEVELOPMENT/external-context/<service-key>.md`
47
+ - `docs/06-INTEGRATIONS/<contract>.md`
48
+
49
+ ## External Context Index
50
+
51
+ | Service Key | Why It Matters To This Repo | Local Stub / Mock | Debug Entry | Architecture Link | Contract Link | Last Verified | Confidence |
52
+ | --- | --- | --- | --- | --- | --- | --- | --- |
@@ -0,0 +1,11 @@
1
+ # Codebase Map
2
+
3
+ Context Doc Type: codebase-map
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Entry Points
9
+
10
+ | Area | Path | Responsibility | Read When | Source Evidence | Last Verified | Confidence |
11
+ | --- | --- | --- | --- | --- | --- | --- |
@@ -0,0 +1,18 @@
1
+ # Cross-Repo Debugging
2
+
3
+ Context Doc Type: cross-repo-debugging
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Debug Flow
9
+
10
+ 1. Identify the failing interface or flow.
11
+ 2. Read `docs/03-ARCHITECTURE/service-catalog.md` for ownership and upstream/downstream services.
12
+ 3. Read the matching `docs/06-INTEGRATIONS/` contract.
13
+ 4. Use the matching `docs/04-DEVELOPMENT/external-context/<service-key>.md` notes for mocks and local debugging.
14
+
15
+ ## Known Failure Modes
16
+
17
+ | Symptom | Likely Service | First Check | Source Evidence | Last Verified | Confidence |
18
+ | --- | --- | --- | --- | --- | --- |
@@ -0,0 +1,33 @@
1
+ # External Development Context: <service-key>
2
+
3
+ Context Doc Type: external-development-context
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Index Links
9
+
10
+ | Service Profile | Source Pack | Integration Contracts | Last Verified | Confidence |
11
+ | --- | --- | --- | --- | --- |
12
+ | `docs/03-ARCHITECTURE/services/<service-key>.md` | `docs/04-DEVELOPMENT/external-source-packs/<source-key>/README.md` or N/A | `docs/06-INTEGRATIONS/<contract>.md` | unknown | low |
13
+
14
+ ## Development Use
15
+
16
+ [What an agent needs to know about this external service while changing this repository.]
17
+
18
+ ## Do Not Assume
19
+
20
+ - [Assumption that is unsafe without checking the external repo or owner.]
21
+
22
+ ## Mocks / Stubs
23
+
24
+ | Scenario | Stub / Mock | Command or Path | Source Evidence |
25
+ | --- | --- | --- | --- |
26
+
27
+ ## Cross-Repo Debug Notes
28
+
29
+ [How to debug when this service is involved.]
30
+
31
+ ## Placement Rule
32
+
33
+ This file only covers local development, testing, and debugging context for this external service. Put service responsibility in `03-ARCHITECTURE`; put interface fields and schemas in `06-INTEGRATIONS`.
@@ -0,0 +1,24 @@
1
+ # External Source Packs
2
+
3
+ Context Doc Type: external-source-pack-registry
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Purpose
9
+
10
+ This directory is only for external source intake, indexing, and digests. Stable facts become Harness execution context only after they are projected into `03-ARCHITECTURE`, `04-DEVELOPMENT/external-context`, or `06-INTEGRATIONS`.
11
+
12
+ Read `docs/11-REFERENCE/external-source-intake-standard.md` before adding a source pack.
13
+
14
+ ## Source Packs
15
+
16
+ | Source Key | External Project / Service | Raw Storage Mode | Source Count | Digest Status | Projected To 03/04/06 | Owner | Last Verified | Confidence |
17
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
18
+
19
+ ## Placement Rule
20
+
21
+ - If there are fewer than 5 source documents, prefer linking them from `Source Evidence` in `03/04/06`; a source pack may be unnecessary.
22
+ - If the material is large, multi-topic, or expected to grow, create `<source-key>/README.md` and `digests/`.
23
+ - `raw/` may contain only commit-safe material with no secrets, personal data, or customer data.
24
+ - Non-committable material should be represented by external path, owner, access condition, and digest only.
@@ -0,0 +1,28 @@
1
+ # External Source Digest: <source-id>
2
+
3
+ Context Doc Type: external-source-digest
4
+ Source Pack: <source-key>
5
+ Original Location: <path-or-url-or-owner>
6
+ Digest Owner: project coordinator
7
+ Last Verified: unknown
8
+ Confidence: low
9
+
10
+ ## Source Summary
11
+
12
+ [Summarize what this source is, what it covers, how trustworthy it is, and when it was last updated in 5-10 lines.]
13
+
14
+ ## Extracted Facts
15
+
16
+ | Fact ID | Fact | Category | Project To | Source Evidence | Last Verified | Confidence |
17
+ | --- | --- | --- | --- | --- | --- | --- |
18
+ | F-001 | [verifiable fact] | architecture / development / integration / security / operations / product / unknown | `docs/...` or hold | <source-id> | unknown | low |
19
+
20
+ ## Questions / Unsafe Assumptions
21
+
22
+ | ID | Question Or Assumption | Why It Matters | Owner | Status |
23
+ | --- | --- | --- | --- | --- |
24
+
25
+ ## Projection Status
26
+
27
+ | Target Doc | Action | Status | Evidence |
28
+ | --- | --- | --- | --- |
@@ -0,0 +1,16 @@
1
+ # Local Setup
2
+
3
+ Context Doc Type: local-setup
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Commands
9
+
10
+ | Task | Command | Expected Result | Source Evidence | Last Verified | Confidence |
11
+ | --- | --- | --- | --- | --- | --- |
12
+
13
+ ## Environment
14
+
15
+ | Variable | Required | Purpose | Source Evidence |
16
+ | --- | --- | --- | --- |
@@ -0,0 +1,11 @@
1
+ # Stubs and Mocks
2
+
3
+ Context Doc Type: stubs-and-mocks
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Available Stubs
9
+
10
+ | External Service | Scenario | Stub Path | How To Run | Source Evidence | Last Verified | Confidence |
11
+ | --- | --- | --- | --- | --- | --- | --- |
@@ -0,0 +1,40 @@
1
+ # Integrations
2
+
3
+ Context Doc Type: integration-index
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Purpose
9
+
10
+ This folder owns concrete interface contracts: APIs, events, webhooks, SDK usage, third-party integrations, auth, payloads, errors, and contract tests.
11
+
12
+ ## Boundary
13
+
14
+ - Put service topology and ownership in `docs/03-ARCHITECTURE/`.
15
+ - Put development mocks and debugging notes in `docs/04-DEVELOPMENT/`.
16
+ - Put endpoint, payload, error, auth, event, webhook, and SDK contracts here.
17
+
18
+ ## Structure Contract
19
+
20
+ | File / Path | Facts to maintain | Write rule |
21
+ | --- | --- | --- |
22
+ | `<service-key>-api.md` | API endpoints, auth, payloads, errors, contract tests | Create from `api-contract.md` |
23
+ | `<event-name>-event.md` | Event producer/consumer, schema, delivery, retry | Create from `event-contract.md` |
24
+ | `<webhook-name>-webhook.md` | Webhook source, target, signature, payload, retry | Create from `webhook-contract.md` |
25
+ | `third-party/<vendor-key>.md` | Third-party platform, account/permission boundaries, SDK usage, limits | Create from `third-party/vendor-template.md` |
26
+
27
+ ## Contract Rule
28
+
29
+ Every interface contract must be its own file and link back to the related service:
30
+
31
+ - Service ownership and topology: `docs/03-ARCHITECTURE/service-catalog.md` or `services/<service-key>.md`
32
+ - Local mocks, stubs, and debugging: `docs/04-DEVELOPMENT/external-context/<service-key>.md`
33
+ - Concrete payloads, auth, errors, and contract tests: this folder
34
+
35
+ Do not mix multiple services into one large "integration notes" document. Multi-service systems should have multiple contract files; the Contract Index below is the navigation layer for humans and agents.
36
+
37
+ ## Contract Index
38
+
39
+ | Contract | Type | Producer | Consumer | Service Profile | Development Context | Contract Tests | Last Verified | Confidence |
40
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
@@ -0,0 +1,42 @@
1
+ # API Contract: <service-or-api>
2
+
3
+ Context Doc Type: api-contract
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Contract Type
9
+
10
+ API
11
+
12
+ ## Index Links
13
+
14
+ | Service Profile | Development Context | Contract Index | Last Verified | Confidence |
15
+ | --- | --- | --- | --- | --- |
16
+ | `docs/03-ARCHITECTURE/services/<service-key>.md` | `docs/04-DEVELOPMENT/external-context/<service-key>.md` | `docs/06-INTEGRATIONS/README.md` | unknown | low |
17
+
18
+ ## Auth
19
+
20
+ [Authentication and authorization requirements.]
21
+
22
+ ## Endpoints
23
+
24
+ | Method | Path | Purpose | Request Payload | Response Payload | Errors | Source Evidence | Last Verified | Confidence |
25
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
26
+
27
+ ## Payload
28
+
29
+ [Schema or link to schema.]
30
+
31
+ ## Errors
32
+
33
+ [Error codes, retry rules, and user-visible behavior.]
34
+
35
+ ## Contract Tests
36
+
37
+ | Test | Command / Path | Expected Result |
38
+ | --- | --- | --- |
39
+
40
+ ## Placement Rule
41
+
42
+ This file describes one API contract only. Put service responsibility in `03-ARCHITECTURE`; put local mock/stub/debug details in `04-DEVELOPMENT`.
@@ -0,0 +1,46 @@
1
+ # Event Contract: <event-name>
2
+
3
+ Context Doc Type: event-contract
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Contract Type
9
+
10
+ Event
11
+
12
+ ## Index Links
13
+
14
+ | Service Profile | Development Context | Contract Index | Last Verified | Confidence |
15
+ | --- | --- | --- | --- | --- |
16
+ | `docs/03-ARCHITECTURE/services/<service-key>.md` | `docs/04-DEVELOPMENT/external-context/<service-key>.md` | `docs/06-INTEGRATIONS/README.md` | unknown | low |
17
+
18
+ ## Topic / Channel
19
+
20
+ [Queue, topic, stream, or bus.]
21
+
22
+ ## Auth
23
+
24
+ [Producer/consumer permission, signature, or access control. Use N/A with evidence when no auth exists.]
25
+
26
+ ## Payload
27
+
28
+ [Event schema or link.]
29
+
30
+ ## Producers and Consumers
31
+
32
+ | Role | Service | Responsibility | Source Evidence |
33
+ | --- | --- | --- | --- |
34
+
35
+ ## Errors
36
+
37
+ [Dead-letter, retry, and compatibility behavior.]
38
+
39
+ ## Contract Tests
40
+
41
+ | Test | Command / Path | Expected Result |
42
+ | --- | --- | --- |
43
+
44
+ ## Placement Rule
45
+
46
+ This file describes one event contract only. Put service responsibility in `03-ARCHITECTURE`; put local mock/stub/debug details in `04-DEVELOPMENT`.
@@ -0,0 +1,42 @@
1
+ # Third-Party Integration: <vendor>
2
+
3
+ Context Doc Type: third-party-integration
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Contract Type
9
+
10
+ Third-party service
11
+
12
+ ## Index Links
13
+
14
+ | Service Profile | Development Context | Contract Index | Last Verified | Confidence |
15
+ | --- | --- | --- | --- | --- |
16
+ | `docs/03-ARCHITECTURE/services/<vendor-key>.md` | `docs/04-DEVELOPMENT/external-context/<vendor-key>.md` | `docs/06-INTEGRATIONS/README.md` | unknown | low |
17
+
18
+ ## Auth
19
+
20
+ [Credential and permission model. Do not include secrets.]
21
+
22
+ ## API / SDK Surface
23
+
24
+ | Surface | Purpose | Contract Link | Source Evidence | Last Verified | Confidence |
25
+ | --- | --- | --- | --- | --- | --- |
26
+
27
+ ## Payload
28
+
29
+ [Important request/response bodies or links.]
30
+
31
+ ## Errors
32
+
33
+ [Vendor error, quota, retry, and fallback behavior.]
34
+
35
+ ## Contract Tests
36
+
37
+ | Test | Command / Path | Expected Result |
38
+ | --- | --- | --- |
39
+
40
+ ## Placement Rule
41
+
42
+ This file describes one third-party integration only. Put account/permission/SDK/limit facts here; put business responsibility and system topology in `03-ARCHITECTURE`.
@@ -0,0 +1,41 @@
1
+ # Webhook Contract: <webhook-name>
2
+
3
+ Context Doc Type: webhook-contract
4
+ Owner: project coordinator
5
+ Last Verified: unknown
6
+ Confidence: low
7
+
8
+ ## Contract Type
9
+
10
+ Webhook
11
+
12
+ ## Index Links
13
+
14
+ | Service Profile | Development Context | Contract Index | Last Verified | Confidence |
15
+ | --- | --- | --- | --- | --- |
16
+ | `docs/03-ARCHITECTURE/services/<service-key>.md` | `docs/04-DEVELOPMENT/external-context/<service-key>.md` | `docs/06-INTEGRATIONS/README.md` | unknown | low |
17
+
18
+ ## Auth
19
+
20
+ [Signature, token, or IP allowlist.]
21
+
22
+ ## Payload
23
+
24
+ [Webhook body schema or link.]
25
+
26
+ ## Source Evidence
27
+
28
+ [Code, vendor docs, owner note, or discovery command.]
29
+
30
+ ## Errors
31
+
32
+ [Retry, timeout, and idempotency behavior.]
33
+
34
+ ## Contract Tests
35
+
36
+ | Test | Command / Path | Expected Result |
37
+ | --- | --- | --- |
38
+
39
+ ## Placement Rule
40
+
41
+ This file describes one webhook contract only. Put service responsibility in `03-ARCHITECTURE`; put local mock/stub/debug details in `04-DEVELOPMENT`.
@@ -2,38 +2,26 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- Track whether each meaningful task kept the harness contract intact: planning, scope control, SSoT updates, regression evidence, review, walkthrough, lessons, and reference routing.
5
+ Generated canonical task lifecycle index. Humans should use the Dashboard for current status; agents should use `task-list`, `task-index`, or this generated ledger for low-cost lookup.
6
6
 
7
- ## Status Legend
7
+ This file is not a hand-written work log. Do not edit lifecycle rows manually. Update task-local facts (`task_plan.md`, `progress.md`, `review.md`, `lesson_candidates.md`, closeout / walkthrough evidence), then run `harness governance rebuild --archive --apply`.
8
8
 
9
- | Status | Meaning | Required Next Step |
10
- | --- | --- | --- |
11
- | proposed | Work is identified but not accepted into active execution. | Assign an owner or reject with a reason. |
12
- | planned | Scope, owner, and expected evidence are known. | Start execution or update schedule. |
13
- | active | Work is in progress. | Keep task plan and evidence current. |
14
- | review | Implementation is complete and waiting for review or verification. | Complete review and regression gates. |
15
- | blocked | Work cannot proceed without a decision or dependency. | Record blocker owner and unblock condition. |
16
- | closed | Work is complete and closeout evidence exists. | Archive only when no longer operationally useful. |
17
- | archived | Entry is historical and no longer part of active coordination. | Keep a pointer to the archive location. |
9
+ Repo Governance / CI-CD changes remain routed through their reference standards and task evidence. Regression gates, delivery sequencing, cadence rules, closeout contracts, and module ownership remain in their dedicated governance files until explicitly replaced by equivalent scanner-supported facts.
18
10
 
19
11
  ## Active Ledger
20
12
 
21
- | ID | Task or Change | Owner | Status | Plan | Feature or Delivery SSoT | Regression Evidence | Review Evidence | Walkthrough | Lessons Check | Residual | Updated |
13
+ | ID | Scope | Module | Task | State | Queues | Plan | Review | Lessons Check | Closeout | Residual | Updated |
22
14
  | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
23
- | HL-YYYY-MM-DD-001 | Short operational title | owner | planned | docs/09-PLANNING/TASKS/.../task_plan.md | F-000 or D-000 | RG-000 or n/a | review.md or n/a | pending | pending | none | YYYY-MM-DD |
15
+ | HL-YYYY-MM-DD-001 | task | none | Short operational title | planned | none | docs/09-PLANNING/TASKS/.../task_plan.md | pending | pending | pending | none | YYYY-MM-DD |
24
16
 
25
- ## Routing Rules
17
+ ## Field Rules
26
18
 
27
- 1. Create or update one ledger row for every non-trivial feature, refactor, release, harness update, or multi-agent handoff.
28
- 2. Link to durable files and commands. Do not rely on chat history as evidence.
29
- 3. If a task changes product behavior, route it through Feature SSoT or Delivery SSoT.
30
- 4. If a task changes regression expectations, route it through Regression SSoT and Cadence Ledger.
31
- 5. If a task changes agent process, documentation standards, or repeatable checks, route it through Lessons SSoT.
32
- 6. A row can move to `closed` only when the walkthrough, regression evidence, review disposition, and lessons check are recorded.
19
+ - `Scope`: `task` for root planning tasks, `module` for module-local tasks.
20
+ - `Module`: module key, or `none`.
21
+ - `Queues`: scanner-derived lifecycle queues; query with `harness task-list --queue`.
22
+ - `Review`, `Lessons Check`, `Closeout`, and `Residual`: scanner-derived summaries and routes. Detailed evidence stays in task-local files.
23
+ - `Updated`: generation date, not a manual edit timestamp.
33
24
 
34
- ## Archive Rules
25
+ ## Legacy Tables
35
26
 
36
- - Keep active, blocked, review, and recently closed rows in this file.
37
- - Move old closed rows to `docs/01-GOVERNANCE/archive/` or the project archive path when they no longer affect current coordination.
38
- - Preserve the ledger ID, final status, closeout link, and archive date in any archive entry.
39
- - Never delete a row to hide skipped verification, `accepted-risk`, or unresolved review feedback.
27
+ `Feature-SSoT.md` and `Private-Feature-SSoT.md` are legacy task lifecycle projections. Current Harness versions archive them during `harness governance rebuild --archive --apply` and do not regenerate them.
@@ -39,7 +39,7 @@ Describe the recurring architecture, ownership, phase-gate, or operating-process
39
39
  ## Acceptance Criteria
40
40
 
41
41
  - The new rule has a durable home in a reference, template, checker, or project operating model.
42
- - The Lessons SSoT row links this detail doc and the applied change.
42
+ - This promoted lesson detail doc links the applied change and the closeout record.
43
43
  - Existing active tasks know whether the new rule applies immediately or only to future work.
44
44
 
45
45
  ## Disposition
@@ -43,7 +43,7 @@ Describe the missing reference document, template, checklist, or operating guide
43
43
 
44
44
  - The new document exists at the target path and is linked from the relevant index or entrypoint.
45
45
  - The document contains operational rules, not background essay content.
46
- - The Lessons SSoT row links this detail doc and the new document.
46
+ - This promoted lesson detail doc links the new document and the closeout record.
47
47
 
48
48
  ## Disposition
49
49
 
@@ -37,7 +37,7 @@ ref-change
37
37
  ## Acceptance Criteria
38
38
 
39
39
  - The target reference, template, or checker is updated.
40
- - The update is linked from Lessons SSoT.
40
+ - The update is linked from this promoted lesson detail doc and the closeout record.
41
41
  - Any active task affected by the rule has a migration or no-impact note.
42
42
 
43
43
  ## Disposition
@@ -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.