@rt-tools/agent-kit 0.24.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/assets/agents/business-analyst.md +51 -50
  2. package/assets/agents/conscience.md +37 -35
  3. package/assets/agents/project-manager.md +49 -48
  4. package/assets/agents/prose-editor.md +31 -29
  5. package/assets/agents/qa-engineer.md +50 -48
  6. package/assets/agents/rules-reviewer.md +63 -58
  7. package/assets/agents/skill-curator.md +83 -78
  8. package/assets/agents/spec-critic.md +34 -29
  9. package/assets/agents/spec-writer.md +35 -32
  10. package/assets/agents/strict-teacher.md +39 -37
  11. package/assets/checks/archive-age.mjs +48 -28
  12. package/assets/checks/archive-prune.mjs +16 -14
  13. package/assets/checks/board-epics.github.mjs +75 -41
  14. package/assets/checks/board-folders.mjs +61 -0
  15. package/assets/checks/board-gh.github.mjs +35 -26
  16. package/assets/checks/board-long-work.github.mjs +24 -24
  17. package/assets/checks/board-paths.github.mjs +21 -16
  18. package/assets/checks/board-runs.github.mjs +45 -43
  19. package/assets/checks/board-titles.github.mjs +19 -17
  20. package/assets/checks/board.github.mjs +149 -127
  21. package/assets/checks/check-archive-age.mjs +23 -19
  22. package/assets/checks/check-board.github.mjs +172 -164
  23. package/assets/checks/check-descriptions.mjs +30 -29
  24. package/assets/checks/check-doc-paths.mjs +91 -88
  25. package/assets/checks/check-dupes.mjs +84 -80
  26. package/assets/checks/check-file-size.mjs +74 -71
  27. package/assets/checks/check-glossary.mjs +47 -37
  28. package/assets/checks/check-hook-scope.mjs +30 -27
  29. package/assets/checks/check-lib-layers.mjs +22 -21
  30. package/assets/checks/check-profile-drift.mjs +48 -43
  31. package/assets/checks/check-prose-style.mjs +120 -37
  32. package/assets/checks/check-push-gate.mjs +53 -50
  33. package/assets/checks/check-reuse.mjs +50 -40
  34. package/assets/checks/check-schema-drift.mjs +87 -83
  35. package/assets/checks/check-specs.mjs +155 -134
  36. package/assets/checks/check-state-next.mjs +66 -52
  37. package/assets/checks/check-states.mjs +32 -30
  38. package/assets/checks/check-styles.mjs +52 -51
  39. package/assets/checks/check-turn-map.mjs +54 -46
  40. package/assets/checks/lib-boundaries.mjs +32 -30
  41. package/assets/checks/lib-common.mjs +30 -29
  42. package/assets/checks/lib-domains.mjs +34 -34
  43. package/assets/checks/lib-manifests.mjs +17 -15
  44. package/assets/checks/lib-reexports.mjs +18 -18
  45. package/assets/checks/rt-kit-checks.config.mjs +174 -142
  46. package/assets/checks/signals.mjs +43 -39
  47. package/assets/checks/spec-anchors.mjs +114 -87
  48. package/assets/checks/spec-common.mjs +128 -84
  49. package/assets/checks/spec-contract.mjs +30 -30
  50. package/assets/checks/spec-proposed.mjs +27 -24
  51. package/assets/checks/spec-scenarios.mjs +51 -28
  52. package/assets/checks/task-new.github.mjs +85 -56
  53. package/assets/commands/feedback.md +65 -59
  54. package/assets/commands/next-session.md +64 -57
  55. package/assets/commands/skill-curator.md +83 -79
  56. package/assets/defaults/gate-map.sh +108 -97
  57. package/assets/defaults/project.sh +225 -185
  58. package/assets/defaults/shell.sh +73 -68
  59. package/assets/defaults/turn-map.md +45 -44
  60. package/assets/docs/GLOSSARY.md +142 -65
  61. package/assets/hooks/browser-device-id.sh +12 -12
  62. package/assets/hooks/browser-guard-device-id.sh +30 -28
  63. package/assets/hooks/browser-guard-no-asking.sh +5 -4
  64. package/assets/hooks/browser-guard-no-listing.sh +12 -11
  65. package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
  66. package/assets/hooks/browser-guard-require-select.sh +34 -23
  67. package/assets/hooks/claim-guard.sh +62 -56
  68. package/assets/hooks/commit-msg.sh +11 -10
  69. package/assets/hooks/conscience-guard.sh +91 -45
  70. package/assets/hooks/constitution-index.sh +16 -16
  71. package/assets/hooks/deny-tail.sh +28 -26
  72. package/assets/hooks/dev-server-guard.sh +46 -43
  73. package/assets/hooks/dispatch.sh +60 -46
  74. package/assets/hooks/docs-guard.sh +100 -91
  75. package/assets/hooks/exam-guard.sh +105 -93
  76. package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
  77. package/assets/hooks/git-guard-delivery-draft.sh +45 -38
  78. package/assets/hooks/git-guard-delivery-folder.sh +50 -43
  79. package/assets/hooks/git-guard-delivery-signature.sh +88 -52
  80. package/assets/hooks/git-guard-delivery.sh +196 -180
  81. package/assets/hooks/git-guard-main.sh +38 -34
  82. package/assets/hooks/git-guard-push-tests.sh +99 -87
  83. package/assets/hooks/glossary-load.sh +23 -22
  84. package/assets/hooks/grill-gate-ask.sh +12 -11
  85. package/assets/hooks/grill-gate.sh +94 -87
  86. package/assets/hooks/guard-note.sh +20 -19
  87. package/assets/hooks/handoff-entry-guard.sh +26 -24
  88. package/assets/hooks/handoff-write.sh +74 -67
  89. package/assets/hooks/hook-input.sh +67 -58
  90. package/assets/hooks/lint-after-edit.sh +95 -61
  91. package/assets/hooks/observe.sh +28 -26
  92. package/assets/hooks/override-write-guard.sh +23 -21
  93. package/assets/hooks/postmortem-guard.sh +42 -39
  94. package/assets/hooks/profile-check.sh +22 -20
  95. package/assets/hooks/proposal-guard.sh +57 -49
  96. package/assets/hooks/prose-style-guard.sh +19 -17
  97. package/assets/hooks/qa-dataid-guard.sh +52 -49
  98. package/assets/hooks/rerun-guard.sh +31 -30
  99. package/assets/hooks/reuse-first-guard.sh +108 -87
  100. package/assets/hooks/roles.sh +14 -14
  101. package/assets/hooks/rule-article.sh +36 -34
  102. package/assets/hooks/rule-source-guard.sh +47 -42
  103. package/assets/hooks/skill-gate-layers.sh +59 -57
  104. package/assets/hooks/skill-gate-rearm.sh +15 -8
  105. package/assets/hooks/skill-gate.sh +89 -81
  106. package/assets/hooks/skill-loaded.sh +6 -6
  107. package/assets/hooks/sql-guard-parse.sh +68 -66
  108. package/assets/hooks/sql-guard-request.sh +48 -46
  109. package/assets/hooks/sql-guard-target.sh +57 -51
  110. package/assets/hooks/sql-guard-write.sh +84 -79
  111. package/assets/hooks/sql-guard.sh +52 -47
  112. package/assets/hooks/stand-login-guard.sh +40 -37
  113. package/assets/hooks/task-context-load.sh +60 -55
  114. package/assets/hooks/task-flow-context.sh +87 -69
  115. package/assets/hooks/task-flow-draft-guard.sh +55 -48
  116. package/assets/hooks/task-flow-guard.sh +67 -64
  117. package/assets/hooks/turn-entry-load.sh +39 -32
  118. package/assets/hooks/turn-exit-guard.sh +256 -204
  119. package/assets/hooks/turn-exit-patterns.sh +53 -0
  120. package/assets/hooks/utf8.sh +11 -11
  121. package/assets/hooks/waiting-turn-guard.sh +94 -94
  122. package/assets/hooks/window-fill-guard.sh +70 -62
  123. package/assets/hooks/work-start-guard.sh +52 -49
  124. package/assets/hooks/write-targets.sh +96 -44
  125. package/assets/laws/autonomous-work.md +29 -27
  126. package/assets/laws/code-structure.md +31 -30
  127. package/assets/laws/delivery.md +148 -137
  128. package/assets/laws/entity-editing.md +52 -50
  129. package/assets/laws/entity-models.md +14 -13
  130. package/assets/laws/frontend-application.md +39 -38
  131. package/assets/laws/lib-imports.md +27 -27
  132. package/assets/laws/lists.md +31 -29
  133. package/assets/laws/navigation.md +37 -37
  134. package/assets/laws/observability.md +41 -40
  135. package/assets/laws/project-documentation.md +106 -99
  136. package/assets/laws/reuse-first.md +31 -29
  137. package/assets/laws/shared-code.md +27 -27
  138. package/assets/laws/verifiability.md +131 -124
  139. package/assets/laws/work-conduct.md +250 -244
  140. package/assets/patterns/admin-lists-screen.md +72 -69
  141. package/assets/patterns/admin-nav-item.md +51 -46
  142. package/assets/patterns/angular-patterns-state.md +32 -31
  143. package/assets/patterns/api-layer-pair.md +33 -31
  144. package/assets/patterns/autonomous-work-run.md +50 -49
  145. package/assets/patterns/browser-verification-measure.md +124 -88
  146. package/assets/patterns/browser-verification-stand.md +169 -157
  147. package/assets/patterns/component-structure-new.md +51 -42
  148. package/assets/patterns/dependencies-upgrade.md +55 -39
  149. package/assets/patterns/doc-style-human.md +55 -37
  150. package/assets/patterns/doc-style-sweep.md +82 -79
  151. package/assets/patterns/doc-style-trace.md +87 -81
  152. package/assets/patterns/doc-style-write.md +130 -122
  153. package/assets/patterns/entity-aside.md +77 -63
  154. package/assets/patterns/entity-models-new.md +37 -37
  155. package/assets/patterns/entity-store.md +33 -33
  156. package/assets/patterns/git-workflow-commit.azure.md +93 -86
  157. package/assets/patterns/git-workflow-commit.github.md +152 -141
  158. package/assets/patterns/git-workflow-commit.gitlab.md +95 -89
  159. package/assets/patterns/git-workflow-docker.md +165 -147
  160. package/assets/patterns/git-workflow-freshness.md +45 -45
  161. package/assets/patterns/git-workflow-merge.md +98 -93
  162. package/assets/patterns/git-workflow-migration.md +54 -52
  163. package/assets/patterns/git-workflow-pr-ready.md +57 -56
  164. package/assets/patterns/git-workflow-pr.azure.md +126 -121
  165. package/assets/patterns/git-workflow-pr.github.md +179 -175
  166. package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
  167. package/assets/patterns/git-workflow-restart.md +35 -31
  168. package/assets/patterns/git-workflow-secrets.md +80 -73
  169. package/assets/patterns/git-workflow-stack.md +131 -106
  170. package/assets/patterns/lib-layers-move.md +62 -53
  171. package/assets/patterns/lib-layers-new.md +59 -45
  172. package/assets/patterns/observability-record.md +72 -67
  173. package/assets/patterns/platform-access-di.md +31 -29
  174. package/assets/patterns/reuse-first-extend.md +66 -61
  175. package/assets/patterns/shared-code-new.md +39 -38
  176. package/assets/patterns/spec-driven-domain.md +161 -151
  177. package/assets/patterns/spec-driven-rule.md +179 -168
  178. package/assets/patterns/spec-driven-sweep.md +41 -39
  179. package/assets/patterns/status-report-table.github.md +37 -36
  180. package/assets/patterns/styling-bem-component.md +42 -42
  181. package/assets/patterns/styling-bem-layout.md +39 -34
  182. package/assets/patterns/styling-bem-sheet.md +59 -58
  183. package/assets/patterns/task-flow-archive.md +222 -215
  184. package/assets/patterns/task-flow-close.md +215 -203
  185. package/assets/patterns/task-flow-handoff.md +154 -145
  186. package/assets/patterns/task-flow-resume.md +138 -133
  187. package/assets/patterns/task-flow-start.md +204 -192
  188. package/assets/patterns/testing-e2e.md +102 -101
  189. package/assets/patterns/testing-unit.md +77 -70
  190. package/assets/patterns/ts-procedure.md +32 -29
  191. package/assets/patterns/turn-entry-map.md +50 -48
  192. package/assets/pitfalls/agent-kit.md +152 -141
  193. package/assets/pitfalls/doc-style.md +96 -91
  194. package/assets/pitfalls/git-workflow.azure.md +49 -46
  195. package/assets/pitfalls/git-workflow.github.md +264 -234
  196. package/assets/pitfalls/git-workflow.gitlab.md +49 -45
  197. package/assets/pitfalls/spec-driven.md +73 -71
  198. package/assets/pitfalls/styling-bem.md +46 -40
  199. package/assets/pitfalls/task-flow.md +262 -246
  200. package/assets/pitfalls/testing.md +99 -92
  201. package/assets/pitfalls/turn-conduct.md +96 -81
  202. package/assets/rules/angular-patterns.md +81 -80
  203. package/assets/rules/api-layer.md +77 -74
  204. package/assets/rules/autonomous-work.md +75 -74
  205. package/assets/rules/browser-verification.md +223 -214
  206. package/assets/rules/component-structure.md +72 -69
  207. package/assets/rules/dependencies.md +74 -67
  208. package/assets/rules/deploy-flow.azure.md +118 -108
  209. package/assets/rules/deploy-flow.github.md +145 -135
  210. package/assets/rules/deploy-flow.gitlab.md +120 -110
  211. package/assets/rules/doc-style.md +198 -173
  212. package/assets/rules/entity-conventions.needs-admin.md +81 -79
  213. package/assets/rules/entity-models.md +73 -70
  214. package/assets/rules/git-workflow.azure.md +224 -228
  215. package/assets/rules/git-workflow.github.md +250 -239
  216. package/assets/rules/git-workflow.gitlab.md +218 -217
  217. package/assets/rules/lib-layers.md +85 -86
  218. package/assets/rules/lists.md +101 -97
  219. package/assets/rules/navigation.md +78 -78
  220. package/assets/rules/observability.needs-app.md +165 -153
  221. package/assets/rules/platform-access.md +76 -75
  222. package/assets/rules/reuse-first.md +153 -143
  223. package/assets/rules/shared-code.md +82 -79
  224. package/assets/rules/spec-driven.md +272 -260
  225. package/assets/rules/status-report.md +55 -58
  226. package/assets/rules/styling-bem.md +81 -77
  227. package/assets/rules/task-flow.md +282 -270
  228. package/assets/rules/testing.md +224 -209
  229. package/assets/rules/turn-conduct.md +255 -258
  230. package/assets/rules/turn-entry.md +92 -87
  231. package/assets/rules/typescript-conventions.md +94 -88
  232. package/assets/samples/specs/_template/spec.md +47 -47
  233. package/assets/samples/tasks/_template/grill.md +20 -20
  234. package/assets/samples/tasks/_template/plan.md +32 -30
  235. package/assets/samples/tasks/_template/progress.md +16 -16
  236. package/assets/skills/agent-kit-extend.md +129 -113
  237. package/assets/skills/agent-kit.md +235 -211
  238. package/assets/skills/write-a-skill.md +76 -71
  239. package/assets/templates/findings.md +19 -19
  240. package/assets/templates/gate-map.sh +16 -14
  241. package/assets/templates/implementation.md +28 -27
  242. package/assets/templates/pattern.md +17 -17
  243. package/assets/templates/pitfalls.md +6 -6
  244. package/assets/templates/postmortem.md +24 -23
  245. package/assets/templates/project.sh +24 -24
  246. package/assets/templates/proposal.md +62 -60
  247. package/assets/templates/rule.md +38 -38
  248. package/assets/workflows/feature.js +46 -46
  249. package/assets/workflows/plan.js +54 -54
  250. package/lib/catalog.d.ts +2 -0
  251. package/lib/catalog.d.ts.map +1 -1
  252. package/lib/catalog.js +4 -3
  253. package/lib/catalog.js.map +1 -1
  254. package/lib/commands.d.ts.map +1 -1
  255. package/lib/commands.js +5 -2
  256. package/lib/commands.js.map +1 -1
  257. package/lib/companion.js +3 -2
  258. package/lib/companion.js.map +1 -1
  259. package/lib/enroll.d.ts +7 -1
  260. package/lib/enroll.d.ts.map +1 -1
  261. package/lib/enroll.js +12 -3
  262. package/lib/enroll.js.map +1 -1
  263. package/lib/plan.d.ts +11 -0
  264. package/lib/plan.d.ts.map +1 -1
  265. package/lib/plan.js +10 -1
  266. package/lib/plan.js.map +1 -1
  267. package/lib/ship.d.ts +0 -7
  268. package/lib/ship.d.ts.map +1 -1
  269. package/lib/ship.js +10 -2
  270. package/lib/ship.js.map +1 -1
  271. package/lib/shipment.d.ts.map +1 -1
  272. package/lib/shipment.js +6 -2
  273. package/lib/shipment.js.map +1 -1
  274. package/lib/sync.d.ts.map +1 -1
  275. package/lib/sync.js +45 -11
  276. package/lib/sync.js.map +1 -1
  277. package/package.json +1 -1
  278. package/rt-tools-agent-kit-0.26.0.tgz +0 -0
  279. package/rt-tools-agent-kit-0.24.0.tgz +0 -0
