@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
@@ -1,82 +1,86 @@
1
1
  ---
2
2
  name: agent-kit-extend
3
- description: Готовые примеры того, как дерево дописывает своё поверх пакета правил. Брать, когда пакетный текст говорит не то, что верно здесь, гейт требует не то правило или гард судит не по тем путям. Раскладка и настройки — скил agent-kit; форма нового скила — write-a-skill.
3
+ description: Ready-made examples of how a tree adds its own on top of the rules package. Load when the package text says something that is not true here, the gate demands the wrong rule or a guard judges by the wrong paths. Layout and settings — skill agent-kit; the shape of a new skill — write-a-skill.
4
4
  ---
5
5
 
6
- # Как дописать своё поверх пакета
6
+ # How to add your own on top of the package
7
7
 
8
- Скил `agent-kit` называет, **где** настраивается каждый род правки. Здесь — **как** выглядит
9
- сама правка, на готовых примерах, и чем каждая проверяется.
8
+ The skill `agent-kit` names **where** each kind of edit is set up. Here is **how** the edit
9
+ itself looks, on ready-made samples, and what checks each of them.
10
10
 
11
- Одно правило общее для всех пяти: разложенный файл не правится на месте. Он несёт шапку
12
- `rt-kit v… · <ресурс> · <сумма>`, правка в нём теряется на следующей раскладке и до тех пор
13
- выглядит применённой, а `sync` на такой файл отказывает вместо того, чтобы переписать молча.
11
+ One rule is shared by all five: a laid-out file is not edited in place. It carries the header
12
+ `rt-kit v… · <resource> · <checksum>`, an edit in it is lost on the next layout and until then
13
+ looks applied, and `sync` refuses such a file instead of overwriting it silently.
14
14
 
15
- ## Когда брать
15
+ ## When to use
16
16
 
17
- - Пакетный текст говорит не то, что верно здесь: имена, пути, приёмы этого дерева.
18
- - Гейт требует под файл не то правило — или молчит там, где правило есть.
19
- - Гард судит не по тем путям: чужие корни, свой набор проверок, своя форма ветки.
20
- - Заводится своё — признак единообразия, проверка, закон с правилом, — чего пакет не везёт.
17
+ - The package text says something that is not true here: the names, paths and techniques of
18
+ this tree.
19
+ - The gate demands the wrong rule for a file — or stays silent where there is a rule.
20
+ - A guard judges by the wrong paths: foreign roots, its own set of checks, its own branch form.
21
+ - Something of your own is started — a uniformity sign, a check, a law with a rule — which the
22
+ package does not ship.
21
23
 
22
- ## Текст: надстройка сливается по разделам
24
+ ## Text: an override merges by section
23
25
 
24
- Файл кладётся в `overrides/<идентификатор ресурса>` — путь повторяет ресурс один в один:
25
- `rules/testing.md` надстраивается файлом `rules/testing.md`.
26
+ The file goes to `overrides/<resource identifier>` — the path repeats the resource one to one:
27
+ `rules/testing.md` is overridden by the file `rules/testing.md`.
26
28
 
27
29
  ```markdown
28
- ## Ловушки этого дерева
30
+ ## Pitfalls of this tree
29
31
 
30
- - **Снимок дерева правится тем же коммитом, что и объявление.** Иначе установка у соседа
31
- ставит не то, что стоит здесь.
32
+ - **The tree snapshot is edited by the same commit as the declaration.** Otherwise the
33
+ installation at a neighbour installs something other than what stands here.
32
34
  ```
33
35
 
34
- | Заголовок в надстройке | Что происходит |
35
- | ---------------------- | ------------------------- |
36
- | есть у пакета | раздел замещается целиком |
37
- | нет у пакета | дописывается в конец |
38
- | есть, но тело пустое | раздел пакета снимается |
36
+ | Heading in the override | What happens |
37
+ | ----------------------- | ------------------------------- |
38
+ | the package has it | the section is replaced in full |
39
+ | the package lacks it | appended at the end |
40
+ | has it, but the body is empty | the package section is lifted |
39
41
 
