@rt-tools/agent-kit 0.37.1 → 0.39.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 (371) hide show
  1. package/README.md +5 -5
  2. package/assets/checks/action-of.mjs +154 -0
  3. package/assets/checks/board-runs.github.mjs +40 -5
  4. package/assets/checks/check-board.github.mjs +38 -7
  5. package/assets/checks/check-state-next.mjs +22 -10
  6. package/assets/checks/check-turn-map.mjs +26 -6
  7. package/assets/checks/check-work-steps.mjs +4 -173
  8. package/assets/checks/decide.mjs +285 -0
  9. package/assets/checks/decision-table.json +21432 -0
  10. package/assets/checks/decision-table.mjs +495 -0
  11. package/assets/checks/epic-window.mjs +98 -0
  12. package/assets/checks/flow-condition.mjs +64 -0
  13. package/assets/checks/flow-data.mjs +135 -0
  14. package/assets/checks/flow-forecast.mjs +334 -0
  15. package/assets/checks/flow-guard-run.mjs +90 -0
  16. package/assets/checks/flow-guard.mjs +496 -0
  17. package/assets/checks/flow-model.mjs +271 -0
  18. package/assets/checks/flow-override.mjs +130 -0
  19. package/assets/checks/flow-plan.mjs +206 -0
  20. package/assets/checks/flow-scaffold.mjs +224 -0
  21. package/assets/checks/flow-step.mjs +495 -0
  22. package/assets/checks/flow-sync.mjs +296 -0
  23. package/assets/checks/flow-syntax.mjs +292 -0
  24. package/assets/checks/flow-verdict.mjs +227 -0
  25. package/assets/checks/merge-read.mjs +239 -0
  26. package/assets/checks/owner-nudges.mjs +389 -0
  27. package/assets/checks/push-inputs.mjs +59 -16
  28. package/assets/checks/record-count.mjs +437 -0
  29. package/assets/checks/record-recount.mjs +187 -0
  30. package/assets/checks/record-turn.mjs +155 -0
  31. package/assets/checks/task-flow-script.mjs +318 -0
  32. package/assets/checks/tree-assignment.mjs +26 -7
  33. package/assets/checks/work-result.mjs +362 -0
  34. package/assets/checks/work-steps-lib.mjs +205 -0
  35. package/assets/commands/night.md +6 -6
  36. package/assets/defaults/gate-map.sh +39 -12
  37. package/assets/defaults/merges.sh +48 -0
  38. package/assets/defaults/project.sh +6 -5
  39. package/assets/defaults/turn-map.md +23 -22
  40. package/assets/docs/GLOSSARY.md +5 -1
  41. package/assets/hooks/ask-judge.md +67 -0
  42. package/assets/hooks/browser-guard-device-id.sh +11 -9
  43. package/assets/hooks/browser-guard-no-asking.sh +12 -6
  44. package/assets/hooks/browser-guard-no-listing.sh +13 -7
  45. package/assets/hooks/browser-guard-no-other-drivers.sh +25 -17
  46. package/assets/hooks/browser-guard-require-select.sh +15 -15
  47. package/assets/hooks/commit-msg.sh +13 -3
  48. package/assets/hooks/conscience-guard.sh +9 -25
  49. package/assets/hooks/decide.sh +141 -0
  50. package/assets/hooks/deny-tail.sh +16 -11
  51. package/assets/hooks/dev-server-guard.sh +27 -20
  52. package/assets/hooks/dispatch.sh +47 -4
  53. package/assets/hooks/docs-guard.sh +31 -200
  54. package/assets/hooks/end-conversation-guard.sh +12 -21
  55. package/assets/hooks/epic-stop-guard.sh +54 -152
  56. package/assets/hooks/exam-guard.sh +32 -65
  57. package/assets/hooks/facts-docs.sh +221 -0
  58. package/assets/hooks/facts-flow.sh +173 -0
  59. package/assets/hooks/facts.sh +374 -0
  60. package/assets/hooks/flow-step-guard.sh +93 -0
  61. package/assets/hooks/git-guard-delivery-body.sh +4 -4
  62. package/assets/hooks/git-guard-delivery-conflict.sh +16 -10
  63. package/assets/hooks/git-guard-delivery-draft.sh +3 -3
  64. package/assets/hooks/git-guard-delivery-epic.sh +18 -9
  65. package/assets/hooks/git-guard-delivery-folder.sh +32 -7
  66. package/assets/hooks/git-guard-delivery-merge.sh +2 -2
  67. package/assets/hooks/git-guard-delivery-merged.sh +12 -1
  68. package/assets/hooks/git-guard-delivery-pipeline.sh +1 -1
  69. package/assets/hooks/git-guard-delivery-rerun.sh +44 -0
  70. package/assets/hooks/git-guard-delivery-signature.sh +82 -45
  71. package/assets/hooks/git-guard-delivery-task.sh +47 -0
  72. package/assets/hooks/git-guard-delivery.sh +112 -101
  73. package/assets/hooks/git-guard-discard.sh +8 -18
  74. package/assets/hooks/git-guard-main.sh +13 -19
  75. package/assets/hooks/git-guard-no-verify.sh +56 -16
  76. package/assets/hooks/git-guard-push-ahead.sh +39 -6
  77. package/assets/hooks/git-guard-push-marks.sh +262 -13
  78. package/assets/hooks/git-guard-push-tests.sh +58 -52
  79. package/assets/hooks/git-guard-tree-assignment.sh +7 -4
  80. package/assets/hooks/guard-note.sh +8 -6
  81. package/assets/hooks/handoff-entry-guard.sh +19 -38
  82. package/assets/hooks/handoff-write.sh +3 -1
  83. package/assets/hooks/hook-input.sh +0 -41
  84. package/assets/hooks/metric-marks.sh +19 -7
  85. package/assets/hooks/observe.sh +1 -1
  86. package/assets/hooks/override-write-guard.sh +27 -9
  87. package/assets/hooks/pre-push.sh +40 -12
  88. package/assets/hooks/prose-style-guard.sh +6 -19
  89. package/assets/hooks/pull-merges.sh +76 -0
  90. package/assets/hooks/push-ahead-call-guard.sh +447 -0
  91. package/assets/hooks/push-set.sh +38 -8
  92. package/assets/hooks/qa-dataid-guard.sh +7 -17
  93. package/assets/hooks/record-turn.sh +52 -0
  94. package/assets/hooks/rerun-guard.sh +11 -16
  95. package/assets/hooks/reuse-first-guard.sh +7 -21
  96. package/assets/hooks/role-calls.sh +25 -3
  97. package/assets/hooks/rule-source-guard.sh +54 -21
  98. package/assets/hooks/skill-gate-rearm.sh +18 -5
  99. package/assets/hooks/skill-gate.sh +156 -20
  100. package/assets/hooks/skill-loaded.sh +18 -3
  101. package/assets/hooks/sql-guard-target.sh +2 -2
  102. package/assets/hooks/sql-guard-write.sh +12 -12
  103. package/assets/hooks/sql-guard.sh +58 -16
  104. package/assets/hooks/task-context-load.sh +3 -1
  105. package/assets/hooks/task-flow-context.sh +5 -18
  106. package/assets/hooks/task-flow-draft-guard.sh +25 -74
  107. package/assets/hooks/task-flow-guard.sh +28 -130
  108. package/assets/hooks/tree-assignment-guard.sh +25 -14
  109. package/assets/hooks/turn-entry-load.sh +3 -1
  110. package/assets/hooks/turn-exit-guard.sh +92 -452
  111. package/assets/hooks/turn-exit-role.sh +3 -1
  112. package/assets/hooks/turn-judge.md +113 -0
  113. package/assets/hooks/window-fill-guard.sh +22 -41
  114. package/assets/patterns/doc-style-human.md +36 -76
  115. package/assets/patterns/git-workflow-commit.azure.md +9 -155
  116. package/assets/patterns/git-workflow-commit.github.md +11 -269
  117. package/assets/patterns/git-workflow-commit.gitlab.md +9 -161
  118. package/assets/patterns/git-workflow-docker.md +8 -231
  119. package/assets/patterns/git-workflow-freshness.md +8 -56
  120. package/assets/patterns/git-workflow-merge.md +6 -176
  121. package/assets/patterns/git-workflow-migration.md +5 -75
  122. package/assets/patterns/git-workflow-pr-body.github.md +6 -159
  123. package/assets/patterns/git-workflow-pr-ready.md +9 -70
  124. package/assets/patterns/git-workflow-pr.azure.md +13 -285
  125. package/assets/patterns/git-workflow-pr.github.md +13 -251
  126. package/assets/patterns/git-workflow-pr.gitlab.md +13 -286
  127. package/assets/patterns/git-workflow-restart.md +5 -42
  128. package/assets/patterns/git-workflow-secrets.md +10 -76
  129. package/assets/patterns/git-workflow-stack.md +7 -207
  130. package/assets/patterns/status-report-table.github.md +1 -1
  131. package/assets/patterns/task-flow-archive.md +12 -233
  132. package/assets/patterns/task-flow-close.md +16 -292
  133. package/assets/patterns/task-flow-cycle.md +13 -39
  134. package/assets/patterns/task-flow-graph.needs-graph.md +8 -62
  135. package/assets/patterns/task-flow-handoff.md +13 -161
  136. package/assets/patterns/task-flow-resume.md +18 -218
  137. package/assets/patterns/task-flow-start.md +9 -247
  138. package/assets/patterns/turn-entry-map.md +2 -2
  139. package/assets/pitfalls/agent-kit-extend.md +200 -0
  140. package/assets/pitfalls/agent-kit.2.md +323 -0
  141. package/assets/pitfalls/angular-patterns.md +98 -0
  142. package/assets/pitfalls/browser-verification.md +265 -0
  143. package/assets/pitfalls/component-structure.md +98 -0
  144. package/assets/pitfalls/dependencies.md +92 -0
  145. package/assets/pitfalls/deploy-flow.azure.md +171 -0
  146. package/assets/pitfalls/deploy-flow.github.md +211 -0
  147. package/assets/pitfalls/deploy-flow.gitlab.md +173 -0
  148. package/assets/pitfalls/doc-style-human.md +112 -0
  149. package/assets/pitfalls/doc-style.2.md +286 -0
  150. package/assets/pitfalls/entity-conventions.needs-admin.md +96 -0
  151. package/assets/pitfalls/entity-models.md +89 -0
  152. package/assets/pitfalls/epic-flow.md +92 -0
  153. package/assets/pitfalls/git-workflow-commit.azure.md +190 -0
  154. package/assets/pitfalls/git-workflow-commit.github.md +307 -0
  155. package/assets/pitfalls/git-workflow-commit.gitlab.md +196 -0
  156. package/assets/pitfalls/git-workflow-docker.md +275 -0
  157. package/assets/pitfalls/git-workflow-freshness.md +88 -0
  158. package/assets/pitfalls/git-workflow-hosting.azure.md +31 -0
  159. package/assets/pitfalls/git-workflow-hosting.github.md +32 -0
  160. package/assets/pitfalls/git-workflow-hosting.gitlab.md +31 -0
  161. package/assets/pitfalls/git-workflow-merge.md +220 -0
  162. package/assets/pitfalls/git-workflow-migration.md +103 -0
  163. package/assets/pitfalls/git-workflow-pr-body.github.md +185 -0
  164. package/assets/pitfalls/git-workflow-pr-ready.md +104 -0
  165. package/assets/pitfalls/git-workflow-pr.2.azure.md +172 -0
  166. package/assets/pitfalls/git-workflow-pr.2.github.md +184 -0
  167. package/assets/pitfalls/git-workflow-pr.2.gitlab.md +180 -0
  168. package/assets/pitfalls/git-workflow-pr.azure.md +159 -0
  169. package/assets/pitfalls/git-workflow-pr.github.md +107 -0
  170. package/assets/pitfalls/git-workflow-pr.gitlab.md +151 -0
  171. package/assets/pitfalls/git-workflow-push.azure.md +30 -0
  172. package/assets/pitfalls/git-workflow-push.github.md +30 -0
  173. package/assets/pitfalls/git-workflow-push.gitlab.md +30 -0
  174. package/assets/pitfalls/git-workflow-queue.azure.md +30 -0
  175. package/assets/pitfalls/git-workflow-queue.github.md +30 -0
  176. package/assets/pitfalls/git-workflow-queue.gitlab.md +30 -0
  177. package/assets/pitfalls/git-workflow-restart.md +72 -0
  178. package/assets/pitfalls/git-workflow-secrets.md +114 -0
  179. package/assets/pitfalls/git-workflow-stack.md +254 -0
  180. package/assets/pitfalls/git-workflow.2.azure.md +291 -0
  181. package/assets/pitfalls/git-workflow.2.github.md +294 -0
  182. package/assets/pitfalls/git-workflow.2.gitlab.md +278 -0
  183. package/assets/pitfalls/lib-layers.md +114 -0
  184. package/assets/pitfalls/lists.md +117 -0
  185. package/assets/pitfalls/mockups.needs-mockups.md +87 -0
  186. package/assets/pitfalls/navigation.md +94 -0
  187. package/assets/pitfalls/observability.needs-app.md +186 -0
  188. package/assets/pitfalls/platform-access.md +94 -0
  189. package/assets/pitfalls/queue-audit.github.md +78 -0
  190. package/assets/pitfalls/reuse-first.md +201 -0
  191. package/assets/pitfalls/spec-driven.2.md +318 -0
  192. package/assets/pitfalls/styling-bem.2.md +125 -0
  193. package/assets/pitfalls/task-flow-archive.md +265 -0
  194. package/assets/pitfalls/task-flow-close.2.md +166 -0
  195. package/assets/pitfalls/task-flow-close.md +167 -0
  196. package/assets/pitfalls/task-flow-cycle.md +73 -0
  197. package/assets/pitfalls/task-flow-graph.needs-graph.md +98 -0
  198. package/assets/pitfalls/task-flow-handoff.md +200 -0
  199. package/assets/pitfalls/task-flow-handover.md +30 -0
  200. package/assets/pitfalls/task-flow-owner.md +58 -0
  201. package/assets/pitfalls/task-flow-plan.md +29 -0
  202. package/assets/pitfalls/task-flow-resume.md +257 -0
  203. package/assets/pitfalls/task-flow-start.md +287 -0
  204. package/assets/pitfalls/task-flow.2.md +303 -0
  205. package/assets/pitfalls/task-flow.md +4 -4
  206. package/assets/pitfalls/testing.2.md +279 -0
  207. package/assets/pitfalls/turn-conduct.md +16 -17
  208. package/assets/pitfalls/typescript-conventions.md +161 -0
  209. package/assets/pitfalls/write-a-skill.md +128 -0
  210. package/assets/rules/angular-patterns.md +21 -86
  211. package/assets/rules/autonomous-work.md +2 -2
  212. package/assets/rules/browser-verification.md +28 -256
  213. package/assets/rules/component-structure.md +25 -87
  214. package/assets/rules/dependencies.md +20 -78
  215. package/assets/rules/deploy-flow.azure.md +26 -156
  216. package/assets/rules/deploy-flow.github.md +34 -200
  217. package/assets/rules/deploy-flow.gitlab.md +27 -159
  218. package/assets/rules/doc-style.md +32 -286
  219. package/assets/rules/entity-conventions.needs-admin.md +26 -82
  220. package/assets/rules/entity-models.md +14 -63
  221. package/assets/rules/epic-flow.md +24 -63
  222. package/assets/rules/git-workflow-hosting.azure.md +26 -0
  223. package/assets/rules/git-workflow-hosting.github.md +38 -0
  224. package/assets/rules/git-workflow-hosting.gitlab.md +27 -0
  225. package/assets/rules/git-workflow-push.azure.md +28 -0
  226. package/assets/rules/git-workflow-push.github.md +28 -0
  227. package/assets/rules/git-workflow-push.gitlab.md +28 -0
  228. package/assets/rules/git-workflow-queue.azure.md +23 -0
  229. package/assets/rules/git-workflow-queue.github.md +30 -0
  230. package/assets/rules/git-workflow-queue.gitlab.md +23 -0
  231. package/assets/rules/git-workflow.azure.md +21 -282
  232. package/assets/rules/git-workflow.github.md +24 -284
  233. package/assets/rules/git-workflow.gitlab.md +21 -269
  234. package/assets/rules/lib-layers.md +30 -103
  235. package/assets/rules/lists.md +21 -105
  236. package/assets/rules/mockups.needs-mockups.md +25 -64
  237. package/assets/rules/navigation.md +10 -69
  238. package/assets/rules/observability.needs-app.md +43 -172
  239. package/assets/rules/platform-access.md +28 -75
  240. package/assets/rules/queue-audit.github.md +25 -52
  241. package/assets/rules/reuse-first.md +20 -195
  242. package/assets/rules/spec-driven.md +35 -308
  243. package/assets/rules/styling-bem.md +20 -117
  244. package/assets/rules/task-flow-handover.md +24 -0
  245. package/assets/rules/task-flow-owner.md +34 -0
  246. package/assets/rules/task-flow-plan.md +38 -0
  247. package/assets/rules/task-flow.md +22 -300
  248. package/assets/rules/testing.md +32 -273
  249. package/assets/rules/turn-conduct.md +105 -106
  250. package/assets/rules/turn-entry.md +2 -2
  251. package/assets/rules/typescript-conventions.md +41 -147
  252. package/assets/samples/tasks/_template/plan.md +30 -6
  253. package/assets/samples/tasks/_template/progress.md +0 -1
  254. package/assets/skills/agent-kit-extend.md +25 -168
  255. package/assets/skills/agent-kit.md +27 -299
  256. package/assets/skills/write-a-skill.md +20 -106
  257. package/assets/task-flow/flow.js +184 -0
  258. package/assets/task-flow/flow.md +101 -0
  259. package/assets/task-flow/measure/agreement.mjs +24 -0
  260. package/assets/task-flow/measure/ci.mjs +184 -0
  261. package/assets/task-flow/measure/copy.mjs +22 -0
  262. package/assets/task-flow/measure/epic-of.mjs +50 -0
  263. package/assets/task-flow/measure/epic-text.mjs +35 -0
  264. package/assets/task-flow/measure/epic.mjs +114 -0
  265. package/assets/task-flow/measure/folder.mjs +16 -0
  266. package/assets/task-flow/measure/footprint.mjs +28 -0
  267. package/assets/task-flow/measure/grill.mjs +21 -0
  268. package/assets/task-flow/measure/host.mjs +8 -0
  269. package/assets/task-flow/measure/owner.mjs +27 -0
  270. package/assets/task-flow/measure/plan.mjs +27 -0
  271. package/assets/task-flow/measure/pr.mjs +20 -0
  272. package/assets/task-flow/measure/progress.mjs +50 -0
  273. package/assets/task-flow/measure/session.mjs +252 -0
  274. package/assets/task-flow/measure/task.mjs +23 -0
  275. package/assets/task-flow/measure/text.mjs +77 -0
  276. package/assets/task-flow/source/git.mjs +254 -0
  277. package/assets/task-flow/source/host.mjs +277 -0
  278. package/assets/task-flow/source/marks.mjs +56 -0
  279. package/assets/task-flow/source/owner.mjs +94 -0
  280. package/assets/task-flow/source/records.mjs +116 -0
  281. package/assets/task-flow/source/session.mjs +269 -0
  282. package/assets/task-flow/source/steps.mjs +28 -0
  283. package/assets/task-flow/source/tree.mjs +42 -0
  284. package/bin/agent-kit.d.ts.map +1 -1
  285. package/bin/agent-kit.js +30 -0
  286. package/bin/agent-kit.js.map +1 -1
  287. package/lib/agent-checks.d.ts +55 -0
  288. package/lib/agent-checks.d.ts.map +1 -0
  289. package/lib/agent-checks.js +221 -0
  290. package/lib/agent-checks.js.map +1 -0
  291. package/lib/assets.d.ts.map +1 -1
  292. package/lib/assets.js +7 -2
  293. package/lib/assets.js.map +1 -1
  294. package/lib/cargo.d.ts +29 -0
  295. package/lib/cargo.d.ts.map +1 -1
  296. package/lib/cargo.js +27 -1
  297. package/lib/cargo.js.map +1 -1
  298. package/lib/cascade.d.ts.map +1 -1
  299. package/lib/cascade.js +3 -1
  300. package/lib/cascade.js.map +1 -1
  301. package/lib/commands.d.ts.map +1 -1
  302. package/lib/commands.js +78 -2
  303. package/lib/commands.js.map +1 -1
  304. package/lib/config.d.ts +18 -0
  305. package/lib/config.d.ts.map +1 -1
  306. package/lib/config.js +18 -1
  307. package/lib/config.js.map +1 -1
  308. package/lib/epic-window-send.d.ts +74 -0
  309. package/lib/epic-window-send.d.ts.map +1 -0
  310. package/lib/epic-window-send.js +166 -0
  311. package/lib/epic-window-send.js.map +1 -0
  312. package/lib/hooks-map.d.ts +4 -0
  313. package/lib/hooks-map.d.ts.map +1 -1
  314. package/lib/hooks-map.js +2 -2
  315. package/lib/hooks-map.js.map +1 -1
  316. package/lib/integrity.d.ts +3 -0
  317. package/lib/integrity.d.ts.map +1 -1
  318. package/lib/integrity.js +7 -0
  319. package/lib/integrity.js.map +1 -1
  320. package/lib/metric-lines.d.ts +2 -1
  321. package/lib/metric-lines.d.ts.map +1 -1
  322. package/lib/metric-lines.js +49 -1
  323. package/lib/metric-lines.js.map +1 -1
  324. package/lib/metric-send-mark.d.ts +6 -3
  325. package/lib/metric-send-mark.d.ts.map +1 -1
  326. package/lib/metric-send-mark.js +15 -5
  327. package/lib/metric-send-mark.js.map +1 -1
  328. package/lib/metric-send.d.ts +6 -2
  329. package/lib/metric-send.d.ts.map +1 -1
  330. package/lib/metric-send.js +47 -13
  331. package/lib/metric-send.js.map +1 -1
  332. package/lib/metrics.d.ts +17 -0
  333. package/lib/metrics.d.ts.map +1 -1
  334. package/lib/metrics.js +26 -15
  335. package/lib/metrics.js.map +1 -1
  336. package/lib/observations.js +3 -3
  337. package/lib/observations.js.map +1 -1
  338. package/lib/outcomes.d.ts +5 -2
  339. package/lib/outcomes.d.ts.map +1 -1
  340. package/lib/outcomes.js +5 -4
  341. package/lib/outcomes.js.map +1 -1
  342. package/lib/push-gate.d.ts +13 -0
  343. package/lib/push-gate.d.ts.map +1 -1
  344. package/lib/push-gate.js +11 -7
  345. package/lib/push-gate.js.map +1 -1
  346. package/lib/push-set-usefulness.d.ts +78 -0
  347. package/lib/push-set-usefulness.d.ts.map +1 -0
  348. package/lib/push-set-usefulness.js +225 -0
  349. package/lib/push-set-usefulness.js.map +1 -0
  350. package/lib/sync.d.ts +10 -0
  351. package/lib/sync.d.ts.map +1 -1
  352. package/lib/sync.js +14 -1
  353. package/lib/sync.js.map +1 -1
  354. package/lib/work-result.d.ts +43 -0
  355. package/lib/work-result.d.ts.map +1 -0
  356. package/lib/work-result.js +39 -0
  357. package/lib/work-result.js.map +1 -0
  358. package/package.json +1 -1
  359. package/assets/hooks/claim-guard.sh +0 -212
  360. package/assets/hooks/grill-gate-ask.sh +0 -26
  361. package/assets/hooks/grill-gate-bypass.sh +0 -61
  362. package/assets/hooks/grill-gate-options.sh +0 -50
  363. package/assets/hooks/grill-gate.sh +0 -482
  364. package/assets/hooks/postmortem-guard.sh +0 -124
  365. package/assets/hooks/proposal-guard.sh +0 -154
  366. package/assets/hooks/stand-login-guard.sh +0 -107
  367. package/assets/hooks/turn-exit-epic.sh +0 -173
  368. package/assets/hooks/turn-exit-patterns.sh +0 -123
  369. package/assets/hooks/turn-exit-verdict.sh +0 -149
  370. package/assets/hooks/waiting-turn-guard.sh +0 -320
  371. package/assets/hooks/work-start-guard.sh +0 -175
