@rt-tools/agent-kit 0.24.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 (279) hide show
  1. package/assets/agents/business-analyst.md +51 -50
  2. package/assets/agents/conscience.md +37 -35
  3. package/assets/agents/project-manager.md +49 -48
  4. package/assets/agents/prose-editor.md +31 -29
  5. package/assets/agents/qa-engineer.md +50 -48
  6. package/assets/agents/rules-reviewer.md +63 -58
  7. package/assets/agents/skill-curator.md +83 -78
  8. package/assets/agents/spec-critic.md +34 -29
  9. package/assets/agents/spec-writer.md +35 -32
  10. package/assets/agents/strict-teacher.md +39 -37
  11. package/assets/checks/archive-age.mjs +48 -28
  12. package/assets/checks/archive-prune.mjs +16 -14
  13. package/assets/checks/board-epics.github.mjs +75 -41
  14. package/assets/checks/board-folders.mjs +61 -0
  15. package/assets/checks/board-gh.github.mjs +35 -26
  16. package/assets/checks/board-long-work.github.mjs +24 -24
  17. package/assets/checks/board-paths.github.mjs +21 -16
  18. package/assets/checks/board-runs.github.mjs +45 -43
  19. package/assets/checks/board-titles.github.mjs +19 -17
  20. package/assets/checks/board.github.mjs +149 -127
  21. package/assets/checks/check-archive-age.mjs +23 -19
  22. package/assets/checks/check-board.github.mjs +172 -164
  23. package/assets/checks/check-descriptions.mjs +30 -29
  24. package/assets/checks/check-doc-paths.mjs +91 -88
  25. package/assets/checks/check-dupes.mjs +84 -80
  26. package/assets/checks/check-file-size.mjs +74 -71
  27. package/assets/checks/check-glossary.mjs +47 -37
  28. package/assets/checks/check-hook-scope.mjs +30 -27
  29. package/assets/checks/check-lib-layers.mjs +22 -21
  30. package/assets/checks/check-profile-drift.mjs +48 -43
  31. package/assets/checks/check-prose-style.mjs +120 -37
  32. package/assets/checks/check-push-gate.mjs +53 -50
  33. package/assets/checks/check-reuse.mjs +50 -40
  34. package/assets/checks/check-schema-drift.mjs +87 -83
  35. package/assets/checks/check-specs.mjs +155 -134
  36. package/assets/checks/check-state-next.mjs +66 -52
  37. package/assets/checks/check-states.mjs +32 -30
  38. package/assets/checks/check-styles.mjs +52 -51
  39. package/assets/checks/check-turn-map.mjs +54 -46
  40. package/assets/checks/lib-boundaries.mjs +32 -30
  41. package/assets/checks/lib-common.mjs +30 -29
  42. package/assets/checks/lib-domains.mjs +34 -34
  43. package/assets/checks/lib-manifests.mjs +17 -15
  44. package/assets/checks/lib-reexports.mjs +18 -18
  45. package/assets/checks/rt-kit-checks.config.mjs +174 -142
  46. package/assets/checks/signals.mjs +43 -39
  47. package/assets/checks/spec-anchors.mjs +114 -87
  48. package/assets/checks/spec-common.mjs +128 -84
  49. package/assets/checks/spec-contract.mjs +30 -30
  50. package/assets/checks/spec-proposed.mjs +27 -24
  51. package/assets/checks/spec-scenarios.mjs +51 -28
  52. package/assets/checks/task-new.github.mjs +85 -56
  53. package/assets/commands/feedback.md +65 -59
  54. package/assets/commands/next-session.md +64 -57
  55. package/assets/commands/skill-curator.md +83 -79
  56. package/assets/defaults/gate-map.sh +108 -97
  57. package/assets/defaults/project.sh +225 -185
  58. package/assets/defaults/shell.sh +73 -68
  59. package/assets/defaults/turn-map.md +45 -44
  60. package/assets/docs/GLOSSARY.md +142 -65
  61. package/assets/hooks/browser-device-id.sh +12 -12
  62. package/assets/hooks/browser-guard-device-id.sh +30 -28
  63. package/assets/hooks/browser-guard-no-asking.sh +5 -4
  64. package/assets/hooks/browser-guard-no-listing.sh +12 -11
  65. package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
  66. package/assets/hooks/browser-guard-require-select.sh +34 -23
  67. package/assets/hooks/claim-guard.sh +62 -56
  68. package/assets/hooks/commit-msg.sh +11 -10
  69. package/assets/hooks/conscience-guard.sh +91 -45
  70. package/assets/hooks/constitution-index.sh +16 -16
  71. package/assets/hooks/deny-tail.sh +28 -26
  72. package/assets/hooks/dev-server-guard.sh +46 -43
  73. package/assets/hooks/dispatch.sh +60 -46
  74. package/assets/hooks/docs-guard.sh +100 -91
  75. package/assets/hooks/exam-guard.sh +105 -93
  76. package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
  77. package/assets/hooks/git-guard-delivery-draft.sh +45 -38
  78. package/assets/hooks/git-guard-delivery-folder.sh +50 -43
  79. package/assets/hooks/git-guard-delivery-signature.sh +88 -52
  80. package/assets/hooks/git-guard-delivery.sh +196 -180
  81. package/assets/hooks/git-guard-main.sh +38 -34
  82. package/assets/hooks/git-guard-push-tests.sh +99 -87
  83. package/assets/hooks/glossary-load.sh +23 -22
  84. package/assets/hooks/grill-gate-ask.sh +12 -11
  85. package/assets/hooks/grill-gate.sh +94 -87
  86. package/assets/hooks/guard-note.sh +20 -19
  87. package/assets/hooks/handoff-entry-guard.sh +26 -24
  88. package/assets/hooks/handoff-write.sh +74 -67
  89. package/assets/hooks/hook-input.sh +67 -58
  90. package/assets/hooks/lint-after-edit.sh +95 -61
  91. package/assets/hooks/observe.sh +28 -26
  92. package/assets/hooks/override-write-guard.sh +23 -21
  93. package/assets/hooks/postmortem-guard.sh +42 -39
  94. package/assets/hooks/profile-check.sh +22 -20
  95. package/assets/hooks/proposal-guard.sh +57 -49
  96. package/assets/hooks/prose-style-guard.sh +19 -17
  97. package/assets/hooks/qa-dataid-guard.sh +52 -49
  98. package/assets/hooks/rerun-guard.sh +31 -30
  99. package/assets/hooks/reuse-first-guard.sh +108 -87
  100. package/assets/hooks/roles.sh +14 -14
  101. package/assets/hooks/rule-article.sh +36 -34
  102. package/assets/hooks/rule-source-guard.sh +47 -42
  103. package/assets/hooks/skill-gate-layers.sh +59 -57
  104. package/assets/hooks/skill-gate-rearm.sh +15 -8
  105. package/assets/hooks/skill-gate.sh +89 -81
  106. package/assets/hooks/skill-loaded.sh +6 -6
  107. package/assets/hooks/sql-guard-parse.sh +68 -66
  108. package/assets/hooks/sql-guard-request.sh +48 -46
  109. package/assets/hooks/sql-guard-target.sh +57 -51
  110. package/assets/hooks/sql-guard-write.sh +84 -79
  111. package/assets/hooks/sql-guard.sh +52 -47
  112. package/assets/hooks/stand-login-guard.sh +40 -37
  113. package/assets/hooks/task-context-load.sh +60 -55
  114. package/assets/hooks/task-flow-context.sh +87 -69
  115. package/assets/hooks/task-flow-draft-guard.sh +55 -48
  116. package/assets/hooks/task-flow-guard.sh +67 -64
  117. package/assets/hooks/turn-entry-load.sh +39 -32
  118. package/assets/hooks/turn-exit-guard.sh +256 -204
  119. package/assets/hooks/turn-exit-patterns.sh +53 -0
  120. package/assets/hooks/utf8.sh +11 -11
  121. package/assets/hooks/waiting-turn-guard.sh +94 -94
  122. package/assets/hooks/window-fill-guard.sh +70 -62
  123. package/assets/hooks/work-start-guard.sh +52 -49
  124. package/assets/hooks/write-targets.sh +96 -44
  125. package/assets/laws/autonomous-work.md +29 -27
  126. package/assets/laws/code-structure.md +31 -30
  127. package/assets/laws/delivery.md +148 -137
  128. package/assets/laws/entity-editing.md +52 -50
  129. package/assets/laws/entity-models.md +14 -13
  130. package/assets/laws/frontend-application.md +39 -38
  131. package/assets/laws/lib-imports.md +27 -27
  132. package/assets/laws/lists.md +31 -29
  133. package/assets/laws/navigation.md +37 -37
  134. package/assets/laws/observability.md +41 -40
  135. package/assets/laws/project-documentation.md +106 -99
  136. package/assets/laws/reuse-first.md +31 -29
  137. package/assets/laws/shared-code.md +27 -27
  138. package/assets/laws/verifiability.md +131 -124
  139. package/assets/laws/work-conduct.md +250 -244
  140. package/assets/patterns/admin-lists-screen.md +72 -69
  141. package/assets/patterns/admin-nav-item.md +51 -46
  142. package/assets/patterns/angular-patterns-state.md +32 -31
  143. package/assets/patterns/api-layer-pair.md +33 -31
  144. package/assets/patterns/autonomous-work-run.md +50 -49
  145. package/assets/patterns/browser-verification-measure.md +124 -88
  146. package/assets/patterns/browser-verification-stand.md +169 -157
  147. package/assets/patterns/component-structure-new.md +51 -42
  148. package/assets/patterns/dependencies-upgrade.md +55 -39
  149. package/assets/patterns/doc-style-human.md +55 -37
  150. package/assets/patterns/doc-style-sweep.md +82 -79
  151. package/assets/patterns/doc-style-trace.md +87 -81
  152. package/assets/patterns/doc-style-write.md +130 -122
  153. package/assets/patterns/entity-aside.md +77 -63
  154. package/assets/patterns/entity-models-new.md +37 -37
  155. package/assets/patterns/entity-store.md +33 -33
  156. package/assets/patterns/git-workflow-commit.azure.md +93 -86
  157. package/assets/patterns/git-workflow-commit.github.md +152 -141
  158. package/assets/patterns/git-workflow-commit.gitlab.md +95 -89
  159. package/assets/patterns/git-workflow-docker.md +165 -147
  160. package/assets/patterns/git-workflow-freshness.md +45 -45
  161. package/assets/patterns/git-workflow-merge.md +98 -93
  162. package/assets/patterns/git-workflow-migration.md +54 -52
  163. package/assets/patterns/git-workflow-pr-ready.md +57 -56
  164. package/assets/patterns/git-workflow-pr.azure.md +126 -121
  165. package/assets/patterns/git-workflow-pr.github.md +179 -175
  166. package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
  167. package/assets/patterns/git-workflow-restart.md +35 -31
  168. package/assets/patterns/git-workflow-secrets.md +80 -73
  169. package/assets/patterns/git-workflow-stack.md +131 -106
  170. package/assets/patterns/lib-layers-move.md +62 -53
  171. package/assets/patterns/lib-layers-new.md +59 -45
  172. package/assets/patterns/observability-record.md +72 -67
  173. package/assets/patterns/platform-access-di.md +31 -29
  174. package/assets/patterns/reuse-first-extend.md +66 -61
  175. package/assets/patterns/shared-code-new.md +39 -38
  176. package/assets/patterns/spec-driven-domain.md +161 -151
  177. package/assets/patterns/spec-driven-rule.md +179 -168
  178. package/assets/patterns/spec-driven-sweep.md +41 -39
  179. package/assets/patterns/status-report-table.github.md +37 -36
  180. package/assets/patterns/styling-bem-component.md +42 -42
  181. package/assets/patterns/styling-bem-layout.md +39 -34
  182. package/assets/patterns/styling-bem-sheet.md +59 -58
  183. package/assets/patterns/task-flow-archive.md +222 -215
  184. package/assets/patterns/task-flow-close.md +215 -203
  185. package/assets/patterns/task-flow-handoff.md +154 -145
  186. package/assets/patterns/task-flow-resume.md +138 -133
  187. package/assets/patterns/task-flow-start.md +204 -192
  188. package/assets/patterns/testing-e2e.md +102 -101
  189. package/assets/patterns/testing-unit.md +77 -70
  190. package/assets/patterns/ts-procedure.md +32 -29
  191. package/assets/patterns/turn-entry-map.md +50 -48
  192. package/assets/pitfalls/agent-kit.md +152 -141
  193. package/assets/pitfalls/doc-style.md +96 -91
  194. package/assets/pitfalls/git-workflow.azure.md +49 -46
  195. package/assets/pitfalls/git-workflow.github.md +264 -234
  196. package/assets/pitfalls/git-workflow.gitlab.md +49 -45
  197. package/assets/pitfalls/spec-driven.md +73 -71
  198. package/assets/pitfalls/styling-bem.md +46 -40
  199. package/assets/pitfalls/task-flow.md +262 -246
  200. package/assets/pitfalls/testing.md +99 -92
  201. package/assets/pitfalls/turn-conduct.md +96 -81
  202. package/assets/rules/angular-patterns.md +81 -80
  203. package/assets/rules/api-layer.md +77 -74
  204. package/assets/rules/autonomous-work.md +75 -74
  205. package/assets/rules/browser-verification.md +223 -214
  206. package/assets/rules/component-structure.md +72 -69
  207. package/assets/rules/dependencies.md +74 -67
  208. package/assets/rules/deploy-flow.azure.md +118 -108
  209. package/assets/rules/deploy-flow.github.md +145 -135
  210. package/assets/rules/deploy-flow.gitlab.md +120 -110
  211. package/assets/rules/doc-style.md +198 -173
  212. package/assets/rules/entity-conventions.needs-admin.md +81 -79
  213. package/assets/rules/entity-models.md +73 -70
  214. package/assets/rules/git-workflow.azure.md +224 -228
  215. package/assets/rules/git-workflow.github.md +250 -239
  216. package/assets/rules/git-workflow.gitlab.md +218 -217
  217. package/assets/rules/lib-layers.md +85 -86
  218. package/assets/rules/lists.md +101 -97
  219. package/assets/rules/navigation.md +78 -78
  220. package/assets/rules/observability.needs-app.md +165 -153
  221. package/assets/rules/platform-access.md +76 -75
  222. package/assets/rules/reuse-first.md +153 -143
  223. package/assets/rules/shared-code.md +82 -79
  224. package/assets/rules/spec-driven.md +272 -260
  225. package/assets/rules/status-report.md +55 -58
  226. package/assets/rules/styling-bem.md +81 -77
  227. package/assets/rules/task-flow.md +282 -270
  228. package/assets/rules/testing.md +224 -209
  229. package/assets/rules/turn-conduct.md +255 -258
  230. package/assets/rules/turn-entry.md +92 -87
  231. package/assets/rules/typescript-conventions.md +94 -88
  232. package/assets/samples/specs/_template/spec.md +47 -47
  233. package/assets/samples/tasks/_template/grill.md +20 -20
  234. package/assets/samples/tasks/_template/plan.md +32 -30
  235. package/assets/samples/tasks/_template/progress.md +16 -16
  236. package/assets/skills/agent-kit-extend.md +129 -113
  237. package/assets/skills/agent-kit.md +235 -211
  238. package/assets/skills/write-a-skill.md +76 -71
  239. package/assets/templates/findings.md +19 -19
  240. package/assets/templates/gate-map.sh +16 -14
  241. package/assets/templates/implementation.md +28 -27
  242. package/assets/templates/pattern.md +17 -17
  243. package/assets/templates/pitfalls.md +6 -6
  244. package/assets/templates/postmortem.md +24 -23
  245. package/assets/templates/project.sh +24 -24
  246. package/assets/templates/proposal.md +62 -60
  247. package/assets/templates/rule.md +38 -38
  248. package/assets/workflows/feature.js +46 -46
  249. package/assets/workflows/plan.js +54 -54
  250. package/lib/catalog.d.ts +2 -0
  251. package/lib/catalog.d.ts.map +1 -1
  252. package/lib/catalog.js +4 -3
  253. package/lib/catalog.js.map +1 -1
  254. package/lib/commands.d.ts.map +1 -1
  255. package/lib/commands.js +5 -2
  256. package/lib/commands.js.map +1 -1
  257. package/lib/companion.js +3 -2
  258. package/lib/companion.js.map +1 -1
  259. package/lib/enroll.d.ts +7 -1
  260. package/lib/enroll.d.ts.map +1 -1
  261. package/lib/enroll.js +12 -3
  262. package/lib/enroll.js.map +1 -1
  263. package/lib/plan.d.ts +11 -0
  264. package/lib/plan.d.ts.map +1 -1
  265. package/lib/plan.js +10 -1
  266. package/lib/plan.js.map +1 -1
  267. package/lib/ship.d.ts +0 -7
  268. package/lib/ship.d.ts.map +1 -1
  269. package/lib/ship.js +10 -2
  270. package/lib/ship.js.map +1 -1
  271. package/lib/shipment.d.ts.map +1 -1
  272. package/lib/shipment.js +6 -2
  273. package/lib/shipment.js.map +1 -1
  274. package/lib/sync.d.ts.map +1 -1
  275. package/lib/sync.js +45 -11
  276. package/lib/sync.js.map +1 -1
  277. package/package.json +1 -1
  278. package/rt-tools-agent-kit-0.26.0.tgz +0 -0
  279. package/rt-tools-agent-kit-0.24.0.tgz +0 -0