40
- **Замещение — целиком, и это главная ловушка.** Свой пункт, дописанный под пакетным заголовком
41
- `## Ловушки`, уносит все пакетные пункты этого раздела разом, и пропажу не видно ничем: файл
42
- выглядит собранным. Поэтому заголовок в примере выше свой. Пакетный заголовок берут только
43
- тогда, когда пакетный текст здесь неверен и его правда надо снять.
42
+ **Replacement is in full, and that is the main pitfall.** Your own item, added under the package
43
+ heading `## Pitfalls`, carries away all package items of this section at once, and the loss is
44
+ visible by nothing: the file looks assembled. That is why the heading in the sample above is your
45
+ own. The package heading is taken only when the package text is wrong here and really has to be
46
+ lifted.
44
47
 
45
- **Заголовок, стоящий внутри примера, разделом не является.** Разбор пропускает всё, что лежит
46
- в ограде блока кода: образец документа с собственными заголовками рвал бы ресурс на куски.
47
- Поэтому надстройка, названная таким заголовком, не замещает ничего — она попадает в строку «нет
48
- у пакета» и дописывается новым разделом в конец. Правка при этом выглядит сработавшей: файл
49
- собран, `sync --check` зелёный, а нужный абзац остался прежним.
48
+ **A heading standing inside a sample does not count as a section.** The parser skips everything
49
+ lying inside a code fence: a document sample with headings of its own would tear the resource
50
+ into pieces. So an override named by such a heading replaces nothing — it falls into the line
51
+ "the package lacks it" and is appended as a new section at the end. The edit looks as if it
52
+ worked: the file is assembled, `sync --check` is green, and the needed paragraph stayed as it was.
50
53
 
51
- Дотягиваются до него заголовком того раздела, внутри которого он лежит, — и замещают этот
52
- раздел целиком, вместе с примером:
54
+ It is reached by the heading of the section it lies inside — and that section is replaced in
55
+ full, together with the sample:
53
56
 
54
57
  ````bash
55
- # какие заголовки у ресурса на самом деле — примеры в ограде сюда не попадают
56
- awk '/^```/ { fence = !fence } !fence && /^## / { print }' <файл ресурса>
58
+ # which headings the resource really has — samples inside a fence do not get here
59
+ awk '/^```/ { fence = !fence } !fence && /^## / { print }' <resource file>
57
60
  ````
58
61
 
59
- Проверяется раскладкой: `sync`, затем `sync --check` — и глазами по разложенному файлу, на
60
- месте ли пакетные разделы.
62
+ Checked by the layout: `sync`, then `sync --check` — and by eye over the laid-out file, whether
63
+ the package sections are in place.
61
64
 
62
- От ресурса целиком отказываются не здесь, а списком `skip` в конфиге: надстройка правит текст,
63
- `skip` отменяет файл.
65
+ A resource is dropped in full not here but by the `skip` list in the config: an override edits
66
+ the text, `skip` cancels the file.
64
67
 
65
- ## Надстройку карты гейта не проверяет ничто
68
+ ## Nothing checks a gate map override
66
69
 
67
- Сценарии пакета гоняют его умолчание и веток дерева не касаются: своих проб у надстройки нет, и
68
- места для них тоже. Карта решает, какое правило грузится под каждую правку, то есть чем заход
69
- руководствуется в работе, а держится она прогоном руками и памятью того, кто её правил.
70
+ The package scenarios run its default and do not touch the tree's branches: the override has no
71
+ tests of its own, and no place for them either. The map decides which rule is loaded under each
72
+ edit, that is, what the session is guided by in its work, and it is held by a run by hand and by
73
+ the memory of whoever edited it.
70
74
 
