@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
@@ -2,96 +2,93 @@
2
2
  name: status-report
3
3
  kind: rule
4
4
  law: work-conduct
5
- description: Правило под «Закон о ведении работы». Брать, когда владелец спросил, где стоит работа: «какой статус», «что за эпик», «что сейчас делаешь». Называет форму ответа — абзац об эпике и таблицу его задач — и чем клетка о дереве подпирается. Паттерн status-report-table.
5
+ description: Rule under the work-conduct law. Load when the owner asked where the work stands — "what is the status", "which epic", "what are you doing now". Names the shape of the reply — a paragraph about the epic and a table of its tasks — and what backs a cell about the tree. Pattern status-report-table.
6
6
  ---
7
7
 
8
- # Ответ о состоянии работы
8
+ # Status report — how it works here
9
9
 
10
- Правило под закон о ведении работы. Закон говорит, что состояние работы
11
- переживает заход и читается со стороны; здесь — в какой форме оно показывается владельцу,
12
- когда он спросил.
10
+ Rule under the work-conduct law. The law says that the work state outlives the session and is read
11
+ from the outside; here — in what shape it is shown to the owner when they asked.
13
12
 
14
- ## Как это называется здесь
13
+ ## What it is called here
15
14
 
16
- | В законе | Здесь |
17
- | ---------------------------- | ------------------------------------------------------------------- |
18
- | состояние работы | клетка «Состояние» в таблице ответа |
19
- | место, где состояние читают | ответ владельцу и запись хода в папке задачи |
20
- | работа, о которой спросили | абзац об эпике, под ним все его задачи по порядку и заведённые вне |
21
- | отметка о сделанном | номер прогона, номер заявки, число сценариев — а не слово «готово» |
22
- | чем состояние подтверждается | команда, запущенная тем же ходом, что и ответ |
15
+ | In the law | Here |
16
+ | --- | --- |
17
+ | the work state | the "State" cell in the reply table |
18
+ | the place where the state is read | the reply to the owner and the progress entry in the task folder |
19
+ | the work asked about | a paragraph about the epic, under it all its tasks in order and those created outside it |
20
+ | the mark of done work | a run number, a PR number, a count of scenarios — not the word "done" |
21
+ | what backs the state | a command run by the same turn as the reply |
23
22
 
24
- ## Где это лежит
23
+ ## Where it lives
25
24
 
26
- Готовые вызовы и образец заполненной таблицы — в паттерне `status-report-table` рядом. Здесь
27
- сказано, что в ответе обязано быть; чем это спрашивается у хостинга и у дерева — там.
25
+ Ready-made calls and a sample of a filled table — in the pattern `status-report-table` next to it.
26
+ Here is said what the reply must hold; how it is asked from the host and the tree — there.
28
27
 
29
- ## Ход
28
+ ## Flow
30
29
 
31
- Ход одного ответа о состоянии: что спрашивается у дерева до первой строки ответа и в каком
32
- порядке это ложится владельцу.
30
+ The flow of one status reply: what is asked from the tree before the first line of the reply and in
31
+ what order it lands for the owner.
33
32
 
34
33
  ```mermaid
35
34
  flowchart TD
36
- A[Владелец спросил, где работа] --> B[Состояние спрашивается командами: ветка, заявка, прогон, борда]
37
- B --> C{Работа идёт под эпиком}
38
- C -->|Да| D[Из замысла эпика берётся его порядок задач целиком]
39
- C -->|Нет| E[Строка текущей задачи встаёт первой]
40
- D --> F[Строка на каждую задачу эпика: номер по порядку, о чём она, состояние]
35
+ A[The owner asked where the work is] --> B[The state is asked by commands: branch, PR, run, board]
36
+ B --> C{The work runs under an epic}
37
+ C -->|Yes| D[The task order is taken whole from the epic plan]
38
+ C -->|No| E[The row of the current task goes first]
39
+ D --> F[A row per epic task: ordinal number, what it is about, state]
41
40
  F --> E
42
- E --> G[Строка на каждую заведённую вне эпика]
43
- G --> H[Клетка «Состояние» несёт число из вывода команды]
44
- H --> I[Под таблицей — чего ждём от владельца и вызов, которым это снимается]
41
+ E --> G[A row per task created outside the epic]
42
+ G --> H[The State cell carries a number from a command's output]
43
+ H --> I[Under the table — what we wait for from the owner and the call that lifts it]
45
44
  ```
