@rt-tools/agent-kit 0.28.0 → 0.29.1

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 (81) hide show
  1. package/assets/checks/board-epic-link.github.mjs +13 -1
  2. package/assets/checks/board-epic-plan.github.mjs +128 -9
  3. package/assets/checks/board-epics.github.mjs +6 -10
  4. package/assets/checks/board-folders.mjs +50 -0
  5. package/assets/checks/board-runs.github.mjs +102 -2
  6. package/assets/checks/check-board.github.mjs +63 -3
  7. package/assets/checks/check-lib-layers.mjs +4 -2
  8. package/assets/checks/check-spec-coverage.mjs +65 -0
  9. package/assets/checks/check-work-steps.mjs +238 -0
  10. package/assets/checks/epic-table.github.mjs +15 -6
  11. package/assets/checks/lib-common.mjs +9 -4
  12. package/assets/checks/lib-domains.mjs +7 -4
  13. package/assets/checks/main-run.github.mjs +69 -0
  14. package/assets/checks/rt-kit-checks.config.mjs +16 -1
  15. package/assets/checks/task-new.github.mjs +6 -6
  16. package/assets/checks/tree-assignment.mjs +169 -0
  17. package/assets/defaults/project.sh +15 -1
  18. package/assets/hooks/end-conversation-guard.sh +59 -0
  19. package/assets/hooks/epic-over.sh +11 -2
  20. package/assets/hooks/git-guard-delivery-epic.sh +15 -1
  21. package/assets/hooks/git-guard-delivery.sh +4 -2
  22. package/assets/hooks/git-guard-push-tests.sh +31 -8
  23. package/assets/hooks/git-guard-tree-assignment.sh +77 -0
  24. package/assets/hooks/grill-gate.sh +63 -2
  25. package/assets/hooks/hook-input.sh +8 -1
  26. package/assets/hooks/main-run-context.sh +45 -0
  27. package/assets/hooks/prose-style-guard.sh +49 -3
  28. package/assets/hooks/tree-assignment-guard.sh +101 -0
  29. package/assets/hooks/turn-exit-epic.sh +149 -0
  30. package/assets/hooks/turn-exit-guard.sh +40 -24
  31. package/assets/hooks/turn-exit-patterns.sh +50 -8
  32. package/assets/hooks/turn-exit-verdict.sh +39 -8
  33. package/assets/hooks/waiting-turn-guard.sh +56 -1
  34. package/assets/hooks/write-targets.sh +23 -1
  35. package/assets/laws/delivery.md +6 -0
  36. package/assets/laws/work-conduct.md +26 -0
  37. package/assets/patterns/doc-style-human.md +6 -0
  38. package/assets/patterns/git-workflow-merge.md +14 -0
  39. package/assets/patterns/git-workflow-pr-body.github.md +161 -0
  40. package/assets/patterns/git-workflow-pr.github.md +6 -104
  41. package/assets/patterns/git-workflow-stack.md +19 -2
  42. package/assets/patterns/spec-driven-domain.md +4 -0
  43. package/assets/patterns/status-report-table.github.md +6 -0
  44. package/assets/patterns/task-flow-close.md +1 -1
  45. package/assets/patterns/task-flow-resume.md +8 -0
  46. package/assets/patterns/task-flow-start.md +26 -22
  47. package/assets/patterns/testing-e2e.md +14 -0
  48. package/assets/pitfalls/git-workflow.github.md +6 -0
  49. package/assets/pitfalls/turn-conduct.md +46 -0
  50. package/assets/rules/doc-style.md +3 -2
  51. package/assets/rules/git-workflow.github.md +37 -38
  52. package/assets/rules/observability.needs-app.md +5 -0
  53. package/assets/rules/reuse-first.md +33 -11
  54. package/assets/rules/task-flow.md +57 -56
  55. package/assets/rules/testing.md +15 -0
  56. package/assets/rules/turn-conduct.md +70 -73
  57. package/assets/rules/typescript-conventions.md +8 -0
  58. package/assets/samples/tasks/_template/plan.md +7 -1
  59. package/assets/samples/tasks/_template/progress.md +14 -1
  60. package/bin/agent-kit.d.ts.map +1 -1
  61. package/bin/agent-kit.js +2 -1
  62. package/bin/agent-kit.js.map +1 -1
  63. package/lib/cargo.d.ts +49 -1
  64. package/lib/cargo.d.ts.map +1 -1
  65. package/lib/cargo.js +9 -2
  66. package/lib/cargo.js.map +1 -1
  67. package/lib/observations-cargo.d.ts +32 -0
  68. package/lib/observations-cargo.d.ts.map +1 -0
  69. package/lib/observations-cargo.js +105 -0
  70. package/lib/observations-cargo.js.map +1 -0
  71. package/lib/shipment.d.ts +8 -20
  72. package/lib/shipment.d.ts.map +1 -1
  73. package/lib/shipment.js +22 -39
  74. package/lib/shipment.js.map +1 -1
  75. package/lib/tree-mark.d.ts +17 -0
  76. package/lib/tree-mark.d.ts.map +1 -0
  77. package/lib/tree-mark.js +41 -0
  78. package/lib/tree-mark.js.map +1 -0
  79. package/package.json +1 -1
  80. package/rt-tools-agent-kit-0.29.1.tgz +0 -0
  81. package/rt-tools-agent-kit-0.28.0.tgz +0 -0