71
- Промах в ней молчит: неверная ветка не отказывает, а тихо отдаёт не то правило — заметен он
72
- только по объёму загруженного и по тому, что в загруженном не нашлось ответа. Поэтому правка
73
- карты кончается вызовом гейта на трёх путях: на том, ради которого правили, на соседнем,
74
- который правка задеть не должна была, и на файле, у которого правила нет вовсе.
75
+ A miss in it is silent: a wrong branch does not refuse but quietly returns the wrong rule — it
76
+ is noticed only by the volume loaded and by the fact that the loaded text held no answer. So an
77
+ edit of the map ends with a call of the gate on three paths: the one the edit was made for, a
78
+ neighbouring one that the edit should not have touched, and a file that has no rule at all.
75
79
 
76
- ## Гейт: своя ветка решает раньше умолчания
80
+ ## Gate: your own branch decides before the default
77
81
 
78
- Гейт спрашивает `skill_for` — она печатает имя правила или молчит. Молчание значит «правила на
79
- это нет», и правка проходит.
82
+ The gate asks `skill_for` — it prints the rule name or stays silent. Silence means "there is no
83
+ rule for this", and the edit passes.
80
84
 
81
85
  ```bash
82
86
  skill_for() {
@@ -85,33 +89,35 @@ skill_for() {
85
89
  case "$kind" in
86
90
  edit)
87
91
  case "$target" in
88
- # Частное — всегда раньше общего: файл истории не файл компонента.
92
+ # The specific is always before the general: a story file is not a component file.
89
93
  *.stories.ts) printf '%s\n' 'showcase'; return 0 ;;
90
94
  esac
91
95
  ;;
92
96
  esac
93
97
 
94
- # Всё остальное разбирает умолчание пакета — иначе оно теряется целиком.
98
+ # Everything else is handled by the package default — otherwise it is lost in full.
95
99
  command -v skill_for_default >/dev/null 2>&1 && skill_for_default "$kind" "$target" "$written"
96
100
 
97
101
  return 0
98
102
  }
99
103
  ```
100
104
 
101
- Две вещи здесь обязательны. **Порядок веток:** первое совпадение выигрывает, и общая ветка,
102
- поставленная выше частной, съедает её молча. **Вызов умолчания:** объявив функцию заново и не
103
- позвав `_default`, дерево остаётся без всех пакетных веток сразу — а выглядит это как «гейт
104
- перестал требовать правила».
105
+ Two things here are mandatory. **The order of branches:** the first match wins, and a general
106
+ branch placed above a specific one eats it silently. **The call of the default:** having
107
+ redeclared the function without calling `_default`, the tree is left without all package
108
+ branches at once — and it looks like "the gate stopped demanding rules".
105
109
 
106
- Проверяется сценариями гейта из набора пакета: они гоняют карту, ничего не раскладывая.
110
+ Checked by the gate scenarios from the package suite: they run the map without laying anything
111
+ out.
107
112
 
108
- ## Гард: профиль отвечает за имена и команды
113
+ ## Guard: the profile answers for names and commands
109
114
 
110
- Тем же приёмом объявляются функции профиля — что гонять перед пушем, какой документ едет парой,
111
- чем линтуется файл, что здесь считается кодом приложения, какая форма ветки законна.
115
+ The profile functions are declared by the same technique — what to run before a push, which
116
+ document goes as a pair, what lints a file, what counts as application code here, which branch
117
+ form is lawful.
112
118
 
113
119
  ```bash
114
- # Какой документ обязан ехать тем же коммитом. Печатает образец пути или молчит.
120
+ # Which document must go in the same commit. Prints a path sample or stays silent.
115
121
  rt_docs_pair_for() {
116
122
  case "$1" in
117
123
  *.spec.ts) return 0 ;;
@@ -120,17 +126,18 @@ rt_docs_pair_for() {
120
126
  }
121
127
  ```
122
128
 
