@rt-tools/agent-kit 0.24.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/assets/agents/business-analyst.md +51 -50
  2. package/assets/agents/conscience.md +37 -35
  3. package/assets/agents/project-manager.md +49 -48
  4. package/assets/agents/prose-editor.md +31 -29
  5. package/assets/agents/qa-engineer.md +50 -48
  6. package/assets/agents/rules-reviewer.md +63 -58
  7. package/assets/agents/skill-curator.md +83 -78
  8. package/assets/agents/spec-critic.md +34 -29
  9. package/assets/agents/spec-writer.md +35 -32
  10. package/assets/agents/strict-teacher.md +39 -37
  11. package/assets/checks/archive-age.mjs +48 -28
  12. package/assets/checks/archive-prune.mjs +16 -14
  13. package/assets/checks/board-epics.github.mjs +75 -41
  14. package/assets/checks/board-folders.mjs +61 -0
  15. package/assets/checks/board-gh.github.mjs +35 -26
  16. package/assets/checks/board-long-work.github.mjs +24 -24
  17. package/assets/checks/board-paths.github.mjs +21 -16
  18. package/assets/checks/board-runs.github.mjs +45 -43
  19. package/assets/checks/board-titles.github.mjs +19 -17
  20. package/assets/checks/board.github.mjs +149 -127
  21. package/assets/checks/check-archive-age.mjs +23 -19
  22. package/assets/checks/check-board.github.mjs +172 -164
  23. package/assets/checks/check-descriptions.mjs +30 -29
  24. package/assets/checks/check-doc-paths.mjs +91 -88
  25. package/assets/checks/check-dupes.mjs +84 -80
  26. package/assets/checks/check-file-size.mjs +74 -71
  27. package/assets/checks/check-glossary.mjs +47 -37
  28. package/assets/checks/check-hook-scope.mjs +30 -27
  29. package/assets/checks/check-lib-layers.mjs +22 -21
  30. package/assets/checks/check-profile-drift.mjs +48 -43
  31. package/assets/checks/check-prose-style.mjs +120 -37
  32. package/assets/checks/check-push-gate.mjs +53 -50
  33. package/assets/checks/check-reuse.mjs +50 -40
  34. package/assets/checks/check-schema-drift.mjs +87 -83
  35. package/assets/checks/check-specs.mjs +155 -134
  36. package/assets/checks/check-state-next.mjs +66 -52
  37. package/assets/checks/check-states.mjs +32 -30
  38. package/assets/checks/check-styles.mjs +52 -51
  39. package/assets/checks/check-turn-map.mjs +54 -46
  40. package/assets/checks/lib-boundaries.mjs +32 -30
  41. package/assets/checks/lib-common.mjs +30 -29
  42. package/assets/checks/lib-domains.mjs +34 -34
  43. package/assets/checks/lib-manifests.mjs +17 -15
  44. package/assets/checks/lib-reexports.mjs +18 -18
  45. package/assets/checks/rt-kit-checks.config.mjs +174 -142
  46. package/assets/checks/signals.mjs +43 -39
  47. package/assets/checks/spec-anchors.mjs +114 -87
  48. package/assets/checks/spec-common.mjs +128 -84
  49. package/assets/checks/spec-contract.mjs +30 -30
  50. package/assets/checks/spec-proposed.mjs +27 -24
  51. package/assets/checks/spec-scenarios.mjs +51 -28
  52. package/assets/checks/task-new.github.mjs +85 -56
  53. package/assets/commands/feedback.md +65 -59
  54. package/assets/commands/next-session.md +64 -57
  55. package/assets/commands/skill-curator.md +83 -79
  56. package/assets/defaults/gate-map.sh +108 -97
  57. package/assets/defaults/project.sh +225 -185
  58. package/assets/defaults/shell.sh +73 -68
  59. package/assets/defaults/turn-map.md +45 -44
  60. package/assets/docs/GLOSSARY.md +142 -65
  61. package/assets/hooks/browser-device-id.sh +12 -12
  62. package/assets/hooks/browser-guard-device-id.sh +30 -28
  63. package/assets/hooks/browser-guard-no-asking.sh +5 -4
  64. package/assets/hooks/browser-guard-no-listing.sh +12 -11
  65. package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
  66. package/assets/hooks/browser-guard-require-select.sh +34 -23
  67. package/assets/hooks/claim-guard.sh +62 -56
  68. package/assets/hooks/commit-msg.sh +11 -10
  69. package/assets/hooks/conscience-guard.sh +91 -45
  70. package/assets/hooks/constitution-index.sh +16 -16
  71. package/assets/hooks/deny-tail.sh +28 -26
  72. package/assets/hooks/dev-server-guard.sh +46 -43
  73. package/assets/hooks/dispatch.sh +60 -46
  74. package/assets/hooks/docs-guard.sh +100 -91
  75. package/assets/hooks/exam-guard.sh +105 -93
  76. package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
  77. package/assets/hooks/git-guard-delivery-draft.sh +45 -38
  78. package/assets/hooks/git-guard-delivery-folder.sh +50 -43
  79. package/assets/hooks/git-guard-delivery-signature.sh +88 -52
  80. package/assets/hooks/git-guard-delivery.sh +196 -180
  81. package/assets/hooks/git-guard-main.sh +38 -34
  82. package/assets/hooks/git-guard-push-tests.sh +99 -87
  83. package/assets/hooks/glossary-load.sh +23 -22
  84. package/assets/hooks/grill-gate-ask.sh +12 -11
  85. package/assets/hooks/grill-gate.sh +94 -87
  86. package/assets/hooks/guard-note.sh +20 -19
  87. package/assets/hooks/handoff-entry-guard.sh +26 -24
  88. package/assets/hooks/handoff-write.sh +74 -67
  89. package/assets/hooks/hook-input.sh +67 -58
  90. package/assets/hooks/lint-after-edit.sh +95 -61
  91. package/assets/hooks/observe.sh +28 -26
  92. package/assets/hooks/override-write-guard.sh +23 -21
  93. package/assets/hooks/postmortem-guard.sh +42 -39
  94. package/assets/hooks/profile-check.sh +22 -20
  95. package/assets/hooks/proposal-guard.sh +57 -49
  96. package/assets/hooks/prose-style-guard.sh +19 -17
  97. package/assets/hooks/qa-dataid-guard.sh +52 -49
  98. package/assets/hooks/rerun-guard.sh +31 -30
  99. package/assets/hooks/reuse-first-guard.sh +108 -87
  100. package/assets/hooks/roles.sh +14 -14
  101. package/assets/hooks/rule-article.sh +36 -34
  102. package/assets/hooks/rule-source-guard.sh +47 -42
  103. package/assets/hooks/skill-gate-layers.sh +59 -57
  104. package/assets/hooks/skill-gate-rearm.sh +15 -8
  105. package/assets/hooks/skill-gate.sh +89 -81
  106. package/assets/hooks/skill-loaded.sh +6 -6
  107. package/assets/hooks/sql-guard-parse.sh +68 -66
  108. package/assets/hooks/sql-guard-request.sh +48 -46
  109. package/assets/hooks/sql-guard-target.sh +57 -51
  110. package/assets/hooks/sql-guard-write.sh +84 -79
  111. package/assets/hooks/sql-guard.sh +52 -47
  112. package/assets/hooks/stand-login-guard.sh +40 -37
  113. package/assets/hooks/task-context-load.sh +60 -55
  114. package/assets/hooks/task-flow-context.sh +87 -69
  115. package/assets/hooks/task-flow-draft-guard.sh +55 -48
  116. package/assets/hooks/task-flow-guard.sh +67 -64
  117. package/assets/hooks/turn-entry-load.sh +39 -32
  118. package/assets/hooks/turn-exit-guard.sh +256 -204
  119. package/assets/hooks/turn-exit-patterns.sh +53 -0
  120. package/assets/hooks/utf8.sh +11 -11
  121. package/assets/hooks/waiting-turn-guard.sh +94 -94
  122. package/assets/hooks/window-fill-guard.sh +70 -62
  123. package/assets/hooks/work-start-guard.sh +52 -49
  124. package/assets/hooks/write-targets.sh +96 -44
  125. package/assets/laws/autonomous-work.md +29 -27
  126. package/assets/laws/code-structure.md +31 -30
  127. package/assets/laws/delivery.md +148 -137
  128. package/assets/laws/entity-editing.md +52 -50
  129. package/assets/laws/entity-models.md +14 -13
  130. package/assets/laws/frontend-application.md +39 -38
  131. package/assets/laws/lib-imports.md +27 -27
  132. package/assets/laws/lists.md +31 -29
  133. package/assets/laws/navigation.md +37 -37
  134. package/assets/laws/observability.md +41 -40
  135. package/assets/laws/project-documentation.md +106 -99
  136. package/assets/laws/reuse-first.md +31 -29
  137. package/assets/laws/shared-code.md +27 -27
  138. package/assets/laws/verifiability.md +131 -124
  139. package/assets/laws/work-conduct.md +250 -244
  140. package/assets/patterns/admin-lists-screen.md +72 -69
  141. package/assets/patterns/admin-nav-item.md +51 -46
  142. package/assets/patterns/angular-patterns-state.md +32 -31
  143. package/assets/patterns/api-layer-pair.md +33 -31
  144. package/assets/patterns/autonomous-work-run.md +50 -49
  145. package/assets/patterns/browser-verification-measure.md +124 -88
  146. package/assets/patterns/browser-verification-stand.md +169 -157
  147. package/assets/patterns/component-structure-new.md +51 -42
  148. package/assets/patterns/dependencies-upgrade.md +55 -39
  149. package/assets/patterns/doc-style-human.md +55 -37
  150. package/assets/patterns/doc-style-sweep.md +82 -79
  151. package/assets/patterns/doc-style-trace.md +87 -81
  152. package/assets/patterns/doc-style-write.md +130 -122
  153. package/assets/patterns/entity-aside.md +77 -63
  154. package/assets/patterns/entity-models-new.md +37 -37
  155. package/assets/patterns/entity-store.md +33 -33
  156. package/assets/patterns/git-workflow-commit.azure.md +93 -86
  157. package/assets/patterns/git-workflow-commit.github.md +152 -141
  158. package/assets/patterns/git-workflow-commit.gitlab.md +95 -89
  159. package/assets/patterns/git-workflow-docker.md +165 -147
  160. package/assets/patterns/git-workflow-freshness.md +45 -45
  161. package/assets/patterns/git-workflow-merge.md +98 -93
  162. package/assets/patterns/git-workflow-migration.md +54 -52
  163. package/assets/patterns/git-workflow-pr-ready.md +57 -56
  164. package/assets/patterns/git-workflow-pr.azure.md +126 -121
  165. package/assets/patterns/git-workflow-pr.github.md +179 -175
  166. package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
  167. package/assets/patterns/git-workflow-restart.md +35 -31
  168. package/assets/patterns/git-workflow-secrets.md +80 -73
  169. package/assets/patterns/git-workflow-stack.md +131 -106
  170. package/assets/patterns/lib-layers-move.md +62 -53
  171. package/assets/patterns/lib-layers-new.md +59 -45
  172. package/assets/patterns/observability-record.md +72 -67
  173. package/assets/patterns/platform-access-di.md +31 -29
  174. package/assets/patterns/reuse-first-extend.md +66 -61
  175. package/assets/patterns/shared-code-new.md +39 -38
  176. package/assets/patterns/spec-driven-domain.md +161 -151
  177. package/assets/patterns/spec-driven-rule.md +179 -168
  178. package/assets/patterns/spec-driven-sweep.md +41 -39
  179. package/assets/patterns/status-report-table.github.md +37 -36
  180. package/assets/patterns/styling-bem-component.md +42 -42
  181. package/assets/patterns/styling-bem-layout.md +39 -34
  182. package/assets/patterns/styling-bem-sheet.md +59 -58
  183. package/assets/patterns/task-flow-archive.md +222 -215
  184. package/assets/patterns/task-flow-close.md +215 -203
  185. package/assets/patterns/task-flow-handoff.md +154 -145
  186. package/assets/patterns/task-flow-resume.md +138 -133
  187. package/assets/patterns/task-flow-start.md +204 -192
  188. package/assets/patterns/testing-e2e.md +102 -101
  189. package/assets/patterns/testing-unit.md +77 -70
  190. package/assets/patterns/ts-procedure.md +32 -29
  191. package/assets/patterns/turn-entry-map.md +50 -48
  192. package/assets/pitfalls/agent-kit.md +152 -141
  193. package/assets/pitfalls/doc-style.md +96 -91
  194. package/assets/pitfalls/git-workflow.azure.md +49 -46
  195. package/assets/pitfalls/git-workflow.github.md +264 -234
  196. package/assets/pitfalls/git-workflow.gitlab.md +49 -45
  197. package/assets/pitfalls/spec-driven.md +73 -71
  198. package/assets/pitfalls/styling-bem.md +46 -40
  199. package/assets/pitfalls/task-flow.md +262 -246
  200. package/assets/pitfalls/testing.md +99 -92
  201. package/assets/pitfalls/turn-conduct.md +96 -81
  202. package/assets/rules/angular-patterns.md +81 -80
  203. package/assets/rules/api-layer.md +77 -74
  204. package/assets/rules/autonomous-work.md +75 -74
  205. package/assets/rules/browser-verification.md +223 -214
  206. package/assets/rules/component-structure.md +72 -69
  207. package/assets/rules/dependencies.md +74 -67
  208. package/assets/rules/deploy-flow.azure.md +118 -108
  209. package/assets/rules/deploy-flow.github.md +145 -135
  210. package/assets/rules/deploy-flow.gitlab.md +120 -110
  211. package/assets/rules/doc-style.md +198 -173
  212. package/assets/rules/entity-conventions.needs-admin.md +81 -79
  213. package/assets/rules/entity-models.md +73 -70
  214. package/assets/rules/git-workflow.azure.md +224 -228
  215. package/assets/rules/git-workflow.github.md +250 -239
  216. package/assets/rules/git-workflow.gitlab.md +218 -217
  217. package/assets/rules/lib-layers.md +85 -86
  218. package/assets/rules/lists.md +101 -97
  219. package/assets/rules/navigation.md +78 -78
  220. package/assets/rules/observability.needs-app.md +165 -153
  221. package/assets/rules/platform-access.md +76 -75
  222. package/assets/rules/reuse-first.md +153 -143
  223. package/assets/rules/shared-code.md +82 -79
  224. package/assets/rules/spec-driven.md +272 -260
  225. package/assets/rules/status-report.md +55 -58
  226. package/assets/rules/styling-bem.md +81 -77
  227. package/assets/rules/task-flow.md +282 -270
  228. package/assets/rules/testing.md +224 -209
  229. package/assets/rules/turn-conduct.md +255 -258
  230. package/assets/rules/turn-entry.md +92 -87
  231. package/assets/rules/typescript-conventions.md +94 -88
  232. package/assets/samples/specs/_template/spec.md +47 -47
  233. package/assets/samples/tasks/_template/grill.md +20 -20
  234. package/assets/samples/tasks/_template/plan.md +32 -30
  235. package/assets/samples/tasks/_template/progress.md +16 -16
  236. package/assets/skills/agent-kit-extend.md +129 -113
  237. package/assets/skills/agent-kit.md +235 -211
  238. package/assets/skills/write-a-skill.md +76 -71
  239. package/assets/templates/findings.md +19 -19
  240. package/assets/templates/gate-map.sh +16 -14
  241. package/assets/templates/implementation.md +28 -27
  242. package/assets/templates/pattern.md +17 -17
  243. package/assets/templates/pitfalls.md +6 -6
  244. package/assets/templates/postmortem.md +24 -23
  245. package/assets/templates/project.sh +24 -24
  246. package/assets/templates/proposal.md +62 -60
  247. package/assets/templates/rule.md +38 -38
  248. package/assets/workflows/feature.js +46 -46
  249. package/assets/workflows/plan.js +54 -54
  250. package/lib/catalog.d.ts +2 -0
  251. package/lib/catalog.d.ts.map +1 -1
  252. package/lib/catalog.js +4 -3
  253. package/lib/catalog.js.map +1 -1
  254. package/lib/commands.d.ts.map +1 -1
  255. package/lib/commands.js +5 -2
  256. package/lib/commands.js.map +1 -1
  257. package/lib/companion.js +3 -2
  258. package/lib/companion.js.map +1 -1
  259. package/lib/enroll.d.ts +7 -1
  260. package/lib/enroll.d.ts.map +1 -1
  261. package/lib/enroll.js +12 -3
  262. package/lib/enroll.js.map +1 -1
  263. package/lib/plan.d.ts +11 -0
  264. package/lib/plan.d.ts.map +1 -1
  265. package/lib/plan.js +10 -1
  266. package/lib/plan.js.map +1 -1
  267. package/lib/ship.d.ts +0 -7
  268. package/lib/ship.d.ts.map +1 -1
  269. package/lib/ship.js +10 -2
  270. package/lib/ship.js.map +1 -1
  271. package/lib/shipment.d.ts.map +1 -1
  272. package/lib/shipment.js +6 -2
  273. package/lib/shipment.js.map +1 -1
  274. package/lib/sync.d.ts.map +1 -1
  275. package/lib/sync.js +45 -11
  276. package/lib/sync.js.map +1 -1
  277. package/package.json +1 -1
  278. package/rt-tools-agent-kit-0.26.0.tgz +0 -0
  279. package/rt-tools-agent-kit-0.24.0.tgz +0 -0
