@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
@@ -1,32 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Сверка очереди работ с тем, что закон о поставке требует от задачи и её PR.
3
+ * Audit of the work queue against what the delivery law requires of a task and its PR.
4
4
  *
5
- * Гард поставки отбивает промах в момент, когда его совершают, но действует только
6
- * на команды агента: тикет, заведённый мимо него, и PR, открытый руками, он не
7
- * видит. Эта сверка отвечает на другой вопрос — «а вся ли очередь в порядке
8
- * сейчас», — и потому смотрит на состояние, а не на команду.
5
+ * The delivery guard refuses a miss at the moment it is made, but it acts only on the agent's
6
+ * commands: a task created past it and a PR opened by hand it does not see. This audit answers
7
+ * a different question — "is the whole queue in order right now" — and so it looks at the state,
8
+ * not at the command.
9
9
  *
10
- * Судит только открытое. Закрытые задачи и влитые PR — это история: из сорока
11
- * последних влитых PR тридцать шесть пришли с веток, за которыми задачи не стояло,
12
- * и красная навсегда проверка ничем не отличалась бы от её отсутствия.
10
+ * It judges only what is open. Closed tasks and merged PRs are history: of the last forty merged
11
+ * PRs, thirty-six came from branches with no task behind them, and a check that is red forever
12
+ * would be no different from no check at all.
13
13
  *
14
- * Имя ветки не судит. У открытого PR его не переименовать — это новая ветка и новый
15
- * PR, — а проверка, требующая невыполнимого, обходится, а не исполняется. Имя ветки
16
- * стережёт гард в момент `git checkout -b` и `gh pr create`.
14
+ * It does not judge the branch name. An open PR cannot have its branch renamed — that is a new
15
+ * branch and a new PR — and a check that demands the impossible gets bypassed, not carried out.
16
+ * The branch name is watched by the guard at the moment of `git checkout -b` and `gh pr create`.
17
17
  *
18
- * Колонку задачи судит по её PR: открытый PR означает разбор, отсутствие — нет.
19
- * Момент, когда задачу берут в работу, отсюда не виден вовсе — ветки на борде нет, —
20
- * и «In progress» здесь не требуется ни от кого.
18
+ * The task's column is judged by its PR: an open PR means review, none means no review. The
19
+ * moment a task is taken into work is not visible from here at all — the board has no branch —
20
+ * and "In progress" is required of nobody here.
21
21
  *
22
- * Прогон на вершине спрашивает тоже она: страница PR без прогона выглядит так же, как
23
- * страница с зелёным, — цвета у неё нет ни там, ни там, — и вершина, за которой прогон
24
- * не встал, узнаётся только тем, что кто-то открыл список прогонов руками.
22
+ * The run on the head is asked by this audit too: a PR page without a run looks the same as a
23
+ * page with a green one — it has no colour in either case — and a head with no run behind it is
24
+ * found only when someone opens the list of runs by hand.
25
25
  *
26
- * Нет сети или нет токена — код возврата ноль: проверка, падающая в самолёте,
27
- * перестаёт что-либо значить.
26
+ * No network or no token — exit code zero: a check that fails on a plane stops meaning anything.
28
27
  *
29
- * Ненулевой код возврата и перечень расхождений.
28
+ * A non-zero exit code and the list of discrepancies.
30
29
  */
31
30
  import { existsSync, readFileSync, statSync } from 'node:fs';
32
31
  import { join } from 'node:path';
@@ -50,6 +49,7 @@ import {
50
49
  taskDirs,
51
50
  } from './board.mjs';
52
51
  import { onlyIgnoredPaths } from './board-paths.mjs';
52
+ import { checkBranchFolders } from './board-folders.mjs';
53
53
  import { checkLongWork } from './board-long-work.mjs';
54
54
  import { HAS_PIPELINE, deployLag, evictedOnHead, headCommittedAt, lastDeploy, runsOnHead, verdictOnHead } from './board-runs.mjs';
55
55
  import { checkEpicLinks } from './board-epics.mjs';
@@ -58,30 +58,31 @@ import { CONFIG, ROOT } from './rt-kit-checks.config.mjs';
58
58
 
59
59
  const IN_REVIEW = STATUS_OPTIONS[IN_REVIEW_STATUS].name;
60
60
  const TASKS_DIR = join(ROOT, CONFIG.tasksDir);
61
- /** Возраст брошенного черновика, после которого он перестаёт выглядеть начатым сегодня. */
61
+ /** Age of an abandoned draft after which it stops looking like one started today. */
62
62
  const DRAFT_DAYS = 7;
63
63
  /**
64
- * Сколько времени вершине даётся на то, чтобы прогон за ней встал. Событие доходит до хостинга
65
- * не мгновенно, и сверка, позванная сразу после пуша, иначе краснела бы на здоровой ветке.
64
+ * How long a head is given for a run to start behind it. The event does not reach the hosting
65
+ * instantly, and an audit called right after a push would otherwise go red on a healthy branch.
66
66
  */
67
67
  const RUN_GRACE_MINUTES = 10;