123
- Печатается **образец**, а не путь: гард сверяет им состав коммита. Умолчание зовётся так же —
124
- `rt_docs_pair_for_default "$@"` — везде, где своё правило случай не закрыло.
129
+ A **sample** is printed, not a path: the guard checks the commit content against it. The default
130
+ is called the same way — `rt_docs_pair_for_default "$@"` — wherever your own rule did not cover
131
+ the case.
125
132
 
126
- Путь приходит от корня дерева. Признак по подстроке вида `*/projects/*` совпадает и с чужим
127
- каталогом за пределами репозитория — так запись в домашний каталог была отбита требованием
128
- замысла, к ней не относящимся.
133
+ The path comes from the tree root. A substring sign like `*/projects/*` also matches a foreign
134
+ directory outside the repository — that is how a write to the home directory was refused by a
135
+ plan requirement that did not apply to it.
129
136
 
130
- ## Признаки и проверки: данные, а не код
137
+ ## Signs and checks: data, not code
131
138
 
132
- Признак единообразия — данные. Дерево называет наборы пакета, чьё готовое оно берёт, и
133
- дописывает свои файлом; совпавший ключ замещает пакетный.
139
+ A uniformity sign is data. The tree names the package bundles whose ready-made it takes, and
140
+ adds its own by a file; a matching key replaces the package one.
134
141
 
135
142
  ```json
136
143
  {
@@ -139,46 +146,55 @@ rt_docs_pair_for() {
139
146
  }
140
147
  ```
141
148
 
