@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
@@ -2,78 +2,79 @@
2
2
  name: autonomous-work-run
3
3
  kind: pattern
4
4
  rule: autonomous-work
5
- description: Паттерн правила autonomous-work. Брать, когда владелец ушёл и работа идёт ночь напролёт — готовый цикл одной работы, ветвление чередой, запись умолчания вместо вопроса, список к утру, разбор отказа стража. Не брать для обычного хода работы — это паттерны task-flow-start и task-flow-resume.
5
+ description: Pattern of rule autonomous-work. Load when the owner has left and the work runs through the night — the cycle of one piece of work, chained branching, a written default instead of a question, the list by morning, handling a guard refusal. Not for ordinary work — patterns task-flow-start and -resume.
6
6
  ---
7
7
 
8
- # Ночь без владельца
8
+ # A night without the owner
9
9
 
10
- Паттерн правила `autonomous-work`. Что при этом должно быть верно — закон
10
+ Pattern of the rule `autonomous-work`. What must be true — the law
11
11
  `docs/constitution/autonomous-work.md`.
12
12
 
13
- ## Когда брать
13
+ ## When to use
14
14
 
15
- - Владелец сказал, что уходит, и просил работать самостоятельно.
16
- - За заход берётся больше одной задачи подряд, и отдать их наружу нельзя.
17
- - Работа упёрлась в вопрос, а спросить некого.
15
+ - The owner said they are leaving and asked for work on one's own.
16
+ - More than one task in a row is taken in a session, and they cannot be handed outside.
17
+ - The work ran into a question, and there is nobody to ask.
18
18
 
19
- ## Череда веток
19
+ ## The chain of branches
20
20
 
21
- Первая работа ветвится от главной, каждая следующая — от предыдущей:
21
+ The first work branches from main, each next one — from the previous:
22
22
 
23
23
  ```bash
24
- git checkout -b <КЛЮЧ>-<номер-1>-<slug> main # первая за ночь
24
+ git checkout -b <КЛЮЧ>-<номер-1>-<slug> main # the first of the night
25
25
  git checkout -b <КЛЮЧ>-<номер-2>-<slug> <КЛЮЧ>-<номер-1>-<slug>
26
26
  git checkout -b <КЛЮЧ>-<номер-3>-<slug> <КЛЮЧ>-<номер-2>-<slug>
27
27
  ```
28
28
 
29
- Порядок вливания — снизу вверх, и он называется в списке к утру номерами. Ветка, заведённая от
30
- главной посреди череды, столкнётся с соседкой в общих файлах — указателях, счётчиках, журналах —
31
- и разбирать это будет владелец.
29
+ The merge order is from the bottom up, and it is named in the morning list by numbers. A branch
30
+ created from main in the middle of the chain will collide with its neighbour in shared files —
31
+ indexes, counters, journals — and the owner will be the one to sort it out.
32
32
 
33
33
  ```bash
34
- git log --oneline --graph --decorate main..HEAD | head -20 # чем стоит череда сейчас
34
+ git log --oneline --graph --decorate main..HEAD | head -20 # what the chain stands on now
35
35
  git branch --list '<КЛЮЧ>-*' --format='%(refname:short) %(upstream:short)'
36
36
  ```
37
37
 
38
- ## Цикл одной работы
38
+ ## The cycle of one piece of work
39
39
 
40
40
  ```bash
41
- npm run task:move -- <номер> in-progress # взята
42
- git checkout -b <КЛЮЧ>-<номер>-<slug> <прошлая ветка> # череда, а не веер
41
+ npm run task:move -- <номер> in-progress # taken
42
+ git checkout -b <КЛЮЧ>-<номер>-<slug> <прошлая ветка> # a chain, not a fan
43
43
  cp -r docs/tasks/_template docs/tasks/<КЛЮЧ>-<номер>-<slug>
44
- # разбор просьбы с умолчаниями, замысел, состояние «этап-идёт»
45
- git add docs/tasks/<КЛЮЧ>-<номер>-<slug> && git commit # папка едет в историю сразу
46
- # работа этапами: каждый кончается коммитом и прогоном признака готовности
47
- # папка разбирается в описание прошлого последним коммитом
44
+ # the grill with defaults, the plan, the state «этап-идёт»
45
+ git add docs/tasks/<КЛЮЧ>-<номер>-<slug> && git commit # the folder goes into history at once
46
+ # work by stages: each ends with a commit and a run of the readiness sign
47
+ # the folder is taken apart into the archive by the last commit
48
48
  ```
