@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,106 +2,113 @@
2
2
  name: git-workflow-secrets
3
3
  kind: pattern
4
4
  rule: deploy-flow
5
- description: Паттерн правила deploy-flow. Брать при работе с ключами внешних служб: где они лежат, чем ключ владельца отличается от ключа окружения, что означает каждое состояние строки интеграции и почему зелёная проба не обещает работающей возможности.
5
+ description: Pattern of rule deploy-flow. Load when working with keys of external services — where they live, how the owner's key differs from the environment key, what each state of an integration row means and why a green probe does not promise a working feature.
6
6
  ---
7
7
 
8
- # Ключи внешних служб
8
+ # Keys of external services
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
- - Возможность, которая ходит наружу, молчит: не уходят письма, не обновляются переводы.
16
- - Заводится или меняется ключ внешней службы.
17
- - Разбирается, что именно выкачено и чего приложению не хватает для работы, — включая ключ,
18
- который живёт в окружении и экрана не имеет.
15
+ - A feature that goes outside is silent: mails do not leave, translations do not update.
16
+ - A key of an external service is being created or changed.
17
+ - It is being analysed what exactly is rolled out and what the application lacks to work —
18
+ including a key that lives in the environment and has no screen.
19
19
 
20
- ## Секрет выкатки — не ключ внешней службы
20
+ ## A rollout secret is not a key of an external service
21
21
 
22
- Ключи из этого паттерна живут в хранилище или в составе прода, и читает их приложение. Секреты
23
- выкатки — ключ доступа к узлу, пароль реестра, адрес и токен приёма — приложением не читаются
24
- вовсе: их читает конвейер, лежат они в настройках репозитория, и хранилище о них не знает.
22
+ The keys of this pattern live in the storage or in the production stack, and the application
23
+ reads them. Rollout secrets — the node access key, the registry password, the intake address and
24
+ token — are not read by the application at all: the pipeline reads them, they lie in the
25
+ repository settings, and the storage knows nothing of them.
25
26
 
26
- Отсюда и разный ход при промахе. Ключ службы, которого не хватает, молчит на экране: возможность
27
- не работает, а приложение отвечает. Секрет выкатки, которого не хватает, роняет шаг конвейера, и
28
- до приложения дело не доходит вовсе — разбирают его в журнале задания, а не в браузере.
27
+ Hence a different course on a miss. A missing service key is silent on the screen: the feature
28
+ does not work, and the application answers. A missing rollout secret brings down a pipeline step,
29
+ and the application is never reached at all — it is analysed in the step's log, not in the
30
+ browser.
29
31
 
30
- Про то, как секрет выкатки заводится и чем проверяется его право, говорит паттерн работы с
31
- образами — `git-workflow-docker`, если дерево его разложило. Здесь остаётся граница: пришедший
32
- за секретом выкатки читает дальше не этот текст.
32
+ How a rollout secret is created and what checks its rights is said by the pattern of working with
33
+ images — `git-workflow-docker`, if the tree has laid it out. Here the border remains: whoever came
34
+ for a rollout secret reads on not in this text.
33
35
 
34
- ## Ключ, заводимый владельцем, живёт в хранилище, а не в окружении
36
+ ## A key created by the owner lives in the storage, not in the environment
35
37
 
36
- Такой ключ лежит строкой в хранилище, зашифрованной ключом шифрования секретов; рядом открытая
37
- подсказка из последних знаков и исход последней пробы. Читает его одна служба и отдаёт тем, кто
38
- ходит наружу.
38
+ Such a key lies as a row in the storage, encrypted with the secrets encryption key; next to it an
39
+ open hint of the last characters and the outcome of the last probe. One service reads it and
40
+ gives it to those who go outside.
39
41
 
40
- **Запасного пути на окружение нет.** Одноимённая переменная в составе прода ничего не значит:
41
- приложение её не читает. Из окружения берётся один ключ — тот, которым шифруются все
42
- остальные. Его потеря делает записанные ключи нечитаемыми, и заводить их заново бесполезно,
43
- пока он не вернётся.
42
+ **There is no fallback path to the environment.** A variable of the same name in the production
43
+ stack means nothing: the application does not read it. One key is taken from the environment —
44
+ the one that encrypts all the others. Losing it makes the recorded keys unreadable, and creating
45
+ them anew is useless until it is back.
44
46
 
