@rt-tools/agent-kit 0.23.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/README.md +8 -2
  2. package/assets/agents/business-analyst.md +51 -50
  3. package/assets/agents/conscience.md +37 -35
  4. package/assets/agents/project-manager.md +49 -48
  5. package/assets/agents/prose-editor.md +31 -29
  6. package/assets/agents/qa-engineer.md +50 -48
  7. package/assets/agents/rules-reviewer.md +63 -58
  8. package/assets/agents/skill-curator.md +83 -78
  9. package/assets/agents/spec-critic.md +34 -29
  10. package/assets/agents/spec-writer.md +35 -32
  11. package/assets/agents/strict-teacher.md +39 -37
  12. package/assets/checks/archive-age.mjs +48 -28
  13. package/assets/checks/archive-prune.mjs +16 -14
  14. package/assets/checks/board-epics.github.mjs +75 -41
  15. package/assets/checks/board-folders.mjs +61 -0
  16. package/assets/checks/board-gh.github.mjs +35 -26
  17. package/assets/checks/board-long-work.github.mjs +24 -24
  18. package/assets/checks/board-paths.github.mjs +21 -16
  19. package/assets/checks/board-runs.github.mjs +45 -43
  20. package/assets/checks/board-titles.github.mjs +19 -17
  21. package/assets/checks/board.github.mjs +150 -128
  22. package/assets/checks/check-archive-age.mjs +23 -19
  23. package/assets/checks/check-board.github.mjs +179 -157
  24. package/assets/checks/check-descriptions.mjs +30 -29
  25. package/assets/checks/check-doc-paths.mjs +104 -82
  26. package/assets/checks/check-dupes.mjs +84 -80
  27. package/assets/checks/check-file-size.mjs +79 -70
  28. package/assets/checks/check-glossary.mjs +47 -37
  29. package/assets/checks/check-hook-scope.mjs +30 -27
  30. package/assets/checks/check-lib-layers.mjs +22 -21
  31. package/assets/checks/check-profile-drift.mjs +48 -43
  32. package/assets/checks/check-prose-style.mjs +125 -33
  33. package/assets/checks/check-push-gate.mjs +53 -50
  34. package/assets/checks/check-reuse.mjs +50 -40
  35. package/assets/checks/check-schema-drift.mjs +87 -83
  36. package/assets/checks/check-specs.mjs +155 -134
  37. package/assets/checks/check-state-next.mjs +66 -52
  38. package/assets/checks/check-states.mjs +32 -30
  39. package/assets/checks/check-styles.mjs +52 -51
  40. package/assets/checks/check-turn-map.mjs +54 -46
  41. package/assets/checks/lib-boundaries.mjs +32 -30
  42. package/assets/checks/lib-common.mjs +30 -29
  43. package/assets/checks/lib-domains.mjs +34 -34
  44. package/assets/checks/lib-manifests.mjs +17 -15
  45. package/assets/checks/lib-reexports.mjs +18 -18
  46. package/assets/checks/rt-kit-checks.config.mjs +174 -142
  47. package/assets/checks/signals.mjs +43 -39
  48. package/assets/checks/spec-anchors.mjs +114 -87
  49. package/assets/checks/spec-common.mjs +128 -84
  50. package/assets/checks/spec-contract.mjs +30 -30
  51. package/assets/checks/spec-proposed.mjs +27 -24
  52. package/assets/checks/spec-scenarios.mjs +51 -28
  53. package/assets/checks/task-new.github.mjs +85 -56
  54. package/assets/commands/feedback.md +65 -59
  55. package/assets/commands/next-session.md +64 -57
  56. package/assets/commands/skill-curator.md +83 -79
  57. package/assets/defaults/gate-map.sh +115 -91
  58. package/assets/defaults/project.sh +228 -178
  59. package/assets/defaults/shell.sh +85 -65
  60. package/assets/defaults/turn-map.md +45 -44
  61. package/assets/docs/GLOSSARY.md +142 -65
  62. package/assets/hooks/browser-device-id.sh +12 -12
  63. package/assets/hooks/browser-guard-device-id.sh +46 -14
  64. package/assets/hooks/browser-guard-no-asking.sh +5 -4
  65. package/assets/hooks/browser-guard-no-listing.sh +12 -11
  66. package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
  67. package/assets/hooks/browser-guard-require-select.sh +34 -23
  68. package/assets/hooks/claim-guard.sh +62 -56
  69. package/assets/hooks/commit-msg.sh +11 -10
  70. package/assets/hooks/conscience-guard.sh +91 -45
  71. package/assets/hooks/constitution-index.sh +16 -16
  72. package/assets/hooks/deny-tail.sh +28 -26
  73. package/assets/hooks/dev-server-guard.sh +46 -43
  74. package/assets/hooks/dispatch.sh +84 -39
  75. package/assets/hooks/docs-guard.sh +105 -86
  76. package/assets/hooks/exam-guard.sh +146 -84
  77. package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
  78. package/assets/hooks/git-guard-delivery-draft.sh +85 -0
  79. package/assets/hooks/git-guard-delivery-folder.sh +50 -43
  80. package/assets/hooks/git-guard-delivery-signature.sh +88 -52
  81. package/assets/hooks/git-guard-delivery.sh +207 -253
  82. package/assets/hooks/git-guard-main.sh +65 -26
  83. package/assets/hooks/git-guard-push-tests.sh +133 -75
  84. package/assets/hooks/glossary-load.sh +23 -22
  85. package/assets/hooks/grill-gate-ask.sh +12 -11
  86. package/assets/hooks/grill-gate.sh +94 -87
  87. package/assets/hooks/guard-note.sh +20 -19
  88. package/assets/hooks/handoff-entry-guard.sh +26 -24
  89. package/assets/hooks/handoff-write.sh +74 -67
  90. package/assets/hooks/hook-input.sh +70 -50
  91. package/assets/hooks/lint-after-edit.sh +95 -61
  92. package/assets/hooks/observe.sh +28 -26
  93. package/assets/hooks/override-write-guard.sh +23 -21
  94. package/assets/hooks/postmortem-guard.sh +42 -39
  95. package/assets/hooks/profile-check.sh +22 -20
  96. package/assets/hooks/proposal-guard.sh +57 -49
  97. package/assets/hooks/prose-style-guard.sh +19 -17
  98. package/assets/hooks/qa-dataid-guard.sh +52 -49
  99. package/assets/hooks/rerun-guard.sh +31 -30
  100. package/assets/hooks/reuse-first-guard.sh +108 -87
  101. package/assets/hooks/roles.sh +14 -14
  102. package/assets/hooks/rule-article.sh +36 -34
  103. package/assets/hooks/rule-source-guard.sh +52 -36
  104. package/assets/hooks/skill-gate-layers.sh +59 -57
  105. package/assets/hooks/skill-gate-rearm.sh +15 -8
  106. package/assets/hooks/skill-gate.sh +89 -81
  107. package/assets/hooks/skill-loaded.sh +6 -6
  108. package/assets/hooks/sql-guard-parse.sh +68 -66
  109. package/assets/hooks/sql-guard-request.sh +48 -46
  110. package/assets/hooks/sql-guard-target.sh +57 -51
  111. package/assets/hooks/sql-guard-write.sh +84 -79
  112. package/assets/hooks/sql-guard.sh +52 -47
  113. package/assets/hooks/stand-login-guard.sh +104 -0
  114. package/assets/hooks/task-context-load.sh +60 -55
  115. package/assets/hooks/task-flow-context.sh +87 -69
  116. package/assets/hooks/task-flow-draft-guard.sh +55 -48
  117. package/assets/hooks/task-flow-guard.sh +67 -64
  118. package/assets/hooks/turn-entry-load.sh +39 -32
  119. package/assets/hooks/turn-exit-guard.sh +256 -204
  120. package/assets/hooks/turn-exit-patterns.sh +53 -0
  121. package/assets/hooks/utf8.sh +11 -11
  122. package/assets/hooks/waiting-turn-guard.sh +94 -94
  123. package/assets/hooks/window-fill-guard.sh +70 -62
  124. package/assets/hooks/work-start-guard.sh +52 -49
  125. package/assets/hooks/write-targets.sh +115 -30
  126. package/assets/laws/autonomous-work.md +29 -27
  127. package/assets/laws/code-structure.md +31 -30
  128. package/assets/laws/delivery.md +148 -137
  129. package/assets/laws/entity-editing.md +52 -50
  130. package/assets/laws/entity-models.md +14 -13
  131. package/assets/laws/frontend-application.md +39 -38
  132. package/assets/laws/lib-imports.md +27 -27
  133. package/assets/laws/lists.md +31 -29
  134. package/assets/laws/navigation.md +37 -37
  135. package/assets/laws/observability.md +41 -40
  136. package/assets/laws/project-documentation.md +106 -99
  137. package/assets/laws/reuse-first.md +31 -29
  138. package/assets/laws/shared-code.md +27 -27
  139. package/assets/laws/verifiability.md +131 -114
  140. package/assets/laws/work-conduct.md +250 -250
  141. package/assets/patterns/admin-lists-screen.md +72 -69
  142. package/assets/patterns/admin-nav-item.md +51 -46
  143. package/assets/patterns/angular-patterns-state.md +32 -31
  144. package/assets/patterns/api-layer-pair.md +33 -31
  145. package/assets/patterns/autonomous-work-run.md +50 -49
  146. package/assets/patterns/browser-verification-measure.md +143 -67
  147. package/assets/patterns/browser-verification-stand.md +181 -128
  148. package/assets/patterns/component-structure-new.md +51 -42
  149. package/assets/patterns/dependencies-upgrade.md +55 -39
  150. package/assets/patterns/doc-style-human.md +93 -0
  151. package/assets/patterns/doc-style-sweep.md +82 -79
  152. package/assets/patterns/doc-style-trace.md +87 -81
  153. package/assets/patterns/doc-style-write.md +130 -122
  154. package/assets/patterns/entity-aside.md +77 -63
  155. package/assets/patterns/entity-models-new.md +37 -37
  156. package/assets/patterns/entity-store.md +33 -33
  157. package/assets/patterns/git-workflow-commit.azure.md +94 -75
  158. package/assets/patterns/git-workflow-commit.github.md +153 -129
  159. package/assets/patterns/git-workflow-commit.gitlab.md +96 -78
  160. package/assets/patterns/git-workflow-docker.md +165 -147
  161. package/assets/patterns/git-workflow-freshness.md +45 -45
  162. package/assets/patterns/git-workflow-merge.md +99 -86
  163. package/assets/patterns/git-workflow-migration.md +54 -52
  164. package/assets/patterns/git-workflow-pr-ready.md +57 -56
  165. package/assets/patterns/git-workflow-pr.azure.md +126 -121
  166. package/assets/patterns/git-workflow-pr.github.md +179 -175
  167. package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
  168. package/assets/patterns/git-workflow-restart.md +35 -31
  169. package/assets/patterns/git-workflow-secrets.md +80 -73
  170. package/assets/patterns/git-workflow-stack.md +131 -106
  171. package/assets/patterns/lib-layers-move.md +62 -53
  172. package/assets/patterns/lib-layers-new.md +59 -45
  173. package/assets/patterns/observability-record.md +72 -67
  174. package/assets/patterns/platform-access-di.md +31 -29
  175. package/assets/patterns/reuse-first-extend.md +66 -61
  176. package/assets/patterns/shared-code-new.md +39 -38
  177. package/assets/patterns/spec-driven-domain.md +161 -151
  178. package/assets/patterns/spec-driven-rule.md +179 -168
  179. package/assets/patterns/spec-driven-sweep.md +41 -39
  180. package/assets/patterns/status-report-table.github.md +37 -36
  181. package/assets/patterns/styling-bem-component.md +42 -42
  182. package/assets/patterns/styling-bem-layout.md +39 -34
  183. package/assets/patterns/styling-bem-sheet.md +59 -58
  184. package/assets/patterns/task-flow-archive.md +222 -215
  185. package/assets/patterns/task-flow-close.md +215 -203
  186. package/assets/patterns/task-flow-handoff.md +154 -145
  187. package/assets/patterns/task-flow-resume.md +138 -133
  188. package/assets/patterns/task-flow-start.md +204 -192
  189. package/assets/patterns/testing-e2e.md +103 -92
  190. package/assets/patterns/testing-unit.md +77 -70
  191. package/assets/patterns/ts-procedure.md +32 -29
  192. package/assets/patterns/turn-entry-map.md +50 -48
  193. package/assets/pitfalls/agent-kit.md +152 -141
  194. package/assets/pitfalls/doc-style.md +96 -91
  195. package/assets/pitfalls/git-workflow.azure.md +49 -46
  196. package/assets/pitfalls/git-workflow.github.md +264 -234
  197. package/assets/pitfalls/git-workflow.gitlab.md +49 -45
  198. package/assets/pitfalls/spec-driven.md +73 -71
  199. package/assets/pitfalls/styling-bem.md +46 -40
  200. package/assets/pitfalls/task-flow.md +262 -246
  201. package/assets/pitfalls/testing.md +99 -92
  202. package/assets/pitfalls/turn-conduct.md +96 -81
  203. package/assets/rules/angular-patterns.md +81 -80
  204. package/assets/rules/api-layer.md +77 -74
  205. package/assets/rules/autonomous-work.md +75 -74
  206. package/assets/rules/browser-verification.md +223 -188
  207. package/assets/rules/component-structure.md +72 -69
  208. package/assets/rules/dependencies.md +74 -67
  209. package/assets/rules/deploy-flow.azure.md +118 -108
  210. package/assets/rules/deploy-flow.github.md +145 -135
  211. package/assets/rules/deploy-flow.gitlab.md +120 -110
  212. package/assets/rules/doc-style.md +209 -148
  213. package/assets/rules/entity-conventions.needs-admin.md +81 -79
  214. package/assets/rules/entity-models.md +73 -70
  215. package/assets/rules/git-workflow.azure.md +224 -228
  216. package/assets/rules/git-workflow.github.md +250 -242
  217. package/assets/rules/git-workflow.gitlab.md +218 -217
  218. package/assets/rules/lib-layers.md +85 -86
  219. package/assets/rules/lists.md +101 -97
  220. package/assets/rules/navigation.md +78 -78
  221. package/assets/rules/observability.needs-app.md +165 -153
  222. package/assets/rules/platform-access.md +76 -75
  223. package/assets/rules/reuse-first.md +153 -137
  224. package/assets/rules/shared-code.md +82 -79
  225. package/assets/rules/spec-driven.md +272 -260
  226. package/assets/rules/status-report.md +55 -58
  227. package/assets/rules/styling-bem.md +83 -72
  228. package/assets/rules/task-flow.md +282 -270
  229. package/assets/rules/testing.md +224 -188
  230. package/assets/rules/turn-conduct.md +255 -258
  231. package/assets/rules/turn-entry.md +92 -87
  232. package/assets/rules/typescript-conventions.md +94 -88
  233. package/assets/samples/specs/_template/spec.md +47 -47
  234. package/assets/samples/tasks/_template/grill.md +20 -20
  235. package/assets/samples/tasks/_template/plan.md +32 -30
  236. package/assets/samples/tasks/_template/progress.md +16 -16
  237. package/assets/skills/agent-kit-extend.md +129 -113
  238. package/assets/skills/agent-kit.md +236 -222
  239. package/assets/skills/write-a-skill.md +76 -71
  240. package/assets/templates/findings.md +19 -19
  241. package/assets/templates/gate-map.sh +16 -14
  242. package/assets/templates/implementation.md +28 -27
  243. package/assets/templates/pattern.md +17 -17
  244. package/assets/templates/pitfalls.md +6 -6
  245. package/assets/templates/postmortem.md +24 -23
  246. package/assets/templates/project.sh +24 -24
  247. package/assets/templates/proposal.md +62 -60
  248. package/assets/templates/rule.md +38 -38
  249. package/assets/workflows/feature.js +46 -46
  250. package/assets/workflows/plan.js +54 -54
  251. package/lib/catalog.d.ts +2 -0
  252. package/lib/catalog.d.ts.map +1 -1
  253. package/lib/catalog.js +4 -3
  254. package/lib/catalog.js.map +1 -1
  255. package/lib/commands.d.ts.map +1 -1
  256. package/lib/commands.js +68 -4
  257. package/lib/commands.js.map +1 -1
  258. package/lib/companion.js +3 -2
  259. package/lib/companion.js.map +1 -1
  260. package/lib/enroll.d.ts +7 -1
  261. package/lib/enroll.d.ts.map +1 -1
  262. package/lib/enroll.js +13 -4
  263. package/lib/enroll.js.map +1 -1
  264. package/lib/observations.d.ts +10 -1
  265. package/lib/observations.d.ts.map +1 -1
  266. package/lib/observations.js +1 -0
  267. package/lib/observations.js.map +1 -1
  268. package/lib/override-marks.d.ts +24 -0
  269. package/lib/override-marks.d.ts.map +1 -0
  270. package/lib/override-marks.js +98 -0
  271. package/lib/override-marks.js.map +1 -0
  272. package/lib/plan.d.ts +11 -0
  273. package/lib/plan.d.ts.map +1 -1
  274. package/lib/plan.js +10 -1
  275. package/lib/plan.js.map +1 -1
  276. package/lib/ship.d.ts +0 -7
  277. package/lib/ship.d.ts.map +1 -1
  278. package/lib/ship.js +10 -2
  279. package/lib/ship.js.map +1 -1
  280. package/lib/shipment.d.ts.map +1 -1
  281. package/lib/shipment.js +7 -3
  282. package/lib/shipment.js.map +1 -1
  283. package/lib/sync.d.ts.map +1 -1
  284. package/lib/sync.js +45 -11
  285. package/lib/sync.js.map +1 -1
  286. package/package.json +1 -1
  287. package/rt-tools-agent-kit-0.26.0.tgz +0 -0
  288. package/rt-tools-agent-kit-0.23.0.tgz +0 -0
