@rt-tools/agent-kit 0.26.0 → 0.28.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 (148) hide show
  1. package/assets/agents/cargo-writer.md +54 -0
  2. package/assets/checks/board-epic-link.github.mjs +29 -0
  3. package/assets/checks/board-epic-plan.github.mjs +86 -0
  4. package/assets/checks/board-epics.github.mjs +217 -69
  5. package/assets/checks/board-long-work.github.mjs +5 -1
  6. package/assets/checks/board-pull-state.github.mjs +163 -0
  7. package/assets/checks/board-task-dirs.github.mjs +98 -0
  8. package/assets/checks/board.github.mjs +8 -91
  9. package/assets/checks/check-board.github.mjs +25 -165
  10. package/assets/checks/check-glossary.mjs +10 -2
  11. package/assets/checks/check-lib-layers.mjs +24 -1
  12. package/assets/checks/check-prose-style.mjs +19 -3
  13. package/assets/checks/check-reuse.mjs +26 -2
  14. package/assets/checks/check-schema-drift.mjs +19 -3
  15. package/assets/checks/check-specs.mjs +8 -1
  16. package/assets/checks/epic-table.github.mjs +268 -0
  17. package/assets/checks/lib-boundaries.mjs +2 -2
  18. package/assets/checks/lib-common.mjs +46 -0
  19. package/assets/checks/lib-manifests.mjs +18 -13
  20. package/assets/checks/rt-kit-checks.config.mjs +19 -0
  21. package/assets/checks/signals.mjs +39 -5
  22. package/assets/checks/spec-anchors.mjs +48 -4
  23. package/assets/checks/spec-common.mjs +40 -6
  24. package/assets/checks/spec-contract.mjs +33 -7
  25. package/assets/checks/spec-scenarios.mjs +24 -1
  26. package/assets/checks/specs-for.mjs +214 -0
  27. package/assets/checks/task-new.github.mjs +237 -6
  28. package/assets/commands/night.md +115 -0
  29. package/assets/defaults/gate-map.sh +20 -5
  30. package/assets/defaults/project.sh +13 -0
  31. package/assets/defaults/turn-map.md +3 -1
  32. package/assets/docs/GLOSSARY.md +22 -22
  33. package/assets/hooks/browser-device-id.sh +4 -0
  34. package/assets/hooks/browser-guard-device-id.sh +4 -0
  35. package/assets/hooks/commit-msg.sh +3 -0
  36. package/assets/hooks/dev-server-guard.sh +64 -31
  37. package/assets/hooks/epic-over.sh +49 -0
  38. package/assets/hooks/epic-stop-guard.sh +108 -0
  39. package/assets/hooks/exam-guard.sh +10 -10
  40. package/assets/hooks/git-guard-delivery-conflict.sh +56 -1
  41. package/assets/hooks/git-guard-delivery-draft.sh +10 -6
  42. package/assets/hooks/git-guard-delivery-epic.sh +167 -0
  43. package/assets/hooks/git-guard-delivery-signature.sh +32 -2
  44. package/assets/hooks/git-guard-delivery-tree.sh +50 -0
  45. package/assets/hooks/git-guard-delivery.sh +71 -27
  46. package/assets/hooks/git-guard-discard.sh +144 -0
  47. package/assets/hooks/git-guard-push-tests.sh +36 -16
  48. package/assets/hooks/handoff-entry-guard.sh +20 -2
  49. package/assets/hooks/prose-style-guard.sh +31 -8
  50. package/assets/hooks/qa-dataid-guard.sh +33 -11
  51. package/assets/hooks/reuse-first-guard.sh +29 -4
  52. package/assets/hooks/rule-article.sh +3 -0
  53. package/assets/hooks/rule-source-guard.sh +17 -2
  54. package/assets/hooks/skill-gate-layers.sh +4 -0
  55. package/assets/hooks/skill-gate.sh +7 -0
  56. package/assets/hooks/skill-loaded.sh +4 -0
  57. package/assets/hooks/sql-guard-parse.sh +3 -0
  58. package/assets/hooks/sql-guard-request.sh +3 -0
  59. package/assets/hooks/sql-guard-target.sh +3 -0
  60. package/assets/hooks/sql-guard-write.sh +21 -2
  61. package/assets/hooks/stand-login-guard.sh +3 -0
  62. package/assets/hooks/turn-exit-guard.sh +55 -67
  63. package/assets/hooks/turn-exit-patterns.sh +28 -1
  64. package/assets/hooks/turn-exit-verdict.sh +84 -0
  65. package/assets/hooks/utf8.sh +3 -0
  66. package/assets/hooks/waiting-turn-guard.sh +11 -1
  67. package/assets/hooks/write-targets.sh +3 -0
  68. package/assets/laws/delivery.md +37 -7
  69. package/assets/laws/verifiability.md +22 -4
  70. package/assets/patterns/git-workflow-commit.azure.md +1 -1
  71. package/assets/patterns/git-workflow-commit.github.md +9 -2
  72. package/assets/patterns/git-workflow-commit.gitlab.md +1 -1
  73. package/assets/patterns/git-workflow-merge.md +8 -5
  74. package/assets/patterns/git-workflow-pr.azure.md +1 -1
  75. package/assets/patterns/git-workflow-pr.github.md +44 -18
  76. package/assets/patterns/git-workflow-pr.gitlab.md +1 -1
  77. package/assets/patterns/git-workflow-stack.md +32 -9
  78. package/assets/patterns/status-report-table.github.md +11 -0
  79. package/assets/patterns/task-flow-close.md +96 -90
  80. package/assets/patterns/task-flow-start.md +40 -26
  81. package/assets/patterns/ts-procedure.md +6 -0
  82. package/assets/pitfalls/agent-kit.md +19 -0
  83. package/assets/pitfalls/git-workflow.github.md +44 -0
  84. package/assets/pitfalls/task-flow.md +25 -23
  85. package/assets/rules/autonomous-work.md +15 -3
  86. package/assets/rules/browser-verification.md +8 -0
  87. package/assets/rules/deploy-flow.github.md +6 -0
  88. package/assets/rules/doc-style.md +13 -4
  89. package/assets/rules/git-workflow.azure.md +10 -0
  90. package/assets/rules/git-workflow.github.md +144 -126
  91. package/assets/rules/git-workflow.gitlab.md +10 -0
  92. package/assets/rules/lib-layers.md +11 -0
  93. package/assets/rules/spec-driven.md +17 -1
  94. package/assets/rules/status-report.md +7 -0
  95. package/assets/rules/task-flow.md +78 -54
  96. package/assets/rules/testing.md +7 -0
  97. package/assets/rules/turn-conduct.md +30 -3
  98. package/assets/samples/tasks/_template/plan.md +4 -1
  99. package/assets/skills/agent-kit.md +40 -25
  100. package/bin/agent-kit.d.ts.map +1 -1
  101. package/bin/agent-kit.js +9 -2
  102. package/bin/agent-kit.js.map +1 -1
  103. package/lib/cargo-prose.d.ts +41 -0
  104. package/lib/cargo-prose.d.ts.map +1 -0
  105. package/lib/cargo-prose.js +88 -0
  106. package/lib/cargo-prose.js.map +1 -0
  107. package/lib/cargo.d.ts +12 -1
  108. package/lib/cargo.d.ts.map +1 -1
  109. package/lib/cargo.js +8 -2
  110. package/lib/cargo.js.map +1 -1
  111. package/lib/commands.d.ts +1 -1
  112. package/lib/commands.d.ts.map +1 -1
  113. package/lib/commands.js +59 -2
  114. package/lib/commands.js.map +1 -1
  115. package/lib/fate.d.ts +29 -0
  116. package/lib/fate.d.ts.map +1 -0
  117. package/lib/fate.js +147 -0
  118. package/lib/fate.js.map +1 -0
  119. package/lib/hooks-map.d.ts +5 -0
  120. package/lib/hooks-map.d.ts.map +1 -1
  121. package/lib/hooks-map.js +9 -3
  122. package/lib/hooks-map.js.map +1 -1
  123. package/lib/override-marks.d.ts +7 -0
  124. package/lib/override-marks.d.ts.map +1 -1
  125. package/lib/override-marks.js +14 -0
  126. package/lib/override-marks.js.map +1 -1
  127. package/lib/plan.d.ts +2 -0
  128. package/lib/plan.d.ts.map +1 -1
  129. package/lib/plan.js +8 -0
  130. package/lib/plan.js.map +1 -1
  131. package/lib/proposals.d.ts +25 -0
  132. package/lib/proposals.d.ts.map +1 -1
  133. package/lib/proposals.js +43 -1
  134. package/lib/proposals.js.map +1 -1
  135. package/lib/ship.d.ts +29 -2
  136. package/lib/ship.d.ts.map +1 -1
  137. package/lib/ship.js +34 -0
  138. package/lib/ship.js.map +1 -1
  139. package/lib/shipment.d.ts.map +1 -1
  140. package/lib/shipment.fixture.d.ts +8 -1
  141. package/lib/shipment.fixture.d.ts.map +1 -1
  142. package/lib/shipment.fixture.js +9 -0
  143. package/lib/shipment.fixture.js.map +1 -1
  144. package/lib/shipment.js +40 -14
  145. package/lib/shipment.js.map +1 -1
  146. package/package.json +1 -1
  147. package/rt-tools-agent-kit-0.28.0.tgz +0 -0
  148. package/rt-tools-agent-kit-0.26.0.tgz +0 -0
