@rt-tools/agent-kit 0.24.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/assets/agents/business-analyst.md +51 -50
  2. package/assets/agents/conscience.md +37 -35
  3. package/assets/agents/project-manager.md +49 -48
  4. package/assets/agents/prose-editor.md +31 -29
  5. package/assets/agents/qa-engineer.md +50 -48
  6. package/assets/agents/rules-reviewer.md +63 -58
  7. package/assets/agents/skill-curator.md +83 -78
  8. package/assets/agents/spec-critic.md +34 -29
  9. package/assets/agents/spec-writer.md +35 -32
  10. package/assets/agents/strict-teacher.md +39 -37
  11. package/assets/checks/archive-age.mjs +48 -28
  12. package/assets/checks/archive-prune.mjs +16 -14
  13. package/assets/checks/board-epics.github.mjs +75 -41
  14. package/assets/checks/board-folders.mjs +61 -0
  15. package/assets/checks/board-gh.github.mjs +35 -26
  16. package/assets/checks/board-long-work.github.mjs +24 -24
  17. package/assets/checks/board-paths.github.mjs +21 -16
  18. package/assets/checks/board-runs.github.mjs +45 -43
  19. package/assets/checks/board-titles.github.mjs +19 -17
  20. package/assets/checks/board.github.mjs +149 -127
  21. package/assets/checks/check-archive-age.mjs +23 -19
  22. package/assets/checks/check-board.github.mjs +172 -164
  23. package/assets/checks/check-descriptions.mjs +30 -29
  24. package/assets/checks/check-doc-paths.mjs +91 -88
  25. package/assets/checks/check-dupes.mjs +84 -80
  26. package/assets/checks/check-file-size.mjs +74 -71
  27. package/assets/checks/check-glossary.mjs +47 -37
  28. package/assets/checks/check-hook-scope.mjs +30 -27
  29. package/assets/checks/check-lib-layers.mjs +22 -21
  30. package/assets/checks/check-profile-drift.mjs +48 -43
  31. package/assets/checks/check-prose-style.mjs +120 -37
  32. package/assets/checks/check-push-gate.mjs +53 -50
  33. package/assets/checks/check-reuse.mjs +50 -40
  34. package/assets/checks/check-schema-drift.mjs +87 -83
  35. package/assets/checks/check-specs.mjs +155 -134
  36. package/assets/checks/check-state-next.mjs +66 -52
  37. package/assets/checks/check-states.mjs +32 -30
  38. package/assets/checks/check-styles.mjs +52 -51
  39. package/assets/checks/check-turn-map.mjs +54 -46
  40. package/assets/checks/lib-boundaries.mjs +32 -30
  41. package/assets/checks/lib-common.mjs +30 -29
  42. package/assets/checks/lib-domains.mjs +34 -34
  43. package/assets/checks/lib-manifests.mjs +17 -15
  44. package/assets/checks/lib-reexports.mjs +18 -18
  45. package/assets/checks/rt-kit-checks.config.mjs +174 -142
  46. package/assets/checks/signals.mjs +43 -39
  47. package/assets/checks/spec-anchors.mjs +114 -87
  48. package/assets/checks/spec-common.mjs +128 -84
  49. package/assets/checks/spec-contract.mjs +30 -30
  50. package/assets/checks/spec-proposed.mjs +27 -24
  51. package/assets/checks/spec-scenarios.mjs +51 -28
  52. package/assets/checks/task-new.github.mjs +85 -56
  53. package/assets/commands/feedback.md +65 -59
  54. package/assets/commands/next-session.md +64 -57
  55. package/assets/commands/skill-curator.md +83 -79
  56. package/assets/defaults/gate-map.sh +108 -97
  57. package/assets/defaults/project.sh +225 -185
  58. package/assets/defaults/shell.sh +73 -68
  59. package/assets/defaults/turn-map.md +45 -44
  60. package/assets/docs/GLOSSARY.md +142 -65
  61. package/assets/hooks/browser-device-id.sh +12 -12
  62. package/assets/hooks/browser-guard-device-id.sh +30 -28
  63. package/assets/hooks/browser-guard-no-asking.sh +5 -4
  64. package/assets/hooks/browser-guard-no-listing.sh +12 -11
  65. package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
  66. package/assets/hooks/browser-guard-require-select.sh +34 -23
  67. package/assets/hooks/claim-guard.sh +62 -56
  68. package/assets/hooks/commit-msg.sh +11 -10
  69. package/assets/hooks/conscience-guard.sh +91 -45
  70. package/assets/hooks/constitution-index.sh +16 -16
  71. package/assets/hooks/deny-tail.sh +28 -26
  72. package/assets/hooks/dev-server-guard.sh +46 -43
  73. package/assets/hooks/dispatch.sh +60 -46
  74. package/assets/hooks/docs-guard.sh +100 -91
  75. package/assets/hooks/exam-guard.sh +105 -93
  76. package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
  77. package/assets/hooks/git-guard-delivery-draft.sh +45 -38
  78. package/assets/hooks/git-guard-delivery-folder.sh +50 -43
  79. package/assets/hooks/git-guard-delivery-signature.sh +88 -52
  80. package/assets/hooks/git-guard-delivery.sh +196 -180
  81. package/assets/hooks/git-guard-main.sh +38 -34
  82. package/assets/hooks/git-guard-push-tests.sh +99 -87
  83. package/assets/hooks/glossary-load.sh +23 -22
  84. package/assets/hooks/grill-gate-ask.sh +12 -11
  85. package/assets/hooks/grill-gate.sh +94 -87
  86. package/assets/hooks/guard-note.sh +20 -19
  87. package/assets/hooks/handoff-entry-guard.sh +26 -24
  88. package/assets/hooks/handoff-write.sh +74 -67
  89. package/assets/hooks/hook-input.sh +67 -58
  90. package/assets/hooks/lint-after-edit.sh +95 -61
  91. package/assets/hooks/observe.sh +28 -26
  92. package/assets/hooks/override-write-guard.sh +23 -21
  93. package/assets/hooks/postmortem-guard.sh +42 -39
  94. package/assets/hooks/profile-check.sh +22 -20
  95. package/assets/hooks/proposal-guard.sh +57 -49
  96. package/assets/hooks/prose-style-guard.sh +19 -17
  97. package/assets/hooks/qa-dataid-guard.sh +52 -49
  98. package/assets/hooks/rerun-guard.sh +31 -30
  99. package/assets/hooks/reuse-first-guard.sh +108 -87
  100. package/assets/hooks/roles.sh +14 -14
  101. package/assets/hooks/rule-article.sh +36 -34
  102. package/assets/hooks/rule-source-guard.sh +47 -42
  103. package/assets/hooks/skill-gate-layers.sh +59 -57
  104. package/assets/hooks/skill-gate-rearm.sh +15 -8
  105. package/assets/hooks/skill-gate.sh +89 -81
  106. package/assets/hooks/skill-loaded.sh +6 -6
  107. package/assets/hooks/sql-guard-parse.sh +68 -66
  108. package/assets/hooks/sql-guard-request.sh +48 -46
  109. package/assets/hooks/sql-guard-target.sh +57 -51
  110. package/assets/hooks/sql-guard-write.sh +84 -79
  111. package/assets/hooks/sql-guard.sh +52 -47
  112. package/assets/hooks/stand-login-guard.sh +40 -37
  113. package/assets/hooks/task-context-load.sh +60 -55
  114. package/assets/hooks/task-flow-context.sh +87 -69
  115. package/assets/hooks/task-flow-draft-guard.sh +55 -48
  116. package/assets/hooks/task-flow-guard.sh +67 -64
  117. package/assets/hooks/turn-entry-load.sh +39 -32
  118. package/assets/hooks/turn-exit-guard.sh +256 -204
  119. package/assets/hooks/turn-exit-patterns.sh +53 -0
  120. package/assets/hooks/utf8.sh +11 -11
  121. package/assets/hooks/waiting-turn-guard.sh +94 -94
  122. package/assets/hooks/window-fill-guard.sh +70 -62
  123. package/assets/hooks/work-start-guard.sh +52 -49
  124. package/assets/hooks/write-targets.sh +96 -44
  125. package/assets/laws/autonomous-work.md +29 -27
  126. package/assets/laws/code-structure.md +31 -30
  127. package/assets/laws/delivery.md +148 -137
  128. package/assets/laws/entity-editing.md +52 -50
  129. package/assets/laws/entity-models.md +14 -13
  130. package/assets/laws/frontend-application.md +39 -38
  131. package/assets/laws/lib-imports.md +27 -27
  132. package/assets/laws/lists.md +31 -29
  133. package/assets/laws/navigation.md +37 -37
  134. package/assets/laws/observability.md +41 -40
  135. package/assets/laws/project-documentation.md +106 -99
  136. package/assets/laws/reuse-first.md +31 -29
  137. package/assets/laws/shared-code.md +27 -27
  138. package/assets/laws/verifiability.md +131 -124
  139. package/assets/laws/work-conduct.md +250 -244
  140. package/assets/patterns/admin-lists-screen.md +72 -69
  141. package/assets/patterns/admin-nav-item.md +51 -46
  142. package/assets/patterns/angular-patterns-state.md +32 -31
  143. package/assets/patterns/api-layer-pair.md +33 -31
  144. package/assets/patterns/autonomous-work-run.md +50 -49
  145. package/assets/patterns/browser-verification-measure.md +124 -88
  146. package/assets/patterns/browser-verification-stand.md +169 -157
  147. package/assets/patterns/component-structure-new.md +51 -42
  148. package/assets/patterns/dependencies-upgrade.md +55 -39
  149. package/assets/patterns/doc-style-human.md +55 -37
  150. package/assets/patterns/doc-style-sweep.md +82 -79
  151. package/assets/patterns/doc-style-trace.md +87 -81
  152. package/assets/patterns/doc-style-write.md +130 -122
  153. package/assets/patterns/entity-aside.md +77 -63
  154. package/assets/patterns/entity-models-new.md +37 -37
  155. package/assets/patterns/entity-store.md +33 -33
  156. package/assets/patterns/git-workflow-commit.azure.md +93 -86
  157. package/assets/patterns/git-workflow-commit.github.md +152 -141
  158. package/assets/patterns/git-workflow-commit.gitlab.md +95 -89
  159. package/assets/patterns/git-workflow-docker.md +165 -147
  160. package/assets/patterns/git-workflow-freshness.md +45 -45
  161. package/assets/patterns/git-workflow-merge.md +98 -93
  162. package/assets/patterns/git-workflow-migration.md +54 -52
  163. package/assets/patterns/git-workflow-pr-ready.md +57 -56
  164. package/assets/patterns/git-workflow-pr.azure.md +126 -121
  165. package/assets/patterns/git-workflow-pr.github.md +179 -175
  166. package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
  167. package/assets/patterns/git-workflow-restart.md +35 -31
  168. package/assets/patterns/git-workflow-secrets.md +80 -73
  169. package/assets/patterns/git-workflow-stack.md +131 -106
  170. package/assets/patterns/lib-layers-move.md +62 -53
  171. package/assets/patterns/lib-layers-new.md +59 -45
  172. package/assets/patterns/observability-record.md +72 -67
  173. package/assets/patterns/platform-access-di.md +31 -29
  174. package/assets/patterns/reuse-first-extend.md +66 -61
  175. package/assets/patterns/shared-code-new.md +39 -38
  176. package/assets/patterns/spec-driven-domain.md +161 -151
  177. package/assets/patterns/spec-driven-rule.md +179 -168
  178. package/assets/patterns/spec-driven-sweep.md +41 -39
  179. package/assets/patterns/status-report-table.github.md +37 -36
  180. package/assets/patterns/styling-bem-component.md +42 -42
  181. package/assets/patterns/styling-bem-layout.md +39 -34
  182. package/assets/patterns/styling-bem-sheet.md +59 -58
  183. package/assets/patterns/task-flow-archive.md +222 -215
  184. package/assets/patterns/task-flow-close.md +215 -203
  185. package/assets/patterns/task-flow-handoff.md +154 -145
  186. package/assets/patterns/task-flow-resume.md +138 -133
  187. package/assets/patterns/task-flow-start.md +204 -192
  188. package/assets/patterns/testing-e2e.md +102 -101
  189. package/assets/patterns/testing-unit.md +77 -70
  190. package/assets/patterns/ts-procedure.md +32 -29
  191. package/assets/patterns/turn-entry-map.md +50 -48
  192. package/assets/pitfalls/agent-kit.md +152 -141
  193. package/assets/pitfalls/doc-style.md +96 -91
  194. package/assets/pitfalls/git-workflow.azure.md +49 -46
  195. package/assets/pitfalls/git-workflow.github.md +264 -234
  196. package/assets/pitfalls/git-workflow.gitlab.md +49 -45
  197. package/assets/pitfalls/spec-driven.md +73 -71
  198. package/assets/pitfalls/styling-bem.md +46 -40
  199. package/assets/pitfalls/task-flow.md +262 -246
  200. package/assets/pitfalls/testing.md +99 -92
  201. package/assets/pitfalls/turn-conduct.md +96 -81
  202. package/assets/rules/angular-patterns.md +81 -80
  203. package/assets/rules/api-layer.md +77 -74
  204. package/assets/rules/autonomous-work.md +75 -74
  205. package/assets/rules/browser-verification.md +223 -214
  206. package/assets/rules/component-structure.md +72 -69
  207. package/assets/rules/dependencies.md +74 -67
  208. package/assets/rules/deploy-flow.azure.md +118 -108
  209. package/assets/rules/deploy-flow.github.md +145 -135
  210. package/assets/rules/deploy-flow.gitlab.md +120 -110
  211. package/assets/rules/doc-style.md +198 -173
  212. package/assets/rules/entity-conventions.needs-admin.md +81 -79
  213. package/assets/rules/entity-models.md +73 -70
  214. package/assets/rules/git-workflow.azure.md +224 -228
  215. package/assets/rules/git-workflow.github.md +250 -239
  216. package/assets/rules/git-workflow.gitlab.md +218 -217
  217. package/assets/rules/lib-layers.md +85 -86
  218. package/assets/rules/lists.md +101 -97
  219. package/assets/rules/navigation.md +78 -78
  220. package/assets/rules/observability.needs-app.md +165 -153
  221. package/assets/rules/platform-access.md +76 -75
  222. package/assets/rules/reuse-first.md +153 -143
  223. package/assets/rules/shared-code.md +82 -79
  224. package/assets/rules/spec-driven.md +272 -260
  225. package/assets/rules/status-report.md +55 -58
  226. package/assets/rules/styling-bem.md +81 -77
  227. package/assets/rules/task-flow.md +282 -270
  228. package/assets/rules/testing.md +224 -209
  229. package/assets/rules/turn-conduct.md +255 -258
  230. package/assets/rules/turn-entry.md +92 -87
  231. package/assets/rules/typescript-conventions.md +94 -88
  232. package/assets/samples/specs/_template/spec.md +47 -47
  233. package/assets/samples/tasks/_template/grill.md +20 -20
  234. package/assets/samples/tasks/_template/plan.md +32 -30
  235. package/assets/samples/tasks/_template/progress.md +16 -16
  236. package/assets/skills/agent-kit-extend.md +129 -113
  237. package/assets/skills/agent-kit.md +235 -211
  238. package/assets/skills/write-a-skill.md +76 -71
  239. package/assets/templates/findings.md +19 -19
  240. package/assets/templates/gate-map.sh +16 -14
  241. package/assets/templates/implementation.md +28 -27
  242. package/assets/templates/pattern.md +17 -17
  243. package/assets/templates/pitfalls.md +6 -6
  244. package/assets/templates/postmortem.md +24 -23
  245. package/assets/templates/project.sh +24 -24
  246. package/assets/templates/proposal.md +62 -60
  247. package/assets/templates/rule.md +38 -38
  248. package/assets/workflows/feature.js +46 -46
  249. package/assets/workflows/plan.js +54 -54
  250. package/lib/catalog.d.ts +2 -0
  251. package/lib/catalog.d.ts.map +1 -1
  252. package/lib/catalog.js +4 -3
  253. package/lib/catalog.js.map +1 -1
  254. package/lib/commands.d.ts.map +1 -1
  255. package/lib/commands.js +5 -2
  256. package/lib/commands.js.map +1 -1
  257. package/lib/companion.js +3 -2
  258. package/lib/companion.js.map +1 -1
  259. package/lib/enroll.d.ts +7 -1
  260. package/lib/enroll.d.ts.map +1 -1
  261. package/lib/enroll.js +12 -3
  262. package/lib/enroll.js.map +1 -1
  263. package/lib/plan.d.ts +11 -0
  264. package/lib/plan.d.ts.map +1 -1
  265. package/lib/plan.js +10 -1
  266. package/lib/plan.js.map +1 -1
  267. package/lib/ship.d.ts +0 -7
  268. package/lib/ship.d.ts.map +1 -1
  269. package/lib/ship.js +10 -2
  270. package/lib/ship.js.map +1 -1
  271. package/lib/shipment.d.ts.map +1 -1
  272. package/lib/shipment.js +6 -2
  273. package/lib/shipment.js.map +1 -1
  274. package/lib/sync.d.ts.map +1 -1
  275. package/lib/sync.js +45 -11
  276. package/lib/sync.js.map +1 -1
  277. package/package.json +1 -1
  278. package/rt-tools-agent-kit-0.26.0.tgz +0 -0
  279. package/rt-tools-agent-kit-0.24.0.tgz +0 -0
