@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,296 +2,315 @@
2
2
  name: spec-driven
3
3
  kind: rule
4
4
  law: project-documentation
5
- description: Правило под «Закон о документации проекта». Брать при правке спеков, законов и любого скила. Называет три слоя — закон, правило, паттерн, — обязательные разделы, привязку к коду и связь сценариев с тестами. Паттерны: spec-driven-domain, spec-driven-rule.
5
+ description: Rule under the project-documentation law. Load when editing specs, laws and any skill. Names the three layers — law, rule, pattern — the mandatory sections, the binding to code and the link between scenarios and tests. Patterns spec-driven-domain, spec-driven-rule.
6
6
  ---
7
7
 
8
- # Документация проекта — как это устроено здесь
8
+ # Project documentation — how it works here
9
9
 
10
- Правило под закон `docs/constitution/project-documentation.md`. Закон говорит, что должно
11
- быть верно про тексты; здесь — из каких слоёв они сложены в этом дереве и что сверяет машина.
12
- Формулировки — правило `doc-style` под тем же законом.
10
+ Rule under the law `docs/constitution/project-documentation.md`. The law says what must be true
11
+ about texts; here — which layers they are built from in this tree and what the machine checks.
12
+ Wording is the rule `doc-style` under the same law.
13
13
 
14
- **Холодная часть:** `pitfalls.md` рядом — ловушки, грабли, на которые уже наступали.
15
- Грузится по требованию, а не вместе с правилом.
14
+ **Cold part:** `pitfalls.md` next to it — traps already stepped on. Loaded on demand, not together
15
+ with the rule.
16
16
 
17
- ## Как это называется здесь
17
+ ## What it is called here
18
18
 
19
19
  ```
20
- ЗАКОН docs/constitution/<закон>.md — верен для любого приложения этого класса
21
- docs/constitution/application/<закон>.md — закон приложения: деньги, локали, доступ
22
- о проекте не знает ничего: ни путей, ни имён файлов, ни привязок
23
-
24
- ├─ ПРАВИЛО .claude/skills/<правило>/SKILL.md (kind: rule, law: <закон>)
25
- │ привязывает закон к этому проекту; несколько правил на закон
26
- │ .claude/skills/<правило>/implementation.md — привязка к коду
27
- │ .claude/skills/<правило>/pitfalls.md — холодная часть: грузится по требованию
20
+ LAW docs/constitution/<law>.md — true for any application of this class
21
+ docs/constitution/application/<law>.md — an application law: payments, locales, access
22
+ knows nothing of the project: no paths, no file names, no bindings
23
+
24
+ ├─ RULE .claude/skills/<rule>/SKILL.md (kind: rule, law: <law>)
25
+ │ binds the law to this project; several rules per law
26
+ │ .claude/skills/<rule>/implementation.md — binding to code
27
+ │ .claude/skills/<rule>/pitfalls.md — cold part: loaded on demand
28
28
  │
29
- │ └─ ПАТТЕРН .claude/skills/<правило>-<что>/SKILL.md (kind: pattern, rule: <правило>)
30
- │ готовый код и конкретные приёмы; минимум один на правило
29
+ │ └─ PATTERN .claude/skills/<rule>-<what>/SKILL.md (kind: pattern, rule: <rule>)
30
+ │ ready-made code and concrete techniques; at least one per rule
31
31
  │
32
- └─ СПЕК ДОМЕНА docs/specs/<домен>/
33
- как работает домен; объявляет законы, которые применяет
32
+ └─ DOMAIN SPEC docs/specs/<domain>/
33
+ how the domain works; declares the laws it applies
34
34
 
35
- СКИЛ БЕЗ ЗАКОНА .claude/skills/<имя>/SKILL.md (ни kind: rule, ни kind: pattern)
36
- стоит рядом с лестницей, а не в ней: он не про то, что должно быть
37
- верно в продукте, а про то, как здесь делается работа
35
+ SKILL WITHOUT A LAW .claude/skills/<name>/SKILL.md (neither kind: rule nor kind: pattern)
36
+ stands next to the ladder, not in it: not about what must be true
37
+ in the product, but about how work is done here
38
38
  ```
39
39
 
40
- Ссылки идут только снизу вверх: закон не ссылается ни на правило, ни на спек, ни на файл.
40
+ Links go only upward: a law refers neither to a rule, nor to a spec, nor to a file.
41
41
 
42
- Скил без закона — третий случай, и он законный. Витрина, генератор, работа с чужим сервисом,
43
- заведение самого скила: над таким нет утверждения о продукте, а значит нет и закона. Выдумывать
44
- ему закон, чтобы уложить в лестницу, нельзя — закон, у которого одно правило и ни одной статьи о
45
- продукте, разъезжается с остальными при первой же правке. Как такой скил заводится — скил
46
- `write-a-skill`.
42
+ A skill without a law is the third case, and it is legitimate. The showcase, a generator, work with
43
+ a third-party service, creating the skill itself: there is no statement about the product above such
44
+ a thing, so there is no law either. Inventing a law for it to fit the ladder is not allowed — a law
45
+ with one rule and not a single article about the product drifts from the rest at the first edit. How
46
+ such a skill is created — skill `write-a-skill`.
47
47
 