@@ -39,16 +39,14 @@ lives only in that session's record: a search over them by the theme's word cost
39
39
  is found is written into the tree in the same turn — into the epic plan if it links tasks, into the
40
40
  progress if it concerns one.
41
41
 
42
- Exploration that found nothing is no permission to ask. First, where the search went is named; then
43
- the places missing from the list are reached — the epic plan, the archive, the records of past
44
- sessions. "Not found in such a place" speaks of the place, not of the tree, and the question names
45
- both ways in which the search went.
42
+ Exploration that found nothing is no permission to ask: the places not yet searched — the epic plan,
43
+ the archive, the records of past sessions — are reached first. "Not found in such a place" speaks of
44
+ the place, not of the tree, and the question names where the search went.
46
45
 
47
- Exploration ends with command output, not with a feeling. Before the first question to the owner the
48
- executor knows three things. How the repository is arranged (the root memo), what lies in the
49
- directory at hand (`ls`), and whether something is already written on the theme (a search over the
50
- documentation and the rules). Without a list of what counts as done, exploration runs as a mood: a
51
- read handover passes for it, and not one command runs over the tree.
46
+ Exploration ends with command output, not with a feeling. Before the first question the executor
47
+ knows three things. How the repository is arranged (the root memo), what lies in the directory at
48
+ hand (`ls`), and whether something is written on the theme (a search over the documentation and the
49
+ rules). Without such a list exploration runs as a mood, and a read handover passes for it.
52
50
 
53
51
  Exploration over a created task ends with a reproduced symptom, not a found file. The task body
54
52
  describes the tree on the day of creation, and exploration by the names from the body confirms only
@@ -62,9 +60,13 @@ and only then come the questions about techniques. The answer to "how is this do
62
60
  folder, and generalised into a map of the tree it lies: the neighbouring family of directories is
63
61
  left out, and the owner finds the loss.
64
62
 
65
- What was inferred is marked right in the list, together with what confirms it. A guess by a
66
- neighbouring case stands in one list with what was checked, and the owner reads the whole list as
67
- checked.
63
+ What was inferred is marked right in the list, together with what confirms it: a guess by a
64
+ neighbouring case next to what was checked reads as checked.
65
+
66
+ **A ready-made module of the same kind is looked for before the first question** — in this tree and
67
+ in the trees recorded as samples of its layout. The one found is read whole: it closes the questions
68
+ about the structure — the source of the numbers, the rows, the screen, the storage. A grill of five
69
+ menus about such a module was closed by the owner naming it; the search costs one listing.
68
70
 
69
71
  The six questions are asked minus those the exploration answered: instead of a question with a ready
70
72
  answer, the grill gets the line "taking such-and-such answer, here is where from". The sign is one —
@@ -96,18 +98,21 @@ included. It can be closed by an assumption too, when the answer is obvious —
96
98
  closed by assumption: <what is taken>": a wrong assumption costs an edit, a question about the
97
99
  obvious costs a session.
98
100
 
101
+ **Two answers «recommended» in a row close the remaining questions by assumption.** An owner who took
102
+ the recommended option twice running has shown that the decisions are not theirs. From the second
103
+ such answer the remaining questions go into the grill as decisions — what is taken and where from —
104
+ and the owner gets the list in one line, not a menu. The guard of the conversation refuses the third
105
+ menu itself; a menu goes out again only for a question no assumption closes, and says so first.
106
+
99
107
  The size of the work is never a ground for a question about boundaries: "this is big work" is the