@@ -21,7 +21,10 @@ with the rule.
21
21
  | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
22
22
  | main branch | `main` |
23
23
  | task key | the tree's word for its tasks: `board.taskKey` in `.claude/rt-kit/checks.json`, named in `implementation.md` for the reader |
24
- | separate branch | `<КЛЮЧ>-<номер задачи>-<короткий-slug>`. A name without a number (`feat/…`, `fix/…`) is legitimate locally: no PR opens from it |
24
+ | epic | a repository issue with the epic label, `[<КЛЮЧ>-<номер>] <Возможность>`, and a plan next to it: the order of tasks and how the branches stand |
25
+ | epic branch | `<КЛЮЧ>-<номер эпика>-<короткий-slug>`, taken from `main`. Task branches are taken from it, and their PRs go into it |
26
+ | PR of an epic | PR into `main` from the epic branch; opens after all its tasks are merged and their folders taken apart |
27
+ | separate branch | `<КЛЮЧ>-<номер задачи>-<короткий-slug>`, taken from the epic branch. A name without a number (`feat/…`, `fix/…`) is legitimate locally: no PR opens from it |
25
28
  | task | a repository issue `[<КЛЮЧ>-<номер>] <Что не так>`, assignee the machine account; attached PR: `Closes #<номер>` in its body |
26
29
  | work queue | a GitHub Projects board, not bound to the repository: its `projectsV2` is empty, and a task lands on it only when added |
27
30
  | task state in the work queue | a board column ("Status"): created, in progress, in review; names in `implementation.md`. A closed task leaves by merge, not by column |
@@ -43,44 +46,63 @@ work ends.
43
46
 