49
49
 
50
- Наружу за ночь не уходит ничего: ни `git push`, ни `gh pr create`, ни публикация, ни отметка
51
- груза. Ветка остаётся местной, и утром владелец сам решает, что из неё отдавать.
50
+ Nothing goes outside during the night: no `git push`, no `gh pr create`, no publishing, no cargo
51
+ mark. The branch stays local, and in the morning the owner decides what to hand out of it.
52
52
 
53
- ## Умолчание вместо вопроса
53
+ ## A default instead of a question
54
54
 
55
- Пишется в разбор просьбы, в раздел решений, — там же, где записался бы ответ владельца:
55
+ Written into the grill, into the decisions section — where the owner's answer would have been
56
+ written:
56
57
 
57
58
  ```markdown
58
59
  - **<что принято>** — <довод>. Спросить было некого: заход автономный. Цена ошибки:
59
60
  <что придётся переделать, если владелец решит иначе>.
60
61
  ```
61
62
 
62
- Цена ошибки — не вежливость, а признак: она отделяет умолчание, которое можно переиграть за
63
- десять минут, от того, ради которого работу лучше отложить целиком.
63
+ The cost of a mistake is not politeness but a sign: it separates a default that can be replayed in
64
+ ten minutes from one for whose sake the work is better postponed whole.
64
65
 
65
- ## Отложенная задача
66
+ ## A postponed task
66
67
 
67
- Задача, которой нужно слово владельца, не берётся: состояние на борде остаётся прежним, а в
68
- список к утру идёт строка.
68
+ A task that needs the owner's word is not taken: its state on the board stays as it was, and a
69
+ line goes into the morning list.
69
70
 
70
71
  ```markdown
71
72
  - **RT-<номер> — <заголовок>.** Отложена: <какой вопрос и почему умолчания у него нет>.
72
73
  ```
73
74
 
74
- ## Список к утру
75
+ ## The morning list
75
76
 
76
- Дописывается по ходу, после каждой закрытой работы, а не собирается в конце.
77
+ Appended along the way, after each closed piece of work, not assembled at the end.
77
78
 
78
79
  ```markdown
79
80
  | Работа | Ветка | Чем подтверждена | Чего ждёт |
@@ -81,25 +82,25 @@ git add docs/tasks/<КЛЮЧ>-<номер>-<slug> && git commit # папка
81
82
  | RT-… — <что сделано> | `<ветка>` (на `<предыдущей>`) | `<команда>` — <вывод> | заявки и слияния |
82
83
  ```
83
84
 
84
- Порядок строк — порядок вливания. Ниже списка — отложенные задачи с их вопросами.
85
+ The order of rows is the merge order. Below the list — the postponed tasks with their questions.
85
86
 
86
- ## Отказ стража
87
+ ## A guard's refusal
87
88
 
88
- Отказ называет пропущенный шаг: шаг делается, вызов повторяется, работа идёт дальше. Ночь
89
- кончается работой, а не спором со стражем.
89
+ The refusal names the skipped step: the step is done, the call is repeated, the work goes on. The
90
+ night ends with work, not with an argument with the guard.
90
91
 
91
- - Отказ требует того, что делать нельзя (пуш, заявка), — работа доводится до места, где
92
- требование исполнимо утром, и уходит в список к утру строкой «ждёт заявки».
93
- - Отказ повторяется на том же месте дважды — значит пропущенный шаг понят неверно: читается
94
- правило, названное в отказе, а не переписывается формулировка.
92
+ - The refusal demands what must not be done (a push, a PR). The work is brought to the place where
93
+ the demand can be met in the morning and goes into the morning list as the line "waits for a PR".
94
+ - The refusal repeats at the same place twice — then the skipped step was understood wrongly: the
95
+ rule named in the refusal is read, not the wording rewritten.
95
96
 
96
- ## Частые промахи
97
+ ## Common misses
97
98
 
