@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,58 +2,59 @@
2
2
  name: git-workflow-commit
3
3
  kind: pattern
4
4
  rule: git-workflow
5
- description: Паттерн правила git-workflow. Брать на заведение задачи, ветки, коммит и пуш: команда заведения со всеми четырьмя шагами, перевод колонки, слияние двух задач в одну, работа от машинной записи, обход требования документа. Открытие PR — паттерн git-workflow-pr.
5
+ description: Pattern of rule git-workflow. Load for creating a task and a branch, commit and push — the creation command with all four steps, moving the column, merging two tasks into one, working as the machine account, skipping the document requirement. Opening a PR — pattern git-workflow-pr.
6
6
  ---
7
7
 
8
- # Задача, ветка и коммит
8
+ # Task, branch and commit
9
9
 
10
- Паттерн правила `git-workflow`. Что при этом должно быть верно — закон
10
+ Pattern of the rule `git-workflow`. What must be true meanwhile — the law
11
11
  `docs/constitution/delivery.md`.
12
12
 
13
- ## Когда брать
13
+ ## When to use
14
14
 
15
- - Заводится задача, с которой начинается правка.
16
- - Заводится ветка под задачу.
17
- - Готовится коммит или пуш.
18
- - Работа перешла на следующий шаг, и задача переставляется в другую колонку борды.
15
+ - A task is being created, and the edit starts from it.
16
+ - A branch is being created for a task.
17
+ - A commit or a push is being prepared.
18
+ - The work moved to the next step, and the task moves to another column of the board.
19
19
 
20
- ## Сначала задача на борде, потом ветка
20
+ ## First the task on the board, then the branch
21
21
 
22
- Заведение состоит из четырёх шагов: issue, номер в его заголовке, добавление на борду,
23
- первая колонка. Борда к репозиторию не привязана — `projectsV2` у него пуст, — поэтому третий
24
- шаг сам не случается, и задача без него не видна ни в очереди работ, ни владельцу: так две
25
- задачи и простояли месяц.
22
+ Creation is four steps: the issue, the number in its title, adding to the board, the first
23
+ column. The board is not bound to the repository — its `projectsV2` is empty — so the third step
24
+ does not happen by itself, and without it the task is visible neither in the work queue nor to
25
+ the owner: two tasks stood that way for a month.
26
26
 
27
- Все четыре шага делает одна команда дерева, а не рука: делить их значит забывать третий.
27
+ All four steps are done by one tree command, not by hand: splitting them means forgetting the
28
+ third.
28
29
 
29
- **Команду, которой нет, паттерн не заменяет вызовами клиента.** Дерево, взявшее пакет впервые,
30
- получает файлы проверок, но не записи о них в своём манифесте: раскладка правит ресурсы, а
31
- манифест потребителя ей не принадлежит. Ходов отсюда два: завести команду тем же ходом либо
32
- повторить все её шаги поимённо по перечню выше. Обход вызовами клиента выглядит исполнением до
33
- последнего шага перечня: он забывается первым, потому что предыдущие уже дали видимый
34
- результат. Так карточка простояла вне
35
- колонок всю работу — два коммита и два закрытых этапа.
30
+ **A command that does not exist is not replaced by client calls in the pattern.** A tree that
31
+ takes the package for the first time gets the check files, but not the entries about them in its
32
+ manifest: the layout edits resources, and the consumer's manifest does not belong to it. Two ways
33
+ from here: create the command in the same turn, or repeat all its steps by name from the list
34
+ above. A bypass by client calls looks like execution up to the last step of the list: it is
35
+ forgotten first, because the previous ones have already given a visible result. So a card stood
36
+ outside the columns for the whole work — two commits and two closed stages.
36
37
 
37
- **Локальные ветки этой задачи читаются до заведения новой.** Борда не видит ветки, и задача, по
38
- которой работа лежит доделанной в локальной ветке, выглядит открытой у всех: колонку двигают
39
- рукой, заявки нет, а ветка видна только на той машине, где её завели. Под один номер так
40
- завелась вторая ветка со своей папкой задачи и своим замыслом — то есть работа была спланирована
41
- второй раз, и выбирать из двух пришлось владельцу.
38
+ **The local branches of this task are read before a new one is created.** The board does not see
39
+ branches, and a task whose work lies finished in a local branch looks open to everyone: the column
40
+ is moved by hand, there is no PR, and the branch is visible only on the machine where it was
41
+ created. So a second branch was created under one number, with its own task folder and its own
42
+ plan — that is, the work was planned a second time, and the owner had to choose between the two.
42
43
 