46
45
 
47
- ## Как закон применяется здесь
46
+ ## How the law applies here
48
47
 
49
- - **Состояние работы показывается таблицей, а не прозой.** Пересказ владелец читает целиком,
50
- чтобы найти одну строку, и в следующий раз не читает вовсе.
48
+ - **The work state is shown as a table, not as prose.** A retelling the owner reads whole to find
49
+ one row, and next time does not read at all.
51
50
  <!-- rt-when: ответ владельцу о состоянии работы -->
52
51
 
53
- - **Сам эпик описывается текстом над таблицей, а не строкой в ней.** Колонки заведены под
54
- задачу — номер, предмет, состояние, — и эпик, втиснутый в них, теряет то единственное, ради
55
- чего он назван: зачем он и куда идёт. Абзац говорит это одной-двумя фразами и называет,
56
- сколько в эпике задач и какая идёт сейчас.
52
+ - **The epic itself is described by text above the table, not by a row in it.** The columns are made
53
+ for a task — number, subject, state — and an epic squeezed into them loses the one thing it is
54
+ named for: why it is and where it goes. The paragraph says this in one or two sentences and names
55
+ how many tasks the epic has and which one runs now.
57
56
  <!-- rt-when: ответ владельцу о состоянии работы -->
58
57
 
59
- - **Задачи эпика перечисляются все и в том порядке, в каком их назначил замысел.** Названы
60
- только сделанная и следующая — владелец не видит ни сколько осталось, ни куда идёт работа, а
61
- порядок эпика назначен заранее и держится до конца. У каждой строки — краткое описание,
62
- своими словами и одной фразой: номер задачи о её предмете не говорит ничего.
58
+ - **The epic's tasks are listed all, and in the order the plan assigned them.** With only the done
59
+ and the next one named, the owner sees neither how much is left nor where the work goes, while the
60
+ epic's order is assigned in advance and holds to the end. Each row has a short description, in
61
+ one's own words and one sentence: a task number says nothing about its subject.
63
62
  <!-- rt-when: ответ владельцу о состоянии работы -->
64
63
 
65
- - **Каждая клетка о состоянии дерева подпирается командой, запущенной тем же ходом.**
66
- Утверждение без команды владелец читает как проверенный факт и о расхождении узнаёт
67
- последним. Вывод называется числом — номером прогона, временем, сколько сценариев из
68
- скольких; «всё зелёное» без числа не пишется.
64
+ - **Every cell about the tree's state is backed by a command run by the same turn.** A statement
65
+ without a command the owner reads as a verified fact and learns of a divergence last. The output
66
+ is named by a number — the run number, the time, how many scenarios of how many; "all green"
67
+ without a number is not written.
69
68
  <!-- rt-when: ответ владельцу о состоянии работы -->
70
69
 
71
- - **Прогон подтверждает тот коммит, на котором он запускался.** Прогон старше вершины ветки
72
- говорит о прошлом дереве, а прочитан будет как о нынешнем; вершина сверяется перед тем, как
73
- номер прогона встанет в клетку.
70
+ - **A run confirms the commit it ran on.** A run older than the branch tip speaks of a past tree and
71
+ will be read as of the present one; the tip is checked before the run number goes into the cell.
74
72
  <!-- rt-when: ответ владельцу о состоянии работы -->
75
73
 
