agentlock-harness 0.0.0-stage → 0.1.0

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 (279) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +211 -2
  3. package/README.zh-CN.md +211 -0
  4. package/RELEASE_NOTES.md +35 -0
  5. package/bin/agentlock-harness.mjs +249 -0
  6. package/harness-templates/en-US/common/CLAUDE.md.tmpl +7 -0
  7. package/harness-templates/en-US/common/GEMINI.md.tmpl +7 -0
  8. package/harness-templates/en-US/common/agentlock-harness.json.tmpl +45 -0
  9. package/harness-templates/en-US/common/claude-settings.json +36 -0
  10. package/harness-templates/en-US/common/codex-config.toml.tmpl +11 -0
  11. package/harness-templates/en-US/common/copilot-instructions.md.tmpl +3 -0
  12. package/harness-templates/en-US/common/gemini-settings.json +42 -0
  13. package/harness-templates/en-US/common/git-hooks/pre-commit +24 -0
  14. package/harness-templates/en-US/common/git-hooks/pre-push +11 -0
  15. package/harness-templates/en-US/common/harness-gitignore +3 -0
  16. package/harness-templates/en-US/common/hooks/post-edit-check.mjs +57 -0
  17. package/harness-templates/en-US/common/hooks/pre-tool-guard.mjs +122 -0
  18. package/harness-templates/en-US/common/hooks/rules-drift-check.mjs +69 -0
  19. package/harness-templates/en-US/common/hooks/staged-guard.mjs +197 -0
  20. package/harness-templates/en-US/common/hooks/stop-gate.mjs +164 -0
  21. package/harness-templates/en-US/common/rules/00-testing-integrity.md +11 -0
  22. package/harness-templates/en-US/common/rules/01-security-boundaries.md +11 -0
  23. package/harness-templates/en-US/common/skills/atomic-tdd/SKILL.md +21 -0
  24. package/harness-templates/en-US/common/skills/brainstorming/SKILL.md +24 -0
  25. package/harness-templates/en-US/common/skills/code-grounding/SKILL.md +20 -0
  26. package/harness-templates/en-US/common/skills/cross-model-review/SKILL.md +22 -0
  27. package/harness-templates/en-US/common/skills/worktree-isolation/SKILL.md +19 -0
  28. package/harness-templates/en-US/dual-core/HARNESS_GUIDE.md +19 -0
  29. package/harness-templates/en-US/dual-core/scripts/cross-review.mjs +141 -0
  30. package/harness-templates/en-US/enterprise-platform/ci/agentlock-harness-gate.yml +32 -0
  31. package/harness-templates/en-US/enterprise-platform/governance/mcp-gateway.template.json +18 -0
  32. package/harness-templates/en-US/enterprise-platform/governance/policy.json +26 -0
  33. package/harness-templates/en-US/ralph-factory/PROMPT.loop.md.tmpl +12 -0
  34. package/harness-templates/en-US/ralph-factory/SPRINT_CONTRACT.md.tmpl +25 -0
  35. package/harness-templates/en-US/ralph-factory/sandbox/Dockerfile.sandbox +13 -0
  36. package/harness-templates/en-US/ralph-factory/sandbox/docker-compose.sandbox.yml +22 -0
  37. package/harness-templates/en-US/ralph-factory/sandbox/run-sandbox-loop.sh +8 -0
  38. package/harness-templates/zh-CN/common/CLAUDE.md.tmpl +7 -0
  39. package/harness-templates/zh-CN/common/GEMINI.md.tmpl +7 -0
  40. package/harness-templates/zh-CN/common/agentlock-harness.json.tmpl +45 -0
  41. package/harness-templates/zh-CN/common/claude-settings.json +36 -0
  42. package/harness-templates/zh-CN/common/codex-config.toml.tmpl +11 -0
  43. package/harness-templates/zh-CN/common/copilot-instructions.md.tmpl +3 -0
  44. package/harness-templates/zh-CN/common/gemini-settings.json +42 -0
  45. package/harness-templates/zh-CN/common/git-hooks/pre-commit +24 -0
  46. package/harness-templates/zh-CN/common/git-hooks/pre-push +11 -0
  47. package/harness-templates/zh-CN/common/harness-gitignore +3 -0
  48. package/harness-templates/zh-CN/common/hooks/post-edit-check.mjs +57 -0
  49. package/harness-templates/zh-CN/common/hooks/pre-tool-guard.mjs +122 -0
  50. package/harness-templates/zh-CN/common/hooks/rules-drift-check.mjs +69 -0
  51. package/harness-templates/zh-CN/common/hooks/staged-guard.mjs +197 -0
  52. package/harness-templates/zh-CN/common/hooks/stop-gate.mjs +164 -0
  53. package/harness-templates/zh-CN/common/rules/00-testing-integrity.md +11 -0
  54. package/harness-templates/zh-CN/common/rules/01-security-boundaries.md +11 -0
  55. package/harness-templates/zh-CN/common/skills/atomic-tdd/SKILL.md +21 -0
  56. package/harness-templates/zh-CN/common/skills/brainstorming/SKILL.md +24 -0
  57. package/harness-templates/zh-CN/common/skills/code-grounding/SKILL.md +20 -0
  58. package/harness-templates/zh-CN/common/skills/cross-model-review/SKILL.md +22 -0
  59. package/harness-templates/zh-CN/common/skills/worktree-isolation/SKILL.md +19 -0
  60. package/harness-templates/zh-CN/dual-core/HARNESS_GUIDE.md +19 -0
  61. package/harness-templates/zh-CN/dual-core/scripts/cross-review.mjs +141 -0
  62. package/harness-templates/zh-CN/enterprise-platform/ci/agentlock-harness-gate.yml +32 -0
  63. package/harness-templates/zh-CN/enterprise-platform/governance/mcp-gateway.template.json +18 -0
  64. package/harness-templates/zh-CN/enterprise-platform/governance/policy.json +26 -0
  65. package/harness-templates/zh-CN/ralph-factory/PROMPT.loop.md.tmpl +12 -0
  66. package/harness-templates/zh-CN/ralph-factory/SPRINT_CONTRACT.md.tmpl +25 -0
  67. package/harness-templates/zh-CN/ralph-factory/sandbox/Dockerfile.sandbox +13 -0
  68. package/harness-templates/zh-CN/ralph-factory/sandbox/docker-compose.sandbox.yml +22 -0
  69. package/harness-templates/zh-CN/ralph-factory/sandbox/run-sandbox-loop.sh +8 -0
  70. package/package.json +64 -4
  71. package/scripts/bootstrap.ps1 +13 -0
  72. package/scripts/bootstrap.sh +23 -0
  73. package/src/cli/colors.mjs +42 -0
  74. package/src/cli/commands/adopt.mjs +378 -0
  75. package/src/cli/commands/change.mjs +92 -0
  76. package/src/cli/commands/doctor.mjs +56 -0
  77. package/src/cli/commands/eval.mjs +193 -0
  78. package/src/cli/commands/hooks.mjs +97 -0
  79. package/src/cli/commands/init.mjs +231 -0
  80. package/src/cli/commands/passthrough.mjs +27 -0
  81. package/src/cli/commands/ralph.mjs +208 -0
  82. package/src/cli/commands/rules.mjs +73 -0
  83. package/src/cli/commands/stats.mjs +71 -0
  84. package/src/cli/commands/task.mjs +123 -0
  85. package/src/cli/commands/ui.mjs +84 -0
  86. package/src/cli/commands/verify.mjs +267 -0
  87. package/src/cli/prompt.mjs +55 -0
  88. package/src/core/adopt.mjs +807 -0
  89. package/src/core/agent-runner.mjs +118 -0
  90. package/src/core/audit.mjs +181 -0
  91. package/src/core/catalog.mjs +160 -0
  92. package/src/core/change-flow.mjs +344 -0
  93. package/src/core/detector.mjs +141 -0
  94. package/src/core/doc-drift.mjs +94 -0
  95. package/src/core/eval-fixtures.mjs +676 -0
  96. package/src/core/eval-frontier-fixtures.mjs +657 -0
  97. package/src/core/eval-hard-fixtures.mjs +923 -0
  98. package/src/core/eval-runner.mjs +754 -0
  99. package/src/core/eval-telemetry.mjs +338 -0
  100. package/src/core/harness-writer.mjs +286 -0
  101. package/src/core/installer.mjs +42 -0
  102. package/src/core/rules-compiler.mjs +356 -0
  103. package/src/core/task-ledger.mjs +327 -0
  104. package/src/core/version.mjs +10 -0
  105. package/src/ui/public/app.mjs +2199 -0
  106. package/src/ui/public/index.html +203 -0
  107. package/src/ui/public/styles.css +1200 -0
  108. package/src/ui/server.mjs +457 -0
  109. package/src/ui/service.mjs +860 -0
  110. package/templates/en-US/AGENTS.md +38 -0
  111. package/templates/en-US/DOCS_MAINTENANCE.md +65 -0
  112. package/templates/en-US/MIGRATION.md +46 -0
  113. package/templates/en-US/NEW_PROJECT_CHECKLIST.md +46 -0
  114. package/templates/en-US/README.md +41 -0
  115. package/templates/en-US/SESSION.md +29 -0
  116. package/templates/en-US/docs/00-context.md +38 -0
  117. package/templates/en-US/docs/01-vision/README.md +36 -0
  118. package/templates/en-US/docs/02-requirements/PRD.md +24 -0
  119. package/templates/en-US/docs/02-requirements/glossary.md +20 -0
  120. package/templates/en-US/docs/02-requirements/use-cases.md +36 -0
  121. package/templates/en-US/docs/03-architecture/composite-ai-framework.md +36 -0
  122. package/templates/en-US/docs/03-architecture/integration-architecture.md +36 -0
  123. package/templates/en-US/docs/03-architecture/system-architecture.md +16 -0
  124. package/templates/en-US/docs/04-design/README.md +21 -0
  125. package/templates/en-US/docs/04-design/a2a-integration-spec.md +36 -0
  126. package/templates/en-US/docs/04-design/agent-specs.md +36 -0
  127. package/templates/en-US/docs/04-design/data-model.md +18 -0
  128. package/templates/en-US/docs/04-design/external-api-spec.md +26 -0
  129. package/templates/en-US/docs/04-design/mcp-interface-spec.md +36 -0
  130. package/templates/en-US/docs/04-design/phase1-minimal-implementation-interfaces.md +36 -0
  131. package/templates/en-US/docs/04-design/responsibility-model.md +36 -0
  132. package/templates/en-US/docs/04-design/runtime-control-plane-spec.md +36 -0
  133. package/templates/en-US/docs/04-design/safety-governance.md +18 -0
  134. package/templates/en-US/docs/04-design/sample-scenarios-architecture-refinement.md +20 -0
  135. package/templates/en-US/docs/04-design/skill-syntax-spec.md +36 -0
  136. package/templates/en-US/docs/04-design/storage-schema.md +18 -0
  137. package/templates/en-US/docs/04-design/task-capability-architecture-and-evolution.md +36 -0
  138. package/templates/en-US/docs/05-project/adr/ADR-000-template.md +32 -0
  139. package/templates/en-US/docs/05-project/adr/README.md +15 -0
  140. package/templates/en-US/docs/05-project/doc-code-map.md +17 -0
  141. package/templates/en-US/docs/05-project/evolution-backlog.md +14 -0
  142. package/templates/en-US/docs/05-project/feature-registry.md +16 -0
  143. package/templates/en-US/docs/05-project/master-delivery-tracker.md +14 -0
  144. package/templates/en-US/docs/05-project/risk-register.md +36 -0
  145. package/templates/en-US/docs/05-project/roadmap.md +36 -0
  146. package/templates/en-US/docs/05-project/stage-view.md +14 -0
  147. package/templates/en-US/docs/05-project/tech-stack.md +36 -0
  148. package/templates/en-US/docs/06-dev-guide/SPEC.md +18 -0
  149. package/templates/en-US/docs/06-dev-guide/coding-standards.md +36 -0
  150. package/templates/en-US/docs/06-dev-guide/deployment-architecture.md +20 -0
  151. package/templates/en-US/docs/06-dev-guide/project-scaffold.md +16 -0
  152. package/templates/en-US/docs/06-dev-guide/testing-strategy.md +42 -0
  153. package/templates/en-US/docs/07-frontend/README.md +36 -0
  154. package/templates/en-US/docs/07-frontend/user-personas.md +36 -0
  155. package/templates/en-US/docs/08-process/README.md +27 -0
  156. package/templates/en-US/docs/08-process/ai-collaboration-protocol.md +28 -0
  157. package/templates/en-US/docs/08-process/autopilot.md +18 -0
  158. package/templates/en-US/docs/08-process/code-grounding.md +32 -0
  159. package/templates/en-US/docs/08-process/context-loading-strategy.md +35 -0
  160. package/templates/en-US/docs/08-process/conventions.md +75 -0
  161. package/templates/en-US/docs/08-process/debugging.md +25 -0
  162. package/templates/en-US/docs/08-process/design-gate.md +22 -0
  163. package/templates/en-US/docs/08-process/git-protocol.md +20 -0
  164. package/templates/en-US/docs/08-process/multi-agent-orchestration.md +27 -0
  165. package/templates/en-US/docs/08-process/planning.md +18 -0
  166. package/templates/en-US/docs/08-process/project-intake.md +47 -0
  167. package/templates/en-US/docs/08-process/reflection.md +18 -0
  168. package/templates/en-US/docs/08-process/review.md +30 -0
  169. package/templates/en-US/docs/08-process/session-handoff.md +27 -0
  170. package/templates/en-US/docs/08-process/tdd.md +24 -0
  171. package/templates/en-US/docs/08-process/tool-execution.md +32 -0
  172. package/templates/en-US/docs/08-process/workflow-contract.md +46 -0
  173. package/templates/en-US/docs/08-process/workflow.md +23 -0
  174. package/templates/en-US/docs/README.md +58 -0
  175. package/templates/en-US/docs/design-checklist.md +36 -0
  176. package/templates/en-US/docs/discussions/README.md +13 -0
  177. package/templates/en-US/docs/plans/README.md +13 -0
  178. package/templates/en-US/docs/proposed-design/README.md +13 -0
  179. package/templates/en-US/docs/temp-reference/README.md +11 -0
  180. package/templates/en-US/docs.config.json +46 -0
  181. package/templates/en-US/profiles/README.md +23 -0
  182. package/templates/en-US/profiles/agent-platform/README.md +23 -0
  183. package/templates/en-US/profiles/cli-tool/README.md +23 -0
  184. package/templates/en-US/profiles/library-sdk/README.md +23 -0
  185. package/templates/en-US/profiles/multi-agent/README.md +23 -0
  186. package/templates/en-US/profiles/profiles.json +31 -0
  187. package/templates/en-US/profiles/software-automation/README.md +23 -0
  188. package/templates/en-US/profiles/web-saas/README.md +23 -0
  189. package/templates/en-US/scripts/README.md +89 -0
  190. package/templates/en-US/scripts/doc-find.mjs +156 -0
  191. package/templates/en-US/scripts/doc-map.mjs +50 -0
  192. package/templates/en-US/scripts/doc-tools.mjs +311 -0
  193. package/templates/en-US/scripts/init-docs.mjs +214 -0
  194. package/templates/en-US/scripts/validate-docs.mjs +141 -0
  195. package/templates/zh-CN/AGENTS.md +38 -0
  196. package/templates/zh-CN/DOCS_MAINTENANCE.md +77 -0
  197. package/templates/zh-CN/MIGRATION.md +45 -0
  198. package/templates/zh-CN/NEW_PROJECT_CHECKLIST.md +54 -0
  199. package/templates/zh-CN/README.md +55 -0
  200. package/templates/zh-CN/SESSION.md +29 -0
  201. package/templates/zh-CN/docs/00-context.md +42 -0
  202. package/templates/zh-CN/docs/01-vision/README.md +33 -0
  203. package/templates/zh-CN/docs/02-requirements/PRD.md +26 -0
  204. package/templates/zh-CN/docs/02-requirements/glossary.md +35 -0
  205. package/templates/zh-CN/docs/02-requirements/use-cases.md +31 -0
  206. package/templates/zh-CN/docs/03-architecture/composite-ai-framework.md +27 -0
  207. package/templates/zh-CN/docs/03-architecture/integration-architecture.md +30 -0
  208. package/templates/zh-CN/docs/03-architecture/system-architecture.md +26 -0
  209. package/templates/zh-CN/docs/04-design/README.md +21 -0
  210. package/templates/zh-CN/docs/04-design/a2a-integration-spec.md +45 -0
  211. package/templates/zh-CN/docs/04-design/agent-specs.md +46 -0
  212. package/templates/zh-CN/docs/04-design/data-model.md +18 -0
  213. package/templates/zh-CN/docs/04-design/external-api-spec.md +34 -0
  214. package/templates/zh-CN/docs/04-design/mcp-interface-spec.md +44 -0
  215. package/templates/zh-CN/docs/04-design/phase1-minimal-implementation-interfaces.md +38 -0
  216. package/templates/zh-CN/docs/04-design/responsibility-model.md +37 -0
  217. package/templates/zh-CN/docs/04-design/runtime-control-plane-spec.md +47 -0
  218. package/templates/zh-CN/docs/04-design/safety-governance.md +18 -0
  219. package/templates/zh-CN/docs/04-design/sample-scenarios-architecture-refinement.md +38 -0
  220. package/templates/zh-CN/docs/04-design/skill-syntax-spec.md +43 -0
  221. package/templates/zh-CN/docs/04-design/storage-schema.md +18 -0
  222. package/templates/zh-CN/docs/04-design/task-capability-architecture-and-evolution.md +46 -0
  223. package/templates/zh-CN/docs/05-project/adr/ADR-000-template.md +34 -0
  224. package/templates/zh-CN/docs/05-project/adr/README.md +35 -0
  225. package/templates/zh-CN/docs/05-project/doc-code-map.md +19 -0
  226. package/templates/zh-CN/docs/05-project/evolution-backlog.md +14 -0
  227. package/templates/zh-CN/docs/05-project/feature-registry.md +16 -0
  228. package/templates/zh-CN/docs/05-project/master-delivery-tracker.md +14 -0
  229. package/templates/zh-CN/docs/05-project/risk-register.md +21 -0
  230. package/templates/zh-CN/docs/05-project/roadmap.md +31 -0
  231. package/templates/zh-CN/docs/05-project/stage-view.md +14 -0
  232. package/templates/zh-CN/docs/05-project/tech-stack.md +36 -0
  233. package/templates/zh-CN/docs/06-dev-guide/SPEC.md +24 -0
  234. package/templates/zh-CN/docs/06-dev-guide/coding-standards.md +29 -0
  235. package/templates/zh-CN/docs/06-dev-guide/deployment-architecture.md +22 -0
  236. package/templates/zh-CN/docs/06-dev-guide/project-scaffold.md +16 -0
  237. package/templates/zh-CN/docs/06-dev-guide/testing-strategy.md +46 -0
  238. package/templates/zh-CN/docs/07-frontend/README.md +29 -0
  239. package/templates/zh-CN/docs/07-frontend/user-personas.md +27 -0
  240. package/templates/zh-CN/docs/08-process/README.md +29 -0
  241. package/templates/zh-CN/docs/08-process/ai-collaboration-protocol.md +30 -0
  242. package/templates/zh-CN/docs/08-process/autopilot.md +18 -0
  243. package/templates/zh-CN/docs/08-process/code-grounding.md +40 -0
  244. package/templates/zh-CN/docs/08-process/context-loading-strategy.md +35 -0
  245. package/templates/zh-CN/docs/08-process/conventions.md +77 -0
  246. package/templates/zh-CN/docs/08-process/debugging.md +27 -0
  247. package/templates/zh-CN/docs/08-process/design-gate.md +22 -0
  248. package/templates/zh-CN/docs/08-process/git-protocol.md +20 -0
  249. package/templates/zh-CN/docs/08-process/multi-agent-orchestration.md +27 -0
  250. package/templates/zh-CN/docs/08-process/planning.md +18 -0
  251. package/templates/zh-CN/docs/08-process/project-intake.md +53 -0
  252. package/templates/zh-CN/docs/08-process/reflection.md +18 -0
  253. package/templates/zh-CN/docs/08-process/review.md +30 -0
  254. package/templates/zh-CN/docs/08-process/session-handoff.md +29 -0
  255. package/templates/zh-CN/docs/08-process/tdd.md +24 -0
  256. package/templates/zh-CN/docs/08-process/tool-execution.md +34 -0
  257. package/templates/zh-CN/docs/08-process/workflow-contract.md +48 -0
  258. package/templates/zh-CN/docs/08-process/workflow.md +23 -0
  259. package/templates/zh-CN/docs/README.md +62 -0
  260. package/templates/zh-CN/docs/design-checklist.md +18 -0
  261. package/templates/zh-CN/docs/discussions/README.md +36 -0
  262. package/templates/zh-CN/docs/plans/README.md +15 -0
  263. package/templates/zh-CN/docs/proposed-design/README.md +41 -0
  264. package/templates/zh-CN/docs/temp-reference/README.md +13 -0
  265. package/templates/zh-CN/docs.config.json +46 -0
  266. package/templates/zh-CN/profiles/README.md +23 -0
  267. package/templates/zh-CN/profiles/agent-platform/README.md +23 -0
  268. package/templates/zh-CN/profiles/cli-tool/README.md +23 -0
  269. package/templates/zh-CN/profiles/library-sdk/README.md +23 -0
  270. package/templates/zh-CN/profiles/multi-agent/README.md +23 -0
  271. package/templates/zh-CN/profiles/profiles.json +31 -0
  272. package/templates/zh-CN/profiles/software-automation/README.md +23 -0
  273. package/templates/zh-CN/profiles/web-saas/README.md +23 -0
  274. package/templates/zh-CN/scripts/README.md +97 -0
  275. package/templates/zh-CN/scripts/doc-find.mjs +156 -0
  276. package/templates/zh-CN/scripts/doc-map.mjs +50 -0
  277. package/templates/zh-CN/scripts/doc-tools.mjs +311 -0
  278. package/templates/zh-CN/scripts/init-docs.mjs +214 -0
  279. package/templates/zh-CN/scripts/validate-docs.mjs +141 -0