43
44
  ```bash
44
45
  git branch --list '<КЛЮЧ>-<номер>-*'
45
46
  ```
46
47
 
47
- Одна строка ответа означает, что работа уже начата: её состояние читается в ходе работы её
48
- папки, а не заводится заново. Пустой ответ говорит только про эту машину — ветка, заведённая на
49
- другой и не отданная хостингу, не видна и отсюда.
48
+ One line of answer means the work is already started: its state is read in the progress of its
49
+ folder, not created anew. An empty answer speaks only about this machine — a branch created on
50
+ another and not handed to the host is invisible from here too.
50
51
 
51
- **Очередь работ спрашивается до заведения задачи, а не после.** Найденное собственной сверкой
52
- ощущается новым, и это ощущение — единственное, что стоит за решением завести задачу: команда
53
- заведения отвечает за свои вызовы и о содержании очереди не знает ничего. Спрашивается она
54
- поиском по словам темы, вместе с закрытым за последний месяц: дефект, закрытый и вернувшийся, —
55
- та же работа, а не новая. Дубль стоит дорого — по нему проходит вся работа целиком, а сводить
56
- две задачи в одну потом приходится руками.
52
+ **The work queue is asked before the task is created, not after.** What one's own audit found
53
+ feels new, and that feeling is the only thing behind the decision to create a task: the creation
54
+ command answers for its calls and knows nothing about the queue's contents. It is asked by a search
55
+ over the topic words, together with what was closed in the last month: a defect closed and back
56
+ again is the same work, not a new one. A duplicate costs a lot — the whole work goes through it,
57
+ and merging two tasks into one afterwards is done by hand.
57
58
 
58
59
  ```bash
59
60
  /opt/homebrew/bin/gh issue list --state all --limit 200 --search '<слова темы>' \
@@ -66,75 +67,79 @@ npm run task:new -- --title 'Письма владельцу не уходят
66
67
  --label bug --label area:api --slug mail-owner-silence < описание.md
67
68
  ```
68
69
 
69
- Тело читается со стандартного ввода, `--slug` необязателен и идёт только в подсказку с именем
70
- ветки. Автор и исполнитель — учётная запись машинной работы; токен команда читает сама, из
71
- файла вне репозитория.
70
+ The body is read from standard input, `--slug` is optional and goes only into the hint with the
71
+ branch name. Author and assignee — the machine account; the command reads the token itself, from
72
+ a file outside the repository.
72
73
 
73
- Скрипт под этой командой заводит проект — пакет её не везёт. Что он делает вызовами `gh`:
74
+ The script under this command is created by the project — the package does not ship it. What it
75
+ does by `gh` calls:
74
76
 
75
77
  ```bash
76
78
  gh issue create --title '[<КЛЮЧ>-<номер>] …' --label bug --assignee <бот> --body-file -
77
- gh issue edit <номер> --title '[<КЛЮЧ>-<номер>] …' # номер известен только после создания
79
+ gh issue edit <номер> --title '[<КЛЮЧ>-<номер>] …' # the number is known only after creation
78
80
  gh project item-add <номер борды> --owner <владелец> --url <адрес issue>
79
81
  ```
80
82
 
81
- Последний шаг и есть тот, который забывается: без него задача заведена, но её нет в очереди.
83
+ The last step is the one that gets forgotten: without it the task is created, but it is not in the
84
+ queue.
82
85
 
83
- Заведение кончается не выводом команды, а ответом очереди работ. Команда спрашивает её сама и
84
- печатает прочитанное — присутствие на борде, колонку, исполнителя; отсутствие кончает её
85
- ненулевым кодом. В комментарий, в тело PR и в замысел идёт этот ответ, а не напечатанный
86
- номер: номер говорит «вызов прошёл», а не «задача видна тому, кто по ней работает».
86
+ Creation ends not with the command's output but with the work queue's answer. The command asks
87
+ it itself and prints what it read — presence on the board, the column, the assignee; absence ends
88
+ it with a non-zero code. That answer goes into the comment, the PR body and the plan, not the
89
+ printed number: the number says "the call went through", not "the task is visible to whoever
90
+ works on it".
87
91
 
