@rt-tools/agent-kit 0.23.0 → 0.26.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 (288) hide show
  1. package/README.md +8 -2
  2. package/assets/agents/business-analyst.md +51 -50
  3. package/assets/agents/conscience.md +37 -35
  4. package/assets/agents/project-manager.md +49 -48
  5. package/assets/agents/prose-editor.md +31 -29
  6. package/assets/agents/qa-engineer.md +50 -48
  7. package/assets/agents/rules-reviewer.md +63 -58
  8. package/assets/agents/skill-curator.md +83 -78
  9. package/assets/agents/spec-critic.md +34 -29
  10. package/assets/agents/spec-writer.md +35 -32
  11. package/assets/agents/strict-teacher.md +39 -37
  12. package/assets/checks/archive-age.mjs +48 -28
  13. package/assets/checks/archive-prune.mjs +16 -14
  14. package/assets/checks/board-epics.github.mjs +75 -41
  15. package/assets/checks/board-folders.mjs +61 -0
  16. package/assets/checks/board-gh.github.mjs +35 -26
  17. package/assets/checks/board-long-work.github.mjs +24 -24
  18. package/assets/checks/board-paths.github.mjs +21 -16
  19. package/assets/checks/board-runs.github.mjs +45 -43
  20. package/assets/checks/board-titles.github.mjs +19 -17
  21. package/assets/checks/board.github.mjs +150 -128
  22. package/assets/checks/check-archive-age.mjs +23 -19
  23. package/assets/checks/check-board.github.mjs +179 -157
  24. package/assets/checks/check-descriptions.mjs +30 -29
  25. package/assets/checks/check-doc-paths.mjs +104 -82
  26. package/assets/checks/check-dupes.mjs +84 -80
  27. package/assets/checks/check-file-size.mjs +79 -70
  28. package/assets/checks/check-glossary.mjs +47 -37
  29. package/assets/checks/check-hook-scope.mjs +30 -27
  30. package/assets/checks/check-lib-layers.mjs +22 -21
  31. package/assets/checks/check-profile-drift.mjs +48 -43
  32. package/assets/checks/check-prose-style.mjs +125 -33
  33. package/assets/checks/check-push-gate.mjs +53 -50
  34. package/assets/checks/check-reuse.mjs +50 -40
  35. package/assets/checks/check-schema-drift.mjs +87 -83
  36. package/assets/checks/check-specs.mjs +155 -134
  37. package/assets/checks/check-state-next.mjs +66 -52
  38. package/assets/checks/check-states.mjs +32 -30
  39. package/assets/checks/check-styles.mjs +52 -51
  40. package/assets/checks/check-turn-map.mjs +54 -46
  41. package/assets/checks/lib-boundaries.mjs +32 -30
  42. package/assets/checks/lib-common.mjs +30 -29
  43. package/assets/checks/lib-domains.mjs +34 -34
  44. package/assets/checks/lib-manifests.mjs +17 -15
  45. package/assets/checks/lib-reexports.mjs +18 -18
  46. package/assets/checks/rt-kit-checks.config.mjs +174 -142
  47. package/assets/checks/signals.mjs +43 -39
  48. package/assets/checks/spec-anchors.mjs +114 -87
  49. package/assets/checks/spec-common.mjs +128 -84
  50. package/assets/checks/spec-contract.mjs +30 -30
  51. package/assets/checks/spec-proposed.mjs +27 -24
  52. package/assets/checks/spec-scenarios.mjs +51 -28
  53. package/assets/checks/task-new.github.mjs +85 -56
  54. package/assets/commands/feedback.md +65 -59
  55. package/assets/commands/next-session.md +64 -57
  56. package/assets/commands/skill-curator.md +83 -79
  57. package/assets/defaults/gate-map.sh +115 -91
  58. package/assets/defaults/project.sh +228 -178
  59. package/assets/defaults/shell.sh +85 -65
  60. package/assets/defaults/turn-map.md +45 -44
  61. package/assets/docs/GLOSSARY.md +142 -65
  62. package/assets/hooks/browser-device-id.sh +12 -12
  63. package/assets/hooks/browser-guard-device-id.sh +46 -14
  64. package/assets/hooks/browser-guard-no-asking.sh +5 -4
  65. package/assets/hooks/browser-guard-no-listing.sh +12 -11
  66. package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
  67. package/assets/hooks/browser-guard-require-select.sh +34 -23
  68. package/assets/hooks/claim-guard.sh +62 -56
  69. package/assets/hooks/commit-msg.sh +11 -10
  70. package/assets/hooks/conscience-guard.sh +91 -45
  71. package/assets/hooks/constitution-index.sh +16 -16
  72. package/assets/hooks/deny-tail.sh +28 -26
  73. package/assets/hooks/dev-server-guard.sh +46 -43
  74. package/assets/hooks/dispatch.sh +84 -39
  75. package/assets/hooks/docs-guard.sh +105 -86
  76. package/assets/hooks/exam-guard.sh +146 -84
  77. package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
  78. package/assets/hooks/git-guard-delivery-draft.sh +85 -0
  79. package/assets/hooks/git-guard-delivery-folder.sh +50 -43
  80. package/assets/hooks/git-guard-delivery-signature.sh +88 -52
  81. package/assets/hooks/git-guard-delivery.sh +207 -253
  82. package/assets/hooks/git-guard-main.sh +65 -26
  83. package/assets/hooks/git-guard-push-tests.sh +133 -75
  84. package/assets/hooks/glossary-load.sh +23 -22
  85. package/assets/hooks/grill-gate-ask.sh +12 -11
  86. package/assets/hooks/grill-gate.sh +94 -87
  87. package/assets/hooks/guard-note.sh +20 -19
  88. package/assets/hooks/handoff-entry-guard.sh +26 -24
  89. package/assets/hooks/handoff-write.sh +74 -67
  90. package/assets/hooks/hook-input.sh +70 -50
  91. package/assets/hooks/lint-after-edit.sh +95 -61
  92. package/assets/hooks/observe.sh +28 -26
  93. package/assets/hooks/override-write-guard.sh +23 -21
  94. package/assets/hooks/postmortem-guard.sh +42 -39
  95. package/assets/hooks/profile-check.sh +22 -20
  96. package/assets/hooks/proposal-guard.sh +57 -49
  97. package/assets/hooks/prose-style-guard.sh +19 -17
  98. package/assets/hooks/qa-dataid-guard.sh +52 -49
  99. package/assets/hooks/rerun-guard.sh +31 -30
  100. package/assets/hooks/reuse-first-guard.sh +108 -87
  101. package/assets/hooks/roles.sh +14 -14
  102. package/assets/hooks/rule-article.sh +36 -34
  103. package/assets/hooks/rule-source-guard.sh +52 -36
  104. package/assets/hooks/skill-gate-layers.sh +59 -57
  105. package/assets/hooks/skill-gate-rearm.sh +15 -8
  106. package/assets/hooks/skill-gate.sh +89 -81
  107. package/assets/hooks/skill-loaded.sh +6 -6
  108. package/assets/hooks/sql-guard-parse.sh +68 -66
  109. package/assets/hooks/sql-guard-request.sh +48 -46
  110. package/assets/hooks/sql-guard-target.sh +57 -51
  111. package/assets/hooks/sql-guard-write.sh +84 -79
  112. package/assets/hooks/sql-guard.sh +52 -47
  113. package/assets/hooks/stand-login-guard.sh +104 -0
  114. package/assets/hooks/task-context-load.sh +60 -55
  115. package/assets/hooks/task-flow-context.sh +87 -69
  116. package/assets/hooks/task-flow-draft-guard.sh +55 -48
  117. package/assets/hooks/task-flow-guard.sh +67 -64
  118. package/assets/hooks/turn-entry-load.sh +39 -32
  119. package/assets/hooks/turn-exit-guard.sh +256 -204
  120. package/assets/hooks/turn-exit-patterns.sh +53 -0
  121. package/assets/hooks/utf8.sh +11 -11
  122. package/assets/hooks/waiting-turn-guard.sh +94 -94
  123. package/assets/hooks/window-fill-guard.sh +70 -62
  124. package/assets/hooks/work-start-guard.sh +52 -49
  125. package/assets/hooks/write-targets.sh +115 -30
  126. package/assets/laws/autonomous-work.md +29 -27
  127. package/assets/laws/code-structure.md +31 -30
  128. package/assets/laws/delivery.md +148 -137
  129. package/assets/laws/entity-editing.md +52 -50
  130. package/assets/laws/entity-models.md +14 -13
  131. package/assets/laws/frontend-application.md +39 -38
  132. package/assets/laws/lib-imports.md +27 -27
  133. package/assets/laws/lists.md +31 -29
  134. package/assets/laws/navigation.md +37 -37
  135. package/assets/laws/observability.md +41 -40
  136. package/assets/laws/project-documentation.md +106 -99
  137. package/assets/laws/reuse-first.md +31 -29
  138. package/assets/laws/shared-code.md +27 -27
  139. package/assets/laws/verifiability.md +131 -114
  140. package/assets/laws/work-conduct.md +250 -250
  141. package/assets/patterns/admin-lists-screen.md +72 -69
  142. package/assets/patterns/admin-nav-item.md +51 -46
  143. package/assets/patterns/angular-patterns-state.md +32 -31
  144. package/assets/patterns/api-layer-pair.md +33 -31
  145. package/assets/patterns/autonomous-work-run.md +50 -49
  146. package/assets/patterns/browser-verification-measure.md +143 -67
  147. package/assets/patterns/browser-verification-stand.md +181 -128
  148. package/assets/patterns/component-structure-new.md +51 -42
  149. package/assets/patterns/dependencies-upgrade.md +55 -39
  150. package/assets/patterns/doc-style-human.md +93 -0
  151. package/assets/patterns/doc-style-sweep.md +82 -79
  152. package/assets/patterns/doc-style-trace.md +87 -81
  153. package/assets/patterns/doc-style-write.md +130 -122
  154. package/assets/patterns/entity-aside.md +77 -63
  155. package/assets/patterns/entity-models-new.md +37 -37
  156. package/assets/patterns/entity-store.md +33 -33
  157. package/assets/patterns/git-workflow-commit.azure.md +94 -75
  158. package/assets/patterns/git-workflow-commit.github.md +153 -129
  159. package/assets/patterns/git-workflow-commit.gitlab.md +96 -78
  160. package/assets/patterns/git-workflow-docker.md +165 -147
  161. package/assets/patterns/git-workflow-freshness.md +45 -45
  162. package/assets/patterns/git-workflow-merge.md +99 -86
  163. package/assets/patterns/git-workflow-migration.md +54 -52
  164. package/assets/patterns/git-workflow-pr-ready.md +57 -56
  165. package/assets/patterns/git-workflow-pr.azure.md +126 -121
  166. package/assets/patterns/git-workflow-pr.github.md +179 -175
  167. package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
  168. package/assets/patterns/git-workflow-restart.md +35 -31
  169. package/assets/patterns/git-workflow-secrets.md +80 -73
  170. package/assets/patterns/git-workflow-stack.md +131 -106
  171. package/assets/patterns/lib-layers-move.md +62 -53
  172. package/assets/patterns/lib-layers-new.md +59 -45
  173. package/assets/patterns/observability-record.md +72 -67
  174. package/assets/patterns/platform-access-di.md +31 -29
  175. package/assets/patterns/reuse-first-extend.md +66 -61
  176. package/assets/patterns/shared-code-new.md +39 -38
  177. package/assets/patterns/spec-driven-domain.md +161 -151
  178. package/assets/patterns/spec-driven-rule.md +179 -168
  179. package/assets/patterns/spec-driven-sweep.md +41 -39
  180. package/assets/patterns/status-report-table.github.md +37 -36
  181. package/assets/patterns/styling-bem-component.md +42 -42
  182. package/assets/patterns/styling-bem-layout.md +39 -34
  183. package/assets/patterns/styling-bem-sheet.md +59 -58
  184. package/assets/patterns/task-flow-archive.md +222 -215
  185. package/assets/patterns/task-flow-close.md +215 -203
  186. package/assets/patterns/task-flow-handoff.md +154 -145
  187. package/assets/patterns/task-flow-resume.md +138 -133
  188. package/assets/patterns/task-flow-start.md +204 -192
  189. package/assets/patterns/testing-e2e.md +103 -92
  190. package/assets/patterns/testing-unit.md +77 -70
  191. package/assets/patterns/ts-procedure.md +32 -29
  192. package/assets/patterns/turn-entry-map.md +50 -48
  193. package/assets/pitfalls/agent-kit.md +152 -141
  194. package/assets/pitfalls/doc-style.md +96 -91
  195. package/assets/pitfalls/git-workflow.azure.md +49 -46
  196. package/assets/pitfalls/git-workflow.github.md +264 -234
  197. package/assets/pitfalls/git-workflow.gitlab.md +49 -45
  198. package/assets/pitfalls/spec-driven.md +73 -71
  199. package/assets/pitfalls/styling-bem.md +46 -40
  200. package/assets/pitfalls/task-flow.md +262 -246
  201. package/assets/pitfalls/testing.md +99 -92
  202. package/assets/pitfalls/turn-conduct.md +96 -81
  203. package/assets/rules/angular-patterns.md +81 -80
  204. package/assets/rules/api-layer.md +77 -74
  205. package/assets/rules/autonomous-work.md +75 -74
  206. package/assets/rules/browser-verification.md +223 -188
  207. package/assets/rules/component-structure.md +72 -69
  208. package/assets/rules/dependencies.md +74 -67
  209. package/assets/rules/deploy-flow.azure.md +118 -108
  210. package/assets/rules/deploy-flow.github.md +145 -135
  211. package/assets/rules/deploy-flow.gitlab.md +120 -110
  212. package/assets/rules/doc-style.md +209 -148
  213. package/assets/rules/entity-conventions.needs-admin.md +81 -79
  214. package/assets/rules/entity-models.md +73 -70
  215. package/assets/rules/git-workflow.azure.md +224 -228
  216. package/assets/rules/git-workflow.github.md +250 -242
  217. package/assets/rules/git-workflow.gitlab.md +218 -217
  218. package/assets/rules/lib-layers.md +85 -86
  219. package/assets/rules/lists.md +101 -97
  220. package/assets/rules/navigation.md +78 -78
  221. package/assets/rules/observability.needs-app.md +165 -153
  222. package/assets/rules/platform-access.md +76 -75
  223. package/assets/rules/reuse-first.md +153 -137
  224. package/assets/rules/shared-code.md +82 -79
  225. package/assets/rules/spec-driven.md +272 -260
  226. package/assets/rules/status-report.md +55 -58
  227. package/assets/rules/styling-bem.md +83 -72
  228. package/assets/rules/task-flow.md +282 -270
  229. package/assets/rules/testing.md +224 -188
  230. package/assets/rules/turn-conduct.md +255 -258
  231. package/assets/rules/turn-entry.md +92 -87
  232. package/assets/rules/typescript-conventions.md +94 -88
  233. package/assets/samples/specs/_template/spec.md +47 -47
  234. package/assets/samples/tasks/_template/grill.md +20 -20
  235. package/assets/samples/tasks/_template/plan.md +32 -30
  236. package/assets/samples/tasks/_template/progress.md +16 -16
  237. package/assets/skills/agent-kit-extend.md +129 -113
  238. package/assets/skills/agent-kit.md +236 -222
  239. package/assets/skills/write-a-skill.md +76 -71
  240. package/assets/templates/findings.md +19 -19
  241. package/assets/templates/gate-map.sh +16 -14
  242. package/assets/templates/implementation.md +28 -27
  243. package/assets/templates/pattern.md +17 -17
  244. package/assets/templates/pitfalls.md +6 -6
  245. package/assets/templates/postmortem.md +24 -23
  246. package/assets/templates/project.sh +24 -24
  247. package/assets/templates/proposal.md +62 -60
  248. package/assets/templates/rule.md +38 -38
  249. package/assets/workflows/feature.js +46 -46
  250. package/assets/workflows/plan.js +54 -54
  251. package/lib/catalog.d.ts +2 -0
  252. package/lib/catalog.d.ts.map +1 -1
  253. package/lib/catalog.js +4 -3
  254. package/lib/catalog.js.map +1 -1
  255. package/lib/commands.d.ts.map +1 -1
  256. package/lib/commands.js +68 -4
  257. package/lib/commands.js.map +1 -1
  258. package/lib/companion.js +3 -2
  259. package/lib/companion.js.map +1 -1
  260. package/lib/enroll.d.ts +7 -1
  261. package/lib/enroll.d.ts.map +1 -1
  262. package/lib/enroll.js +13 -4
  263. package/lib/enroll.js.map +1 -1
  264. package/lib/observations.d.ts +10 -1
  265. package/lib/observations.d.ts.map +1 -1
  266. package/lib/observations.js +1 -0
  267. package/lib/observations.js.map +1 -1
  268. package/lib/override-marks.d.ts +24 -0
  269. package/lib/override-marks.d.ts.map +1 -0
  270. package/lib/override-marks.js +98 -0
  271. package/lib/override-marks.js.map +1 -0
  272. package/lib/plan.d.ts +11 -0
  273. package/lib/plan.d.ts.map +1 -1
  274. package/lib/plan.js +10 -1
  275. package/lib/plan.js.map +1 -1
  276. package/lib/ship.d.ts +0 -7
  277. package/lib/ship.d.ts.map +1 -1
  278. package/lib/ship.js +10 -2
  279. package/lib/ship.js.map +1 -1
  280. package/lib/shipment.d.ts.map +1 -1
  281. package/lib/shipment.js +7 -3
  282. package/lib/shipment.js.map +1 -1
  283. package/lib/sync.d.ts.map +1 -1
  284. package/lib/sync.js +45 -11
  285. package/lib/sync.js.map +1 -1
  286. package/package.json +1 -1
  287. package/rt-tools-agent-kit-0.26.0.tgz +0 -0
  288. package/rt-tools-agent-kit-0.23.0.tgz +0 -0