@@ -1,49 +1,48 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Проверка того, что спек домена не разошёлся с кодом.
3
+ * The check that a domain spec has not diverged from the code.
4
4
  *
5
- * Первая редакция сверяла только идентификаторы сценариев против заголовков
6
- * тестов. Разбор роем нашёл в спеке возрастом в один день одиннадцать
7
- * расхождений с кодом, и проверка была зелёной на всех: совпадение
8
- * идентификатора не говорит ни о том, что правило где-то исполняется, ни о том,
9
- * что тест проверяет обещанное. Отсюда пять механизмов ниже — каждый сверяет
10
- * текст с фактом, а не с другим текстом.
5
+ * The first edition audited only the scenario identifiers against test titles. A swarm review
6
+ * found eleven divergences from the code in a spec one day old, and the check was green on all
7
+ * of them: a matching identifier says neither that a rule is carried out somewhere nor that the
8
+ * test checks what was promised. Hence the five mechanisms below — each audits a text against a
9
+ * fact, not against another text.
11
10
  *
12
- * 1. ПРИВЯЗКА ПРАВИЛА К КОДУ. Живёт в `implementation.md` рядом со спеком:
13
- * таблица «правило → `файл:символ`». Сверяется в обе стороны — правило без
14
- * строки и строка без правила, — и требует, чтобы файл был, а символ в нём
15
- * встречался. Правило шире своей привязки так не напишешь: «потолок суммы на
16
- * приёме заявки» не прошло бы, потому что символ живёт в процедуре решения
17
- * владельца, а четырём незаведённым механикам скидок привязки не нашлось бы
18
- * вовсе. Ключ связи — сам текст правила, поэтому переформулировать его, забыв
19
- * поправить привязку, нельзя. Правило без привязки — намерение, и писать его
20
- * надо как открытый вопрос закона — `Q-<буква закона>-<номер>`.
11
+ * 1. THE BINDING OF A RULE TO CODE. Lives in `implementation.md` next to the spec: the table
12
+ * "rule → `file:symbol`". Audited both ways — a rule without a line and a line without a
13
+ * rule — and it requires the file to be there and the symbol to occur in it. A rule wider
14
+ * than its binding cannot be written this way: "the ceiling of the sum at the intake of a
15
+ * request" would not have passed, because the symbol lives in the procedure of the owner's
16
+ * decision, and four discount mechanics that were never started would have found no binding
17
+ * at all. The key of the link is the text of the rule itself, so it cannot be reworded while
18
+ * the binding is left unfixed. A rule without a binding is an intention, and it is written as
19
+ * an open question of a law — `Q-<law letter>-<number>`.
21
20
  *