88
- Заведения, идущие подряд, проверяются не по последнему, а сверкой очереди целиком: промах у них
89
- общий, и по одной задаче он не виден. Шестнадцать задач подряд напечатали номер, и ни одна не
90
- попала в очередь так, чтобы её увидел владелец.
92
+ Creations that go one after another are checked not by the last one but by an audit of the whole
93
+ queue: their miss is shared, and by one task it is invisible. Sixteen tasks in a row printed a
94
+ number, and not one reached the queue so that the owner saw it.
91
95
 
92
- Задача, заведённая по тексту документа, называет в теле проверку в дереве. Цитата основанием не
93
- бывает: документ говорит о замысле, стареет молча и остаётся верным на вид, а задача заводится
94
- под то, что в дереве сейчас. В теле стоит файл и символ, где промах виден, либо вывод команды,
95
- который его показывает. Не нашлось ни того ни другого — задача не заводится, а строка документа
96
- правится тем ходом, которым её прочитали.
96
+ A task created from the text of a document names a check in the tree in its body. A quote is
97
+ never the ground: a document speaks of intent, goes stale silently and stays true on the face of
98
+ it, while a task is created for what is in the tree now. The body holds the file and the symbol
99
+ where the miss is visible, or the command output that shows it. Neither found — the task is not
100
+ created, and the document line is edited in the turn that read it.
97
101
 
98
- Название задачи говорит, что не так, а не что сделать: PR потом переводит его в сделанное.
99
- Номер в заголовок руками не пишется — он известен только после создания, и команда дописывает
100
- его сама.
102
+ The task title says what is wrong, not what to do: the PR turns it into the done later. The number
103
+ is not written into the title by hand — it is known only after creation, and the command appends
104
+ it itself.
101
105
 
102
- Чем сверить, что очередь работ в порядке:
106
+ What to check the work queue with:
103
107
 
104
108
  ```bash
105
109
  npm run check:board
106
110
  ```
107
111
 
108
- Она смотрит только открытое: задачи на борде, номер и исполнителя у каждой открытой задачи,
109
- а у каждого открытого PR — номер в заголовке, строку `Closes`, открытую задачу за ним и то,
110
- что второго PR с тем же номером нет. Имя ветки не судит: у открытого PR его не переименовать.
112
+ It looks only at what is open: the tasks on the board, the number and the assignee of every open
113
+ task, and for every open PR — the number in the title, the `Closes` line, the open task behind it
114
+ and that there is no second PR with the same number. It does not judge the branch name: an open PR
115
+ cannot have it renamed.
111
116
 
112
- Закрытые задачи сверка на борде не ищет, и добавлять их туда задним числом не надо: закрытая
113
- задача уходит из очереди мержем, а колонки под неё у борды нет. О закрытой задаче сверка
114
- помнит только одно — её папку в `docs/tasks/`.
117
+ Closed tasks the audit does not look for on the board, and there is no need to add them there
118
+ after the fact: a closed task leaves the queue by merge, and the board has no column for it. Of a
119
+ closed task the audit remembers only one thing — its folder in `docs/tasks/`.
115
120
 
116
- ## Две задачи, которые чинятся одной правкой
121
+ ## Two tasks fixed by one edit
117
122
 
118
- Если по ходу выяснилось, что правка закрывает и соседнюю задачу, — это одна задача, а не две.
119
- Слить их можно, пока правка не въехала в главную ветку:
123
+ If it turned out along the way that the edit closes the neighbouring task too — that is one task,
124
+ not two. They can be merged while the edit has not reached the main branch:
120
125
 
121
126
  ```bash
122
127
  GH=/opt/homebrew/bin/gh
123
- # то, чего в поглотившей задаче не было, дописывается в её тело
128
+ # what the absorbing task lacked is appended to its body
124
129
  $GH api -X PATCH repos/<владелец>/<репозиторий>/issues/<поглотившая> -f body="$(cat тело.md)"
125
- # поглощённая стирается вместе с номером — две строки об одной работе хуже дыры в нумерации
130
+ # the absorbed one is erased with its number — two lines about one work are worse than a numbering gap
126
131
  $GH api graphql -f query='mutation { deleteIssue(input: {issueId: "<node-id>"})
127
132
  { repository { name } } }'
128
133
  ```
129
134
 
130
- Удаление необратимо и уносит с собой ссылки вида `Closes #<номер>` из чужих тел — поэтому
131
- сначала правится поглотившая задача, и только потом стирается поглощённая. После мержа
132
- поглощения нет: ветка въехала, и откатывается она целиком.
135
+ Deletion is irreversible and takes away the `Closes #<номер>` links from other bodies with it — so
136
+ the absorbing task is edited first, and only then the absorbed one is erased. After the merge
137
+ there is no absorbing: the branch went in, and it is reverted whole.
133
138
 