@@ -2,284 +2,296 @@
2
2
  name: task-flow
3
3
  kind: rule
4
4
  law: work-conduct
5
- description: Правило под «Закон о ведении работы» — ход работы от просьбы владельца до слияния. Брать в начале любой работы, при правке папок задач и договорённостей о продукте, при возвращении к незаконченной задаче. Паттерны: task-flow-start, -resume, -close, -archive. Конец хода — правило turn-conduct.
5
+ description: Rule under the work-conduct law — the course of work from the owner's request to the merge. Load at the start of any work, when editing task folders and product agreements, and when returning to an unfinished task. Patterns task-flow-start, -resume, -close, -archive. End of a turn — turn-conduct.
6
6
  ---
7
7
 
8
- # Ведение работы — как это устроено здесь
9
-
10
- Правило под закон `docs/constitution/work-conduct.md`. Закон говорит, что должно быть верно
11
- про ход работы; здесь — чем это названо в этом дереве, где лежит и что из закона у нас не
12
- проверяется.
13
-
14
- **Холодная часть:** `pitfalls.md` рядом — ловушки и поведение по разборам происшествий.
15
- Грузится по требованию, а не вместе с правилом: при обычном решении она не нужна — она нужна
16
- тому, кто разбирает промах или спорит с гардом.
17
-
18
- **Требует:** `hooks/task-flow-guard.sh`, `hooks/task-flow-draft-guard.sh`, `hooks/task-context-load.sh`, `hooks/grill-gate.sh`, `hooks/window-fill-guard.sh`, `hooks/turn-exit-guard.sh`, `hooks/work-start-guard.sh`
19
-
20
- ## Как это называется здесь
21
-
22
- | В законе | Здесь |
23
- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
24
- | просьба владельца | то, с чего начинается работа; разбирается командой `/grill-me` до первой правки |
25
- | понимание, записанное там, где идёт работа | `docs/tasks/<ветка>/grill.md` — просьба дословно, ответы владельца его словами, решения с доводами |
26
- | замысел | `docs/tasks/<ветка>/plan.md` — след задачи и этапы с признаками готовности; после написания не правится |
27
- | ход работы | `docs/tasks/<ветка>/progress.md` — «Где стоим», решения по ходу, записи заходов; единственное место, где отмечается сделанное |
28
- | договорённость о продукте, записанная до кода | `docs/specs/<домен>/proposed/<фича>/` — спек фичи; переживает мерж и вливается в спек домена |
29
- | эпик — работа шире одной ветки | карточка в очереди работ с меткой эпика и замысел рядом с ней: возможность, состав задач и порядок |
30
- | замысел эпика | запись вне папки задачи: та умирает с мержем, а эпик её переживает; каталог называет компаньон правила |
31
- | папка задачи до заведения задачи | `docs/tasks/_draft-<slug>/` — вне истории, пока номера нет |
32
- | разведка | заход `Explore` или `general-purpose` до первого вопроса владельцу |
33
- | разбор замысла ролями | `.claude/workflows/plan.js` — нужность, договорённость, критика, замысел |
34
-
35
- ## Где это лежит
36
-
37
- В этом дереве — таблица в `implementation.md` рядом. Пути живут там, а не здесь: правило
38
- переносится между репозиториями, раскладка — нет, и путь, названный в правиле, врёт в первом
39
- же дереве, которое держит код иначе.
40
-
41
- ## Состояния работы
42
-
43
- Единица работы — состояние, а не шаг. У состояния есть вход, обязательное действие и выход, и
44
- пока действие не сделано, работа стоит в том же состоянии. Список шагов этого не давал: шаг
45
- кончался, а что делать дальше, выводилось из соседних строк.
46
-
47
- Состояние объявляется в разделе «Где стоим» хода работы машиночитаемой строкой
48
- ``- **Состояние:** `этап-идёт` `` и перезаписывается вместе с ним.
49
-
50
- | Состояние | Вход в него | Обязательное действие | Ведёт паттерн |
51
- | ------------------------- | ----------------------------------------------- | ------------------------------------------------------ | ------------------ |
52
- | `просьба-не-разобрана` | реплика владельца о новой работе | разведка по дереву, затем вопросы | `task-flow-start` |
53
- | `разбор-закрыт` | ответы владельца лежат на диске | договорённость о продукте либо причина её отсутствия | `task-flow-start` |
54
- | `договорённость-записана` | драфт лежит или причина названа | завести задачу, ветку и папку | `task-flow-start` |
55
- | `задача-взята` | задача в колонке работы, ветка по номеру, папка | написать замысел | `task-flow-start` |
56
- | `замысел-записан` | замысел лежит и после записи не правится | делать первый этап | `task-flow-start` |
57
- | `этап-идёт` | этап начат | доделать этап и отметить в ходе работы | `task-flow-resume` |
58
- | `этапы-кончились` | все этапы отмечены | влить договорённость, привести тексты, прогнать набор | `task-flow-close` |
59
- | `разбор-кончился` | набор зелёный, тексты приведены | разобрать папку последним коммитом | `task-flow-archive` |
60
- | `папка-разобрана` | папки в ветке нет, запись в архиве есть | открыть PR черновиком | `task-flow-close` |
61
- | `работа-отдана` | PR открыт черновиком | взять следующую задачу | `task-flow-resume` |
62
- | `влито` | PR слит человеком | разбор работы правилами и сверка очереди | `task-flow-archive` |
63
-
64
- Ни у одного состояния обязательное действие не звучит как «ждать»: ожидание чужого шага
65
- состоянием работы не является, поэтому в `работа-отдана` обязательное действие смотрит на
66
- следующую задачу, а не на открытый PR. Блокированная задача следующей при этом не считается: она
67
- начнётся после чужого шага, то есть это то же ожидание, названное именем работы. Следующая
68
- берётся из очереди работ, а очередь спрашивается командой: «задач нет» — утверждение о дереве, и
69
- подтверждается оно выводом, а не памятью о том, что заводил сам исполнитель. Заполнение окна
70
- захода состоянием тоже не бывает: заход кончается передачей, а работа остаётся там, где стояла.
71
- Чем ход кончается — правило `turn-conduct` под тем же законом.
72
-
73
- Перечень показывается владельцу в начале работы, и на нём же отмечается, где стоим.
74
-
75
- Последние два состояния объявить на диске уже нечем: ход работы уезжает вместе с папкой, а папка
76
- разбирается раньше, чем открывается PR. Признак у них поэтому в истории ветки — коммит разбора
77
- папки, — и читает его гард, а не строка в файле. Цена: с этой минуты и до слияния состояние
78
- работы виду не подлежит, и хвост из четырёх шагов держится паттерном, а не объявлением.
79
-
80
- ## Ход
81
-
82
- Ход работы от просьбы владельца до закрытия: где стоит разбор, что требует гард и куда девается
83
- папка задачи.
8
+ # Work conduct — how it works here
9
+
10
+ Rule under the law `docs/constitution/work-conduct.md`. The law says what must be true about the
11
+ course of work; here — what it is called in this tree, where it lives and what is not checked here.
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/grill-gate.sh`, `hooks/window-fill-guard.sh`,
19
+ `hooks/turn-exit-guard.sh`, `hooks/work-start-guard.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; survives the merge and merges into the domain spec |
30
+ | an epic — work wider than one branch | a card in the work queue with the epic label and a plan next to it: the opportunity, the tasks, their order |
31
+ | the epic plan | a record outside the task folder: the folder dies with the merge, the epic outlives it; the directory — in the rule's companion |
32
+ | the task folder before the task is created | `docs/tasks/_draft-<slug>/` — outside history while there is no number |
33
+ | exploration | an `Explore` or `general-purpose` session before the first question to the owner |
34
+ | the plan review by roles | `.claude/workflows/plan.js` — need, agreement, critique, plan |
35
+
36
+ ## Where it lives
37
+
38
+ In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
39
+ travels between repositories, the layout does not, and a path named in the rule lies in the first
40
+ tree that keeps its code differently.
41
+
42
+ ## Work states
43
+
44
+ The unit of work is a state, not a step. A state has an entry, a mandatory action and an exit, and
45
+ until the action is done the work stays in the same state.
46
+
47
+ The state is declared in the "Where we stand" section of the progress by the machine-readable line
48
+ ``- **State:** `этап-идёт` `` and is rewritten with it.
49
+
50
+ | State | Entry | Mandatory action | Pattern |
51
+ | --- | --- | --- | --- |
52
+ | `просьба-не-разобрана` | the owner's message about new work | exploration over the tree, then questions | `task-flow-start` |
53
+ | `разбор-закрыт` | the owner's answers lie on disk | a product agreement, or the reason there is none | `task-flow-start` |
54
+ | `договорённость-записана` | the draft lies, or the reason is named | create the task, the branch and the folder | `task-flow-start` |
55
+ | `задача-взята` | task in the work column, branch by number, folder | write the plan | `task-flow-start` |
56
+ | `замысел-записан` | the plan lies and is not edited after writing | do the first stage | `task-flow-start` |
57
+ | `этап-идёт` | a stage is begun | finish the stage and mark it in the progress | `task-flow-resume` |
58
+ | `этапы-кончились` | all stages are marked | merge the agreement, bring texts up to date, run the suite | `task-flow-close` |
59
+ | `разбор-кончился` | the suite is green, texts are up to date | take the folder apart by the last commit | `task-flow-archive` |
60
+ | `папка-разобрана` | no folder in the branch, a record in the archive | open the PR as a draft | `task-flow-close` |
61
+ | `работа-отдана` | the PR is open as a draft | take the next task | `task-flow-resume` |
62
+ | `влито` | the PR merged by a person | rules review of the work and the work queue audit | `task-flow-archive` |
63
+
64
+ No state has a mandatory action that sounds like "wait": waiting for someone else's step is not a
65
+ work state, so in `работа-отдана` the mandatory action is the next task, not the open PR. A blocked
66
+ task does not count as next: the same waiting under the name of work. The next is taken from the
67
+ work queue, and the queue is asked by a command: "no tasks" is a statement about the tree, backed by
68
+ output, not by the executor's memory. A filled session window is no state either: the session ends
69
+ with a handover, and the work stays where it stood. **An open card says nothing about whether the
70
+ work is taken.** A card is closed by the merge, and in a session that opens no PRs the list of open
71
+ ones does not shrink. A task is untaken when the tree holds no trace of it: open numbers are checked
72
+ against the archive — closed work has a record there with its number. The audit costs one command
73
+ and answers for both sides; the open list answers for neither.
74
+
75
+ What a turn ends with — rule `turn-conduct` under the same law.
76
+
77
+ The list is shown to the owner at the start of work, and where we stand is marked on it.
78
+
79
+ The last two states cannot be declared on disk: the progress leaves with the folder, and the folder
80
+ is taken apart before the PR opens. Their sign is in the branch history — the commit that takes the
81
+ folder apart — and a guard reads it, not a line in a file.
82
+
83
+ ## Flow
84
+
85
+ The course of work from the owner's request to closing: where the grill stands, what the guard
86
+ demands and where the task folder goes.
84
87
 