@@ -2,244 +2,255 @@
2
2
  name: spec-driven-rule
3
3
  kind: pattern
4
4
  rule: spec-driven
5
- description: Паттерн правила spec-driven. Брать при заведении или правке закона в docs/constitution, правила или паттерна в .claude/skills — готовые шапки, набор разделов каждого слоя, таблица привязки, признак того, что правило пора делить. Не брать для спека домена — это паттерн spec-driven-domain.
5
+ description: Pattern of rule spec-driven. Load when creating or editing a law in docs/constitution, a rule or a pattern in .claude/skills — ready-made headers, the section set of each layer, the binding table, the sign that a rule is due for splitting. Not for a domain spec — that is pattern spec-driven-domain.
6
6
  ---
7
7
 
8
- # Закон, правило и паттерн
8
+ # Law, rule and pattern
9
9
 
10
- Паттерн правила `spec-driven`. Что при этом должно быть верно — закон
10
+ Pattern of the rule `spec-driven`. What must be true — the law
11
11
  `docs/constitution/project-documentation.md`.
12
12
 
13
- ## Когда брать
13
+ ## When to use
14
14
 
15
- - Правило приходится повторять ещё в двух местах — пора заводить закон.
16
- - Заводится правило под уже существующий закон.
17
- - Готовый код в правиле разросся — пора выносить паттерн.
15
+ - A rule has to be repeated in two more places — time to create a law.
16
+ - A rule is created under a law that already exists.
17
+ - Ready-made code in a rule has grown — time to move it out into a pattern.
18
18
 
