@rt-tools/agent-kit 0.24.0 → 0.27.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 (312) hide show
  1. package/assets/agents/business-analyst.md +51 -50
  2. package/assets/agents/cargo-writer.md +54 -0
  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-epic-link.github.mjs +29 -0
  15. package/assets/checks/board-epics.github.mjs +286 -49
  16. package/assets/checks/board-folders.mjs +61 -0
  17. package/assets/checks/board-gh.github.mjs +35 -26
  18. package/assets/checks/board-long-work.github.mjs +29 -25
  19. package/assets/checks/board-paths.github.mjs +21 -16
  20. package/assets/checks/board-pull-state.github.mjs +168 -0
  21. package/assets/checks/board-runs.github.mjs +45 -43
  22. package/assets/checks/board-task-dirs.github.mjs +98 -0
  23. package/assets/checks/board-titles.github.mjs +19 -17
  24. package/assets/checks/board.github.mjs +133 -194
  25. package/assets/checks/check-archive-age.mjs +23 -19
  26. package/assets/checks/check-board.github.mjs +131 -263
  27. package/assets/checks/check-descriptions.mjs +30 -29
  28. package/assets/checks/check-doc-paths.mjs +91 -88
  29. package/assets/checks/check-dupes.mjs +84 -80
  30. package/assets/checks/check-file-size.mjs +74 -71
  31. package/assets/checks/check-glossary.mjs +47 -37
  32. package/assets/checks/check-hook-scope.mjs +30 -27
  33. package/assets/checks/check-lib-layers.mjs +22 -21
  34. package/assets/checks/check-profile-drift.mjs +48 -43
  35. package/assets/checks/check-prose-style.mjs +138 -39
  36. package/assets/checks/check-push-gate.mjs +53 -50
  37. package/assets/checks/check-reuse.mjs +50 -40
  38. package/assets/checks/check-schema-drift.mjs +104 -84
  39. package/assets/checks/check-specs.mjs +155 -134
  40. package/assets/checks/check-state-next.mjs +66 -52
  41. package/assets/checks/check-states.mjs +32 -30
  42. package/assets/checks/check-styles.mjs +52 -51
  43. package/assets/checks/check-turn-map.mjs +54 -46
  44. package/assets/checks/epic-table.github.mjs +268 -0
  45. package/assets/checks/lib-boundaries.mjs +32 -30
  46. package/assets/checks/lib-common.mjs +30 -29
  47. package/assets/checks/lib-domains.mjs +34 -34
  48. package/assets/checks/lib-manifests.mjs +17 -15
  49. package/assets/checks/lib-reexports.mjs +18 -18
  50. package/assets/checks/rt-kit-checks.config.mjs +187 -142
  51. package/assets/checks/signals.mjs +43 -39
  52. package/assets/checks/spec-anchors.mjs +114 -87
  53. package/assets/checks/spec-common.mjs +128 -84
  54. package/assets/checks/spec-contract.mjs +30 -30
  55. package/assets/checks/spec-proposed.mjs +27 -24
  56. package/assets/checks/spec-scenarios.mjs +51 -28
  57. package/assets/checks/specs-for.mjs +214 -0
  58. package/assets/checks/task-new.github.mjs +315 -61
  59. package/assets/commands/feedback.md +65 -59
  60. package/assets/commands/next-session.md +64 -57
  61. package/assets/commands/night.md +115 -0
  62. package/assets/commands/skill-curator.md +83 -79
  63. package/assets/defaults/gate-map.sh +108 -97
  64. package/assets/defaults/project.sh +232 -185
  65. package/assets/defaults/shell.sh +73 -68
  66. package/assets/defaults/turn-map.md +47 -44
  67. package/assets/docs/GLOSSARY.md +142 -65
  68. package/assets/hooks/browser-device-id.sh +16 -12
  69. package/assets/hooks/browser-guard-device-id.sh +34 -28
  70. package/assets/hooks/browser-guard-no-asking.sh +5 -4
  71. package/assets/hooks/browser-guard-no-listing.sh +12 -11
  72. package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
  73. package/assets/hooks/browser-guard-require-select.sh +34 -23
  74. package/assets/hooks/claim-guard.sh +62 -56
  75. package/assets/hooks/commit-msg.sh +14 -10
  76. package/assets/hooks/conscience-guard.sh +91 -45
  77. package/assets/hooks/constitution-index.sh +16 -16
  78. package/assets/hooks/deny-tail.sh +28 -26
  79. package/assets/hooks/dev-server-guard.sh +50 -43
  80. package/assets/hooks/dispatch.sh +60 -46
  81. package/assets/hooks/docs-guard.sh +100 -91
  82. package/assets/hooks/epic-over.sh +49 -0
  83. package/assets/hooks/epic-stop-guard.sh +108 -0
  84. package/assets/hooks/exam-guard.sh +105 -93
  85. package/assets/hooks/git-guard-delivery-conflict.sh +41 -36
  86. package/assets/hooks/git-guard-delivery-draft.sh +48 -38
  87. package/assets/hooks/git-guard-delivery-epic.sh +167 -0
  88. package/assets/hooks/git-guard-delivery-folder.sh +50 -43
  89. package/assets/hooks/git-guard-delivery-signature.sh +119 -53
  90. package/assets/hooks/git-guard-delivery.sh +223 -183
  91. package/assets/hooks/git-guard-main.sh +38 -34
  92. package/assets/hooks/git-guard-push-tests.sh +99 -87
  93. package/assets/hooks/glossary-load.sh +23 -22
  94. package/assets/hooks/grill-gate-ask.sh +12 -11
  95. package/assets/hooks/grill-gate.sh +94 -87
  96. package/assets/hooks/guard-note.sh +20 -19
  97. package/assets/hooks/handoff-entry-guard.sh +45 -25
  98. package/assets/hooks/handoff-write.sh +74 -67
  99. package/assets/hooks/hook-input.sh +67 -58
  100. package/assets/hooks/lint-after-edit.sh +95 -61
  101. package/assets/hooks/observe.sh +28 -26
  102. package/assets/hooks/override-write-guard.sh +23 -21
  103. package/assets/hooks/postmortem-guard.sh +42 -39
  104. package/assets/hooks/profile-check.sh +22 -20
  105. package/assets/hooks/proposal-guard.sh +57 -49
  106. package/assets/hooks/prose-style-guard.sh +49 -24
  107. package/assets/hooks/qa-dataid-guard.sh +83 -58
  108. package/assets/hooks/rerun-guard.sh +31 -30
  109. package/assets/hooks/reuse-first-guard.sh +108 -87
  110. package/assets/hooks/roles.sh +14 -14
  111. package/assets/hooks/rule-article.sh +39 -34
  112. package/assets/hooks/rule-source-guard.sh +47 -42
  113. package/assets/hooks/skill-gate-layers.sh +63 -57
  114. package/assets/hooks/skill-gate-rearm.sh +15 -8
  115. package/assets/hooks/skill-gate.sh +89 -81
  116. package/assets/hooks/skill-loaded.sh +10 -6
  117. package/assets/hooks/sql-guard-parse.sh +71 -66
  118. package/assets/hooks/sql-guard-request.sh +51 -46
  119. package/assets/hooks/sql-guard-target.sh +60 -51
  120. package/assets/hooks/sql-guard-write.sh +87 -79
  121. package/assets/hooks/sql-guard.sh +52 -47
  122. package/assets/hooks/stand-login-guard.sh +43 -37
  123. package/assets/hooks/task-context-load.sh +60 -55
  124. package/assets/hooks/task-flow-context.sh +87 -69
  125. package/assets/hooks/task-flow-draft-guard.sh +55 -48
  126. package/assets/hooks/task-flow-guard.sh +67 -64
  127. package/assets/hooks/turn-entry-load.sh +39 -32
  128. package/assets/hooks/turn-exit-guard.sh +260 -204
  129. package/assets/hooks/turn-exit-patterns.sh +63 -0
  130. package/assets/hooks/utf8.sh +14 -11
  131. package/assets/hooks/waiting-turn-guard.sh +104 -94
  132. package/assets/hooks/window-fill-guard.sh +70 -62
  133. package/assets/hooks/work-start-guard.sh +52 -49
  134. package/assets/hooks/write-targets.sh +99 -44
  135. package/assets/laws/autonomous-work.md +29 -27
  136. package/assets/laws/code-structure.md +31 -30
  137. package/assets/laws/delivery.md +170 -137
  138. package/assets/laws/entity-editing.md +52 -50
  139. package/assets/laws/entity-models.md +14 -13
  140. package/assets/laws/frontend-application.md +39 -38
  141. package/assets/laws/lib-imports.md +27 -27
  142. package/assets/laws/lists.md +31 -29
  143. package/assets/laws/navigation.md +37 -37
  144. package/assets/laws/observability.md +41 -40
  145. package/assets/laws/project-documentation.md +106 -99
  146. package/assets/laws/reuse-first.md +31 -29
  147. package/assets/laws/shared-code.md +27 -27
  148. package/assets/laws/verifiability.md +131 -124
  149. package/assets/laws/work-conduct.md +250 -244
  150. package/assets/patterns/admin-lists-screen.md +72 -69
  151. package/assets/patterns/admin-nav-item.md +51 -46
  152. package/assets/patterns/angular-patterns-state.md +32 -31
  153. package/assets/patterns/api-layer-pair.md +33 -31
  154. package/assets/patterns/autonomous-work-run.md +50 -49
  155. package/assets/patterns/browser-verification-measure.md +124 -88
  156. package/assets/patterns/browser-verification-stand.md +169 -157
  157. package/assets/patterns/component-structure-new.md +51 -42
  158. package/assets/patterns/dependencies-upgrade.md +55 -39
  159. package/assets/patterns/doc-style-human.md +55 -37
  160. package/assets/patterns/doc-style-sweep.md +82 -79
  161. package/assets/patterns/doc-style-trace.md +87 -81
  162. package/assets/patterns/doc-style-write.md +130 -122
  163. package/assets/patterns/entity-aside.md +77 -63
  164. package/assets/patterns/entity-models-new.md +37 -37
  165. package/assets/patterns/entity-store.md +33 -33
  166. package/assets/patterns/git-workflow-commit.azure.md +94 -87
  167. package/assets/patterns/git-workflow-commit.github.md +160 -142
  168. package/assets/patterns/git-workflow-commit.gitlab.md +96 -90
  169. package/assets/patterns/git-workflow-docker.md +165 -147
  170. package/assets/patterns/git-workflow-freshness.md +45 -45
  171. package/assets/patterns/git-workflow-merge.md +102 -94
  172. package/assets/patterns/git-workflow-migration.md +54 -52
  173. package/assets/patterns/git-workflow-pr-ready.md +57 -56
  174. package/assets/patterns/git-workflow-pr.azure.md +127 -122
  175. package/assets/patterns/git-workflow-pr.github.md +186 -177
  176. package/assets/patterns/git-workflow-pr.gitlab.md +139 -132
  177. package/assets/patterns/git-workflow-restart.md +35 -31
  178. package/assets/patterns/git-workflow-secrets.md +80 -73
  179. package/assets/patterns/git-workflow-stack.md +136 -107
  180. package/assets/patterns/lib-layers-move.md +62 -53
  181. package/assets/patterns/lib-layers-new.md +59 -45
  182. package/assets/patterns/observability-record.md +72 -67
  183. package/assets/patterns/platform-access-di.md +31 -29
  184. package/assets/patterns/reuse-first-extend.md +66 -61
  185. package/assets/patterns/shared-code-new.md +39 -38
  186. package/assets/patterns/spec-driven-domain.md +161 -151
  187. package/assets/patterns/spec-driven-rule.md +179 -168
  188. package/assets/patterns/spec-driven-sweep.md +41 -39
  189. package/assets/patterns/status-report-table.github.md +48 -36
  190. package/assets/patterns/styling-bem-component.md +42 -42
  191. package/assets/patterns/styling-bem-layout.md +39 -34
  192. package/assets/patterns/styling-bem-sheet.md +59 -58
  193. package/assets/patterns/task-flow-archive.md +222 -215
  194. package/assets/patterns/task-flow-close.md +234 -203
  195. package/assets/patterns/task-flow-handoff.md +154 -145
  196. package/assets/patterns/task-flow-resume.md +138 -133
  197. package/assets/patterns/task-flow-start.md +228 -202
  198. package/assets/patterns/testing-e2e.md +102 -101
  199. package/assets/patterns/testing-unit.md +77 -70
  200. package/assets/patterns/ts-procedure.md +32 -29
  201. package/assets/patterns/turn-entry-map.md +50 -48
  202. package/assets/pitfalls/agent-kit.md +172 -142
  203. package/assets/pitfalls/doc-style.md +96 -91
  204. package/assets/pitfalls/git-workflow.azure.md +49 -46
  205. package/assets/pitfalls/git-workflow.github.md +270 -234
  206. package/assets/pitfalls/git-workflow.gitlab.md +49 -45
  207. package/assets/pitfalls/spec-driven.md +73 -71
  208. package/assets/pitfalls/styling-bem.md +46 -40
  209. package/assets/pitfalls/task-flow.md +262 -246
  210. package/assets/pitfalls/testing.md +99 -92
  211. package/assets/pitfalls/turn-conduct.md +96 -81
  212. package/assets/rules/angular-patterns.md +81 -80
  213. package/assets/rules/api-layer.md +77 -74
  214. package/assets/rules/autonomous-work.md +87 -74
  215. package/assets/rules/browser-verification.md +223 -214
  216. package/assets/rules/component-structure.md +72 -69
  217. package/assets/rules/dependencies.md +74 -67
  218. package/assets/rules/deploy-flow.azure.md +118 -108
  219. package/assets/rules/deploy-flow.github.md +145 -135
  220. package/assets/rules/deploy-flow.gitlab.md +120 -110
  221. package/assets/rules/doc-style.md +201 -173
  222. package/assets/rules/entity-conventions.needs-admin.md +81 -79
  223. package/assets/rules/entity-models.md +73 -70
  224. package/assets/rules/git-workflow.azure.md +224 -228
  225. package/assets/rules/git-workflow.github.md +268 -239
  226. package/assets/rules/git-workflow.gitlab.md +218 -217
  227. package/assets/rules/lib-layers.md +85 -86
  228. package/assets/rules/lists.md +101 -97
  229. package/assets/rules/navigation.md +78 -78
  230. package/assets/rules/observability.needs-app.md +165 -153
  231. package/assets/rules/platform-access.md +76 -75
  232. package/assets/rules/reuse-first.md +153 -143
  233. package/assets/rules/shared-code.md +82 -79
  234. package/assets/rules/spec-driven.md +279 -260
  235. package/assets/rules/status-report.md +62 -58
  236. package/assets/rules/styling-bem.md +81 -77
  237. package/assets/rules/task-flow.md +303 -270
  238. package/assets/rules/testing.md +224 -209
  239. package/assets/rules/turn-conduct.md +262 -258
  240. package/assets/rules/turn-entry.md +92 -87
  241. package/assets/rules/typescript-conventions.md +94 -88
  242. package/assets/samples/specs/_template/spec.md +47 -47
  243. package/assets/samples/tasks/_template/grill.md +20 -20
  244. package/assets/samples/tasks/_template/plan.md +32 -30
  245. package/assets/samples/tasks/_template/progress.md +16 -16
  246. package/assets/skills/agent-kit-extend.md +129 -113
  247. package/assets/skills/agent-kit.md +259 -233
  248. package/assets/skills/write-a-skill.md +76 -71
  249. package/assets/templates/findings.md +19 -19
  250. package/assets/templates/gate-map.sh +16 -14
  251. package/assets/templates/implementation.md +28 -27
  252. package/assets/templates/pattern.md +17 -17
  253. package/assets/templates/pitfalls.md +6 -6
  254. package/assets/templates/postmortem.md +24 -23
  255. package/assets/templates/project.sh +24 -24
  256. package/assets/templates/proposal.md +62 -60
  257. package/assets/templates/rule.md +38 -38
  258. package/assets/workflows/feature.js +46 -46
  259. package/assets/workflows/plan.js +54 -54
  260. package/bin/agent-kit.d.ts.map +1 -1
  261. package/bin/agent-kit.js +8 -1
  262. package/bin/agent-kit.js.map +1 -1
  263. package/lib/cargo-prose.d.ts +41 -0
  264. package/lib/cargo-prose.d.ts.map +1 -0
  265. package/lib/cargo-prose.js +88 -0
  266. package/lib/cargo-prose.js.map +1 -0
  267. package/lib/cargo.d.ts +12 -1
  268. package/lib/cargo.d.ts.map +1 -1
  269. package/lib/cargo.js +8 -2
  270. package/lib/cargo.js.map +1 -1
  271. package/lib/catalog.d.ts +2 -0
  272. package/lib/catalog.d.ts.map +1 -1
  273. package/lib/catalog.js +4 -3
  274. package/lib/catalog.js.map +1 -1
  275. package/lib/commands.d.ts.map +1 -1
  276. package/lib/commands.js +5 -2
  277. package/lib/commands.js.map +1 -1
  278. package/lib/companion.js +3 -2
  279. package/lib/companion.js.map +1 -1
  280. package/lib/enroll.d.ts +7 -1
  281. package/lib/enroll.d.ts.map +1 -1
  282. package/lib/enroll.js +12 -3
  283. package/lib/enroll.js.map +1 -1
  284. package/lib/fate.d.ts +29 -0
  285. package/lib/fate.d.ts.map +1 -0
  286. package/lib/fate.js +147 -0
  287. package/lib/fate.js.map +1 -0
  288. package/lib/override-marks.d.ts +7 -0
  289. package/lib/override-marks.d.ts.map +1 -1
  290. package/lib/override-marks.js +14 -0
  291. package/lib/override-marks.js.map +1 -1
  292. package/lib/plan.d.ts +11 -0
  293. package/lib/plan.d.ts.map +1 -1
  294. package/lib/plan.js +10 -1
  295. package/lib/plan.js.map +1 -1
  296. package/lib/ship.d.ts +29 -9
  297. package/lib/ship.d.ts.map +1 -1
  298. package/lib/ship.js +44 -2
  299. package/lib/ship.js.map +1 -1
  300. package/lib/shipment.d.ts.map +1 -1
  301. package/lib/shipment.fixture.d.ts +8 -1
  302. package/lib/shipment.fixture.d.ts.map +1 -1
  303. package/lib/shipment.fixture.js +9 -0
  304. package/lib/shipment.fixture.js.map +1 -1
  305. package/lib/shipment.js +38 -5
  306. package/lib/shipment.js.map +1 -1
  307. package/lib/sync.d.ts.map +1 -1
  308. package/lib/sync.js +45 -11
  309. package/lib/sync.js.map +1 -1
  310. package/package.json +1 -1
  311. package/rt-tools-agent-kit-0.27.0.tgz +0 -0
  312. package/rt-tools-agent-kit-0.24.0.tgz +0 -0