76
- - **Заявка черновиком называется вслух вместе с тем, чего ждём.** У черновика слияние
77
- заблокировано хостингом, и зелёная страница владельцу ничего не разрешает; молчание он
78
- читает как поломку.
74
+ - **A draft PR is called a draft aloud, together with what we wait for.** A draft's merge is locked
75
+ by the host, and a green page permits the owner nothing; silence they read as breakage.
79
76
  <!-- rt-when: ответ владельцу о состоянии работы -->
80
77
 
81
- - **Папка задачи, оставшаяся пустым шаблоном, — это «заведена, не начата».** Заведённая задача
82
- с незаполненным разбором читается как работа в ходу и второй раз заводится заново.
78
+ - **A task folder left as an empty template is "created, not started".** A created task with an
79
+ unfilled grill reads as work in progress and gets created a second time.
83
80
  <!-- rt-when: ответ владельцу о состоянии работы -->
84
81
 
85
- - **Под таблицей — не больше двух строк.** Чего ждём от владельца и вызов, которым это
86
- снимается. Остальное владелец спросит сам, и спросит ровно то, что ему нужно.
82
+ - **Under the table — no more than two lines.** What we wait for from the owner and the call that
83
+ lifts it. The rest the owner asks themselves, and asks exactly what they need.
87
84
  <!-- rt-when: ответ владельцу о состоянии работы -->
88
85
 
89
- ## Чего из закона здесь нет
86
+ ## What of the law is not here
90
87
 
91
- Ни одна из договорённостей о форме ответа не проверяется машиной: ответ владельцу в дерево не
92
- ложится, и читать его нечему. Держится это памятью отвечающего, а видно нарушение только
93
- владельцу — по тому, что он ищет в тексте строку и не находит.
88
+ None of the agreements on the shape of the reply is checked by machine: the reply to the owner does
89
+ not land in the tree, and there is nothing to read it. It is held by the memory of whoever replies,
90
+ and a violation is visible only to the owner — by looking for a row in the text and not finding it.
94
91
 
95
- ## Паттерны
92
+ ## Patterns
96
93
 
97
- - `status-report-table` — готовые вызовы для каждой клетки и образец заполненной таблицы.
94
+ - `status-report-table` — ready-made calls for each cell and a sample of a filled table.
@@ -2,118 +2,129 @@
2
2
  name: styling-bem
3
3
  kind: rule
4
4
  law: frontend-application
5
- description: Правило под «Закон о фронтовом приложении». Брать при правке любого *.scss и шаблона компонента. Называет директивы BEM, токены оформления, общий слой раскладки приложения и проверку класса без правила. Готовый код — в паттернах styling-bem-layout и styling-bem-component.
5
+ description: Rule under the frontend-application law. Load when editing any *.scss and a component template. Names the BEM directives, the styling tokens, the shared layout layer of the application and the check for a class without a rule. Ready-made code in patterns styling-bem-layout and -component.
6
6
  ---
7
7
 
8
- # Оформление — как это устроено здесь
8
+ # Styling — how it works here
9
9
 
10
- Правило под закон `docs/constitution/frontend-application.md`. Закон говорит, что должно быть
11
- верно; здесь — чем это названо в этом дереве и где лежит. Раскладка файла компонента —
12
- `component-structure`, состояние — `angular-patterns`, окружение браузера —
13
- `platform-access`, слой обращения к серверу — `api-layer`. Все пять под одним законом.
10
+ Rule under the law `docs/constitution/frontend-application.md`. The law says what must be true;
11
+ here — what it is called in this tree and where it lives. The layout of a component file —
12
+ `component-structure`, state — `angular-patterns`, the browser environment — `platform-access`,
13
+ the layer of calls to the server — `api-layer`. All five under one law.
14
14
 
15
- **Холодная часть:** `pitfalls.md` рядом — ловушки, грабли, на которые уже наступали.
16
- Грузится по требованию, а не вместе с правилом.
15
+ **Cold part:** `pitfalls.md` next to it — traps already stepped on. Loaded on demand, not
16
+ together with the rule.
17
17
 
18
- ## Как это называется здесь
18
+ ## What it is called here
19
19
 