22
- * 2. КОНТРАКТ ПРОТИВ ДЕКОРАТОРОВ. Таблица процедур сверяется с тем, что
23
- * объявлено в `*.procedure.ts` домена: `@RequiresPermission` / `@PublicProcedure`
24
- * и дескриптор метода. В обе стороны — иначе процедура, которую домен
25
- * обслуживает, но забыл описать, остаётся видна только в декораторе.
21
+ * 2. THE CONTRACT AGAINST THE DECORATORS. The table of procedures is audited against what is
22
+ * declared in the domain's `*.procedure.ts`: `@RequiresPermission` / `@PublicProcedure` and
23
+ * the method descriptor. Both ways — otherwise a procedure the domain serves but forgot to
24
+ * describe stays visible only in the decorator.
26
25
  *
27
- * 3. КОД ОТКАЗА С ТОЧКОЙ БРОСКА. Код принимается, только если `Code.X`
28
- * действительно бросается где-то в либах домена. Коды выписывались по
29
- * замыслу, и на одном пути обещанного `NotFound` не бросал никто.
26
+ * 3. A REFUSAL CODE WITH A THROW SITE. A code is accepted only if `Code.X` is really thrown
27
+ * somewhere in the libs of the domain. The codes were written out by the plan, and on one
28
+ * path the promised `NotFound` was thrown by nobody.
30
29
  *