98
- - **Ветка заведена от главной по привычке.** Череда рвётся молча, и цена всплывает у владельца
99
- на втором вливании.
100
- - **Умолчание принято и не записано.** Утром оно неотличимо от знания, и владелец узнаёт о нём,
101
- только когда работа сделана не так.
102
- - **Задача взята и отложена наполовину.** На борде она в работе, в ветке — половина правки;
103
- следующий заход читает её как начатую и не начинает заново.
104
- - **Список к утру собран по памяти в последнюю минуту.** К этому часу окно уже сжималось, и
105
- половина ночи в него не попала.
99
+ - **The branch was created from main by habit.** The chain breaks silently, and the cost surfaces
100
+ for the owner at the second merge.
101
+ - **A default was taken and not written down.** In the morning it cannot be told from knowledge,
102
+ and the owner learns of it only when the work was done wrong.
103
+ - **A task was taken and postponed halfway.** On the board it is in progress, in the branch — half
104
+ an edit; the next session reads it as begun and does not start over.
105
+ - **The morning list was assembled from memory at the last minute.** By that hour the window was
106
+ already shrinking, and half of the night did not get into it.
@@ -2,39 +2,73 @@
2
2
  name: browser-verification-measure
3
3
  kind: pattern
4
4
  rule: browser-verification
5
- description: Паттерн правила browser-verification. Брать, когда вывод о вёрстке надо подкрепить числом — готовые замеры, разбивка вычисленного значения по всем узлам, узкий экран через iframe, ловушки инструмента computer. Не брать для подъёма стенда — это паттерн browser-verification-stand.
5
+ description: Pattern of rule browser-verification. Load when a conclusion about layout needs a number behind it — ready-made measurements, a computed value broken down over all nodes, a narrow screen through an iframe, pitfalls of the computer tool. Not for raising a stand — pattern browser-verification-stand.
6
6
  ---
7
7
 
8
- # Замер вместо взгляда
8
+ # Measurement instead of a look
9
9
 
10
- Паттерн правила `browser-verification`. Что при этом должно быть верно — закон
10
+ Pattern of the rule `browser-verification`. What must be true — the law
11
11
  `docs/constitution/verifiability.md`.
12
12
 
13
- ## Когда брать
13
+ ## When to use
14
14
 
15
- - Правилась вёрстка, и надо подтвердить результат.
16
- - Экран выглядит не так, а искать нечего: поиск по коду отвечает «чисто».
17
- - Проверяется узкий экран.
15
+ - Layout was edited, and the result needs confirming.
16
+ - The screen looks wrong, and there is nothing to search for: a search over the code answers
17
+ "clean".
18
+ - A narrow screen is under check.
18
19
 
19
- ## Вывод подкрепляется числом
20
+ ## A conclusion is backed by a number
20
21
 
21
- `getComputedStyle`, `getBoundingClientRect`, контраст, совпадение центров, попадание во
22
- вьюпорт. «Выглядит нормально» результатом проверки не бывает.
22
+ `getComputedStyle`, `getBoundingClientRect`, contrast, matching centres, landing in the viewport.
23
+ "Looks fine" is never a check result.
23
24
 
24
- Замер отвечает только на тот вопрос, который задали. Совпадение перечисленных свойств ничего
25
- не говорит о правиле, которого в списке замера нет: строки попапа профиля сошлись с образцом
26
- по отступам, кеглю и скруглению, а фон на наведении образец в этом месте не красит вовсе —
27
- полноширинная подсветка держалась два круга при верных числах. Если исходники образца
28
- доступны, расхождение ищется чтением, а замер остаётся проверкой результата.
25
+ A measurement answers only the question asked. A match on the listed properties says nothing about a
26
+ rule that is not in the measured list. The rows of the profile popup matched the reference by
27
+ padding, font size and rounding, while the reference paints no hover background there at all — a
28
+ full-width highlight held on for two rounds with correct numbers. If the reference sources are
29
+ available, the divergence is found by reading, and the measurement stays a check of the result.
29
30
 
30
- Вид элемента, которого сегодня не видно ни на одном экране, замером не подтверждается, и
31
- правило о нём остаётся гипотезой.
31
+ The look of an element that today is visible on no screen is not confirmed by a measurement, and a
32
+ rule about it stays a hypothesis.
32
33
 
33
- ## Значение, которого в коде нет
34
+ ## The waiting state is measured on a delayed request
34
35
 