@@ -2,248 +2,244 @@
2
2
  name: git-workflow
3
3
  kind: rule
4
4
  law: delivery
5
- description: Правило под «Закон о поставке» для дерева в Azure DevOps. Брать на заведение рабочего элемента, ветки, коммит, пуш, открытие PR и слияние. Называет соответствие элемента и ветки один к одному, имена, машинную учётную запись и гарды поставки. Паттерны: git-workflow-commit, -pr, -merge.
5
+ description: Rule under the delivery law for a tree in Azure DevOps. Load for creating a work item and a branch, commit, push, opening a PR and merging. Names the one-to-one match of item and branch, the names, the machine account and the delivery guards. Patterns git-workflow-commit, -pr, -merge.
6
6
  ---
7
7
 
8
- # Поставка — как это устроено здесь
8
+ # Delivery — how it works here
9
9
 
10
- Правило под закон `docs/constitution/delivery.md`. Закон говорит, что должно быть верно;
11
- здесь — каким приёмом это держится в дереве, лежащем в Azure DevOps. Организация, проект,
12
- учётная запись машинной работы и области коммита — при этом дереве, в `implementation.md`
13
- рядом: их не угадать, и общими они не бывают.
10
+ Rule under the law `docs/constitution/delivery.md`. The law says what must be true; here — by which
11
+ technique it is held in a tree that lives in Azure DevOps. The organisation, the project, the
12
+ machine account and the commit scopes are this tree's, in `implementation.md` next to it: they
13
+ cannot be guessed and are never shared.
14
14
 