19
- ## Закон
19
+ ## Law
20
20
 
21
- `docs/constitution/<закон>.md`. О проекте не знает ничего: ни путей, ни имён файлов, ни
22
- привязок. Признак закона: попытка положить правило в спек домена заставляет повторить то же
23
- самое ещё в двух.
21
+ `docs/constitution/<law>.md`. Knows nothing of the project: no paths, no file names, no
22
+ bindings. The sign of a law: an attempt to put the rule into a domain spec forces repeating the
23
+ same thing in two more.
24
24
 
25
- Слой выбирается по одному вопросу: останется ли статья верной в приложении, где нет ни денег,
26
- ни локалей перевода, ни второй владеющей сущности. Останется — закон живёт в корне; не
27
- останется — это закон приложения, и он кладётся в `docs/constitution/application/<закон>.md`. Имя закона одно на
28
- оба слоя: ни `law:` в шапке правила, ни `**Законы:**` в шапке спека слоя не называют, а два
29
- закона с одним именем развели бы правило и его закон между собой.
25
+ The layer is chosen by one question: does the article stay true in an application with no
26
+ payments, no translation locales and no second owning entity. It stays — the law lives in the
27
+ root; it does not — this is an application law, and it goes to
28
+ `docs/constitution/application/<law>.md`. A law name is one for both layers: neither `law:` in
29
+ the rule header nor `**Законы:**` in the spec header names the layer, and two laws with one name
30
+ would part a rule from its law.
30
31
 