35
- Гарнитуру, `line-height`, цвет и `appearance` элементам формы задаёт браузер, и в дереве этих
36
- значений нет. Поиск по коду на такой дефект отвечает «чисто», линт и сборка молчат. Ищется
37
- разбивкой вычисленного значения по всем узлам страницы, а не замером у пары элементов:
36
+ A button in waiting, a list skeleton and a loading bar live exactly as long as the request runs: on
37
+ a stand that is a fraction of a second, and no measurement call can catch them. The request itself
38
+ is delayed, not the measurement.
39
+
40
+ The technique has three parts, and the third is mandatory: the network call is substituted, the
41
+ answer is held for a few seconds, and it ends with a refusal. A real answer would leave a real
42
+ record on the stand — that is how an extra row got into the stand's database.
43
+
44
+ ```javascript
45
+ globalThis.__realFetch ??= globalThis.fetch;
46
+ globalThis.fetch = (input, init) => {
47
+ const url = typeof input === 'string' ? input : input.url;
48
+ if (!url.includes('<the piece of the address being held>')) {
49
+ return globalThis.__realFetch(input, init);
50
+ }
51
+ return new Promise((resolve) => {
52
+ setTimeout(() => resolve(new Response('{}', { status: 500 })), 5000);
53
+ });
54
+ };
55
+
56
+ 'substituted';
57
+ ```
58
+
59
+ The substitution is removed by assigning the saved one back: the page lives until reload, and a
60
+ forgotten substitution leads the next measurement astray.
61
+
62
+ The sign that this is exactly the case: the button on the screenshot in its ordinary look, while
63
+ the request has already gone out in the list of network calls. Assembling the technique anew each
64
+ time costs more than reading it here: over one epic it was assembled three times.
65
+
66
+ ## A value that is not in the code
67
+
68
+ The typeface, `line-height`, colour and `appearance` of form elements are set by the browser, and
69
+ the tree has none of these values. A search over the code answers "clean" for such a defect, the
70
+ linter and the build are silent. It is found by breaking the computed value down over all nodes of
71
+ the page, not by measuring a couple of elements:
38
72
 
39
73
  ```javascript
40
74
  [...document.querySelectorAll('*')].reduce((acc, el) => {
@@ -44,15 +78,15 @@ description: Паттерн правила browser-verification. Брать, к
44
78
  }, {});
45
79
  ```
46
80
 
47
- Так на дашборде админки нашёлся 91 контрол из 106, набранный не той гарнитурой, и 13 из 87 на
48
- главной сайта. Счёт годится любому наследуемому свойству: смотрится не одно значение, а число
49
- узлов с неожиданным.
81
+ That is how 91 controls out of 106 set in the wrong typeface were found on the admin dashboard,
82
+ and 13 out of 87 on the site's main page. The count fits any inherited property: what is looked at
83
+ is not one value but the number of nodes with an unexpected one.
50
84
 
51
- ## Замер по всем порогам разом
85
+ ## Measurement across all thresholds at once
52
86
 
53
- Замер по одной ширине за вызов даёт числа разных минут: между вызовами страница
54
- перерисовывается, и сравнивать их нельзя. Ширины поэтому гоняются пачкой в одном заходе —
55
- каждая живёт своим кадром, замер снимается со всех сразу:
87
+ A measurement at one width per call gives numbers from different minutes: between calls the page
88
+ is redrawn, and they cannot be compared. So the widths are run as a batch in one pass — each lives
89
+ in its own frame, and the measurement is taken from all of them at once:
56
90
 
57
91
  ```javascript
58
92
  await (async (address, widths, row) => {
@@ -82,63 +116,65 @@ await (async (address, widths, row) => {
82
116
  })('/screen', [360, 599, 600, 904, 905, 1239, 1240, 1440], '.field');
83
117
  ```
84
118
 
85
- Ответ читается по трём признакам, и первый не про вид:
119
+ The answer is read by three signs, and the first is not about looks:
86
120
 
87
- - **высоты соседей одной строки равны между собой** — набор значений в `heights` длиной больше
88
- единицы означает, что поля встали разного размера;
89
- - **поперечной прокрутки нет** — `scrolls` истинно там, где содержимое шире кадра;
90
- - **ни одна левая граница не выходит за ширину кадра** — `escaped` больше нуля. На снимке этого
91
- не видно вовсе: элемент за правым краем выглядит отсутствующим.
121
+ - **the heights of neighbours in one row are equal** — a set of values in `heights` longer than
122
+ one means the fields came out different sizes;
123
+ - **there is no horizontal scrolling** — `scrolls` is true where the content is wider than the
124
+ frame;
125
+ - **no left edge goes past the frame width** — `escaped` above zero. On a screenshot this is not
126
+ visible at all: an element beyond the right edge looks absent.
92
127
 