44
47
  ```mermaid
45
48
  flowchart TD
46
- A[Work begins] --> B[A command creates the task and it enters the work queue]
47
- B --> C[The branch is named by the task number; the column moves in the same motion]
49
+ A[Work begins] --> Z{The epic of this work is named}
50
+ Z -->|No| Y[The epic is created together with its tasks, and its branch is taken from main]
51
+ Z -->|Yes| B[A command creates the task and it enters the work queue]
52
+ Y --> B
53
+ B --> C[The branch is named by the task number and taken from the epic branch; the column moves in the same motion]
48
54
  C --> D{The edit is ready}
49
55
  D -->|No| C
50
56
  D -->|Yes| E[Main is merged in, the gate set is run whole]
51
57
  E --> F{The branch carries a task number}
52
58
  F -->|No| G[The delivery guard refuses the opening: nothing in the queue stands behind the edit]
53
- F -->|Yes| H[The PR opens; what is not ready to merge goes as a draft]
59
+ F -->|Yes| H[The PR opens: a draft where a run is waited for, ready where the pipeline does not wake]
54
60
  H --> I[The task column moves to review, the executor takes the next task]
55
61
  I --> J{The run and the review are over}
56
62
  J -->|Run red| K[Fixed in the same branch]
57
63
  K --> J
58
- J -->|Green| L[The last commit takes the task folder apart, the draft is lifted]
59
- L --> M[A person presses the merge: the executor asks and names the number]
64
+ J -->|Green| L[The last commit takes the task folder apart, and the draft, if there was one, is lifted]
65
+ L --> M[A person presses the merge into the epic branch: the executor asks and names the number]
66
+ M --> N{Tasks of the epic are left}
67
+ N -->|Yes| B
68
+ N -->|No| O[The PR of the epic into main opens: all the folders are taken apart, and the main branch takes the epic whole]
60
69
  G --> B
61
70
  ```
62
71
 
63
72
  ## How the law applies here
64
73
 
65
- - **A commit into the main branch is refused by the guard.** The guard looks for a commit call
66
- anywhere in the command and reads the current branch at launch: a compound "create a branch and
67
- commit at once" is rejected whole — the branch does not exist yet at review.
68
- - **A branch without a task number opens no PR.** Locally it is legitimate, but an edit from it is a
69
- rollout with nothing behind it in the queue. A task is created, and the work moves to a branch
70
- with its number.
71
- - **The main branch is merged into the task branch before the PR opens.** The guard refuses the
72
- opening until main's tip is an ancestor of the current branch: otherwise the reviewer sees the
73
- edit mixed with someone else's, and everything was checked from a base that is gone.
74
- - **A wave of branches off one main is checked by a trial merge, not one by one:** each is green on
75
- its own, and they collide on what one branch cannot show.
74
+ - **A commit into the main branch is refused by the guard.** It finds a commit call anywhere in the
75
+ command and reads the branch at launch: a compound "branch and commit at once" is rejected whole
76
+ — the branch does not exist yet at review.
77
+ - **A branch without a task number opens no PR.** Locally it is legitimate; an edit from it is a
78
+ rollout with nothing behind it in the queue. The work moves to a branch with a number.
79
+ - **Work begins with the epic, and the branch of a task is taken from the epic branch.** `git
80
+ checkout -b <КЛЮЧ>-<номер задачи>-<slug> <ветка эпика>`; from `main` only the epic branch itself is
81
+ taken — a task branched from `main` carries into it what the epic has not finished.
82
+ - **The PR of a task has the epic branch as its base — `gh pr create --base <ветка эпика>`.** Opened
83
+ into `main`, it leaves the epic branch a copy nobody merges.
84
+ - **The PR of an epic into the main branch opens after all its tasks are merged and their folders
85
+ are taken apart.** The merge button there means the whole epic, and there is nothing to press it
86
+ for while a task of it is still written.
87
+ - **The epic branch carries the plan of the epic and the merges of its tasks, and no edits of its
88
+ own.** An edit made in it goes into `main` unreviewed: nobody opens a PR from that branch to it.
89
+ - **The main branch is merged into the epic branch, and the epic branch into the branches of its
90
+ tasks — while the work runs, not before the hand-over.** Otherwise the reviewer sees the edit mixed
91
+ with someone else's, checked from a base that is gone.
92
+ - **A wave of branches off one epic branch is checked by a trial merge, not one by one:** each is
93
+ green on its own, and they collide on what one branch cannot show.
76
94
  - **The next work's branch is taken from the previous one while the chain is unbroken.** `git
77
- checkout -b <КЛЮЧ>-<номер>-<slug> <предыдущая ветка>` instead of `origin/main`; from main — only
78
- the chain's first work. Otherwise the first merge diverges the rest at once.
95
+ checkout -b <КЛЮЧ>-<номер>-<slug> <предыдущая ветка>`; from the epic branch — only the chain's
96
+ first work. A chain stands inside one epic, where the next task edits what the previous wrote.
79
97
  - **A PR in a chain has the previous branch as its base, not main.** `gh pr create --base
80
98
  <предыдущая ветка>` — otherwise the review shows the edit mixed with all under it. The host
81
- retargets the base of a merged lower one itself.
99
+ retargets a merged lower base only when its branch is deleted, so the base is retargeted by the
100
+ same motion that merges the lower one — the call is in the pattern.
82
101
  - **A chain is merged bottom-up, and the order stands in every PR body.** Branch kinship is