@@ -0,0 +1,303 @@
1
+ # Work conduct — cold part, second file
2
+
3
+ The sections the rule `task-flow` handed over when it was cut to its statements and split in
4
+ four parts — `task-flow`, `task-flow-plan`, `task-flow-owner`, `task-flow-handover`: its names,
5
+ its flow and every article of all four parts whole, with its reasons. Read on demand.
6
+
7
+ ## How the rule reads
8
+
9
+ Rule under the law `docs/constitution/work-conduct.md`. The law says what must be true about the
10
+ course of work; here — what it is called in this tree, where it lives and what is not checked here.
11
+ How a series of tasks is held together as one epic — rule `epic-flow` under the same law.
12
+
13
+ **Cold part:** `pitfalls.md` next to it — traps and conduct from incident analyses. Loaded on
14
+ demand, not with the rule: an ordinary decision does not need it — whoever analyses a miss or argues
15
+ with a guard does.
16
+
17
+ **Requires:** `hooks/task-flow-guard.sh`, `hooks/task-flow-draft-guard.sh`,
18
+ `hooks/task-context-load.sh`, `hooks/window-fill-guard.sh`, `hooks/turn-exit-guard.sh`,
19
+ `hooks/turn-judge.md`, `hooks/ask-judge.md`, `hooks/main-run-context.sh`
20
+
21
+ ## What it is called here
22
+
23
+ | In the law | Here |
24
+ | --- | --- |
25
+ | the owner's request | what work begins with; grilled by the `/grill-me` command before the first edit |
26
+ | understanding written where the work goes | `docs/tasks/<ветка>/grill.md` — the request verbatim, the owner's answers in their words, decisions with reasons |
27
+ | the plan | `docs/tasks/<ветка>/plan.md` — the task footprint and stages with readiness signs; not edited after it is written |
28
+ | the progress | `docs/tasks/<ветка>/progress.md` — "Where we stand", decisions along the way, session entries; the only place where done work is marked |
29
+ | the product agreement written before the code | `docs/specs/<домен>/proposed/<фича>/` — the feature spec; merges into the domain spec before the PR opens |
30
+ | the task folder before the task is created | `docs/tasks/_draft-<slug>/` — outside history while there is no number |
31
+ | exploration | an `Explore` or `general-purpose` session before the first question to the owner |
32
+ | the plan review by roles | `.claude/workflows/plan.js` — need, points, agreement, critique, plan, goal |
33
+ | a large edit carried by roles | `.claude/workflows/feature.js` — plan, implementation, check, acceptance, points, goal |
34
+
35
+ ## Where it lives
36
+
37
+ In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
38
+ travels between repositories, the layout does not, and a path named in the rule lies in the first
39
+ tree that keeps its code differently.
40
+
41
+ ## Work states
42
+
43
+ The unit of work is a state, not a step. A state has an entry, a mandatory action and an exit, and
44
+ until the action is done the work stays in the same state.
45
+
46
+ The state is measured by the engine from the branch, the task folder and the host. The line
47
+ ``- **State:** `этап-идёт` `` in the "Where we stand" section of the progress mirrors it and never
48
+ stands ahead of it.
49
+
50
+ [the table stays in the hot part of the rule]
51
+
52
+ No state has a mandatory action that sounds like "wait": waiting for someone else's step is not a
53
+ work state, so in `работа-отдана` the mandatory action is the next task, not the open PR. A blocked
54
+ task does not count as next: the same waiting under the name of work. The next is taken from the
55
+ epic plan; outside an epic the owner names it, and the queue, asked by a command, goes into the
56
+ question: "no tasks" is a statement about the tree, backed by output, not by the executor's memory. A filled session window is no state either: the session ends
57
+ with a handover, and the work stays where it stood. **An open card says nothing about whether the
58
+ work is taken.** A card is closed by the merge, and in a session that opens no PRs the list of open
59
+ ones does not shrink. A task is untaken when the tree holds no trace of it: open numbers are checked
60
+ against the archive and its history — a record past its expiry stays in `git log -- docs/archive/`.
61
+
62
+ What a turn ends with — rule `turn-conduct` under the same law.
63
+
64
+ The list is shown to the owner at the start of work, and where we stand is marked on it.
65
+
66
+ The states after the folder have no line on disk: the progress leaves with the folder, and the
67
+ folder is taken apart before the PR opens. The engine measures them from the branch history and the
68
+ host.
69
+
70
+ ## Flow
71
+
72
+ The course of work from the owner's request to closing: where the grill stands, what the guard
73
+ demands and where the task folder goes.
74
+
75
+ ```mermaid
76
+ flowchart TD
77
+ A[The owner's request] --> B[Exploration over the tree — before the first question]
78
+ B --> C[Grill: six mandatory questions, the answers land on disk]
79
+ C --> D{The edit touches application code}
80
+ D -->|Yes| E[A product agreement is written — before the code]
81
+ D -->|No| F[The plan states the reason there is none]
82
+ E --> Z{The epic of this work exists}
83
+ F --> Z
84
+ Z -->|No| Y[The epic is declared: a card, all its tasks and a plan — then its branch from the main branch]
85
+ Z -->|Yes| G[Task, branch from the epic branch, task folder by branch name; the epic card moves with its first task]
86
+ Z -->|The owner's word about work outside an epic| X[Task, branch from the main branch, task folder by branch name]
87
+ X --> H
88
+ Y --> G
89
+ G --> H[A plan with stages; not edited after it is written]
90
+ H --> I{Stage done}
91
+ I -->|Yes| J[A mark in the progress — the only place where done work is marked]
92
+ J --> I
93
+ I -->|Stages are over| T[The agreement merges into the domain spec, texts are brought up to what was done, then the suite runs]
94
+ T --> N[The task folder is taken apart by the last commit: the grill — to the archive, findings — to the epic plan, the plan — away]
95
+ N --> S[Work queue audit]
96
+ S --> K[The PR opens; the executor names the number, what it waits for and what comes next]
97
+ K --> W[The rules review of the closed work goes to the background, findings land on disk]
98
+ W --> L[While the PR waits for review, the next task is taken]
99
+ L --> M{Review and run are over}
100
+ M -->|Red run or remarks| V[Fixed in the same branch: the plan is gone from disk, the guard takes the sign of work from the branch history]
101
+ V --> M
102
+ M -->|Green and no remarks| O[The draft, if there was one, is lifted; a person presses merge into the epic branch]
103
+ O --> P{Tasks of the epic are left}
104
+ P -->|Yes| G
105
+ P -->|No| Q[The PR of the epic into the main branch opens: every folder is taken apart]
106
+ ```
107
+
108
+ ## The articles whole, with their reasons
109
+
110
+ - **Editing application code is refused until the work has reached a state in which code is
111
+ edited.** The guard demands three things: a task folder by branch name, a plan in it and a
112
+ declared state. The agreement has a guard of its own on the same events.
113
+ - **The guard judges the declared transition, not the presence of files.** The refusal is lifted
114
+ by the declared state — `этап-идёт`,
115
+ `этапы-кончились`, `разбор-кончился`, `работа-отдана`. The fifth road is the branch history: a
116
+ folder taken apart means handed-in work.
117
+ - **A state line never stands ahead of the measured state.** A line moved forward is a declaration
118
+ of intent: the engine measures the state, and an edit that puts the line ahead of it is refused.
119
+ - **A refusal by state names the mandatory action of that state.** Hearing only "wrong state", the
120
+ executor rewrites the state line instead of the step.
121
+ - **Only a word from the list counts as a state name.** A word of one's own says nothing about the
122
+ entry, the exit or the action.
123
+ - **Two requirements — two guards, and one can be lifted without losing the other.** A line about
124
+ unchanged behaviour lifts the agreement, not the requirement to reach the code-editing state.
125
+ - **A merged agreement does not lock the branch.** After the merge the "proposed" directory is gone
126
+ from disk while the plan refers to it to the end: the guard tells merged from never-created by the
127
+ branch history.
128
+ - **The agreement is required by the edit paths, not by an appraisal of the task.** `apps/**` and
129
+ `libs/**` are the sign; rules, texts, tooling and dependencies fall outside it. The bypass is the
130
+ line `**Behaviour:** unchanged — <the reason of the owner>` in the plan; an empty reason is not
131
+ accepted.
132
+ - **What needs the owner's word is taken from a list, not appraised on the spot.** The appraisal
133
+ "this is safe" is assigned by whoever finds it convenient.
134
+ - **A stop the owner sets on a later step is written down the moment it is said.** A task they put
135
+ off gets the mark «отложено» in the epic plan, set only by their last word naming it; the engine
136
+ then takes the next task. A stop for the turn itself is read from their last message.
137
+ - **A reply to the owner's order begins with the result, not with intent or its justification.** A
138
+ justification under someone else's accepted decision reads as its appraisal. One exception:
139
+ execution stopped by an obstacle — then the obstacle is named.
140
+ - **The last run of the main branch is read first thing in a session and after every known
141
+ merge.** A red main branch lives until the owner notices; a red run is fixed before new work is taken.
142
+ - **A session does not start work by itself.** The handover, the state from the startup hook and an
143
+ assigned epic say what to do, not whether to work: a start needs the owner's word in the same
144
+ session. An empty message, one word or one path order no work.
145
+ - **A refusal by an external limiter removes the way, not the task.** It names no exit: the way is
146
+ taken from the guard that already described this fix, and the task stays the same.
147
+ - **A question written by a past session does not become a question to the owner.** It is addressed
148
+ to the handover's author, and some are closed by a work step.
149
+ - **The owner's instruction holds until they cancel it, and a new fact against it is a line in the
150
+ reply about the cost, not a new question.** Re-asked is what the instruction does not cover. A
151
+ menu where two options of three offer to cancel the owner's decision is that very cancellation.
152
+ - **An answer in the owner's message counts the same as an answer in a document.** A question
153
+ already answered in the conversation is not asked again.
154
+ - **The owner's word about the design is a task setting, not a decision.** What they named is
155
+ usually in the tree under that word — a name on a screen, a spec section, a model field — and is
156
+ checked against it before the edit. Diverged — the owner is asked.
157
+ - **A tool the owner named is used, and a substitute is named in the same reply.** A command, a
158
+ role or a browser named in the request is part of it; the reply says what was used instead and why.
159
+ - **A rule of the tree outweighs a standing instruction of the host.** The host describes its own
160
+ default; where the two differ, the tree's text is carried out.
161
+ - **A task folder is created for any work, no exceptions.** An exception with even one lawful form
162
+ is executed as permission. It goes in before the first edit.
163
+ - **The task folder goes into the branch by a commit, not lives in one working tree.** Uncommitted,
164
+ it passes edits without refusal until the plan is already gone. Outside history one draft without
165
+ a number is lawful.
166
+ - **The task folder is taken apart by the last commit before the PR opens, not after approval.** A
167
+ person merges as soon as they see green, and no room is left for a closing commit.
168
+ - **After opening the PR, the executor tells the owner the number, what it waits for and what comes
169
+ next.** A draft waits for the run, a PR opened ready waits for the owner's hand, and that is said.
170
+ - **A request to merge never comes before the work is checked.** Where the pipeline wakes for this
171
+ base: folder taken apart and pushed → PR as a draft → run green → draft lifted → the request to
172
+ merge, naming the number. Where it does not wake, the green push gate is the check, and opening
173
+ the PR and asking to merge are one turn.
174
+ - **A PR that waits for a run opens as a draft, and one that waits for nothing opens ready.** An
175
+ open PR reads as an invitation to merge. Which of the two applies is decided by the bases the pipeline wakes for, and that is read from its file.
176
+ - **The plan guard is the lower bound of the requirement, not its limit.** It demands a folder only
177
+ for an edit of application code; the article above — for any work.
178
+ - **An instruction to work by a rule or by the progress is an instruction to do all its steps,
179
+ including those that change history.** Marking a stage, a commit, a push and opening a PR are
180
+ prescribed by the rule; questions are asked about what the progress lacks.
181
+ - **A taken task does not end a turn.** Creating the task, the branch, the column and the folder is
182
+ preparation; the turn-exit guard names the plan, the action of that state, in its refusal.
183
+ - **The stages of a plan cover its done-sign whole.** Otherwise every stage closes, the run is
184
+ green, and half the order is not done. Either the stages are written up to the sign, or the sign
185
+ is narrowed to what the stages give.
186
+ - **Every rule of the product agreement becomes a step of some stage.** The plan names, per rule,
187
+ the stage that writes its code and the check that proves it, and is compared with the agreement
188
+ rule by rule before the first stage: a rule with no stage is found at the merge review, when the
189
+ code is written.
190
+ - **Every step of the plan carries a check whose expected output is taken from a run while the plan
191
+ is written.** Written by a guess, it fails at the step itself. The engine runs the check and writes
192
+ the mark of the step; a step marked done without its mark is refused.
193
+ - **A plan for work that ports a technique from outside is written by a measurement of one's own
194
+ code.** Reading the sample says how it is built; what is needed here is said by a count over
195
+ one's own files.
196
+ - **A count that becomes the measure of the work is bounded by the declaration, not by the file.**
197
+ A file holds neighbouring sets too.
198
+ - **Waiting for one part of a stage is never a stop of the stage.** The parts independent of what is
199
+ awaited are done in the same turn; the owner is told what is done and what is left for their step.
200
+ - **A finding made mid-stage is checked against the plan's exit conditions before the first edit.**
201
+ A finding named by no exit condition goes to the section on what the work does not do, and is
202
+ filed as a task.
203
+ - **Done work is marked only in the progress.** "Where we stand" is rewritten by every session, not
204
+ appended.
205
+ - **The plan names the steps of every stage, and the progress mirrors them with a mark each.** The
206
+ plan is not edited after it is written, the marks change every turn; a line nobody can call done
207
+ is not a step.
208
+ - **The numbers and the names of the steps are copied from the plan, not reworded.** A check matches
209
+ the two lists: a reworded name reads as a different step.
210
+ - **Exactly one step carries the mark of going on right now, while any step is not done.** Marked on
211
+ none, the progress says the work stands; marked on two, it says nothing at all.
212
+ - **A word for a new notion is looked up in the tree's glossary.** It goes into the context whole
213
+ at session start, so "did not read it" is never a ground.
214
+ - **The task folder is created as a draft and gets its number by a command.** Until the grill ends,
215
+ how many tasks come out is unknown, so the number never comes first.
216
+ - **An abandoned grill is visible.** A draft older than a week is listed by the work queue audit.
217
+ - **Work ordered in words becomes a task in the queue in the same turn.** Even if it will not be
218
+ done now: a draft folder has no number, and one session knows of it. Postponed work names a
219
+ date; postponed silently, it reads as done.
220
+ - **The plan names the points: the epic its milestone, the task the change a person will see.** The
221
+ role `product-strategist` tries to prove the miss in planning and before the PR. A proved miss is
222
+ fixed or named to the owner; no pipeline stops. Every PR body carries the table of points.
223
+ - **An improvement of a rule names the metric it should move, and the next report judges it.** A repair
224
+ names what was broken instead. An edit that moved nothing is named so. The technique is the
225
+ pattern `task-flow-cycle`.
226
+ - **Work is judged by the role `goal-critic` against the owner's words.** A plan is no evidence to
227
+ it, its reply is not edited, and the PR body carries its table.
228
+ - **A mission is set by the owner.** A session only proposes a wording from its analysis and waits
229
+ for approval.
230
+ - **Building by a sample begins with reading the sample itself, whole, by walking the directories.**
231
+ - **Exploration of a tree that holds a code graph begins with the graph.** A tree with a graph names
232
+ the trait `graph` in its settings and follows the pattern `task-flow-graph`: in every turn the
233
+ graph is checked against the head before the first exploration, and a turn that does not use it
234
+ names the reason. Relations are taken from the graph; numbers, behaviour and texts — from the code
235
+ and the documents.
236
+ - **The path to a sample lies outside the history, the permission to work outside the epic — in
237
+ the main branch.** The path names another tree and lives among the records that belong to no
238
+ branch; the progress names the sample by a reference to that place. The permission is a row of
239
+ the table of assignments, read from the main branch by every branch; it repeats the owner's word,
240
+ not replaces it.
241
+ - **Closed work is reviewed by the rules in the background, right after the PR, and its findings
242
+ wait for the owner.** Only the session that led the work sees what was loaded and what was
243
+ missing, and it takes the next task meanwhile. A proposal sent unreviewed becomes the work of
244
+ someone who did not order it; only the digest of observations leaves, always. The technique is
245
+ the pattern `task-flow-archive`.
246
+ - **The cheap closing step goes before the costly one, and the run — after the merge.** A run
247
+ before the merge checks what will not reach main.
248
+ - **The agreement merges into the domain spec by one of the last commits of the branch, before the
249
+ PR opens.** By then the bindings are known, and `proposed/` never appears in main. What is ready
250
+ to merge is listed by `npm run check:specs`.
251
+ - **The folder of a closed task is taken apart, not moved whole.** What explains a decision goes to
252
+ `docs/archive/`; the rest is deleted. One not taken apart is caught by the work queue audit.
253
+ - **Opening the PR and lifting the draft are refused while the branch carries its task folder.** A
254
+ person presses merge on the host, where there are no guards: a lifted draft reads to them as an
255
+ invitation. The branch content is judged, not the working tree.
256
+ - **A branch that removed the folder adds a record to the archive.** Removing is cheaper than taking
257
+ apart, and the grill leaves first — the only record of the owner's words.
258
+ - **The bypass is the line `Task-folder-skip: <reason>` in the PR or in the command itself.** An
259
+ empty reason is no bypass, and the bypass lifts the refusal but does not silence the work queue
260
+ audit line.
261
+
262
+ ## What of the law is not here
263
+
264
+ Nothing checks the completeness of the written understanding: the machine sees that a record exists,
265
+ not that it closes every gap. The same for a question worth asking and not asked — it leaves no
266
+ trace. The owner judges both.
267
+
268
+ The guard judges by the edit paths, not by whether the work changes behaviour. A refactoring gets no
269
+ sign of its own: the appraisal "behaviour does not change" would be assigned by whoever it hinders.
270
+
271
+ Of the grill itself only the questions are judged: the agent hook of the question tool holds a
272
+ question the owner already answered or a rule answers plainly, and names where the answer is. The
273
+ exploration, the six questions, the count of menus and the answers are checked by nothing.
274
+
275
+ The agent hooks judge by meaning, not by shared words, and a model can let a case pass: a doubtful
276
+ question leaves, a doubtful turn ends.
277
+
278
+ Nothing watches the plan's immutability: an edit along the way is told from the original record only
279
+ by history.
280
+
281
+ Nothing checks that the texts match what was done: the machine cannot see what went stale in a rule
282
+ or a spec. This is held by the closing step and the task footprint in the plan. A rule and a spec
283
+ are edited in the branch, a law is not: its article goes to the owner as text, and the work goes on
284
+ without it.
285
+
286
+ What went to the archive is not checked: the owner judges it at review.
287
+
288
+ The task folder guard judges the executor's call, not the host's button: a person merging from their
289
+ side passes it in silence, and there the requirement is held by a section in the PR body.
290
+
291
+ A tree may reverse the hand-in order by an override. Which package steps stop being executed then
292
+ nothing counts; it is held by reading both texts in a row on every such edit.
293
+
294
+ ## Patterns
295
+
296
+ - `task-flow-start` — exploration, grill, agreement, plan, task and branch.
297
+ - `task-flow-resume` — returning to unfinished work in a new session.
298
+ - `task-flow-close` — merging the agreement, bringing the texts up to date, opening the PR and
299
+ lifting the draft.
300
+ - `task-flow-archive` — taking the task folder apart, the move to the archive, review by the rules.
301
+ - `task-flow-cycle` — an edit chosen by the report and judged by the next one.
302
+ - `task-flow-graph` — where the tree names the trait `graph`: the freshness check, the domain inventory and
303
+ what the graph never answers.
@@ -25,10 +25,10 @@ The rule is `task-flow`; the articles that hold the law stand there.
25
25
  - **The name of another tree is not written into repository files, and the full path to a sample