100
- executor's judgement, "whether to do it whole" is the owner's, and they decided before the work
101
- began.
108
+ executor's judgement, "whether to do it whole" the owner's, decided before the work began.
102
109
 
103
110
  The form of a question is set by the owner's settings: where a menu is required, a menu is asked,
104
111
  and a free option is added to every question — a closed set has no line "wrong question".
105
112
 
106
- **The framing of a handed-over text is not carried onto the current tree.** A session handover, a
107
- proposals file and a spec describe the tree they were written in. Only the current tree knows about
108
- the current one, and a statement about the layout is checked by a command here. Confirmation finds
109
- itself — the signs of a tree that only installs the package stand on the one that writes and
110
- installs it too.
113
+ **The framing of a handed-over text is not carried onto the current tree.** A handover, a proposals
114
+ file and a spec describe the tree they were written in; a statement about the layout is checked by a
115
+ command here — the signs of a tree that only installs the package stand on the one that writes it too.
111
116
 
112
117
  The message with which the executor stops begins with what they wait for:
113
118
 
@@ -120,9 +125,8 @@ Under the question goes the table of the epic's position — the same as in the
120
125
  above: the stop is named by the first line, and the epic's position is what the owner decides from.
121
126
  Work outside an epic carries no table.
122
127
 
123
- Measurements, role findings and the list of decisions are by then written in the progress, and in
124
- the message to the owner they are superfluous. A report with a question at its end looks diligent
125
- exactly as reliably as the question drowns in it.
128
+ Measurements, role findings and the list of decisions are by then written in the progress and are
129
+ superfluous in the message: a report with a question at its end drowns the question.
126
130
 
127
131
  The answers are written into `docs/tasks/_draft-<slug>/grill.md` — the folder is still a draft,
128
132
  there is no number.
@@ -108,6 +108,20 @@ This knowledge is entered in the rule, not in the shared module of the suite. Wr
108
108
  it is known to whoever wrote it — the next test repeats the miss, because it reads the rule, not the
109
109
  code.
110
110
 
111
+ A click on closing a panel is not its disappearance either. While the panel leaves the screen it
112
+ keeps its fields, its buttons and its anchors: a test that filled a field in a panel already going
113
+ away stood until its time limit, and the trace showed the fill landing in a node nobody was going
114
+ to read. So the absence of the node is awaited before the next action:
115
+
116
+ ```ts
117
+ await qa(page, 'invite-create-close').click();
118
+ await expect(qa(page, 'invite-create-panel')).toHaveCount(0);
119
+ ```
120
+
121
+ The same holds for a popup that stays open after its item is chosen. It covers the screen, and the
122
+ click aimed at a button under it goes to the popup: the screen answers as if the button had not
123
+ been pressed at all. The popup is closed and its absence awaited by the same pair of lines.
124
+
111
125
  ## Common misses
112
126
 
113
127
  - **Take the rendering server port with care:** the developer's stand goes by the same name
@@ -305,9 +305,15 @@ neighbour with rights to one repository reads its task as nonexistent, and from
305
305
  the miss is invisible — the answer is an ordinary "not found". That is why the account is
306
306
  substituted per call and never made active, even when the active one is already right.
307
307
 
308
+ - **What closes the card of an epic.** The merge of its request closes the card by the host's rule
309
+ on a closed item: nothing moves it to the closing column by hand. The two moves of the card that
310
+ the rule demands are the first one and the one at the opening of the request.
308
311
  - **Why a neighbouring runner rewrites a ready-made step's default.** On a machine with several
309
312
  runners any path from the home directory is shared, so the version a neighbouring run installs
310
313
  lands under the same path and is picked up by the next run of any project.
314
+ - **By which tier the freshness of main's tip is asked.** By the second one — the same technique as
315
+ the task state. The first tier works offline: the local ref answers whether the branch lags what
316
+ lies in the tree, the remote one — whether the ref itself went stale.
311
317
  - **What the second tier of the delivery guard cannot ask without a network.** Task, column,
312
318
  assignee and review live at the hosting: with no network and no token that tier is skipped, and
313
319
  the skip is silent.