31
- Разделы: `## Зачем` (без заголовка, вводным абзацем) · `## Статьи` · `## Открытые вопросы`.
32
- Обязательны только «Статьи» — их и сверяет проверка. «Открытые вопросы» заводятся, когда
33
- вопрос есть, и стираются вместе с последним закрытым: закрытый вопрос из закона убирается, а
34
- не превращается в пустой раздел.
32
+ Sections: `## Зачем` (without a heading, as the intro paragraph) · `## Articles` ·
33
+ `## Open questions`. Only "Articles" is mandatory — that is what the check audits. "Open
34
+ questions" is created when there is a question and erased with the last one closed: a closed
35
+ question is removed from the law, not turned into an empty section.
35
36
 
36
- Даты в законе тоже нет: у одного закона из семнадцати она стояла, у остальных не появлялась
37
- никогда, а прочитанная как срок годности — старит верный текст, которого никто не трогал, потому
38
- что трогать было нечего. Ни истории правок, ни доводов о том, почему когда-то выбрали так, в
39
- законе нет. Историю
40
- держит система контроля версий, а довод с отвергнутой альтернативой — свойство работы, а не
41
- продукта: ему место в «Ловушках» правила под этим законом, где и путям к файлам можно.
42
- Утверждение, которое нельзя написать как «верно всегда», статьёй не становится вовсе.
37
+ There is no date in a law either: one law out of seventeen had one, the rest never did, and read
38
+ as an expiry it ages a correct text nobody touched, because there was nothing to touch. A law
39
+ holds neither a history of edits nor arguments for why something was once chosen so. History is
40
+ held by version control, and an argument with a rejected alternative is a trait of the work, not
41
+ of the product: its place is the "Pitfalls" of the rule under this law, where file paths are
42
+ allowed too. A statement that cannot be written as "always true" does not become an article at
43
+ all.
43
44
 
44
45
  ```markdown
45
- # Закон о поставке
46
+ # The delivery law
46
47
 
47
- Как правка доезжает до работающего приложения. …
48
+ How an edit reaches the running application. …
48
49
 
49
- ## Статьи
50
+ ## Articles
50
51
 
51
- - **Выкатывается образ того коммита, который выкатывают.** Умолчание «последний» отстаёт от
52
- главной ветки, и приложение молча возвращается к прежней версии, продолжая отвечать.
52
+ - **The image of the commit being rolled out is what gets rolled out.** The default "latest"
53
+ falls behind the main branch, and the application silently returns to the previous version
54
+ while it keeps answering.
53
55
  ```