48
- | В законе | Здесь |
49
- | ------------------------------- | ---------------------------------------------------------------------------------------------------- |
50
- | набор разделов | `REQUIRED_HEADINGS` для спека, «Статьи» для закона |
51
- | утверждение документа | пункт `## Правила` в спеке, `## Статьи` в законе, `## Как закон применяется здесь` в правиле |
52
- | место, где оно исполняется | строка в `implementation.md` рядом: `` `файл:символ` `` |
53
- | обещанное поведение | сценарий `SC-<ПРЕФИКС>-<НОМЕР>` в `docs/specs/<домен>/scenarios.md` |
54
- | открытый вопрос | `Q-<буква закона>-<номер>` в разделе «Открытые вопросы» закона; на него ссылаются из задачи и коммитов, номер после закрытия не переиспользуется |
55
- | законы, которые применяет домен | строка `**Законы:**` в шапке спека, именами в кавычках |
48
+ | In the law | Here |
49
+ | --------------------------------- | ---------------------------------------------------------------------------------------------------- |
50
+ | set of sections | `REQUIRED_HEADINGS` for a spec, "Articles" for a law |
51
+ | a statement of a document | an item of `## Правила` in a spec, `## Статьи` in a law, `## Как закон применяется здесь` in a rule |
52
+ | the place where it is carried out | a line in `implementation.md` next to it: `` `file:symbol` `` |
53
+ | promised behaviour | scenario `SC-<PREFIX>-<NUMBER>` in `docs/specs/<domain>/scenarios.md` |
54
+ | open question | `Q-<law letter>-<number>` in the law's "Open questions" section; tasks and commits refer to it, and the number is not reused after closing |
55
+ | laws a domain applies | the `**Законы:**` line in the spec header, names in quotes |
56
56
 
57
- ## Где это лежит
57
+ ## Where it lives
58
58
 
59
- В этом дереве — таблица в `implementation.md` рядом. Пути живут там, а не здесь: правило
60
- переносится между репозиториями, раскладка — нет, и путь, названный в правиле, врёт в первом
61
- же дереве, которое держит код иначе.
59
+ In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
60
+ travels between repositories, the layout does not, and a path named in the rule lies in the first
61
+ tree that keeps its code differently.
62
62
 
63
- ## Ход
63
+ ## Flow
64
64
 
65
- Ход заведения текста: какой слой пишется, чем утверждение привязывается к коду и что происходит
66
- со сценарием после выкатки.
65
+ The flow of creating a text: which layer is written, how a statement is bound to code and what
66
+ happens to a scenario after the rollout.
67
67
 
68
68
  ```mermaid
69
69
  flowchart TD
70
- A[Пишется текст о продукте или о работе] --> B{О чём он}
71
- B -->|Что должно быть верно, без имён| C[Закон: обязателен раздел статей, путей в нём нет]
72
- B -->|Каким приёмом это держится здесь| D[Правило: объявляет свой закон, имена — в компаньоне рядом]
73
- B -->|Готовый код и приём| E[Паттерн: объявляет своё правило]
74
- B -->|Как работает домен| F[Спек домена: объявляет законы, которые применяет]
75
- D --> G{У утверждения есть место в коде}
70
+ A[A text about the product or the work is written] --> B{What it is about}
71
+ B -->|What must be true, without names| C[Law: the articles section is mandatory, no paths in it]
72
+ B -->|By which technique it is kept here| D[Rule: declares its law, names in the companion next to it]
73
+ B -->|Ready-made code and technique| E[Pattern: declares its rule]
74
+ B -->|How a domain works| F[Domain spec: declares the laws it applies]
75
+ D --> G{The statement has a place in code}
76
76
  F --> G
77
- G -->|Да| H[Ставится строка привязки; связь сверяется в обе стороны]
78
- G -->|Нет| I[Это намерение: уходит в открытые вопросы, а не в правила]
79
- H --> J{Заводится сценарий}
80
- J -->|Да| K[Номер выдаётся новый и повторно не используется; заголовок теста правится тем же изменением]
81
- J -->|Нет| L[Готово]
77
+ G -->|Yes| H[A binding line is placed; the link is checked both ways]
78
+ G -->|No| I[It is an intention: goes to open questions, not to rules]
79
+ H --> J{A scenario is created}
80
+ J -->|Yes| K[The number is issued new and never reused; the test title is edited by the same change]
81
+ J -->|No| L[Done]
82
82
  C --> L
83
83
  E --> L
84
84
  K --> L
85
85
  I --> L
86
86
  ```
87
87
 