83
- invisible in the list: the line "stands on #<number>" is the only place the owner reads it.
102
+ invisible in the list, and the line "stands on #<number>" is the only place it is read.
103
+ - **`--hard` is not taken to drop a commit — that is `--soft`.** `reset --hard`, `checkout --
104
+ <path>`, `restore <path>` and `clean -f` erase what is not committed. On a dirty tree the guard
105
+ refuses and names the files; the bypass is `# discard: <reason>` in the command.
84
106
  - **The lower branch of a chain does not rewrite history — neither `rebase` nor a force push.** The
85
107
  host closes the upper PR as merged once its diff goes empty. A lagging branch is fixed by merging
86
108
  main in.
@@ -88,182 +110,178 @@ flowchart TD
88
110
  owner resolving the same at merge time owns neither.
89
111
  - **Unmet delivery conditions are named in one refusal.** The guard collects and prints them at
90
112
  once: everything unmet is known on the first call.
91
- - **A condition known at the start of work is asked at the start.** Creating a branch — also with a
92
- flag between the verb and `-b` — refuses a base without main's tip and a foreign email in the
93
- signature: at push time the fix costs more.
113
+ - **A condition known at the start of work is asked at the start.** Creating a branch refuses a base
114
+ without main's tip and a foreign signature email: at push time the fix costs more.
115
+ - **The form of a branch name is judged by the tree the command runs in.** A session works in a
116
+ neighbouring tree by the owner's word, and the task key there is its own; a tree with no profile
117
+ is not judged at all. A refusal on a lawful name has no bypass and stops the work whole.
94
118
  - **The base judged is the one named by the command, not the tip of the working copy.** A branch is
95
- also created straight from `origin/main` — that very command takes the base fresh. A base the tree
96
- knows nothing of is not judged at all.
119
+ also created straight from `origin/main`, and that command takes the base fresh; a base the tree
120
+ knows nothing of is not judged.
97
121
  - **A branch without a task number gets no delivery conditions.** A local trial branch is
98
122
  legitimate, and it will not go to main.
99
123
  - **The task key is set once, and all three name forms derive from it.** The task title is assembled
100
- from it, the branch number is read by it, and so is the PR title by the audit. The tree profile
101
- writes the branch form with the same pair `<КЛЮЧ>-<номер>`.
124
+ from it, and by it the audit reads the branch number and the PR title. The tree profile writes the
125
+ branch form with the same pair `<КЛЮЧ>-<номер>`.
102
126
  - **An unset key refuses work with the queue on the spot.** No default on purpose: a title from an
103
127
  empty value matches nothing, and a real discrepancy drowns among false lines.
104
128
  - **A created task is confirmed by the work queue's answer, not by the creation command's output.**
105
- A printed number means "the call went through": a task can be created and never reach the board.
129
+ A task can be created and never reach the board.
106
130
  - **The visibility of what was created is checked by the side it is meant for.** A PR is read by a
107
- person, a task by the work queue, and both read with a token other than the creating one. Whose
108
- eyes took the answer, its `viewer` field says.
131
+ person, a task by the work queue, and both read with a token other than the creating one.
109
132
  - **A refusal is read before it is bypassed by a second way.** It can be an early sign of a write
110
133
  limit, and a bypass by another call carries the sign away: the discrepancy surfaces at the owner.
111
- A limit is told from exhaustion by the limits answer — there it is zero.
112
134
  - **The branch number and the PR title number are checked on the spot, the task state — by the
113
- board.** The format is read from the command text and works offline; task, column, assignee and
114
- review — only with something to ask with. No network or token — the second tier is skipped
115
- silently.
135
+ board.** The format is read from the command text and works offline; the second tier needs
136
+ something to ask with.
116
137
  - **The task column moves in the same motion as the work.** Branch created — the task is in
117
138
  progress, PR opened — awaiting review; the move command does it, not GraphQL calls from memory.
118
- The move follows the step at once: the queue is read between steps, not after.
119
139
  - **A task left in the first column opens no PR.** By the work queue it reads as not taken, though
120
- the work is done and published. At branch creation the column is not asked — nothing has moved it
121
- yet. The tree names the first column itself; unnamed — not judged.
140
+ the work is done and published. The tree names the first column itself; unnamed — not judged.
122
141
  - **The board holds tasks, not PRs about them.** A PR card has no column and never leaves the queue.
123
142
  The queue audit finds such cards, a line each.
124
143
  - **A lagging column is found by the queue audit, not by eye.** It judges the column by the PR both
125
144
  ways: an open PR with the task not in review, and review with no open PR.
126
- - **A branch with an open PR lags behind main silently.** The guard judges the base once, at
127
- opening, and the run does not see what merged after either. The work queue audit counts the lag.
145
+ - **A branch with an open PR lags behind its base silently.** The guard judges the base once, at
146
+ opening, and the run does not see what merged after. The work queue audit counts the lag.
128
147
  - **The link between a task and an epic is read by the audit both ways.** A one-sided binding looks
129
- as whole as a two-sided one: the reader comes now from the epic plan, now from the card.
148
+ as whole as a two-sided one.
130
149
  - **Tasks fixed by one edit are merged before the merge.** The second is erased with its number, and
131
150
  the missing is added to the first: after the merge the branch went in whole.