26
26
  carries it.** So the full path lives in the directory of records that belong to no branch, where
27
27
  it is lawful, and the repository holds only a reference without the name.
28
- - **The line "Waiting for the owner" in the progress outlives the reason it was written for.** It
29
- lies on disk, enters the context in the next session and reads as the current state — so it is
30
- removed in the same turn in which the owner answered. Otherwise the wait confirms itself: three
31
- owner's instructions in a row did not outweigh one line on disk.
28
+ - **A stop written into the progress outlived the reason it was written for.** It lay on disk,
29
+ entered the context in the next session and read as the current state: three owner's instructions
30
+ in a row did not outweigh one line. So the progress carries no line about a stop any more, and the
31
+ guard reads the owner's word from the record of the session.
32
32
 
33
33
  - **The folder is named after the branch, one to one.** The startup hook looks for it by `git branch
34
34
  --show-current`, and a folder named otherwise is found by nothing: the work goes on with an empty
@@ -0,0 +1,279 @@
1
+ # Verifiability — cold part, second file
2
+
3
+ What the rule `testing` handed over when cut to its statements, every article whole.
4
+
5
+ Rule under the law `docs/constitution/verifiability.md`. The law says what counts as
6
+ confirmation; here — what it is called in this tree, where it lives and what of the law does not
7
+ apply here. Checking the running application by eye and by measurement is the rule
8
+ `browser-verification` under the same law.
9
+
10
+ **Cold part:** `pitfalls.md` next to it — traps already stepped on. Loaded on demand, not
11
+ together with the rule.
12
+
13
+ ## What it is called here
14
+
15
+ | In the law | Here |
16
+ | --------------------- | --------------------------------------------------------------------------------------- |
17
+ | scenario | `SC-<PREFIX>-<NUMBER>` in `docs/specs/<domain>/scenarios.md` |
18
+ | test | `it(...)` in `*.spec.ts` next to the source — Vitest; an end-to-end test — Playwright |
19
+ | coverage digest | the output of `npm run check:specs`: covered, partial, without tests |
20
+ | uncovered mark | the line `Not covered: <reason>` inside the scenario block; legacy `Не покрыто:` |
21
+ | partial-coverage mark | the line `Coverage: partial — <what is missing>`; legacy `Покрытие: частичное —` |
22
+
23
+ ## Where it lives
24
+
25
+ In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
26
+ travels between repositories, the layout does not, and a path named in the rule lies in the
27
+ first tree that keeps its code differently.
28
+
29
+ ## Flow
30
+
31
+ The flow of creating a check: what is checked by a call, what by the end-to-end path, and how a
32
+ scenario is tied to its test.
33
+
34
+ ```mermaid
35
+ flowchart TD
36
+ A[A check is needed] --> B{What the scenario promises}
37
+ B -->|A person sees and does| C[Closed by an end-to-end test on the same path as the user]
38
+ B -->|A value, a state, a refusal| D[Closed by a call]
39
+ D --> E{The decision is baked into a component or a service}
40
+ E -->|Yes| F[Moved into a pure function and checked by a call]
41
+ E -->|No| G[Checked as is]
42
+ F --> H[The moment in time is taken as a parameter, not read from the machine clock]
43
+ G --> H
44
+ C --> I{The test is switched off by an environment variable}
45
+ I -->|Yes| J[Does not count as coverage: the scenario carries a partial-coverage mark with a reason]
46
+ I -->|No| K[The test title carries the scenario number]
47
+ H --> K
48
+ K --> P{A scenario with that number exists in the specs}
49
+ P -->|No| Q[The check turns red: the test refers to a scenario that does not exist]
50
+ P -->|Yes| R{The scenario promises a person something, and the test does not follow their path}
51
+ R -->|Yes| S[Marked as partial coverage: goes into the digest as debt]
52
+ R -->|No| L{The scenario is left without a test}
53
+ L -->|Yes| M[Carries a mark with a reason: an empty one is not accepted]
54
+ L -->|No| N[Done]
55
+ S --> N
56
+ M --> N
57
+ J --> K
58
+ ```
59
+
60
+ ## How the law applies here
61
+
62
+ - **The scenario id stands at the start of the test title, followed by a dash.** One scenario is
63
+ checked by several tests, one test closes several scenarios.
64
+ - **A scenario without a test carries a mark with a reason.** An empty mark is not accepted, and
65
+ a mark next to an existing test is a refusal: it means the debt was closed and the mark not
66
+ removed.
67
+ - **A test that does not follow the user's path is marked as partial coverage.** This holds for a
68
+ scenario that promises a person something; it goes into the digest as debt, not as coverage.
69
+ - **A scenario whose "Then" names a person and what they see is closed by an end-to-end test.**
70
+ A unit test on the same computation stays debt: between a right decision and a person seeing
71
+ it lies everything the unit test did not touch.
72
+ - **An end-to-end test switched off by an environment variable does not count as coverage.** A
73
+ switch by stand state is a skip of a case; a switch by variable is an unrun test. Stand state
74
+ means what the stand never has by design, not what a neighbouring test left on the screen:
75
+ skipping on someone else's trace the law does not count as coverage, and it differs from a
76
+ legitimate skip only by its reason.
77
+ - **A test mentioning a scenario that is not in the specs takes the check down.** That is how a
78
+ renamed or discarded scenario is caught: the tests stay green meanwhile.
79
+ - **A decision is moved into a pure function and checked by a call.** The component and the
80
+ service stay a thin wrapper and are not checked separately while they have no branching of
81
+ their own.
82
+ - **A decision that depends on the current moment takes the moment as a parameter.** It does not
83
+ read the machine clock: the rule is checked by a call, not by winding time around the test. The
84
+ default `= new Date()` goes at the boundary — where a procedure or a service calls the decision.
85
+ - **A hard-coded date in a fixture is the expiry date of the test itself.** The fixture's moment
86
+ and the moment the code under test is called with are taken either both hard-coded or both from
87
+ the clock: mixing the two kinds gives a test green on the day it is written and red a day or a
88
+ week later — on someone else's edit, for whoever did not touch it. Neither the linter, nor the
89
+ build, nor the spec audit knows time.
90
+ - **A Connect procedure is checked by calling its method with a hand-written database double.**
91
+ No container or router needs raising: the test checks the decision, not the layout of fields.
92
+ - **A procedure is also called by the end-to-end suite, not only by the test next to it.** The
93
+ end-to-end suite has its own direct-call helper, and the test takes the server's answer from
94
+ there instead of raising a screen for one field. So "there are no tests for the procedure" is
95
+ stated after a search for its name across the whole tree, end-to-end suites included.
96
+ - **The seed creates what a screen cannot open without, and nothing a guest would take for
97
+ real.** Content with an author — reviews, questions, discussions — a guest reads as written by
98
+ people, and the stand is assembled from the same database as the check by eye. The owner's
99
+ settings — contacts, sender address, keys of external services — the seed does not create
100
+ either: they are entered in the application. What is needed rarely is switched on by a sign in
101
+ the environment, not seeded for all.
102
+ - **An edit of a build step or of the pipeline is checked from scratch, and its PR waits for the run
103
+ on itself.** A cached build answers from what an earlier build left, and the edit looks green
104
+ while a clean runner fails on it. So the build runs twice past the cache with its output removed
105
+ between the runs, and its time is compared with the wait limit of whoever calls it. The request to
106
+ merge names the run on the PR itself: a fix of the pipeline merged unrun broke it a second time.
107
+ - **A created check goes into the push gate or the pipeline, not only into the umbrella target.**
108
+ The umbrella target is run by hand, and a check that lives only there answers whoever
109
+ remembered it: such a check's silence reads as its green answer. Three checks stood outside the
110
+ gate, declaring in their own known lists that they fail on new code.
111
+ - **A check that arrives by layout arrives with its place too.** The place is the name of the
112
+ command that calls it and the line of the suite it stands in. A check without a place is
113
+ recognised only by the layout having put a new file, and the article above has nowhere to put it.
114
+ - **A test that irreversibly changes stand data is switched off by default.** `BASE_URL`
115
+ redirects the run with one variable, and without the switch such a test would edit the data of
116
+ someone else's stand.
117
+ - **Tests that need nginx in front of the application wake together with `BASE_URL`.** A bare
118
+ page server does not pass them: the redirects live in the proxy config.
119
+ - **A linter rule that forbids a technique accepted here is switched off in the config, not
120
+ bypassed in every test.** Where a suite uses test switches, the linter rule
121
+ against skipped tests would forbid all of them at once. The reason is
122
+ written next to the disabling line, and a targeted `eslint-disable` stays for what is forbidden
123
+ for good reason.
124
+ - **A guard lets the action through when it is itself broken.** No input parser, empty input,
125
+ wrong directory, any error of its own — the guard exits zero and lets through: a broken check
126
+ has no right to jam the work. This is declared by the `FAIL-OPEN` line in the guard's own
127
+ header, next to the list of cases, and a new case is added there when it is found.
128
+ - **A guard that did not recognise the call is as silent as a working one.** A zero exit comes in
129
+ two kinds: the guard broke and let through on purpose — declared in its header — or it did not
130
+ recognise its business in the command and never reached the check. From outside they are
131
+ indistinguishable, and the second is declared nowhere and leaves no trace. Two consequences
132
+ follow. The call sign must err towards firing too often: one that fired needlessly is seen at
133
+ once and fixed, one that failed to recognise is never seen. And the tree's accepted way of
134
+ calling the command — by full path, through a wrapper, with variable substitution — goes into
135
+ the sign alongside the bare name: the bypass the command is called by every day is exactly
136
+ where the guard sees nothing.
137
+ - **A test file is edited by the edit tool, the same as a document.** A refused shell command
138
+ writes nothing while the reply looks like a done edit; the article in full is in `doc-style`.
139
+ - **A check's known list is named and explains itself.** The first field of the list is the
140
+ check's name and a word that what is listed does not count as a refusal. Then either two keys —
141
+ the accepted stays forever, the debt was gathered when the check was created and only shrinks —
142
+ or as many keys as the entries have kinds. The reason is mandatory: a lifted check without a
143
+ reason is indistinguishable from an oversight a month later.
144
+ - **An accepted entry differs from debt by whether work is opened for it.** Accepted is what the
145
+ tree does not intend to split; debt is what a task is opened for, and it only shrinks. One list
146
+ for both would mean there is nothing to review: an entry without a task reads as eternal a
147
+ month later, and an entry with a task as an oversight.
148
+ - **Every entry carries its own reason and the number of the task that added it.** A prose reason
149
+ for the whole list explains any of its lines and therefore explains none, and an entry without
150
+ a number cannot be asked of anyone: whoever added it remembers by that day neither the occasion
151
+ nor their decision. An entry without a reason or a number makes the check refuse. Entries are
152
+ written when the check is created and are not added later — neither by the executor's decision
153
+ nor by the owner's word.
154
+ - **A list entry nothing calls any more is removed together with what called it.** Such a line
155
+ silently allows what the tree does not have, and the next reader takes it for a current
156
+ explanation. Not every list has a dead-entry check, so it is removed by the same change that
157
+ removes the place that caused it.
158
+ - **A new check's list is written together with the check for a dead entry in it.** The article
159
+ above leaves the removal to whoever removes the place, and it is kept by memory: an entry whose
160
+ place is gone silently allows what the tree no longer has. A check that reads its own list also
161
+ compares it with what it found and refuses on an entry nothing answers to — then a dead line
162
+ costs the same as a new violation and does not wait for a reader.
163
+ - **Red has an assigned action, and a second rerun is not part of it.** Red comes in two kinds,
164
+ and in the list of runs they look the same: a hosting refusal on the preparation step is cured
165
+ by a rerun, a defect of the branch is not cured by it at all. The assigned action is one: first
166
+ the output of that step, then the decision. A rerun repeated before reading the output fixes
167
+ not the cause but its symptom, and in history looks like work.
168
+ - **A line is not added to the known list for a red check.** The list was gathered by the day the
169
+ check was created and has only shrunk since: an added line hides the signal, not the cause,
170
+ and in history looks the same as a fix. A place where the check looks right by the letter and
171
+ wrong in substance is fixed in the code; a check that is itself wrong is fixed in the check, by
172
+ the analysis the law names — not by a question to the owner. An inline
173
+ mark that switches a check off for one place is the same line, written into the file instead of
174
+ the list. It is not placed even for a moment.
175
+ - **An exchange counts as read on both sides, not by the success of calls.** Sending and editing
176
+ state answer with success even when there is nothing to read the result with: over two hundred
177
+ records stood as new because there was nobody to collect them, and only those whose file still
178
+ lay on the sender's disk got marked. When creating one side of an exchange, the other is named:
179
+ what reads, who reads and what happens if it is absent. The answer "nothing" is written as a
180
+ word — silence about it reads as a working exchange.
181
+ - **A value shared by two sides of an exchange is taken from the declaring side, not computed
182
+ anew.** A record sign, the cargo shape, the way a key is computed — one's own copy of any of
183
+ them drifts from the original silently, and both sides stay green: one writes under its value,
184
+ the other looks under its own. This is checked by a scenario that computes the value both ways
185
+ and compares them, not by one scenario on each side.
186
+ - **A field of an answer the whole application shares is checked at the place of assembly, not
187
+ beside one operation.** A test next to an operation sees what that operation returned, while the
188
+ answer is built elsewhere: every such test stays green when the field reaches no answer at all.
189
+ The check goes where the body is assembled, or walks the whole set of operations at once.
190
+ - **A test asserting absence is green even when it looks for the wrong thing.** There is no match
191
+ for the right text, nor for a typo in the sample, nor for a renamed key — nothing tells them
192
+ apart by the run's colour. So a negative assertion goes paired with a positive one: first it is
193
+ checked that the place sought is found at all, and only then that it lacks what must not be
194
+ there.
195
+ - **A test about a value's absence is built on a value that cannot exist, not on one that is
196
+ merely not filled in yet.** A test that took a real dictionary key as "the untranslated one" is
197
+ green only while nobody translates it: filling the dictionary turns the fallback assertion red,
198
+ and the red points at the fill, not at the test. The value for such a test is made up on the
199
+ spot and by shape cannot enter the set. It is cast into the key type at the call site: a full
200
+ record stays full, and the case keeps its meaning after any fill.
201
+ - **A count taken over a run's output says nothing until the run is known to have reached the step
202
+ counted.** A build, an install and a suite refuse at preparation steps of their own —
203
+ configuration parsing, dependency resolution, path resolution — and such a refusal carries the
204
+ same exit code as a failure of the work itself. A pattern search for the failure's own marks comes
205
+ back empty there, and the emptiness reads as success of everything behind it. So the count goes
206
+ paired with a positive check, the same way a negative assertion does: first the output is read for
207
+ the sign that the counted step ran at all, and only then the marks in it are counted.
208
+ - **A test title promises more than the body checks, and the audit does not see it.** The
209
+ scenario number stands in the title — the scenario counts as covered, and nobody asks what
210
+ exactly is asserted. The body is read together with the title: the promise in the title and the
211
+ assertion in the body are two different texts, and they drift apart silently.
212
+ - **A command's successful answer is re-read by a separate request.** The exit code says the call
213
+ went through and is silent about whether the needed state arrived: creating a task, marking a
214
+ record and assigning a reviewer answer zero even when they did the wrong thing. What goes into
215
+ the reply is what was read, not what was ordered.
216
+ - **A service counts as up by a request it carried through, not by an open port.** The answer on
217
+ the port says someone is listening there and is indistinguishable from a past build left from a
218
+ previous session: both sides of the link are checked — that the client picks that very service
219
+ and that the request went through it.
220
+ - **The snapshot suite's references lie next to the test, are updated by a separate call and read
221
+ by eye.** Updating "just in case" together with the run erases the difference between a fixed
222
+ look and a broken one: an updated reference makes any frame green. Where the references are and
223
+ what updates them is named by the rule's companion.
224
+ - **The browser raster is named explicitly, otherwise a frame does not match itself.** The colour
225
+ profile taken from the machine's display, the accelerator computing the raster and tiled
226
+ repainting — each of the three moves colour by a unit or two per channel, and it shows only
227
+ where blending sits on a rounding boundary: on the anti-aliased corners of the dark theme.
228
+ Waiting for the frame to settle does not help here — the page is drawn, and each time drawn
229
+ slightly differently; all three are named as arguments to the browser at launch and become part
230
+ of the reference.
231
+ - **A mask covers the content but not the width.** A node under a mask still takes its place in
232
+ the layout, and a drifting value inside it moves its neighbours past the mask. Where a node's
233
+ size is computed from its content — a table cell, a label stretching a button — the drift is
234
+ cured in the stand data by a constant value, and then no mask is needed at all.
235
+ - **Not only time is made constant but everything the application derived from it.** The
236
+ application counts from its clock and computes the derivative — month key, deadline, freshness
237
+ sign — at the minute of writing. An edit of times that comes after the write does not move the
238
+ derivative: it was computed earlier and lies in the next column. The divergence does not arrive
239
+ for months, and then the suite turns red on a day when not a line was added to the tree. The
240
+ miss has its own sign, visible by comparing two columns: the derivative stopped matching what
241
+ it had to be derived from.
242
+ - **The seeding checks itself instead of relying on the frame.** The frame says "it became
243
+ different" and is silent about why; a seeding refusal names the reason in words and arrives
244
+ before a single frame is taken. The sign is taken so that it holds on any run day: stand data is
245
+ the past, so a time value that lands on the run day or later was computed by the machine clock
246
+ and not pinned by the seeding. A deliberate future is separated by a boundary and named apart.
247
+ Judged are the time columns of all the tables the screens read, not only those shown today: a
248
+ column is put on screen by one line of markup, and nobody remembers the seeding then.
249
+
250
+ ## What of the law is not here
251
+
252
+ Test completeness is not checked: the audit judges the path — end-to-end or unit — but not how
253
+ much of the promise the test closed on that path. The path sign is read from the word "Then" and
254
+ is deliberately narrow: a scenario whose promise does not name a person does not fall under it
255
+ at all, and the incompleteness mark there is still placed by hand.
256
+
257
+ A coverage mark goes out of date, and no check says so. The audit knows the scenario id against
258
+ the test title, and
259
+ the mark text under it is prose to it: it reads as a current description half a year after the
260
+ debt was closed. The mark is re-read with the edit that touches its subject — otherwise nobody
261
+ re-reads it. Module substitution has no package agreement: whether the tree writes doubles by
262
+ hand is named by the companion.
263
+
264
+ The author alone holds these articles of the law: a test written before the code and red before
265
+ the change; a change with nothing to show red saying so; a test returning the shared state; an
266
+ empty input tested as three states; a declaration read as text written as a literal; a list of
267
+ checks read from output, not from memory; the analysis of a broken check shown to the owner. The
268
+ push set and a check removed from it are `git-workflow`; layout thresholds — `browser-verification`.
269
+
270
+ Observations of how the rules are used this rule does not keep at all: the kind of event, the
271
+ place of writing and what goes outside are the subject of the observability law and the rule
272
+ under it. It is named here so that an observation is not confused with coverage: coverage says
273
+ what was checked, an observation what was used.
274
+
275
+ ## Patterns
276
+
277
+ - `testing-unit` — a test on a pure function, on a Connect procedure and a one-off proof test
278
+ that is not committed.
279
+ - `testing-e2e` — running end-to-end tests, a stand under real nginx, switches.