20
- | В законе | Здесь |
21
- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
22
- | общий набор значений оформления | шкалы кита `--rt-*`; своё поверх них — `--<префикс>-*` в `styles.scss` приложения |
23
- | класс в разметке | директивы `rtBlock` и `rtElem` из `@rt-tools`, а не строка в атрибуте |
24
- | правило стилей | объявление `&__<элемент>` в `.scss` — своём или в общем слое приложения |
25
- | общий слой раскладки | `apps/<app>/src/styles/`: `<префикс>-page`, `<префикс>-form`, `<префикс>-panel`, `<префикс>-window` у админки, `<префикс>-site-page` у сайта |
20
+ | In the law | Here |
21
+ | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
22
+ | the shared set of styling values | the kit scales `--rt-*`; one's own on top of them — `--<prefix>-*` in the application's `styles.scss` |
23
+ | a class in the markup | the `rtBlock` and `rtElem` directives from `@rt-tools`, not a string in an attribute |
24
+ | a style rule | an `&__<element>` declaration in `.scss` — its own or in the application's shared layer |
25
+ | the shared layout layer | `apps/<app>/src/styles/`: `<prefix>-page`, `<prefix>-form`, `<prefix>-panel`, `<prefix>-window` in the admin, `<prefix>-site-page` on the site |
26
26
 
27
- ## Где это лежит
27
+ ## Where it lives
28
28
 
29
- В этом дереве — таблица в `implementation.md` рядом. Пути живут там, а не здесь: правило
30
- переносится между репозиториями, раскладка — нет, и путь, названный в правиле, врёт в первом
31
- же дереве, которое держит код иначе.
29
+ In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
30
+ travels between repositories, the layout does not, and a path named in the rule lies in the
31
+ first tree that keeps its code differently.
32
32
 
33
- ## Ход
33
+ ## Flow
34
34
 
35
- Ход правки оформления: откуда берётся значение, где живёт раскладка и чем открывается
36
- всплывающее.
35
+ The flow of a styling edit: where a value comes from, where the layout lives and what opens an
36
+ overlay.
37
37
 
38
38
  ```mermaid
39
39
  flowchart TD
40
- A[Правится оформление] --> B{Что задаётся}
41
- B -->|Цвет, отступ, кегль| C[Берётся токеном оформления, а не пишется значением на месте]
42
- B -->|Раскладка экрана| D[Объявляется в общем слое приложения, а не в стилях экрана]
43
- B -->|Слой поверх страницы| E[Открывается службой набора; номер слоя берётся из шкалы]
44
- C --> F[Класс ставится директивой, и у каждого класса элемента есть своё правило]
40
+ A[Styling is edited] --> B{What is being set}
41
+ B -->|Colour, spacing, font size| C[Taken as a styling token, not written as a value in place]
42
+ B -->|Screen layout| D[Declared in the application's shared layer, not in the screen's styles]
43
+ B -->|A layer above the page| E[Opened by the kit service; the layer number is taken from the scale]
44
+ C --> F[The class is set by a directive, and every element class has its own rule]
45
45
  D --> F
46
46
  E --> F
47
- F --> G{Размер элемента управления}
48
- G -->|Выбирается по признаку указателя, а не по ширине экрана| H[Файл стилей держится в пределах длины]
49
- H --> I[Прогон линтера стилей: предупреждение роняет его наравне с ошибкой]
47
+ F --> G{The size of a control}
48
+ G -->|Chosen by the pointer sign, not by the screen width| H[The styles file stays within the length limit]
49
+ H --> I[The stylelint run: a warning fails it the same as an error]
50
50
  ```
51
51
 
52
- ## Как закон применяется здесь
52
+ ## How the law applies here
53
53
 
54
- - **Оформление берётся токеном `--rt-*`, а не пишется значением на месте.** Составные
55
- значения — `box-shadow`, `text-shadow` — берутся готовым токеном целиком, а не собираются
56
- из частей.
54
+ - **Styling is taken as a `--rt-*` token, not written as a value in place.** Composite values —
55
+ `box-shadow`, `text-shadow` — are taken as a ready-made token whole, not assembled from parts.
57
56
  <!-- rt-when: *.scss *.css -->