@@ -103,3 +103,49 @@ The rule is `turn-conduct`; the articles that hold the law stand there.
103
103
  phrase: the guard's general refusal returned the turn, the executor made one step and ended
104
104
  the turn with the same phrase. Now the guard names it by name; the lawful exit when a decision
105
105
  is needed is a question through the tool.
106
+ - **"Turn exits": the price of a question that holds independent work.** A session stood a night
107
+ and a morning naming the owner one and the same step while three independent tasks lay untaken.
108
+ - **"A guard's refusal ends the turn": why a bypass costs more than a refusal.** A guard refuses one
109
+ file; a bypassed guard lifts the requirement from the whole tree and says nothing. Not memory
110
+ alone holds this — the guards also judge the shell command that writes the file.
111
+ - **"The owner's answer is sought in their own messages": what the conversation guard does not
112
+ see.** It counts loading a rule and searching it as reading, and a message leaves no trace. A
113
+ question that answers itself in the owner's words devalues those asked next to it.
114
+ - **"A taken task is not yet begun work": what the guard's tier covers.** A branch without a task
115
+ number is not under it; an assembled folder template lifts it.
116
+ - **"Exploration does not end a turn": why it passes for work.** It looks like work better than
117
+ anything else: commands, exact numbers, checkable answers.
118
+ - **"A reply to the owner is not an action": why the report takes the place of the work.** The
119
+ reverse order — work, report, end — stands behind every analysed stop: a report is a form of
120
+ completeness, and an appended summary reads as the turn's end the more convincingly the more was
121
+ done.
122
+ - **"A statement about the tree's state is watched by the statement guard": why a word has its own
123
+ kind of command.** A general sign "there was a command" would confirm one thing by another.
124
+ - **A next step named and not begun.** Four stops of one shape: a stage closed and committed, a
125
+ full report, the next stage named in the progress and untouched. The last, on 17 September, came
126
+ after an epic with seven tasks, an agreement and a whole first stage — the more was done, the more
127
+ the report read as the end. The guard now reads the order of actions after the last edit of the
128
+ progress, and a turn that opened the PR passes that sign by itself.
129
+ - **A launch in the background as the last action.** A grill of five menus ended with the review
130
+ roles sent to the background and the line "the roles are working"; the owner read it as a stop.
131
+ The guard counted the launch as work — there were edits in the turn, and the last action was not
132
+ a wait. Now the last tool of the turn is judged: the agent tool or a command sent to the
133
+ background standing last gives the turn back, and work after the launch releases it.
134
+
135
+ ## A single read of the run state taken for watching it
136
+
137
+ 22 September 2026. An epic was handed over whole: nine tasks merged, the request of the epic opened
138
+ into the main branch as a draft. The pipeline woke by itself, and the turn held no starting command.
139
+
140
+ The executor read the state once — the run was going — and ended the turn with the words "I am not
141
+ waiting for the run". The run finished in 12 minutes 35 seconds, green. The draft stayed, the merge
142
+ button stayed locked, and the owner learned the work was ready forty minutes later, by asking what
143
+ the executor was busy with.
144
+
145
+ What confirmed the wrong decision: the waiting guard let the turn go. It demands that the state of
146
+ the handed-over work be asked, and the state was asked — while the run was still going. The guard
147
+ judged the fact of the question, not the end of the run, and its tier about a run started in the
148
+ turn knew only the commands that start one by hand.
149
+
150
+ What it cost: a ready request stood forty minutes under a green run; the owner checked the work
151
+ instead of the executor; two turns went on the conversation about why the work stood still.
@@ -228,8 +228,9 @@ written in.
228
228
  the tree's documents are written in English: a session reads them, and English text costs it a
229
229
  fifth less with the same articles. A task in the queue, a PR description, a commit body and a
230
230
  chat reply are written in the owner's language: the owner reads them, and the rules layer does
231
- not. A text written in the other side's language is a miss of the same kind as a layer word in
232
- a task: its addressee will not read it.
231
+ not. So are an incident analysis and a record of closed work: the owner reads them as the account
232
+ of what happened. A text written in the other side's language is a miss of the same kind as a
233
+ layer word in a task: its addressee will not read it.
233
234
  <!-- rt-when: любой текст -->
234
235
 
235
236
  ## What of the law is not here