134
- ## Ветка заводится отдельным вызовом
139
+ ## The branch is created by a separate call
135
140
 
136
- Гард главной ветки разбирает текст команды и смотрит ветку на момент запуска, поэтому
137
- составная команда отклоняется целиком — ветки в ней ещё нет:
141
+ The main branch guard parses the command text and looks at the branch at launch, so a compound
142
+ command is rejected whole — the branch does not exist in it yet:
138
143
 
139
144
  ```bash
140
145
  ✗ git checkout -b <КЛЮЧ>-85-guest-token && git commit -m 'feat(<область>): …'
@@ -142,38 +147,39 @@ $GH api graphql -f query='mutation { deleteIssue(input: {issueId: "<node-id>"})
142
147
  ✓ git commit -F -
143
148
  ```
144
149
 
145
- Имя — `<КЛЮЧ>-<номер задачи>-<короткий-slug>`, slug строчными латинскими через дефис. Гард
146
- поставки разбирает его на месте и отбивает промах в форме до первого коммита, а по номеру
147
- спрашивает борду: задача должна существовать, быть открытой, стоять в очереди и иметь
148
- исполнителя.
150
+ The name — `<КЛЮЧ>-<номер задачи>-<короткий-slug>`, the slug in lowercase Latin letters joined by
151
+ hyphens. The delivery guard parses it on the spot and refuses a miss in the form before the first
152
+ commit, and by the number it asks the board: the task must exist, be open, stand in the queue and
153
+ have an assignee.
149
154
 
150
- Имя без номера (`feat/…`, `fix/…`) законно, пока ветка живёт локально — под пробу и разбор.
151
- PR с неё не откроется: правка, доезжающая до главной ветки, начинается с задачи.
155
+ A name without a number (`feat/…`, `fix/…`) is legitimate while the branch lives locally — for a
156
+ trial and an analysis. No PR opens from it: an edit that reaches the main branch starts with a
157
+ task.
152
158
 
153
- ## Колонка задачи двигается вместе с работой
159
+ ## The task column moves together with the work
154
160
 
155
- Ветка заведена — задача уже не в `📋 Backlog`, а в работе. PR открыт — она ждёт разбора.
156
- Оба перевода делает одна команда, вторым вызовом сразу за тем, который его вызвал:
161
+ Branch created — the task is no longer in `📋 Backlog` but in progress. PR opened — it awaits
162
+ review. Both moves are done by one command, as a second call right after the one that caused it:
157
163
 
158
164
  ```bash
159
- npm run task:move -- 86 in-progress # сразу после git checkout -b <КЛЮЧ>-86-…
160
- npm run task:move -- 86 in-review # сразу после gh pr create
165
+ npm run task:move -- 86 in-progress # right after git checkout -b <КЛЮЧ>-86-…
166
+ npm run task:move -- 86 in-review # right after gh pr create
161
167
  ```
162
168
 
163
- Колонки под своими именами: `backlog`, `in-progress`, `in-review`, а ещё `new`, `ready`,
164
- `done` и `deployed`, через которые работа не проходит — закрытая задача уходит из очереди
165
- мержем. Команда правит борду под ботом, читает токен сама и печатает, откуда куда переставила;
166
- задачи не на борде и незнакомой колонки не принимает.
169
+ The columns under their own names: `backlog`, `in-progress`, `in-review`, and also `new`,
170
+ `ready`, `done` and `deployed`, which the work does not pass through — a closed task leaves the
171
+ queue by merge. The command edits the board as the bot, reads the token itself and prints from
172
+ where to where it moved; it accepts neither tasks off the board nor an unknown column.
167
173
 
168
- Перевод не откладывается на потом: очередь работ читают между шагами, а не после них. Задача
169
- с открытым PR простояла в `📋 Backlog` до самой сверки — всё это время она выглядела
170
- нетронутой, а разбора за неё никто не ждал.
174
+ The move is not put off for later: the work queue is read between steps, not after them. A task
175
+ with an open PR stood in `📋 Backlog` until the audit itself — all that time it looked untouched,
176
+ and nobody was waiting to review it.
171
177
 
172
- ## Коммит подписывается ботом
178
+ ## The commit is signed by the bot
173
179
 