58
57
 
59
- - **У каждого класса элемента есть своё правило стилей.** Класс без правила выглядит рабочим
60
- и молча ничего не делает.
58
+ - **Every element class has its own style rule.** A class without a rule looks working and
59
+ silently does nothing.
61
60
  <!-- rt-when: *.scss *.css -->
62
61
 
63
- - **Класс ставится директивой, а не строкой в атрибуте.** Имя блока `rtElem` получает
64
- инъекцией от ближайшего предка с `rtBlock`, и повторить этот разбор по тексту шаблона нечем.
62
+ - **A class is set by a directive, not by a string in an attribute.** `rtElem` gets the block name
63
+ by injection from the nearest ancestor with `rtBlock`, and there is nothing to repeat that
64
+ resolution by the text of the template.
65
65
  <!-- rt-when: *.html *.scss -->
66
66
 
67
- - **Раскладка объявлена в общем слое приложения, а не в стилях экрана.** У компонента экрана
68
- вне кита файл стилей по умолчанию пустой.
67
+ - **The layout is declared in the application's shared layer, not in the screen's styles.** A
68
+ screen component outside the kit has an empty styles file by default.
69
69
  <!-- rt-when: *.scss *.css -->
70
70
 
71
- - **Шторку и окно открывает служба кита, а не номер слоя.** Числа шкалы сравниваются только
72
- между соседями по разметке; служба выносит разметку наружу, к `<body>`, и сравнивать её
73
- становится не с чем.
71
+ - **One thing is called by one name in every place it occurs.** A layout that keeps three
72
+ vocabularies for the page, the edit panel and the window, with shared names in different
73
+ meanings, does not count as a shared layer: the place of declaration matches, the meaning of the
74
+ name does not. Choosing a name, the executor lands in a foreign vocabulary and brings a foreign
75
+ spacing, and the checks do not see it. Where an element stands is set by the kind of block, not
76
+ by a second set of names.
77
+ <!-- rt-when: *.scss *.css *.html -->
78
+
79
+ - **The sheet and the window are opened by the kit service, not by a layer number.** The scale's
80
+ numbers compare only between neighbours in the markup; the service moves the markup outside, to
81
+ `<body>`, and there is nothing left to compare it with.
74
82
  <!-- rt-when: *.ts *.scss -->
75
83
 
76
- - **Номер слоя берётся из шкалы, а не пишется числом в файле компонента.** Шкала — единственное
77
- место, где слои видно рядом: написанное на месте число в неё не попадает, и следующий узел
78
- занимает тот же номер, ничего об этом не узнав.
84
+ - **The layer number is taken from the scale, not written as a number in the component file.**
85
+ The scale is the only place where the layers are visible side by side: a number written in place
86
+ does not land in it, and the next node takes the same number without learning of it.
79
87
  <!-- rt-when: *.scss *.css -->
80
88
 
81
- - **Предел ширины объявляется вместе с судьбой не влезшего.** Предел и место в строке сами по
82
- себе ничего не прячут и не переносят: у узла, который может получить значение длиннее своего
83
- места, стоит либо обрезка с многоточием, либо перенос. Без этого текст молча вылезает за
84
- границы и ложится поверх соседа, а разрешение элементу сжаться обрезкой не является.
89
+ - **A width limit is declared together with the fate of what did not fit.** A limit and a place in
90
+ a row hide or wrap nothing by themselves: a node that may receive a value longer than its place
91
+ has either ellipsis truncation or wrapping. Without that the text silently runs past the border
92
+ and lies over its neighbour, and allowing an element to shrink does not replace truncation.
85
93
  <!-- rt-when: *.scss *.css -->
86
94
 