31
- * 4. УРОВЕНЬ ПРИВЯЗКИ. Сценарий, чей тест идёт не тем путём, что пользователь,
32
- * или проверяет часть обещанного, помечается `Покрытие: частичное` и уходит в
33
- * долги, а не в покрытие. Иначе зелёная сводка означает меньше, чем кажется.
30
+ * 4. THE LEVEL OF A BINDING. A scenario whose test goes a way other than the user's, or checks
31
+ * part of what was promised, is marked `Coverage: partial` and goes into the debts, not
32
+ * into the coverage. Otherwise a green digest means less than it seems.
34
33
  *
35
- * 5. МЁРТВАЯ ПРИВЯЗКА. Наличия символа мало: объявленный и никем не позванный
36
- * символ проходил проверку насквозь. Так пять правил про правку сущности
37
- * оказались привязаны к механике общей основы асайда, которую не зовёт ни один
38
- * экран. Символ, объявленный в файле и больше нигде не встречающийся, местом
39
- * исполнения правила не считается.
34
+ * 5. A DEAD BINDING. The presence of a symbol is not enough: a symbol declared and called by
35
+ * nobody passed the check straight through. That is how five rules about editing a record
36
+ * turned out to be bound to a mechanism of the shared aside base that no screen calls. A
37
+ * symbol declared in a file and occurring nowhere else does not count as the place where a
38
+ * rule is carried out.
40
39
  *
41
- * Каждый механизм живёт своим модулем рядом: привязки и законы — `spec-anchors.mjs`,
42
- * контракт и коды отказов — `spec-contract.mjs`, сценарии и покрытие — `spec-scenarios.mjs`,
43
- * общее чтение дерева — `spec-common.mjs`. Здесь остаётся прогон: он обходит домены и
44
- * складывает найденное в один перечень.
40
+ * Each mechanism lives in a module of its own alongside: bindings and laws — `spec-anchors.mjs`,
41
+ * the contract and the refusal codes — `spec-contract.mjs`, scenarios and coverage —
42
+ * `spec-scenarios.mjs`, the common reading of the tree — `spec-common.mjs`. What is left here is
43
+ * the run: it walks the domains and puts what it found into one list.
45
44
  *
46
- * Ненулевой код возврата и перечень расхождений.
45
+ * A non-zero return code and a list of divergences.
47
46
  */
48
47
  import { readdirSync } from 'node:fs';
49
48
  import { dirname, join } from 'node:path';
@@ -55,7 +54,7 @@ import { checkContract, checkRefusalCodes, procedureRootsOf } from './spec-contr
55
54
  import { proposedGroups, staleProposed } from './spec-proposed.mjs';
56
55
  import { collectReferences, parseScenarios, promisesScreen } from './spec-scenarios.mjs';
57
56
 
58
- // ── прогон ────────────────────────────────────────────────────────────────────
57
+ // ── run ───────────────────────────────────────────────────────────────────────
59
58
 