45
- Заводит такие ключи владелец сам, экраном интеграций. **Агент ключи не вводит:** ввод ключа
46
- доступа в поле ему запрещён независимо от того, кто просит.
47
+ Such keys the owner creates themselves, on the integrations screen. **The agent does not enter
48
+ keys:** entering an access key into a field is forbidden to it whoever asks.
47
49
 
48
- ## Не всякий ключ внешней службы заводится владельцем
50
+ ## Not every key of an external service is created by the owner
49
51
 
50
- В хранилище живут ключи, которые владелец заводит сам и по-разному у каждого владения. Ключ,
51
- одинаковый для всего приложения, остаётся в окружении, и экрана интеграций у него нет.
52
+ The storage holds keys the owner creates themselves and differently for each property. A key that
53
+ is the same for the whole application stays in the environment, and it has no integrations
54
+ screen.
52
55
 
53
- Половины такой пары — ключ бэкенда и ключ, вшитый в сборку, — лежат по разные стороны
54
- поставки, и заполнить можно ровно одну. Тогда возможность не выключена и не включена: виджет
55
- не рисуется, сервер ждёт токен. Приложение называет такое состояние сломанным и говорит о нём
56
- строкой лога и сводкой старта — что в ней стоит, описывает правило `observability`.
56
+ The halves of such a pair — the backend key and the key baked into the build — lie on different
57
+ sides of delivery, and exactly one can be filled. Then the feature is neither off nor on: the
58
+ widget is not drawn, the server waits for a token. The application calls such a state broken and
59
+ says so by a log line and the startup digest — what stands in it is described by the rule
60
+ `observability`.
57
61
 
58
- Отсюда порядок разбора для ключа из окружения: он читается не экраном интеграций, а сводкой
59
- старта в логах контейнера — в каком из её списков стоит имя возможности.
62
+ Hence the order of analysis for a key from the environment: it is read not on the integrations
63
+ screen but in the startup digest in the container logs — in which of its lists the feature name
64
+ stands.
60
65
 
61
- ## Строка интеграции говорит пятью состояниями
66
+ ## An integration row speaks in five states
62
67
 
63
- Порядок разбора важен — состояние хранилища перекрывает всё остальное:
68
+ The order of analysis matters — the storage state overrides everything else:
64
69
 
65
- | Что показано | Что это значит |
66
- | ------------------------------------ | ---------------------------------------------------------------------- |
67
- | состояние неизвестно | ответ ещё не пришёл; утверждать нечего |
68
- | хранилище недоступно | ключа шифрования нет; заводить ключи нельзя, и владелец тут ни при чём |
69
- | не задан | строки секрета нет вовсе — ключ никогда не заводили |
70
- | расшифровать нечем | строка есть, а ключ шифрования сменился; заводить заново бесполезно |
71
- | не проверен · работает · не работает | ключ записан; дальше судит проба |
70
+ | What is shown | What it means |
71
+ | ------------------------------------- | -------------------------------------------------------------------------- |
72
+ | state unknown | the answer has not come yet; nothing to claim |
73
+ | storage unavailable | there is no encryption key; keys cannot be created, and the owner is not at fault |
74
+ | not set | there is no secret row at all — the key was never created |
75
+ | nothing to decrypt with | the row exists, and the encryption key has changed; creating anew is useless |
76
+ | unchecked · working · not working | the key is recorded; from here the probe judges |
72
77
 
73
- Отсюда короткий путь разбора: молчит письмо или перевод — сначала открыть этот экран, а не
74
- логи. «Не задан» отвечает на вопрос целиком, и десять дней молчащей почты выяснились именно
75
- им, а не сервером.
78
+ Hence the short path of analysis: a mail or a translation is silent — first open this screen, not
79
+ the logs. "Not set" answers the question whole, and ten days of silent mail turned out to be
80
+ exactly that, not the server.
76
81
 