132
- - **Work that one session cannot close is marked in two places, and they are audited.** The label on
133
- the board and the sessions line in the epic plan say the same to two readers. Only what
134
- legitimately does not split is marked.
135
- - **The tip of an open PR without a run is seen by the work queue audit.** A page without a run
136
- looks the same as with a green one: no colour in either. The audit asks the tip, counts the fact
137
- of a run, not the colour, and gives a fresh tip time.
138
- - **A PR whose base is not the main branch is checked by the same set as a PR into main.** The
139
- pipeline trigger reads the base, and a PR into a neighbouring branch does not raise it: an empty
140
- checks field reads as waiting in the queue. Asked before the first PR of the stack opens; a PR
141
- without a run on its tip is not merged — pattern `git-workflow-stack`.
151
+ - **Work that one session cannot close is marked in two places, and they are audited.** The board
152
+ label and the sessions line in the epic plan say the same to two readers; only what legitimately
153
+ does not split is marked.
154
+ - **The tip of an open PR without a run is seen by the work queue audit, unless the pipeline does
155
+ not wake for its base.** A page without a run looks the same as with a green one; where no run
156
+ comes at all, its absence tells nothing and the audit is silent about that PR.
157
+ - **What checks a PR whose base is not the main branch is asked before the first PR of an epic
158
+ opens.** The trigger either wakes for it as for one into main, or does not, and then the push
159
+ gate is the only check behind the work — pattern `git-workflow-stack`.
142
160
  - **A run pushed out of the pipeline queue gets a separate audit line.** It looks failed though it
143
- never checked the branch; the step count tells them apart — it has zero.
161
+ never checked the branch, and the step count tells them apart.
144
162
  - **A draft with a green run on its tip is an audit discrepancy.** A green page permits nothing: the
145
- host locks the button. Within a turn the guard closes this, between turns — the audit.
163
+ host locks the button.
146
164
  - **One's own drafts are judged all at once, not only the checked-out branch's.** Two signs — a
147
- green run on the tip and a task folder taken apart in the branch; a folder still there means
148
- ongoing work.
165
+ green run on the tip and a folder taken apart; a folder still there means ongoing work.
149
166
  - **Opening a PR is refused while the branch carries its task folder.** Opening is the last point
150
167
  where the executor still sees the refusal.
151
168
  - **One's own open PRs are reread in three places: before a push, on taking a task and after every
152
- known merge.** A PR goes stale with no action by its author: a neighbouring work merged — the rest
153
- lagged that second. Technique — `git-workflow-freshness`.
169
+ known merge.** A PR goes stale with no action by its author: a neighbouring work merged, and the
170
+ rest lagged that second. Technique — `git-workflow-freshness`.
154
171
  - **One's own conflicting PR is fixed by the turn's first action, and no new work is taken before
155
- that.** While the handed-over conflicts, a person cannot merge it. Work here means creating a task
156
- or a branch, moving the column to in progress and opening a PR; what fixes the conflict goes as
157
- before.
172
+ that.** Work here means creating a task or a branch, moving the column and opening a PR.
173
+ - **A conflicting PR of a neighbouring session is not one's own.** One's own branch is the one this
174
+ working copy led — the machine account is shared and tells nothing apart. A neighbour's PR is
175
+ named to the owner, and work is taken as usual.
158
176
  - **A conflicting open PR is a work queue audit discrepancy.** The conflict arrives with someone
159
- else's merge and is invisible in the list: the host shows the mark only inside the PR.
177
+ else's merge, and the host shows the mark only inside the PR.
160
178
  - **A document goes in the same commit as the edit.** The bypass is the line `Docs-skip: <reason>`
161
179
  in the commit body; an empty reason is not accepted.
162
180
  - **The commit subject is checked against the format on the spot.** A subject parsed by type and
163
181
  scope is read as a list, free text — only whole.
164
182
  - **Before a push all linters are run, not one.** The code linter usually does not read style files
165
183
  at all; without a second run nothing checks the styling rules.
166
- - **The build is in the set on a par with lint and unit tests.** The linter does not read types, and
167
- unit tests read only what a test imports: a type error in uncovered code lives until the image
168
- build — that is, the merge.
169
- - **On a machine with several runners, any path from the home directory is shared.** A neighbouring
170
- run rewrites a ready-made step's default to its own version. Install directory, container name and
171
- builder name are per project and fixed; a temporary directory will not do — the package store
172
- lives there.
173
- - **The push gate set is never narrower than the pipeline set.** A pipeline step with neither a line
174
- in the set nor a declared exclusion with a reason refuses the push instead of printing next to it:
175
- a warning reads as permission.
176
- - **The gate set calls the package default instead of listing it line by line.** Rewritten as lines,
177
- it leaves tomorrow's hole: a check the package adds never reaches the tree. Sifting out of the
178
- default is legitimate, by name and with a reason.
184
+ - **The build is in the set on a par with lint and unit tests.** The linter does not read types,
185
+ and a type error in uncovered code lives until the merge.
186
+ - **On a machine with several runners, any path from the home directory is shared.** Install
187
+ directory, container name and builder name are per project.
188
+ - **The push gate set is never narrower than the pipeline set.** A pipeline step with neither a
189
+ line in the set nor a declared exclusion refuses the push: a warning reads as permission.
190
+ - **The gate set calls the package default instead of listing it line by line.** Rewritten as
191
+ lines, it leaves tomorrow's hole: a check the package adds never reaches the tree. Sifting out is
192
+ legitimate, by name and with a reason.
179
193
  - **The final set before a push is read from the state review, not assembled in the head.** The "set
180
- before push" section prints it whole and names next to it what the default printed and the set did
181
- not take.
194
+ before push" section prints it whole, naming what the default gave and the set did not take.
182
195
  - **An exclusion reason naming a task is judged on whether that task is alive.** A dead number