93
- Ширина кадра меньше заказанной на полосу прокрутки, поэтому сравнивают с `got`, а не с числом
94
- из списка: порог, названный по заказанной ширине, на кадре оказывается по другую сторону от
95
- себя.
128
+ The frame width is smaller than the ordered one by a scrollbar, so the comparison is against `got`,
129
+ not against the number from the list. A threshold named by the ordered width turns out on the other
130
+ side of itself in the frame.
96
131
 
97
- ## Узкий экран
132
+ ## Narrow screen
98
133
 
99
- `resize_window` не работает, когда Chrome в полноэкранном режиме: инструмент рапортует успех,
100
- `innerWidth` не меняется, медиазапросы остаются десктопными. Узкие ширины проверять во
101
- вложенном iframe нужной ширины — внутри него `matchMedia` считается от рамки; при
102
- `width: 375px` и `border: 2px` внутренний `innerWidth` равен 371.
134
+ `resize_window` does not work when Chrome is in full-screen mode: the tool reports success,
135
+ `innerWidth` does not change, media queries stay desktop. Narrow widths are checked in a nested
136
+ iframe of the needed width — inside it `matchMedia` counts from the frame; at `width: 375px` and
137
+ `border: 2px` the inner `innerWidth` equals 371.
103
138
 
104
- Правка числа элементов в контейнере — это правка раскладки: она проверяется при 375, а не
105
- только кодами ответа.
139
+ Changing the number of elements in a container is a layout edit: it is checked at 375, not only by
140
+ response codes.
106
141
 
107
- ## Событие ввода подделкой значения не заменяется
142
+ ## An input event is not replaced by a faked value
108
143
 
109
- **Прокрутка, поставленная присвоением, события не даёт.** Значение прокрутки меняется, а подписчик
110
- не срабатывает ни на документе, ни на окне, ни на корневом узле: признак, который приложение
111
- считает по событию, остаётся прежним, и сделанная правка читается как несделанная — два захода
112
- подряд разбирали исправный слушатель.
144
+ **Scrolling set by assignment gives no event.** The scroll value changes, but the subscriber does
145
+ not fire on the document, on the window or on the root node. The sign the application computes by
146
+ the event stays as it was, and the edit made reads as not made — two sessions in a row took apart a
147
+ working listener.
113
148
 
114
- Отсюда две проверки, и ни одна не заменяет другую: механика проверяется настоящим колесом, а
115
- раскладка под признаком — признаком, поставленным руками. Класс ставится на хост, и меряется то,
116
- что от него зависит; порог при этом не участвует.
149
+ Hence two checks, and neither replaces the other: the mechanics are checked with a real wheel, and
150
+ the layout under the sign — with a sign set by hand. The class is put on the host, and what depends
151
+ on it is measured; the threshold takes no part in that.
117
152
 
118
- Признак того, что случай именно этот: слушатель поставлен, значение прокрутки изменилось, счётчик
119
- событий нулевой. Разбирать после этого сам слушатель не нужно — он исправен.
153
+ The sign that this is exactly the case: the listener is set, the scroll value changed, the event
154
+ counter is zero. There is no need to take the listener itself apart after that — it works.
120
155
 
121
- ## Ловушки инструмента `computer`
156
+ ## Pitfalls of the `computer` tool
122
157
 
123
- - Координаты клика — координаты **скриншота**, а не CSS-пиксели: при вьюпорте 2560 скриншот
124
- приходит шириной 1568, и клик по «увиденной» координате уходит мимо, давая ложный сигнал.
125
- Пересчитывать по фактическому масштабу либо целиться через `find`.
126
- - Область `zoom` должна целиком лежать внутри вьюпорта.
127
- - Между кликами обязателен `await`: синхронный цикл «кликнул — прочитал DOM» читает состояние
128
- до перерисовки и возвращает устаревшие значения.
129
- - `select_browser` протухает через 300 секунд. На длинной проверке это срабатывает посреди
130
- работы — это не сбой стенда, повторить вызов и продолжить. Закреплённый профиль называет само дерево — переменной окружения либо своим файлом рядом с
131
- настройками раскладки; спрашивается он у помощника, а не помнится: идентификатор локален для
132
- машины и в пакет не едет вовсе.
158
+ - Click coordinates are the coordinates of the **screenshot**, not CSS pixels: at a viewport of 2560
159
+ the screenshot arrives 1568 wide, and a click at the "seen" coordinate goes astray, giving a false
160
+ signal. Recompute by the actual scale or aim through `find`.
161
+ - The `zoom` area must lie entirely inside the viewport.
162
+ - An `await` between clicks is mandatory: a synchronous loop of "clicked — read the DOM" reads the
163
+ state before the redraw and returns stale values.
164
+ - `select_browser` goes stale after 300 seconds. On a long check this fires in the middle of the
165
+ work — it is not a stand failure; repeat the call and go on. The pinned profile is named by the
166
+ tree itself — by an environment variable or by its own file next to the layout settings. It is
167
+ asked from the helper, not remembered: the identifier is local to the machine and does not travel
168
+ into the package at all.
133
169
 