77
- ## Зелёная проба обещает меньше, чем кажется
82
+ ## A green probe promises less than it seems
78
83
 
79
- Проба спрашивает у службы то, что та отдаёт по ключу: список доменов, список моделей. Ни
80
- письма, ни запроса за деньги она не делает — но и работоспособности возможности не доказывает:
84
+ The probe asks the service for what it gives out by the key: the list of domains, the list of
85
+ models. It sends no mail and makes no paid request — but it does not prove the feature works
86
+ either:
81
87
 
82
- - список моделей отдаётся и при пустом балансе, а сам запрос отвечает отказом по деньгам.
83
- Строка при этом зелёная;
84
- - проба почты сверяет адрес отправителя со списком подтверждённых — но только если адрес уже
85
- заполнен. При пустом адресе она отвечает «работает», а письма не уйдут.
88
+ - the list of models is given out with an empty balance too, while the request itself is refused
89
+ for lack of funds. The row is green meanwhile;
90
+ - the mail probe checks the sender address against the list of confirmed ones — but only if the
91
+ address is already filled. With an empty address it answers "working", and mails will not leave.
86
92
 
87
- Поэтому после ввода ключа проверяется сама возможность, а не строка: сохранить запись и
88
- убедиться, что предупреждение не пришло; дождаться первого обращения и увидеть письмо.
93
+ So after entering a key the feature itself is checked, not the row: save a record and make sure
94
+ the warning did not come; wait for the first enquiry and see the mail.
89
95
 
90
- ## Переезд ключа из окружения в хранилище не делается миграцией
96
+ ## Moving a key from the environment into the storage is not done by a migration
91
97
 
92
- Секрет шифруется приложением, поэтому запросом к хранилищу его не перенести: миграция заводит
93
- таблицу и не трогает значения. Ключ, переведённый из окружения в настройки, обязан быть
94
- заведён владельцем в тот же день, что выкачена правка, — иначе возможность замолкает молча.
95
- Сверяется тем же экраном интеграций сразу после выкатки.
98
+ The secret is encrypted by the application, so a query to the storage cannot move it: the
99
+ migration creates the table and does not touch values. A key moved from the environment into the
100
+ settings must be created by the owner on the same day the edit is rolled out — otherwise the
101
+ feature goes silent silently. Checked on the same integrations screen right after the rollout.
96
102
 
97
- ## Частые промахи
103
+ ## Common misses
98
104
 
99
- - **Искать ключ поиском по составу прода и делать вывод.** Значение там лежит, приложение его
100
- не читает, а хвост из последних знаков совпадает с записанным в хранилище — совпадение
101
- подсказки и переменной ничего не доказывает, кроме того, что владелец завёл тот же ключ.
102
- - **Идти в логи прежде экрана.** Логи скажут про отказ внешней службы, а экран — «не задан»;
103
- второе точнее и стоит одного нажатия.
104
- - **Считать отсутствие ошибок признаком работы.** Ни почта, ни перевод не роняют запрос:
105
- обращение сохранится, запись сохранится, а наружу ничего не уйдёт.
106
- - **Заводить ключ заново при «расшифровать нечем».** Это не про ключ, а про ключ шифрования;
107
- новый ляжет рядом и тоже не прочитается.
105
+ - **Looking for the key by a search over the production stack and drawing a conclusion.** The
106
+ value lies there, the application does not read it, and the tail of the last characters matches
107
+ the one recorded in the storage — a match of the hint and the variable proves nothing except
108
+ that the owner created the same key.
109
+ - **Going to the logs before the screen.** The logs will tell about the external service's
110
+ refusal, and the screen — "not set"; the second is more precise and costs one click.
111
+ - **Taking the absence of errors as a sign of work.** Neither mail nor translation brings the
112
+ request down: the enquiry is saved, the record is saved, and nothing leaves outside.
113
+ - **Creating the key anew on "nothing to decrypt with".** This is not about the key but about
114
+ the encryption key; a new one will lie next to it and will not be read either.
@@ -2,145 +2,171 @@
2
2
  name: git-workflow-stack
