@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
@@ -1,139 +1,172 @@
1
- # Закон о поставке
1
+ # Law on delivery
2
2
 
3
- Как правка доезжает до работающего приложения. Закон держит и историю изменений, и то, что
4
- в этот момент видит пользователь: неудачная выкатка отличается от удачной только тем, что
5
- приложение перестаёт отвечать, а причина этого выясняется по истории.
3
+ How a change reaches the running application. The law covers both the history of changes and what
4
+ the user sees at that moment: a failed rollout differs from a successful one only in that the
5
+ application stops responding, and the reason is found from the history.
6
6
 
7
- ## Статьи
8
- - **Правка начинается с задачи, видимой в очереди работ.** Заведённой задачи мало: ту, что в
9
- очередь не попала, никто не видит, и работа за ней не планировалась.
10
- - **Правка попадает в главную ветку только через отдельную ветку.** Прямая запись в главную лишает
11
- правку и обсуждения, и возможности откатить её одним движением.
12
- - **В очереди работ стоят задачи, а не PR о них.** У задачи и её PR один номер и одна судьба,
13
- поэтому вторая карточка о той же работе ничего не добавляет — она удваивает очередь и врёт о её
14
- длине. Очередь читают затем, чтобы видеть сделанное и оставшееся; PR отвечает на другой вопрос и
15
- открывается из карточки задачи, где связь с ним и так стоит. Карточка PR живёт своей жизнью:
16
- висит в очереди после слияния навсегда, потому что колонки под неё нет.
17
- - **Проверка не гоняет того, что правка не может сломать.** Набор, одинаковый для любой правки,
18
- выглядит строгим, а работает наоборот: прогон, который длится вдесятеро дольше нужного, учат не
19
- ждать, а обходить. Состав набора выводится из состава правки — из того, что она задела, а не из
20
- того, кем она названа; правка, не тронувшая ни строки кода, не собирает образов и не снимает
21
- кадров. Пропущенное при этом называется пропущенным: молча выпавший шаг читается как пройденный.
22
- - **У задачи одна ветка, у ветки одна задача.** Откат снимает всё, что въехало этой веткой, разом:
23
- две задачи в ней откатятся только вместе, а задача, въехавшая двумя ветками, после отката одной
24
- останется наполовину сделанной — и в очереди работ этого не видно. Работа, которая в одну ветку
25
- не влезает, делится на задачи до заведения ветки. Признак деления — раздельный откат, а не
26
- объём: числа файлов, строк или коммитов, за которым работа становится двумя задачами, нет.
27
- Правка одного рода остаётся одной задачей, сколько бы файлов она ни задела; объём захода
28
- говорит, какого размера задачу заводить среди тех, что делятся законно, и делить неделимое не
29
- даёт.
30
- - **Работы, идущие одна за другой, ветвятся одна от другой.** Ветка следующей отводится от
31
- предыдущей, а не от главной: тогда правка предыдущей лежит в общем предке, и сводить два разных
32
- изменения одного файла уже не нужно. Ветки, заведённые от главной подряд, друг о друге не знают,
33
- и первое же слияние делает остальные расходящимися — тем вернее, чем ближе работы по предмету:
34
- расходятся не сами правки, а строки, куда обе дописали. Цена не исчезает, а переносится: платит
35
- её тот, кто ветвится, один раз — вместо того, кто вливает, столько раз, сколько заявок открыто.
36
- От главной ветвится первая работа череды и всякая, не связанная с предыдущей.
37
- - **Череда веток отдаётся снизу вверх, и порядок называется владельцу.** Заявка каждой стоит на
38
- предыдущей, а не на главной, поэтому влитая не по порядку тащит за собой всё, что под ней.
39
- Порядок известен тому, кто ветвился, и не виден тому, кто вливает: несказанный, он читается как
40
- его отсутствие.
41
- - **Ветка, стоящая под другой, историю не переписывает.** Силовая отправка нижней делает вершину
42
- верхней достижимой из её основания, и хостинг закрывает заявку верхней как слитую — при том что
43
- в главной ветке её правок нет. Расхождение чинится вливанием, а не переносом истории.
44
- - **Правка самой поставки проверяется её прогоном, а не рассуждением.** Проверить её иначе нечем:
45
- она исполняется только там, где выкатывает, и в среде, которой на месте работы нет — с чужими
46
- правами, чужим хранилищем ключей и чужой сетью. «Проверю после слияния» решением исполнителя не
47
- бывает: за этими словами стоит выкатка, которой уже не будет, если правка окажется неверной.
48
- Отложить проверку может только владелец, и он говорит это словами.
49
- - **Две задачи, которые чинятся одной правкой, — одна задача.** Вторая стирается вместе со своим
50
- номером, а то, чего в первой не было, дописывается в неё до этого. Две строки об одной работе
51
- хуже дыры в нумерации: по ним потом не понять, что сделано, а что нет. Слить их можно, пока
52
- правка не въехала в главную ветку; после — обе остаются как есть.
53
- - **Задача, ветка под неё и PR о сделанном несут один и тот же номер в своих названиях.** Иначе
54
- одну работу приходится узнавать по тексту названия, а в списке из полусотни строк это делается
55
- по памяти и с ошибками.
56
- - **Номер пишется всюду одинаково: ключ задач, дефис, номер.** Заголовок задачи и PR начинается с
57
- этой пары в квадратных скобках, имя ветки — с неё же. Одна форма, а не три похожих, потому что
58
- номер читают не только глазами: из имени ветки его достаёт гард, из заголовка — сверка очереди.
59
- Формы, выведенные порознь, расходятся молча и не отказывают, а перестают узнавать номер:
60
- проверка, которая должна была найти работу без задачи, пропускает всё подряд.
61
- - **Ключ задач дерево называет само, но назвать обязано.** В форме имени это единственное, что у
62
- каждого дерева своё, — и единственное, что настраивается. Не названный ключ не даёт ни поблажки,
63
- ни умолчания: работа с очередью отказывает и говорит, где он задаётся. Пустой ключ хуже
64
- отсутствующей проверки — от имени остаётся огрызок, которому ничто не отвечает, и правильно
65
- названной не выглядит ни одна задача.
66
- - **Заведённое в очереди работ видно той стороне, для которой заводилось.** Учётная запись, чьи
67
- объекты хостинг показывает не всем, оставляет за собой работу, которой для остальных не
68
- существует, — и снаружи это неотличимо от сделанного: задача заведена, PR открыт, а владелец
69
- видит пустую очередь. Видимость проверяется чужими глазами — чтением очереди тем, кому она
70
- адресована, — а не успешным ответом команды заведения.
71
- - **У задачи есть исполнитель с момента её заведения.** Задача без исполнителя выглядит ничьей: по
72
- очереди работ не видно, кто её взял, и заведённая по ходу правка теряется среди чужих.
73
- - **Состояние задачи в очереди работ отвечает тому, что с ней происходит.** Взятая в работу видна
74
- взятой, ждущая разбора — ждущей. Иначе нетронутое, делаемое и сделанное выглядят одинаково:
75
- работа берётся второй раз, а PR стоит неразобранным. Состояние переставляется в тот момент,
76
- когда работа переходит на следующий шаг: очередь читают между этими моментами, а не после них.
77
- - **Попадание правки в главную ветку означает выкатку.** Всё, от чего правка зависит снаружи кода
78
- — переменные окружения, секреты, записи имён, — ставится до этого момента, а не после.
79
- - **Признак режима исполнения объявлен в самом артефакте развёртывания, а не только в составе его
80
- запуска.** Артефакт поднимают и мимо состава — руками, при разборе, на чужой машине, — и без
81
- объявления он в этот момент считает себя отладочным, не сказав об этом ничего.
82
- - **Артефакт развёртывания несёт всё, чем настраивается запускаемое им.** Сборка проверяет, что
83
- артефакт собрался, а не что его собственные шаги запуска исполнимы: недостающий файл настройки
84
- не виден ни линтеру, ни сборке, ни шагу сборки образа в конвейере — он отказывает на первом
85
- подъёме, то есть уже там, куда выкатили. Файл, лежащий рядом в репозитории, внутрь артефакта
86
- сам не попадает.
87
- - **Выкатывается образ того коммита, который выкатывают.** Умолчание «последний» отстаёт от
88
- главной ветки, и приложение молча возвращается к прежней версии, продолжая отвечать.
89
- - **Из одного и того же коммита всегда ставятся одни и те же зависимости.** Если версия задана
90
- диапазоном, установка сегодня и установка через неделю дадут разный код: сборка сломается сама
91
- собой, и откатывать будет нечего. Обновление зависимости — обычная правка: у неё есть автор,
92
- описание и откат.
93
- - **Порядок изменений хранилища проверяется с пустого места.** На уже работающем хранилище
94
- неверный порядок незаметен: он проявляется только при развёртывании с нуля.
95
- - **Проверка перед отправкой смотрит на содержимое репозитория, а не на состояние машины, где она
96
- запущена.** На машине законно лежат недоделки, личные настройки и файлы вне истории. Проверка,
97
- которая их читает, отбивает правку из-за того, чего в репозитории нет, и молчит о том, что в нём
98
- есть. Проверка перед отправкой и конвейер выкатки судят по одному и тому же — иначе «сошлось»
99
- значит в этих двух местах разное.
100
- - **Документ едет вместе с правкой, которую он описывает.** Ни сборка, ни проверки текстов не
101
- читают, поэтому расхождение копится молча и потом выглядит действующей справкой.
102
- - **Работа, меняющая код, кончается открытым PR.** PR — единственное место, где человек видит
103
- правку целиком, отвечает на неё и вливает; коммит и запушенная ветка его не заменяют. Пока PR не
104
- открыт, работа сделанной не считается: разбора по ней нет, а человек о ней не знает. Открывается
105
- PR тем же ходом, которым исполнитель говорит, что работу отдаёт, — а не следующим заходом и не
106
- по напоминанию.
107
- - **PR, не готовый к слиянию, помечается черновиком.** Открытый PR читается как приглашение влить,
108
- и человек нажимает слияние, не спрашивая, кончилась ли работа. Черновик разводит два состояния,
109
- которые иначе выглядят одинаково: правка выложена на обозрение — и правка готова поехать в
110
- главную ветку. Помечается им всё, что ждёт прогона, доработки или ответа на вопрос; вопрос при
111
- этом задаётся в самом PR, а не остаётся в голове исполнителя.
112
- - **Снятие черновика — отдельный ход, и им исполнитель отвечает за готовность.** Черновик
113
- снимается тогда, когда проверки пройдены, доработок не осталось и работа сходится с тем, ради
114
- чего заводилась задача. Пока он стоит, молчание исполнителя значит «ещё не готово», и человек
115
- ничего не должен переспрашивать; после снятия оно значит «можно вливать», и цена ошибки здесь —
116
- правка в главной ветке.
117
- - **PR о сделанном остаётся верным до самого слияния.** Он описывает дерево на день, когда его
118
- написали, а разбора ждёт днями: за это время главная ветка вливается в ветку, и утверждение PR о
119
- соседних файлах становится неправдой молча — тел PR не читает ни одна проверка. Всё, что
120
- вливается в ветку после публикации PR, — повод перечитать его.
121
- - **PR в главную ветку вливает человек.** Слияние — последний момент, когда разбор ещё возможен:
122
- после него правка стоит в главной ветке, работа ушла к следующей задаче, и вернуться к ней уже
123
- некому. Исполнитель работы вливает свой PR только по прямому слову человека и только про
124
- названный PR; молчание разрешением не бывает, а слово, сказанное об одном PR, на следующий не
125
- переносится. Иначе разбор проходит тот, кого разбирают, и очередь PR выглядит разобранной, не
126
- будучи ею.
127
- - **Требование, стоящее перед необратимым шагом, стоит там, где этот шаг совершают.** Гард на
128
- машине исполнителя судит его команды и молчит о том же действии, совершённом кнопкой у хостинга:
129
- обход выходит не намеренным, а незамеченным — нажавший не знает, что чего-то не хватало.
130
- Требование либо переносится туда, где нажимают, либо объявляется тому, кто нажимает, до нажатия.
131
- Иначе оно держится не собой, а тем, что необратимый шаг каждый раз делает тот же человек.
132
- - **Слияние в главную ветку ещё не означает, что правка доехала.** Отказ выкатки не трогает ни
133
- задачу, ни очередь работ, поэтому расхождение главной ветки с тем, что работает, обязано быть
134
- видно там, где очередь читают. Иначе следующие работы вливаются поверх поломки, которую не
135
- приносили, и каждая выглядит доехавшей.
136
- - **Состоявшаяся поломка разбирается записью, которая переживает задачу.** Починка уезжает веткой,
137
- задача закрывается — и причина, по которой приложение встало, остаётся знанием одного
138
- исполнителя. Запись называет, что сломалось, чем это стало видно и почему починка чинит причину,
139
- а не признак; живёт она среди описаний состоявшегося, а не там, что умирает вместе с задачей.
7
+ ## Articles
8
+ - **A change starts with a task visible in the work queue.** A created task is not enough: one that
9
+ did not reach the queue is seen by no one, and no work was planned behind it.
10
+ - **A change reaches the main branch only through a separate branch.** A direct write to main takes
11
+ away both the discussion and the chance to roll the change back in one move.
12
+ - **A change belongs to an epic, and the epic is the unit of delivery.** One task changes the
13
+ application no less than a series of them, and merged on its own it reaches the main branch as
14
+ half of a thought: the rest of the series arrives later, or never, and the main branch holds a
15
+ state nobody planned. An epic names what the whole is, so that the main branch takes it whole or
16
+ does not take it. Work outside an epic exists only by the owner's word about that work.
17
+ - **An epic has a branch of its own, and it is taken from the main branch.** Without it the epic
18
+ lives as a plan alone, and a plan is not merged: its tasks stand on the main branch apart from one
19
+ another, half a finished epic is already rolled out while the rest is being written, and a
20
+ rollback goes task by task.
21
+ - **The branch of a task is taken from the branch of its epic, and the PR of the task goes there.**
22
+ Taken from the main branch, a task branch carries into the main branch what the epic has not
23
+ finished; opened into the main branch, its PR makes the epic branch a copy nobody merges.
24
+ - **The PR of an epic into the main branch opens after the folders of all its tasks are taken
25
+ apart.** What lies in them explains the decisions of one piece of work and dies with it: what is
26
+ worth keeping leaves for the description of the past by that same moment. An epic branch that
27
+ reaches the main branch with those folders in it carries into the whole tree what one branch
28
+ needed.
29
+ - **The main branch is merged into the branch of the epic, and the branch of the epic into the
30
+ branches of its tasks.** An epic outlives one task, and by its end its branch has fallen behind
31
+ everything the neighbours merged; a task branch that took the epic branch before that never sees
32
+ the lag. Both merges go while the work runs, not before the hand-over.
33
+ - **The work queue holds tasks, not PRs about them.** A task and its PR share one number and one
34
+ fate, so a second card about the same work adds nothing — it doubles the queue and lies about its
35
+ length. The queue is read to see what is done and what remains; a PR answers a different question
36
+ and opens from the task card, where the link to it already stands. A PR card lives a life of its
37
+ own: it hangs in the queue forever after the merge, because there is no column for it.
38
+ - **A check does not run what the change cannot break.** A set that is the same for every change
39
+ looks strict and works the other way round: a run that takes ten times longer than needed teaches
40
+ people to bypass it, not to wait for it. The set is derived from the content of the change — from
41
+ what it touched, not from what it is named; a change that touched no line of code builds no images
42
+ and takes no snapshots. What is skipped is then called skipped: a step dropped silently reads as
43
+ passed.
44
+ - **A task has one branch, and a branch has one task.** A rollback removes everything that came in
45
+ on that branch at once. Two tasks in it roll back only together, and a task that came in on two
46
+ branches stays half done after one is rolled back — and the work queue does not show it. Work that
47
+ does not fit one branch is split into tasks before the branch is created. The sign of a split is a
48
+ separate rollback, not volume: there is no number of files, lines or commits past which work
49
+ becomes two tasks. A change of one kind stays one task no matter how many files it touches; the
50
+ size of a session says which task to create among those that split lawfully, and does not split
51
+ what cannot be split.
52
+ - **Work that goes one piece after another branches one from another.** The branch of the next is
53
+ taken from the previous, not from main: then the change of the previous lies in the common
54
+ ancestor, and two different edits of one file no longer need reconciling. Branches created from
55
+ main one after another know nothing of each other, and the first merge makes the rest diverge —
56
+ the more surely, the closer the work is by subject. It is not the changes that diverge but the
57
+ lines both wrote to. The cost does not vanish but moves: the one who branches pays it once,
58
+ instead of the one who merges paying it as many times as there are open PRs. The first work of a
59
+ series branches from the branch of its epic, and so does any work not connected to the previous
60
+ one.
61
+ - **A series of branches is handed over bottom up, and the order is named to the owner.** The PR of
62
+ each stands on the previous one, not on main, so one merged out of order drags along everything
63
+ beneath it. The order is known to the one who branched and invisible to the one who merges:
64
+ unsaid, it reads as absent.
65
+ - **A branch that stands under another does not rewrite history.** A force push of the lower one
66
+ makes the tip of the upper reachable from its base, and the hosting closes the upper PR as merged
67
+ — while the main branch holds none of its changes. The divergence is fixed by merging, not by
68
+ moving history.
69
+ - **A change to the delivery itself is checked by running it, not by reasoning.** There is nothing
70
+ else to check it with: it executes only where it rolls out, and in an environment the workplace
71
+ does not have — with someone else's permissions, someone else's secret store and someone else's
72
+ network. "I will check after the merge" is never the executor's decision: behind those words
73
+ stands a rollout that will not happen if the change turns out wrong. Only the owner may postpone
74
+ the check, and says so in words.
75
+ - **Two tasks fixed by one change are one task.** The second is erased together with its number, and
76
+ whatever the first lacked is added to it before that. Two lines about one piece of work are worse
77
+ than a gap in the numbering: afterwards they do not tell what is done and what is not. They can be
78
+ merged while the change has not entered the main branch; after that, both stay as they are.
79
+ - **A task, its branch and the PR about what was done carry the same number in their names.**
80
+ Otherwise one piece of work has to be recognised by the text of its name, and in a list of fifty
81
+ lines that is done from memory and with errors.
82
+ - **The number is written the same way everywhere: task key, hyphen, number.** The title of a task
83
+ and of a PR starts with this pair in square brackets; the branch name starts with the same pair.
84
+ One form, not three similar ones, because the number is read not only by eye: a guard takes it
85
+ from the branch name, the queue audit takes it from the title. Forms derived separately drift
86
+ apart silently and do not fail — they stop recognising the number: the check that was to find work
87
+ without a task lets everything through.
88
+ - **The tree names its task key itself, but must name it.** In the form of the name this is the only
89
+ thing each tree has of its own — and the only thing that is configured. An unnamed key gives
90
+ neither leniency nor a default: work with the queue fails and says where the key is set. An empty
91
+ key is worse than a missing check — what remains of the name is a stub that nothing answers to,
92
+ and not a single task looks correctly named.
93
+ - **What is created in the work queue is visible to the side it was created for.** An account whose
94
+ objects the hosting shows not to everyone leaves behind work that does not exist for the rest.
95
+ From outside this is indistinguishable from done: the task is created, the PR is open, and the
96
+ owner sees an empty queue. Visibility is checked with someone else's eyes — by reading the queue
97
+ as those it is addressed to — not by a successful reply of the create command.
98
+ - **A task has an executor from the moment it is created.** A task without an executor looks like
99
+ nobody's: the work queue does not show who took it, and a change created along the way is lost
100
+ among other people's.
101
+ - **The state of a task in the work queue matches what is happening to it.** One taken into work is
102
+ shown as taken, one waiting for review as waiting. Otherwise untouched, in progress and done look
103
+ the same: the work is taken a second time, and the PR stands unreviewed. The state is moved at the
104
+ moment the work goes to the next step: the queue is read between those moments, not after them.
105
+ - **A change entering the main branch means a rollout.** Everything the change depends on outside
106
+ the code — environment variables, secrets, name records — is put in place before that moment, not
107
+ after.
108
+ - **The sign of the execution mode is declared in the deployment artifact itself, not only in its
109
+ launch composition.** The artifact is also brought up outside that composition — by hand, during
110
+ an analysis, on someone else's machine — and without the declaration it considers itself a debug
111
+ build at that moment, saying nothing about it.
112
+ - **A deployment artifact carries everything that configures what it launches.** The build checks
113
+ that the artifact was built, not that its own launch steps can run. A missing configuration file
114
+ is seen by neither the linter, nor the build, nor the image build step in the pipeline: it fails
115
+ on the first start, that is, already where it was rolled out. A file lying next to it in the
116
+ repository does not get inside the artifact by itself.
117
+ - **The image rolled out is the image of the commit being rolled out.** The default "latest" lags
118
+ behind the main branch, and the application silently returns to the previous version while
119
+ continuing to respond.
120
+ - **The same commit always installs the same dependencies.** If a version is given as a range, an
121
+ install today and an install a week later give different code: the build breaks by itself, and
122
+ there is nothing to roll back. A dependency upgrade is an ordinary change: it has an author, a
123
+ description and a rollback.
124
+ - **The order of storage changes is checked from an empty state.** On a storage that already works,
125
+ a wrong order is invisible: it shows only on a deployment from scratch.
126
+ - **The check before the push looks at the content of the repository, not at the state of the
127
+ machine where it runs.** The machine lawfully holds unfinished work, personal settings and files
128
+ outside the history. A check that reads them rejects the change because of what is not in the
129
+ repository, and stays silent about what is. The check before the push and the rollout pipeline
130
+ judge by the same thing — otherwise "passed" means different things in those two places.
131
+ - **A document travels with the change it describes.** Neither the build nor the checks read texts,
132
+ so the drift accumulates silently and later looks like a current reference.
133
+ - **Work that changes code ends with an open PR.** The PR is the only place where a person sees the
134
+ change whole, answers it and merges it; a commit and a pushed branch do not replace it. Until the
135
+ PR is open, the work does not count as done: there is no review of it, and the person does not
136
+ know about it. The PR is opened in the same turn in which the executor says the work is handed
137
+ over — not in the next session and not on a reminder.
138
+ - **A PR not ready to merge is marked as a draft.** An open PR reads as an invitation to merge, and
139
+ a person presses merge without asking whether the work is finished. The draft separates two states
140
+ that otherwise look the same: the change is put up for viewing — and the change is ready to go to
141
+ the main branch. Everything that waits for a run, for rework or for an answer to a question is
142
+ marked with it; the question is asked in the PR itself, not kept in the executor's head.
143
+ - **Lifting the draft is a separate turn, and with it the executor answers for readiness.** The
144
+ draft is lifted when the checks have passed, no rework remains and the work matches what the task
145
+ was created for. While it stands, the executor's silence means "not ready yet", and the person has
146
+ to ask nothing; after it is lifted, silence means "can be merged", and the price of a mistake here
147
+ is a change in the main branch.
148
+ - **A PR about what was done stays true until the merge itself.** It describes the tree on the day
149
+ it was written, and waits for review for days. In that time the main branch is merged into the
150
+ branch, and the PR's statement about neighbouring files becomes false silently — no check reads PR
151
+ bodies. Everything merged into the branch after the PR is published is a reason to reread it.
152
+ - **A PR into the main branch is merged by a person.** The merge is the last moment when review is
153
+ still possible: after it the change stands in the main branch, the work has moved to the next
154
+ task, and there is nobody left to return to it. The executor of the work merges their own PR only
155
+ on the person's direct word and only about the named PR; silence is never permission, and a word
156
+ said about one PR does not carry over to the next. Otherwise the review is passed by the one being
157
+ reviewed, and the PR queue looks reviewed without being so.
158
+ - **A requirement that stands before an irreversible step stands where that step is taken.** A guard
159
+ on the executor's machine judges their commands and stays silent about the same action done with a
160
+ button at the hosting. The bypass comes out not deliberate but unnoticed: the one who pressed does
161
+ not know anything was missing. The requirement is either moved to where the button is pressed, or
162
+ announced to the one who presses it, before the press. Otherwise it holds not by itself but by the
163
+ fact that the irreversible step is taken by the same person every time.
164
+ - **A merge into the main branch does not yet mean the change has arrived.** A failed rollout
165
+ touches neither the task nor the work queue, so a divergence between the main branch and what runs
166
+ must be visible where the queue is read. Otherwise the next pieces of work merge on top of a
167
+ breakage they did not bring, and each looks as if it arrived.
168
+ - **A breakage that has happened is analysed in a record that outlives the task.** The fix leaves on
169
+ a branch, the task is closed — and the reason the application stopped remains the knowledge of one
170
+ executor. The record names what broke, how it became visible and why the fix fixes the cause and
171
+ not the symptom; it lives in the archive, among the records of what has happened, not where things
172
+ die with the task.
@@ -1,54 +1,56 @@
1
- # Закон о правке сущности
1
+ # Law on entity editing
2
2
 