85
88
  ```mermaid
86
89
  flowchart TD
87
- A[Просьба владельца] --> B[Разведка по дереву — до первого вопроса]
88
- B --> C[Разбор просьбы: шесть обязательных вопросов, ответы ложатся на диск]
89
- C --> D{Правка задевает код приложения}
90
- D -->|Да| E[Пишется договорённость о продукте — до кода]
91
- D -->|Нет| F[В замысле стоит причина, по которой её нет]
92
- E --> Z{Из разбора вышло несколько задач}
90
+ A[The owner's request] --> B[Exploration over the tree — before the first question]
91
+ B --> C[Grill: six mandatory questions, the answers land on disk]
92
+ C --> D{The edit touches application code}
93
+ D -->|Yes| E[A product agreement is written — before the code]
94
+ D -->|No| F[The plan states the reason there is none]
95
+ E --> Z{The grill produced several tasks}
93
96
  F --> Z
94
- Z -->|Да| Y[Серия объявляется эпиком: карточкой и замыслом, до первой задачи]
95
- Z -->|Нет| G[Задача, ветка, папка задачи по имени ветки]
97
+ Z -->|Yes| Y[The series is declared an epic: a card and a plan, before the first task]
98
+ Z -->|No| G[Task, branch, task folder by branch name]
96
99
  Y --> G
97
- G --> H[Замысел с этапами; после записи он не правится]
98
- H --> I{Этап сделан}
99
- I -->|Да| J[Отметка в ходе работы — единственном месте, где отмечается сделанное]
100
+ G --> H[A plan with stages; not edited after it is written]
101
+ H --> I{Stage done}
102
+ I -->|Yes| J[A mark in the progress — the only place where done work is marked]
100
103
  J --> I
101
- I -->|Этапы кончились| T[Договорённость вливается в спек домена, тексты приводятся к сделанному, следом прогоняется набор]
102
- T --> N[Папка задачи разбирается последним коммитом: разбор просьбы — в описание прошлого, находки — к замыслу эпика, замысел — прочь]
103
- N --> S[Сверка очереди работ]
104
- S --> K[PR открывается черновиком; исполнитель называет номер, чего ждёт и что сделает следом]
105
- K --> W[Разбор закрытой работы правилами уходит в фон, находки ложатся на диск]
106
- W --> L[Пока PR ждёт разбора, берётся следующая задача]
107
- L --> M{Разбор и прогон кончились}
108
- M -->|Красный прогон или замечания| V[Чинится в той же ветке: замысла на диске уже нет, и признак работы гард берёт из истории ветки]
104
+ I -->|Stages are over| T[The agreement merges into the domain spec, texts are brought up to what was done, then the suite runs]
105
+ 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]
106
+ N --> S[Work queue audit]
107
+ S --> K[The PR opens as a draft; the executor names the number, what it waits for and what comes next]
108
+ K --> W[The rules review of the closed work goes to the background, findings land on disk]
109
+ W --> L[While the PR waits for review, the next task is taken]
110
+ L --> M{Review and run are over}
111
+ 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]
109
112
  V --> M
110
- M -->|Зелено и замечаний нет| O[Черновик снимается, слияние нажимает человек]
113
+ M -->|Green and no remarks| O[The draft is lifted, a person presses merge]
111
114
  ```