@@ -27,7 +27,7 @@ with the rule.
27
27
  | separate branch | `<КЛЮЧ>-<номер задачи>-<короткий-slug>`, taken from the epic branch. A name without a number (`feat/…`, `fix/…`) is legitimate locally: no PR opens from it |
28
28
  | task | a repository issue `[<КЛЮЧ>-<номер>] <Что не так>`, assignee the machine account; attached PR: `Closes #<номер>` in its body |
29
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 |
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 |
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. The epic card stands in the same columns and moves with its first task and its own PR |
31
31
  | PR about a task | PR title `[<КЛЮЧ>-<номер>] <Что сделано>` — the task's number and title turned into the done; commit type and scope stay out |
32
32
  | discussion of an edit | PR review: reviewer — the repository owner, assignee — the machine account, labels — the same as on the task |
33
33
  | record of an edit | `type(scope): description`, types `feat`, `fix`, `refactor`, `docs`, `style`, `test`, `chore`, `perf`; scopes: `implementation.md` |
@@ -50,7 +50,7 @@ flowchart TD
50
50
  Z -->|No| Y[The epic is created together with its tasks, and its branch is taken from main]
51
51
  Z -->|Yes| B[A command creates the task and it enters the work queue]
52
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]
53
+ B --> C[The branch is named by the task number and taken from the epic branch; the column moves in the same motion — the epic card too, on its first task]
54
54
  C --> D{The edit is ready}
55
55
  D -->|No| C
56
56
  D -->|Yes| E[Main is merged in, the gate set is run whole]
@@ -88,16 +88,16 @@ flowchart TD
88
88
  own.** An edit made in it goes into `main` unreviewed: nobody opens a PR from that branch to it.
89
89
  - **The main branch is merged into the epic branch, and the epic branch into the branches of its
90
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.
91
+ with someone else's, checked from a base that is gone. A merge not sent yet answers by the base:
92
+ a task branch from the merged local epic branch is let through.
92
93
  - **A wave of branches off one epic branch is checked by a trial merge, not one by one:** each is
93
94
  green on its own, and they collide on what one branch cannot show.
94
95
  - **The next work's branch is taken from the previous one while the chain is unbroken.** `git
95
96
  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.
97
+ first work.
97
98
  - **A PR in a chain has the previous branch as its base, not main.** `gh pr create --base
98
- <предыдущая ветка>` — otherwise the review shows the edit mixed with all under it. The host
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.
99
+ <предыдущая ветка>` — otherwise the review shows the edit mixed with all under it. The base is
100
+ retargeted by the same motion that merges the lower one — the call is in the pattern.
101
101
  - **A chain is merged bottom-up, and the order stands in every PR body.** Branch kinship is
102
102
  invisible in the list, and the line "stands on #<number>" is the only place it is read.
103
103
  - **`--hard` is not taken to drop a commit — that is `--soft`.** `reset --hard`, `checkout --
@@ -112,9 +112,8 @@ flowchart TD
112
112
  once: everything unmet is known on the first call.
113
113
  - **A condition known at the start of work is asked at the start.** Creating a branch refuses a base
114
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.
115
+ - **The form of a branch name is judged by the tree the command runs in.** The task key of a
116
+ neighbouring tree is its own; a tree with no profile is not judged at all.
118
117
  - **The base judged is the one named by the command, not the tip of the working copy.** A branch is
119
118
  also created straight from `origin/main`, and that command takes the base fresh; a base the tree
120
119
  knows nothing of is not judged.
@@ -136,8 +135,15 @@ flowchart TD
136
135
  something to ask with.
137
136
  - **The task column moves in the same motion as the work.** Branch created — the task is in
138
137
  progress, PR opened — awaiting review; the move command does it, not GraphQL calls from memory.
138
+ - **The epic card moves by the same command, on the epic number, at two moments.** First task
139
+ taken — the epic is in progress; the PR of the epic into `main` opens — the epic awaits review.
140
+ `npm run task:move -- <номер эпика> in-progress`. Left in the first column while its tasks merge,
141
+ the epic reads as never started.
139
142
  - **A task left in the first column opens no PR.** By the work queue it reads as not taken, though
140
143
  the work is done and published. The tree names the first column itself; unnamed — not judged.
144
+ - **An open task standing in a closing column is a discrepancy.** That column says the work is
145
+ merged, and a merge closes the task itself: by the board such work reads as finished. The tree
146
+ names its closing columns itself; unnamed — not judged.
141
147
  - **The board holds tasks, not PRs about them.** A PR card has no column and never leaves the queue.