3
- Как ведёт себя приложение, когда пользователь создаёт или меняет запись. Ведёт оно себя
4
- одинаково везде, где правят записи: это общее поведение, а не особенность одной его части.
3
+ How the application behaves when the user creates or changes a record. It behaves the same
4
+ everywhere records are edited: this is shared behaviour, not a feature of one part of it.
5
5
 
6
- Попадание в запись из списка и объём запрашиваемых данных — предмет других законов.
6
+ Getting into a record from a list and the amount of data requested are the subject of other laws.
7
7
 
8
- ## Статьи
8
+ ## Articles
9
9
 
10
- - **Форма закрывается только после того, как запись сохранена.** Закрытие означает
11
- «сохранено», поэтому закрывать её до ответа сервера нельзя.
12
- - **Пока идёт сохранение, отправить форму второй раз нельзя, и пользователь видит, что запрос
13
- ещё не закончился.** Иначе повторное нажатие отправит те же данные ещё раз.
14
- - **Если сохранить не удалось, введённое остаётся на месте.** Ошибка показана рядом с полями,
15
- форма открыта, и пользователь исправляет данные, а не набирает их заново.
16
- - **Новая попытка убирает сообщение о прошлой ошибке.** Иначе рядом с работающей формой висит
17
- сообщение о неудаче, которой уже нет.
18
- - **После создания форма закрывается всегда, после изменения — по решению экрана.** Новой
19
- записи на экране ещё нет, и держать форму открытой не над чем; при изменении экран может
20
- оставить её открытой и перечитать запись.
21
- - **Об успехе говорит сообщение, а не то, что форма исчезла.** По одному закрытию непонятно,
22
- сохранилось ли, — тем более что список за формой обновляется не сразу.
23
- - **Форму, в которой ничего не меняли, отправить нельзя.** Иначе пользователь шлёт запрос без
24
- правок и получает подтверждение того, чего не делал.
25
- - **Если пользователь уходит с несохранёнными правками, приложение спрашивает, что с ними
26
- делать.** Ответа три: уйти без сохранения, сохранить и уйти, остаться. Спрашивается это,
27
- каким бы способом пользователь ни уходил.
28
- - **По подписи действия, которое уводит с формы, понятно, что станет с введённым.** Если на
29
- форме с правками и на форме только для просмотра написано одно и то же слово, пользователь
30
- не знает, потеряет он введённое или нет.
31
- - **Если запись по ссылке уже удалена, пользователь видит объяснение, а не пустой экран.**
32
- - **Какую запись показывать, форма берёт из адреса.** Иначе её не открыть по ссылке и не
33
- восстановить после перезагрузки.
34
- - **При прокрутке длинной формы её название и её действия остаются на виду.**
35
- - **По названию формы понятно, что сейчас произойдёт, а не только с какой записью работает
36
- пользователь.** По одному имени записи непонятно, создают её или меняют.
37
- - **Создание и изменение названы по-разному.**
38
- - **Сохранить введённое можно одним действием.** Оно стоит в стороне от того, которое уводит с
39
- формы, чтобы их не перепутали.
40
- - **Уйти с формы можно несколькими способами:** мышью, с клавиатуры и нажатием вне формы.
41
- - **Закрытая форма нажатий не перехватывает.** Её не видно, а страница под ней перестала бы
42
- отвечать без всякого объяснения.
43
- - **У всех полей формы одинаковые отступы от края и одинаковая ширина.** Содержимое
44
- прокручивается целиком, поэтому рамка фокуса у крайнего поля не обрезается.
45
- - **Пока запись загружается, на месте полей показано, что идёт загрузка.**
46
- - **Запись, которую нельзя менять, показана текстом, а не полями ввода.** Поле, которое не
47
- принимает ввод, пользователь сначала пробует заполнить.
48
- - **На связанную запись можно перейти прямо из формы.** Переход — такой же уход с формы, как
49
- закрытие, поэтому о несохранённых правках спрашивается так же; выбравшему сохранить и уйти
50
- связанная запись открывается после успешного сохранения.
51
- - **Пояснение стоит рядом с тем, что вызвало вопрос.**
52
- - **Отправляемость формы и вопрос при уходе решаются одним признаком.** Два разных ответа на
53
- вопрос «изменилось ли что-нибудь» рано или поздно расходятся, и форма либо шлёт пустую
54
- правку, либо молча теряет введённое.
10
+ - **The form closes only after the record is saved.** Closing means "saved", so it must not close
11
+ before the server replies.
12
+ - **While saving is in progress, the form cannot be submitted a second time, and the user sees that
13
+ the request has not finished yet.** Otherwise a repeated press sends the same data once more.
14
+ - **If saving failed, what was entered stays in place.** The error is shown next to the fields, the
15
+ form is open, and the user corrects the data instead of typing it again.
16
+ - **A new attempt removes the message about the previous error.** Otherwise a message about a
17
+ failure that no longer exists hangs next to a working form.
18
+ - **After creation the form always closes; after a change, the screen decides.** The new record is
19
+ not on the screen yet, and there is nothing to keep the form open over; on a change the screen may
20
+ keep it open and reread the record.
21
+ - **Success is announced by a message, not by the form disappearing.** Closing alone does not tell
22
+ whether it was saved — all the more so since the list behind the form does not refresh at once.
23
+ - **A form in which nothing was changed cannot be submitted.** Otherwise the user sends a request
24
+ without edits and gets a confirmation of what they did not do.
25
+ - **If the user leaves with unsaved edits, the application asks what to do with them.** There are
26
+ three answers: leave without saving, save and leave, stay. This is asked whatever way the user
27
+ leaves.
28
+ - **The label of an action that leads away from the form makes clear what happens to what was
29
+ entered.** If a form with edits and a view-only form show the same word, the user does not know
30
+ whether they will lose what they entered.
31
+ - **If the record behind a link is already deleted, the user sees an explanation, not an empty
32
+ screen.**
33
+ - **The form takes which record to show from the address.** Otherwise it cannot be opened by a link
34
+ or restored after a reload.
35
+ - **When a long form is scrolled, its title and its actions stay in view.**
36
+ - **The title of the form makes clear what is about to happen, not only which record the user is
37
+ working with.** The name of a record alone does not tell whether it is being created or changed.
38
+ - **Creation and change are named differently.**
39
+ - **What was entered can be saved with one action.** It stands apart from the one that leads away
40
+ from the form, so the two are not confused.
41
+ - **The form can be left in several ways:** with the mouse, from the keyboard and by a press outside
42
+ the form.
43
+ - **A closed form does not intercept presses.** It is not visible, and the page under it would stop
44
+ responding without any explanation.
45
+ - **All fields of the form have the same distance from the edge and the same width.** The content
46
+ scrolls as a whole, so the focus ring of the outermost field is not clipped.
47
+ - **While the record is loading, the place of the fields shows that loading is in progress.**
48
+ - **A record that cannot be changed is shown as text, not as input fields.** The user first tries to
49
+ fill in a field that does not accept input.
50
+ - **A related record can be opened straight from the form.** The transition is the same leaving of
51
+ the form as closing, so the question about unsaved edits is asked the same way; for the one who
52
+ chose to save and leave, the related record opens after a successful save.
53
+ - **An explanation stands next to what raised the question.**
54
+ - **Whether the form can be submitted and whether to ask on leaving are decided by one sign.** Two
55
+ different answers to the question "has anything changed" drift apart sooner or later, and the form
56
+ either sends an empty edit or silently loses what was entered.
@@ -1,17 +1,18 @@
1
- # Закон о моделях сущностей
1
+ # Law on entity models
2
2
 