112
115
 
113
- ## Как закон применяется здесь
114
- - **Правка кода приложения отбивается, пока работа не дошла до состояния, в котором код
115
- правится.** Гард хода работы требует три вещи: папку задачи по имени ветки, замысел в ней и
116
- объявленное в ходе работы состояние. Договорённость о продукте требует свой гард на те же
117
- события.
118
- - **Гард судит объявленный переход, а не наличие файлов.** Пустой замысел лежит так же, как
119
- написанный, поэтому отказ снимает объявленное состояние — `этап-идёт`, `этапы-кончились`,
120
- `разбор-кончился`. Четвёртый путь не состояние, а история ветки: папка, разобранная её
121
- коммитом, означает отданную работу, и правка по замечаниям идёт без замысла на диске.
122
- - **Строка состояния, переведённая вперёд, — то же объявление намерения, только машиночитаемое.**
123
- Состояние объявляется тем ходом, в котором его обязательное действие начато делом.
124
- - **Отказ по состоянию называет обязательное действие объявленного состояния.** Услышав только
125
- «не в том состоянии», исполнитель перепишет строку состояния вместо шага.
126
- - **Именем состояния считается только слово из перечня.** Своё слово не говорит ни о входе, ни о
127
- выходе, ни об обязательном действии.
128
- - **Два требования — два гарда, и снять одно можно, не теряя второго.** Судят порознь: строка о
129
- неизменном поведении снимает договорённость, а не требование дойти до правки кода.
130
- - **Влитая договорённость ветку не запирает.** После вливания директории «предложено» на диске
131
- нет, а замысел ссылается на неё до конца работы: влитое от незаведённого гард отличает по
132
- истории ветки.
133
- - **Договорённость требуется по путям правки, а не по оценке задачи.** `apps/**` и `libs/**` —
134
- признак; правила, тексты, обвязка и зависимости под него не подпадают. Обход — строка
135
- `**Поведение:** не меняется — <причина владельца>` в замысле; пустая причина не принимается.
136
- - **Что требует слова владельца, берётся списком, а не оценкой на месте.** Оценку «это безопасно»
137
- назначает тот, кому она удобна. Недовольство владельца простоем разрешением не бывает.
138
- - **На команду владельца ответ начинается с результата, а не с намерения и не с его обоснования.**
139
- Владелец, поставивший задачу, мнения о ней не запрашивал, и обоснование при уже принятом чужом
140
- решении читается его оценкой: авторство переписывается на исполнителя. Исключение одно —
141
- исполнение упёрлось в препятствие: тогда называется препятствие, а не отношение к задаче.
142
- - **Заход работу не начинает сам.** Начало требует слова владельца в этом же заходе: передача,
143
- состояние из хука запуска и назначенный эпик говорят, что делать, если работать, и молчат о
144
- том, работать ли. Судится это формой реплики, а не смыслом: правка кода после пустой реплики,
145
- одного слова или одного пути ход не заканчивает.
146
- - **Указание работать по ходу работы покрывает все его шаги, включая меняющие историю.**
147
- Спрашивают о том, чего в ходе работы нет.
148
- - **Вопрос, записанный прошлым заходом, вопросом владельца не становится.** Он адресован автору
149
- передачи, и часть таких вопросов закрыта шагом работы.
150
- - **Указание владельца действует до его отмены, и новый факт против него — строка в ответе о
151
- цене, а не новый вопрос.** Переспрашивают то, чего указание не покрывает; обстоятельство,
152
- меняющее цену указания, но не смысл, называется вслух, и работа идёт дальше. Меню, где два
153
- варианта из трёх предлагают отменить решение владельца, и есть такая отмена. Правило о развилке
154
- говорит, КАК задавать вопрос, и молчит о том, задавать ли его вовсе.
155
- - **Ответ, данный репликой владельца, записан наравне с ответом в документе.** Вопрос, на который
156
- в разговоре уже отвечали, второй раз не задают.
157
- - **Слово владельца об устройстве — постановка, а не решение.** Названное им обычно уже живёт в
158
- дереве под этим самым словом — именем на экране, разделом спека, полем модели, — и сверяется с
159
- ними до правки. Разошлось прочтение — спрашивается владелец: истолкованное по ближайшему коду
160
- выглядит исполненной просьбой ровно до приёмки.
161
- - **Папка задачи заводится под любую работу, без исключений.** Исключение, у которого есть хоть
162
- одна законная форма, исполняется как разрешение. Заводится она до первой правки.
163
- - **Папка задачи едет в ветку коммитом, а не живёт в одном рабочем дереве.** Незакоммиченная,
164
- она проходит все правки без отказа, а отказ приходит в последней точке, когда замысел уже снят:
165
- признак отданной работы берётся из истории. Вне истории законен один черновик без номера.
166
- - **Папка задачи разбирается последним коммитом до открытия PR, а не после одобрения.** Человек
167
- вливает, как только видит зелёное, и закрывающему коммиту места не остаётся вовсе. Цена:
168
- замысла с этой минуты на диске нет, и признак отданной работы гард берёт из истории ветки.
169
- - **Открыв PR, исполнитель называет владельцу номер, чего ждёт и что сделает следом.** Ждёт он
170
- прогона, следом снимает черновик: зелёный прогон говорит, что не сломано, и молчит о
171
- заблокированной у черновика кнопке слияния.
172
- - **Просьба о слиянии — отдельный ход, и раньше зелёного прогона её не бывает.** Порядок один:
173
- папка разобрана и запушена → PR открыт черновиком → прогон зелёный → черновик снят →
174
- исполнитель просит влить, называя номер.
175
- - **PR открывается черновиком, а не в конце работы.** До открытия владелец правки не видит
176
- вовсе, а открытый PR читается как приглашение влить — поэтому незаконченная работа идёт
177
- черновиком. Черновик снимается тем ходом, которым исполнитель говорит, что решение готово.
178
- - **Гард замысла — нижняя граница требования, а не его предел.** Он требует папку только под
179
- правку кода приложения, а статья выше — под любую работу. Прочитанный как признак, он
180
- становится разрешением работать без замысла везде, куда не смотрит.
181
- - **Указание работать по правилу — это указание делать его шаги, включая меняющие историю.**
182
- Отметка этапа, коммит, пуш и открытие заявки правилом предписаны: спросить надо о том, чего в
183
- нём нет. Ход, доведший работу до готовности и вставший перед коммитом, её не отдал, а спрятал.
184
- - **Взятая задача ходом не кончается.** Заведение задачи, ветки, колонки и папки — подготовка:
185
- она переводит работу в состояние записанного замысла, где действие уже другое. Держит это страж
186
- выхода хода, называя в отказе первый этап.
187
- - **Ожидание одной части этапа остановкой этапа не бывает.** Независимые от ожидаемого части
188
- делаются тем же ходом, а владельцу называется, что сделано и что осталось на его шаг. Отбитая
189
- команда читается так же: сперва делается всё, что мимо неё.
190
- - **Сделанное отмечается только в ходе работы.** «Где стоим» перезаписывается каждым заходом, а
191
- не дописывается: это первое, что читает следующий заход.
192
- - **Слово для нового понятия ищется в словаре дерева.** Общую часть везёт пакет, предметную
193
- дописывает дерево надстройкой; словарь уезжает в контекст на запуске сессии целиком, поэтому
194
- «не читал» основанием не бывает.
195
- - **Папка задачи заводится черновиком и получает номер командой.** До конца разбора неизвестно,
196
- сколько задач из него выйдет, поэтому номер не бывает первым. Команда переименовывает черновик,
197
- проставляет шапку замысла и снимает с копий шапку раскладки.
198
- - **Брошенный разбор виден.** Черновик старше недели перечисляет сверка очереди.
199
- - **Следующая задача берётся из замысла эпика, а список очереди работ спрашивается только там, где
200
- эпика нет.** По списку номеров первая задача чужого эпика неотличима от своей. Кончившийся эпик
201
- называется владельцу тем же ходом, которым берётся работа вне его.
202
- - **Эпик не закрывается по признаку, подтверждённому только чтением.** Проверяемое глазами
203
- называется проверенным лишь вместе с командой и её выводом.
204
- - **Задачи эпика заводятся все разом, тем же ходом, что и сам эпик.** Заведение по одной прячет
205
- объём. Номера возвращаются в раздел порядка той же правкой: без них «взять следующую» отвечает
206
- названием, а не карточкой.
207
-
208
- - **Замысел эпика лежит там, где его найдут без сети и после мержа.** Карточка порядка задач не
209
- держит, а папка задачи держала бы его до слияния первой; каталог называет компаньон правила.
210
- Названное владельцем по ходу дописывается туда же тем ходом, каким принято.
211
- - **Сборка по образцу начинается с чтения самого образца, а не пересказа о нём.** Пересказ лежит
212
- в разборе просьбы и в замысле эпика; образцом они не считаются. Повторяемая часть открывается
213
- целиком — обходом каталогов, а не одним файлом, за которым пришли.
214
- - **Что действует на дерево, а не на правку, лежит вне индекса.** Путь к образцу и разрешение
215
- работать вне эпика ветке не принадлежат и живут рядом с передачей захода.
216
- - **Закрытая работа разбирается правилами, и это шаг закрытия, а не отдельная просьба.** Что
217
- грузилось и чего не хватило, видно только заходу, который работу вёл. Разбор кончается правкой
218
- слоя правил или предложением наружу.
219
- - **Разбор закрытой работы уходит в фон, а исполнитель берёт следующую задачу.** Роль работает
220
- своим ходом; сводку собирают до запуска, находки принимают одним ходом.
221
- - **Находки разбора ждут владельца, а в пакет уезжает только сводка наблюдений.** Предложение —
222
- заготовка правки чужого дерева, и уехавшая без разбора, она становится работой того, кто её не
223
- заказывал. Сводка уезжает всегда: она говорит, чем пользовались, и мнением не бывает.
224
- - **Дешёвый шаг закрытия идёт раньше дорогого, а прогон — после вливания.** Вливание
225
- договорённости и приведение текстов стоят минуты, прогон — окно захода; идущий до вливания, он
226
- смотрит то, что в главную не поедет.
227
- - **Договорённость вливается в спек домена одним из последних коммитов ветки, до открытия PR.**
228
- К этому моменту код написан, привязки известны, и в главной ветке директория `proposed/` не
229
- появляется вовсе. Готовые к вливанию перечисляет `npm run check:specs`.
230
- - **Папка закрытой задачи разбирается, а не переносится целиком.** В `docs/archive/` уезжает то, что
231
- объясняет решение; остальное удаляется. Неразобранную ловит сверка очереди.
232
- - **Открытие PR и снятие черновика отбиваются, пока ветка везёт папку своей задачи.** Слияние
233
- нажимает человек на хостинге, где гардов нет: снятый черновик он читает приглашением влить.
234
- Судится содержимое ветки, а не рабочее дерево.
235
- - **Ветка, снёсшая папку, обязана прибавить запись в архив.** Снести дешевле, чем разобрать, а
236
- первым уходит разбор просьбы — единственная запись слов владельца.
237
- - **Обход — строка `Task-folder-skip: <причина>` в PR или в самой команде.** Пустая причина обходом
238
- не считается, а сам обход снимает отказ, но не гасит строку сверки очереди.
239
-
240
- ## Чего из закона здесь нет
241
-
242
- Полноту записанного понимания не проверяет ничто: машине видно наличие записи, но не то, что в
243
- ней закрыты все пробелы. То же с вопросом, который стоило задать и не задали, — следа он не
244
- оставляет. Судит оба владелец.
245
-
246
- Гард судит по путям правки, а не по тому, меняет ли работа поведение на самом деле. Своего
247
- признака рефакторингу не заводится: оценку «поведение не меняется» назначал бы тот, кому она
248
- мешает.
249
-
250
- Ничто из самого разбора не проверяется. Разговор с владельцем инструментом не является: гард
251
- видит правку файла и не знает ни о разведке до первого вопроса, ни о шести обязательных, ни об
252
- ответах на них — пустая таблица проходит так же, как заполненная.
253
-
254
- Понимания текста у гарда разговора нет: второй его признак судит общие слова темы вопроса и
255
- последней реплики владельца, а не смысл — вопрос о другом предмете, названный прежними словами,
256
- он отобьёт. Отказ называет законный ход: назвать то, чего в прежнем ответе владельца нет.
257
-
258
- Неизменность замысла не стережёт ничто: правка по ходу отличима от первоначальной записи только
259
- по истории.
260
-
261
- Приведение текстов к сделанному не проверяет ничто: что устарело в правиле и в спеке, машине не
262
- видно. Держится это шагом закрытия и следом задачи в замысле — там названо, что перечитать.
263
- Правило и спек правятся в ветке, закон — нет: его статья приносится владельцу текстом, а работа
264
- идёт дальше без неё.
265
-
266
- Что именно перенесли в архив, не проверяется: гард видит, что папка уехала и что ветка что-то в
267
- архив добавила, а то ли это — судит владелец на ревью.
268
-
269
- Гард папки задачи судит вызов исполнителя, а не кнопку хостинга: человек, вливающий работу со
270
- своей стороны, проходит мимо него молча, и папка уезжает в главную ветку целой. Гард закрывает ту
271
- половину случаев, где вливает исполнитель; на второй требование держится оставшимся шагом,
272
- который стоит разделом в теле заявки и произносится вслух.
273
-
274
- Порядок отдачи работы дерево вправе перевернуть надстройкой, и тогда часть шагов пакета
275
- перестаёт исполняться. Какие именно — не считает ничто: перечень отменяемого пишется руками, а
276
- шаг, чья механика сломалась тем же решением, в него не попадает и продолжает читаться
277
- действующим. Держится это чтением обоих текстов подряд — пакетного и надстройки — при каждой
278
- правке порядка отдачи.
279
-
280
- ## Паттерны
281
-
282
- - `task-flow-start` — разведка, разбор, договорённость, замысел, задача и ветка.
283
- - `task-flow-resume` — возвращение к незаконченной работе новым заходом.
284
- - `task-flow-close` — снятие черновика, вливание договорённости, приведение текстов.
285
- - `task-flow-archive` — разбор папки задачи, переезд в описание прошлого, разбор правилами.
116
+ ## How the law applies here
117
+ - **Editing application code is refused until the work has reached a state in which code is
118
+ edited.** The guard demands three things: a task folder by branch name, a plan in it and a
119
+ declared state. The product agreement has a guard of its own on the same events.
120
+ - **The guard judges the declared transition, not the presence of files.** An empty plan lies the
121
+ same as a written one, so the refusal is lifted by the declared state — `этап-идёт`,
122
+ `этапы-кончились`, `разбор-кончился`. The fourth road is the branch history: a folder taken apart
123
+ by its commit means handed-in work.
124
+ - **A state line moved forward is the same declaration of intent, only machine-readable.** A state
125
+ is declared by the turn in which its mandatory action is begun by deed.
126
+ - **A refusal by state names the mandatory action of the declared state.** Hearing only "wrong
127
+ state", the executor rewrites the state line instead of the step.
128
+ - **Only a word from the list counts as a state name.** A word of one's own says nothing about the
129
+ entry, the exit or the action.
130
+ - **Two requirements — two guards, and one can be lifted without losing the other.** They judge
131
+ apart: a line about unchanged behaviour lifts the agreement, not the requirement to reach the
132
+ code-editing state.
133
+ - **A merged agreement does not lock the branch.** After the merge the "proposed" directory is gone
134
+ from disk, while the plan refers to it to the end: the guard tells merged from never-created by
135
+ the branch history.
136
+ - **The agreement is required by the edit paths, not by an appraisal of the task.** `apps/**` and
137
+ `libs/**` are the sign; rules, texts, tooling and dependencies fall outside it. The bypass is the
138
+ line `**Behaviour:** unchanged — <the reason of the owner>` in the plan; an empty reason is not
139
+ accepted.
140
+ - **What needs the owner's word is taken from a list, not appraised on the spot.** The appraisal
141
+ "this is safe" is assigned by whoever finds it convenient.
142
+ - **A reply to the owner's order begins with the result, not with intent or its justification.** A
143
+ justification under someone else's accepted decision reads as its appraisal. One exception:
144
+ execution stopped by an obstacle — then the obstacle is named.
145
+ - **A session does not start work by itself.** A start needs the owner's word in the same session:
146
+ the handover, the state from the startup hook and an assigned epic say what to do, not whether to
147
+ work. The form of the message is judged: an empty message, one word or one path order no work.
148
+ - **A refusal by an external limiter removes the way, not the task.** It is not the tree's guard and
149
+ names no exit: read as the end of the road, it stops the work whole. The way is taken from the
150
+ guard that already described this fix — a bypass with the reason in the commit body, a mark in the
151
+ observations, a word to the owner — and the task stays the same.
152
+ - **An instruction to work by the progress covers all its steps, including those that change
153
+ history.** Questions are asked about what the progress lacks.
154
+ - **A question written by a past session does not become a question to the owner.** It is addressed
155
+ to the handover's author, and some such questions are closed by a work step.
156
+ - **The owner's instruction holds until they cancel it, and a new fact against it is a line in the
157
+ reply about the cost, not a new question.** Re-asked is what the instruction does not cover. A
158
+ menu where two options of three offer to cancel the owner's decision is that very cancellation.
159
+ - **An answer in the owner's message counts the same as an answer in a document.** A question
160
+ already answered in the conversation is not asked a second time.
161
+ - **The owner's word about the design is a task setting, not a decision.** What they named is
162
+ usually already in the tree under that word — a name on a screen, a spec section, a model field —
163
+ and is checked against them before the edit. Diverged — the owner is asked.
164
+ - **A task folder is created for any work, no exceptions.** An exception with even one lawful form
165
+ is executed as permission. It is created before the first edit.
166
+ - **The task folder goes into the branch by a commit, not lives in one working tree.** Uncommitted,
167
+ it passes edits without refusal, and the refusal comes at the end, when the plan is already gone.
168
+ Outside history one draft without a number is lawful.
169
+ - **The task folder is taken apart by the last commit before the PR opens, not after approval.** A
170
+ person merges as soon as they see green, and no room is left for a closing commit.
171
+ - **After opening the PR, the executor tells the owner the number, what it waits for and what comes
172
+ next.** It waits for the run; next the draft is lifted: a green run says nothing is broken and
173
+ nothing about the locked merge button.
174
+ - **A request to merge is a turn of its own, and it never comes before a green run.** One order:
175
+ folder taken apart and pushed → PR open as a draft → run green → draft lifted → the executor asks
176
+ to merge, naming the number.
177
+ - **The PR opens as a draft, not at the end of the work.** Before it opens the owner sees no edits,
178
+ and an open PR reads as an invitation to merge. The draft is lifted by the turn in which the
179
+ executor says the solution is ready.
180
+ - **The plan guard is the lower bound of the requirement, not its limit.** It demands a folder only
181
+ for an edit of application code; the article above — for any work.
182
+ - **An instruction to work by a rule is an instruction to do its steps, including those that change
183
+ history.** Marking a stage, a commit, a push and opening a PR are prescribed by the rule.
184
+ - **A taken task does not end a turn.** Creating the task, the branch, the column and the folder is
185
+ preparation: the work moves to the written-plan state, where the action is different. The
186
+ turn-exit guard names the first stage in its refusal.
187
+ - **Waiting for one part of a stage is never a stop of the stage.** The parts independent of what is
188
+ awaited are done in the same turn; the owner is told what is done and what is left for their step.
189
+ A refused command reads the same: everything else is done first.
190
+ - **A finding made mid-stage is checked against the plan's exit conditions before the first edit.**
191
+ Nearness of subject proves no belonging: work on the rules layer and work on the commands that
192
+ call it roll back apart. A finding named by no exit condition goes to the section on what the work
193
+ does not do, and is filed as a task.
194
+ - **Done work is marked only in the progress.** "Where we stand" is rewritten by every session, not
195
+ appended: it is the first thing the next session reads.
196
+ - **A word for a new notion is looked up in the tree's glossary.** The package carries the common
197
+ part, the tree appends the subject part by an override; the glossary goes into the context whole
198
+ at session start, so "did not read it" is never a ground.
199
+ - **The task folder is created as a draft and gets its number by a command.** Until the grill ends,
200
+ how many tasks come out is unknown, so the number never comes first. The command renames the
201
+ draft, fills the plan header and strips the layout header from the copies.
202
+ - **An abandoned grill is visible.** A draft older than a week is listed by the work queue audit.
203
+ - **Work ordered in words becomes a task in the queue in the same turn.** Even if it will not be
204
+ done now. A draft folder is not the queue: it has no number, and one session knows of it.
205
+ Postponed work names a date; postponed silently, it reads as done.
206
+ - **The next task is taken from the epic plan, and the work queue list is asked only where there is
207
+ no epic.** By a list of numbers the first task of someone else's epic cannot be told from one's
208
+ own. A finished epic is named to the owner by the same turn that takes work outside it.
209
+ - **An epic is not closed by a sign confirmed by reading alone.** What is checkable by eye is called
210
+ checked only together with a command and its output.
211
+ - **The tasks of an epic are created all at once, by the same turn as the epic itself.** Creating
212
+ them one at a time hides the volume. The numbers return to the order section by the same edit.
213
+
214
+ - **The epic plan names how the branches of its tasks stand, on a par with their order.** Two
215
+ arrangements: each branch from main, or a stack — each from the previous. The task order says
216
+ nothing about this. The stack costs more, its price is listed in the cold part; the arrangement
217
+ written in the plan is the epic's decision, not that of whoever creates the branch.
218
+ - **The epic plan lies where it is found without the network and after the merge.** The card does
219
+ not hold the task order, and the task folder would hold it only until the first merge; the
220
+ directory — in the rule's companion. What the owner names along the way is appended there by the
221
+ turn that accepted it.
222
+ - **Building by a sample begins with reading the sample itself, not a retelling of it.** A retelling
223
+ in the grill and in the epic plan is not the sample. The repeated part is opened whole, by walking
224
+ the directories.
225
+ - **What acts on the tree, not on the edit, lies outside the index.** The path to the sample and the
226
+ permission to work outside the epic do not belong to the branch and live next to the handover. A
227
+ number in the permitted list repeats the owner's word, not replaces it.
228
+ - **Closed work is reviewed by the rules, and this is a closing step, not a separate request.** What
229
+ was loaded and what was missing is seen only by the session that led the work. The review ends
230
+ with an edit of the rules layer or a proposal outward.
231
+ - **The review of closed work goes to the background, and the executor takes the next task.** The
232
+ role works in a turn of its own; the digest is gathered before the launch, the findings are
233
+ accepted in one turn.
234
+ - **The review's findings wait for the owner, and only the digest of observations leaves for the
235
+ package.** A proposal is a draft of an edit to someone else's tree; sent unreviewed, it becomes
236
+ the work of someone who did not order it. The digest is always sent: it says what was used and is
237
+ never an opinion.
238
+ - **The cheap closing step goes before the costly one, and the run — after the merge.** Merging the
239
+ agreement and bringing the texts up to date cost minutes, the run costs the session window; a run
240
+ before the merge checks what will not reach main.
241
+ - **The agreement merges into the domain spec by one of the last commits of the branch, before the
242
+ PR opens.** By then the code is written, the bindings are known, and the `proposed/` directory
243
+ never appears in main. What is ready to merge is listed by `npm run check:specs`.
244
+ - **The folder of a closed task is taken apart, not moved whole.** What explains a decision goes to
245
+ `docs/archive/`; the rest is deleted. One not taken apart is caught by the work queue audit.
246
+ - **Opening the PR and lifting the draft are refused while the branch carries its task folder.** A
247
+ person presses merge on the host, where there are no guards: a lifted draft reads to them as an
248
+ invitation. The branch content is judged, not the working tree.
249
+ - **A branch that removed the folder must add a record to the archive.** Removing is cheaper than
250
+ taking apart, and the grill leaves first — the only record of the owner's words.
251
+ - **The bypass is the line `Task-folder-skip: <reason>` in the PR or in the command itself.** An
252
+ empty reason is no bypass, and the bypass lifts the refusal but does not silence the work queue
253
+ audit line.
254
+
255
+ ## What of the law is not here
256
+
257
+ Nothing checks the completeness of the written understanding: the machine sees that a record exists,
258
+ not that it closes every gap. The same for a question worth asking and not asked — it leaves no
259
+ trace. The owner judges both.
260
+
261
+ The guard judges by the edit paths, not by whether the work changes behaviour. A refactoring gets no
262
+ sign of its own: the appraisal "behaviour does not change" would be assigned by whoever it hinders.
263
+
264
+ Nothing of the grill itself is checked. A conversation with the owner is not a tool call: the guard
265
+ sees a file edit and knows nothing of the exploration, the six mandatory questions or the answers.
266
+ An empty table passes the same as a filled one.
267
+
268
+ The conversation guard does not understand text: its second sign judges shared words between the
269
+ question's topic and the owner's last message, not meaning. The refusal names the lawful move: name
270
+ what the owner's earlier answer lacks.
271
+
272
+ Nothing watches the plan's immutability: an edit along the way is told from the original record only
273
+ by history.
274
+
275
+ Nothing checks that the texts match what was done: the machine cannot see what went stale in a rule
276
+ or a spec. This is held by the closing step and the task footprint in the plan. A rule and a spec
277
+ are edited in the branch, a law is not: its article goes to the owner as text, and the work goes on
278
+ without it.
279
+
280
+ What exactly went to the archive is not checked: the guard sees that the folder left and the branch
281
+ added something to the archive; whether it is the right thing the owner judges at review.
282
+
283
+ The task folder guard judges the executor's call, not the host's button: a person merging from their
284
+ side passes it in silence. On that half of the cases the requirement is held by the remaining step:
285
+ a section in the PR body, said aloud.
286
+
287
+ A tree may reverse the hand-in order by an override, and then some package steps stop being
288
+ executed. Which ones — nothing counts: a step whose mechanics broke by the same decision does not
289
+ enter the cancelled list and still reads as in force. This is held by reading both texts in a row on
290
+ every edit of the hand-in order.
291
+
292
+ ## Patterns
293
+
294
+ - `task-flow-start` — exploration, grill, agreement, plan, task and branch.
295
+ - `task-flow-resume` — returning to unfinished work in a new session.
296
+ - `task-flow-close` — lifting the draft, merging the agreement, bringing the texts up to date.
297
+ - `task-flow-archive` — taking the task folder apart, the move to the archive, review by the rules.