54
56
 
55
- Раздел `## Открытые вопросы` заводится, когда вопрос есть, и стирается вместе с последним
56
- закрытым. Вопрос называется `Q-<буква закона>-<номер>`, говорит, что решение изменит, и несёт
57
- дату заведения; номер после закрытия не переиспользуется.
57
+ The `## Open questions` section is created when there is a question and erased with the last
58
+ one closed. A question is named `Q-<law letter>-<number>`, says what the decision would change
59
+ and carries its creation date; the number is not reused after closing.
58
60
 
59
- Поведение кода законом не является: «стор отвечает булевым», «метод называется `save`» — этого
60
- не видит ни гость, ни владелец. Граница простая: закон описывает то, что видно снаружи
61
- приложения. Исключение — статья об устройстве кода, которую сверяет машина: якоря читаются
62
- только под `docs/specs/` и `docs/constitution/`.
61
+ Code behaviour is not a law: "the store answers with a boolean", "the method is called `save`" —
62
+ neither a guest nor the owner sees this. The boundary is simple: a law describes what is visible
63
+ from outside the application. The exception is an article about code structure that the machine
64
+ audits: anchors are read only under `docs/specs/` and `docs/constitution/`.
63
65
 
64
- ## Правило
66
+ ## Rule
65
67
 
66
- `.claude/skills/<правило>/SKILL.md`. Привязывает закон к этому проекту; на один закон их
67
- бывает несколько.
68
+ `.claude/skills/<rule>/SKILL.md`. Binds a law to this project; there can be several per law.
68
69
 
69
70
  ```markdown
70
71
  ---
71
72
  name: git-workflow
72
73
  kind: rule
73
74
  law: delivery
74
- description: Правило под «Закон о поставке». Брать на … Готовый код — в паттернах …
75
+ description: Rule under the delivery law. Load for … Ready-made code — in patterns …
75
76
  ---
76
77
  ```
77
78
 
78
- Под шапкой стоит строка требования к соседним ресурсам — тем, без которых статьи правила не
79
- исполняются:
79
+ Under the header stands the line requiring neighbouring resources — those without which the
80
+ rule's articles are not carried out:
80
81
 
81
82
  ```markdown
82
- **Требует:** `hooks/<гард>.sh`, `checks/<проверка>.mjs`
83
+ **Requires:** `hooks/<guard>.sh`, `checks/<check>.mjs`
83
84
  ```
84
85
 
85
- Ресурсы называются именами пакета, а не путями дерева. Строки нет — правило не требует ничего;
86
- пустой она не бывает. Выводить требование из фразы в тексте нельзя: разложено у потребителя не
87
- всё, и текст, сказавший «правку отбивает гард», врёт в дереве, где гарда нет.
86
+ Resources are named by package names, not by tree paths. No line — the rule requires nothing;
87
+ it is never empty. Deriving a requirement from a phrase in the text is not allowed: not
88
+ everything is laid out at the consumer, and a text saying "a guard refuses the edit" lies in a
89
+ tree where there is no guard.
88
90
 
89
- Читается строка списком идентификаторов ресурсов, поэтому проза в ней превращается в требования,
90
- которых нет: «требует команду строки запуска и токен дерева» раскладка разбирает на два имени и
91
- печатает оба неотвеченными — в её выводе такие строки неотличимы от настоящей нехватки.
92
- Требование объявляется идентификатором ресурса либо не объявляется вовсе.
91
+ The line is read as a list of resource identifiers, so prose in it turns into requirements that
92
+ do not exist: "requires the launch command and the tree token" the layout splits into two names
93
+ and prints both as unanswered — in its output such lines cannot be told from a real shortage. A
94
+ requirement is declared by a resource identifier or not declared at all.
93
95
 
94
- Разделы: `## Как это называется здесь` · `## Где это лежит` · `## Как закон применяется
95
- здесь` · `## Чего из закона здесь нет` · `## Паттерны` · `## Ловушки`.
96
+ Sections: `## What it is called here` · `## Where it lives` · `## Flow` ·
97
+ `## How the law applies here` · `## What of the law is not here` · `## Patterns` · `## Pitfalls`.
96
98
 
97
- Сверяется только `## Как закон применяется здесь`: каждый его пункт начинается жирной фразой,
98
- и у каждой жирной фразы есть строка в `implementation.md` рядом.
99
+ Only `## How the law applies here` is audited: each of its items starts with a bold phrase,
100
+ and each bold phrase has a line in `implementation.md` next to it.
99
101
 
100
102
  ```markdown
101
- | Статья | Где исполняется |
102
- | -------------------------------------------------------------- | ----------------------------------- |
103
- | Образы выкатываются по sha коммита, а не по метке «последний». | `docker-compose.prod.yml:IMAGE_TAG` |
103
+ | Article | Where it is carried out |
104
+ | ------------------------------------------------------------- | ----------------------------------- |
105
+ | Images are rolled out by commit sha, not by the "latest" tag. | `docker-compose.prod.yml:IMAGE_TAG` |
104
106
  ```
105
107
 
106
- Утверждение, которому места в коде не нашлось, в этот раздел не ставится: оно уходит прозой в
107
- «Ловушки» или вопросом `Q-<буква закона>-<номер>` в закон.
108
+ A statement that found no place in code is not put into this section: it goes as prose to
109
+ "Pitfalls" or as a question `Q-<law letter>-<number>` to the law.
108
110
 