142
148
  The queue audit finds such cards, a line each.
143
149
  - **A lagging column is found by the queue audit, not by eye.** It judges the column by the PR both
@@ -153,12 +159,14 @@ flowchart TD
153
159
  does not split is marked.
154
160
  - **The tip of an open PR without a run is seen by the work queue audit, unless the pipeline does
155
161
  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.
162
+ comes at all, the audit is silent about that PR.
157
163
  - **What checks a PR whose base is not the main branch is asked before the first PR of an epic
158
164
  opens.** The trigger either wakes for it as for one into main, or does not, and then the push
159
165
  gate is the only check behind the work — pattern `git-workflow-stack`.
160
166
  - **A run pushed out of the pipeline queue gets a separate audit line.** It looks failed though it
161
167
  never checked the branch, and the step count tells them apart.
168
+ - **The last run of the main branch is judged by the audit too: red and pushed out get lines of
169
+ their own.** The merge itself is checked by nobody; a pipeline asleep on a push to main is named.
162
170
  - **A draft with a green run on its tip is an audit discrepancy.** A green page permits nothing: the
163
171
  host locks the button.
164
172
  - **One's own drafts are judged all at once, not only the checked-out branch's.** Two signs — a
@@ -166,13 +174,12 @@ flowchart TD
166
174
  - **Opening a PR is refused while the branch carries its task folder.** Opening is the last point
167
175
  where the executor still sees the refusal.