3
3
  kind: pattern
4
4
  rule: git-workflow
5
- description: Паттерн правила git-workflow. Брать, когда работы идут одна за другой либо когда из одного основания уже заведено больше двух веток: ветвление чередой от предыдущей, основание заявки, порядок вливания снизу вверх, перевливание главной по факту конфликта. Один конфликт — паттерн git-workflow-merge.
5
+ description: Pattern of rule git-workflow. Load when pieces of work follow one another or more than two branches already stand on one base — chained branching from the previous one, the PR base, merging bottom-up, re-merging main on an actual conflict. One conflict — pattern git-workflow-merge.
6
6
  ---
7
7
 
8
- # Стопка заявок из одного основания
8
+ # A stack of PRs from one base
9
9
 
10
- Паттерн правила `git-workflow`. Что при этом должно быть верно — закон
11
- `docs/constitution/delivery.md`. Разбор одного конфликта — паттерн `git-workflow-merge`,
12
- открытие одной заявки — `git-workflow-pr`.
10
+ Pattern of the rule `git-workflow`. What must be true — the law
11
+ `docs/constitution/delivery.md`. Resolving one conflict — pattern `git-workflow-merge`,
12
+ opening one PR — `git-workflow-pr`.
13
13
 
14
- **Вызовы здесь даны клиентом GitHub.** Дерево на другом хостинге читает их как форму, а команду
15
- берёт у своего клиента: имена полей и подкоманд у клиентов разные, а спрашиваемое — одно.
16
- Соответствие называет редакция правила поставки, разложенная в этом дереве.
14
+ **The calls here are given with the GitHub client.** A tree on another host reads them as the
15
+ form and takes the command from its own client: field and subcommand names differ between
16
+ clients, and what is asked is one. The match is named by the edition of the delivery rule laid
17
+ out in that tree.
17
18
 
18
- ## Когда брать
19
+ ## When to use
19
20
 
20
- - Из одного основания заведено больше двух веток, и все ждут слияния.
21
- - За заход сделано несколько работ, и они лежат в дереве невыложенными.
22
- - Решается, в каком порядке отдавать накопленное владельцу.
21
+ - More than two branches are created from one base, and all wait for a merge.
22
+ - Several works were done in one session, and they lie in the tree unpublished.
23
+ - It is decided in which order to hand the accumulated over to the owner.
23
24
 
24
- ## Череда: ветвиться от предыдущей, а не от главной
25
+ ## A chain: branch from the previous one, not from main
25
26
 
26
- Стопка из одного основания — то, чего надо избежать. Работы, идущие подряд, ветвятся подряд:
27
+ A stack from one base is what to avoid. Works that go one after another branch one after
28
+ another:
27
29
 
28
30
  ```bash
29
- # первая работа череды — от главной, как обычно
31
+ # the first work of the chain — from main, as usual
30
32
  git checkout -b <КЛЮЧ>-<номер>-<slug> origin/main
31
33
 
32
- # каждая следующая — от предыдущей ветки, а не от origin/main
34
+ # each next one — from the previous branch, not from origin/main
33
35
  git checkout -b <КЛЮЧ>-<следующий>-<slug> <КЛЮЧ>-<номер>-<slug>
34
36
  ```
35
37
 
36
- Правка предыдущей лежит тогда в общем предке, и сводить два разных изменения одного файла не
37
- приходится вовсе. Расхождение всплывает при ветвлении — у того, у кого обе правки свои и под
38
- рукой, — а не при слиянии, у владельца, у которого нет ни одной.
38
+ The previous edit then lies in the common ancestor, and two different changes of one file never
39
+ have to be reconciled at all. The divergence surfaces at branching — at the one who has both
40
+ edits as their own and at hand — not at the merge, at the owner, who has neither.
39
41
 
40
- От главной ветвится первая работа череды и всякая, которая предыдущей не касается: череда — это
41
- про соседние работы, а не про все подряд.
42
+ From main branch the first work of the chain and any work that does not touch the previous one:
43
+ a chain is about neighbouring works, not about all in a row.
42
44
 