109
- ## Паттерн
111
+ ## Pattern
110
112
 
111
- `.claude/skills/<правило>-<что>/SKILL.md`. Минимум один на правило.
113
+ `.claude/skills/<rule>-<what>/SKILL.md`. At least one per rule.
112
114
 
113
115
  ```markdown
114
116
  ---
115
117
  name: git-workflow-commit
116
118
  kind: pattern
117
119
  rule: git-workflow
118
- description: Паттерн правила git-workflow. Брать … Не брать для … — это паттерн …
120
+ description: Pattern of rule git-workflow. Load for … Not for … — that is pattern …
119
121
  ---
120
122
  ```
121
123
 
122
- Разделы: `## Когда брать` · готовый код · `## Как пишется сама статья
124
+ Sections: `## When to use` · ready-made code · `## Common misses`. A pattern has no binding:
125
+ the check does not audit it, because there is nothing to check ready-made code against but
126
+ itself.
123
127
 
124
- **Довод при статье называет устройство, на котором он верен.** Довод стареет вместе с тем, что
125
- его вызвало: запрет писать в чужую настройку стоял на том, что слияние JSON молча теряет
126
- несовпавшее, — и был верен, пока куском была карта из двух десятков объявлений. Пришёл
127
- диспетчер, кусок стал строкой на событие, довод перестал быть верным, а стоял ещё две редакции
128
- и читался действующим запретом. Названное устройство — то, по чему при следующей правке видно,
129
- что довод пора перечитать.
128
+ ## How the article itself is written
130
129
 
131
- **Требование к шагу стоит в том разделе, который этот шаг ведёт.** Написанное ниже читается
132
- после шага: раздел об оставшемся шаге требовался и прежде, и образцы стояли готовые, — но само
133
- требование лежало ниже описания открытия заявки. Читающий доходил до открытия, открывал заявку
134
- и требования ещё не видел; выглядит это забывчивостью, а не порядком текста.
130
+ **An argument at an article names the structure on which it is true.** An argument ages with
131
+ what caused it: the ban on writing into someone else's settings stood on JSON merging silently
132
+ losing what did not match — and was true while the piece was a map of two dozen declarations.
133
+ A dispatcher came, the piece became one line per event, the argument stopped being true, yet
134
+ it stood for two more editions and read as a current ban. The named structure is what shows,
135
+ at the next edit, that the argument is due for rereading.
135
136
 
136
- **Статья о непроверяемом называет, какое именно средство её не берёт.** «Проверить машиной
137
- нечем» стареет вместе с тем, чем проверяли: тело заявки не читает сверка очереди работ — и это
138
- было записано как «не читает никто», хотя гард поставки разбирает ту же строку команды и по ней
139
- судит заголовок. Названное средство даёт следующей правке точку, от которой отсчитывать.
137
+ **A requirement for a step stands in the section that leads that step.** What is written below
138
+ is read after the step: the section about the remaining step was required before too, and the
139
+ samples stood ready — but the requirement itself lay below the description of opening the PR.
140
+ The reader got to the opening, opened the PR and had not yet seen the requirement; it looks like
141
+ forgetfulness, not like the order of the text.
140
142
 
141
- ## Частые промахи`. Привязки у паттерна нет:
142
- проверка его не сверяет, потому что сверять готовый код с ним самим нечем.
143
+ **An article about the uncheckable names which tool exactly does not catch it.** "There is
144
+ nothing to check it by machine" ages with what was used for checking: the work queue audit does
145
+ not read the PR body — and that was written down as "nobody reads it", although the delivery
146
+ guard parses the same command line and judges the title by it. The named tool gives the next
147
+ edit a point to count from.
143
148
 
144
- ## Описание: триста знаков и один вопрос
149
+ ## Description: three hundred characters and one question
145
150
 
146
- Описание правила и паттерна едет в системный промпт каждого захода целиком — за него платит
147
- всякий заход, чем бы ни занимался. Отвечает оно на один вопрос: брать это или нет.
151
+ The description of a rule and a pattern goes whole into the system prompt of every session —
152
+ every session pays for it, whatever it works on. It answers one question: load this or not.
148
153
 
149
- | В описании | Не в описании |
150
- | --------------------------------------------------- | ---------------------------------------------- |
151
- | под каким законом правило | пересказ его статей |
152
- | когда брать — путями правки или именем предмета | перечисление разделов |
153
- | у паттерна — когда не брать, с именем соседнего | довод, зачем правило заведено |
154
- | имена паттернов при правиле | их содержимое |
154
+ | In the description | Not in the description |
155
+ | ------------------------------------------------------ | ----------------------------------- |
156
+ | which law the rule is under | a retelling of its articles |
157
+ | when to load — by edit paths or by the subject name | a list of sections |
158
+ | for a pattern — when not to load, naming the neighbour | an argument for why the rule exists |
159
+ | pattern names at a rule | their content |
155
160
 
156
- Считает длину проверка описаний: она называет превысивших поимённо, с числом знаков. Описание,
157
- которое иначе перестанут находить по своей теме, оставляют длиннее предела — и тогда имя скила
158
- встаёт в перечень принятого долга с причиной, чтобы молчаливое превышение и осознанное не
159
- выглядели одинаково.
161
+ The descriptions check counts the length: it names those over the limit by name, with the
162
+ character count. A description that would otherwise stop being found by its subject is left
163
+ longer than the limit — and then the name of the rule or pattern goes into the accepted-debt
164
+ list with a reason, so that a silent overrun and a deliberate one do not look the same.
160
165
 
161
- ## Порядок
166
+ ## Order
162
167
 