183
- silently makes the exclusion perpetual. Asked by the same tier as the task state at the guard.
184
- - **The layout audit stands in the push gate set on a par with lint and the build.** An edit past
185
- the source piles up silently, and the audit is not in the pipeline.
186
- - **After merging main in, the check set is revised by what the branch now carries.** Checking by
196
+ silently makes the exclusion perpetual.
197
+ - **The layout audit stands in the push gate set on a par with lint and the build.** An edit past the
198
+ source piles up silently, and the audit is not in the pipeline.
199
+ - **After merging the base in, the check set is revised by what the branch now carries.** Checking by
187
200
  what the author edited means checking half: the branch answers whole.
188
201
  - **The main branch is taken by the remote ref — in words and in actions.** The local one is
189
- yesterday's snapshot and silent about it. From `origin/main` go the comparison, a new branch's
190
- base and the count of the merged: by the local one a merged branch counts as unmerged, and cleanup
191
- ends with a list of unmerged that does not exist.
202
+ yesterday's snapshot and silent about it: by it a merged branch counts as unmerged.
192
203
  - **A code edit is handed to a person by an open PR, not by a pushed branch.** A branch reaches no
193
- inbox and has no discussion: before the PR opens there is no edit for a person. It opens in the
194
- turn in which the executor says the work is handed over.
204
+ inbox and has no discussion, and the PR opens in the turn the executor says the work is handed
205
+ over.
195
206
  - **What is not ready to merge opens as a draft — `gh pr create --draft`.** The host locks a draft's
196
- merge button, so "put up for viewing" and "may be merged" stop looking alike. Everything waiting
197
- for a run, a rework or an answer goes as a draft.
207
+ merge button: everything waiting for a run, a rework or an answer goes as a draft.
208
+ - **A PR the pipeline does not wake for opens ready, without `--draft`.** Which bases it wakes for
209
+ is read from the pipeline file: where no run comes, a draft waits for nothing and costs a locked
210
+ button and a second turn. The reviewer is set in the same turn.
198
211
  - **The PR body is written in the turn the PR opens, and next to the sample.** A blank from the day
199
- before diverged from it by two sections and the link line: nobody reads a ready-looking text
200
- twice, and the guards judge the title, the branch number and the task folder.
212
+ before diverges from it, and nobody reads a ready-looking text twice.
201
213
  - **The draft is lifted by a separate call — `gh pr ready <номер>`.** With it the executor answers
202
214
  for readiness: checks passed, no rework left, the work matches the task. Lifting the draft and
203
- asking to merge are one turn, not two days.
215
+ asking to merge are one turn, and a PR opened ready needs no such call.
204
216
  - **The draft is not lifted from a branch that does not merge.** A green run says "not broken",
205
217
  mergeability says "the button can be pressed", and the owner needs the second. Asked from the
206
218
  host's `mergeable` field; a local merge does not derive it.
207
- - **An index that branches only append lines to is declared a union of both sides.** A conflict
208
- there is no dispute: both additions are needed whole. The declaration does **not** clear the
209
- mergeability mark — it clears when the branch has absorbed main and that reached the host.
219
+ - **An index that branches only append lines to is declared a union of both sides.** A conflict there
220
+ is no dispute: both additions are needed whole. The declaration does **not** clear the mergeability
221
+ mark — it clears when the branch has absorbed main and that reached the host.
210
222
  - **An edit brought to a commit is brought to the host in the same turn.** The owner sees the old
211
- state and reads it as "nothing done", while the done lies where nobody sees it. What stays in the
212
- tree is named with a reason — in the owner's words, not a list of leftovers.
223
+ state and reads it as "nothing done". What stays in the tree is named with a reason — in the
224
+ owner's words, not a list of leftovers.
225
+ - **The working tree is emptied before the PR opens, not after.** `git status --porcelain` is asked
226
+ in the same turn as the opening: what is uncommitted goes to the host by a commit before it, or
227
+ is named. A push after the opening moves the tip past the green run the body names, and for that
228
+ stretch the PR invites merging a tip nothing has checked.
229
+ - **A push into a branch that has an open PR is followed by rereading its body.** The statement
230
+ about a green run names the tip by its sha, and moving the tip makes it false in silence: no check
231
+ reads a PR body.
213
232
  - **The draft is not lifted while the PR has no review.** The guard reads the requested reviewer and
214
233
  the review left: a lifted draft reads as "may be merged", and there is nobody to merge. A call
215
- without a number is judged too — the client then takes the PR of the current branch.
234
+ without a number is judged too — the client takes the PR of the current branch.
216
235
  - **The PR merge is pressed by a person, not by the work's executor.** Button and merge call are
217
- equal: one ban covers both. The executor merges their own PR only when a person said so directly
218
- and about this PR; said about one, it does not carry to the next, and silence is never permission.
236
+ equal: one ban covers both. The executor merges their own PR only when a person said so about this
237
+ PR; said about one, it does not carry to the next, and silence is never permission.
219
238
  - **The identity of the call opening a PR is guarded by the delivery guard, not by the executor's
220
- memory.** It comes from the environment and shows in the command text only by an explicit token
221
- substitution. The guard asks the host about the author at draft lifting: a merged PR cannot be
222
- reopened.
239
+ memory.** It shows in the command text only by an explicit token substitution. Judged is the clash
240
+ with the reviewer, not the account name; where the author cannot be learnt, the substitution is
241
+ demanded outright.
223
242
  - **The host client's active account is chosen per machine, not per tree; the machine account is
224
- substituted per call, never made active.** A client login as the machine account hijacks every
225
- neighbouring session on the machine: a neighbour with rights to one repository reads its task as
226
- nonexistent, and from inside the tree the miss is invisible. Substitution is mandatory even with
227
- an active account.
243
+ substituted per call, never made active.** A login as the machine account hijacks every
244
+ neighbouring session on the machine. Substitution is mandatory even with an active account.
228
245
 