@@ -0,0 +1,42 @@
1
+ ---
2
+ status: Draft
3
+ owner: project-owner
4
+ ---
5
+
6
+ # Validation strategy
7
+
8
+ Use the real stack, impact, and environment. Reuse existing test systems rather than creating parallel machinery for agents.
9
+
10
+ | Behavior / risk | Existing check | Input / environment | Pass criteria | Limits |
11
+ |---|---|---|---|---|
12
+ | TBD | TBD | TBD | TBD | TBD |
13
+
14
+ ## Choose relevant scope
15
+
16
+ Local fixes need behavioral and affected regression checks. Interface changes need consumers and compatibility. Permissions, persistence, concurrency, and recovery need invariants and failure paths. Cross-component changes require suitable integration evidence, with manual, hardware, or external acceptance where applicable.
17
+
18
+ ## What evidence establishes
19
+
20
+ | Evidence | Can support | Cannot replace |
21
+ |---|---|---|
22
+ | Static text / schema checks | Checked symbols, fields, and structure | Actual execution, connection, effects |
23
+ | Running production functions | Behavior for specific inputs | External behavior isolated by test doubles |
24
+ | Component integration | Covered cooperating modules | Unconnected environments or versions |
25
+ | Build / resource measurement | Toolchain, artifact, resource constraints | User flows or external acceptance |
26
+ | Real-environment acceptance | Tested version, scenario, environment | Universal guarantees |
27
+
28
+ Call production implementations and place doubles only at necessary dependency boundaries. Testing a copied algorithm does not validate the product. Do not weaken assertions or acceptance to get green results.
29
+
30
+ ## Results and reuse
31
+
32
+ Record revision or input fingerprints, relevant dirty differences, dependencies, configuration, environment, actual command, result, and scope. Writing a test is not executing it; skipped or blocked checks are not passes.
33
+
34
+ Reuse evidence only when relevant conditions still match. Otherwise rerun affected checks or state uncertainty. Avoid repeating unrelated suites after sufficient checks.
35
+
36
+ When real infrastructure is unavailable, complete applicable logic, simulation, and builds while retaining explicit acceptance gaps in the original task. Do not turn simulation into real-environment proof or lower a failed quality / resource threshold.
37
+
38
+ ## Handoff and cross-module scenarios
39
+
40
+ Observe representative tasks for implementation discovery, avoided duplication, stale-snapshot detection, and honest partial completion. Quality and rework matter more than raw tool-call reduction.
41
+
42
+ For a few consequential flows record preconditions, module behavior, observable effects, evidence, and gaps. Include relevant failure, duplicate, delayed, restart, and partial-success cases. Separate test data and effects; use isolated fixtures where practical. UI success alone does not establish data invariants or complete integration.
@@ -0,0 +1,36 @@
1
+ ---
2
+ status: Draft
3
+ owner: project-owner
4
+ ---
5
+
6
+ # Frontend
7
+
8
+ ## Purpose
9
+
10
+ Describe the current authority, scope, constraints, and validation expectations for this topic.
11
+
12
+ ## Scope
13
+
14
+ - In scope: TBD
15
+ - Out of scope: TBD
16
+ - Related features: F-xxx
17
+ - Related code paths: add relevant root-relative `code_refs` only when useful
18
+
19
+ ## Recommended Content
20
+
21
+ - Current decisions and assumptions
22
+ - Inputs, outputs, and boundaries
23
+ - Acceptance criteria or validation method
24
+ - Links to related authority docs
25
+
26
+ ## Open Questions
27
+
28
+ | ID | Question | Owner | Status |
29
+ |----|----------|-------|--------|
30
+ | Q-001 | TBD | TBD | open |
31
+
32
+ ## Maintenance
33
+
34
+ - Record an actual verification baseline when this document is enabled or its relevant basis changes; do not refresh dates for unchanged content.
35
+ - Use an existing scope source; enable a feature registry only when needed.
36
+ - Do not duplicate shared Status / Track / Risk definitions; reference `docs/08-process/conventions.md`.
@@ -0,0 +1,36 @@
1
+ ---
2
+ status: Draft
3
+ owner: project-owner
4
+ ---
5
+
6
+ # User Personas
7
+
8
+ ## Purpose
9
+
10
+ Describe the current authority, scope, constraints, and validation expectations for this topic.
11
+
12
+ ## Scope
13
+
14
+ - In scope: TBD
15
+ - Out of scope: TBD
16
+ - Related features: F-xxx
17
+ - Related code paths: add relevant root-relative `code_refs` only when useful
18
+
19
+ ## Recommended Content
20
+
21
+ - Current decisions and assumptions
22
+ - Inputs, outputs, and boundaries
23
+ - Acceptance criteria or validation method
24
+ - Links to related authority docs
25
+
26
+ ## Open Questions
27
+
28
+ | ID | Question | Owner | Status |
29
+ |----|----------|-------|--------|
30
+ | Q-001 | TBD | TBD | open |
31
+
32
+ ## Maintenance
33
+
34
+ - Record an actual verification baseline when this document is enabled or its relevant basis changes; do not refresh dates for unchanged content.
35
+ - Use an existing scope source; enable a feature registry only when needed.
36
+ - Do not duplicate shared Status / Track / Risk definitions; reference `docs/08-process/conventions.md`.
@@ -0,0 +1,27 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ ---
6
+
7
+ # On-demand process library
8
+
9
+ AGENTS contains default work principles. Use these independent methods for specific problems; no agent product or plugin is required.
10
+
11
+ | Situation | Reference |
12
+ |---|---|
13
+ | Missing background affects direction | [Project intake](project-intake.md) |
14
+ | Status, evidence, authorization | [Conventions](conventions.md) |
15
+ | Existing capability and active implementation | [Code grounding](code-grounding.md) |
16
+ | Handoff or a new executor | [Session recovery](session-handoff.md) |
17
+ | Excessive background reading | [Context loading](context-loading-strategy.md) |
18
+ | More collaboration detail | [Collaboration](ai-collaboration-protocol.md) |
19
+ | Cross-module design and planning | [Design check](design-gate.md), [planning](planning.md), [workflow](workflow.md) |
20
+ | No suitable task carrier | [Optional task record](workflow-contract.md) |
21
+ | Defect or regression | [Debugging](debugging.md), [testing](tdd.md) |
22
+ | Review or commit | [Review](review.md), [Git](git-protocol.md) |
23
+ | Repeated operations or uncertain results | [Tools and receipts](tool-execution.md) |
24
+ | Explicitly authorized parallel or continuous work | [Parallel work](multi-agent-orchestration.md), [continuous work](autopilot.md) |
25
+ | Repeated failure or process overhead | [Process improvement](reflection.md) |
26
+
27
+ Links are not automatic reading instructions. Reserve must_read_with for indispensable prerequisites and prohibit cycles. External skills or tools cannot independently add scope, permissions, ledgers, or hidden gates. Evaluate changes through actual task results.
@@ -0,0 +1,28 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Needing more detail for code-grounded work and handoff
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Collaboration method
11
+
12
+ AGENTS contains the default principles. Read this only when further detail helps.
13
+
14
+ ## Establish the basis
15
+
16
+ Confirm goal, acceptance, workspace, and existing changes. Find related code and accepted constraints through the task route. A small task needs a brief statement; complex work benefits from explicit impact and unknowns.
17
+
18
+ Trace active implementation and tests, including registration, flags, generation, and legacy paths. Explain why current capability is insufficient before adding another solution. Use [code grounding](code-grounding.md) if needed, without loading the whole library.
19
+
20
+ ## Implement
21
+
22
+ Choose methods and checks within authorization. Expected paths can change as investigation proceeds; new external effects or changed constraints require checking authority and impact.
23
+
24
+ Separate changed requirements, defects, stale docs, and missing validation. Inspect what can be established locally. Unresolved product or compatibility decisions block only affected work.
25
+
26
+ ## Finish
27
+
28
+ Deliver completed behavior, validation, gaps, and necessary contract changes. Save continuation-relevant state in SESSION, progress in its task source, and evidence in the existing test / delivery system. No extra contract or registry is required solely for this method.
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Explicit authorization for a sequence of work items
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Continuous work
11
+
12
+ A normal task should continue to completion within scope without a special protocol. Agree on a task source, priorities, budget, and stopping conditions only for a sequence of items.
13
+
14
+ Clarify consequential scope and external-operation authorization. Historical backlog is not an execution queue, and an arbitrary task count does not replace the goal.
15
+
16
+ Check implementation, execute, validate, and update each item in its actual source. Reuse valid authority; stronger risk calls for stronger checks. Pause affected work only for a missing decision or action outside authorization.
17
+
18
+ When the goal changes or the budget ends, hand off outcomes and open items. Resolve uncertain external results through receipts before retrying. Finish when the goal is met; do not start a new queue automatically.
@@ -0,0 +1,32 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Locating existing capability or preparing a code change
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Ground changes in active code
11
+
12
+ 1. Check the task, workspace, and relevant diffs, including uncommitted implementation.
13
+ 2. Search symbols, aliases, interfaces, and similar modules to find the active entry and registration.
14
+ 3. Read implementation and consumers; check flags, dependency injection, builds, and generation sources.
15
+ 4. Inspect related tests and failure evidence; reproduce where useful.
16
+ 5. Choose reuse, extension, repair, or addition. For contracts inspect consumers and recovery.
17
+
18
+ Scale investigation to risk; a small change needs no report for every step. Do not stop merely because two documents were read.
19
+
20
+ ## A search miss is not absence
21
+
22
+ Check terminology, scope, ignored paths, registration, and generated code when relevant. If still unknown, say not located and identify the next check. Do not read every archive or dependency by default.
23
+
24
+ Before creating a parallel implementation, explain the existing capability, the gap, and why its current boundary cannot accommodate the change. Convenience alone is not a reason to rebuild architecture.
25
+
26
+ ## Facts and limits
27
+
28
+ Point observations to a revision, code location, or runtime result. State the basis and falsifying check for an inference. Explain missing evidence and its impact.
29
+
30
+ Existing patterns are reuse candidates, not exemptions from defect review. Existing tests may also be incomplete; compare them against the goal and accepted contract.
31
+
32
+ Distinguish declaration, registration, executable implementation, validation, and deployment. Current status, recent modification, and a valid path are clues; confirm the entry is included and used in the relevant configuration.
@@ -0,0 +1,35 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Background reading or repeated context is growing
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Context loading
11
+
12
+ Use AGENTS for global constraints; SESSION and docs/00-context for current work and engineering routes; topic sections, code, and tests for a specific question. Reuse information already supplied and unchanged.
13
+
14
+ Follow the relevant route, not every link or dependency chain. An index is not a reading checklist. Low-frequency intake is conditional and should stop loading once its gap is resolved.
15
+
16
+ Confirm the goal and workspace, then inspect implementation, consumers, tests, and constraints. Expand into other modules or background only for a concrete unknown. Stop when the current decision has sufficient evidence.
17
+
18
+ Entry budgets in docs.config.json limit navigation growth, not necessary investigation. Character counts are reproducible size indicators, not token estimates. Budgets warn by default; --strict can make warnings fail automation.
19
+
20
+ Search scoped paths and relevant log sections. State the scope of a negative result; check ignored or generated sources only when relevant. Summaries retain paths, revisions, and limits.
21
+
22
+ ## Stable context and current facts
23
+
24
+ See [maintenance](../../DOCS_MAINTENANCE.md) for file and snapshot updates. Caching concerns the actual model input; a file's modification time is not a request change.
25
+
26
+ - When assembly is controllable, put stable rules and relevant engineering context before SESSION, the task, and new evidence within message-role and instruction boundaries. Preserve existing message order. Tool-read order is not necessarily final request order.
27
+ - Matching applies to the rendered prefix. Content after its first change cannot reuse the old prefix; earlier stable content still needs an eligible cached boundary. Check tool definitions, ordering, and compatible request settings too. Configure boundaries when the host supports them; static-first ordering alone does not guarantee reuse.
28
+ - Replace old conclusions in the local snapshot while preserving previously sent messages and tool results. Add new facts in later messages. Compact when context capacity, quality, and total cost warrant it, even though the prefix changes.
29
+ - Reuse supplied content only while relevant inputs still match. Recheck affected sources after branch changes, concurrent edits, or configuration changes. Avoid reinjecting whole unchanged documents while keeping facts current.
30
+
31
+ Check [OpenAI caching guidance](https://developers.openai.com/api/docs/guides/prompt-caching) and, where supported, [cache diagnostics](https://developers.openai.com/api/docs/guides/prompt-caching/diagnostics) for actual prefix, model, tool, and setting differences. Other providers need their own official guidance; this template fixes no model parameters, cache keys, or retention periods.
32
+
33
+ Measure actual cached usage, total input cost, latency, and task quality. Without host receipts mark caching unmeasured; file size or dates cannot establish hit rates. Do not add irrelevant material to reach a cacheable length.
34
+
35
+ Missing environments or dependencies cannot be replaced with more background reading. State the gap and continue independent work.
@@ -0,0 +1,75 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ ---
6
+
7
+ # Shared conventions
8
+
9
+ ## Requirements, reality, and evidence
10
+
11
+ | Information | Question answered | Basis |
12
+ |---|---|---|
13
+ | User goal and accepted contract | What should happen? | Current request and accepted requirements |
14
+ | Code and runtime facts | What happens now? | Specific implementation, call path, configuration, observations |
15
+ | Verification evidence | What was checked under which conditions? | Actual command / method, result, revision, environment, scope |
16
+ | Plan or inference | What may happen next? | Explicitly provisional; never presented as existing capability |
17
+
18
+ Classify conflicts before choosing to fix code, a stale spec, or missing validation. A defect does not redefine a correct requirement; an accepted design does not prove implementation.
19
+
20
+ ## Document status
21
+
22
+ | status | Meaning |
23
+ |---|---|
24
+ | Current | Accepted specification or guidance within its scope; implementation and acceptance are separate |
25
+ | Draft | Still forming; an explicitly authorized draft may guide implementation |
26
+ | Unverified | Content needs verification before relying on it |
27
+ | Superseded | Follow superseded_by for the replacement |
28
+ | Archived | Historical background, outside default implementation context |
29
+
30
+ Status is not authorization. Missing status does not automatically pause all work. A Current spec can describe a capability that has not been implemented or accepted.
31
+
32
+ ## Risk and authorization
33
+
34
+ | Impact | Validation focus |
35
+ |---|---|
36
+ | Local and reversible | Diff and relevant checks |
37
+ | User behavior or module interactions | Behavior, consumers, failure paths |
38
+ | Permissions, protocols, migration, concurrency, persistence | Compatibility, invariants, recovery, relevant integration |
39
+ | Irreversible or external operations | Preconditions, valid authorization, recovery, receipts |
40
+
41
+ Higher risk calls for stronger validation, not repeated approval for already authorized work. Complete reversible preparation first; pause only what depends on an unresolved decision or new authorization. Documents cannot grant system permissions.
42
+
43
+ ## Metadata
44
+
45
+ Enabled docs have status and owner; Current docs also have a real last_verified date. Optional fields:
46
+
47
+ ```yaml
48
+ ---
49
+ status: Current
50
+ owner: engineering
51
+ last_verified: 2026-10-19
52
+ scope: Public query compatibility
53
+ code_refs:
54
+ - src/query/**
55
+ - tests/query.test.js
56
+ ---
57
+ ```
58
+
59
+ last_verified is the most recent documented verification baseline, not a read, edit, or structure-check timestamp. Update it when the relevant baseline changes and is verified. A partial check does not verify an entire document. Keep routine run evidence in existing tasks or CI.
60
+
61
+ code_refs and legacy code_owns use repository-root-relative paths with *, **, and ?. They suggest impact, not exclusive ownership or mandatory documentation of every file. Several topics may reference the same code.
62
+
63
+ Process docs may have kind: process and trigger. must_read_with is reserved for indispensable dependencies, uses root-relative paths, and cannot form cycles. Normal links do not mandate loading.
64
+
65
+ Superseded docs need superseded_by, also root-relative. ADR decision state is separate from document state. Do not copy sample dates or commands as project facts.
66
+
67
+ ## Tasks and evidence
68
+
69
+ Reuse existing task / feature IDs. Optional Track values are NOW (current scope), BOTH (current slice and later extension), and LATER (future candidate). A stale Track does not override a newly authorized user task.
70
+
71
+ Keep task progress, release state, and feature scope in their actual sources. Generate or link aggregates instead of maintaining copies. A separate file is not required for every slice.
72
+
73
+ For important conclusions record object and scope, revision or input fingerprint, environment, actual method, outcome, and gaps. HEAD alone does not identify dirty-workspace inputs. File presence, reading code, passing tests, building, deployment, and runtime acceptance are different claims.
74
+
75
+ Reuse a result only after checking relevant code, tests, configuration, dependencies, and environment; otherwise rerun relevant checks or label it unknown.
@@ -0,0 +1,25 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Defect, failed check, or unexpected behavior
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Evidence-based debugging
11
+
12
+ 1. Establish the source of expected behavior and record actual input, behavior, and environment.
13
+ 2. Reproduce where practical; for intermittent failures add bounded observations and narrow conditions.
14
+ 3. Trace the actual call path and formulate a testable hypothesis. Change one meaningful variable per experiment where possible.
15
+ 4. Fix the cause, verify the original problem and related regressions, and retain a useful automated case when practical.
16
+
17
+ Check existing fixes, dirty changes, flags, and environment changes. Do not hide upstream defects behind fallbacks or remove valid assertions to get green results.
18
+
19
+ ## Change the investigation when evidence stops improving
20
+
21
+ Stop identical retries that add no information. Summarize ruled-out hypotheses and choose a smaller reproduction, primary documentation, or a targeted observation. Do not send secrets or private code in searches.
22
+
23
+ Do not fix the number of attempts regardless of evidence. Continue when an experiment distinguishes hypotheses; report the concrete prerequisite when missing environment, permission, or a decision blocks progress.
24
+
25
+ Log only bounded, relevant signals such as operation ID, revision, duration, queue size, resources, and failure phase. A single signal cannot establish the whole causal chain. Never claim test-first work when tests were added afterward.
@@ -0,0 +1,22 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: New contract, cross-module change, or consequential uncertainty
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Design check
11
+
12
+ Use this to make a decision, without requiring a new design file for every feature.
13
+
14
+ - Where is existing reusable capability, and why must it change?
15
+ - What are inputs, outputs, responsibility, and invariants?
16
+ - Which consumers, data, versions, and environments are affected?
17
+ - How will the goal and recovery be checked, and which evidence is missing?
18
+ - Can an uncertain part be investigated through a reversible experiment?
19
+
20
+ When boundaries are already established, implement without freezing them again. Present evidence and tradeoffs for decisions that actually need the user; complete other authorized preparation first.
21
+
22
+ Put durable decisions in contracts or ADRs, and plans in the task source. Experiments can overturn assumptions; assumptions must not masquerade as confirmed design.
@@ -0,0 +1,20 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Committing, merging, or handing off changes
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Git and change ownership
11
+
12
+ Use the project's workflow and valid authorization. Work authorization does not automatically include commit, push, merge, or release. Do not ask again when authorization is already clear.
13
+
14
+ Inspect relevant diffs before editing. Preserve existing work and stage only the intended task content. A shared dirty workspace need not be cleaned.
15
+
16
+ Do not reset, delete, or relocate unknown changes to obtain a clean state. Isolate work through established workspace procedures when appropriate.
17
+
18
+ Commits should describe behavior and validation around a clear goal. Check the integrated result after merging and run necessary integration checks.
19
+
20
+ A commit hash alone does not identify dirty-workspace inputs; retain relevant differences or fingerprints when needed. A successful commit does not prove build, release, or runtime acceptance.
@@ -0,0 +1,27 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: The user or project explicitly enables parallel executors
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Parallel collaboration
11
+
12
+ Use when work is independently parallelizable and authorized. Document presence alone does not enable subagents.
13
+
14
+ ## Isolation and ownership
15
+
16
+ - Use an atomic task claim mechanism when coordination requires claims; Markdown status and Git branches are not locks.
17
+ - Record task ID, executor, baseline, workspace, write scope, and evidence.
18
+ - Prefer isolated workspaces. In shared trees designate one writer or an integration order.
19
+ - State interface dependencies and integration order; non-overlapping files do not guarantee independence.
20
+
21
+ ## Integration
22
+
23
+ Executors provide actual changes, validation scope, and limits. The integrator checks the latest baseline, resolves interfaces, and validates the combined result.
24
+
25
+ Each task maintains its own state; the integrator maintains shared SESSION. Protect existing work before resolving conflicts; dates do not decide correctness.
26
+
27
+ Release or transfer claims through the coordinator on failure. Query uncertain external results to prevent duplicate deployments or business effects.
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Several deliverables, dependencies, or risks need coordination
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Task planning
11
+
12
+ Finish small tasks directly. For complex tasks record goal, dependencies, acceptance, and necessary checks in the existing task source.
13
+
14
+ Slice by meaningful, independently verifiable results rather than fields, buttons, line counts, or conversation turns. Fragments that cannot be verified independently cannot each be called complete.
15
+
16
+ Revise the plan when investigation changes the path while preserving the user goal and constraints. Combine repetitive microtasks; investigate high uncertainty before committing to a detailed construction queue.
17
+
18
+ Do not copy progress into SESSION, a registry, and a second task contract. Future ideas stay in the existing backlog; a trigger becoming true does not itself authorize execution.
@@ -0,0 +1,47 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Missing background affects goal, scope, constraints, or acceptance
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Project intake and necessary clarification
11
+
12
+ ## When to use
13
+
14
+ Use this when initially establishing project context or when changed direction makes existing information insufficient. A fresh session alone does not trigger an interview. Clear requirements, a valid handoff, or a sufficiently specific local task let work proceed.
15
+
16
+ ## Inspect existing evidence first
17
+
18
+ Use the current request, relevant README / requirements, and necessary code checks to separate knowns, unknowns, and delegated choices. Inspect stack, layout, and capabilities yourself; implementation cannot stand in for user intent. With no code, say no implementation exists.
19
+
20
+ ## Ask only consequential questions
21
+
22
+ Ask when an unknown changes the current goal, scope, important constraints, or acceptance and the user has not delegated that decision. Group a small number of questions and explain their impact. Do not require a complete questionnaire.
23
+
24
+ | Gap | Useful question |
25
+ |---|---|
26
+ | Purpose, users, scenarios | Who uses this, and which concrete problem should it solve? |
27
+ | First delivery and acceptance | What must the first version do, and what result demonstrates usability? |
28
+ | Fixed constraints and delegated choices | Which platforms, existing systems, environments, or deadlines are fixed? Which choices may the agent make? |
29
+
30
+ Use relevant questions only; allow brief answers, uncertainty, and delegated judgment. Do not ask users to inspect code facts or predesign the architecture.
31
+
32
+ Continue independent investigation while waiting. Do not implement dependent work or treat silence as agreement. Reversible details may proceed with stated assumptions; delegated choices can be made with reasons. If the user is unsure, compare options or explore an authorized reversible prototype.
33
+
34
+ ## Finish and record
35
+
36
+ Start once goal, scope, and validation are sufficiently clear. Reuse valid authorization instead of requesting approval of the same summary.
37
+
38
+ Record stable goals and constraints in AGENTS or existing requirements; current scope, acceptance, and open decisions in SESSION or the task source; verified paths and commands in docs/00-context. Separate requirements, code facts, and assumptions. Save conclusions, not full interviews or duplicate tables.
39
+
40
+ ## Behavioral checks
41
+
42
+ - Empty repository and missing purpose: ask about direction rather than inventing a product.
43
+ - Clear local task or valid handoff: proceed without another interview.
44
+ - Delegated technical choice: decide within scope and explain the basis.
45
+ - Unanswered consequential question: defer dependent work and continue useful independent investigation.
46
+
47
+ These require real agent sessions; structure validation cannot prove compliance.
@@ -0,0 +1,18 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: A repeated failure or costly rule suggests improvement
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Improve the process
11
+
12
+ Reflect when a repeated problem or testable opportunity appears, not after every small task.
13
+
14
+ Record facts, a possible cause, one concrete adjustment, and the next observation. Keep active unknowns in SESSION, lasting lessons in the relevant rule, and history in task records.
15
+
16
+ Before adding a rule, consider fixing a tool, route, test, or conflicting instruction. One mistake need not create a permanent step for every task.
17
+
18
+ Use representative tasks to observe correctness, rework, duration, handoff gaps, and unnecessary approvals. Remove ineffective rules without weakening necessary acceptance or changing user authority.
@@ -0,0 +1,30 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-20
5
+ kind: process
6
+ trigger: Behavior, contracts, or important risk need review
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Review and completion
11
+
12
+ Check that the change solves the original problem, reuses suitable capability, and is reachable from the active entry. Inspect relevant consumers, old data, and failure paths.
13
+
14
+ - Do commands, results, input versions, and scope support the claim?
15
+ - Are the user's and other executors' changes protected?
16
+ - Are affected contracts and handoff facts synchronized?
17
+ - Are unimplemented, unverified, and undeployed parts explicit?
18
+ - Were acceptance, assertions, or error handling weakened just to pass?
19
+
20
+ ## On-demand consistency check
21
+
22
+ For behavior or contract changes, cross-module integration, or conflicting evidence, trace this task's requirements → active implementation and consumers → acceptance and receipts. Reference existing Issues, OpenSpec, Spec Kit, ADRs and tests directly. Do not duplicate queues, load unrelated topics or automatically make another model call.
23
+
24
+ Look for requirements without implementation, contract deviations, missing acceptance, and evidence for old revisions or internal functions only. Report a few findings with issue/impact, requirement source, code or receipt location, observation versus inference, and remaining checks. State uncertainty when evidence is insufficient.
25
+
26
+ Resolve whether a conflict is a requirement change, implementation defect or stale documentation before fixing its source. The review itself is read-only and does not accept contracts or promote completion; follow-up changes use the current authorization. Close behavior changes by synchronizing accepted changes and evidence into the original contract. Internal edits need no separate change-document suite.
27
+
28
+ Use independent review by authorized executors when risk, complexity, or project rules warrant it. Do not claim a review that did not occur. Ordinary documentation changes do not automatically start multiple agents.
29
+
30
+ Report completed behavior, relevant checks, and real limits. Finish after necessary checks rather than expanding into another repository-wide audit or historical queue.
@@ -0,0 +1,27 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Handoff, context compaction, or a new executor
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Session handoff and recovery
11
+
12
+ ## Leave a useful state
13
+
14
+ When handoff state changes, follow [maintenance](../../DOCS_MAINTENANCE.md): replace old conclusions and remove resolved items while retaining the goal, workspace differences, necessary evidence, and open items. The default 60-line budget prompts cleanup; plans and history stay in their source. Without state changes leave the file untouched.
15
+
16
+ Say when code changed after a check. Component completion is not consumer completion. Record build, deployment, and acceptance separately. If evidence is temporary, retain a reproducible method and necessary summary.
17
+
18
+ Updating the local snapshot affects later reads, not previously sent messages or tool results. Add new facts to the conversation and compact when actual context needs warrant it.
19
+
20
+ ## Resume against current reality
21
+
22
+ 1. Read the current user request and relevant basic entries.
23
+ 2. Check actual workspace, branch, commit, and diffs; preserve prior work.
24
+ 3. Recheck task-dependent implementation and evidence. Correct the snapshot when paths, configuration, or environment changed.
25
+ 4. Continue toward the next verifiable result without adopting unrelated queues or expired authorization.
26
+
27
+ The integrator maintains shared SESSION. Task systems handle atomic claims and locks; Markdown displays state only. A small query need not update SESSION, and read-only analysis does not authorize rewriting project facts.
@@ -0,0 +1,24 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Executable expectations and regression protection are needed
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Testing and TDD
11
+
12
+ When behavior can be expressed reliably, prefer a failing reproduction before repair, then confirm it passes. Cover invariants and failure paths for protocols, permissions, migration, concurrency, and repeated defects.
13
+
14
+ Inspect existing tools and tests instead of creating another framework. Tests should catch real errors rather than restate implementation.
15
+
16
+ | Change | Validation focus |
17
+ |---|---|
18
+ | Core behavior | Behavioral case and relevant regressions |
19
+ | Cross-module contract | Consumers, compatibility, integration |
20
+ | Style, wording, documentation | Rendered view or diff / reference checks |
21
+ | Prototype | Key hypothesis and explicit limits |
22
+ | Environment that cannot be automated | Actual manual method and result |
23
+
24
+ Scale checks by impact. Do not repeat unrelated suites after sufficient relevant validation. Report skipped checks, missing prerequisites, and simulated-only coverage honestly. Tests added afterward are not test-first development.
@@ -0,0 +1,32 @@
1
+ ---
2
+ status: Current
3
+ owner: docs-template
4
+ last_verified: 2026-10-19
5
+ kind: process
6
+ trigger: Repeated tooling or operations with external effects
7
+ must_read_with: []
8
+ ---
9
+
10
+ # Stable tool entries and receipts
11
+
12
+ Use for repeated, multi-stage, or consequential operations. An ordinary one-off query needs no new framework.
13
+
14
+ ## Before execution
15
+
16
+ Reuse established scripts, package commands, and task runners. Check real help, implementation, or verified instructions for input, working directory, versions, writes, network effects, and preview support. Do not reconstruct deployment procedures each time.
17
+
18
+ Add a tool only when no suitable one exists, and check it in preview or isolation. A tool name, example, or successful preview does not grant external-operation authorization.
19
+
20
+ ## Results
21
+
22
+ Make actual results machine-inspectable when useful. Receipts may include operation ID, target, input / artifact fingerprints, stage, outcome, evidence, and unfinished work. Reuse existing logs.
23
+
24
+ CLI tools can use exit codes, structured stdout, and diagnostic stderr. Distinguish asynchronous acceptance from final success. A successful process exit does not establish remote completion. Do not store credentials or full sensitive payloads in receipts.
25
+
26
+ ## Unknown results, retries, and reuse
27
+
28
+ After timeout or a lost response, query state using the original operation ID before retrying. Reuse idempotency identifiers when appropriate; do not blindly create another release or business action.
29
+
30
+ Check inputs, configuration, dependencies, and environment before reusing evidence. For partial completion preserve successful stages and handle missing work only. Do not report a partial batch as complete.
31
+
32
+ Stop when the required result and evidence are sufficient. On failure report the actual stage, evidence, impact, and next check instead of bypassing the original validation gate.