@@ -1,30 +1,29 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Сверка того, что раздел состояния называет следующее движение.
3
+ * The check that the section of a state names the next move.
4
4
  *
5
- * Раздел, обрывающийся на последнем приёме, читается как конец работы: исполнитель
6
- * доводит обязательное действие до конца, дочитывает раздел, следующего движения в
7
- * нём не находит — и отдаёт ход отчётом о сделанном. Так кончились два хода: один
8
- * на записанном замысле, второй на закрытом разборе просьбы. Сверка состояний этого
9
- * не видит: она сравнивает имена разделов с перечнем и внутрь не смотрит.
5
+ * A section breaking off at the last step reads as the end of the work: the executor brings the
6
+ * mandatory action to the end, reads the section through, finds no next move in it — and hands the
7
+ * turn over with a report of what was done. Two turns ended that way: one on a written plan, the
8
+ * second on a closed grill. The check of the states does not see this: it compares the names of the
9
+ * sections with the list and does not look inside.
10
10
  *
11
- * Читаются четыре текста:
12
- * перечень — таблица состояний в правиле ведения работы: имя и ведущий паттерн;
13
- * разделы — заголовки вида «Состояние `имя`» в этих паттернах;
14
- * правило — оно же: в нём стоит утверждение о границе состояния;
15
- * карта и закон — там же стоит то же утверждение, если дерево их разложило.
11
+ * Four texts are read:
12
+ * the list — the table of states in the rule of work conduct: the name and the leading pattern;
13
+ * the sections — headings of the form «State `name`» or «Состояние `имя`» in those patterns;
14
+ * the rule — the same one: the statement about the boundary of a state stands in it;
15
+ * the map and the law — the same statement stands there, if the tree has laid them out.
16
16
  *