168
176
  - **One's own open PRs are reread in three places: before a push, on taking a task and after every
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`.
177
+ known merge.** A neighbouring merge stales the rest that second. Technique —
178
+ `git-workflow-freshness`.
171
179
  - **One's own conflicting PR is fixed by the turn's first action, and no new work is taken before
172
180
  that.** Work here means creating a task or a branch, moving the column and opening a PR.
173
181
  - **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.
182
+ working copy led; a neighbour's PR is named to the owner, and work is taken as usual.
176
183
  - **A conflicting open PR is a work queue audit discrepancy.** The conflict arrives with someone
177
184
  else's merge, and the host shows the mark only inside the PR.
178
185
  - **A document goes in the same commit as the edit.** The bypass is the line `Docs-skip: <reason>`
@@ -201,8 +208,7 @@ flowchart TD
201
208
  - **The main branch is taken by the remote ref — in words and in actions.** The local one is
202
209
  yesterday's snapshot and silent about it: by it a merged branch counts as unmerged.
203
210
  - **A code edit is handed to a person by an open PR, not by a pushed branch.** A branch reaches no
204
- inbox and has no discussion, and the PR opens in the turn the executor says the work is handed
205
- over.
211
+ inbox; the PR opens in the turn the work is said handed over.
206
212
  - **What is not ready to merge opens as a draft — `gh pr create --draft`.** The host locks a draft's
207
213
  merge button: everything waiting for a run, a rework or an answer goes as a draft.
208
214
  - **A PR the pipeline does not wake for opens ready, without `--draft`.** Which bases it wakes for
@@ -224,24 +230,20 @@ flowchart TD
224
230
  owner's words, not a list of leftovers.
225
231
  - **The working tree is emptied before the PR opens, not after.** `git status --porcelain` is asked
226
232
  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.
233
+ is named. A push after the opening moves the tip past the green run the body names.
229
234
  - **A push into a branch that has an open PR is followed by rereading its body.** The statement
230
235
  about a green run names the tip by its sha, and moving the tip makes it false in silence: no check
231
236
  reads a PR body.
232
237
  - **The draft is not lifted while the PR has no review.** The guard reads the requested reviewer and
233
- the review left: a lifted draft reads as "may be merged", and there is nobody to merge. A call
234
- without a number is judged too — the client takes the PR of the current branch.
238
+ the review left: a lifted draft reads as "may be merged", and there is nobody to merge.
235
239
  - **The PR merge is pressed by a person, not by the work's executor.** Button and merge call are
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.
240
+ equal. The executor merges their own PR only when a person said so about this PR; said about
241
+ one, it does not carry to the next.
238
242
  - **The identity of the call opening a PR is guarded by the delivery guard, not by the executor's
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.
243
+ memory.** It shows in the command text only by an explicit token substitution; judged is the
244
+ clash with the reviewer, not the account name.
242
245
  - **The host client's active account is chosen per machine, not per tree; the machine account is
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.
246
+ substituted per call, never made active.** A login as it hijacks every neighbouring session.
245
247
 
246
248
  - **The PR author cannot be its reviewer.** GitHub accepts a self review request and silently does
247
249
  not create it. Only a request and a review not from the author count.
@@ -252,7 +254,7 @@ flowchart TD
252
254
  - **The board is edited by a GraphQL query by the board id, not by the owner's name.**
253
255
  - **The machine commit's email is copied from the companion, not typed from memory.** The address
254
256
  `<число>+<логин>@users.noreply.github.com` matches by the number: with a foreign one the commit
255
- leaves signed by a stranger. The guard refuses the push over it.
257
+ leaves signed by a stranger.
256
258
  - **The identity of the machine account is confirmed by the host's answer:** asked with the token,
257
259
  login and number come together.
258
260
  - **Guard scenarios set the git settings themselves, not take them from the machine.** Author, email
@@ -265,11 +267,10 @@ flowchart TD
265
267
  - **The author of an open PR and whether it has a reviewer are audited by the work queue.** Before the
266
268
  merge neither miss shows: a PR opened by a person never gets a reviewer.
267
269
  - **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".
270
+ where the account has no rights.
269
271
 
270
272
  - **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.
273
+ The gate runs its set where the session was started, and a neighbour's uncommitted work refuses it.
273
274
  - **The working tree is not emptied for a tool run.** The comparison goes on a second copy: stashing
274
275
  takes uncommitted work where neither the tree state nor the audit sees it.
275
276
 
@@ -281,16 +282,14 @@ audit never judges the branch name.
281
282
 
282
283
  The guard does not move a task to in progress: it does not edit the board at all. The move is held
283
284
  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.
285
-
286
- The freshness of main's tip the guard asks by the second tier — the same technique as the task
287
- state. The first tier works offline: the local ref answers whether the branch lags what lies in the
288
- tree, the remote one — whether the ref itself went stale.
285
+ PR opening, other column discrepancies the queue audit finds. The epic card is held by memory
286
+ alone: no guard reads its column at branch creation, and the queue audit does not judge it.
289
287
 
290
288
  ## Patterns
291
289
 
292
290
  - `git-workflow-commit` — task, branch, commit and push as the machine account.
293
- - `git-workflow-pr` — opening a PR, the draft and lifting it, the body, reviewer, labels, state.
291
+ - `git-workflow-pr` — opening a PR, the draft and lifting it, state, the checklist.
292
+ - `git-workflow-pr-body` — the link to the task, the body sample, how the task closes off main.
294
293
  - `git-workflow-merge` — the base merged into the branch standing on it, the conflict resolved.
295
294
  - `git-workflow-stack` — a chain of branches: branching from the previous, the PR base, the handover
296
295
  order.
@@ -70,6 +70,11 @@ flowchart TD
70
70
  check that fired. On one level with breakages it floods the alarm with guests' typos.
71
71
  - **The cause of a failure is parsed in one place.** Otherwise the same error arrives in the logs
72
72
  in three different shapes.
73
+ - **A field added to the answer of a refusal is added where the answer is assembled, not where the
74
+ refusal is thrown.** The application parses failures in one place and builds the body there out
75
+ of what it knows: every throw may name the field, and the body carries none of them. Neither the
76
+ linter nor the tests next to the throws see it — the loss shows on the screen of whoever reads
77
+ the answer.
73
78
  - **The fields of a log line are always scrubbed, not at the discretion of whoever writes.**
74
79
  Deciding on every call whether the fields hold a secret means being wrong once.
75
80
  - **At startup the application writes what it came up with.** Half of the features are enabled by
@@ -14,7 +14,7 @@ the same; here — what that stands on in this tree and what it is called.
14
14
 
15
15
  | In the law | Here |
16
16
  | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
17
- | the ready-made | the kit components of `@rt-tools/ui-kit-v2` with the `rt-` prefix — over seventy today — and selectorless base classes inherited in a screen's `@Component` |
17
+ | the ready-made | the kit components of `@rt-tools/ui-kit-v2` with the `rt-` prefix and selectorless base classes inherited in a screen's `@Component` |
18
18
  | the layout of pages, forms and windows | `apps/<app>/src/styles/`, applied with the BEM directives |
19
19
  | styling of a part of the application | the `.scss` file next to the component |
20
20
  | a departure decided by the owner | the `native-ok` marker with an explanation — a comment on the line above or in the line itself |
@@ -112,13 +112,19 @@ flowchart TD
112
112
 
113
113
  ## What of the law is not here
114
114
 
115
- The same response of an input field to an error is held by the kit: nobody in this tree inherits
116
- `RtFormControlBase`, because fields are taken as its ready-made components. There is nothing here
117
- to bind this article of the law to.
115
+ Two articles of the law are counted by no check, and each of them is a number about a tree.
116
+ Whether a field of the application answers an error the way the ready-made one does; how many
117
+ places report a success or a failure by their own markup instead of the shared bus. A template or
118
+ styles inside the decorator is not a third of them: the package set carries a sign for that, and a
119
+ tree that declared the set gets a refusal on such an edit.
118
120
 
119
- An inline template stands on one component, and the same one has the only `styles:` — the admin
120
- header. `role="alert"` is written by hand in sixteen templates, and `rt-message` is called by one
121
- consumer. That is debt, not a permitted departure.
121
+ A number like that is not written into a text at all: it goes stale by itself, with no edit in the
122
+ tree, and a stale number reads as a current one. The companion of the rule writes the way to ask
123
+ it — the command, and what the answer of that command is a measurement of — and the answer stays
124
+ where it is true, in the tree.
125
+
126
+ The law's article about stopping a departure before the file is written is held in part, and the
127
+ part that is missing is named below, where the signs are described.
122
128
 
123
129
  ## Patterns
124
130
 
@@ -152,6 +158,11 @@ A sign names its scope: inheriting a base and a class decorator do not land in a
152
158
  sign judging them by the added text is always silent. A sign also names its cancel — a sample
153
159
  under which it does not fire: the base is already inherited, the ready-made is already called.
154
160
 
161
+ The boundary of a sign is the text by which it is recognised. A whole piece drawn by hand in place
162
+ of a ready-made component is assembled from ordinary markup nodes, and no sign names it: a screen
163
+ that drew its own feed of messages instead of the kit's passes the guard and the full check alike.
164
+ A declared set closes native controls, overlays and layout, and not that.
165
+
155
166
  ## Pitfalls
156
167
 
157
168
  - **A sample is searched for by the kit's names, not by what the kit is written on.** A search by
@@ -165,10 +176,21 @@ under which it does not fire: the base is already inherited, the ready-made is a
165
176
  changes its indent while staying the same code.
166
177
  - An answer given before reading the sample is overruled by the sample: the agreed shape of a list
167
178
  query was replayed together with the contract two questions after it was accepted.
168
- - **A set is declared by what the tree consumes, not by what the package ships.** A tree in which
169
- the kit is written, not called, having declared its set, gets advice to call the kit on the
170
- kit's own files: the sign is right but pointed the wrong way. Such a tree declares only the sets
171
- whose ready-made it takes from outside.
179
+ - **A set is declared by what the tree consumes, and a tree that consumes what it writes declares
180
+ it with an area.** A tree in which the kit is written, not called, having declared its set, gets
181
+ advice to call the kit on the kit's own files: the sign is right but pointed the wrong way. That
182
+ is no reason to leave the set undeclared where the same tree is also its consumer: undeclared, it
183
+ leaves the consumer's screens unjudged, and the silence there is read as order. The area stands
184
+ next to the name — in place of the bare name a pair of the name and the roots it holds over.
185
+
186
+ ```json
187
+ { "reuse": { "bundles": ["angular", { "name": "kit", "roots": ["apps/admin", "libs/admin"] }] } }
188
+ ```
189
+
172
190
  - **A guard that received no sign is indistinguishable from a guard with nothing to refuse.** It
173
191
  says so itself, and the first edit in a tree without declared sets shows it. Silence of the
174
192
  check does not count as a sign of order — first one looks whether it has anything to judge by.
193
+ - **A newly declared set lights up the code written before it, and none of that is new debt.**
194
+ Every place the set names arrives at once and as fresh, so the gate refuses a push for code
195
+ nobody touched. Either those places are closed by the same work, or the snapshot of what
196
+ accumulated is re-taken: the full check takes the key `--baseline` for exactly that.