43
- ## Заявка череды стоит на предыдущей ветке
45
+ ## A chain PR stands on the previous branch
44
46
 
45
47
  ```bash
46
48
  gh pr create --base <предыдущая ветка> --title '[<КЛЮЧ>-<номер>] <что сделано>' --body-file <файл>
47
49
  ```
48
50
 
49
- Основанием главная не ставится: разбор тогда показывает свою правку вперемешку со всем, что под
50
- ней. Влитую нижнюю хостинг переносит сам — базой её заявки-наследницы становится главная.
51
+ Main is not set as the base: the review then shows the own edit mixed with all under it. The
52
+ host retargets a merged lower one itself — its heir PR's base becomes main.
51
53
 
52
- Порядок вливания стоит в теле каждой заявки строкой «стоит на #<номер>, вливать после него»:
53
- владелец вливает по списку, а родство веток по списку не видно.
54
+ The merge order stands in every PR body as the line "stands on #<number>, merge after it": the
55
+ owner merges by the list, and branch kinship is invisible in the list.
54
56
 
55
- **Конвейер дерева проверяется на то, слушает ли он заявку с таким основанием.** Событие заявки
56
- хостинг шлёт с фильтром по базе, и дерево, оставившее в фильтре одну главную ветку, всей череде
57
- прогонов не даёт вовсе: заявка стоит зелёно-пустой, а вернуть событие нечем — ни новый коммит,
58
- ни перезакрытие заявки базы не меняют. Спрашивается это до того, как череду заводить: у
59
- настройки конвейера, а не у страницы заявки, где отсутствие прогона выглядит так же, как его
60
- ожидание.
57
+ **The tree's pipeline is checked for whether it listens to a PR with such a base.** The host
58
+ sends the PR event with a base filter, and a tree that left only the main branch in the filter
59
+ gives the whole chain no runs at all: the PR stands green-and-empty, and there is nothing to
60
+ bring the event back — neither a new commit nor reclosing the PR changes the base. This is asked
61
+ before the chain is created: from the pipeline settings, not from the PR page, where a missing
62
+ run looks the same as waiting for one.
61
63
 
62
64
  ```bash
63
- # порядок череды целиком — снизу вверх
65
+ # the whole chain order — bottom-up
64
66
  gh pr list --state open --json number,headRefName,baseRefName \
65
67
  --jq '.[] | "\(.number)\t\(.headRefName)\tна \(.baseRefName)"'
66
68
  ```
67
69
 
68
- ## Чего в череде не делают
70
+ ## What is not done in a chain
69
71
 
70
- - **Историю нижней ветки не переписывают.** Ни `rebase`, ни силовая отправка: вершина верхней
71
- становится достижимой из её основания, и хостинг закрывает заявку верхней как слитую — при том
72
- что в главной её правок нет. Отставшая нижняя чинится вливанием главной в неё и дальше вверх.
73
- - **Череду не вливают из середины.** Влитая не по порядку тащит за собой всё, что под ней, — и
74
- разбор той работы уже не состоится.
75
- - **Готовые ветки не копят.** Череда не отменяет того, что единица работы — влитая заявка: она
76
- лишь делает безопасной ту длину, которая всё же накопилась.
72
+ - **The lower branch's history is not rewritten.** Neither `rebase` nor a force push: the upper
73
+ one's tip becomes reachable from its base, and the host closes the upper PR as merged — though
74
+ main has none of its edits. A lagging lower one is fixed by merging main into it and onward
75
+ upward.
76
+ - **A chain is not merged from the middle.** One merged out of order drags along everything
77
+ under it — and the review of that work never happens.
78
+ - **Ready branches are not hoarded.** A chain does not cancel that the unit of work is a merged
79
+ PR: it only makes safe the length that has piled up anyway.
77
80
 
78
- ## Единица работы — влитая заявка, а не открытая
81
+ ## The unit of work is a merged PR, not an open one
79
82
 