229
246
  - **The PR author cannot be its reviewer.** GitHub accepts a self review request and silently does
230
247
  not create it. Only a request and a review not from the author count.
231
- - **The host client call goes from the tree, and a command chain does not check the outcome.**
232
- Outside the tree the client refuses, and the next link carries the rest to the host.
248
+ - **The host client call goes from the tree, and a command chain does not check the outcome.** Outside
249
+ the tree the client refuses, and the next link carries the rest to the host.
233
250
  - **PR labels, assignee and reviewer are set by `gh api` calls, not by `gh pr edit`:** that one
234
251
  refuses about Projects.
235
252
  - **The board is edited by a GraphQL query by the board id, not by the owner's name.**
236
253
  - **The machine commit's email is copied from the companion, not typed from memory.** The address
237
254
  `<число>+<логин>@users.noreply.github.com` matches by the number: with a foreign one the commit
238
- leaves signed by a stranger. The tree profile holds the same line, and the guard refuses the push.
239
- - **The identity of the machine account is confirmed by the host's answer, not by recognising a
240
- string:** asked with the token, login and number come together.
241
- - **Guard scenarios set the git settings themselves, not take them from the machine.** A machine
242
- signature sends git to the key agent, and a locked agent brings the set down; author, email and
243
- signature go as `-c` flags.
255
+ leaves signed by a stranger. The guard refuses the push over it.
256
+ - **The identity of the machine account is confirmed by the host's answer:** asked with the token,
257
+ login and number come together.
258
+ - **Guard scenarios set the git settings themselves, not take them from the machine.** Author, email
259
+ and signature go as `-c` flags.
244
260
 
245
261
  - **Every commit of the branch's contribution is signed by the machine account, and the push set
246
- checks it.** The guard judges a commit that named itself as it; one signed by a person passes by.
262
+ checks it.** The guard judges a commit that named itself as it; a person's passes by.
247
263
  - **The PR state is reread from the host right after publishing.** Opening and setting a reviewer
248
264
  answer zero even having done nothing.
249
- - **The author of an open PR and whether it has a reviewer are audited by the work queue.** Before
250
- the merge neither miss shows: a PR opened by a person never gets a reviewer.
251
- - **Reviewers are asked by a REST call, not by the client's selection.** Its fields come from
252
- GraphQL, which the account has no rights to: "matched" cannot be told from "nothing to ask with".
265
+ - **The author of an open PR and whether it has a reviewer are audited by the work queue.** Before the
266
+ merge neither miss shows: a PR opened by a person never gets a reviewer.
267
+ - **Reviewers are asked by a REST call, not by the client's selection.** Its fields come from GraphQL,
268
+ which the account has no rights to: "matched" is not told from "nothing to ask with".
253
269
 
270
+ - **A second working copy is for reading, and the call goes from the copy the session stands in.**
271
+ The gate runs its set where the session was started: someone else's uncommitted work refuses the
272
+ call, and its own contribution passes unchecked.
254
273
  - **The working tree is not emptied for a tool run.** The comparison goes on a second copy: stashing
255
274
  takes uncommitted work where neither the tree state nor the audit sees it.
256
275
 
257
276
  ## What of the law is not here
258
277
 
259
- The delivery guard stands on the agent's commands, so it does not see a branch created by hand in
260
- the editor: its name is held by memory. No separate check is made for it — work is recognised by the
261
- task title and the PR. The queue audit never judges the branch name.
278
+ The delivery guard stands on the agent's commands, so a branch created by hand in the editor it does
279
+ not see: its name is held by memory. Work is recognised by the task title and the PR, and the queue
280
+ audit never judges the branch name.
262
281
 
263
- The guard does not move a task to in progress: it does not edit the board — a board edit during
264
- command review would fall with the connection. The move is held by memory and the task creation
265
- command's hint; a task left in the first column the guard names at PR opening, other column
266
- discrepancies the queue audit finds.
282
+ The guard does not move a task to in progress: it does not edit the board at all. The move is held
283
+ by memory and the task creation command's hint; a task left in the first column the guard names at
284
+ PR opening, other column discrepancies the queue audit finds.
267
285
 
268
286
  The freshness of main's tip the guard asks by the second tier — the same technique as the task
269
287
  state. The first tier works offline: the local ref answers whether the branch lags what lies in the
@@ -273,7 +291,7 @@ tree, the remote one — whether the ref itself went stale.
273
291
 
274
292
  - `git-workflow-commit` — task, branch, commit and push as the machine account.
275
293
  - `git-workflow-pr` — opening a PR, the draft and lifting it, the body, reviewer, labels, state.
276
- - `git-workflow-merge` — main merged into the task branch, the conflict resolved.
294
+ - `git-workflow-merge` — the base merged into the branch standing on it, the conflict resolved.
277
295
  - `git-workflow-stack` — a chain of branches: branching from the previous, the PR base, the handover
278
296
  order.
279
297
  - `git-workflow-freshness` — one's own open PRs: reading all at once, lag against a dispute.
@@ -98,6 +98,16 @@ flowchart TD
98
98
  looking alike. Everything waiting for a pipeline run, a rework or an answer goes as a draft; the
99
99
  question is asked in the MR itself. The draft sign here is the `Draft:` prefix in the title, and
100
100
  it is edited together with it.