17
- * Строка следующего движения узнаётся по зачину, а называет своё: единая дословная
18
- * строка читается как шаблон и перестаёт замечаться на третьем разделе. Поэтому
19
- * повтор хвоста считается расхождением наравне с его отсутствием.
17
+ * The line of the next move is recognised by its opening and names its own: one word-for-word line
18
+ * reads as a template and stops being noticed by the third section. That is why a repeated tail
19
+ * counts as a discrepancy on a par with its absence.
20
20
  *
21
- * FAIL-OPEN: правила ведения работы в дереве нет — сверять нечего, нулевой код.
22
- * Пустая таблица состояний отказом считается: она означает не «нечего сверять», а
23
- * «перечень сломан». Ведущий паттерн, которого в дереве нет, здесь не судится — его
24
- * называет сверка состояний, и два отказа об одном промахе читаются как две
25
- * претензии.
21
+ * FAIL-OPEN: there is no rule of work conduct in the tree — nothing to check, a zero code. An empty
22
+ * table of states counts as a refusal: it means not «there is nothing to check» but «the list is
23
+ * broken». A leading pattern that is not in the tree is not judged here — it is named by the check
24
+ * of the states, and two refusals about one miss read as two claims.
26
25
  *
27
- * Ненулевой код возврата и перечень расхождений.
26
+ * A non-zero exit code and the list of discrepancies.
28
27
  */