15
- **Холодная часть:** `pitfalls.md` рядом — ловушки, грабли, на которые уже наступали.
16
- Грузится по требованию, а не вместе с правилом.
15
+ **Cold part:** `pitfalls.md` next to it — traps already stepped on. Loaded on demand, not together
16
+ with the rule.
17
17
 
18
- ## Как это называется здесь
18
+ ## What it is called here
19
19
 
20
- | В законе | Здесь |
21
- | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
- | главная ветка | `main` |
23
- | отдельная ветка | `<номер рабочего элемента>-<короткий-slug>`; форма — в `implementation.md`. Имя без номера (`feat/…`, `fix/…`) законно, пока ветка живёт локально: PR с неё не откроется |
24
- | задача | рабочий элемент (work item) рода `Task` или `Bug`, заголовок `[<номер>] <Что не так>`, исполнитель — учётная запись машинной работы; PR прикрепляется к нему при создании флагом `--work-items`, а коммит — строкой `AB#<номер>` |
25
- | очередь работ | Azure Boards проекта. Рабочий элемент попадает на доску тем, что заведён: доска показывает элементы своей области и итерации |
26
- | состояние задачи в очереди работ | поле `State` рабочего элемента: `New` у заведённого, `Active` у взятого в работу, `Resolved` у ждущего разбора. Набор состояний зависит от процесса проекта и назван в `implementation.md`; закрытая задача уходит из очереди слиянием |
27
- | PR о задаче | заголовок PR `[<номер>] <Что сделано>` — тот же номер, что у рабочего элемента, и его название, переведённое в сделанное; тип и область коммита сюда не идут |
28
- | обсуждение правки | разбор PR: ревьювер — владелец репозитория, исполнитель — учётная запись машинной работы, метки — те же, что у рабочего элемента |
29
- | запись о правке | коммит формата `type(scope): description` — типы `feat`, `fix`, `refactor`, `docs`, `style`, `test`, `chore`, `perf`; области — в `implementation.md` |
30
- | автор машинной работы | отдельная учётная запись; её имя и место токена — в `implementation.md`. Токен лежит вне репозитория |
20
+ | In the law | Here |
21
+ | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
22
+ | main branch | `main` |
23
+ | separate branch | `<номер рабочего элемента>-<короткий-slug>`; the form — in `implementation.md`. A name without a number (`feat/…`, `fix/…`) is legitimate locally: no PR opens from it |
24
+ | task | a work item of kind `Task` or `Bug`, title `[<номер>] <Что не так>`, assignee the machine account; the PR attaches at creation by the `--work-items` flag, a commit by the line `AB#<номер>` |
25
+ | work queue | the project's Azure Boards. A work item lands on the board by being created: the board shows the items of its area and iteration |
26
+ | task state in the work queue | the work item's `State` field: `New` when created, `Active` in progress, `Resolved` in review. The state set depends on the project process and is named in `implementation.md`; a closed task leaves the queue by merge |
27
+ | PR about a task | PR title `[<номер>] <Что сделано>` — the work item's number and title turned into the done; commit type and scope stay out |
28
+ | discussion of an edit | PR review: reviewer — the repository owner, assignee — the machine account, labels — the same as on the work item |
29
+ | record of an edit | `type(scope): description`, types `feat`, `fix`, `refactor`, `docs`, `style`, `test`, `chore`, `perf`; scopes: `implementation.md` |
30
+ | author of machine work | a separate account; its name and the token's place — in `implementation.md`. The token lies outside the repository |
31
31
 