163
- 1. Статья пишется в закон — без путей и имён файлов.
164
- 2. Правило объявляет закон в шапке и называет то же самое в терминах этого дерева.
165
- 3. Каждое утверждение правила получает строку в `implementation.md`; якорь проверяется
166
- открытием файла, а не памятью.
167
- 4. Готовый код уезжает в паттерн, а правило на него ссылается.
168
- 5. `npm run check:specs` — до пуша.
168
+ 1. The article is written into the law — without paths or file names.
169
+ 2. The rule declares the law in its header and names the same thing in this tree's terms.
170
+ 3. Every statement of the rule gets a line in `implementation.md`; the anchor is checked by
171
+ opening the file, not from memory.
172
+ 4. Ready-made code leaves for a pattern, and the rule refers to it.
173
+ 5. `npm run check:specs` — before the push.
169
174
 
170
- ## Сжатие статьи: живой образец
175
+ ## Compressing an article: a live sample
171
176
 
172
- Форма — в правиле рядом; здесь одна настоящая статья до и после, с числами. Взята из правила о
173
- проверке компонента: 1110 знаков, из них утверждение — 90.
177
+ The shape is in the rule next to it; here is one real article before and after, with numbers.
178
+ Taken from the rule on checking a component: 1110 characters, of which the statement is 90.
174
179
 
175
- **До.** Утверждение, механизм, два случая из замера, отвергнутое лекарство, следствие в эталоне:
180
+ **Before.** The statement, the mechanism, two cases from the measurement, a rejected cure, the
181
+ consequence in the reference:
176
182
 
177
183
  ```markdown
178
- - **Съёмка за пределы окна трогает страницу под затвором, и лечится это не циклом, а окном.**
179
- Кадр целой страницы шире или выше окна браузер снимает, подменив окно на время кадра: страница
180
- получает `resize`, и всё, что от размеров окна считается, съезжает прямо в кадре. Замер поймал
181
- это дважды в одной задаче — лента просмотрщика фото теряла прокрутку, и в кадр попадал первый
182
- снимок набора вместо последнего; высота страницы уезжала на два пикселя. Успевает ли сдвиг лечь
183
- в растр, решает гонка, поэтому одна и та же история то краснеет, то нет… Цикл до совпадения
184
- двух кадров подряд тут не лекарство, а закрепление поломки: сдвиг устойчив… Лечится обратным
185
- порядком — окно раздвигается до страницы **до** кадра…
184
+ - **A shot beyond the window touches the page under the shutter, and the cure is not a loop but
185
+ the window.** A frame of a whole page wider or taller than the window the browser takes by
186
+ swapping the window for the duration of the frame: the page gets a `resize`, and everything
187
+ computed from the window size shifts right in the frame. The measurement caught this twice in
188
+ one task — the photo viewer strip lost its scroll, and the frame got the first snapshot of the
189
+ set instead of the last; the page height drifted by two pixels. Whether the shift lands in the
190
+ raster is decided by a race, so the same story turns red or not… A loop until two frames in a
191
+ row match is no cure here but a fixing of the breakage: the shift is stable… The cure is the
192
+ reverse order — the window is widened to the page **before** the frame…
186
193
  ```
187
194
 
188
- **После — 517 знаков, то же решение:**
195
+ **After — 517 characters, the same decision:**
189
196
 
190
197
  ```markdown
191
- - **Съёмка за пределы окна трогает страницу под затвором, и лечится это не циклом, а окном.**
192
- Кадр шире или выше окна браузер снимает, подменив окно: страница получает `resize`, и всё, что
193
- считается от размеров окна, съезжает прямо в кадре. Цикл до двух совпавших кадров тут не
194
- лекарство, а закрепление поломки — сдвиг устойчив. Окно раздвигается до страницы **до** кадра,
195
- показ ждут вставшим, и снимается обычный кадр; в эталоне `100vh` и `100vw` считаются от
196
- раздвинутого окна. Ловушки — в холодной части.
198
+ - **A shot beyond the window touches the page under the shutter, and the cure is not a loop but
199
+ the window.** A frame wider or taller than the window the browser takes by swapping the window:
200
+ the page gets a `resize`, and everything computed from the window size shifts right in the
201
+ frame. A loop until two frames match is no cure here but a fixing of the breakage — the shift
202
+ is stable. The window is widened to the page **before** the frame, the render is waited for to
203
+ settle, and an ordinary frame is taken; in the reference `100vh` and `100vw` count from the
204
+ widened window. Pitfalls — in the cold part.
197
205
  ```
198
206
 