142
- Объект сливается ключ за ключом: назвав один ключ раздела, дерево не теряет соседних. **Список
143
- — наоборот, замещается целиком**, и это ловушка: назвав `sourceRoots`, дерево получает ровно
144
- названное, а не пакетные корни плюс свои. «Дописать в список» и «убрать из списка» в этой записи
145
- неразличимы, поэтому список всегда пишется полностью.
146
-
147
- Набор объявляется по тому, что дерево **потребляет**. Дерево, в котором кит написан, а не
148
- позван, объявив его набор, получит советы звать кит на файлах самого кита: признак верен, но
149
- обращён не туда.
150
-
151
- ## Свой закон и правило
152
-
153
- Пакет везёт слой правил, но не запрещает свой. Закон дерева ложится рядом с пакетными, правило
154
- под него — среди скилов, и связь идёт через шапку: у правила `law:` с именем закона, у паттерна
155
- `rule:` с именем правила. Имя, которому ничего не отвечает, отбивает сверку связности.
156
-
157
- Утверждение правила получает строку в спутнике `implementation.md` — привязку к файлу и символу.
158
- Утверждение, которому места в коде не нашлось, в проверяемый раздел не ставится: ему место в
159
- «Ловушках» прозой.
160
-
161
- Проверяется сверкой спеков — до пуша.
162
-
163
- ## Частые промахи
164
-
165
- - **Правка на месте вместо надстройки.** Разложенный файл узнаётся по шапке, а не по каталогу:
166
- раскладка ложится в те же `tools/` и `.claude/`, где лежит своё.
167
- - **Свой пункт дописан к пакетному заголовку** — пакетные пункты этого раздела ушли молча.
168
- - **Надстройка названа заголовком, который стоит в примере.** Заместить она ничего не может —
169
- такого раздела у ресурса нет, — и уезжает новым разделом в конец. Видно это глазами по
170
- разложенному файлу: два одинаковых заголовка, один в ограде примера, другой последним
171
- разделом; раскладка при этом зелёная, потому что расхождения с пакетом нет.
172
- - **Функция объявлена заново без вызова `_default`** — вместе со своим случаем потеряны все
173
- пакетные.
174
- - **Общая ветка карты стоит выше частной** — частная не выполняется никогда.
175
- - **Замена по шаблону в файле оболочки** — `case` теряет свою `esac`, и гард с ошибкой синтаксиса
176
- отвечает ненулевым кодом, то есть «правка отбита». После правки — `bash -n`.
177
- - **Правка ресурса пакета без сборки.** Строка запуска читает собранное, а не исходники:
178
- порядок всегда один — правка, сборка, `sync`.
179
- - **Форматтер правит ресурс на коммите, и раскладка отстаёт задним числом.** Разложенное
180
- сходилось в ту минуту, когда его раскладывали, а ресурс изменился после: пример с оградой
181
- внутри примера форматтер переписывает на ограду длиннее, сумма ресурса меняется, и
182
- `sync --check` краснеет уже на следующем шаге. Порядок обхода: прогнать форматтер на
183
- правленом ресурсе, потом `sync`, потом коммит — либо переразложить и добавить в тот же
184
- коммит.
149
+ An object merges key by key: having named one key of a section, the tree does not lose the
150
+ neighbouring ones. **A list, on the contrary, is replaced in full**, and that is a pitfall:
151
+ having named `sourceRoots`, the tree gets exactly what it named, not the package roots plus its
152
+ own. "Add to the list" and "remove from the list" are indistinguishable in this notation, so a
153
+ list is always written in full.
154
+
155
+ A bundle is declared by what the tree **consumes**. A tree in which the kit is written, not
156
+ called, having declared its bundle, gets advice to call the kit on the files of the kit itself:
157
+ the sign is right, but pointed the wrong way.
158
+
159
+ A tree that both writes and calls the ready-made does not have to choose between noise and
160
+ silence: the sign has a reverse path sample — `exceptNamed` — and by it the source folders of
161
+ the ready-made are taken out, not the bundle as a whole. Inside the bundle, bypassing the
162
+ ready-made is caught after that as at a consumer, and the folder where that ready-made is written
163
+ gets no sign. The sample is read the same way by the sweeping check and by the guard on an edit.
164
+
165
+ ## Your own law and rule
166
+
167
+ The package ships a rules layer but does not forbid your own. A law of the tree lies next to the
168
+ package ones, the rule under it — in the skills directory, and the link goes through the
169
+ frontmatter: a rule has `law:` with the law name, a pattern has `rule:` with the rule name. A
170
+ name nothing answers to refuses the consistency audit.
171
+
172
+ A statement of the rule gets a line in the companion `implementation.md` — a binding to a file
173
+ and a symbol. A statement that found no place in the code is not put into the checked section:
174
+ its place is in "Pitfalls" as prose.
175
+
176
+ Checked by the spec audit — before the push.
177
+
178
+ ## Common misses
179
+
180
+ - **An in-place edit instead of an override.** A laid-out file is recognised by the header, not
181
+ by the directory: the layout lands in the same `tools/` and `.claude/` where your own lies.
182
+ - **Your own item added to a package heading** — the package items of this section left silently.
183
+ - **The override is named by a heading that stands inside a sample.** It can replace nothing —
184
+ the resource has no such section — and goes as a new section to the end. It is visible by eye
185
+ in the laid-out file: two identical headings, one inside a sample fence, the other as the last
186
+ section; the layout is green at that, because there is no divergence from the package.
187
+ - **The function is redeclared without a call of `_default`** — together with your own case all
188
+ package ones are lost.
189
+ - **A general branch of the map stands above a specific one** — the specific one never runs.
190
+ - **A pattern replacement in a shell file** — `case` loses its `esac`, and the guard with a
191
+ syntax error answers with a non-zero code, that is, "the edit is refused". After the edit —
192
+ `bash -n`.
193
+ - **An edit of a package resource without a build.** The launch line reads the built output, not
194
+ the sources: the order is always one — edit, build, `sync`.
195
+ - **The formatter edits the resource on commit, and the layout falls behind after the fact.**
196
+ The laid-out matched at the minute it was laid out, and the resource changed after: the
197
+ formatter rewrites a sample with a fence inside a sample to a longer fence, the resource
198
+ checksum changes, and `sync --check` turns red already on the next step. The way around: run
199
+ the formatter on the edited resource, then `sync`, then commit — or lay out again and add to
200
+ the same commit.