87
- - **Обрезка идёт в паре с подсказкой.** Обрезок без подсказки читается как целое значение:
88
- узнать, где текст кончается на самом деле, человеку неоткуда. Значение целиком он видит либо
89
- в самом месте, либо при наведении — и подсказка, которой поставлен свой предел ширины,
90
- подчиняется статье выше наравне с ячейкой.
95
+ - **Truncation goes in a pair with a tooltip.** A truncated text without a tooltip reads as the
96
+ whole value: a person has no way to learn where the text actually ends. The whole value they see
97
+ either in the place itself or on hover — and a tooltip given a width limit of its own obeys the
98
+ article above the same as a cell.
91
99
  <!-- rt-when: *.scss *.css -->
92
100
 
93
- - **Размер элемента управления выбирается по признаку указателя, а не по ширине экрана.**
94
- Планшет в ландшафте шире порога узкого вьюпорта, а нажимают по нему пальцем: `pointer: coarse`
95
- отвечает про способ нажатия, ширина — про место под раскладку. Ступени берутся у кита, а не
96
- назначаются пикселями.
101
+ - **The size of a control is chosen by the pointer sign, not by the screen width.** A tablet in
102
+ landscape is wider than the narrow-viewport threshold, yet it is tapped with a finger:
103
+ `pointer: coarse` answers about the way of pressing, the width — about the room for the layout.
104
+ The steps are taken from the kit, not assigned in pixels.
97
105
  <!-- rt-when: *.scss *.css -->
98
106
 
99
- - **Файл стилей не длиннее 500 строк.** Предел общий с кодом и текстами, но stylelint длину не
100
- судит вовсе — держит его проверка дерева. Выросший файл экрана делится по блокам, а общая
101
- раскладка уходит в свой слой.
107
+ - **A styles file is no longer than 500 lines.** The limit is shared with code and texts, but
108
+ stylelint does not judge length at all — a check of the tree holds it. A grown screen file is
109
+ split by blocks, and shared layout leaves for its own layer.
102
110
  <!-- rt-when: *.scss *.css -->
103
111
 
104
- - **Предупреждение stylelint роняет прогон наравне с ошибкой.** `!important` объявлен
105
- предупреждением, а прогон идёт с `--max-warnings 0`: иначе запрет читается как пожелание —
106
- два таких предупреждения лежали в дереве, а `npm run stylelint` возвращал ноль и гейтом не был.
112
+ - **A stylelint warning fails the run the same as an error.** `!important` is declared a warning,
113
+ and the run goes with `--max-warnings 0`: otherwise the ban reads as a wish — two such warnings
114
+ lay in the tree while `npm run stylelint` returned zero and was no gate.
107
115
  <!-- rt-when: *.scss *.css -->
108
116
 
109
- ## Чего из закона здесь нет
117
+ ## What of the law is not here
110
118
 
111
- Проверка «класс без правила» считает совпадение по имени элемента, а не по паре «блок —
112
- элемент»: класс, у которого правило есть, но у чужого блока, она пропускает. Обратное
113
- направление — снятие правила у живого класса — не проверяется вовсе и ловится чтением шаблона.
119
+ The "class without a rule" check counts a match by element name, not by the pair "block —
120
+ element": a class that has a rule, but under a foreign block, it lets through. The reverse
121
+ direction — removing the rule of a live class — is not checked at all and is caught by reading
122
+ the template.
114
123
 
115
- ## Паттерны
124
+ ## Patterns
116
125
 
117
- - `styling-bem-layout` — экран на общем слое раскладки, блоки приложения.
118
- - `styling-bem-component` — стили компонента кита, `:host`, модификаторы, язык оформления сайта.
119
- - `styling-bem-sheet` — шторка и окно поверх страницы: чем открываются, подложка, замер.
126
+ - `styling-bem-layout` — a screen on the shared layout layer, the application's blocks.
127
+ - `styling-bem-component` — styles of a kit component, `:host`, modifiers, the site's styling
128
+ language.
129
+ - `styling-bem-sheet` — the sheet and the window above the page: what opens them, the backdrop,
130
+ the measurement.