3
- Сколько данных приложение запрашивает и отдаёт на каждом экране: строка списка, открытая
4
- запись, пункт выпадающего списка. Одна и та же сущность выглядит на них по-разному, и
5
- разница эта не украшение — от неё зависит, сколько пользователь ждёт список.
3
+ How much data the application requests and returns on every screen: a list row, an opened
4
+ record, a dropdown item. The same entity looks different on each of them, and that difference is
5
+ no decoration — it decides how long the user waits for a list.
6
6
 
7
- Как список показывает записи и как ведёт себя форма правки — предмет других законов.
7
+ How a list shows records and how an edit form behaves are the subject of other laws.
8
8
 
9
- ## Статьи
9
+ ## Articles
10
10
 
11
- - **У сущности две стороны: то, что пришло из контракта, и то, чем пользуется экран.** Первая
12
- повторяет контракт дословно, вторая нормализована и от смены контракта не зависит.
13
- - **Сторона контракта руками не пишется.** Она объявляется псевдонимом сгенерированного типа:
14
- переписанное вручную расходится с контрактом молча.
15
- - **Между сторонами стоит перевод, и экраны читают только вторую.**
16
- - **Пустое значение выражается пустой строкой или нулём, а не отсутствием поля.** Необязательных
17
- скаляров в контракте нет, и «не задано» у каждого поля значит своё.
11
+ - **An entity has two sides: what came from the contract, and what the screen uses.** The first
12
+ repeats the contract word for word; the second is normalised and does not depend on a contract
13
+ change.
14
+ - **The contract side is not written by hand.** It is declared as an alias of the generated type:
15
+ rewritten by hand, it drifts from the contract silently.
16
+ - **Between the sides stands a mapper, and screens read only the second.**
17
+ - **An empty value is expressed by an empty string or zero, not by a missing field.** There are
18
+ no optional scalars in the contract, and "not set" means something different for every field.