174
- Токен читается в переменную и не печатается; автор и коммиттер задаются переменными той же
175
- команды. `git config` не годится — конфиг общий с основным деревом и переписал бы подпись
176
- владельцу:
180
+ The token is read into a variable and not printed; author and committer are set by variables of
181
+ the same command. `git config` will not do — the config is shared with the main tree and would
182
+ rewrite the signature to the owner:
177
183
 
178
184
  ```bash
179
185
  TOKEN=$(tr -d '\n' < ~/.config/<дерево>-bot-token)
@@ -183,9 +189,9 @@ GIT_COMMITTER_NAME="<бот>" GIT_COMMITTER_EMAIL="<номер>+<бот>@users.n
183
189
  git commit -F -
184
190
  ```
185
191
 
186
- Заголовок — `type(scope): description`. Типы: `feat`, `fix`, `refactor`, `docs`, `style`,
187
- `test`, `chore`, `perf`. Области: `site`, `admin`, `api`, `common`, `proto`, `deploy`. Точка в
188
- конце заголовка не принимается, длина — до 150 знаков.
192
+ The subject — `type(scope): description`. Types: `feat`, `fix`, `refactor`, `docs`, `style`,
193
+ `test`, `chore`, `perf`. Scopes: `site`, `admin`, `api`, `common`, `proto`, `deploy`. A full stop
194
+ at the end of the subject is not accepted; the length — up to 150 characters.
189
195
 
190
196
  ```
191
197
  feat(<область>): availability calendar with season prices
@@ -193,58 +199,63 @@ fix(<область>): reject overlapping booking dates
193
199
  chore(deploy): docker-compose for vps
194
200
  ```
195
201
 
196
- ## Файлы своей работы называются поимённо
202
+ ## The files of one's own work are named one by one
197
203
 
198
- Рабочее дерево одно, а работ в нём бывает несколько: чужая незакоммиченная папка, оставленный
199
- черновик, правка соседнего захода. Каталог, добавленный целиком, уносит их с собой, и в главную
200
- ветку уезжает то, о чём эта работа не просила.
204
+ The working tree is one, and there can be several works in it: someone else's uncommitted folder,
205
+ a draft left behind, an edit of a neighbouring session. A directory added whole takes them along,
206
+ and what this work never asked for leaves for the main branch.
201
207
 
202
208
  ```bash
203
209
  git add docs/tasks/<КЛЮЧ>-<номер>-<slug>/plan.md docs/tasks/<КЛЮЧ>-<номер>-<slug>/progress.md
204
- git diff --cached --name-only # что действительно встало в индекс
210
+ git diff --cached --name-only # what actually got into the index
205
211
  ```
206
212
 
207
- Проверки индекса после добавления мало: однажды добавленный чужой файл становится
208
- отслеживаемым и дальше едет молча — следующий `git add` его уже не спрашивает.
213
+ Checking the index after adding is not enough: a foreign file added once becomes tracked and goes
214
+ on silently — the next `git add` no longer asks about it.
209
215
 
210
- ## Документ едет тем же коммитом
216
+ ## The document goes in the same commit
211
217
 
212
- `docs-guard` требует пару и называет её сам. Обход — строка в теле, причина обязательна:
218
+ `docs-guard` demands the pair and names it itself. The bypass — a line in the body, the reason
219
+ is mandatory:
213
220
 
214
221
  ```
215
222
  Docs-skip: правка только в тестах хука, зеркала у него нет
216
223
  ```
217
224
 