32
- ## Где это лежит
32
+ ## Where it lives
33
33
 
34
- В этом дереве — таблица в `implementation.md` рядом. Пути живут там, а не здесь: правило
35
- переносится между репозиториями, раскладка — нет, и путь, названный в правиле, врёт в первом
36
- же дереве, которое держит код иначе.
34
+ In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
35
+ travels between repositories, the layout does not, and a path named in the rule lies in the first
36
+ tree that keeps its code differently.
37
37
 
38
- ## Ход
38
+ ## Flow
39
39
 
40
- Ход работы от задачи до слияния: где стоит гард, что двигает колонку очереди работ и чем
41
- работа кончается.
40
+ The flow from task to merge: where the guard stands, what moves the work queue column and how the
41
+ work ends.
42
42
 
43
43
  ```mermaid
44
44
  flowchart TD
45
- A[Работа начинается] --> B[Задача заводится командой и встаёт в очередь работ]
46
- B --> C[Ветка называется номером задачи; колонка двигается тем же движением]
47
- C --> D{Правка готова}
48
- D -->|Нет| C
49
- D -->|Да| E[Главная ветка влита, набор гейта прогнан целиком]
50
- E --> F{Ветка несёт номер задачи}
51
- F -->|Нет| G[Гард поставки отбивает открытие: за правкой ничего не стоит в очереди]
52
- F -->|Да| H[PR открывается; не готовое к слиянию идёт черновиком]
53
- H --> I[Колонка задачи переходит в разбор, исполнитель берёт следующую задачу]
54
- I --> J{Прогон и разбор кончились}
55
- J -->|Прогон красный| K[Чинится в той же ветке]
45
+ A[Work begins] --> B[A command creates the task and it enters the work queue]
46
+ B --> C[The branch is named by the task number; the column moves in the same motion]
47
+ C --> D{The edit is ready}
48
+ D -->|No| C
49
+ D -->|Yes| E[Main is merged in, the gate set is run whole]
50
+ E --> F{The branch carries a task number}
51
+ F -->|No| G[The delivery guard refuses the opening: nothing in the queue stands behind the edit]
52
+ F -->|Yes| H[The PR opens; what is not ready to merge goes as a draft]
53
+ H --> I[The task column moves to review, the executor takes the next task]
54
+ I --> J{The run and the review are over}
55
+ J -->|Run red| K[Fixed in the same branch]
56
56
  K --> J
57
- J -->|Зелено| L[Папка задачи разбирается последним коммитом, черновик снимается]
58
- L --> M[Слияние нажимает человек: исполнитель просит и называет номер]
57
+ J -->|Green| L[The last commit takes the task folder apart, the draft is lifted]
58
+ L --> M[A person presses the merge: the executor asks and names the number]
59
59
  G --> B
60
60
  ```
61
61
 