101
+ - **`--hard` is not taken to drop a commit — that is `--soft`.** `reset --hard`, `checkout --
102
+ <path>`, `restore <path>` and `clean -f` erase what is not committed. On a dirty tree the guard
103
+ refuses and names the files; the bypass is `# discard: <reason>` in the command.
104
+ - **The working tree is emptied before the PR opens, not after.** `git status --porcelain` is asked
105
+ in the same turn as the opening: what is uncommitted goes to the host by a commit before it, or
106
+ is named. A push after the opening moves the tip past the green run the body names, and for that
107
+ stretch the PR invites merging a tip nothing has checked.
108
+ - **A push into a branch that has an open PR is followed by rereading its body.** The statement
109
+ about a green run names the tip by its sha, and moving the tip makes it false in silence: no check
110
+ reads a PR body.
101
111
  - **The draft is lifted by a separate call — `glab mr update <номер> --ready`.** With it the
102
112
  executor answers for readiness: checks passed, no rework left, the work matches the task. Lifting
103
113
  the draft and asking to merge are one turn, not two days.
@@ -77,6 +77,10 @@ flowchart TD
77
77
  - **A domain is started for a subject, not for mechanics.** Mechanics shared by several domains ride
78
78
  into the lib that already sees them. On the frontend that is the family base, on the backend the
79
79
  `util` layer listed with every domain.
80
+ - **The name of a lib is what its manifest declares, and the path only suggests it.** The tag and
81
+ the import alias are derived from that name, and the audit reads all three from the manifest and
82
+ the list of paths instead of assembling them from the directory. Where the manifest declares no
83
+ name, the path says what the name must become.
80
84
  - **A domain with exactly one non-empty layer is listed as a line with a reason.** Otherwise it
81
85
  cannot be told from a slot: both have empty layers, and a barrel lies in both.
82
86
 
@@ -100,6 +104,13 @@ layer; such a domain is usually one, and it stands in the exceptions list with a
100
104
  its contract with the consumer: a lost field in `*.State` is not an error while there is no
101
105
  calling code. The first importer is the first check — the models layer is accepted after `nx
102
106
  build` and a live run of the scenario, not by a green `lint test`.
107
+ - **A configuration a target does not declare is a default, not a refusal.** The builder drops an
108
+ unknown name silently: the exit code is zero, the artefact is built by the default, and only the
109
+ line of the build output, where the target is named without a configuration, tells this from a
110
+ real build. Hence the reading rule: what is built with is said by the build output, not by the
111
+ list of configurations in the target manifest — that one says what may be called, not what is
112
+ called. A rollout pipeline called a server build with a production setting the target did not
113
+ have, and for half a year the line promised what it did not do.
103
114
  - **A check is accepted on a violation, not on a green run.** The violation is introduced by hand,
104
115
  the run turns red, the edit is reverted. The checks in `tools/` have no tests, and this is the
105
116
  only acceptance.
@@ -95,7 +95,16 @@ flowchart TD
95
95
  - **The first column of the companion is the article text copied, not retold.** The key of the link
96
96
  is the text itself: a line written by meaning breaks the link while looking filled in. The check
97
97
  counts articles without an address and knows nothing of an article with a wrong address.
98
- - **A binding does not lead into code nobody calls:** a symbol called nowhere is not a place.
98
+ - **A binding does not lead into code nobody calls, and a test is not a call.** A function written
99
+ test-first, before the first call from the application, is an intention: the test calls it
100
+ itself, and by that call a live symbol cannot be told from a forgotten one. The exception is a
101
+ symbol declared in the suite harness itself or published outward by a package — there the caller
102
+ is the test or the consumer by the very purpose of the file.
103
+ - **A verdict is put by substance, not by the form of the address.** To the check these two look
104
+ alike, and to the reader of the companion
105
+ they do not: the first says "nothing here holds the requirement", the second "it holds, but there
106
+ is nothing to write it with". The second verdict names the form itself as the reason and lives
107
+ until the form is fixed; the article under it stays carried out and is not removed.
99
108
  - **A "not carried out" binding moves together with its article.** Otherwise the companion line
100
109
  keeps in the hot part an article with nothing behind it: removed alone, it leaves the binding
101
110
  without an item, and the audit turns red. Both sides move at once.
@@ -216,6 +225,13 @@ flowchart TD
216
225
  the name across the whole tree: otherwise red arrives one check per run — that is how splitting
217
226
  one rule took down three.
218
227
 
228
+ - **The spec speaking of a resource is found by a command, not by walking the subdomains.** A domain
229
+ grows into dozens of subdomains, and the one needed is told from the rest only by reading: whoever
230
+ takes apart a complaint about a file pays the whole window for that and therefore judges by memory.
231
+ The command reads the bindings of the companions — the very ones the audit keeps fresh — and,
232
+ called without a name, names the resources no spec speaks of.
233
+ <!-- rt-when: *.md -->
234
+
219
235
  ## The shape of a compressed article
220
236
 
221
237
  A rule loads whole into a session and pays for it every session, whatever the session works on. A
@@ -45,6 +45,13 @@ flowchart TD
45
45
 
46
46
  ## How the law applies here
47
47
 
48
+ - **The table is assembled by a command, not by the memory of the session.** A session that has just
49
+ started remembers no order of calls, and one that has worked for hours folds the answers otherwise
50
+ than the previous one: two answers about one and the same work then disagree. The command takes the
51
+ order of the tasks from the epic plan and the state of each of them from the hosting; the tree
52
+ names the call in the companion.
53
+ <!-- rt-when: ответ владельцу о состоянии работы -->
54
+
48
55
  - **The work state is shown as a table, not as prose.** A retelling the owner reads whole to find
49
56
  one row, and next time does not read at all.
50
57
  <!-- rt-when: ответ владельцу о состоянии работы -->