60
59
  function checkSpecHeadings(file, text) {
61
60
  const headings = new Set(
@@ -65,8 +64,10 @@ function checkSpecHeadings(file, text) {
65
64
  .map((line) => line.trimEnd())
66
65
  );
67
66
 
68
- REQUIRED_HEADINGS.filter((required) => !headings.has(required)).forEach((required) =>
69
- report(file, `нет обязательного раздела \`${required}\``)
67
+ // A section is mandatory under either of its names, and the refusal names the first — the one a
68
+ // new spec is written by.
69
+ REQUIRED_HEADINGS.filter((names) => !names.some((name) => headings.has(name))).forEach(([required]) =>
70
+ report(file, `no mandatory section \`${required}\``)
70
71
  );
71
72
  }
72
73
 
@@ -75,32 +76,33 @@ const scenarios = [];
75
76
  const byId = new Map();
76
77
 
77
78
  /**
78
- * Имена законов и путь к каждому. Слоёв два: общий лежит в корне `docs/constitution/`, законы
79
- * приложения — в `application/` под ним. Имя берётся без каталога, потому что называют закон
80
- * везде одинаково: ни `law:` в шапке правила, ни `**Законы:**` в спеке не знают, в каком он
81
- * слое, и переезд между слоями не переписывает ни одну из этих строк.
79
+ * The names of the laws and the path to each. There are two layers: the common one lies at the
80
+ * root of `docs/constitution/`, the application laws in `application/` under it. The name is taken
81
+ * without the directory, because a law is named the same everywhere: neither `law:` in a rule's
82
+ * front matter nor `**Laws:**` in a spec knows which layer it is in, and a move between layers
83
+ * rewrites none of those lines.
82
84
  *
83
- * Отсюда требование: имена законов уникальны по всему дереву конституции. Два файла с одним
84
- * именем в разных слоях назывались бы одной строкой `law:`, и правило досталось бы тому, кого
85
- * обошли первым.
85
+ * Hence the requirement: law names are unique across the whole constitution tree. Two files with
86
+ * one name in different layers would be named by the same `law:` line, and the rule would go to
87
+ * whichever of them was walked first.
86
88
  */
87
89
  const laws = new Map();
88
90
  for (const file of walk(CONSTITUTION_DIR, (name) => name.endsWith('.md'))) {
89
91
  const name = file.slice(file.lastIndexOf('/') + 1, -'.md'.length);
90
92
  if (laws.has(name)) {
91
- report(file, `закон с таким именем уже есть — \`${laws.get(name)}\`; имена законов уникальны на оба слоя`);
93
+ report(file, `a law of that name already exists — \`${laws.get(name)}\`; law names are unique across both layers`);
92
94
  continue;
93
95
  }
94
96
  laws.set(name, file);
95
97
  }
96
98
 
97
99
  /**
98
- * Директории, описывающие предмет: сам домен и его поддомены. Поддомен заводится, когда домен
99
- * вырос настолько, что читать его целиком ради одной подробности дороже, чем найти её; устроен
100
- * он так же — три файла и свой префикс сценариев.
100
+ * The directories that describe a subject: the domain itself and its subdomains. A subdomain is
101
+ * started when a domain has grown so large that reading it whole for one detail costs more than
102
+ * finding that detail; it is arranged the same way — three files and a scenario prefix of its own.
101
103
  *
102
- * `proposed/` предметом не является: это договорённость о продукте до кода, и её сценарии живут
103
- * в нумерации того спека, в который она вольётся.
104
+ * `proposed/` is not a subject: it is a product agreement written before the code, and its
105
+ * scenarios live in the numbering of the spec it will merge into.
104
106
  */
105
107
  function collectSpecDirs(base) {
106
108
  const found = [base];
@@ -120,30 +122,30 @@ function collectSpecDirs(base) {
120
122
  return found;
121
123
  }
122
124
 
123
- /** Префикс сценариев принадлежит одному спеку по всему дереву. */
125
+ /** A scenario prefix belongs to one spec across the whole tree. */
124
126
  const prefixOwners = new Map();
125
127
 
126
128
  for (const domain of domains) {
127
129
  const base = `${SPECS_DIR}/${domain}`;
128
130
  for (const dir of collectSpecDirs(base)) {
129
- // Спек, у которого есть только `proposed/`, ещё не существует: его самого нет, пока
130
- // фича не выкачена
131
+ // A spec that has only `proposed/` does not exist yet: it itself is absent until the
132
+ // feature is rolled out
131
133
  if (exists(`${dir}/proposed`) && !exists(`${dir}/spec.md`)) {
132
134
  continue;
133
135
  }
134
- const what = dir === base ? 'домен' : 'поддомен';
136
+ const what = dir === base ? 'the domain' : 'the subdomain';
135
137
  ['spec.md', 'scenarios.md']
136
138
  .filter((name) => !exists(`${dir}/${name}`))
137
- .forEach((name) => report(dir, `нет файла \`${name}\` — ${what} описан наполовину`));
139
+ .forEach((name) => report(dir, `no file \`${name}\` — ${what} is described by half`));
138
140
  }
139
141
 
140
- // Спеки фич из `proposed/` проверяются наравне со спеком домена: они и есть
141
- // договорённость, по которой пишется код, а не черновик. Три сверки с кодом к
142
- // ним не применяются — кода, с которым сверять, ещё нет
142
+ // Feature specs from `proposed/` are checked on a par with the domain spec: they are the
143
+ // product agreement the code is written by, not a draft. The three audits against the code
144
+ // do not apply to them — there is no code yet to audit against
143
145
  for (const specFile of walk(base, (name) => name === 'spec.md')) {
144
146
  const text = read(specFile);
145
147
  checkSpecHeadings(specFile, text);
146
- // Законы спек объявляет и в `proposed/`: договорённость о продукте есть до кода
148
+ // A spec declares its laws in `proposed/` as well: the product agreement exists before the code
147
149
  checkSpecLaws(specFile, text, laws);
148
150
  if (specFile.includes('/proposed/')) {
149
151
  continue;
@@ -156,11 +158,11 @@ for (const domain of domains) {
156
158
 
157
159
  const found = walk(base, (name) => name === 'scenarios.md').flatMap(parseScenarios);
158
160
 
159
- // Префикс принадлежит домену вместе с его поддоменами, а не отдельному каталогу. Домен
160
- // делится тогда, когда его спек перерос предел длины, и сценарии переезжают в поддомены
161
- // прежними: номер — единственное, чем сценарий связан с заголовком теста, и своя нумерация
162
- // у каждого поддомена означала бы пересчёт всех номеров разом. Два префикса в одном спеке
163
- // по-прежнему означают, что предмет описан дважды.
161
+ // The prefix belongs to the domain together with its subdomains, not to a separate directory.
162
+ // A domain is split when its spec has outgrown the length limit, and the scenarios move into
163
+ // the subdomains unchanged: the number is the only thing binding a scenario to a test title,
164
+ // and a numbering of its own for each subdomain would mean recounting every number at once.
165
+ // Two prefixes in one spec still mean the subject is described twice.
164
166
  const prefixesOf = new Map();
165
167
  for (const scenario of found) {
166
168
  const dir = dirname(scenario.file);
@@ -172,17 +174,17 @@ for (const domain of domains) {
172
174
 
173
175
  for (const [dir, prefixes] of prefixesOf) {
174
176
  if (prefixes.size > 1) {
175
- report(dir, `в спеке больше одного префикса сценариев: ${[...prefixes].sort().join(', ')}`);
177
+ report(dir, `the spec carries more than one scenario prefix: ${[...prefixes].sort().join(', ')}`);
176
178
  }
177
- // Договорённость о продукте нумеруется вместе со спеком, в который вольётся:
178
- // идентификаторы переезд переживают, и занятым префикс от неё не становится
179
+ // A product agreement is numbered together with the spec it will merge into: the
180
+ // identifiers survive the move, and the prefix does not become taken because of it
179
181
  if (dir.includes('/proposed/')) {
180
182
  continue;
181
183
  }
182
184
  for (const prefix of prefixes) {
183
185
  const owner = prefixOwners.get(prefix);
184
186
  if (owner && owner !== base) {
185
- report(dir, `префикс \`SC-${prefix}\` уже занят — \`${owner}\`; по номеру не видно, чей сценарий`);
187
+ report(dir, `the prefix \`SC-${prefix}\` is already taken — \`${owner}\`; by the number there is no seeing whose scenario it is`);
186
188
  continue;
187
189
  }
188
190
  prefixOwners.set(prefix, base);
@@ -192,36 +194,50 @@ for (const domain of domains) {
192
194
  scenarios.push(...found);
193
195
  }
194
196
 
195
- // Закон о проекте не знает ничего: ни путей, ни имён файлов, ни привязок. Он только
196
- // объявляет статьи, а всё остальное — дело правил, которые на него ссылаются. Поэтому
197
- // спутника с привязкой у закона нет и быть не может: файл с путями `libs/...`, лежащий
198
- // рядом с законом, привязал бы закон к этому проекту.
197
+ // A law knows nothing about the project: no paths, no file names, no bindings. It only declares
198
+ // articles, and everything else is the business of the rules that refer to it. So a law has no
199
+ // sidecar with bindings and cannot have one: a file with `libs/...` paths lying next to a law
200
+ // would bind the law to this project.
199
201
  //
200
- // «Открытые вопросы» отсюда сняты: проверка видела заголовок, а не вопросы под ним, и
201
- // пустой раздел проходил её так же, как заполненный. Закон, у которого всё решено, писал
202
- // эту строку ради самой строки.
203
- const LAW_HEADINGS = ['## Статьи'];
202
+ // "Open questions" is taken out from here: the check saw the heading and not the questions under
203
+ // it, and an empty section passed it just as a filled one did. A law with everything settled wrote
204
+ // that line for the sake of the line.
205
+ //
206
+ // The section has two names: an English one in a package law, a Russian one in a law the tree
207
+ // wrote before the layer was translated. Both mean one thing, and the check accepts either.
208
+ const LAW_HEADINGS = [['## Articles', '## Статьи']];
204
209
 
205
210
  for (const file of walk(CONSTITUTION_DIR, (name) => name.endsWith('.md'))) {
206
211
  const text = read(file);
207
- LAW_HEADINGS.filter((heading) => !text.split('\n').some((line) => line.trimEnd() === heading)).forEach((heading) =>
208
- report(file, `нет раздела \`${heading}\``)
212
+ const lines = text.split('\n').map((line) => line.trimEnd());
213
+ LAW_HEADINGS.filter((names) => !names.some((heading) => lines.includes(heading))).forEach((names) =>
214
+ report(file, `no section \`${names[0]}\` (or \`${names[1]}\`)`)
209
215
  );
210
216
  if (/`[\w./-]+\.(ts|mjs|js|sh|scss|html|json|proto|conf|yml|md)[:`]/.test(text)) {
211
- report(file, 'закон называет файл проекта — путям и привязкам место в правиле, а не здесь');
217
+ report(file, 'the law names a project file — paths and bindings belong in a rule, not here');
212
218
  }
213
219
  }
214
220
 
215
- // Правило — скил с `kind: rule` в шапке. Оно и знает о проекте: имена, пути, связи. Привязка
216
- // его утверждений к коду живёт в `implementation.md` рядом со скилом.
217
- const RULE_HEADING = '## Как закон применяется здесь';
218
- /** Раздел компаньона правила, где лежат привязки; остальные его таблицы называют имена дерева. */
219
- const MAP_HEADING = '## Где исполняются статьи';
221
+ // A rule is a skill with `kind: rule` in its front matter. It is the one that knows about the
222
+ // project: names, paths, links. The binding of its statements to the code lives in
223
+ // `implementation.md` next to the skill.
224
+ // The section has two names: an English one in a package rule, a Russian one in a rule the tree
225
+ // wrote before the layer was translated. The one that stands in the file is taken.
226
+ const RULE_HEADINGS = ['## How the law applies here', '## Как закон применяется здесь'];
227
+ const ruleHeadingOf = (text) => RULE_HEADINGS.find((heading) => text.split('\n').some((line) => line.trimEnd() === heading)) ?? RULE_HEADINGS[0];
228
+ /**
229
+ * The companion section of a rule where the bindings lie; its other tables name the tree's names.
230
+ * Two names again: the companion is written by the tree, and a tree translates its companions one
231
+ * rule at a time. The one that stands in the file is taken.
232
+ */
233
+ const MAP_HEADINGS = ['## Where the articles are carried out', '## Где исполняются статьи'];
234
+ const mapHeadingOf = (text) =>
235
+ MAP_HEADINGS.find((heading) => text.split('\n').some((line) => line.trimEnd() === heading)) ?? MAP_HEADINGS[0];
220
236
 
221
237
  /**
222
- * Шапка скила — первый блок между `---`. Читается только она: паттерн, который учит заводить
223
- * правило, показывает шапку правила примером в фенсе, и поиск по всему тексту принял бы этот
224
- * пример за настоящее объявление.
238
+ * The front matter of a skill — the first block between `---`. Only it is read: the pattern that
239
+ * teaches how to start a rule shows a rule's front matter as an example in a fence, and a search
240
+ * over the whole text would take that example for a real declaration.
225
241
  */
226
242
  function frontMatterOf(text) {
227
243
  const found = text.match(/^---\n([\s\S]*?)\n---/);
@@ -229,7 +245,7 @@ function frontMatterOf(text) {
229
245
  return found ? found[1] : '';
230
246
  }
231
247
 
232
- /** Правила и паттерны, найденные в дереве скилов: по ним считаются обе стороны связи. */
248
+ /** The rules and patterns found in the skills tree: both sides of the link are counted by them. */
233
249
  const ruled = new Set();
234
250
  const patterned = new Set();
235
251
  const nameOf = (head) => (head.match(/^name:\s*(\S+)/m) || [])[1] || '';
@@ -242,9 +258,9 @@ for (const file of walk('.claude/skills', (name) => name === 'SKILL.md')) {
242
258
  if (kind === 'pattern') {
243
259
  const rule = (head.match(/^rule:\s*(\S+)/m) || [])[1];
244
260
  if (!rule) {
245
- report(file, 'паттерн не объявил правило — допиши `rule:` в шапку');
261
+ report(file, 'the pattern declared no rule — add `rule:` to the header');
246
262
  } else if (!exists(`.claude/skills/${rule}/SKILL.md`)) {
247
- report(file, `паттерн объявил правило \`${rule}\`, а скила с таким именем нет`);
263
+ report(file, `the pattern declared the rule \`${rule}\`, and there is no rule of that name`);
248
264
  } else {
249
265
  patterned.add(rule);
250
266
  }
@@ -257,38 +273,41 @@ for (const file of walk('.claude/skills', (name) => name === 'SKILL.md')) {
257
273
 
258
274
  const law = (head.match(/^law:\s*(\S+)/m) || [])[1];
259
275
  if (!law) {
260
- report(file, 'правило не объявило закон — допиши `law:` в шапку');
276
+ report(file, 'the rule declared no law — add `law:` to the header');
261
277
  } else if (!laws.has(law)) {
262
- report(file, `правило объявило закон \`${law}\`, а закона с таким именем нет ни в одном слое`);
278
+ report(file, `the rule declared the law \`${law}\`, and there is no law of that name in any layer`);
263
279
  } else {
264
280
  ruled.add(law);
265
281
  }
266
- checkRuleImplementation(file, text, `${dirname(file)}/implementation.md`, RULE_HEADING, MAP_HEADING);
282
+ const mapFile = `${dirname(file)}/implementation.md`;
283
+
284
+ checkRuleImplementation(file, text, mapFile, ruleHeadingOf(text), mapHeadingOf(read(mapFile)));
267
285
 
268
286
  const name = nameOf(head);
269
287
  if (name && name !== file.slice('.claude/skills/'.length, -'/SKILL.md'.length)) {
270
- report(file, `имя в шапке (\`${name}\`) не совпадает с каталогом скила`);
288
+ report(file, `the name in the header (\`${name}\`) does not match the directory of the rule`);
271
289
  }
272
290
  }
273
291
 
274
- // Предложенный закон правила не требует: договорённость записана раньше кода, привязывать её
275
- // не к чему, и требование правила заставило бы завести его с якорями в несуществующие места.
276
- // Признак стоит строкой статуса в самом законе, а не списком исключений рядом с проверкой.
277
- const isProposedLaw = (file) => /^\*\*Статус:\*\*\s*предложен/m.test(read(file));
292
+ // A proposed law requires no rule: the agreement is written before the code, there is nothing to
293
+ // bind it to, and requiring a rule would force starting one with anchors into places that do not
294
+ // exist. The sign stands as a status line in the law itself, not as a list of exceptions next to
295
+ // the check.
296
+ const isProposedLaw = (file) => /^\*\*(?:Status:\*\*\s*proposed|Статус:\*\*\s*предложен)/m.test(read(file));
278
297
 
279
- // Обратные стороны связи. Закон без правила читается как договорённость, которую этот проект
280
- // не применяет; правило без паттерна оставляет готовый код там, где ему не место, — в самом
281
- // правиле, которое читается при каждой правке.
298
+ // The reverse sides of the link. A law without a rule reads as an agreement this project does not
299
+ // apply; a rule without a pattern leaves ready-made code where it does not belong — in the rule
300
+ // itself, which is read at every edit.
282
301
  [...laws]
283
302
  .filter(([law, file]) => !ruled.has(law) && !isProposedLaw(file))
284
- .forEach(([, file]) => report(file, 'у закона нет ни одного правила — заведи скил с `law:` на него'));
303
+ .forEach(([, file]) => report(file, 'the law has no rule at all — create one with `law:` pointing at it'));
285
304
 
286
305
  /**
287
- * Имена паттернов, которые дерево при раскладке пропустило: ключ `skip` в настройке проекта.
306
+ * The names of the patterns the tree skipped at layout: the `skip` key in the project settings.
288
307
  *
289
- * Пропуск — выбор дерева, а не забытая работа: правило о процедурах бэкенда ложится и в дерево,
290
- * где бэкенда нет вовсе. Требовать там паттерн значит требовать завести файл, которому нечего
291
- * сказать, — и единственным способом позеленеть становится снятие пропуска.
308
+ * A skip is the tree's choice, not forgotten work: the rule about backend procedures is laid out
309
+ * into a tree that has no backend at all. Requiring a pattern there means requiring a file with
310
+ * nothing to say — and the only way to go green becomes lifting the skip.
292
311
  */
293
312
  const skippedPatterns = () => {
294
313
  const path = '.claude/rt-kit.json';
@@ -305,12 +324,14 @@ const skippedPatterns = () => {
305
324
  };
306
325
 
307
326
  /**
308
- * Раздел «Паттерны» самого правила — единственное место, где связь видна без файла паттерна:
309
- * пропущенного файла в дереве нет, и поле `rule:` в нём спросить не у кого.
327
+ * The "Patterns" section of the rule itself is the only place where the link is visible without a
328
+ * pattern file: a skipped file is not in the tree, and there is nobody to ask for the `rule:`
329
+ * field in it.
310
330
  */
311
- // Флага `m` здесь нет намеренно: с ним `$` означает конец строки, и раздел кончается на первом
312
- // же переводе строки — пустым. Начало заголовка поэтому ищется своей парой, а не якорем.
313
- const PATTERNS_HEADING = /(?:^|\n)## Паттерны\n([\s\S]*?)(?=\n## |$)/;
331
+ // The `m` flag is deliberately absent here: with it `$` means the end of a line, and the section
332
+ // ends at the very first newline — empty. So the start of the heading is found by a pair of its
333
+ // own, not by an anchor.
334
+ const PATTERNS_HEADING = /(?:^|\n)## (?:Patterns|Паттерны)\n([\s\S]*?)(?=\n## |$)/;
314
335
  const patternsNamedBy = (text) => [...(text.match(PATTERNS_HEADING)?.[1] ?? '').matchAll(/^-\s+`([\w-]+)`/gm)].map(([, found]) => found);
315
336
 
316
337
  const skipped = skippedPatterns();
@@ -328,7 +349,7 @@ for (const file of walk('.claude/skills', (name) => name === 'SKILL.md')) {
328
349
  continue;
329
350
  }
330
351
 
331
- report(file, 'у правила нет ни одного паттерна — заведи скил с `rule:` на него');
352
+ report(file, 'the rule has no pattern at all — create one with `rule:` pointing at it');
332
353
  }
333
354
 
334
355
  checkTracedAnchors();
@@ -336,7 +357,7 @@ checkTracedAnchors();
336
357
  for (const scenario of scenarios) {
337
358
  const seen = byId.get(scenario.id);
338
359
  if (seen) {
339
- report(`${scenario.file}:${scenario.line}`, `идентификатор ${scenario.id} уже занят (${seen.file}:${seen.line})`);
360
+ report(`${scenario.file}:${scenario.line}`, `the identifier ${scenario.id} is already taken (${seen.file}:${seen.line})`);
340
361
  continue;
341
362
  }
342
363
  byId.set(scenario.id, scenario);
@@ -351,7 +372,7 @@ for (const scenario of byId.values()) {
351
372
  const places = references.get(scenario.id) ?? [];
352
373
  const hasTest = places.length > 0;
353
374
  if (scenario.uncovered && hasTest) {
354
- report(`${scenario.file}:${scenario.line}`, `${scenario.id} помечен «Не покрыто», но тест на него есть (${places[0].place})`);
375
+ report(`${scenario.file}:${scenario.line}`, `${scenario.id} is marked «Not covered», and there is a test for it (${places[0].place})`);
355
376
  continue;
356
377
  }
357
378
  if (scenario.uncovered) {
@@ -359,21 +380,21 @@ for (const scenario of byId.values()) {
359
380
  continue;
360
381
  }
361
382
  if (!hasTest) {
362
- report(`${scenario.file}:${scenario.line}`, `${scenario.id} не упомянут ни в одном тесте и не помечен «Не покрыто»`);
383
+ report(`${scenario.file}:${scenario.line}`, `${scenario.id} is mentioned in no test and is not marked «Not covered»`);
363
384
  continue;
364
385
  }
365
386
  if (scenario.partial) {
366
387
  partial.push(scenario);
367
388
  continue;
368
389
  }
369
- // Обещание, данное пользователю, закрывается тестом, идущим его путём. Юнит проверяет
370
- // тот же расчёт мимо экрана: он верен и покрытием сценария не является
371
- if (promisesScreen(scenario.promise) && !places.some(({ screen, off }) => screen && !off)) {
390
+ // A promise given to the user is closed by a test that goes the user's way. A unit test checks
391
+ // the same computation past the screen: it is right and it is not coverage of the scenario
392
+ if (promisesScreen(scenario.promise, scenario.body) && !places.some(({ screen, off }) => screen && !off)) {
372
393
  const off = places.some(({ screen }) => screen);
373
394
  report(
374
395
  `${scenario.file}:${scenario.line}`,
375
- `${scenario.id} обещает то, что человек видит, а ${off ? 'сквозной тест на него выключен переменной окружения' : 'проверяет его только юнит'} ` +
376
- `(${places[0].place}) — либо тест идёт путём пользователя, либо сценарию нужна отметка «Покрытие: частичное»`
396
+ `${scenario.id} promises what a person sees, and ${off ? 'the end-to-end test for it is switched off by an environment variable' : 'only a unit test checks it'} ` +
397
+ `(${places[0].place}) — either the test goes the path of the user, or the scenario needs the mark «Покрытие: частичное»`
377
398
  );
378
399
  continue;
379
400
  }
@@ -382,39 +403,39 @@ for (const scenario of byId.values()) {
382
403
 
383
404
  for (const [id, places] of references) {
384
405
  if (!byId.has(id)) {
385
- report(places[0].place, `тест ссылается на ${id}, а такого сценария в \`${SPECS_DIR}\` нет`);
406
+ report(places[0].place, `the test refers to ${id}, and \`${SPECS_DIR}\` carries no such scenario`);
386
407
  }
387
408
  }
388
409
 
389
410
  if (problems.length > 0) {
390
- console.error(`check-specs: расхождений ${problems.length}\n`);
411
+ console.error(`check-specs: divergences ${problems.length}\n`);
391
412
  problems.forEach((problem) => console.error(` ${problem}`));
392
- console.error('\nПравила работы со спеками — скил `spec-driven`.');
413
+ console.error('\nThe rules of working with specs are `spec-driven`.');
393
414
  process.exit(1);
394
415
  }
395
416
 
396
417
  console.log(
397
- `check-specs: доменов ${domains.length}, сценариев ${byId.size} — ` +
398
- `покрыто ${covered}, частично ${partial.length}, без тестов ${uncovered.length}`
418
+ `check-specs: domains ${domains.length}, scenarios ${byId.size} — ` +
419
+ `covered ${covered}, partial ${partial.length}, without tests ${uncovered.length}`
399
420
  );
400
421
 
401
422
  const debts = [...partial, ...uncovered];
402
423
  if (debts.length > 0) {
403
- console.log('\nДолги — покрытие неполное:');
404
- partial.forEach((scenario) => console.log(` частично ${scenario.id} — ${scenario.title} (${scenario.file}:${scenario.line})`));
405
- uncovered.forEach((scenario) => console.log(` нет теста ${scenario.id} — ${scenario.title} (${scenario.file}:${scenario.line})`));
424
+ console.log('\nDebts — the coverage is not complete:');
425
+ partial.forEach((scenario) => console.log(` partial ${scenario.id} — ${scenario.title} (${scenario.file}:${scenario.line})`));
426
+ uncovered.forEach((scenario) => console.log(` no test ${scenario.id} — ${scenario.title} (${scenario.file}:${scenario.line})`));
406
427
  }
407
428
 
408
429
  const proposed = proposedGroups(byId.values(), references);
409
430
 
410
431
  const ripe = [...proposed].filter(([, group]) => group.total > 0 && group.total === group.ready);
411
432
  if (ripe.length > 0) {
412
- console.log('\nПора вливать — сценарии закрыты тестами, договорённость ждёт переезда в спек домена:');
413
- ripe.forEach(([dir, group]) => console.log(` ${dir} — сценариев ${group.total}`));
433
+ console.log('\nTime to merge — the scenarios are closed by tests, the agreement awaits the move into the domain spec:');
434
+ ripe.forEach(([dir, group]) => console.log(` ${dir} — scenarios ${group.total}`));
414
435
  }
415
436
 
416
437
  const stale = staleProposed([...proposed.keys()]);
417
438
  if (stale.length > 0) {
418
- console.log('\nЖдёт дольше месяца — привязка в договорённости стареет вместе с кодом, на который показывает:');
419
- stale.forEach((record) => console.log(` ${record.dir} — ${Math.floor(record.ageDays)} суток без правок`));
439
+ console.log('\nWaiting longer than a month — the binding in the agreement ages together with the code it points at:');
440
+ stale.forEach((record) => console.log(` ${record.dir} — ${Math.floor(record.ageDays)} days without edits`));
420
441
  }