80
- Открытый черновик работой не является: кнопка слияния у него заблокирована, в главной ветке его
81
- правок нет, и очередь работ им не сокращается. Восемнадцать открытых черновиков и ни одного
82
- влитого — это ноль сделанного, сколько бы времени на них ни ушло.
83
+ An open draft is not work: its merge button is locked, main has none of its edits, and the work
84
+ queue is not shortened by it. Eighteen open drafts and not one merged is zero done, however much
85
+ time went into them.
83
86
 
84
- Отсюда порядок: одна работа доводится до слияния, потом берётся следующая. Не наоборот.
87
+ Hence the order: one work is brought to the merge, then the next is taken. Not the other way
88
+ round.
85
89
 
86
- ## Цена стопки растёт квадратично
90
+ ## The price of a stack grows quadratically
87
91
 
88
- Ветки одного основания, дописывающие в одни и те же тексты, роняют друг друга при каждом
89
- слиянии: влитая первая устаревает остальные, влитая вторая — все, кроме двух, и так до конца.
90
- Открыв все разом, исполнитель назначает себе порядка половины квадрата их числа вливаний
91
- главной — и делает их он, а слияния нажимает человек в своём темпе.
92
+ Branches of one base that append to the same texts bring each other down at every merge: the
93
+ first merged makes the rest stale, the second merged — all but two, and so to the end. Opening
94
+ all at once, the executor assigns themselves about half the square of their number in merges of
95
+ main — and they do them, while a person presses the merges at their own pace.
92
96
 
93
- Считается это до открытия, а не после: закрыть лишние заявки дешевле, чем вести их, но время на
94
- их тела к тому часу уже потрачено.
97
+ This is counted before opening, not after: closing surplus PRs is cheaper than keeping them, but
98
+ the time spent on their bodies is gone by then.
95
99
 
96
- ## Главная вливается по факту конфликта, а не по расписанию
100
+ ## Main is merged in on an actual conflict, not on a schedule
97
101
 
98
- Отставшая ветка и конфликтующая — разное. Отставшую хостинг вливает сам: правки разных мест
99
- одного файла сводятся без человека. Конфликтует только та, где обе стороны тронули одни строки.
102
+ A lagging branch and a conflicting one are different things. A lagging one the host merges
103
+ itself: edits of different places in one file are reconciled without a person. Only the one
104
+ where both sides touched the same lines conflicts.
100
105
 
101
- Поэтому после чужого слияния главная вливается не во все открытые ветки, а в те, о которых
102
- хостинг сказал, что они конфликтуют. Спрашивается это одним вызовом на всю стопку:
106
+ So after someone else's merge, main is merged not into all open branches but into those the host
107
+ said conflict. This is asked with one call for the whole stack:
103
108
 
104
109
  ```bash
105
110
  gh pr list --state open --json number,headRefName,mergeable \
106
111
  --jq '.[] | select(.mergeable == "CONFLICTING") | "\(.number)\t\(.headRefName)"'
107
112
  ```
108
113
 
109
- Ответ `UNKNOWN` означает, что хостинг ещё считает, а не что конфликта нет: вызов повторяется
110
- через несколько секунд. Вливание «на всякий случай» — это и есть та квадратичная цена, и
111
- платится она за состояние, которого чаще всего нет.
114
+ The answer `UNKNOWN` means the host is still counting, not that there is no conflict: the call
115
+ is repeated after a few seconds. Merging "just in case" is that very quadratic price, and it is
116
+ paid for a state that most often is not there.
112
117
 
113
- ## Указателю, куда дописывают все, объявляется сложение
118
+ ## A stack without PRs lags silently
114
119
 