68
68
  /**
69
- * Конвейер дерева. Прогоны спрашиваются только там, где ему есть откуда взяться: дерево без
70
- * конвейера получило бы строку на каждый открытый PR, и не о чём.
69
+ * The tree's pipeline. Runs are asked for only where they have somewhere to come from: a tree
70
+ * without a pipeline would get a line for every open PR, and about nothing.
71
71
  */
72
72
  /**
73
- * Рабочий поток выкатки и ветка, с которой прод сравнивают. Не назвав потока, дерево сверки
74
- * прода не получает — и сверка говорит об этом вслух: молчание читалось бы как «прод сошёлся».
73
+ * The rollout workflow and the branch production is compared with. A tree that names no workflow
74
+ * gets no production audit — and the audit says so out loud: silence would read as "production
75
+ * matches".
75
76
  */
76
77
  /**
77
- * Метки, которыми в очереди работ помечен груз — присланные деревьями разборы происшествий и
78
- * предложения. Задачами они не являются: заголовок у них без номера, исполнителя нет, на борде
79
- * их нет, — и сверка печатала на каждую по три строки, среди которых настоящее расхождение уже
80
- * не читалось. Заводить такие записи в очередь перестали, а заведённые прежним порядком оттуда
81
- * никуда не денутся: закрывать их — решение владельца, а не сверки.
78
+ * Labels that mark cargo in the work queue — incident analyses and proposals sent by trees. They
79
+ * are not tasks: their title has no number, they have no executor, they are not on the board — and
80
+ * the audit printed three lines for each, among which a real discrepancy could no longer be read.
81
+ * Such records are no longer created in the queue, and those created the old way are not going
82
+ * anywhere: closing them is the owner's decision, not the audit's.
82
83
  *
83
- * Имя метки называет дерево: у каждого оно своё, а выдуманное умолчание не совпало бы ни с чем
84
- * и молча выключило бы отсев. Дерево, метки не назвавшее, судится как прежде.
84
+ * The label name names the tree: each has its own, and an invented default would match nothing
85
+ * and silently switch the filtering off. A tree that names no label is judged as before.
85
86
  */
86
87
  const CARGO_LABELS = new Set(CONFIG.board?.cargoLabels ?? []);
87
88
 
@@ -92,10 +93,10 @@ const problems = [];
92
93
  const report = (message) => problems.push(message);
93
94
 
94
95
  /**
95
- * Разбор просьбы владельца идёт до заведения задачи и лежит в `_draft-<slug>`. Заглохший на
96
- * середине, он остаётся на диске вне истории и выглядит так же, как начатый сегодня: второй
97
- * заход берётся за то же самое заново. Возраст здесь — единственный доступный признак:
98
- * задачи за черновиком ещё нет, и спросить о нём некого.
96
+ * The grill of the owner's request goes before the task is created and lives in `_draft-<slug>`.
97
+ * Abandoned halfway, it stays on disk outside history and looks the same as one started today:
98
+ * the second session takes up the same thing anew. Age is the only sign available here: there is
99
+ * no task behind the draft yet, and nobody to ask about it.
99
100
  */
100
101
  function checkDrafts() {
101
102
  const now = Date.now();
@@ -105,34 +106,35 @@ function checkDrafts() {
105
106
  }
106
107
  const age = Math.floor((now - statSync(join(TASKS_DIR, name)).mtimeMs) / 86400000);
107
108
  if (age >= DRAFT_DAYS) {
108
- report(`${CONFIG.tasksDir}/${name}/: разбор брошен ${age} дн. назад — заведи задачу или удали папку`);
109
+ report(`${CONFIG.tasksDir}/${name}/: the grill was abandoned ${age} days ago — create the task or delete the folder`);
109
110
  }
110
111
  }
111
112
  }
112
113
 
113
114
  /**
114
- * Значимые слова заголовка: ключ задачи и короткие служебные слова выброшены.
115
+ * The meaningful words of a title: the task key and short function words are thrown out.
115
116
  *
116
- * Разбор нарочно грубый — совпадение слов здесь не приговор, а повод посмотреть: точное
117
- * сравнение заголовков не находит ничего, потому что дубль пишут другими словами.
117
+ * The parsing is deliberately rough — a match of words here is not a verdict but a reason to
118
+ * look: exact comparison of titles finds nothing, because a duplicate is written in other words.
118
119
  */