@@ -2,53 +2,54 @@
2
2
  name: git-workflow-migration
3
3
  kind: pattern
4
4
  rule: deploy-flow
5
- description: Паттерн правила deploy-flow. Брать при правке prisma/schema.prisma и prisma/migrations/** — готовые команды одноразового контейнера, написание файла миграции через migrate diff, накат локальной базы. Не брать для коммита — это паттерн git-workflow-commit, для PR — git-workflow-pr.
5
+ description: Pattern of rule deploy-flow. Load when editing prisma/schema.prisma and prisma/migrations/** — ready-made commands for a one-off container, writing the migration file through migrate diff, applying to the local database. Not for the commit — pattern git-workflow-commit; for the PR — git-workflow-pr.
6
6
  ---
7
7
 
8
- # Миграция и прогон цепочки
8
+ # A migration and the chain run
9
9
 
10
- Паттерн правила `deploy-flow`. Что при этом должно быть верно — закон
10
+ Pattern of the rule `deploy-flow`. What must be true meanwhile — the law
11
11
  `docs/constitution/delivery.md`.
12
12
 
13
- ## Когда брать
13
+ ## When to use
14
14
 
15
- - Правится `prisma/schema.prisma`.
16
- - Заводится или переименовывается каталог в `prisma/migrations/`.
17
- - Ветка с новой миграцией готовится к мержу.
15
+ - `prisma/schema.prisma` is being edited.
16
+ - A directory in `prisma/migrations/` is being created or renamed.
17
+ - A branch with a new migration is being prepared for the merge.
18
18
 
19
- ## Цепочка гоняется одной командой
19
+ ## The chain is run by one command
20
20
 
21
- Локальные `lint`, `test`, `check:all` и сборки порядок миграций не трогают вовсе, а шаг
22
- `Migrations match schema` в `.github/workflows/deploy.yml` идёт уже после мержа. Проверка
23
- стоит гейтом пуша и зовётся руками:
21
+ Local `lint`, `test`, `check:all` and the builds do not touch the migration order at all, and the
22
+ step `Migrations match schema` in `.github/workflows/deploy.yml` goes after the merge. The check
23
+ stands as a push gate and is called by hand:
24
24
 
25
25
  ```bash
26
26
  npm run check:schema
27
27
  ```
28
28
 
29
- Она накатывает цепочку на теневую базу — ту же, что рабочая, с суффиксом `_gate_shadow`, —
30
- сравнивает её со схемой и сносит. Своя база при этом не трогается: сверка с ней судила бы о
31
- состоянии машины, а не репозитория. Погашенный докер и боевой адрес проверка пропускает
32
- молча.
29
+ It applies the chain to a shadow database — the same as the working one, with the suffix
30
+ `_gate_shadow` — compares it with the schema and tears it down. One's own database is not
31
+ touched: an audit against it would judge the state of the machine, not of the repository. A
32
+ stopped docker and a production address the check skips silently.
33
33
 
34
- Когда базы под рукой нет вовсе, та же цепочка гоняется на одноразовом контейнере:
34
+ When there is no database at hand at all, the same chain is run on a one-off container:
35
35
 
36
36
  ```bash
37
37
  docker run -d --rm --name <префикс>-migcheck -e POSTGRES_PASSWORD=migcheck -p 55432:5432 postgres:16-alpine
38
- docker exec <префикс>-migcheck pg_isready -U postgres # накат до готовности падает на соединении
38
+ docker exec <префикс>-migcheck pg_isready -U postgres # an apply before readiness fails on the connection
39
39
  DATABASE_URL=postgresql://postgres:migcheck@localhost:55432/postgres npx prisma migrate deploy
40
40
  DATABASE_URL=postgresql://postgres:migcheck@localhost:55432/postgres npx prisma migrate diff \
41
41
  --from-config-datasource --to-schema prisma/schema.prisma --exit-code
42
42
  docker stop <префикс>-migcheck
43
43
  ```
44
44
 
45
- Адрес ставится префиксом самой команды — `export` между вызовами не живёт.
45
+ The address is set as a prefix of the command itself — `export` does not live between calls.
46
46
 
47
- ## Файл миграции пишется тем же контейнером
47
+ ## The migration file is written by the same container
48
48
 
49
- `prisma migrate dev` не запускается ни командой, ни через `npm run prisma:migrate`: любое
50
- расхождение состояния он лечит предложением сбросить базу, а в локальной базе лежат объекты и
51
- брони владельца. Файл берётся разницей между накатанной цепочкой и схемой:
49
+ `prisma migrate dev` is not run either as a command or through `npm run prisma:migrate`: any
50
+ divergence of state it cures by offering to reset the database, and the local database holds the
51
+ owner's properties and bookings. The file is taken as the difference between the applied chain
52
+ and the schema:
52
53
 
53
54
  ```bash
54
55
  DATABASE_URL=postgresql://postgres:migcheck@localhost:55432/postgres npx prisma migrate diff \
@@ -56,44 +57,45 @@ DATABASE_URL=postgresql://postgres:migcheck@localhost:55432/postgres npx prisma
56
57
  > prisma/migrations/<метка>_<имя>/migration.sql
57
58
  ```
58
59
 
59
- Каталог заводится **после** наката цепочки: пустой каталог, попавший в `migrate deploy`,
60
- помечается применённым, и его содержимое на этот контейнер уже не встанет.
60
+ The directory is created **after** the chain is applied: an empty directory that got into
61
+ `migrate deploy` is marked applied, and its contents will no longer land on this container.
61
62
 
62
- ## Локальная база догоняет ветку
63
+ ## The local database catches up with the branch
63
64
 
64
65
  ```bash
65
66
  npx prisma migrate deploy
66
67
  ```
67
68
 
68
- Переименованная миграция остаётся в ней под прежним именем, и накат падает на
69
- `relation … already exists`. Состояние правится, повторный накат его не чинит:
69
+ A renamed migration stays in it under the old name, and the apply fails on
70
+ `relation … already exists`. The state is edited, a repeated apply does not fix it:
70
71
 
71
72
  ```bash
72
73
  npx prisma migrate resolve --applied <новое имя>
73
74
  ```
74
75
 
75
- ## Частые промахи
76
-
77
- - **Накат в образе настраивается файлом настройки, а не адресом в окружении.** Седьмая редакция
78
- читает адрес хранилища только из своего файла настройки: ни объявление в схеме, ни переменная
79
- окружения в составе прода его не заменяют. Этот файл кладётся в образ явно, рядом со схемой и
80
- миграциями. Без него сборка зелёная целиком — генерация клиента на стадии сборки проходит, — а
81
- отказывает первый же накат на узле.
82
- - Метку времени ставит момент создания, а порядок применения лексикографический: миграция из
83
- ветки, начатой раньше, встаёт перед той, от которой зависит. На существующей базе это
84
- незаметно — падает только накат с нуля.
85
- - Флаги `prisma migrate diff` не те, что в примерах из сети: `--from-url`, `--to-url`,
86
- `--shadow-database-url` и `--to-schema-datamodel` сняты, а `prisma db execute` адреса
87
- базы не принимает вовсе и берёт его из `prisma.config.ts`. На неизвестный флаг обе команды
88
- печатают справку, и промах виден только в ней. Какие флаги есть сейчас, смотрят в
89
- `prisma migrate diff --help`, а не в этом тексте.
90
- - Запись в боевую базу (порт 15432, прод-хост) запрещена совсем: схема меняется миграцией
91
- через деплой, данные — через админку.
92
- - Строки адресуются по первичному ключу, а не по маске: удаление по маске почты однажды унесло
93
- вместе с тестовыми записями демонстрационные брони владельца.
94
- - **Формой запроса вопрос гарда не снимается.** Условие по идентификатору он судит одинаково в
95
- любой записи — что по одному, что по списку, — и на обе отвечает вопросом владельцу; отказ
96
- приходит только на условие не по идентификатору. Там, где вопрос читается отказом, ход один:
97
- назвать владельцу отбитую команду и попросить режим, в котором вопрос дойдёт, — а не
98
- переписывать запрос, пока он не пройдёт. Иначе из захода уносят вывод о требованиях гарда,
99
- которых у него нет.
76
+ ## Common misses
77
+
78
+ - **The apply in the image is set up by the settings file, not by an address in the
79
+ environment.** The seventh edition reads the storage address only from its own settings file:
80
+ neither the declaration in the schema nor an environment variable in the production stack
81
+ replaces it. That file is put into the image explicitly, next to the schema and the migrations.
82
+ Without it the build is green whole — client generation at the build stage passes — and the
83
+ first apply on the node refuses.
84
+ - The timestamp is set by the moment of creation, and the apply order is lexicographic: a
85
+ migration from a branch started earlier lands before the one it depends on. On an existing
86
+ database this is invisible — only an apply from scratch fails.
87
+ - The flags of `prisma migrate diff` are not those from the examples on the web: `--from-url`,
88
+ `--to-url`, `--shadow-database-url` and `--to-schema-datamodel` are removed, and
89
+ `prisma db execute` takes no database address at all and reads it from `prisma.config.ts`. On
90
+ an unknown flag both commands print the help, and the miss is visible only there. Which flags
91
+ exist now is looked up in `prisma migrate diff --help`, not in this text.
92
+ - A write to the production database (port 15432, the production host) is forbidden altogether:
93
+ the schema changes by a migration through the rollout, the data — through the admin.
94
+ - Rows are addressed by the primary key, not by a mask: a deletion by a mail mask once took the
95
+ owner's demonstration bookings away together with the test records.
96
+ - **The guard's question is not lifted by the form of the query.** It judges a condition by
97
+ identifier the same way in any spelling — one at a time or as a list — and answers both with a
98
+ question to the owner; a refusal comes only on a condition not by identifier. Where the question
99
+ reads as a refusal, there is one way: name the refused command to the owner and ask for the mode
100
+ in which the question gets through — not rewrite the query until it passes. Otherwise the
101
+ session carries away a conclusion about guard requirements it does not have.
@@ -2,92 +2,93 @@
2
2
  name: git-workflow-pr-ready
3
3
  kind: pattern
4
4
  rule: git-workflow
5
- description: Паттерн правила git-workflow. Брать, когда заявки уже открыты: снятие черновика, разбор красного прогона, доведение череды до готовности, порядок «сначала довести отданное, потом брать новое». Открытие одной заявки — паттерн git-workflow-pr, порядок череды — git-workflow-stack.
5
+ description: Pattern of rule git-workflow. Load when PRs are already open — leaving draft, handling a red run, bringing a chain to readiness, the order "finish what was handed over first, then take new work". Opening one PR — pattern git-workflow-pr; the chain order — git-workflow-stack.
6
6
  ---
7
7
 
8
- # Доведение заявки до готовности
8
+ # Bringing a PR to readiness
9
9
 
10
- Паттерн правила `git-workflow`. Что при этом должно быть верно — закон
11
- `docs/constitution/delivery.md`. Открытие заявки — паттерн `git-workflow-pr`, порядок череды —
12
- `git-workflow-stack`, разбор одного конфликта — `git-workflow-merge`.
10
+ Pattern of the rule `git-workflow`. What must be true — the law
11
+ `docs/constitution/delivery.md`. Opening a PR — pattern `git-workflow-pr`, the chain order —
12
+ `git-workflow-stack`, resolving one conflict — `git-workflow-merge`.
13
13
 
14
- ## Когда брать
14
+ ## When to use
15
15
 
16
- - Заявка открыта черновиком, и прогон по ней кончился.
17
- - Открыто несколько заявок разом, и надо решить, что делать раньше — доводить их или брать
18
- следующую задачу.
19
- - Прогон заявки красный, а правка в ветке зелёная у себя.
16
+ - A PR is open as a draft, and its run has ended.
17
+ - Several PRs are open at once, and it must be decided what comes first — finishing them or
18
+ taking the next task.
19
+ - The PR's run is red, while the edit in the branch is green on its own.
20
20
 
21
- ## Черновик — состояние работы, а не её вид
21
+ ## A draft is the state of the work, not its look
22
22
 
23
- Черновик говорит одно: работу нельзя вливать. Кнопка слияния у него заблокирована хостингом, и
24
- владелец, открывший список, видит не «сделано», а «делается». Заявка с зелёным прогоном и
25
- неснятым черновиком — сделанная работа, выглядящая незаконченной, и поправить это может только
26
- тот, кто её отдал.
23
+ A draft says one thing: the work cannot be merged. The host locks its merge button, and the
24
+ owner opening the list sees not "done" but "being done". A PR with a green run and a draft not
25
+ lifted is done work that looks unfinished, and only the one who handed it over can fix that.
27
26
 
28
- Отсюда порядок: **черновик снимается тем же ходом, которым прочитан зелёный прогон.** Не
29
- следующим, не после соседней задачи.
27
+ Hence the order: **the draft is lifted in the same turn in which the green run was read.** Not
28
+ the next one, not after a neighbouring task.
30
29
 
31
30
  ```bash
32
31
  gh pr ready <номер>
33
32
  ```
34
33
 
35
- Снятие черновика — последний шаг отдачи работы, а не отдельное дело. Пока он не сделан, работа
36
- не отдана, сколько бы коммитов ни лежало в ветке.
34
+ Lifting the draft is the last step of handing the work over, not a separate matter. Until it is
35
+ done, the work is not handed over, however many commits lie in the branch.
37
36
 
38
- ## Сначала довести отданное, потом брать новое
37
+ ## Finish the handed-over first, then take new work
39
38
 
40
- Открытая заявка — работа в полёте: её прогон стареет, её ветка отстаёт от главной, её тело
41
- описывает дерево на день написания. Всё это чинится дёшево сегодня и дорого через три задачи.
39
+ An open PR is work in flight: its run ages, its branch lags behind main, its body describes the
40
+ tree on the day it was written. All of this is cheap to fix today and expensive three tasks later.
42
41
 
43
- Очередь поэтому такая:
42
+ So the queue is this:
44
43
 
45
- 1. Прогоны открытых заявок прочитаны, черновики с зелёных сняты.
46
- 2. Красные разобраны и починены.
47
- 3. И только потом берётся следующая задача.
44
+ 1. The runs of the open PRs are read, drafts with green ones are lifted.
45
+ 2. The red ones are analysed and fixed.
46
+ 3. Only then is the next task taken.
48
47
 
49
- Взять новую задачу, оставив позади десяток заявок черновиками, — значит отчитаться о работе,
50
- которой у владельца нет: он видит список «делается», а не список «готово».
48
+ Taking a new task while leaving a dozen PRs behind as drafts means reporting work the owner does
49
+ not have: they see a list of "being done", not a list of "done".
51
50
 
52
- ## Состояние читается разом
51
+ ## The state is read at once
53
52
 
54
- Чем оно читается и как разбирается каждое поле — паттерн `git-workflow-freshness`; здесь
55
- только то, что делают с прочитанным. Пустой прогон разбирается наравне с красным: у заявки
56
- череды база не главная ветка, и фильтр по базе такое событие до конвейера не пропускает.
53
+ What it is read with and how each field is read — pattern `git-workflow-freshness`; here only
54
+ what is done with what was read. An empty run is handled on a par with a red one: a chain PR's
55
+ base is not the main branch, and the base filter does not let such an event through to the
56
+ pipeline.
57
57
 
58
- ## Красный прогон разбирается по шагу, а не по заявке
58
+ ## A red run is analysed by step, not by PR
59
59
 
60
60
  ```bash
61
61
  gh pr checks <номер>
62
62
  ```
63
63
 
64
- Ответ называет упавший прогон и ссылку на него. Дальше у хостинга спрашивается имя упавшего
65
- шага — `gh api` по этому прогону, отбором `select(.conclusion=="failure")` по его шагам.
64
+ The answer names the failed run and a link to it. Then the host is asked the name of the failed
65
+ step — `gh api` on that run, selecting `select(.conclusion=="failure")` over its steps.
66
66
 
67
- Имя шага и есть диагноз. Правка идёт в ту ветку череды, где причина возникла, а не в ту, где
68
- прогон покраснел: у череды красным становится всё, что стоит выше причины.
67
+ The step name is the diagnosis. The fix goes into the chain branch where the cause arose, not
68
+ the one where the run went red: in a chain everything above the cause goes red.
69
69
 
70
- ## Правка причины — в нижнюю ветку, оттуда волной вверх
70
+ ## The cause is fixed in the lowest branch, then a wave upward
71
71
 
72
- Причина, общая для всей череды, чинится один раз в самой нижней ветке. Наверх она едет
73
- вливанием, а не перебазированием: перебазирование переписывает историю уже отданных веток, и
74
- хостинг закрывает заявки верхних как слитые, хотя в главной их правок нет.
72
+ A cause shared by the whole chain is fixed once, in the lowest branch. It travels up by merging,
73
+ not by rebasing: a rebase rewrites the history of branches already handed over, and the host
74
+ closes the upper PRs as merged, though main has none of their edits.
75
75
 
76
- Волна идёт снизу вверх, по одной ветке, и каждый шаг — три отдельных вызова: переключение на
77
- следующую ветку череды, вливание предыдущей в неё, отправка. Одной строкой их не пишут: гард
78
- поставки такую команду отбивает, и правильно — набор проверок гоняется по тому дереву, какое
79
- лежит на момент разбора команды, то есть по прежней ветке.
76
+ The wave goes bottom-up, one branch at a time, and each step is three separate calls: switching
77
+ to the next chain branch, merging the previous one into it, pushing. They are not written as one
78
+ line: the delivery guard refuses such a command, and rightly — the check set runs on the tree
79
+ that lies there when the command is reviewed, that is, on the previous branch.
80
80
 
81
- Пропущенная посередине ветка оставляет свою заявку красной и ломает порядок вливания, поэтому
82
- волна проходит череду целиком.
81
+ A branch skipped in the middle leaves its PR red and breaks the merge order, so the wave passes
82
+ the whole chain.
83
83
 
84
- ## Частые промахи
84
+ ## Common misses
85
85
 
86
- - Черновик не снят, потому что «ещё гоняется прогон». Прогон кончился час назад; читается его
87
- состояние, а не память о том, что он шёл.
88
- - Взята следующая задача, а десяток заявок остался черновиками. Для владельца сделанного нет.
89
- - Красное чинится в той ветке, где покраснело. У череды это верхняя, а причина — в нижней, и
90
- починка сверху оставляет красным всё под собой.
91
- - Причина разослана по веткам перебазированием. Отданные ветки переписаны, заявки закрыты как
92
- слитые, правок в главной нет.
93
- - Пустой прогон принят за зелёный. Событие до конвейера не дошло, и заявка не проверена вовсе.
86
+ - The draft is not lifted because "the run is still going". The run ended an hour ago; its state
87
+ is read, not the memory of it going.
88
+ - The next task is taken, and a dozen PRs stayed drafts. For the owner nothing is done.
89
+ - The red is fixed in the branch where it went red. In a chain that is the upper one, and the
90
+ cause is in the lower; a fix from above leaves everything under it red.
91
+ - The cause is sent across branches by rebasing. The handed-over branches are rewritten, the PRs
92
+ closed as merged, main has no edits.
93
+ - An empty run taken for a green one. The event never reached the pipeline, and the PR is not
94
+ checked at all.