88
- ## Как закон применяется здесь
89
-
90
- - **Набор разделов спека задан заранее, и отсутствие раздела — отказ.** «Не применимо» —
91
- законный ответ, отсутствие раздела — нет: сквозные требования вспоминаются постфактум
92
- именно тогда, когда для них не заведено места.
93
- - **Каждое утверждение привязано к месту в коде, и связь сверяется в обе стороны.** Ключ
94
- связи — сам текст утверждения, поэтому переформулировать его, забыв про привязку, нельзя.
95
- - **Первая колонка компаньона — текст статьи, скопированный, а не пересказанный.** Ключ связи —
96
- сам текст: строка, написанная по смыслу, разрывает связь, оставаясь на вид заполненной. Проверка
97
- считает статьи без адреса и о статье с чужим адресом не знает ничего.
98
- - **Привязка не ведёт в код, который никто не зовёт:** нигде не зовущийся символ — не место.
99
- - **Привязка «не исполняется» переезжает вместе со своей статьёй.** Иначе строка компаньона
100
- держит в горячей части статью, за которой не стоит ничего: снятая одна, она оставляет привязку
101
- без пункта, и сверка краснеет. Переезжают обе стороны разом.
102
- - **Таблица процедур сверяется с декораторами в обе стороны, право — вместе с именем.** Иначе
103
- процедура, которую домен обслуживает, но забыл описать, видна только в декораторе, а право,
104
- разошедшееся со спеком, — нигде.
105
- - **Код отказа принимается, только если он в домене бросается.** Коды выписывались по замыслу, и
106
- на одном пути обещанный отказ не бросал никто.
107
- - **Префикс сценариев в спеке один, и по всему дереву он занят им одним.** Второй префикс внутри
108
- спека означает, что предмет описан дважды; занятый чужим — что по номеру не видно, чей это
109
- сценарий. Договорённость о продукте нумеруется вместе со спеком, в который вольётся, и занятым
110
- префикс от неё не становится.
111
- - **Номер сценария выдаётся один раз и повторно не используется.** Новый берёт следующий
112
- свободный, а не вставляется в середину и не занимает номер удалённого — на месте удалённого
113
- номер остаётся пустым. Номер связывает сценарий с тестом, и отданный второй раз он оставляет
114
- старую ссылку верной на вид; пересчёт подряд дёшев обманчиво — тесты зелёные и до, и после.
115
- - **Сценарий и заголовок его теста правятся одним изменением.** Изменилось обещание — номер тот
116
- же, а заголовок теста правится тем же коммитом; удалён сценарий — удаляется и тест.
117
- Разъехавшись, они оставляют прогон зелёным, хотя проверяет он уже не то.
118
- - **Поддомен спрашивается наравне с доменом.** Те же обязательные разделы, тот же компаньон
119
- рядом, та же связь сценариев с тестами. Домен, у которого половина поддоменов описана, а
120
- половина заведена пустыми каталогами, зелёным не бывает.
121
- - **У закона обязателен раздел «Статьи», а кроме них он держит только открытые вопросы.**
122
- Истории правок и доводов о выбранном когда-то варианте в законе нет: историю держит система
123
- контроля версий, а довод с отвергнутой альтернативой — свойство работы, и место ему в
124
- «Ловушках» правила. Закрытый вопрос из закона уходит, а пустой раздел ради заголовка
125
- проверку всё равно проходил.
126
- - **Предложенный закон правила не требует.** Договорённость, записанную раньше кода,
127
- привязывать не к чему, а требование правила заставило бы завести его с якорями в
128
- несуществующие места. Признак стоит строкой статуса в самом законе, а не в списке исключений
129
- рядом с проверкой.
130
- - **Закон, назвавший файл проекта, — отказ.** Путям и привязкам место в правиле, иначе закон
131
- нельзя ни прочитать без знания дерева, ни применить на другом приложении.
132
- - **Описание правила не длиннее трёхсот знаков и отвечает на один вопрос — брать это правило
133
- или нет.** Описание едет в системный промпт каждого захода целиком, и платит его заход, чем бы
134
- ни занимался: тем оно и отличается от тела правила, которое исполнитель читает сам. Растёт оно
135
- само — его пишут вслед за правилом и пересказывают в нём содержимое, — а пересказ приходит
136
- вторым разом вместе с самим правилом. Считает длину проверка описаний; оставленное длиннее
137
- предела называется в перечне принятого долга поимённо, с причиной.
138
-
139
- - **Правило объявляет закон, под который написано.** Правило без закона — набор приёмов, из
140
- которого не видно, что именно должно быть верно.
141
- - **Слоёв законов два, а имя закона одно на оба.** Общий лежит в корне конституции, закон
142
- приложения — в `application/`; ни `law:`, ни `**Законы:**` слоя не называют, поэтому имена
143
- законов уникальны по всему дереву конституции.
144
- - **Расхождение правила и его компаньона решается в пользу правила.** Компаньон называет имена
145
- дерева и привязки статей, а не отменяет их: прочитанный старше правила, он становится местом,
146
- где требование снимается молча и без разбора. Предметность доводом тут не бывает — компаньон
147
- предметнее всегда, на то он и компаньон. Найденное расхождение называется владельцу и чинится
148
- в том тексте, который отстал, а работа до этого идёт по правилу.
149
- - **Утверждение компаньона о состоянии внешней службы проверяется командой, которую он сам
150
- называет.** Ограничение соседа снимается вместе с чужой настройкой, а текст о нём остаётся
151
- стоять в настоящем времени и после снятия выглядит верным: действующее от снятого отличает
152
- только вызов. Компаньон поэтому пишет способ спросить, а не снимок ответа, — и велеть по
153
- такому снимку обратное тому, что говорит правило, он не вправе.
154
- - **У правила бывает третий файл, и в него уходит то, что при решении не читают.** Ловушки и
155
- поведение по разборам происшествий нужны не тому, кто принимает обычное решение, а тому, кто
156
- разбирает промах или спорит с гардом, — а грузятся они вместе с правилом каждый раз и растут
157
- быстрее статей. Такой текст уезжает в `pitfalls.md` рядом, правило называет его строкой в
158
- шапке, и грузится он по требованию. Отказ гейта о холодной части молчит: он зовёт правило, а о
159
- третьем файле говорит само правило.
160
-
161
- - **Спек объявляет законы, которые применяет, и связь сверяется в обе стороны.** Закон,
162
- названный в тексте спека, обязан стоять в шапке: иначе по закону не узнать, какие домены
163
- на нём стоят.
164
- - **Переносимый текст говорит о соседнем ресурсе условно и называет его по имени.** Что
165
- разложено в дереве, а что нет, знает список раскладки, а не текст ресурса. Сказанное
166
- безусловно — «правку кода до этого отбивает гард» — приходит в контекст каждой сессии и врёт
167
- про дерево, где того гарда не разложили; поправить это дерево не может ничем, если у ресурса
168
- нет надстройки. Требование ресурса к ресурсу при этом объявляется строкой в шапке, а не
169
- выводится из такой фразы.
170
- - **Статья правила говорит о своей применимости сама, строкой признака при себе.** Отказ гейта
171
- зовёт правило целиком, а под конкретную правку подпадает одна его статья: платить за решение
172
- полной ценой правила — значит учить не читать лишнего, то есть работать хуже разведанным.
173
- Признак стоит при статье, а не в карте гейта: карта знает путь и правило, но не знает, какая
174
- из двух десятков статей про этот путь.
88
+ ## How the law applies here
89
+
90
+ - **The set of spec sections is fixed in advance, and a missing section is a refusal.** "Not
91
+ applicable" is a legitimate answer, a missing section is not: cross-cutting requirements get
92
+ remembered after the fact exactly when no place was made for them.
93
+ - **Every statement is bound to a place in code, and the link is checked both ways.** The key of the
94
+ link is the statement text itself, so it cannot be reworded with the binding forgotten.
95
+ - **The first column of the companion is the article text copied, not retold.** The key of the link
96
+ is the text itself: a line written by meaning breaks the link while looking filled in. The check
97
+ counts articles without an address and knows nothing of an article with a wrong address.
98
+ - **A binding does not lead into code nobody calls:** a symbol called nowhere is not a place.
99
+ - **A "not carried out" binding moves together with its article.** Otherwise the companion line
100
+ keeps in the hot part an article with nothing behind it: removed alone, it leaves the binding
101
+ without an item, and the audit turns red. Both sides move at once.
102
+ - **The procedure table is checked against the decorators both ways, the permission together with
103
+ the name.** Otherwise a procedure the domain serves but forgot to describe is visible only in the
104
+ decorator, and a permission that drifted from the spec — nowhere.
105
+ - **A refusal code is accepted only if the domain throws it.** Codes were written out from the
106
+ design, and on one path nobody threw the promised refusal.
107
+ - **A spec has one scenario prefix, and across the whole tree it is taken by that spec alone.** A
108
+ second prefix inside a spec means the subject is described twice; a prefix taken by another means
109
+ the number does not show whose scenario it is. A product agreement is numbered together with the
110
+ spec it will merge into, and the prefix does not become taken by it.
111
+ - **A scenario number is issued once and never reused.** A new one takes the next free number; it is
112
+ not inserted in the middle and does not take a deleted one — the deleted number's place stays
113
+ empty. The number ties the scenario to its test, and issued a second time it leaves the old
114
+ reference right on the surface; renumbering in sequence is deceptively cheap — the tests are green
115
+ both before and after.
116
+ - **A scenario and the title of its test are edited by one change.** The promise changed — the
117
+ number stays, and the test title is edited by the same commit; the scenario deleted — the test is
118
+ deleted too. Having drifted apart, they leave the run green while it checks something else.
119
+ - **A subdomain is asked the same as a domain.** The same mandatory sections, the same companion
120
+ next to it, the same link between scenarios and tests. A domain with half its subdomains described
121
+ and half created as empty directories is never green.
122
+ - **A law has a mandatory "Articles" section, and beyond it holds only open questions.** A law
123
+ carries no history of edits and no arguments for an option chosen once: version control holds the
124
+ history, and an argument with a rejected alternative is a trait of the work, and its place is the
125
+ rule's "Pitfalls". A closed question leaves the law, and an empty section kept for its heading
126
+ passed the check anyway.
127
+ - **A proposed law requires no rule.** An agreement written down before the code has nothing to bind
128
+ to, and demanding a rule would force creating one with anchors into places that do not exist. The
129
+ sign stands as a status line in the law itself, not in an exceptions list next to the check.
130
+ - **A law that names a project file is a refusal.** Paths and bindings belong in a rule; otherwise
131
+ the law can neither be read without knowing the tree nor applied to another application.
132
+ - **A rule description is no longer than three hundred characters and answers one question — load
133
+ this rule or not.** The description goes whole into the system prompt of every session, and the
134
+ session pays for it whatever it works on: that is what tells it from the rule body, which the
135
+ executor reads by itself. It grows on its own — it is written after the rule and retells its
136
+ content — and the retelling arrives a second time together with the rule itself. The descriptions
137
+ check counts the length; what is left longer than the limit is named in the accepted-debt list by
138
+ name, with a reason.
139
+
140
+ - **A rule declares the law it is written under.** A rule without a law is a set of techniques that
141
+ does not show what exactly must be true.
142
+ - **There are two layers of laws, and a law name is one for both.** The shared one lies in the
143
+ constitution root, an application law in `application/`; neither `law:` nor `**Законы:**` names
144
+ the layer, so law names are unique across the whole constitution tree.
145
+ - **A divergence between a rule and its companion is resolved in favour of the rule.** The companion
146
+ names the tree's names and the bindings of the articles; it does not cancel them: read above the
147
+ rule, it becomes the place where a requirement is lifted silently and without review. Concreteness
148
+ is no argument here — the companion is always more concrete, that is what it is for. A divergence
149
+ found is named to the owner and fixed in the text that fell behind, and until then the work goes
150
+ by the rule.
151
+ - **A companion's statement about the state of an external service is checked by the command the
152
+ companion itself names.** A neighbour's limit is lifted together with someone else's setting,
153
+ while the text about it stays in the present tense and looks right after the lifting: only a call
154
+ tells the current from the lifted. So the companion writes the way to ask, not a snapshot of the
155
+ answer — and it has no right to order, on such a snapshot, the opposite of what the rule says.
156
+ - **A rule may have a third file, and what is not read when deciding goes there.** Pitfalls and
157
+ behaviour from incident analyses are needed not by whoever makes an ordinary decision but by
158
+ whoever reviews a miss or argues with a guard — yet they load with the rule every time and grow
159
+ faster than the articles. Such text leaves for `pitfalls.md` next to it, the rule names it with a
160
+ line in its header, and it loads on demand. The gate refusal is silent about the cold part: it
161
+ calls the rule, and the rule itself speaks of the third file.
162
+
163
+ - **A spec declares the laws it applies, and the link is checked both ways.** A law named in the
164
+ spec text must stand in the header: otherwise the law gives no way to learn which domains stand on
165
+ it.
166
+ - **Portable text speaks of a neighbouring resource conditionally and names it by name.** What is
167
+ laid out in the tree and what is not is known to the layout list, not to the resource text. Said
168
+ unconditionally — "a guard refuses a code edit before that" — it enters the context of every
169
+ session and lies about a tree where that guard was not laid out; the tree has no way to fix that
170
+ if the resource has no override. A resource's requirement of a resource is declared by a line in
171
+ the header, not derived from such a phrase.
172
+ - **An article of a rule speaks of its own applicability itself, by a sign line at its side.** A
173
+ gate refusal calls the whole rule, while one of its articles covers the specific edit: paying the
174
+ rule's full price for a decision means teaching to skip reading, that is to work worse than what
175
+ was explored. The sign stands at the article, not in the gate map: the map knows the path and the
176
+ rule, not which of two dozen articles is about that path.
175
177
 