119
120
  function closesNumbers(body) {
120
121
  return [...String(body ?? '').matchAll(/\bCloses\s+#(\d+)\b/gi)].map((match) => Number(match[1]));
121
122
  }
122
123
 
123
124
  /**
124
- * Строка обхода в теле PR. Форма та же, что читает гард поставки: строку она начинает и
125
- * подстановки не принимает — иначе текст, называющий эту строку, снимает требование сам собой.
125
+ * The bypass line in the PR body. The form is the same one the delivery guard reads: it starts
126
+ * the line and accepts no placeholders — otherwise a text that names this line would lift the
127
+ * requirement by itself.
126
128
  */
127
129
  const FOLDER_SKIP = /^[ \t]*Task-folder-skip:[ \t]*[^\s<"'][^\s"']{2,}/im;
128
130
 
129
131
  /**
130
- * Везёт ли ветка PR папку своей задачи.
132
+ * Whether the PR branch carries its task folder.
131
133
  *
132
- * Спрашивается ветка, а не рабочее дерево: папка, снесённая на машине и не закоммиченная,
133
- * въедет вместе с веткой. Локальных ссылок тут мало — ветка PR может быть не подтянута
134
- * сюда вовсе, — поэтому содержимое берётся у хостинга. Отказ «нет такого пути» означает, что
135
- * папки нет; всё остальное поднимается выше и разбирается как отсутствие связи.
134
+ * The branch is asked, not the working tree: a folder removed on the machine and not committed
135
+ * arrives together with the branch. Local references are of little use here — the PR branch may
136
+ * not be fetched here at all — so the contents are taken from the hosting. The refusal "no such
137
+ * path" means there is no folder; everything else goes up and is treated as no connection.
136
138
  */
137
139
  function folderInBranch(branch, options) {
138
140
  const path = `${CONFIG.tasksDir}/${branch}`;
@@ -149,23 +151,23 @@ function folderInBranch(branch, options) {
149
151
  }
150
152
 
151
153
  /**
152
- * Прогон на вершине открытого PR.
154
+ * The run on the head of an open PR.
153
155
  *
154
- * Молчание страницы и зелёный прогон читаются одинаково, а событие до хостинга доходит не
155
- * всегда: в час его отказов пуш прошёл, а прогона за ним не встало. Сверка называет такую
156
- * вершину, пока PR ещё открыт, — после слияния об этом узнавать поздно.
156
+ * A silent page and a green run read the same, and the event does not always reach the hosting:
157
+ * in the hour of its failures the push went through and no run started behind it. The audit names
158
+ * such a head while the PR is still open — after the merge it is too late to learn about it.
157
159
  *
158
- * Считается сам факт прогона, а не его цвет. Идущий и упавший прогон видны на странице PR оба;
159
- * невидимо только отсутствие, и говорит сверка ровно о нём.
160
+ * What counts is the fact of a run, not its colour. A running and a failed run are both visible
161
+ * on the PR page; only absence is invisible, and the audit speaks of exactly that.
160
162
  *
161
- * Свежая вершина не судится: между пушем и прогоном проходит время, и красная строка на этом
162
- * промежутке значила бы «подожди», а не «чини».
163
+ * A fresh head is not judged: time passes between the push and the run, and a red line in that
164
+ * gap would mean "wait", not "fix".
163
165
  *
164
- * У конфликтующей заявки прогона не бывает вовсе, и причина не в потерянном событии: конвейер
165
- * проверяет слияние ветки с базой, а слияния при конфликте нет. Совет вернуть событие
166
- * выполняется буквально и не помогает — за один заход заявка перезакрывалась дважды подряд, и
167
- * прогон встал только после вливания главной ветки. Строка поэтому называет ту причину, которая
168
- * чинится.
166
+ * A conflicting PR gets no run at all, and the cause is not a lost event: the pipeline checks the
167
+ * merge of the branch with its base, and under a conflict there is no merge. The advice to bring
168
+ * the event back is followed literally and does not help — in one session a PR was closed and
169
+ * reopened twice in a row, and the run started only after the main branch was merged in. So the
170
+ * line names the cause that can be fixed.
169
171
  */
170
172
  function checkHeadRun(pull, options) {
171
173
  if (checkEvicted(pull, options)) {
@@ -188,49 +190,52 @@ function checkHeadRun(pull, options) {
188
190
 
189
191
  if (pull.mergeable === 'CONFLICTING') {
190
192
  report(
191
- `PR #${pull.number}: на вершине ${pull.headRefOid.slice(0, 8)} прогона нет и не будет, пока она конфликтует — ` +
192
- `конвейер проверяет слияние ветки с базой, а слияния при конфликте нет; влей главную ветку и запушь, ` +
193
- `перезакрытие PR тут не помогает`
193
+ `PR #${pull.number}: there is no run on the tip ${pull.headRefOid.slice(0, 8)} and there will be none while it conflicts — ` +
194
+ `the pipeline checks the merge of the branch with the base, and there is no merge while it conflicts; merge the main branch in and push, ` +
195
+ `reopening the PR does not help here`
194
196
  );
195
197
 
196
198
  return;
197
199
  }
198
200
 
199
- // Заявка поверх соседней прогона не получает: рабочий поток слушает заявки в главную ветку и
200
- // событий с другой базой не видит. Строка о потерянном событии здесь неверна дважды: событие
201
- // не терялось, и перезакрытие его не вернёт — совет исполняется буквально, прогон не
202
- // запускается, и на второй попытке поломку начинают искать в хостинге.
201
+ // A PR on top of a neighbouring one gets no run: the workflow listens for PRs into the main
202
+ // branch and does not see events with another base. The line about a lost event is wrong
203
+ // here twice: the event was not lost, and closing and reopening will not bring it back — the
204
+ // advice is followed literally, no run starts, and on the second try the breakage is looked
205
+ // for in the hosting.
203
206
  if (pull.baseRefName && pull.baseRefName !== MAIN_BRANCH) {
204
207
  report(
205
- `PR #${pull.number}: на вершине ${pull.headRefOid.slice(0, 8)} прогона нет и не будет — ` +
206
- `заявка открыта в ветку «${pull.baseRefName}», а рабочий поток слушает заявки в главную; ` +
207
- `перенеси базу на «${MAIN_BRANCH}», когда нижняя заявка влита`
208
+ `PR #${pull.number}: there is no run on the tip ${pull.headRefOid.slice(0, 8)} and there will be none — ` +
209
+ `the request is opened into the branch «${pull.baseRefName}», and the workflow listens to requests into the main one; ` +
210
+ `move the base to «${MAIN_BRANCH}» once the lower request is merged`
208
211
  );
209
212
 
210
213
  return;
211
214
  }
212
215
 
213
216
  report(
214
- `PR #${pull.number}: на вершине ${pull.headRefOid.slice(0, 8)} прогона нет, а лежит она ${minutes} мин — ` +
215
- `конвейер события не получил; верни его новым коммитом либо перезакрытием PR ` +
217
+ `PR #${pull.number}: there is no run on the tip ${pull.headRefOid.slice(0, 8)}, and it has lain there ${minutes} min — ` +
218
+ `the pipeline received no event; bring it back by a new commit or by reopening the PR ` +
216
219
  `(gh pr close ${pull.number} && gh pr reopen ${pull.number})`
217
220
  );
218
221
  }
219
222
 
220
223
  /**
221
- * Прогон вершины, вытесненный из очереди конвейера.
224
+ * A head run evicted from the pipeline queue.
222
225
  *
223
- * Группа очереди бережёт идущий прогон и не бережёт ждущего: хостинг держит в группе один
224
- * ждущий, и следующий встающий вытесняет прежний. Ветка за таким прогоном не проверялась ни
225
- * строчкой, а по очереди работ выглядит проверенной — прогон на вершине есть, и сверка считает
226
- * именно факт.
226
+ * The queue group protects a running run and does not protect a waiting one: the hosting keeps
227
+ * one waiting run per group, and the next one to start evicts the previous. The branch behind
228
+ * such a run was not checked by a single line, yet by the work queue it looks checked — there is
229
+ * a run on the head, and the audit counts exactly the fact.
227
230
  *
228
- * Судится раньше отсутствия прогона и раньше цвета: иначе одна вершина получает две строки об
229
- * одном. Отвечает `true`, когда строка сказана, и остальные проверки вершины пропускаются.
231
+ * Judged before the absence of a run and before the colour: otherwise one head gets two lines
232
+ * about one thing. Returns `true` when the line has been said, and the other head checks are
233
+ * skipped.
230
234
  *
231
- * Строка называет обе команды и в том порядке, в каком их зовут. Перезапуск отбивает гард, пока
232
- * за тот же ход не читался журнал этого задания, и порядок в строке выполняет требование сам:
233
- * исполнитель зовёт написанное и не упирается в отказ на втором шаге.
235
+ * The line names both commands, in the order they are called. The guard refuses a rerun until the
236
+ * output of that step has been read within the same turn, and the order in the line meets the
237
+ * requirement by itself: the executor calls what is written and does not hit a refusal on the
238
+ * second step.
234
239
  */
235
240
  function checkEvicted(pull, options) {
236
241
  const evicted = evictedOnHead(pull.headRefOid, options);
@@ -240,23 +245,23 @@ function checkEvicted(pull, options) {
240
245
 
241
246
  const run = evicted[0];
242
247
  report(
243
- `PR #${pull.number}: прогон ${run} на вершине ${pull.headRefOid.slice(0, 8)} вытеснен из очереди конвейера — ` +
244
- `заданий у него ноль, ветка не проверялась, а в списке он выглядит упавшим; ` +
245
- `прочитай прогон и перезапусти его (gh run view ${run} && gh run rerun ${run})`
248
+ `PR #${pull.number}: the run ${run} on the tip ${pull.headRefOid.slice(0, 8)} was pushed out of the pipeline queue — ` +
249
+ `it has zero steps, the branch was not checked, and in the list it looks failed; ` +
250
+ `read the run and restart it (gh run view ${run} && gh run rerun ${run})`
246
251
  );
247
252
  return true;
248
253
  }
249
254
 
250
255
  /**
251
- * Готовая работа, оставленная черновиком.
256
+ * Finished work left as a draft.
252
257
  *
253
- * У черновика кнопка слияния заблокирована самим хостингом, поэтому зелёная страница PR
254
- * владельцу ничего не разрешает: список, в котором всё серое, читается как «работа не сделана».
255
- * Гард снятия черновика сюда не достаёт — он судит один ход и молчит, пока ветка везёт папку
256
- * своей задачи; сверка же смотрит на состояние очереди целиком.
258
+ * On a draft the merge button is blocked by the hosting itself, so a green PR page allows the
259
+ * owner nothing: a list in which everything is grey reads as "the work is not done". The
260
+ * draft-lifting guard does not reach here — it judges one turn and stays silent while the branch
261
+ * carries its task folder; the audit looks at the state of the whole queue.
257
262
  *
258
- * Четыре PR так и простояли черновиками двое суток — разбор
259
- * запись «2026-08-18-ready-work-left-in-drafts» в приёме.
263
+ * Four PRs stood as drafts for two days — the analysis is the record
264
+ * "2026-08-18-ready-work-left-in-drafts" in the intake.
260
265
  */
261
266
  function checkReadyDraft(pull, options) {
262
267
  if (pull.isDraft !== true) {
@@ -267,21 +272,23 @@ function checkReadyDraft(pull, options) {
267
272
  }
268
273
 
269
274
  report(
270
- `PR #${pull.number}: прогон на вершине ${pull.headRefOid.slice(0, 8)} зелёный, а PR черновик — ` +
271
- `разбери папку задачи и сними черновик (gh pr ready ${pull.number}) либо скажи владельцу, чего ждёшь`
275
+ `PR #${pull.number}: the run on the tip ${pull.headRefOid.slice(0, 8)} is green, and the PR is a draft — ` +
276
+ `take the task folder apart and lift the draft (gh pr ready ${pull.number}) or tell the owner what you are waiting for`
272
277
  );
273
278
  }
274
279
 
275
280
  /**
276
- * Заявка, конфликтующая с главной веткой.
281
+ * A PR that conflicts with the main branch.
277
282
  *
278
- * Конфликт приезжает в отданную заявку чужим слиянием, без единого действия её автора: основание,
279
- * проверенное на открытии, устаревает в ту минуту, когда владелец влил соседнюю работу. Гард
280
- * снятия черновика сюда не достаёт — он судит один ход, а заявка стоит в очереди днями.
283
+ * A conflict arrives in a handed-over PR through someone else's merge, without a single action by
284
+ * its author: the base checked at opening goes stale the minute the owner merges a neighbouring
285
+ * piece of work. The draft-lifting guard does not reach here — it judges one turn, and a PR stands
286
+ * in the queue for days.
281
287
  *
282
- * Судится только прямое «конфликтует»: `UNKNOWN` означает, что хостинг сливаемость ещё считает,
283
- * и строка о нём краснела бы на каждой свежей вершине. Две заявки так и ушли в разбор с
284
- * конфликтом — разбор запись «2026-08-20-drafts-cleared-without-re-reading-pr-state» в приёме.
288
+ * Only a direct "conflicting" is judged: `UNKNOWN` means the hosting is still computing
289
+ * mergeability, and a line about it would go red on every fresh head. Two PRs went to review with
290
+ * a conflict this way — the analysis is the record
291
+ * "2026-08-20-drafts-cleared-without-re-reading-pr-state" in the intake.
285
292
  */
286
293
  function checkConflicting(pull) {
287
294
  if (pull.mergeable !== 'CONFLICTING') {
@@ -289,15 +296,16 @@ function checkConflicting(pull) {
289
296
  }
290
297
 
291
298
  report(
292
- `PR #${pull.number}: конфликтует с главной веткой — влей её в ветку задачи, разбери конфликт и запушь; ` +
293
- `слить эту заявку владелец не может, а по странице это видно только внутри неё`
299
+ `PR #${pull.number}: it conflicts with the main branch — merge it into the task branch, resolve the conflict and push; ` +
300
+ `the owner cannot merge this request, and on the page that shows only inside it`
294
301
  );
295
302
  }
296
303
 
297
304
  let checked = { issues: 0, pulls: 0, cargo: 0 };
298
305
 
299
- // Черновики судятся по диску и потому проверяются всегда: связи для этого не нужно.
306
+ // Drafts are judged by the disk and so are checked always: no connection is needed for that.
300
307
  checkDrafts();
308
+ checkBranchFolders(report, MAIN_BRANCH);
301
309
 
302
310
  let offline = false;
303
311
  try {
@@ -305,28 +313,28 @@ try {
305
313
  const board = fetchBoard(options);
306
314
  const issues = fetchIssues('all', options);
307
315
  const allOpen = issues.filter((issue) => issue.state === 'OPEN');
308
- // Отсев идёт один раз и до всех проверок задачи: помеченная запись не задача целиком, а не
309
- // наполовину, — её не судят ни заголовком, ни исполнителем, ни бордой, ни сводкой совпавших
310
- // заголовков, ни связью с эпиком.
316
+ // Filtering happens once and before all task checks: a labelled record is not a task as a
317
+ // whole, not by half — it is judged neither by title, nor by executor, nor by the board, nor
318
+ // by the digest of matching titles, nor by the link to an epic.
311
319
  const open = CARGO_LABELS.size === 0 ? allOpen : allOpen.filter((issue) => !(issue.labels ?? []).some((label) => CARGO_LABELS.has(label.name)));
312
320
  const pulls = fetchOpenPulls(options);
313
321
  checked = { issues: issues.length, pulls: pulls.length, cargo: allOpen.length - open.length };
314
322
 
315
323
  for (const item of board.foreign) {
316
- report(`борда: ${item} — на борде стоят задачи, а не PR о них`);
324
+ report(`the board: ${item} — the board holds tasks, not PRs about them`);
317
325
  }
318
- // Борду проверяем только у открытых задач. Закрытая ушла из очереди мержем, и колонки под
319
- // неё у борды нет: строку о ней нечем закрыть. Шесть таких строк висели в каждом прогоне и
320
- // заглушали собой настоящую задачу, которая на борду не попала.
326
+ // The board is checked only for open tasks. A closed one left the queue by a merge, and the
327
+ // board has no column for it: a line about it has nothing to close it with. Six such lines
328
+ // hung in every run and drowned out the real task that never made it to the board.
321
329
  for (const issue of open) {
322
330
  if (!board.issues.has(issue.number)) {
323
- report(`#${issue.number}: задачи нет на борде — за ней никто не следит`);
331
+ report(`#${issue.number}: the task is not on the board — nobody watches it`);
324
332
  }
325
333
  if (numberFromTitle(issue.title) !== issue.number) {
326
- report(`#${issue.number}: заголовок не начинается с [${TASK_KEY}-${issue.number}] — «${issue.title}»`);
334
+ report(`#${issue.number}: the title does not start with [${TASK_KEY}-${issue.number}] — «${issue.title}»`);
327
335
  }
328
336
  if (issue.assignees.length === 0) {
329
- report(`#${issue.number}: у задачи нет исполнителя — по очереди работ не видно, кто её взял`);
337
+ report(`#${issue.number}: the task has no assignee — by the work queue there is no seeing who took it`);
330
338
  }
331
339
  }
332
340
 
@@ -339,40 +347,40 @@ try {
339
347
  for (const pull of pulls) {
340
348
  const titleNumber = numberFromTitle(pull.title);
341
349
  if (titleNumber === null) {
342
- report(`PR #${pull.number}: заголовок не начинается с [${TASK_KEY}-<номер>] — «${pull.title}»`);
350
+ report(`PR #${pull.number}: the title does not start with [${TASK_KEY}-<number>] — «${pull.title}»`);
343
351
  continue;
344
352
  }
345
353
  if (!closesNumbers(pull.body).includes(titleNumber)) {
346
- report(`PR #${pull.number}: в теле нет строки «Closes #${titleNumber}» — на борде он не прикрепится к задаче`);
354
+ report(`PR #${pull.number}: the body carries no line «Closes #${titleNumber}» — on the board it will not attach to the task`);
347
355
  }
348
356
  if (!openNumbers.has(titleNumber)) {
349
- report(`PR #${pull.number}: задачи #${titleNumber} нет среди открытых — у задачи одна ветка`);
357
+ report(`PR #${pull.number}: the task #${titleNumber} is not among the open ones — a task has one branch`);
350
358
  }
351
359
  if (claimed.has(titleNumber)) {
352
- report(`PR #${pull.number}: задачу #${titleNumber} уже закрывает PR #${claimed.get(titleNumber)} — у задачи одна ветка`);
360
+ report(`PR #${pull.number}: the task #${titleNumber} is already closed by PR #${claimed.get(titleNumber)} — a task has one branch`);
353
361
  } else {
354
362
  claimed.set(titleNumber, pull.number);
355
363
  }
356
364
 
357
- // Папка задачи, лежащая в ветке открытого PR, — расхождение с первой минуты заявки:
358
- // уборка стоит до её открытия, и открытие с лежащей папкой отбивает гард поставки.
359
- // Дошедшая сюда папка означает обход — либо заявку, открытую мимо гарда. Сказанная
360
- // после слияния, эта строка уже не чинится тем же PR: работа перешла дальше, и на
361
- // разбор заводится вторая задача.
365
+ // A task folder lying in the branch of an open PR is a discrepancy from the PR's first
366
+ // minute: the clean-up comes before it opens, and opening with the folder in place is
367
+ // refused by the delivery guard. A folder that got this far means a bypass — or a PR
368
+ // opened past the guard. Said after the merge, this line is no longer fixed by the same
369
+ // PR: the work has moved on, and a second task is created for the clean-up.
362
370
  if (HAS_PIPELINE && pull.headRefOid) {
363
371
  checkHeadRun(pull, options);
364
372
  }
365
373
 
366
374
  checkConflicting(pull);
367
375
 
368
- // Отставание заявки от главной ветки: гард судит основание один раз, в минуту открытия,
369
- // а заявка стоит днями. Влитая с отставанием, она везёт в главную сочетание, которого не
370
- // проверял никто, — и по странице заявки этого не видно: прогон на ней зелёный.
376
+ // The PR falling behind the main branch: the guard judges the base once, at the minute of
377
+ // opening, and a PR stands for days. Merged while behind, it carries into main a
378
+ // combination nobody checked — and the PR page does not show this: the run on it is green.
371
379
  const behind = behindMain(pull.headRefName, MAIN_BRANCH, options);
372
380
  if (behind > 0) {
373
381
  report(
374
- `PR #${pull.number}: ветка отстала от «${MAIN_BRANCH}» на ${behind} коммитов — прогон шёл от основания, ` +
375
- `которого в главной ветке уже нет. Влей главную, пересмотри набор проверок по тому, что ветка везёт теперь, и прогони заново`
382
+ `PR #${pull.number}: the branch lags «${MAIN_BRANCH}» by ${behind} commits — the run went from a base ` +
383
+ `the main branch no longer carries. Merge the main branch in, revise the check set by what the branch carries now, and run again`
376
384
  );
377
385
  }
378
386
 
@@ -380,45 +388,45 @@ try {
380
388
  const folder = folderInBranch(pull.headRefName, options);
381
389
  if (folder !== null) {
382
390
  report(
383
- `PR #${pull.number}: ветка везёт папку задачи «${folder}/» — заявка открывается после уборки. Разбери её этим же PR или поставь в тело строку «Task-folder-skip: <причина>»`
391
+ `PR #${pull.number}: the branch carries the task folder «${folder}/» — the request opens after the folder is taken apart. Take it apart by this same PR or put the line «Task-folder-skip: <reason>» into the body`
384
392
  );
385
393
  }
386
394
  }
387
395
  }
388
396
 
389
- // Колонка задачи и её PR сверяются в обе стороны: открытый PR при задаче в «Backlog»
390
- // читается как работа, к которой не приступали, а «In review» без открытого PR — как
391
- // разбор, которого никто не ждёт.
397
+ // The task's column and its PR are audited both ways: an open PR with the task in "Backlog"
398
+ // reads as work not yet started, and "In review" without an open PR as a review nobody is
399
+ // waiting for.
392
400
  for (const issue of open) {
393
401
  const status = board.items.get(issue.number)?.status ?? null;
394
402
  const pull = claimed.get(issue.number);
395
403
  if (pull !== undefined && status !== IN_REVIEW) {
396
404
  report(
397
- `#${issue.number}: PR #${pull} открыт, а задача стоит «${status ?? 'вне колонок'}» — npm run task:move -- ${issue.number} ${IN_REVIEW_STATUS}`
405
+ `#${issue.number}: PR #${pull} is open, and the task stands at «${status ?? 'outside the columns'}» — npm run task:move -- ${issue.number} ${IN_REVIEW_STATUS}`
398
406
  );
399
407
  }
400
408
  if (pull === undefined && status === IN_REVIEW) {
401
- report(`#${issue.number}: задача ждёт разбора, но открытого PR за ней нет — колонка отстала от работы`);
409
+ report(`#${issue.number}: the task awaits review, and there is no open PR behind it — the column lags the work`);
402
410
  }
403
411
  }
404
412
 
405
- // Папка задачи умирает вместе с задачей: то, что объясняет состоявшееся решение, уезжает
406
- // в `docs/archive/`, остальное удаляется. Оставленная рядом с текущими, она читается как
407
- // текущая — тем убедительнее, чем старше.
413
+ // The task folder dies with the task: what explains a settled decision moves to
414
+ // `docs/archive/`, the rest is deleted. Left next to the current ones, it reads as current —
415
+ // the more convincingly, the older it is.
408
416
  for (const name of taskDirs()) {
409
417
  const number = numberFromTaskDir(name.split('/').pop());
410
418
  if (number === null || openNumbers.has(number)) {
411
419
  continue;
412
420
  }
413
421
  if (issues.some((issue) => issue.number === number)) {
414
- report(`${CONFIG.tasksDir}/${name}/: задача #${number} закрыта, а папка лежит среди текущих — разбери её`);
422
+ report(`${CONFIG.tasksDir}/${name}/: the task #${number} is closed, and the folder lies among the current ones — take it apart`);
415
423
  }
416
424
  }
417
425
  } catch (error) {
418
426
  if (error instanceof OfflineError) {
419
- // Очередь работ без связи не проверить, а папки на диске — проверить: молчать про
420
- // них значило бы терять единственное, что здесь ещё можно сказать.
421
- console.log(`check-board: очередь работ пропущена, проверять нечем — ${error.message}`);
427
+ // The work queue cannot be checked without a connection, but the folders on disk can:
428
+ // staying silent about them would mean losing the only thing that can still be said here.
429
+ console.log(`check-board: the work queue is skipped, there is nothing to check with — ${error.message}`);
422
430
  offline = true;
423
431
  } else {
424
432
  console.error(`check-board: ${String(error.message ?? error)}`);
@@ -426,60 +434,60 @@ try {
426
434
  }
427
435
  }
428
436
 
429
- // Прод сверяется с главной веткой по последней успешной выкатке. Задача уходит из очереди
430
- // слиянием, но слияние — ещё не прод: там, где выкатку запускают рукой, между ними может лечь
431
- // сколько угодно коммитов, и заметить это неоткуда.
437
+ // Production is audited against the main branch by the last successful rollout. A task leaves the
438
+ // queue by a merge, but a merge is not yet production: where the rollout is started by hand, any
439
+ // number of commits may lie between them, and there is nowhere to notice this from.
432
440
  if (!offline && DEPLOY_WORKFLOW) {
433
441
  try {
434
442
  const token = botToken() ?? undefined;
435
443
  const lag = deployLag(DEPLOY_WORKFLOW, MAIN_BRANCH, { token });
436
444
  if (lag === null) {
437
- report(`выкаток по «${DEPLOY_WORKFLOW}» не было ни одной — сравнить прод не с чем`);
445
+ report(`there was not a single rollout by «${DEPLOY_WORKFLOW}» — there is nothing to compare production against`);
438
446
  } else if (lag.behind > 0) {
439
447
  report(
440
- `прод отстал от «${MAIN_BRANCH}» на ${lag.behind} коммитов: последняя выкатка — ${lag.sha.slice(0, 8)} от ${String(lag.at).slice(0, 10)}`
448
+ `production lags «${MAIN_BRANCH}» by ${lag.behind} commits: the last rollout is ${lag.sha.slice(0, 8)} of ${String(lag.at).slice(0, 10)}`
441
449
  );
442
450
  }
443
451
 
444
- // Отчего прод отстал, отставание не говорит: оно считается по последней УСПЕШНОЙ
445
- // выкатке, и «не запускали» с «упала» выглядят через него одинаково. Ведут они к
446
- // разному — первую запускают, вторую читают журналом и чинят.
452
+ // Why production fell behind, the lag does not say: it is counted by the last SUCCESSFUL
453
+ // rollout, and "not started" and "failed" look the same through it. They lead to different
454
+ // things — the first is started, the second is read by its output and fixed.
447
455
  const deploy = lastDeploy(DEPLOY_WORKFLOW, { token });
448
456
  if (deploy.verdict === 'failure') {
449
457
  report(
450
- `выкатка «${DEPLOY_WORKFLOW}» упала на ${String(deploy.sha).slice(0, 8)} от ${String(deploy.at).slice(0, 10)}: ` +
451
- `главная ветка впереди прода, и слияния поверх уедут туда же — ${deploy.url}`
458
+ `the rollout «${DEPLOY_WORKFLOW}» failed on ${String(deploy.sha).slice(0, 8)} of ${String(deploy.at).slice(0, 10)}: ` +
459
+ `the main branch is ahead of production, and merges on top will travel the same way — ${deploy.url}`
452
460
  );
453
461
  }
454
462
  } catch (error) {
455
463
  if (error instanceof OfflineError) {
456
- console.log(`check-board: прод не сверялся — ${error.message}`);
464
+ console.log(`check-board: production was not checked — ${error.message}`);
457
465
  } else {
458
466
  throw error;
459
467
  }
460
468
  }
461
469
  }
462
470
 
463
- // Непроверенное называется вслух: молчание о прогонах читалось бы как «прогоны на месте».
471
+ // What was not checked is named out loud: silence about runs would read as "the runs are there".
464
472
  if (!offline && !DEPLOY_WORKFLOW) {
465
- console.log('check-board: прод с главной веткой не сверялся — рабочий поток выкатки в настройке дерева не назван');
473
+ console.log('check-board: production was not checked against the main branch — the rollout workflow is not named in the tree config');
466
474
  }
467
475
 
468
- // Отсеянное называется числом: молчаливый отсев неотличим от сломанной сверки — метка,
469
- // названная с опечаткой, выключила бы проверку целиком и не сказала бы об этом.
476
+ // What was filtered out is named by number: silent filtering is indistinguishable from a broken
477
+ // audit — a label named with a typo would switch the check off entirely and say nothing about it.
470
478
  if (!offline && checked.cargo > 0) {
471
- console.log(`check-board: записей груза в очереди ${checked.cargo} — задачами они не судятся`);
479
+ console.log(`check-board: cargo records in the queue ${checked.cargo} — they are not judged as tasks`);
472
480
  }
473
481
 
474
482
  if (!offline && !HAS_PIPELINE) {
475
- console.log('check-board: прогоны на вершинах не спрашивались — файла конвейера в дереве нет');
483
+ console.log('check-board: the runs on the tips were not asked — the tree has no pipeline file');
476
484
  }
477
485
 
478
486
  if (problems.length > 0) {
479
- console.error(`check-board: расхождений ${problems.length}\n`);
487
+ console.error(`check-board: divergences ${problems.length}\n`);
480
488
  problems.forEach((problem) => console.error(` ${problem}`));
481
- console.error('\nЗадача заводится командой npm run task:new — она делает все четыре шага сразу.');
482
- console.error('Папка задачи и её разбор — скил task-flow.');
489
+ console.error('\nA task is created by the command npm run task:new — it does all four steps at once.');
490
+ console.error('The task folder and taking it apart — the rule task-flow.');
483
491
  process.exit(1);
484
492
  }
485
493
 
@@ -487,4 +495,4 @@ if (offline) {
487
495
  process.exit(0);
488
496
  }
489
497
 
490
- console.log(`check-board: задач ${checked.issues}, открытых PR ${checked.pulls}, расхождений нет`);
498
+ console.log(`check-board: tasks ${checked.issues}, open PRs ${checked.pulls}, no divergences`);