29
28
  import { existsSync, readFileSync } from 'node:fs';
30
29
  import { join } from 'node:path';
@@ -32,26 +31,39 @@ import { join } from 'node:path';
32
31
  const ROOT = process.cwd();
33
32
  const RULE = join(ROOT, '.claude/skills/task-flow/SKILL.md');
34
33
  /**
35
- * Правило хода захода: граница состояния живёт там, а не в правиле ведения работы.
36
- * Разделились они, когда правило ведения работы вышло за предел длины: ход работы
37
- * остался в одном, выходы хода уехали в другое. Дерево, где разложено только первое,
38
- * судится по нему одному — второго файла у него нет.
34
+ * The rule of the conduct of a turn: the boundary of a state lives there, not in the rule of work
35
+ * conduct. They split apart when the rule of work conduct went past the length limit: the course of
36
+ * the work stayed in one, the exits of a turn moved into the other. A tree where only the first is
37
+ * laid out is judged by it alone — it has no second file.
39
38
  */
40
39
  const TURN_RULE = join(ROOT, '.claude/skills/turn-conduct/SKILL.md');
41
40
  const SKILLS = join(ROOT, '.claude/skills');
42
41
  const MAP = join(ROOT, '.claude/rt-kit/defaults/turn-map.md');
43
42
  const LAW = join(ROOT, 'docs/constitution/work-conduct.md');
44
43
 
45
- /** Зачин строки: по нему её находят, а хвост у каждого раздела свой. */
46
- const MARKER = '**Следующее движение:**';
44
+ /**
45
+ * The opening of the line: by it the line is found, while the tail of every section is its own.
46
+ * There are two names: the English one is brought by the package, the Russian one is held by a
47
+ * pattern of the tree that is not translated yet.
48
+ */
49
+ const MARKERS = ['**Next move:**', '**Следующее движение:**'];
50
+ const MARKER = MARKERS[0];
51
+ const markerOf = (line) => MARKERS.find((one) => line.startsWith(one));
47
52
 
48
- /** Утверждение о границе состояния. Стоит в правиле, в карте и в законе теми же словами. */
49
- const BOUNDARY = 'Переход из состояния в состояние';
53
+ /** The statement about the boundary of a state. Stands in the rule, the map and the law in the same words. */
54
+ /**
55
+ * The line about the boundary of a state. There are two names: the English one is brought by the
56
+ * package, the Russian one is held by the rule, the map and the law of the tree, which are not
57
+ * translated yet. Either of the two is enough.
58
+ */
59
+ const BOUNDARIES = ['A transition from state to state', 'Переход из состояния в состояние'];
60
+ const BOUNDARY = BOUNDARIES[0];
61
+ const hasBoundary = (text) => BOUNDARIES.some((one) => text.includes(one));
50
62
 
51
- /** Короче этого хвост движения не называет: зачин без движения — та же пустота. */
63
+ /** Shorter than this the tail names no move: an opening without a move is the same emptiness. */
52
64
  const MIN_TAIL = 20;
53
65
 