199
- **Куда уехал остаток — 593 знака в `pitfalls.md`:** какая именно история краснела, сколько раз,
200
- на сколько пикселей уезжала высота, почему виноватой всякий раз выглядела другая история и
201
- почему это читается как плавающая вёрстка. Ни одно решение по правке на этом не стоит: оно
202
- нужно тому, кто разбирает красный снимок, — и грузится тогда же.
203
-
204
- **Что осталось при статье:** утверждение целиком, механизм одной фразой, отвергнутое лекарство
205
- (без него следующий заход заведёт тот же цикл заново) и следствие в эталоне — оно меняет то, как
206
- пишут историю.
207
-
208
- ## Частые промахи
209
-
210
- - Проверка требования «шаг делается» поставлена на вызов самого шага. Гард, привязанный к
211
- вызову, ловит форму сделанного и не видит несделанного вовсе: снятие черновика, которого не
212
- было, не даёт ему ни одного события. У такого требования проверка стоит на завершении хода —
213
- там видно, чего за ход не случилось.
214
- - Привязка называет одно место исполнения, а исполняют утверждение несколько сторон. Сверка
215
- смотрит наличие строки, а не полноту списка: договорённость обещала объявление нескольких
216
- событий, привязка вела в сборку настройки, а диспетчер читал одно — и молчали обе стороны.
217
- Статья, чьё утверждение исполняют несколько мест, называет их все.
218
- - Список, названный деревом, лежит в компаньоне, а общий довод — в самом правиле. В контекст
219
- общий довод приходит всегда, а список — только когда его прочитали, и проигрывает он в ту же
220
- минуту, когда решение принимают по памяти. Всякий раз, когда правило требует «список назван
221
- деревом», оно требует и того, чтобы список читали раньше общих слов, — и говорит это прямо.
222
-
223
- - Закон назвал файл проекта — проверка отбивает. Путям место в правиле.
224
- - Спутник с привязкой лежит рядом с законом: он привязывает закон к этому проекту, а зелёная
225
- проверка это утвердит, потому что структура совпадёт с тем, чего проверка сама и ждёт.
226
- - Якорь ведёт в мёртвый символ: объявлен и больше нигде не встречается. Так пять правил про
227
- правку сущности оказались привязаны к механике, которую не зовёт ни один экран.
228
- - Утверждение переформулировали, а строку в привязке не тронули: связь идёт по тексту, и
229
- проверка перестанет её находить.
230
- - Пустая привязка отбивается сверкой спеков, и вердикт для неё нужен дословный: принимаются
231
- «Не исполняется», «Не применимо», «Не проверяется». Фраза своими словами — «держится текстом»,
232
- «проверяется глазами» — вердиктом не считается, и узнаётся это отказом сверки.
233
- - Строка привязки дописана в конец компаньона, а не вставлена в таблицу. После таблицы там идут
234
- ещё разделы — «Чем это проверяется», «Что ещё стоит знать при чтении кода», — и приписанная в
235
- конец строка в таблицу не попадает вовсе: утверждение читается непривязанным, а сверка спеков
236
- на это молчит, потому что ищет строку в таблице. Место строки то же, что у её утверждения в
237
- правиле: порядок обеих сторон держится одинаковым, иначе утверждение и его привязка перестают
238
- находиться друг по другу.
239
- - В `description` не сказано, когда паттерн **не** брать, — соседний паттерн того же правила
240
- становится неотличимым.
241
- - Блок готового кода принят по виду, а не сверкой с объявлением. Вызов в примере повторяет имя,
242
- число и порядок параметров живой функции: двухпараметрный вызов выглядел правдоподобно ровно
243
- до того, как рядом открыли четырёхпараметрное объявление. Тем же проходом сверяется форма
244
- кода — пример, объявляющий поля не так, как их объявляет дерево, учит нарушать правило о
245
- языке, и запрещающее правило про это не узнает.
207
+ **Where the rest went — 593 characters in `pitfalls.md`:** which story exactly turned red, how
208
+ many times, by how many pixels the height drifted, why a different story looked guilty each time
209
+ and why this reads as floating layout. Not one edit decision stands on this: it is needed by
210
+ whoever reviews a red snapshot — and loads at that moment.
211
+
212
+ **What stayed at the article:** the whole statement, the mechanism in one phrase, the rejected
213
+ cure (without it the next session creates the same loop again) and the consequence in the
214
+ reference — it changes how a story is written.
215
+
216
+ ## Common misses
217
+
218
+ - The check of the requirement "the step is done" is placed on the call of the step itself. A
219
+ guard bound to the call catches the shape of what was done and does not see what was not done
220
+ at all: leaving a draft that never was gives it not a single event. Such a requirement is
221
+ checked at the end of the turn — there it shows what did not happen during the turn.
222
+ - The binding names one place where the statement is carried out, while several sides carry it
223
+ out. The audit looks for the presence of a line, not the completeness of the list: the
224
+ agreement promised declaring several events, the binding led to the settings assembly, and the
225
+ dispatcher read one — and both sides stayed silent. An article whose statement is carried out
226
+ in several places names them all.
227
+ - The list named by the tree lies in the companion, and the general argument in the rule itself.
228
+ The general argument always reaches the context, the list only when it was read, and it loses
229
+ the minute the decision is made from memory. Whenever a rule requires "the list is named by the
230
+ tree", it also requires that the list be read before the general words — and says so directly.
231
+
232
+ - A law named a project file — the check refuses. Paths belong in the rule.
233
+ - A sidecar with a binding lies next to the law: it binds the law to this project, and a green
234
+ check will confirm that, because the structure matches what the check itself expects.
235
+ - The anchor leads to a dead symbol: declared and found nowhere else. That is how five rules on
236
+ entity editing turned out bound to a mechanism no screen calls.
237
+ - The statement was reworded and the binding line was not touched: the link goes by text, and
238
+ the check stops finding it.
239
+ - An empty binding is refused by the spec audit, and its verdict must be verbatim: accepted are
240
+ `Не исполняется`, `Не применимо`, `Не проверяется`. A phrase in one's own words — "held by
241
+ text", "checked by eye" — does not count as a verdict, and this is learned from the audit's
242
+ refusal.
243
+ - A binding line was appended to the end of the companion instead of inserted into the table.
244
+ More sections follow the table there — "What checks it", "What else to know when reading the
245
+ code" — and a line appended at the end does not make the table at all: the statement reads as
246
+ unbound, and the spec audit is silent about it, because it looks for the line in the table.
247
+ The line's place is the same as its statement's in the rule: the order of both sides is kept
248
+ the same, otherwise the statement and its binding stop being found by one another.
249
+ - The `description` does not say when **not** to load the pattern — the neighbouring pattern of
250
+ the same rule becomes indistinguishable.
251
+ - A block of ready-made code was accepted by its look, not by checking against the declaration.
252
+ The call in the sample repeats the name, number and order of the live function's parameters: a
253
+ two-parameter call looked plausible exactly until the four-parameter declaration was opened
254
+ next to it. The same pass checks the shape of the code — a sample declaring fields unlike the
255
+ tree declares them teaches breaking the language rule, and the rule that forbids it will not
256
+ know.