176
178
  ```markdown
177
- - **Заголовок статьи.** Текст статьи, как обычно.
179
+ - **Article title.** Article text, as usual.
178
180
  <!-- rt-when: *.scss *.css -->
179
181
  ```
180
182
 
181
- Образцы разделены пробелом и сверяются с путём правки как образцы оболочки, а не поиском по
182
- словам: поиск называет не ту статью и молчит об этом. Образец без каталога сверяется и с
183
- именем файла, а комментарий в собранной разметке не виден.
184
-
185
- - **Статья без признака законна, и правило без единого признака — тоже.** Признак ставится тем
186
- статьям, чьё правило отбивает на правке файла; остальные размечаются по мере того, как их
187
- отбития попадут в сводку. Отсутствие признака означает «эту статью по пути правки не
188
- выбирают», а не промах: требовать его у всех значило бы размечать наугад.
189
-
190
- - **Паттерн находится по полю `rule:`, а не по приставке имени.** Приставку имени несут не все
191
- паттерны, и поиск по имени правила таких не видит: сверка ищет их полем, человек — разделом
192
- «Паттерны» самого правила. Счёт паттернов, собранный приставками, выходит меньше настоящего, а
193
- число потом уезжает в деление работы.
194
- - **Решение из спека уходит в слой, а не в описание прошлого.** Что сверяется у спека, машина
195
- знает; куда девается принятое решение — не знает и не узнает: отличить действующее требование
196
- от рассказа о состоявшемся может только тот, кто спросит «останется ли это верным завтра».
197
- Держится это шагом разбора закрытой работы и признаком отбора, записанным там заранее.
198
- - **Имя в якоре записывается так, как объявлено в коде.** Приватное поле класса стоит с
199
- решёткой, и записанное без неё имя называет не тот символ: проверка остаётся зелёной, а
200
- читателю по строке привязки не видно, приватный это метод или соседний с ним обычный. Прежняя
201
- форма при этом законна — имя без решётки помнится наравне с ним самим.
202
- - **Якорь сверяется по сырому тексту файла, и комментарий засчитывается наравне с кодом.**
203
- Существование символа проверка ищет словом по всему файлу, не вычищая комментарии, а живость
204
- считает только у объявленного в коде. Имя, стоящее в одном лишь пояснении, проходит мимо обеих
205
- сторон: якорем утверждения оказывается слово из комментария, тогда как объявление рядом
206
- называется иначе.
207
-
208
- - **Проверка, прибитая к имени ресурса, ломается на его делении, и знать об этом надо до правки.**
209
- Имя правила и имя паттерна стоят не только в текстах, но и в проверках дерева, в пробах их наборов
210
- и в таблицах состояний. Деление поэтому начинается с поиска имени по всему дереву: иначе красное
211
- приходит по одной проверке за прогон — так деление одного правила уронило три.
212
-
213
- ## Форма сжатой статьи
214
-
215
- Правило грузится в заход целиком и платит за это каждый заход, чем бы он ни занимался. Замер
216
- называет, где вес: в двадцати девяти грузимых правилах 289 440 знаков, раздел статей — 45% из
217
- них, а внутри раздела утверждения занимают 19%, доводы при них — 81%. Режется поэтому довод, а
218
- не утверждение: снятое утверждение меняет правило, снятый довод — только его цену.
219
-
220
- У абзаца при статье три исхода, и выбирают между ними одним вопросом: **что этот текст нужен
221
- сделать — принять решение, не отменить его или разобрать промах?**
222
-
223
- | Текст нужен, чтобы… | Исход |
224
- | ------------------------------------------------------------- | ------------------------------ |
225
- | принять решение по правке: что считается верным, где граница | остаётся при статье дословно |
226
- | не отменить решение через месяц: почему именно так | сворачивается до одной строки |
227
- | разобрать промах или спорить с гардом | уезжает в холодную часть целиком |
228
-
229
- - **При статье остаётся утверждение и то, без чего оно читается неверно.** Граница, исключение,
230
- признак применимости, имя того, кто это стережёт. Проверяется отниманием: снятый кусок меняет
231
- ответ на вопрос «так делать или нет» — значит он не лишний.
232
- - **Довод сворачивается до одной строки: цена промаха, а не его история.** «Иначе прогон зелёный,
233
- а проверяет он уже не то» — это довод. Когда это случилось, сколько раз подряд и в какой ветке
234
- — уже история, и её место в холодной части.
235
- - **В холодную часть уезжает разбор происшествия целиком, вместе с числами и отвергнутыми
236
- вариантами.** Она грузится по требованию — тем, кто разбирает промах, — и растёт свободно:
237
- цену за неё платит один заход из сотни, а не каждый.
238
- - **Холодная часть держит объяснение, а не требование.** Утверждения, которого нет в правиле, в
239
- ней не бывает: правило, чьё требование живёт в холодной части, обещает то, чего грузящий его
240
- заход не увидит. Проверяется тем же вопросом наоборот — по холодной части нельзя принять ни
241
- одного решения, которого не принять по правилу.
242
- - **Сжатие судится в пересказе, а не в исходнике.** Статья, сжатая верно, пересказывается тем же
243
- решением: тот, кто прочёл только её, правит так же, как читавший прежнюю. Разошлись — снято
244
- лишнее, и снятое возвращается при статье, а не в холод.
245
- - **Правило без холодной части законно, и заводится она первым же уехавшим абзацем.** Пустой
246
- `pitfalls.md` рядом — обещание, а не механизм: в замере из двадцати девяти правил у четверых
247
- самых тяжёлых холодной части нет вовсе, и весь их разбор происшествий грузится каждый заход.
248
-
249
- ## Чего из закона здесь нет
250
-
251
- Закон, которого не применяет ни один спек, отказом не считается: законы про устройство кода,
252
- поставку и проверяемость доменов не касаются вовсе. Порядок «сначала описание, потом код»
253
- держится договорённостью: закон о документации проекта такого требования не несёт, и открытого
254
- вопроса под него в нём не заведено.
255
-
256
- Таблицы состояний экрана не сверяются ничем. `check:specs` знает сценарии против заголовков
257
- тестов, правила против якорей, процедуры против декораторов и коды отказа против бросков — строка
258
- таблицы состояний не привязана ни к чему и проходит зелёной, даже когда код в названное состояние
259
- не попадает. Состояние «проверка не загрузилась» стояло в таблицах двух доменов раньше, чем код
260
- научился в него приходить, и всё это время читалось описанием работающего.
261
-
262
- Смысл сценария с соседним не сверяется ничем: проверка судит номер. Два сценария, обещающих одно
263
- и то же разными словами, для неё разные, и второй числится непроверяемым, сколько проживёт.
264
-
265
- Полноту разметки статей признаком применимости не считает ничто. Правило, у которого признака
266
- нет ни у одной статьи, отбивает прежним текстом — и от размеченного отличается только тем, что
267
- исполнитель читает его целиком; ни одна проверка об этом не говорит. Судит это сводка
268
- наблюдений: правило, которое чаще прочего отбивает на правке файла, и есть первое, что
269
- размечают.
270
-
271
- Полноту разделов у самого закона, правила и паттерна здесь не проверяет ничто. Статьи о том,
272
- что текст судится не слабее своей копии, что невыбранная редакция судится наравне с выбранной и
273
- что набор разделов объявлен отдельно от образца, исполняются там, где эти тексты пишут, — в
274
- наборе того пакета, который их везёт. В дереве-потребителе лежат разложенные копии, и краснеть
275
- у него на чужом промахе проверка не должна. Согласие двух текстов ищется чтением.
276
-
277
- Форму сжатой статьи не проверяет ничто, и проверки на неё не будет: машине видно число знаков,
278
- но не то, принимается ли по сжатой статье прежнее решение. Довод, вырезанный вместе с границей
279
- утверждения, короче правильного и проходит любой счёт знаков. Стережёт это один предел длины
280
- текста: он говорит, что правило переросло, и молчит, что именно резать. Судится сжатие
281
- пересказом — тем, кто правит по сжатой статье следующим.
282
-
283
- Долю довода в правиле не считает ничто. Замер, на котором стоит форма, сделан разовым проходом
284
- и в дерево не поехал: он отвечает на «где вес», а не на «сошлось ли».
285
-
286
- ## Паттерны
287
-
288
- - `spec-driven-domain` — заведение и правка спека домена, сценарии, привязка.
289
- - `spec-driven-rule` — заведение закона, правила и паттерна.
290
- - `spec-driven-sweep` — сплошной разбор привязки домена, проходы и их разбор.
291
-
292
- ## Ловушки
293
-
294
- - **Строка требования к соседнему ресурсу не проверяется ничем, и промах в ней виден только
295
- счётом.** Правило без неё выглядит целым: разделы на месте, привязки сходятся, набор полноты
296
- зелёный. Считается она одной командой по каталогу правил, и расхождение читается сразу — сколько
297
- правил объявило требования и сколько ссылается на соседний ресурс прозой.
183
+ The globs are separated by a space and matched against the edit path as shell globs, not by
184
+ word search: a word search names the wrong article and stays silent about it. A glob without
185
+ a directory is also matched against the file name, and the comment is invisible in the
186
+ assembled markup.
187
+
188
+ - **An article without a sign is legitimate, and so is a rule without a single sign.** A sign is
189
+ given to the articles whose rule refuses on a file edit; the rest are marked as their refusals
190
+ reach the digest. A missing sign means "this article is not selected by the edit path", not a
191
+ miss: demanding it from all would mean marking at random.
192
+
193
+ - **A pattern is found by the `rule:` field, not by the name prefix.** Not every pattern carries the
194
+ name prefix, and a search by rule name does not see those: the audit finds them by the field, a
195
+ person by the rule's own "Patterns" section. A count of patterns gathered by prefixes comes out
196
+ below the true one, and the number then goes into splitting the work.
197
+ - **A decision from a spec goes to the layer, not to the archive.** What a spec is checked against
198
+ the machine knows; where an accepted decision goes it does not know and will not: only whoever
199
+ asks "will this still be true tomorrow" can tell a current requirement from an account of what
200
+ happened. This is held by the closed-work review step and the selection sign written there in
201
+ advance.
202
+ - **A name in an anchor is written as declared in code.** A private class field stands with a hash,
203
+ and the name written without it names the wrong symbol: the check stays green, and the reader
204
+ cannot tell from the binding line whether this is the private method or the ordinary one next to
205
+ it. The former form stays legitimate — the name without the hash is remembered alongside the name
206
+ itself.
207
+ - **An anchor is checked against the raw text of the file, and a comment counts the same as code.**
208
+ The check looks for the symbol's existence by word across the whole file without stripping
209
+ comments, and counts liveness only for what is declared in code. A name standing in an explanation
210
+ alone slips past both sides: the statement's anchor turns out to be a word from a comment, while
211
+ the declaration next to it is called differently.
212
+
213
+ - **A check nailed to a resource name breaks when the resource is split, and this has to be known
214
+ before the edit.** A rule name and a pattern name stand not only in texts but in the tree's
215
+ checks, in the probes of their suites and in the state tables. So a split starts with a search for
216
+ the name across the whole tree: otherwise red arrives one check per run — that is how splitting
217
+ one rule took down three.
218
+
219
+ - **The spec speaking of a resource is found by a command, not by walking the subdomains.** A domain
220
+ grows into dozens of subdomains, and the one needed is told from the rest only by reading: whoever
221
+ takes apart a complaint about a file pays the whole window for that and therefore judges by memory.
222
+ The command reads the bindings of the companions — the very ones the audit keeps fresh — and,
223
+ called without a name, names the resources no spec speaks of.
224
+ <!-- rt-when: *.md -->
225
+
226
+ ## The shape of a compressed article
227
+
228
+ A rule loads whole into a session and pays for it every session, whatever the session works on. A
229
+ measurement names where the weight is: 289 440 characters in twenty-nine loaded rules, the articles
230
+ section is 45% of them, and inside the section statements take 19%, their arguments 81%. So the
231
+ argument is cut, not the statement: a removed statement changes the rule, a removed argument only
232
+ its price.
233
+
234
+ A paragraph at an article has three outcomes, chosen by one question: **what is this text needed for
235
+ — to make a decision, to keep it from being reversed, or to review a miss?**
236
+
237
+ | The text is needed to… | Outcome |
238
+ | --------------------------------------------------------------- | ------------------------------ |
239
+ | decide on the edit: what counts as right, where the boundary is | stays at the article verbatim |
240
+ | not reverse the decision in a month: why exactly so | folds to one line |
241
+ | review a miss or argue with a guard | leaves for the cold part whole |
242
+
243
+ - **What stays at the article is the statement and what it reads wrong without.** The boundary, the
244
+ exception, the applicability sign, the name of whoever guards it. Tested by subtraction: a removed
245
+ piece changes the answer to "do it this way or not" — then it is not surplus.
246
+ - **An argument folds to one line: the price of the miss, not its history.** "Otherwise the run is
247
+ green while it checks something else" is an argument. When it happened, how many times in a row
248
+ and in which branch is history, and its place is the cold part.
249
+ - **An incident analysis leaves for the cold part whole, with its numbers and rejected options.**
250
+ The cold part loads on demand — for whoever reviews a miss — and grows freely: one session in a
251
+ hundred pays for it, not every one.
252
+ - **The cold part holds explanation, not requirement.** A statement absent from the rule never lives
253
+ there: a rule whose requirement lives in the cold part promises what the session loading it will
254
+ not see. Tested by the same question reversed — no decision can be made by the cold part that
255
+ cannot be made by the rule.
256
+ - **Compression is judged by retelling, not in the source.** An article compressed right is retold
257
+ by the same decision: whoever read only it edits the same way as whoever read the former one. They
258
+ diverged — surplus was removed, and it comes back at the article, not to the cold part.
259
+ - **A rule without a cold part is legitimate, and the first paragraph that leaves creates one.** An
260
+ empty `pitfalls.md` next to it is a promise, not a mechanism: in the measurement of twenty-nine
261
+ rules, four of the heaviest have no cold part at all, and their whole incident analysis loads
262
+ every session.
263
+
264
+ ## What of the law is not here
265
+
266
+ A law no spec applies does not count as a refusal: the laws on code structure, delivery and
267
+ verifiability do not touch domains at all. The order "description first, code second" is held by
268
+ agreement: the project-documentation law carries no such requirement, and no open question for it is
269
+ opened there.
270
+
271
+ Screen state tables are checked by nothing. `check:specs` knows scenarios against test titles, rules
272
+ against anchors, procedures against decorators and refusal codes against throws — a state table row
273
+ is bound to nothing and passes green even when the code never reaches the named state. The state
274
+ "the check did not load" stood in the tables of two domains before the code learned to reach it, and
275
+ all that time read as a description of something working.
276
+
277
+ The meaning of a scenario is checked against its neighbour by nothing: the check judges the number.
278
+ Two scenarios promising the same thing in different words are different to it, and the second counts
279
+ as unverifiable for as long as it lives.
280
+
281
+ The completeness of marking articles with an applicability sign is counted by nothing. A rule with a
282
+ sign on none of its articles refuses with the old text — and differs from a marked one only in that
283
+ the executor reads it whole; no check says so. The observations digest judges it: the rule that
284
+ refuses on a file edit more often than the others is the first to be marked.
285
+
286
+ Section completeness of the law, the rule and the pattern themselves is checked by nothing here. The
287
+ articles saying that a text is judged no more leniently than its copy, that an unchosen edition is
288
+ judged the same as the chosen one and that the set of sections is declared apart from the sample are
289
+ carried out where these texts are written — in the suite of the package that ships them. A consumer
290
+ tree holds laid-out copies, and its check must not turn red on someone else's miss. Agreement of two
291
+ texts is looked for by reading.
292
+
293
+ The shape of a compressed article is checked by nothing, and there will be no check for it: the
294
+ machine sees the character count, not whether the compressed article still yields the former
295
+ decision. An argument cut out together with the statement's boundary is shorter than the right one
296
+ and passes any character count. One thing guards this — the text length limit: it says the rule has
297
+ outgrown, and is silent about what to cut. Compression is judged by retelling — by whoever edits by
298
+ the compressed article next.
299
+
300
+ The share of argument in a rule is counted by nothing. The measurement the shape stands on was made
301
+ in a one-off pass and did not go into the tree: it answers "where the weight is", not "does it add
302
+ up".
303
+
304
+ ## Patterns
305
+
306
+ - `spec-driven-domain` — creating and editing a domain spec, scenarios, binding.
307
+ - `spec-driven-rule` — creating a law, a rule and a pattern.
308
+ - `spec-driven-sweep` — a full review of a domain's binding, passes and their review.
309
+
310
+ ## Pitfalls
311
+
312
+ - **The line requiring a neighbouring resource is checked by nothing, and a miss in it shows only by
313
+ counting.** A rule without it looks whole: sections in place, bindings match, the completeness
314
+ suite green. It is counted by one command over the rules directory, and the divergence reads at
315
+ once — how many rules declared requirements and how many refer to a neighbouring resource in
316
+ prose.