115
- Список закрытых работ, оглавление спеков, перечень задач — файлы, куда каждая ветка добавляет
116
- строку в конец. Они конфликтуют на пустом месте у каждой ветки стопки, и разрешение у них одно:
117
- нужны обе стороны целиком. Объявляется это один раз, в `.gitattributes`:
120
+ The call above knows only open PRs. A stack of local branches has no PRs at all: there is
121
+ nothing to ask about it, and it lags whole — many branches, one tip, and that is the one usually
122
+ looked at.
123
+
124
+ The price grows with time. While there are no PRs, main's tip is merged into the lowest branch,
125
+ and then each next one absorbs the previous by one merge. After opening, the same edit costs as
126
+ many updated PRs as there are branches in the stack — and until then the delivery guard will not
127
+ let a single one open: it demands main's tip as an ancestor of the branch.
128
+
129
+ The sign is read offline, one command per branch:
130
+
131
+ ```bash
132
+ for br in $(git branch --format='%(refname:short)' --list '<КЛЮЧ>-*'); do
133
+ git merge-base --is-ancestor origin/<главная> "$br" || echo "$br отстала"
134
+ done
135
+ ```
136
+
137
+ A stack of forty-one branches lagged eighteen commits at once that way, and not one PR from it
138
+ would have opened.
139
+
140
+ ## An index everyone appends to is declared a union
141
+
142
+ The list of closed works, the spec table of contents, the task list — files where every branch
143
+ adds a line at the end. They conflict out of nothing on every branch of the stack, and their
144
+ resolution is one: both sides are needed whole. This is declared once, in `.gitattributes`:
118
145
 
119
146
  ```
120
147
  docs/archive/README.md merge=union
121
148
  ```
122
149
 
123
- Сложение ставится только на указатели, где правка всегда добавляющая. На текст, который
124
- переписывают, оно оставит в файле обе редакции.
150
+ The union is set only on indexes where an edit is always an addition. On text that gets
151
+ rewritten it leaves both versions in the file.
125
152
 
126
- **Сложение сторон метку сливаемости не снимает, и вливать главную по ней нельзя.** Хостинг
127
- считает сливаемость своим приёмом и настроек слияния не читает: ветка, тронувшая сложенный
128
- указатель, помечается конфликтующей всё равно. Спрошенная у него стопка отвечает «конфликтует»
129
- целиком, и вливание по этому ответу — то же вливание во все ветки, что и без сложения: раздел
130
- ниже велит вливать главную по факту конфликта, а факт этот хостинг называет про каждую ветку
131
- стопки. Пятнадцать заявок разом простояли так за один заход. Проверяется одной командой: то же
132
- слияние без драйвера даёт конфликтный маркер, с драйвером идёт чисто — значит метку держит
133
- указатель, а не правка.
153
+ **The union of sides does not clear the mergeability mark, and main must not be merged in by
154
+ it.** The host counts mergeability by its own technique and does not read merge settings: a
155
+ branch that touched a unioned index is marked conflicting all the same. A stack asked from it
156
+ answers "conflicting" whole, and merging by that answer is the same merging into all branches
157
+ as without the union: the section on an actual conflict tells to merge main in on the fact, and
158
+ the host names that fact for every branch of the stack. Fifteen PRs stood like that at once in
159
+ one session. Checked with one command: the same merge without the driver gives a conflict
160
+ marker, with the driver it goes clean — so the mark is held by the index, not by the edit.
134
161
 
135
- **Указатель, куда дописывает каждая ветка стопки, из стопки убирается, а не складывается.**
136
- Сложение — починка проявления: конфликта нет, метка есть, вливать по-прежнему приходится.
137
- Спрашивается это до заведения веток: отвечает ли указатель на вопрос, которого не закрывает
138
- обход каталога. Не отвечает — он снимается, и площадь пересечения стопки падает до настоящих
139
- общих файлов.
162
+ **An index every branch of the stack appends to is removed from the stack, not unioned.** The
163
+ union fixes the symptom: there is no conflict, there is a mark, merging is still needed. This is
164
+ asked before the branches are created: does the index answer a question that a directory walk
165
+ does not close. If not — it is removed, and the stack's overlap drops to the real shared files.
140
166
 
141
- ## Порядок вливания задаётся заранее и называется владельцу
167
+ ## The merge order is set in advance and named to the owner
142
168
 
143
- Порядок считается до открытия заявок — по тому, кто какие файлы правит:
169
+ The order is counted before the PRs open — by who edits which files:
144
170
 