218
- ## Частые промахи
219
-
220
- - **Сверка сразу после добавления отвечает «нет», когда карточка уже стоит.** Очередь работ отдаёт
221
- новый элемент не в ту же секунду, в какую его завели, а последний шаг читает её следующим
222
- вызовом. Ответ на это — перечитать очередь целиком, а не завести карточку второй раз: две записи
223
- об одной задаче снимает только администратор. Сама команда заведения при этом требует правки:
224
- состояние читается сразу за мутацией, без повтора, и ложный отказ здесь дороже задержки.
225
- - `gh` в оболочке пользователя подменён — звать `/opt/homebrew/bin/gh` напрямую.
226
- - Каталог добавлен целиком при чужом незакоммиченном рядом: чужая папка задачи уехала в главную ветку и стала отслеживаемой.
227
- - `git add` с несколькими путями не добавляет ничего, если хоть один путь не существует:
228
- команда обрывается на первом промахе целиком, а не пропускает его. Следующий
229
- `git commit --amend` при этом уносит в коммит всё, что осталось в индексе, — так в коммит
230
- уехало удаление файла, принадлежавшее соседней ветке. Состав коммита читается
231
- `git show --stat` сразу после него, а не на разборе PR.
232
- - Состав индекса читается `git diff --cached --stat` **до** коммита, а не только `git show --stat`
233
- после него. Команды дерева кладут файлы в индекс сами: `npm run task:new` добавляет папку
234
- задачи, и вместе с ней уезжает всё, что лежало рядом, — так в индексе оказался временный
235
- каталог диагностики.
236
- - `gh project` с `--owner` отвечает `unknown owner type`: владелец борды — другая учётная
237
- запись, и правка идёт только через GraphQL.
238
- - Заведённую задачу на борду сама она не забирает: репозиторий с ней не связан, и добавление
239
- идёт отдельным вызовом. Две задачи так и остались вне очереди работ — поэтому все четыре
240
- шага и делает `npm run task:new`, а не рука.
241
- - Исполнитель у задачи не проставляется сам ни при заведении через веб, ни при добавлении на
242
- борду: из девяноста девяти открытых задач он стоял у двух.
243
- - Задача, заведённая через веб, мимо команды, на борду не попадает и гардом не отбивается —
244
- он смотрит команду, а не задачу. Ловится это только сверкой очереди.
245
- - Колонка задачи сама не двигается ни от заведения ветки, ни от открытия PR: борда ветки не
246
- видит вовсе, а связь с PR заполняет только поле «Linked pull requests». Взятие в работу не
247
- ловит и сверка — ей ветка тоже не видна.
248
- - `gh api graphql --paginate` на запросе элементов борды уходит в повтор первой страницы:
249
- курсор берётся из ответа руками, а полнота сверяется с `items(first: 1) { totalCount }`.
250
- - Правка владельца ни токена, ни переменных не берёт — они только для машинной работы.
225
+ ## Common misses
226
+
227
+ - **An audit right after adding answers "no" when the card already stands.** The work queue gives
228
+ out a new item not in the same second it was created, and the last step reads it by the next
229
+ call. The answer to this is to reread the whole queue, not to create the card a second time: two
230
+ records about one task are removed only by an administrator. The creation command itself needs
231
+ an edit here: the state is read right after the mutation, without a retry, and a false refusal
232
+ here costs more than a delay.
233
+ - `gh` in the user's shell is substituted — call `/opt/homebrew/bin/gh` directly.
234
+ - A directory added whole with someone else's uncommitted work next to it: a foreign task folder
235
+ left for the main branch and became tracked.
236
+ - `git add` with several paths adds nothing if even one path does not exist: the command breaks
237
+ off whole at the first miss instead of skipping it. The next `git commit --amend` then carries
238
+ into the commit everything left in the index — so a file deletion belonging to a neighbouring
239
+ branch went into the commit. The commit contents are read by `git show --stat` right after it,
240
+ not at PR review.
241
+ - The index contents are read by `git diff --cached --stat` **before** the commit, not only by
242
+ `git show --stat` after it. Tree commands put files into the index themselves: `npm run
243
+ task:new` adds the task folder, and everything lying next to it goes along — so a temporary
244
+ diagnostics directory ended up in the index.
245
+ - `gh project` with `--owner` answers `unknown owner type`: the board owner is another account,
246
+ and the edit goes only through GraphQL.
247
+ - A created task is not taken onto the board by itself: the repository is not linked to it, and
248
+ adding goes by a separate call. Two tasks stayed outside the work queue that way — which is why
249
+ all four steps are done by `npm run task:new`, not by hand.
250
+ - The assignee of a task is not set by itself either at creation through the web or at adding to
251
+ the board: of ninety-nine open tasks it stood on two.
252
+ - A task created through the web, past the command, does not reach the board and is not refused
253
+ by the guard — it looks at the command, not at the task. Only the queue audit catches this.
254
+ - The task column does not move by itself either from creating a branch or from opening a PR: the
255
+ board does not see the branch at all, and the link to the PR fills only the host's field of
256
+ linked PRs. The audit does not catch taking into work either — the branch is invisible to it
257
+ too.
258
+ - `gh api graphql --paginate` on a query of board items goes into repeating the first page: the
259
+ cursor is taken from the answer by hand, and completeness is checked against
260
+ `items(first: 1) { totalCount }`.
261
+ - The owner's edit takes neither the token nor the variables — they are only for machine work.