134
- ## Долгий прогон запускается в странице, а не в вызове
170
+ ## A long run is started in the page, not in the call
135
171
 
136
- Вызов инструмента прерывается по своему пределу примерно на сорока пяти секундах, а начатый им
137
- обход продолжается — результата у него уже никто не спросит. Одна ширина из набора экранов идёт
138
- около полутора минут, то есть в вызов не помещается ни одна.
172
+ A tool call is cut off by its own limit at about forty-five seconds, while the walk it started
173
+ goes on — nobody will ask it for the result any more. One width from the set of screens takes
174
+ about a minute and a half, so not one fits into a call.
139
175
 
140
- Порядок такой: вызов кладёт обход в переменную страницы и заканчивается сразу, а следующие вызовы
141
- спрашивают у той же переменной, готово ли.
176
+ The order is this: the call puts the walk into a page variable and ends at once, and the following
177
+ calls ask that same variable whether it is done.
142
178
 
143
179
  ```javascript
144
180
  globalThis.__probe = { done: false, rows: [] };
@@ -149,26 +185,26 @@ globalThis.__probe = { done: false, rows: [] };
149
185
  globalThis.__probe.done = true;
150
186
  })();
151
187
 
152
- 'запущено';
188
+ 'started';
153
189
  ```
154
190
 
155
- Ответ инструмента обрезается примерно на полутора тысячах знаков без пометки: конец сводки
156
- выглядит не оборванным, а отсутствующим — вывод, собранный за один проход и напечатанный разом,
157
- читается как более короткий, чем он есть. Собранное поэтому остаётся в переменной целиком, а
158
- печатается срезами по индексу.
191
+ The tool's answer is truncated at about fifteen hundred characters with no mark: the end of the
192
+ summary looks not cut off but absent — output gathered in one pass and printed at once reads as
193
+ shorter than it is. So what was gathered stays in the variable whole, and is printed in slices by
194
+ index.
159
195
 
160
- ## Поведение роутера воспроизводится нажатиями
196
+ ## Router behaviour is reproduced by clicks
161
197
 
162
- Подстановка адреса, `history.pushState` с `popstate` и заход по прямой ссылке поднимают
163
- приложение заново, и накопленного состояния — открытого аутлета, гарда прошлой панели — у него
164
- нет. Чистый проход по адресам читается как «дефект не подтверждается»: панель ленты событий
165
- застревала на первом же нажатии из меню и трижды прошла проверку адресами.
198
+ Substituting the address, `history.pushState` with `popstate` and entering by a direct link raise
199
+ the application anew, and it has no accumulated state — no open outlet, no guard of the previous
200
+ panel. A clean pass over the addresses reads as "the defect is not confirmed": the event feed panel
201
+ got stuck on the very first click from the menu and passed the check by addresses three times.
166
202
 
167
- ## Частые промахи
203
+ ## Common misses
168
204
 
169
- - Комментарий в конфиге — гипотеза наравне с прочими. Утверждение о вытеснении записи кэша
170
- продержалось три круга состязательного разбора кода и было опровергнуто одним `curl`.
171
- - Вывод «дефекта нет, это кэш» закрывает разбор, поэтому принимается только после проверки на
172
- чистой сборке.
173
- - Дефект в клиентском чанке от компиляции до правки выглядит как дефект кода: признак
174
- дев-сборки — имена бандла без хеша.
205
+ - A comment in a config is a hypothesis like any other. A claim about eviction of a cache record
206
+ held on through three rounds of adversarial code review and was refuted by one `curl`.
207
+ - The conclusion "no defect, it is the cache" closes the investigation, so it is accepted only
208
+ after a check on a clean build.
209
+ - A defect in a client chunk from a compilation before the edit looks like a defect in the code:
210
+ the sign of a dev build is bundle names without a hash.