145
171
  ```bash
146
172
  for b in $(git branch --list '<префикс>-*' --format='%(refname:short)'); do
@@ -148,17 +174,16 @@ for b in $(git branch --list '<префикс>-*' --format='%(refname:short)');
148
174
  done | sort | uniq -c | sort -rn | head
149
175
  ```
150
176
 
151
- Ветки, правящие один и тот же файл, идут подряд: разведённые чужими слияниями, они соберут
152
- конфликт там, где подряд его бы не было. Порядок называется владельцу в теле заявки — кнопки
153
- нажимает он, а о родстве веток не знает.
177
+ Branches editing the same file go one after another: parted by someone else's merges, they will
178
+ gather a conflict where in a row there would be none. The order is named to the owner in the PR
179
+ body — they press the buttons, and they do not know the branch kinship.
154
180
 
155
- ## Волна веток проверяется пробным слиянием
181
+ ## A wave of branches is checked by a trial merge
156
182
 
157
- Ветка, лежащая невлитой рядом с соседками, зелена сама по себе: линт, тесты, сборки и сверки
158
- она проходит одна. Сталкивается она с ними тем, чего на отдельной ветке не видит ни одна
159
- проверка — тот же следующий свободный номер сценария, тот же заведённый новым файл, та же
160
- правленная строка отметки. После слияния первые два чинятся уже в главной и стоят отдельной
161
- работы.
183
+ A branch lying unmerged next to its neighbours is green on its own: lint, tests, builds and
184
+ audits it passes alone. It collides with them on what no check sees on a single branch — the
185
+ same next free scenario number, the same newly created file, the same edited mark line. After
186
+ the merge the first two are fixed already in main and cost a separate work.
162
187
 
163
188
  ```bash
164
189
  git fetch origin
@@ -168,18 +193,18 @@ npm run check:all
168
193
  git checkout - && git branch -D probe-merge
169
194
  ```
170
195
 
171
- Ветка пробы удаляется, а находки и порядок слияния записываются туда, где живёт замысел линии
172
- работ: пробное слияние отвечает на «что столкнётся», а не заменяет собой отдачу.
173
-
174
- ## Частые промахи
175
-
176
- - Открыты все заявки разом, потому что ветки были готовы. Готовность ветки признаком того, что
177
- её пора отдавать, не является: отдаётся столько, сколько владелец успевает влить.
178
- - Главная влита во все открытые ветки после каждого чужого слияния. Половина этих вливаний не
179
- меняла ничего: ветки не конфликтовали, а сливаемость у них не спрашивали.
180
- - Состояние стопки выведено из своего дерева, а не спрошено у хостинга. Локально влитая главная
181
- о сливаемости не говорит: между вливанием и взглядом владельца главная уходит вперёд.
182
- - Стопка отдана без порядка. Владелец вливает в порядке списка, то есть в порядке номеров, — и
183
- две ветки одного файла попадают друг на друга ровно тогда, когда между ними встала третья.
184
- - Время потрачено на тела заявок, а не на доведение первой до слияния. Тело нужно тому, кто
185
- заявку читает; у заявки, до которой очередь дойдёт через сутки, читателя сегодня нет.
196
+ The trial branch is deleted, and the findings and the merge order are written where the epic
197
+ plan lives: a trial merge answers "what will collide", it does not replace the handover.
198
+
199
+ ## Common misses
200
+
201
+ - All PRs opened at once because the branches were ready. A branch's readiness does not say it
202
+ is time to hand it over: as much is handed over as the owner has time to merge.
203
+ - Main merged into all open branches after every foreign merge. Half of these merges changed
204
+ nothing: the branches did not conflict, and their mergeability was not asked.
205
+ - The state of the stack derived from one's own tree, not asked from the host. Locally merged
206
+ main says nothing about mergeability: between the merge and the owner's look main moves ahead.
207
+ - The stack handed over without an order. The owner merges in list order, that is, by number —
208
+ and two branches of one file land on each other exactly when a third stood between them.
209
+ - Time spent on PR bodies instead of bringing the first to the merge. The body is needed by
210
+ whoever reads the PR; a PR whose turn comes in a day has no reader today.