@@ -1,126 +1,133 @@
1
- # Закон о проверяемости
1
+ # Law on verifiability
2
2
 
3
- Что считается подтверждением того, что работа сделана. Закон нужен потому, что пересказ
4
- выглядит так же уверенно, как проверенное утверждение, и отличить их потом нечем: код,
5
- который «должен работать», и код, который проверили, в истории выглядят одинаково.
3
+ What counts as confirmation that work is done. The law is needed because a retelling looks as
4
+ confident as a verified statement, and afterwards there is nothing to tell them apart with: code
5
+ that "should work" and code that was checked look the same in the history.
6
6
 
7
- ## Статьи
8
- - **Тест пишется до кода и до правки падает.** Написанный после, он проверяет не обещание, а то,
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
- в PR идёт то, что прочитали, а не то, что заказывали.
54
- - **Служба считается поднятой, когда она выполнила задание, а не когда сообщила о готовности.**
55
- Сообщение о готовности говорит лишь, что служба себя объявила: та, которой не досталось ни
56
- одного задания, выглядит в нём точно так же, как работающая. Проверяются обе стороны связи — что
57
- заказчик выбирает именно её и что задание через неё прошло.
58
- - **У обмена спрашивают обе стороны, и сторона, которой нет, называется прямо.** Односторонний
59
- обмен выглядит рабочим с обеих сторон: отправляющая получает успех на каждый вызов, а того, что
60
- прочитать результат нечем, не видно ниоткуда — молчание об отсутствующей стороне неотличимо от
61
- работающего обмена. Поэтому у обмена спрашивают не «прошёл ли вызов», а «читает ли кто-нибудь
62
- вторую сторону», и ответ «нечем» записывается словом, а не остаётся пробелом.
63
- - **Значение, объявленное одной стороной обмена, второй не пересчитывается, а берётся у первой.**
64
- Две копии одного счёта расходятся молча, и обе стороны при этом отвечают успехом: одна шлёт под
65
- одним значением, другая ищет под другим, и не находит ничего ни разу. Что именно объявлено —
66
- признак, форма записи, способ счёта ключа — берётся у объявившей стороны целиком, а не
67
- повторяется по её описанию.
68
- - **Причина отказа, на которой строится решение, подтверждается измерением, а не правдоподобием.**
69
- Объяснение, пришедшее первым, объясняет наблюдаемое не хуже верного: свойство среды и
70
- собственный промах выглядят в отказе одинаково, и разводит их только замер, поставленный так,
71
- чтобы одно из двух не прошло. Решение, выведенное из неподтверждённой причины, лечит не то — и
72
- стоит отката всей работы, а не одной правки.
73
- - **Если инструмент проверки запрещает приём, которым здесь пользуются постоянно, его правило
74
- выключают в настройке инструмента, а не обходят в каждом месте.** Обход приходится повторять
75
- столько раз, сколько таких мест, и ни в одном из них не написано, зачем он: со стороны это
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
- что-то приедет. Спрашивают при этом «показывается ли», и разницы между двумя ответами не видно
103
- ни в одном выводе: оба выглядят как «проверено». Признак поэтому называется вместе с вопросом,
104
- и первым проверяется, что он на этот вопрос отвечает.
105
- - **Чужой отказ называет своё состояние, а не причину на своей стороне.** Ответ внешней службы
106
- говорит, чем кончился запрос у неё; что лежит в настройке, которую она читала, он не говорит
107
- никогда — и достроенное из него утверждение выглядит выводом из наблюдения, которого не было.
108
- Значение, о котором идёт речь, читается там, где оно лежит, а решение, выведенное из
109
- непроверенной причины, наружу не выносится вовсе: оно просит чинить не то.
110
- - **Про прошлое поведение отвечает код той версии, о которой спрашивают.** Тело правки говорит,
111
- что она сменила, и молчит о том, что было верно до неё: условие, в которое дописано ещё одно
112
- обязательное значение, гасит показанное раньше — и видно это только сравнением с версией до
113
- правки, а не чтением самой правки. Слово того, кто видел прежнее поведение своими глазами, —
114
- показание: расхождение между ним и текстом в истории разбирается чтением кода на его стороне
115
- расхождения.
116
- - **Проверка, снятая с набора ради того, чтобы прогон прошёл, работу не подтверждает.** Набор
117
- собирается умолчанием и надстройкой дерева, и выкушенная надстройкой проверка ничем не отличима
118
- от той, которой в дереве нет вовсе: прогон зелен потому, что её никто не звал. Соседняя статья
119
- судит место, выведенное из-под проверки, — здесь выведено не место, а вся она, и следа в коде
120
- не остаётся никакого. Расхождение закрывается тем, на что проверка указала, а несогласие с ней
121
- самой — вопрос к владельцу.
122
- - **Правка вида проверяется на каждом пороге раскладки, а не на одной ширине.** Пороги — это
123
- места, где раскладка меняется, и промах живёт ровно там: по обе стороны от порога она
124
- собирается по-разному, а посередине выглядит верной. Проверенная на двух крайних ширинах
125
- правка отвечает только про эти две, и всё, что между ними, не видел никто. Пары вокруг порога
126
- проверяются обе: одна ширина говорит лишь про ту сторону, на которую попала.
7
+ ## Articles
8
+ - **A test is written before the code and fails before the change.** Written afterwards, it checks
9
+ not the promise but what came out: the author reads their own code and fits the expectation to it,
10
+ so such a test is green from the first run and catches nothing. A failure before the change is the
11
+ only proof that the test looks where it should; a test never once shown red does not count as
12
+ coverage.
13
+ - **A change that has nothing to show red says so in words and says what closes it.** It happens:
14
+ styling no test sees, configuration, someone else's service. A step skipped silently looks in the
15
+ history the same as a step passed, and afterwards there is nothing to tell them apart with.
16
+ - **Promised behaviour is named as a scenario, and the scenario is named in the test that checks
17
+ it.** Otherwise the link between the promise and the check holds only on the author's memory.
18
+ - **A scenario without a test is marked as uncovered and is visible in the summary.** A silent skip
19
+ looks the same as a covered scenario, and the debt stops being noticeable.
20
+ - **A test that checks part of what was promised counts as debt, not as coverage.** Otherwise the
21
+ summary shows as done what is done by half.
22
+ - **A promise given to the user is closed by a test that follows the user's path.** The same
23
+ computation, checked past the screen, is correct — and does not close the promise: between a
24
+ correct decision and a person seeing it lies everything the check did not touch.
25
+ - **A test switched off by an environment flag does not count as coverage.** In an ordinary run it
26
+ is never executed, and in the summary it looks the same as an executed one.
27
+ - **A test that removes itself by what it found on the screen does not count as coverage.** A set
28
+ that runs in one session carries state from test to test. A check that begins with "what I need is
29
+ not on the screen — skipping" removes itself because of someone else's change, not because of its
30
+ own environment. In the summary this is one line about a skip, and a whole feature stands behind
31
+ it.
32
+ - **A test brings the screen into the state it needs by itself, and returns the shared state as it
33
+ found it.** Otherwise a test that removed itself holds exactly until the neighbour's next change,
34
+ and the run reports zero failures on the day the check was not executed even once.
35
+ - **A spoken list of checks is not a check.** It names the intent, not what went into the command,
36
+ and both texts are written in one turn without being compared to each other: a list named item by
37
+ item differs from a short "I checked" only in length. A check is reading what came back: the
38
+ output of the command, the text that was returned, the state after the call.
39
+ - **A mention in a test of a scenario that does not exist is a failure.** This is how a renamed or
40
+ discarded scenario is caught: without it, it disappears silently.
41
+ - **A running application is checked where the user sees it.** The debug mode behaves differently
42
+ from the production one, and a check in it confirms not what the user will get.
43
+ - **Before the push, the change is checked with the same set as the pipeline, and with the same
44
+ commands.** A set assembled from the changed files skips what the change reached through
45
+ dependencies: the check is green and the pipeline is red. What to check is computed by the tool
46
+ from the same base, not by the author's memory.
47
+ - **A check of an environment flag applies only to the launch path on which it was made.** The paths
48
+ by which the same application is brought up set the flags differently, and what is confirmed on
49
+ one of them is wrong on the rest — while it looks checked as a whole.
50
+ - **Layout is checked by measurement, not by eye.** By eye, padding cannot be told from margin, nor
51
+ alignment from coincidence, and the discrepancy is found only after the rollout.
52
+ - **A successful reply from a command means it ran, not that the needed state has arrived.** Some
53
+ requests are carried out by half, and the reply says nothing about the rejected part: by the
54
+ return code such a call cannot be told from a completed one. So the result is read by a separate
55
+ request, and what goes into the PR is what was read, not what was ordered.
56
+ - **A service counts as up when it has completed a piece of work, not when it reported readiness.** A
57
+ readiness message says only that the service announced itself: one that got no work at all looks
58
+ in it exactly like a working one. Both sides of the link are checked — that the client picks this
59
+ very service and that a piece of work went through it.
60
+ - **Both sides of an exchange are asked, and a side that does not exist is named plainly.** A
61
+ one-sided exchange looks working from both sides: the sending side gets success on every call, and
62
+ that there is nothing to read the result with is visible from nowhere. Silence about the missing
63
+ side is indistinguishable from a working exchange. So the exchange is asked not "did the call go
64
+ through" but "does anyone read the second side", and the answer "nothing does" is written in
65
+ words, not left as a blank.
66
+ - **A value declared by one side of an exchange is not recomputed by the other but taken from the
67
+ first.** Two copies of one computation drift apart silently, and both sides reply with success
68
+ meanwhile: one sends under one value, the other looks under another and never finds anything.
69
+ Whatever is declared — a flag, a record format, a way of computing a key — is taken from the
70
+ declaring side whole, not repeated from its description.
71
+ - **The cause of a failure on which a decision is built is confirmed by measurement, not by
72
+ plausibility.** The explanation that came first explains the observed no worse than the correct
73
+ one. A property of the environment and one's own slip look the same in a failure, and only a
74
+ measurement set up so that one of the two cannot pass tells them apart. A decision derived from an
75
+ unconfirmed cause treats the wrong thing — and costs a rollback of the whole work, not of one
76
+ change.
77
+ - **If a checking tool forbids a technique used here all the time, its rule is switched off in the
78
+ tool's settings, not bypassed in every place.** The bypass has to be repeated as many times as
79
+ there are such places, and none of them says why: from outside it looks like the author's mistake,
80
+ not a decision.
81
+ - **A red check means wrong code, not a wrong check.** A place taken out from under the check so
82
+ that it goes quiet fixes the reading, not what the check pointed at: the code stays the same, and
83
+ nobody has a signal about it any more. The known list is accumulated by the day the check is
84
+ created and only shrinks; disagreement with the check itself is a question to the owner, not a
85
+ line in the list.
86
+ - **The usefulness of a rule is confirmed by observing how it is used, not by an opinion about it.**
87
+ A rule that was never opened and a rule half the work rests on look the same in the text — and
88
+ what gets edited first is usually what was remembered, not what gets in the way. Observation is
89
+ kept where the work goes on, and outlives a single session: a record that dies with the session
90
+ answers only the question "what happened a minute ago".
91
+ - **Observation of the work takes nothing outside except what is common to all.** The name of a
92
+ rule, the kind of an event and the version are the same everywhere the rules layer stands. A path,
93
+ a domain and the name of a tree belong to one tree and mean nothing elsewhere except a leak. This
94
+ is held by a check on the exporting side, not by the memory of the one who writes.
95
+ - **A check that broke itself does not stop the work.** A tool failure does not count as a found
96
+ violation, and work stopped by it stands until the tool is fixed. There is one way out, and it is
97
+ named in the failure itself. The executor goes through the failures one by one, shows the owner
98
+ the analysis — how many lines, of what kind, how their falsity is proven — and fixes the check
99
+ itself. The known list is not used for this: it holds what was accepted, not the results of a
100
+ broken check.
101
+ - **A decision that depends on the current moment gets the moment from outside.** Otherwise it can
102
+ be checked only by turning the clock, and a turned clock acts on everything that happens to be
103
+ nearby: the check starts depending on what has no relation to it.
104
+ - **The sign for a check is chosen by the question being answered, not by what the change touched.**
105
+ A sign taken from the subject of the change answers about that subject. The change assembled an
106
+ address — and the presence of the address in the returned page confirms that the application
107
+ assembled it, not that anything will arrive by it. The question asked meanwhile is "is it shown",
108
+ and the difference between the two answers is visible in no output: both look like "checked". So
109
+ the sign is named together with the question, and the first thing checked is that it answers that
110
+ question.
111
+ - **Someone else's failure names its own state, not a cause on our side.** The reply of an external
112
+ service says how the request ended there; what lies in the setting it read, it never says. A
113
+ statement built up from it looks like a conclusion from an observation that did not happen. The
114
+ value in question is read where it lies, and a decision derived from an unchecked cause is not
115
+ taken outside at all: it asks to fix the wrong thing.
116
+ - **Past behaviour is answered by the code of the version being asked about.** The body of a change
117
+ says what it changed, and is silent about what was true before it. A condition with one more
118
+ mandatory value added to it hides what was shown before — and this is visible only by comparing
119
+ with the version before the change, not by reading the change itself. The word of someone who saw
120
+ the previous behaviour with their own eyes is testimony: a discrepancy between it and the text in
121
+ the history is analysed by reading the code on their side of the discrepancy.
122
+ - **A check removed from the set so that the run passes does not confirm the work.** The set is
123
+ assembled from the default and the tree's override, and a check bitten out by the override is
124
+ indistinguishable from one the tree never had at all: the run is green because nobody called it.
125
+ The neighbouring article judges a place taken out from under the check — here it is not a place
126
+ that is taken out but the whole check, and no trace remains in the code. The discrepancy is closed
127
+ by what the check pointed at, and disagreement with the check itself is a question to the owner.
128
+ - **A change to the look is checked at every layout threshold, not at one width.** Thresholds are
129
+ the places where the layout changes, and a slip lives exactly there: on either side of the
130
+ threshold the layout is assembled differently, and in the middle it looks correct. A change
131
+ checked at the two extreme widths answers only about those two, and nobody has seen everything in
132
+ between. Both of the pair around a threshold are checked: one width speaks only for the side it
133
+ landed on.