62
- ## Как закон применяется здесь
63
-
64
- - **Коммит в главную ветку отбивается гардом.** Гард ищет вызов коммита в любом месте команды
65
- и смотрит текущую ветку на момент запуска, поэтому составная «создать ветку и сразу
66
- коммитить» отклоняется целиком: ветки в момент разбора ещё нет.
67
- - **Ветка без номера рабочего элемента PR не открывает.** Гард поставки отбивает
68
- `az repos pr create` с такой ветки: локально она законна, но правка из неё — это выкатка, за
69
- которой в очереди работ ничего не стоит. Заводится рабочий элемент, и работа переносится в
70
- ветку с его номером.
71
- - **Главная ветка влита в ветку рабочего элемента до открытия PR.** Гард поставки отбивает
72
- открытие, пока вершина главной ветки не стала предком текущей, и называет расхождение числом
73
- коммитов. PR с разошедшейся ветки показывает ревьюверу свою правку вперемешку с чужой, а всё,
74
- что автор проверил до публикации, он проверил от основания, которого в главной ветке уже нет.
75
- - **Несошедшиеся условия поставки называются одним отказом, а не по одному.** Гард копит их все
76
- и печатает разом. Отбитый по первому промаху исполнитель правит основание, повторяет вызов,
77
- упирается в заголовок, правит заголовок, упирается в рабочий элемент — и каждый круг стоит
78
- ещё одного вызова, хотя всё несошедшееся было известно уже на первом.
79
- - **Условие, известное в начале работы, спрашивается в начале.** Заведение ветки отбивает
80
- основание, в котором нет вершины главной ветки, и рабочую копию, подписывающую коммиты не той
81
- почтой, что объявило дерево. На пуше и на открытии PR те же проверки остаются вторым рубежом,
82
- но там они стоят дороже: основание чинится вливанием с разбором конфликта, подпись —
83
- переписыванием всей ветки.
84
- - **Судится то основание, которое названо командой, а не вершина рабочей копии.** Ветку заводят
85
- и от вершины главной ветки прямо — этой командой основание как раз и берут свежим, — и гард,
86
- читающий только текущую вершину, отбивал бы её наравне с веткой от вчерашнего дерева.
87
- Основание, о котором дерево ничего не знает, не судится вовсе.
88
- - **Ветка без номера рабочего элемента условий поставки не получает.** Локальная ветка под пробу
89
- законна, и требовать от неё свежего основания значило бы отбивать работу, которая в главную
90
- не поедет: PR с такой ветки не откроется.
91
- - **Правка кода отдаётся человеку открытым PR, а не запушенной веткой.** Ветка в списке ветвей
92
- ему не показывается, в его дела не приходит и обсуждения не имеет: до открытия PR правки для
93
- человека нет. Открывается он тем же ходом, которым исполнитель говорит, что работу отдаёт, и
94
- в ответе называется номером.
95
- - **Не готовое к слиянию открывается черновиком — `az repos pr create --draft true`.** Кнопка
96
- завершения у черновика заблокирована самим хостингом, поэтому состояние «выложено на
97
- обозрение» и состояние «можно вливать» перестают выглядеть одинаково. Черновиком идёт всё,
98
- что ждёт прогона конвейера, доработки или ответа на вопрос; вопрос задаётся в самом PR.
99
- Конвейер проверок черновика по умолчанию не запускает — до снятия черновика он молчит, и это
100
- молчание за зелёный прогон не принимается.
101
- - **Черновик снимается отдельным вызовом — `az repos pr update --id <номер> --draft false`.**
102
- Им исполнитель отвечает за готовность: проверки пройдены, доработок не осталось, работа
103
- сходится с рабочим элементом. Снятие черновика и просьба влить — один ход, а не два разных
104
- дня.
105
- - **Заведённый рабочий элемент подтверждается ответом очереди работ, а не выводом команды
106
- заведения.** Команда отвечает за свои вызовы: она может завести элемент и не довести его до
107
- доски, и её собственный разбор ошибок этот случай называет. Напечатанный номер значит «вызов
108
- прошёл», а не «работа видна тому, кто по ней придёт». Спрашивается очередь — по номеру, одним
109
- вызовом, — и ответ читается присутствием элемента на доске, его состоянием и исполнителем.
110
- - **Номер ветки и номер в заголовке PR сверяются на месте, а состояние — по доске.** Формат
111
- читается из текста команды и работает без сети; существование рабочего элемента, его
112
- состояние, исполнитель и то, что он ещё открыт, — только когда есть чем спросить. Нет сети
113
- или нет токена — второй ярус молча пропускается: проверка, падающая в самолёте, перестаёт
114
- что-либо значить.
115
- - **Состояние рабочего элемента двигается тем же движением, что и работа.** Ветка заведена —
116
- элемент переводится в `Active`, PR открыт — в `Resolved`; делает это команда перевода, а не
117
- набор вызовов по памяти. Перевод идёт сразу за шагом, который его вызвал: очередь работ
118
- читают между шагами, а не после них.
119
- - **Рабочий элемент, оставшийся в начальном состоянии, PR не открывает.** Гард поставки называет
120
- это состояние и команду перевода: по очереди работ такой элемент читается как невзятый, хотя
121
- работа по нему сделана и выложена. На заведении ветки состояние не спрашивается — там его ещё
122
- не двигали, и требование отбивало бы первую же команду работы вместе с той, которая его и
123
- снимает. Имя начального состояния дерево называет само; не названо — состояние не судится
124
- вовсе.
125
- - **На доске стоят рабочие элементы, а не PR о них.** Доска показывает, что сделано и что
126
- осталось; PR отвечает на другой вопрос — как именно сделано, — и открывается из элемента, где
127
- связь с ним стоит сама. Здесь эта связь ставится при создании PR, поэтому отдельная карточка
128
- не нужна вовсе, а заведённая живёт своей жизнью: состояния под неё нет, из очереди она не
129
- уходит и остаётся в ней после слияния навсегда. Находит такие сверка очереди — строкой на
130
- каждую.
131
- - **Отставшее состояние находится сверкой очереди, а не глазами.** Сверка судит состояние по
132
- PR в обе стороны: открытый PR при элементе не в разборе и разбор без открытого PR — оба
133
- расхождения. Момента, когда задачу берут в работу, ей не видно: ветки на доске нет.
134
- - **Ветка с открытой заявкой отстаёт от главной молча.** Гард судит основание один раз — в
135
- минуту открытия; всё, что влилось в главную, пока шёл прогон, зелёный прогон не видит вовсе, и
136
- влитая оттуда заявка приносит в главную ветку сочетание, которое не проверял никто. Отставание
137
- находит сверка очереди работ: она спрашивает у хранилища, на сколько коммитов ветка каждой
138
- открытой заявки позади главной, и называет число.
139
- - **Задачи, чинящиеся одной правкой, сливаются до слияния ветки.** Вторая закрывается как
140
- дубликат, а недостающее из неё дописывается в первую. Закон велит вторую стереть, и это второе
141
- объявленное отступление: у рабочего элемента здесь есть родная связь «дубликат», удаление
142
- уносит вместе с ним историю правок и вложения, а номер после него не переиспользуется —
143
- ссылка на стёртый элемент из чужого коммита ведёт в пустоту. После слияния слить уже нельзя:
144
- ветка въехала, и откатывается она целиком.
145
- - **Работа, которую одним заходом не закрыть, помечена в двух местах, и они сверяются.** Метка
146
- на доске и строка о заходах с передачей в замысле эпика говорят одно и то же двум читателям:
147
- исполнитель открывает карточку раньше, чем замысел эпика, а планирует по замыслу. Одна пометка без
148
- другой лжёт молча, поэтому сверка очереди судит пару в обе стороны. Помечается только то, что
149
- законно не делится: пометка объёма правом делить не становится.
150
- - **Документ едет в том же коммите, что и правка.** Обход — строка `Docs-skip: <причина>` в
151
- теле коммита; пустая причина не принимается.
152
- - **Заголовок коммита сверяется с форматом на месте.** Разобранный по типу и области
153
- заголовок читается списком, а свободный текст — только целиком.
154
- - **Перед пушем прогоняются все линтеры, а не один.** Линтер кода обычно не читает файлы
155
- стилей вовсе, и правила оформления без второго прогона не проверяет ничто.
156
- - **Сборка входит в набор наравне с линтом и юнитами.** Линтер типов не читает, а юниты читают
157
- только то, что импортировано тестом: ошибка типов в непокрытом коде доживает до сборки
158
- образа, то есть до слияния. Четыре слияния подряд так и уехали в главную ветку, ломая
159
- выкатку.
160
- - **На машине, где раннеров несколько, любой путь от домашнего каталога общий.** Умолчание
161
- готового шага опасно именно тем, что оно общее: соседнее задание переписывает его под свою
162
- версию, пока наше стоит между шагами. Каталог установки, имя контейнера и имя сборщика
163
- называются поэтому по проекту и постоянно, а временный каталог решением не бывает — в нём
164
- живёт хранилище пакетов.
165
- - **Набор гейта пуша не бывает уже набора конвейера.** Гейт — обещание, что пуш не приедет
166
- красным; набор, из которого выкинуты сборка и снимки, обещает то, чего не проверяет. Шаг
167
- конвейера, которому в наборе гейта нет ни строки, ни объявленного исключения с причиной,
168
- отбивает пуш, а не печатается рядом с ним: напечатанное предупреждение исполнитель читает как
169
- разрешение. Дважды подряд правка, прошедшая гейт целиком, была отбита конвейером — и оба раза
170
- зелёный гейт был прочитан как «локально всё зелено».
171
- - **Итоговый набор перед пушем читается разбором состояния, а не сборкой в уме.** Он собирается
172
- из умолчания пакета и надстройки дерева, и прочитать сборку было нечем: раздел «набор перед
173
- пушем» печатает его целиком, по команде на строку, а рядом называет то, что умолчание печатало,
174
- а в набор не попало. Дерево, писавшее надстройку вслепую, дописывало в неё повтор.
175
- - **Причина исключения, называющая задачу, судится на живость этой задачи.** Отсрочка со сроком
176
- и отсрочка без срока выглядят одинаково, пока номер никто не спросил; мёртвый номер в причине
177
- делает исключение бессрочным, не сказав об этом ни строкой. Спрашивается тем же ярусом, что
178
- состояние задачи у гарда поставки: есть чем спросить — спрашивает, нет сети или доступа —
179
- пропускает молча.
180
- - **Сверка раскладки стоит в наборе гейта пуша наравне с линтом и сборкой.** Правка, положенная
181
- в разложенную копию мимо источника, в день, когда её делают, не ломает ничего: дерево
182
- работает, проверки зелёные, а расхождение видно только тому, кто позовёт сверку сам. Копится
183
- оно молча и всплывает на чужой работе — раскладка отказывает по правленому файлу целиком и не
184
- кладёт ни одного другого, так что цену платит тот, кто правил соседний ресурс. Статьёй выше
185
- эта строка не покрывается: сверки нет в конвейере, а значит нет и шага, который она бы
186
- закрывала, — в набор она ставится прямо, а не выводится из его полноты.
187
- - **После вливания главной ветки набор проверок пересматривается по тому, что ветка везёт
188
- теперь.** Вливание меняет состав правки: проверять по тому, что правил автор, — значит
189
- проверять половину, а отвечает ветка целиком. Ветка, не тронувшая ни строки показа, прогоняет
190
- снимки витрин с того момента, как вливание принесло чужую правку оформления.
191
- - **Утверждение о главной ветке делается по удалённой ссылке, а не по локальной.** Локальная
192
- протухает в ту минуту, когда её подтянули в последний раз, и молчит об этом: она не пуста и не
193
- сломана, она описывает вчерашний день. Сравнение веток пишется от `origin/main` целиком —
194
- смешав в одной команде удалённую ссылку для одной стороны и локальную для другой, промах
195
- изнутри выглядит правильным.
196
- - **Удалённую ссылку берут не только слова, но и действия.** Основание новой ветки, счёт влитого
197
- и подтягивание главной судятся по ней же: локальная — снимок последнего подтягивания, и работа,
198
- начатая от неё, стартует от основания, которого в главной уже нет. Влитая ветка при ней числится
199
- невлитой, и уборка кончается списком невлитого, которого нет.
200
- - **Рабочий элемент привязывается к PR при создании, а не после.** `az repos pr create`
201
- принимает `--work-items`; привязка второй командой обходится молча, когда у токена нет права
202
- править чужой элемент, и PR остаётся ни с чем не связанным.
203
- - **Слияние с автозавершением не заменяет проверок до пуша.** Автозавершение видит только
204
- конвейер, а конвейер видит только отправленное: красная ветка занимает очередь работ и
205
- выглядит готовой к разбору.
206
- - **Набор состояний берётся у процесса проекта, а не назначается правилом.** Agile, Scrum и
207
- Basic называют одни и те же три шага по-разному, и перевод в состояние, которого в процессе
208
- нет, отвечает отказом на каждой задаче подряд.
209
- - **Сценарии гардов задают настройки git сами, а не берут их с машины.** Коммит во временном
210
- репозитории сценария наследует общий конфиг: если включена подпись, git идёт в агент ключей,
211
- а заблокированный агент роняет весь набор — со стороны это выглядит сломанным гардом. Автор,
212
- почта и подпись передаются флагами `-c` прямо в команду.
213
-
214
- ## Чего из закона здесь нет
215
-
216
- Ключа задач у этого хостинга нет, и форма имени строится из одного номера. Закон требует писать
217
- номер всюду одинаково — «ключ, дефис, номер», — и это отступление от него, объявленное здесь:
218
- номер рабочего элемента уникален на весь проект, а родная форма ссылки хостинга — `AB#<номер>` —
219
- ключа не несёт вовсе, и приписанный к ней он ломает связывание коммита с элементом. Настройки
220
- `board.taskKey` дерево на этом хостинге не заводит; проверки, которые ищут ключ в заголовке,
221
- судят здесь номер без него.
222
-
223
- Гард поставки стоит на командах агента, поэтому ветку, заведённую руками в редакторе, он не
224
- видит: имя такой ветки держится памятью. Требование от этого не слабеет — просто отдельной
225
- проверки под него не заводится: работа опознаётся заголовком рабочего элемента и PR, а это
226
- сверяется у всех. Сверка очереди имя ветки не судит вовсе: у открытого PR его не переименовать.
227
-
228
- Рабочий элемент в работу гард не переводит: доску он не правит — правка доски в разборе команды
229
- падала бы вместе со связью и отбивала бы работу вместо промаха. Перевод держится памятью и
230
- подсказкой, которую печатает команда заведения. Элемент, оставшийся в начальном состоянии, гард
231
- называет на открытии PR — то есть после того, как его должны были перевести; прочие расхождения
232
- состояния находит сверка очереди.
233
-
234
- Ревьювера гард здесь не спрашивает: снятие черновика идёт правкой самого PR — тем же вызовом, что
235
- и остальные его поля, — и от прочих правок машине оно неотличимо. Держится это словарём выше, где
236
- разбор PR ведёт ревьювер, и памятью того, кто черновик снимает.
237
-
238
- Свежесть самой вершины главной ветки гард спрашивает вторым ярусом — тем же приёмом, что и
239
- состояние задачи: есть чем спросить, спрашивает; нет сети или доступа — пропускает молча. Первый
240
- ярус при этом остаётся, и работает он без сети: локальная ссылка отвечает на вопрос «отстало ли
241
- основание от того, что уже лежит в дереве», удалённая — на вопрос «не протухла ли сама ссылка».
242
- Без второго яруса молчание гарда значило лишь первое, а читалось как второе.
243
-
244
- ## Паттерны
245
-
246
- - `git-workflow-commit` — рабочий элемент, ветка, коммит и пуш от учётной записи машинной работы.
247
- - `git-workflow-pr` — открытие PR, черновик и его снятие, тело, ревьювер, привязка к элементу.
248
- работы.
249
- - `git-workflow-merge` — главная ветка влита в ветку задачи, конфликт разобран.
62
+ ## How the law applies here
63
+
64
+ - **A commit into the main branch is refused by the guard.** The guard looks for a commit call
65
+ anywhere in the command and reads the current branch at launch, so a compound "create a branch and
66
+ commit at once" is rejected whole: the branch does not exist yet at review.
67
+ - **A branch without a work item number opens no PR.** The delivery guard refuses `az repos pr
68
+ create` from such a branch: locally it is legitimate, but an edit from it is a rollout with
69
+ nothing behind it in the work queue. A work item is created, and the work moves to a branch with
70
+ its number.
71
+ - **The main branch is merged into the work item branch before the PR opens.** The delivery guard
72
+ refuses the opening until main's tip is an ancestor of the current branch, and names the
73
+ divergence as a commit count. A PR from a diverged branch shows the reviewer the edit mixed with
74
+ someone else's, and everything the author checked before publishing was checked from a base that
75
+ main no longer has.
76
+ - **Unmet delivery conditions are named in one refusal, not one by one.** The guard collects them
77
+ all and prints them at once. An executor refused on the first miss fixes the base, repeats the
78
+ call, hits the title, fixes the title, hits the work item — and every round costs one more call,
79
+ though everything unmet was known on the first.
80
+ - **A condition known at the start of work is asked at the start.** Creating a branch refuses a base
81
+ without main's tip, and a working copy that signs commits with an email other than the one the
82
+ tree declared. At push and at PR opening the same checks stay as a second line, but there they
83
+ cost more: the base is fixed by a merge with conflict resolution, the signature by rewriting the
84
+ whole branch.
85
+ - **The base judged is the one named by the command, not the tip of the working copy.** A branch is
86
+ also created straight from main's tip — that very command takes the base fresh — and a guard
87
+ reading only the current tip would refuse it like a branch off yesterday's tree. A base the tree
88
+ knows nothing of is not judged at all.
89
+ - **A branch without a work item number gets no delivery conditions.** A local trial branch is
90
+ legitimate, and demanding a fresh base of it would refuse work that will not go to main: no PR
91
+ opens from such a branch.
92
+ - **A code edit is handed to a person by an open PR, not by a pushed branch.** A branch is not shown
93
+ to them in the branch list, reaches no to-do list of theirs and has no discussion: before the PR
94
+ opens there is no edit for a person. It opens in the turn in which the executor says the work is
95
+ handed over, and the reply names it by number.
96
+ - **What is not ready to merge opens as a draft — `az repos pr create --draft true`.** The host
97
+ itself locks a draft's complete button, so the state "put up for viewing" and the state "may be
98
+ merged" stop looking alike. Everything waiting for a pipeline run, a rework or an answer goes as a
99
+ draft; the question is asked in the PR itself. The check pipeline does not run on a draft by
100
+ default — until the draft is lifted it stays silent, and that silence is not taken for a green
101
+ run.
102
+ - **The draft is lifted by a separate call — `az repos pr update --id <номер> --draft false`.** With
103
+ it the executor answers for readiness: checks passed, no rework left, the work matches the work
104
+ item. Lifting the draft and asking to merge are one turn, not two days.
105
+ - **A created work item is confirmed by the work queue's answer, not by the creation command's
106
+ output.** The command answers for its calls: it can create an item and not bring it to the board,
107
+ and its own error handling names that case. A printed number means "the call went through", not
108
+ "the work is visible to whoever comes by it". The queue is asked — by number, in one call — and
109
+ the answer is read from the item's presence on the board, its state and its assignee.
110
+ - **The branch number and the PR title number are checked on the spot, the state — by the board.**
111
+ The format is read from the command text and works offline; the work item's existence, its state,
112
+ assignee and that it is still open — only with something to ask with. No network or no token — the
113
+ second tier is skipped silently: a check that fails on a plane stops meaning anything.
114
+ - **The work item's state moves in the same motion as the work.** Branch created — the item is moved
115
+ to `Active`, PR opened — to `Resolved`; the move command does it, not a set of calls from memory.
116
+ The move follows the step that caused it at once: the work queue is read between steps, not after.
117
+ - **A work item left in the initial state opens no PR.** The delivery guard names that state and the
118
+ move command: by the work queue such an item reads as not taken, though the work on it is done and
119
+ published. At branch creation the state is not asked — nothing has moved it yet, and the
120
+ requirement would refuse the first command of the work together with the one that lifts it. The
121
+ tree names the initial state itself; unnamed — the state is not judged at all.
122
+ - **The board holds work items, not PRs about them.** The board shows what is done and what is left;
123
+ a PR answers another question — how exactly it was done — and opens from the item, where the link
124
+ to it stands by itself. Here that link is set at PR creation, so a separate card is not needed at
125
+ all, and one created lives its own life: there is no state for it, it never leaves the queue and
126
+ stays in it after the merge forever. The queue audit finds such cards, a line each.
127
+ - **A lagging state is found by the queue audit, not by eye.** The audit judges the state by the PR
128
+ both ways: an open PR with the item not in review, and review with no open PR — both
129
+ discrepancies. The moment a task is taken into work it cannot see: the branch is not on the board.
130
+ - **A branch with an open PR lags behind main silently.** The guard judges the base once — at
131
+ opening; what merged into main during the run a green run never sees, and a PR merged from there
132
+ brings main a combination nobody checked. The lag is found by the work queue audit: it asks the
133
+ repository how many commits each open PR's branch is behind main, and names the number.
134
+ - **Tasks fixed by one edit are merged before the branch merge.** The second is closed as a
135
+ duplicate, and the missing from it is added to the first. The law orders the second erased, and
136
+ this is the second declared deviation: a work item here has a native "duplicate" link, deletion
137
+ takes the edit history and attachments with it, and the number is not reused after it — a link to
138
+ an erased item from someone else's commit leads into a void. After the merge there is no merging
139
+ them: the branch went in, and it rolls back whole.
140
+ - **Work that one session cannot close is marked in two places, and they are audited.** The label on
141
+ the board and the line about sessions with a handover in the epic plan say the same to two
142
+ readers: the executor opens the card before the epic plan, and plans by the plan. One mark without
143
+ the other lies silently, so the queue audit judges the pair both ways. Only what legitimately does
144
+ not split is marked: a mark of volume grants no right to split.
145
+ - **A document goes in the same commit as the edit.** The bypass is the line `Docs-skip: <reason>`
146
+ in the commit body; an empty reason is not accepted.
147
+ - **The commit subject is checked against the format on the spot.** A subject parsed by type and
148
+ scope is read as a list, free text — only whole.
149
+ - **Before a push all linters are run, not one.** The code linter usually does not read style files
150
+ at all; without a second run nothing checks the styling rules.
151
+ - **The build is in the set on a par with lint and unit tests.** The linter does not read types, and
152
+ unit tests read only what a test imports: a type error in uncovered code lives until the image
153
+ build — that is, the merge. Four merges in a row went into main that way, breaking the rollout.
154
+ - **On a machine with several runners, any path from the home directory is shared.** A ready-made
155
+ step's default is dangerous precisely because it is shared: a neighbouring run rewrites it to its
156
+ own version while ours stands between steps. Install directory, container name and builder name
157
+ are therefore per project and fixed, and a temporary directory is never the answer — the package
158
+ store lives there.
159
+ - **The push gate set is never narrower than the pipeline set.** The gate is a promise that the push
160
+ will not arrive red; a set with the build and the snapshots thrown out promises what it does not
161
+ check. A pipeline step with neither a line in the gate set nor a declared exclusion with a reason
162
+ refuses the push instead of printing next to it: a printed warning the executor reads as
163
+ permission. Twice in a row an edit that passed the gate whole was refused by the pipeline — and
164
+ both times the green gate was read as "all green locally".
165
+ - **The final set before a push is read from the state review, not assembled in the head.** It is
166
+ assembled from the package default and the tree's override, and there was nothing to read the
167
+ assembly with: the "set before push" section prints it whole, one command per line, and names
168
+ beside it what the default printed and the set did not take. A tree writing its override blind
169
+ added a repeat to it.
170
+ - **An exclusion reason naming a task is judged on whether that task is alive.** A deferral with a
171
+ term and one without look the same until someone asks the number; a dead number in the reason
172
+ makes the exclusion perpetual without saying a line about it. Asked by the same tier as the task
173
+ state at the delivery guard: something to ask with — it asks, no network or access — it skips
174
+ silently.
175
+ - **The layout audit stands in the push gate set on a par with lint and the build.** An edit put
176
+ into the laid-out copy past the source breaks nothing on the day it is made: the tree works, the
177
+ checks are green, and the discrepancy is visible only to whoever calls the audit themselves. It
178
+ piles up silently and surfaces on someone else's work — the layout refuses the edited file whole
179
+ and lays out no other, so the price is paid by whoever edited a neighbouring resource. The article
180
+ above does not cover this line: the audit is not in the pipeline, so there is no step it would
181
+ close — it is put into the set directly, not derived from the set's completeness.
182
+ - **After merging main in, the check set is revised by what the branch now carries.** The merge
183
+ changes the makeup of the edit: checking by what the author edited means checking half, and the
184
+ branch answers whole. A branch that touched no line of the showcase runs showcase snapshots from
185
+ the moment the merge brought someone else's styling edit.
186
+ - **A statement about the main branch is made by the remote ref, not the local one.** The local one
187
+ goes stale the minute it was last pulled, and says nothing about it: it is not empty and not
188
+ broken, it describes yesterday. A branch comparison is written from `origin/main` whole — mixing
189
+ the remote ref for one side and the local one for the other in one command, the miss looks right
190
+ from inside.
191
+ - **The remote ref is taken not only by words but by actions.** A new branch's base, the count of
192
+ the merged and pulling main are judged by it too: the local one is a snapshot of the last pull,
193
+ and work started from it starts from a base main no longer has. A merged branch counts as unmerged
194
+ by it, and cleanup ends with a list of unmerged that is not there.
195
+ - **A work item is bound to the PR at creation, not after.** `az repos pr create` takes
196
+ `--work-items`; binding by a second command is bypassed silently when the token has no right to
197
+ edit someone else's item, and the PR stays bound to nothing.
198
+ - **A merge with auto-complete does not replace the checks before a push.** Auto-complete sees only
199
+ the pipeline, and the pipeline sees only what is pushed: a red branch occupies the work queue and
200
+ looks ready for review.
201
+ - **The state set is taken from the project process, not assigned by the rule.** Agile, Scrum and
202
+ Basic name the same three steps differently, and a move to a state the process lacks answers with
203
+ a refusal on every task in a row.
204
+ - **Guard scenarios set the git settings themselves, not take them from the machine.** A commit in
205
+ the scenario's temporary repository inherits the shared config: with signing on, git goes to the
206
+ key agent, and a locked agent brings the whole set down — from outside it looks like a broken
207
+ guard. Author, email and signature are passed as `-c` flags straight into the command.
208
+
209
+ ## What of the law is not here
210
+
211
+ This host has no task key, and the name form is built from the number alone. The law demands the
212
+ number be written the same everywhere — "key, hyphen, number" — and this is a deviation from it,
213
+ declared here: a work item number is unique across the whole project, and the host's native link
214
+ form — `AB#<номер>` — carries no key at all, and one attached to it breaks the linking of a commit
215
+ to the item. The `board.taskKey` setting a tree on this host does not set; the checks that look for
216
+ a key in the title judge the bare number here.
217
+
218
+ The delivery guard stands on the agent's commands, so it does not see a branch created by hand in
219
+ the editor: its name is held by memory. The requirement is no weaker for that — only no separate
220
+ check is made for it: work is recognised by the work item title and the PR, and that is audited for
221
+ everyone. The queue audit never judges the branch name: an open PR's branch cannot be renamed.
222
+
223
+ The guard does not move a work item to in progress: it does not edit the board — a board edit during
224
+ command review would fall with the connection and refuse the work instead of the miss. The move is
225
+ held by memory and by the hint the creation command prints. An item left in the initial state the
226
+ guard names at PR opening — that is, after it should have been moved; other state discrepancies the
227
+ queue audit finds.
228
+
229
+ The guard does not ask for a reviewer here: lifting the draft is an edit of the PR itself — the same
230
+ call as its other fields — and to a machine it cannot be told from other edits. This is held by the
231
+ vocabulary above, where the PR review is led by the reviewer, and by the memory of whoever lifts the
232
+ draft.
233
+
234
+ The freshness of main's tip itself the guard asks by the second tier — the same technique as the
235
+ task state: something to ask with — it asks; no network or access — it skips silently. The first
236
+ tier stays and works offline: the local ref answers the question "has the base lagged what already
237
+ lies in the tree", the remote one — "has the ref itself gone stale". Without the second tier the
238
+ guard's silence meant only the first and was read as the second.
239
+
240
+ ## Patterns
241
+
242
+ - `git-workflow-commit` — work item, branch, commit and push as the machine account.
243
+ - `git-workflow-pr` — opening a PR, the draft and lifting it, the body, reviewer, binding to the
244
+ item.
245
+ - `git-workflow-merge` — main merged into the task branch, the conflict resolved.