54
- /** Имя состояния и паттерн, который его ведёт, — из таблицы правила. */
66
+ /** The name of the state and the pattern that leads it — from the table of the rule. */
55
67
  function statesFromRule(text) {
56
68
  const states = [];
57
69
 
@@ -80,7 +92,7 @@ function statesFromRule(text) {
80
92
  return states;
81
93
  }
82
94
 
83
- /** Разделы состояний паттерна: имя, заголовок целиком и найденные в разделе строки движения. */
95
+ /** The state sections of a pattern: the name, the whole heading and the move lines found in the section. */
84
96
  function sectionsOf(pattern) {
85
97
  const file = join(SKILLS, pattern, 'SKILL.md');
86
98
 
@@ -92,7 +104,7 @@ function sectionsOf(pattern) {
92
104
  let current = null;
93
105
 
94
106
  for (const line of readFileSync(file, 'utf8').split('\n')) {
95
- const heading = line.match(/^#+\s+Состояние\s+`([^`]+)`/);
107
+ const heading = line.match(/^#+\s+(?:State|Состояние)\s+`([^`]+)`/);
96
108
 
97
109
  if (heading) {
98
110
  current = { name: heading[1], heading: line.replace(/^#+\s+/, ''), moves: [] };
@@ -100,8 +112,10 @@ function sectionsOf(pattern) {
100
112
  continue;
101
113
  }
102
114
 
103
- if (current && line.startsWith(MARKER)) {
104
- current.moves.push(line.slice(MARKER.length).trim());
115
+ const marker = current ? markerOf(line) : undefined;
116
+
117
+ if (marker) {
118
+ current.moves.push(line.slice(marker.length).trim());
105
119
  }
106
120
  }
107
121
 
@@ -109,7 +123,7 @@ function sectionsOf(pattern) {
109
123
  }
110
124
 
111
125
  if (!existsSync(RULE)) {
112
- console.log('check-state-next: правила ведения работы в дереве нет — сверять нечего');
126
+ console.log('check-state-next: the tree has no rule of work conduct — there is nothing to check');
113
127
  process.exit(0);
114
128
  }
115
129
 
@@ -117,7 +131,7 @@ const ruleText = readFileSync(RULE, 'utf8');
117
131
  const states = statesFromRule(ruleText);
118
132
 
119
133
  if (states.length === 0) {
120
- console.error('check-state-next: в правиле ведения работы не нашлось таблицы состояний');
134
+ console.error('check-state-next: the rule of work conduct carries no table of states');
121
135
  process.exit(1);
122
136
  }
123
137
 
@@ -140,63 +154,63 @@ for (const [pattern, sections] of patterns) {
140
154
  for (const section of sections) {
141
155
  counted += 1;
142
156
 
143
- const where = `\`${section.name}\` в паттерне \`${pattern}\``;
157
+ const where = `\`${section.name}\` in the pattern \`${pattern}\``;
144
158
 
145
159
  if (section.moves.length === 0) {
146
- problems.push(`${where}: в разделе «${section.heading}» нет строки «${MARKER}»`);
160
+ problems.push(`${where}: the section «${section.heading}» carries neither the line «${MARKER}» nor «${MARKERS[1]}»`);
147
161
  continue;
148
162
  }
149
163
 
150
164
  if (section.moves.length > 1) {
151
- problems.push(`${where}: в разделе «${section.heading}» таких строк ${section.moves.length}, а движение одно`);
165
+ problems.push(`${where}: the section «${section.heading}» carries ${section.moves.length} such lines, and the move is one`);
152
166
  continue;
153
167
  }
154
168
 
155
169
  const tail = section.moves[0];
156
170
 
157
171
  if (tail.length < MIN_TAIL) {
158
- problems.push(`${where}: зачин есть, а движение за ним не названо`);
172
+ problems.push(`${where}: the opening is there, and no move is named after it`);
159
173
  continue;
160
174
  }
161
175
 
162
176
  const twin = tails.get(tail);
163
177
 
164
178
  if (twin) {
165
- problems.push(`${where}: движение слово в слово то же, что у ${twin}`);
179
+ problems.push(`${where}: the move is word for word the same as at ${twin}`);
166
180
  continue;
167
181
  }
168
182
 
169
- tails.set(tail, `\`${section.name}\` в паттерне \`${pattern}\``);
183
+ tails.set(tail, `\`${section.name}\` in the pattern \`${pattern}\``);
170
184
  }
171
185
  }
172
186
 
173
187
  if (counted === 0) {
174
- problems.push('ни одного раздела состояния не нашлось: паттерны не разложены или заголовки в них другие');
188
+ problems.push('not a single state section was found: the patterns are not laid out or their headings are different');
175
189
  }
176
190
 
177
191
  const turnText = existsSync(TURN_RULE) ? readFileSync(TURN_RULE, 'utf8') : '';
178
- if (!ruleText.includes(BOUNDARY) && !turnText.includes(BOUNDARY)) {
179
- problems.push(`правило хода захода о границе состояния молчит: строки «${BOUNDARY}» в нём нет`);
192
+ if (!hasBoundary(ruleText) && !hasBoundary(turnText)) {
193
+ problems.push(`the rule of turn conduct says nothing about the boundary of a state: it carries no line «${BOUNDARY}»`);
180
194
  }
181
195
 
182
196
  for (const [file, what] of [
183
- [MAP, 'карта хода'],
184
- [LAW, 'закон о ведении работы'],
197
+ [MAP, 'the turn map'],
198
+ [LAW, 'the law on work conduct'],
185
199
  ]) {
186
- if (existsSync(file) && !readFileSync(file, 'utf8').includes(BOUNDARY)) {
187
- problems.push(`${what} о границе состояния молчит: строки «${BOUNDARY}» в ней нет`);
200
+ if (existsSync(file) && !hasBoundary(readFileSync(file, 'utf8'))) {
201
+ problems.push(`${what} says nothing about the boundary of a state: it carries no line «${BOUNDARY}»`);
188
202
  }
189
203
  }
190
204
 
191
205
  if (problems.length > 0) {
192
- console.error(`check-state-next: расхождений ${problems.length}`);
206
+ console.error(`check-state-next: divergences ${problems.length}`);
193
207
 
194
208
  for (const problem of problems) {
195
209
  console.error(` ${problem}`);
196
210
  }
197
211
 
198
- console.error('\nСтрока следующего движения стоит в каждом разделе состояния: зачин общий, движение своё.');
212
+ console.error('\nThe line of the next move stands in every state section: the opening is shared, the move is its own.');
199
213
  process.exit(1);
200
214
  }
201
215
 
202
- console.log(`check-state-next: разделов состояния ${counted}, у каждого названо следующее движение`);
216
+ console.log(`check-state-next: state sections ${counted}, each names its next move`);
@@ -1,30 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Сверка перечня состояний работы с разделами паттернов, которые их ведут.
3
+ * The audit of the list of work states against the pattern sections that lead them.
4
4
  *
5
- * Состояние без ведущего текста читается как конец работы: исполнитель дочитывает
6
- * паттерн до последнего раздела, следующего движения в нём нет, и ход кончается
7
- * отчётом. Так простояло состояние «замысел записан» — оно встречалось один раз,
8
- * клеткой таблицы, и дыру нашло происшествие, а не проверка. Разбор —
9
- * запись «2026-08-21-turn-ended-at-the-written-plan» в приёме.
5
+ * A state without a leading text reads as the end of the work: the executor reads the
6
+ * pattern down to the last section, there is no next motion in it, and the turn ends
7
+ * with a report. That is how the state "the plan is written" stood — it occurred once,
8
+ * as a table cell, and the hole was found by an incident, not by a check. The analysis
9
+ * is the record "2026-08-21-turn-ended-at-the-written-plan" in the intake.
10
10
  *
11
- * Сверяются два множества в обе стороны:
12
- * перечень — таблица состояний в правиле ведения работы: имя и ведущий паттерн;
13
- * разделы — заголовки вида «Состояние `имя`» в паттернах.
11
+ * Two sets are checked against each other in both directions:
12
+ * the list — the table of states in the work-conduct rule: the name and the leading pattern;
13
+ * sections — headings of the form "State `name`", in English or in the Russian wording: the
14
+ * English name is carried by the package, the Russian one is held by a tree
15
+ * pattern that has not been translated yet.
14
16
  *
15
- * Состояние без раздела — расхождение. Раздел про состояние вне перечня — тоже:
16
- * переименованное состояние иначе оставляет прежний раздел, и тот выглядит
17
- * действующим.
17
+ * A state without a section is a discrepancy. A section about a state outside the list
18
+ * is one too: otherwise a renamed state leaves its former section behind, and that one
19
+ * looks current.
18
20
  *
19
- * Ведущий паттерн берётся из самой таблицы, а не из имён файлов: раздел, лежащий
20
- * не в том паттерне, который назначен, читателя до себя не доводит — он открывает
21
- * назначенный.
21
+ * The leading pattern is taken from the table itself, not from file names: a section
22
+ * lying in a pattern other than the assigned one does not bring the reader to itself —
23
+ * the reader opens the assigned one.
22
24
  *
23
- * FAIL-OPEN: правила ведения работы в дереве нет — сверять нечего, нулевой код.
24
- * Пустая таблица состояний отказом считается: она означает не «нечего сверять», а
25
- * «перечень сломан».
25
+ * FAIL-OPEN: there is no work-conduct rule in the tree — nothing to check, zero code.
26
+ * An empty table of states counts as a refusal: it means not "nothing to check" but
27
+ * "the list is broken".
26
28
  *
27
- * Ненулевой код возврата и перечень расхождений.
29
+ * A non-zero exit code and the list of discrepancies.
28
30
  */
29
31
  import { existsSync, readFileSync } from 'node:fs';
30
32
  import { join } from 'node:path';
@@ -33,7 +35,7 @@ const ROOT = process.cwd();
33
35
  const RULE = join(ROOT, '.claude/skills/task-flow/SKILL.md');
34
36
  const SKILLS = join(ROOT, '.claude/skills');
35
37
 
36
- /** Имя состояния и паттерн, который его ведёт, — из таблицы правила. */
38
+ /** The state name and the pattern that leads it — from the table of the rule. */
37
39
  function statesFromRule(text) {
38
40
  const states = [];
39
41
 
@@ -62,7 +64,7 @@ function statesFromRule(text) {
62
64
  return states;
63
65
  }
64
66
 
65
- /** Состояния, про которые в паттерне есть раздел. Заголовок любого уровня. */
67
+ /** The states a pattern has a section about. A heading of any level. */
66
68
  function sectionsOf(pattern) {
67
69
  const file = join(SKILLS, pattern, 'SKILL.md');
68
70
 
@@ -73,7 +75,7 @@ function sectionsOf(pattern) {
73
75
  const found = new Set();
74
76
 
75
77
  for (const line of readFileSync(file, 'utf8').split('\n')) {
76
- const heading = line.match(/^#+\s+Состояние\s+`([^`]+)`/);
78
+ const heading = line.match(/^#+\s+(?:State|Состояние)\s+`([^`]+)`/);
77
79
 
78
80
  if (heading) {
79
81
  found.add(heading[1]);
@@ -84,14 +86,14 @@ function sectionsOf(pattern) {
84
86
  }
85
87
 
86
88
  if (!existsSync(RULE)) {
87
- console.log('check-states: правила ведения работы в дереве нет — сверять нечего');
89
+ console.log('check-states: the tree has no rule of work conduct — there is nothing to check');
88
90
  process.exit(0);
89
91
  }
90
92
 
91
93
  const states = statesFromRule(readFileSync(RULE, 'utf8'));
92
94
 
93
95
  if (states.length === 0) {
94
- console.error('check-states: в правиле ведения работы не нашлось таблицы состояний');
96
+ console.error('check-states: the rule of work conduct carries no table of states');
95
97
  process.exit(1);
96
98
  }
97
99
 
@@ -107,12 +109,12 @@ for (const state of states) {
107
109
  const sections = seen.get(state.pattern);
108
110
 
109
111
  if (sections === null) {
110
- problems.push(`состояние \`${state.name}\`: ведущий паттерн \`${state.pattern}\` в дереве не разложен`);
112
+ problems.push(`the state \`${state.name}\`: the leading pattern \`${state.pattern}\` is not laid out in the tree`);
111
113
  continue;
112
114
  }
113
115
 
114
116
  if (!sections.has(state.name)) {
115
- problems.push(`состояние \`${state.name}\`: в паттерне \`${state.pattern}\` нет раздела «Состояние \`${state.name}\`»`);
117
+ problems.push(`the state \`${state.name}\`: the pattern \`${state.pattern}\` carries neither the section «State \`${state.name}\`» nor «Состояние \`${state.name}\`»`);
116
118
  }
117
119
  }
118
120
 
@@ -123,20 +125,20 @@ for (const [pattern, sections] of seen) {
123
125
 
124
126
  for (const name of sections) {
125
127
  if (!known.has(name)) {
126
- problems.push(`паттерн \`${pattern}\`: раздел про \`${name}\`, а такого состояния в перечне нет`);
128
+ problems.push(`the pattern \`${pattern}\`: a section about \`${name}\`, and there is no such state in the list`);
127
129
  }
128
130
  }
129
131
  }
130
132
 
131
133
  if (problems.length > 0) {
132
- console.error(`check-states: расхождений ${problems.length}`);
134
+ console.error(`check-states: divergences ${problems.length}`);
133
135
 
134
136
  for (const problem of problems) {
135
137
  console.error(` ${problem}`);
136
138
  }
137
139
 
138
- console.error('\nПеречень состояний — правило `task-flow`, разделы — паттерны при нём.');
140
+ console.error('\nThe list of states is the rule `task-flow`, the sections are the patterns next to it.');
139
141
  process.exit(1);
140
142
  }
141
143
 
142
- console.log(`check-states: состояний ${states.length}, у каждого есть раздел в ведущем паттерне`);
144
+ console.log(`check-states: states ${states.length}, each has a section in its leading pattern`);
@@ -1,33 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Проверка того, что класс элемента BEM подкреплён правилом.
3
+ * The check that a BEM element class is backed by a rule.
4
4
  *
5
- * Класс без правила заводится молча: раскладка переезжает из файла экрана в
6
- * общий слой, а `rtElem` остаётся в шаблоне и больше ничему не соответствует.
7
- * Ни линт, ни сборка, ни браузер этого не показывают — лишний класс просто
8
- * ничего не делает, и разметка обрастает именами, за которыми ничего нет.
5
+ * A class without a rule appears silently: the layout moves from the screen's file into the
6
+ * shared layer, and `rtElem` stays in the template and corresponds to nothing any more. Neither
7
+ * the linter nor the build nor the browser shows this — a superfluous class simply does nothing,
8
+ * and the markup grows names with nothing behind them.
9
9
  *
10
- * Совпадение считается по имени элемента, а не по паре «блок — элемент»:
11
- * `rtElem` берёт имя блока у ближайшего предка с `rtBlock`, и повторить этот
12
- * разбор по тексту шаблона нечем. Из-за этого проверка пропускает класс, у
13
- * которого правило есть, но у чужого блока, — направление выбрано в сторону
14
- * ложных пропусков, а не ложных отказов.
10
+ * A match is counted by the element name, not by the pair "block — element": `rtElem` takes the
11
+ * block name from the nearest ancestor with `rtBlock`, and there is nothing to repeat that
12
+ * reasoning by over the text of the template. Because of this the check lets through a class that
13
+ * has a rule, but under a different block — the direction is chosen towards false misses rather
14
+ * than false refusals.
15
15
  *
16
- * Объявлением считается и то, что приехало подключённым пакетом: экран,
17
- * собранный из готового, своих объявлений не держит вовсе. Читается ровно тот
18
- * файл, который приложение назвало само, — обход односложный, и каталог
19
- * зависимостей в корни исходников не попадает.
16
+ * What arrived with a connected package counts as a declaration too: a screen assembled from
17
+ * ready-made code keeps no declarations of its own at all. Exactly the file the application named
18
+ * itself is read — the walk is one step deep, and the dependencies directory does not get into
19
+ * the source roots.
20
20
  *
21
- * Динамическое `[rtElem]` не считается: имя там известно только в рантайме.
21
+ * A dynamic `[rtElem]` does not count: the name there is known only at runtime.
22
22
  *
23
- * Накопленное к моменту заведения проверки лежит в tools/styles-allowlist.json
24
- * и отказом не считается: гейт падает на НОВОМ классе без правила, а старое
25
- * остаётся видимым числом в сводке. Строка списка опознаётся по имени класса:
26
- * перечень файлов при нём меняется от каждой правки разметки, и сверенный
27
- * целиком он делал бы прежнюю строку лишней, а тот же самый долг — новым
28
- * расхождением.
23
+ * What had accumulated by the moment the check was started lies in tools/styles-allowlist.json
24
+ * and does not count as a refusal: the gate falls on a NEW class without a rule, while the old
25
+ * stays a visible number in the digest. A line of the list is recognised by the class name: the
26
+ * list of files next to it changes with every edit of the markup, and audited whole it would make
27
+ * the former line superfluous and the very same debt a new divergence.
29
28
  *
30
- * Ненулевой код возврата и перечень расхождений.
29
+ * A non-zero return code and a list of divergences.
31
30
  */
32
31
  import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
33
32
  import { createRequire } from 'node:module';
@@ -40,22 +39,22 @@ const SOURCE_ROOTS = CONFIG.sourceRoots;
40
39
  const SKIPPED_DIRS = CONFIG.skippedDirs;
41
40
 
42
41
  const ELEM_RE = /rtElem="([a-z0-9-]+)"/g;
43
- /** Объявление элемента: и вложенное `&__item`, и полное `.<блок>__item` */
42
+ /** The declaration of an element: both a nested `&__item` and a full `.<block>__item` */
44
43
  const RULE_RE = /__([a-z0-9-]+)/g;
45
- /** Голова вложенности: строка, с которой начинается блок элемента */
44
+ /** The head of the nesting: the line an element block starts with */
46
45
  const HEAD_RE = /^&__([a-z0-9-]+)/;
47
- /** Колено вложенности: `&-<хвост>` внутри блока элемента дописывает имя, а не заводит своё */
46
+ /** A joint of the nesting: `&-<tail>` inside an element block appends to the name instead of starting its own */
48
47
  const TAIL_RE = /^&-([a-z0-9-]+)/;
49
- /** Подключение в файле стилей: `@use` и `@forward` берутся одним разбором */
48
+ /** A connection in a style file: `@use` and `@forward` are taken by one parse */
50
49
  const USE_RE = /@(?:use|forward)\s+['"]([^'"]+)['"]/g;
51
- /** Строка списка известного: имя класса и перечень файлов при нём */
50
+ /** A line of the known list: the class name and the list of files next to it */
52
51
  const KEY_RE = /^elem (\S+) @ (.*)$/;
53
52
 
54
53
  const allowlist = parseAllowlist('styles');
55
54
  const known = allowlist.keys;
56
55
  const debt = new Set(allowlist.debt.keys());
57
56
 
58
- /** Строки списка по имени класса: перечень файлов в ключ входит, но сверяется отдельно */
57
+ /** The lines of the list by class name: the list of files is part of the key but is audited apart */
59
58
  const knownByName = new Map();
60
59
  for (const key of known) {
61
60
  const parsed = KEY_RE.exec(key);
@@ -81,8 +80,9 @@ function collectFiles(dir, extension) {
81
80
  }
82
81
 
83
82
  /**
84
- * Имя пакета и путь внутри него. Относительный и абсолютный спецификаторы пакетом не бывают;
85
- * приставки `pkg:` и `~` снимаются — ими зовут тот же пакет разные сборщики.
83
+ * The package name and the path inside it. A relative and an absolute specifier are never a
84
+ * package; the prefixes `pkg:` and `~` are stripped — different bundlers call the same package by
85
+ * them.
86
86
  */
87
87
  function packageOf(specifier) {
88
88
  const clean = specifier.replace(/^pkg:/, '').replace(/^~/, '');
@@ -99,10 +99,10 @@ function packageOf(specifier) {
99
99
  }
100
100
 
101
101
  /**
102
- * Файл пакета, названный подключением. Каталог ищется разрешением модуля от того места, где
103
- * подключение написано: пакет подпроекта в корне дерева не лежит вовсе, а менеджер вправе
104
- * держать рядом несколько версий сразу. Не нашлось — `null`: дерево без этого пакета получает
105
- * сверку своих объявлений, а не отказ чтения.
102
+ * The file of a package named by a connection. The directory is found by module resolution from
103
+ * the place where the connection is written: a subproject's package does not lie at the tree root
104
+ * at all, and the manager is free to keep several versions side by side. Not found — `null`: a
105
+ * tree without that package gets an audit of its own declarations, not a refusal to read.
106
106
  */
107
107
  function fileOfPackage(from, { name, rest }) {
108
108
  let manifest;
@@ -126,13 +126,13 @@ function fileOfPackage(from, { name, rest }) {
126
126
  }
127
127
 
128
128
  /**
129
- * Имена элементов, объявленных файлом стилей. Имя собирается из вложенности: `&__head { &-icon }`
130
- * объявляет `head-icon`, и колен у него бывает сколько угодно. Читая только то, что стоит после
131
- * `__` целиком, проверка числила долгом исправную вёрстку — правило работает, класс красит, а
132
- * снять его значило бы сломать экран.
129
+ * The names of the elements declared by a style file. The name is assembled from the nesting:
130
+ * `&__head { &-icon }` declares `head-icon`, and it can have any number of joints. Reading only
131
+ * what stands after `__` whole, the check counted sound markup as a debt — the rule works, the
132
+ * class paints, and removing it would mean breaking the screen.
133
133
  *
134
- * Хвост без головы именем не становится: `&-<хвост>`, стоящий вне блока элемента, принадлежит
135
- * чужому селектору, и приписать его было бы выдумыванием объявления.
134
+ * A tail without a head does not become a name: `&-<tail>` standing outside an element block
135
+ * belongs to a different selector, and ascribing it would be inventing a declaration.
136
136
  */
137
137
  function elementNames(text) {
138
138
  const names = new Set();
@@ -167,8 +167,9 @@ function elementNames(text) {
167
167
  }
168
168
 
169
169
  /**
170
- * Объявления из пакетов, подключённых самим приложением. Читается ровно названный файл:
171
- * подключения внутри него не разбираются — объявленным считается то, что приложение назвало.
170
+ * The declarations from the packages connected by the application itself. Exactly the named file
171
+ * is read: the connections inside it are not parsed — what the application named is what counts
172
+ * as declared.
172
173
  */
173
174
  function declarationsFromPackages(styleFiles) {
174
175
  const names = new Set();
@@ -218,7 +219,7 @@ for (const [name, files] of [...usedIn].sort(([first], [second]) => first.locale
218
219
  name,
219
220
  files: new Set(files),
220
221
  key: `elem ${name} @ ${where}`,
221
- text: `rtElem="${name}" — правила нет ни в одном файле стилей: ${where}`,
222
+ text: `rtElem="${name}" — there is no rule in any style file: ${where}`,
222
223
  });
223
224
  }
224
225
 
@@ -228,9 +229,9 @@ if (process.argv.includes('--baseline')) {
228
229
  }
229
230
 
230
231
  /**
231
- * Чем перечень файлов у находки разошёлся со строкой списка: что добавилось и что ушло. Рост —
232
- * расхождение, сокращение — починка; одинаково их читать нельзя, а сверять ключ целиком значило
233
- * бы объявлять тот же долг новым.
232
+ * How the list of files of a finding has diverged from the line of the list: what was added and
233
+ * what went away. Growth is a divergence, shrinking is a repair; they cannot be read alike, and
234
+ * auditing the key whole would mean declaring the very same debt a new one.
234
235
  */
235
236
  function changedFiles(finding, line) {
236
237
  return {
@@ -253,27 +254,27 @@ for (const finding of findings) {
253
254
 
254
255
  const { added, gone } = changedFiles(finding, line);
255
256
  if (added.length > 0) {
256
- problems.push(`elem ${finding.name}: долг разросся — класс появился ещё в ${added.join(', ')}; снять его оттуда`);
257
+ problems.push(`elem ${finding.name}: the debt has grown — the class appeared also in ${added.join(', ')}; remove it from there`);
257
258
  } else if (gone.length > 0) {
258
259
  notes.push(
259
- `elem ${finding.name}: долг сократился — класса больше нет в ${gone.join(', ')}; перечень в строке списка можно поправить`
260
+ `elem ${finding.name}: the debt has shrunk — the class is no longer in ${gone.join(', ')}; the list in the entry can be fixed`
260
261
  );
261
262
  }
262
263
  }
263
264
 
264
265
  for (const key of known) {
265
266
  if (!matchedKeys.has(key)) {
266
- problems.push(`${key}: значится в ${ALLOWLIST}, но класс уже подкреплён правилом — строку убрать`);
267
+ problems.push(`${key}: listed in ${ALLOWLIST}, but the class is already backed by a rule — remove the line`);
267
268
  }
268
269
  }
269
270
 
270
271
  if (problems.length > 0) {
271
- console.error(`check-styles: расхождений ${problems.length}\n`);
272
+ console.error(`check-styles: divergences ${problems.length}\n`);
272
273
  problems.forEach((problem) => console.error(` ${problem}`));
273
274
  process.exit(1);
274
275
  }
275
276
 
276
277
  notes.forEach((note) => console.log(` ${note}`));
277
278
  console.log(
278
- `check-styles: классов без правила ${findings.length}, из них принято ${findings.length - debt.size}, долг ${debt.size} — новых нет`
279
+ `check-styles: classes without a rule ${findings.length}, of them accepted ${findings.length - debt.size}, debt ${debt.size} — no new ones`
279
280
  );