@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
@@ -48,19 +48,41 @@ Type and scope — `fix(site):`, `docs(common):` — do not go into the PR title
48
48
  subject format, and `commitlint` checks it there. In the PR list it takes room and adds nothing:
49
49
  the kind of edit and the area are already visible by the labels.
50
50
 
51
- ## What is not ready to merge opens as a draft
51
+ ## A draft where a run is waited for, ready where it is not
52
52
 
53
53
  A code edit is handed to a person by an open PR: a pushed branch is shown to them nowhere. An
54
54
  open PR reads as an invitation to merge, so unfinished work opens it as a draft — the host locks
55
- a draft's merge button itself:
55
+ a draft's merge button itself.
56
+
57
+ **Which bases the pipeline wakes for is read from its file, not from memory.** That one line decides
58
+ which of the two orders applies, and taking the wrong one means either waiting for a run that never
59
+ comes or handing over unchecked work as finished:
60
+
61
+ ```bash
62
+ # the bases the checks wake for; nothing printed means every base
63
+ sed -n '/^on:/,/^[a-z]/p' .github/workflows/<файл конвейера>
64
+ ```
65
+
66
+ A base the pipeline wakes for — the PR opens as a draft, and the draft is lifted on the green run:
56
67
 
57
68
  ```bash
58
- GH_TOKEN="$TOKEN" gh pr create --draft --title '[<КЛЮЧ>-86] …' --body-file тело.md
69
+ GH_TOKEN="$TOKEN" gh pr create --draft --base <ветка эпика> --title '[<КЛЮЧ>-86] …' --body-file тело.md
59
70
  ```
60
71
 
61
- Everything waiting for a pipeline run, a rework or an answer to a question goes as a draft. The
62
- question is asked in the PR itself, not kept in the executor's head: a person reads the PR, not
63
- the session's conversation.
72
+ A base it does not wake for — nothing to wait for, and the PR opens without the draft key. The push
73
+ gate is then the only blocking check behind the work, green before the branch is sent:
74
+
75
+ ```bash
76
+ GH_TOKEN="$TOKEN" gh pr create --base <ветка эпика> --title '[<КЛЮЧ>-86] …' --body-file тело.md
77
+ ```
78
+
79
+ **The base is the epic branch, and it is named by the command.** Without `--base` the host takes
80
+ the repository's default branch: the request then carries the task past the epic, and the epic
81
+ branch stays a copy nobody merges. The epic's own request is the only one based on the main branch,
82
+ and it opens when the last folder of its tasks is taken apart.
83
+
84
+ Everything waiting for a pipeline run, a rework or an answer goes as a draft, and the question is
85
+ asked in the PR itself: a person reads the PR, not the session's conversation.
64
86
 
65
87
  The draft is lifted by a separate call, and that is the very turn in which the executor says the
66
88
  solution is ready:
@@ -70,8 +92,9 @@ GH_TOKEN="$TOKEN" gh pr ready 86
70
92
  ```
71
93
 
72
94
  Before the lifting the executor's silence means "not ready yet", after — "may be merged".
73
- Lifting the draft and asking to merge go in one turn: a lifted draft nobody told the person
74
- about waits for review just like one not lifted.
95
+ Lifting the draft and asking to merge go in one turn: a lifted draft nobody told the person about
96
+ waits for review just like one not lifted. A PR opened without the draft key needs no such call,
97
+ and the request to merge goes in the turn that opened it.
75
98
 
76
99
  ## The PR is attached to the task
77
100
 
@@ -79,7 +102,7 @@ The body starts with the link line — by it the board fills the linked PRs fiel
79
102
  assignee and labels are set by the same command, and a PR does not open without them:
80
103
 
81
104
  ```bash
82
- GH_TOKEN="$TOKEN" gh pr create --title '[<КЛЮЧ>-86] Письмо владельцу с незаполненным адресом попадает в логи' \
105
+ GH_TOKEN="$TOKEN" gh pr create --base <ветка эпика> --title '[<КЛЮЧ>-86] Письмо владельцу с незаполненным адресом попадает в логи' \
83
106
  --reviewer <владелец> --assignee <бот> --label bug --label area:api \
84
107
  --body 'Closes #86
85
108
 
@@ -223,7 +246,7 @@ There are no checks on the PR itself: the rollout starts with a push into the ma
223
246
  before the merge nobody runs anything. Linters, unit tests and hook scenarios are taken by the
224
247
  push gate — below is what it does not know.
225
248
 
226
- 1. **The main branch is merged into this branch** — `git fetch origin && git merge origin/main`.
249
+ 1. **The base is merged into this branch** — for a task branch that is the epic branch, for an epic branch the main one: `git fetch origin && git merge origin/<база>`.
227
250
  Base freshness is not inherited between branches of one session: the second and the third
228
251
  are taken after their own `fetch`, not from the ref under the first. While work goes on, main
229
252
  moves ahead — most often by the same executor's own PR. Everything checked below is checked
@@ -267,10 +290,14 @@ push gate — below is what it does not know.
267
290
  the showcase snapshots: since the merge the pipeline runs them on its code, and the red
268
291
  comes to its PR.
269
292
 
270
- This list is about lifting the draft, not about opening it. The PR opens as a draft earlier:
271
- while work goes on, the person is shown what already exists together with what is still missing.
272
- Items 1–15 are passed before `gh pr ready`, and an unmet item means the draft is not lifted — not
273
- that the PR does not open.
293
+ Where the pipeline wakes for this base, the list is about lifting the draft: the PR opens as a
294
+ draft earlier, while work goes on, and the person is shown what exists together with what is
295
+ still missing. Items 1–15 are then passed before `gh pr ready`, and an unmet item means the draft
296
+ is not lifted — not that the PR does not open.
297
+
298
+ Where it does not wake, the same list is about opening: there is no second state to hold the work
299
+ in, so an unmet item means the PR does not open yet. Item 1 changes with it — no run is asked for,
300
+ and its place is taken by the push gate, green before the sending.
274
301
 
275
302
  Right after publishing the task is moved to review — `npm run task:move -- <номер>
276
303
  in-review` — and `npm run check:board` is run once more: before the PR opens it does not judge
@@ -279,10 +306,9 @@ the column, after the opening it sees the discrepancy.
279
306
  What was done by reasoning and what was done by measurement are told apart plainly in the PR
280
307
  body: the unchecked named as checked, the reviewer takes as checked.
281
308
 
282
- **The "What confirms it" section names what was not run too.** A list of one run cannot be told
283
- from the full set, and by it the reviewer decides what need not be rechecked. The price of a
284
- mistake here is not a red pipeline but trust in the section: once read as complete, from then on
285
- it is rechecked whole.
309
+ **The "What confirms it" section names what was not run too.** A list of one run cannot be told from
310
+ the full set, and by it the reviewer decides what need not be rechecked. The price of a mistake here
311
+ is trust in the section: once read as complete, from then on it is rechecked whole.
286
312
 
287
313
  ## Common misses
288
314
 
@@ -76,7 +76,7 @@ command, and an MR does not open without them:
76
76
  GITLAB_TOKEN="$TOKEN" glab mr create \
77
77
  --title '[<КЛЮЧ>-86] Письмо владельцу с незаполненным адресом попадает в логи' \
78
78
  --assignee <бот> --reviewer <владелец> --label bug --label area:api \
79
- --target-branch main --remove-source-branch \
79
+ --target-branch <ветка эпика> --remove-source-branch \
80
80
  --description 'Closes #86
81
81
 
82
82
  …'
@@ -22,25 +22,28 @@ out in that tree.
22
22
  - Several works were done in one session, and they lie in the tree unpublished.
23
23
  - It is decided in which order to hand the accumulated over to the owner.
24
24
 
25
- ## A chain: branch from the previous one, not from main
25
+ ## A chain: branch from the previous one, not from the epic branch
26
26
 
27
27
  A stack from one base is what to avoid. Works that go one after another branch one after
28
28
  another:
29
29
 
30
30
  ```bash
31
- # the first work of the chain — from main, as usual
32
- git checkout -b <КЛЮЧ>-<номер>-<slug> origin/main
31
+ # the first work of the chain — from the epic branch, as usual
32
+ git checkout -b <КЛЮЧ>-<номер>-<slug> <ветка эпика>
33
33
 
34
- # each next one — from the previous branch, not from origin/main
34
+ # each next one — from the previous branch, not from the epic branch
35
35
  git checkout -b <КЛЮЧ>-<следующий>-<slug> <КЛЮЧ>-<номер>-<slug>
36
36
  ```
37
37
 
38
+ A chain lives inside one epic: every branch of it stands, directly or through its neighbours, on
39
+ the epic branch, and the lowest request of the chain has that branch as its base.
40
+
38
41
  The previous edit then lies in the common ancestor, and two different changes of one file never
39
42
  have to be reconciled at all. The divergence surfaces at branching — at the one who has both
40
43
  edits as their own and at hand — not at the merge, at the owner, who has neither.
41
44
 
42
- From main branch the first work of the chain and any work that does not touch the previous one:
43
- a chain is about neighbouring works, not about all in a row.
45
+ From the epic branch the first work of the chain and any work that does not touch the previous
46
+ one: a chain is about neighbouring works, not about all in a row.
44
47
 
45
48
  ## A chain PR stands on the previous branch
46
49
 
@@ -48,15 +51,29 @@ a chain is about neighbouring works, not about all in a row.
48
51
  gh pr create --base <предыдущая ветка> --title '[<КЛЮЧ>-<номер>] <что сделано>' --body-file <файл>
49
52
  ```
50
53
 
51
- Main is not set as the base: the review then shows the own edit mixed with all under it. The
52
- host retargets a merged lower one itself — its heir PR's base becomes main.
54
+ Neither the main branch nor the epic branch is set as the base here: the review then shows the own
55
+ edit mixed with all under it.
56
+
57
+ **The base of the heir is retargeted by hand, by the same motion that merges the lower one.** The
58
+ host does it itself only when the merged branch is deleted; a branch is usually left after the
59
+ merge, and then the heir keeps standing on it — the upper PR merges into the neighbour and not into
60
+ the epic branch. A chain of nine went through this: the base moved by itself in none of the nine.
61
+
62
+ ```bash
63
+ # right after the lower PR is merged — the base of the heir moves to where the lower one stood
64
+ gh api repos/<владелец>/<дерево>/pulls/<номер наследника> -X PATCH -f base=<основание нижней>
65
+ ```
66
+
67
+ From the browser the same is done by editing the PR heading, where the base stands as a dropdown.
68
+ The miss turns red nowhere: the PR looks merged, the task closes by its `Closes` line, and the work
69
+ is not where it was meant to go.
53
70
 
54
71
  The merge order stands in every PR body as the line "stands on #<number>, merge after it": the
55
72
  owner merges by the list, and branch kinship is invisible in the list.
56
73
 
57
74
  **The tree's pipeline is checked for whether it listens to a PR with such a base.** The host
58
75
  sends the PR event with a base filter, and a tree that left only the main branch in the filter
59
- gives the whole chain no runs at all: the PR stands green-and-empty, and there is nothing to
76
+ gives neither the chain nor a single task of an epic any run at all: the PR stands green-and-empty, and there is nothing to
60
77
  bring the event back — neither a new commit nor reclosing the PR changes the base. This is asked
61
78
  before the chain is created: from the pipeline settings, not from the PR page, where a missing
62
79
  run looks the same as waiting for one.
@@ -75,6 +92,12 @@ gh pr list --state open --json number,headRefName,baseRefName \
75
92
  upward.
76
93
  - **A chain is not merged from the middle.** One merged out of order drags along everything
77
94
  under it — and the review of that work never happens.
95
+ - **A branch whose base was merged past it is looked for by hand.** The host counts the lower
96
+ branch merged, closes its PR and offers nothing about the upper ones: their edits are in main,
97
+ their own commits on top are not, and nobody is told. Such a branch is alive only while
98
+ somebody remembers it — two pieces of work stayed in branches like that and were found by a
99
+ list of branches, not by a list of PRs. After a merge out of order the branches of the chain
100
+ are listed and each is either rebased onto main anew or closed by word.
78
101
  - **Ready branches are not hoarded.** A chain does not cancel that the unit of work is a merged
79
102
  PR: it only makes safe the length that has piled up anyway.
80
103
 
@@ -18,6 +18,17 @@ Pattern of the rule `status-report`. What must be true — the work-conduct law.
18
18
 
19
19
  ## Calls
20
20
 
21
+ The whole table at once — the command of the checks layer: it takes the order of the tasks from the
22
+ epic plan, the state of each of them from the hosting, and prints the paragraph and the table ready
23
+ to be carried to the owner. The tree names the call in the companion of the rule.
24
+
25
+ ```bash
26
+ <the command of the tree> [<the number of the epic>]
27
+ ```
28
+
29
+ Everything below is what the command is assembled from: it is asked by hand where the answer is not
30
+ about an epic — one task, one branch, one run.
31
+
21
32
  The branch, its commits beyond main, what is uncommitted and the tip:
22
33
 
23
34
  ```bash
@@ -2,7 +2,7 @@
2
2
  name: task-flow-close
3
3
  kind: pattern
4
4
  rule: task-flow
5
- description: Pattern of rule task-flow. Load when bringing work to readiness — merging the product agreement into the domain spec, bringing the domain texts up to date with what was done, opening the PR as a draft and leaving draft. Taking the task folder apart — pattern task-flow-archive.
5
+ description: Pattern of rule task-flow. Load when bringing work to readiness — merging the product agreement into the domain spec, bringing the domain texts up to date with what was done, opening the PR as a draft or ready by its base and leaving draft.
6
6
  ---
7
7
 
8
8
  # Closing the work
@@ -18,7 +18,7 @@ Pattern of the rule `task-flow`. What must be true meanwhile — the law
18
18
  commit.
19
19
  - The domain texts are brought up to what the work did.
20
20
  - The gate suite is run whole — after the merge and the texts, not before them.
21
- - The task folder is taken apart, and the PR opens as a draft.
21
+ - The task folder is taken apart, and the PR opens — a draft or ready, by the base.
22
22
  - The run on the head is green, and the draft is lifted from the PR.
23
23
 
24
24
  Taking the folder itself apart is not here — that is pattern `task-flow-archive`. It stands between
@@ -90,20 +90,25 @@ and all the rules need not be read.
90
90
  | an application law and a general law | **the file is not edited**: the owner gets the text of the article, the work goes on without it |
91
91
  | the product overview document | a new feature is appended as a line; the line about a lifted one is edited |
92
92
 
93
- What is stale lies most often in three places, and all three are read whole:
93
+ What is stale lies most often in four places, and all four are read whole:
94
94
 
95
95
  - **"What of the law is not here" in a rule.** The spec audit does not read this section, so an
96
96
  untruth lives there as long as it likes. For three tasks in a row a rule wrote that the tree
97
97
  lacked the needed mechanism — and it was there;
98
98
  - **"What is not included" in a domain spec.** A task boundary was written there, and the task is
99
99
  long closed;
100
- - **"Where it lives" in a rule.** Files move, the paths in the table stay.
100
+ - **"Where it lives" in a rule.** Files move, the paths in the table stay;
101
+ - **A statement of a companion about what the tree does not have.** It is written when the subject
102
+ does not exist yet and lives on words about emptiness — no domain specs here, not a scenario
103
+ created, six records. One piece of work creates the subject, and nobody rereads the companion.
101
104
 
102
105
  ```bash
103
106
  # where the rule and the specs speak of what the work touched
104
107
  grep -rn -i "<слово работы>" <каталог правил>/*/SKILL.md docs/specs/*/spec.md
105
108
  # the section nothing audits — read whole by eye
106
109
  grep -rn -A3 "What of the law is not here" <каталог правил>/<правило>/SKILL.md
110
+ # the companions: statements about emptiness and counts, checked by nothing
111
+ grep -rn -iE "(нет|ни одного|пока|всего|записей) [0-9]*" <каталог правил>/*/implementation.md
107
112
  ```
108
113
 
109
114
  **A law is not edited in the branch.** An article of a law is an agreement with the owner, and the
@@ -119,19 +124,21 @@ nothing was changed — why. The form of the section — pattern `git-workflow-p
119
124
 
120
125
  ## State `папка-разобрана`: the work is handed in by a PR
121
126
 
122
- The folder is taken apart and pushed, the work is cleaned up behind — the PR opens as a draft. From
123
- this minute the work waits for the owner, not for the machine, and the session does not end on it:
124
- the next task is taken by the same move, pattern `task-flow-resume`.
127
+ The folder is taken apart and pushed, the work is cleaned up behind — and the PR opens. Whether it
128
+ opens as a draft is decided by the bases the pipeline wakes for: where a run comes, a draft, and it
129
+ is lifted on the green; where none comes, the PR opens ready and the push gate is the check behind
130
+ it. From this minute the work waits for the owner, not for the machine, and the session does not end
131
+ on it: the next task is taken by the same move, pattern `task-flow-resume`.
125
132
 
126
- **Readiness is measured by what is told, not by what has passed.** The list of what is done by the
127
- opening reads as a list of mandatory checks, and its boundary is not visible. It exists: a check the
128
- executor cannot pass for a reason outside the work — a refused permission, an unreachable
129
- environment, a key held by a person — does not cancel readiness. It goes into "Not run" and into
130
- "Remaining step", named together with the reason; silence about it reads as passed.
133
+ **Readiness is measured by what is told, not by what has passed.** A check the executor cannot pass
134
+ for a reason outside the work — a refused permission, an unreachable environment, a key held by a
135
+ person — does not cancel readiness: it goes into "Not run" and into "Remaining step" with the
136
+ reason. Silence about it reads as passed.
131
137
 
132
138
  There is no state on disk any more — the progress left with the folder. This is the price of the
133
- cleanup standing before the PR. The tail of four steps — open the PR, wait for the run, lift the
134
- draft, ask to merge — is held by this pattern, not by a line in a file. The guard counts the work
139
+ cleanup standing before the PR. The tail — open the PR, wait for the run, lift the draft, ask to
140
+ merge, and without a run the first and the last of those — is held by this pattern, not by a line in
141
+ a file. The guard counts the work
135
142
  handed in by the branch history: a folder removed by its commit is the sign.
136
143
 
137
144
  ### The section on the remaining step is written in the PR body, not appended later
@@ -158,10 +165,19 @@ The draft is lifted — the section is rewritten by the same call that edits the
158
165
  Не осталось: прогон зелёный, черновик снят. Можно вливать.
159
166
  ```
160
167
 
168
+ Where the pipeline does not wake for this base, the PR opens with the section already in this
169
+ second form: nothing is left to wait for, and the check standing behind it is the push gate.
170
+
171
+ ```markdown
172
+ ## Оставшийся шаг
173
+
174
+ Не осталось: набор проверок перед push зелёный, CI на эту базу не ходит. Можно вливать.
175
+ ```
176
+
161
177
  The section heading and the words of both samples are written in the language of the PR, not the
162
178
  language of the pattern. The samples are set in the language of this tree's PRs and are carried over
163
179
  whole — the order of thoughts, the wording and the heading, the heading last. It looks like part of
164
- the form, not part of the text. The same holds for the two messages to the owner below: they are
180
+ the form, not part of the text. The same holds for the messages to the owner below: they are
165
181
  samples of **what** is said, not of which words.
166
182
 
167
183
  The section is neither left empty nor removed altogether: a missing section and "no steps left" read
@@ -175,14 +191,21 @@ PR's language, and the package knows no foreign words; unnamed, the section is n
175
191
  The work queue audit still does not read the body: the miss is caught at the minute of opening, that
176
192
  is, where one call still fixes it.
177
193
 
194
+ An open PR is re-read by the account that will merge it, not by the one that opened it. The host's
195
+ answer to the author says only that the call went through: the right to open and the visibility of
196
+ what was opened are different things, and the second is checked only from the reader's side. An
197
+ invisible PR gives itself away by nothing — it is in the answer to its author, it carries labels,
198
+ and the owner's review queue is simply empty.
199
+
178
200
  The difference between the section and the spoken word is one, and it is all. The owner reads a
179
201
  message only if they return to the conversation, and the section they see where they look when
180
202
  pressing the button.
181
203
 
182
- ### Two messages to the owner, and the run between them
204
+ ### The messages to the owner, and the run between them
183
205
 
184
- Both are mandatory, and the order between them is one. Neither replaces the other: the first says
185
- the work is handed in and what it waits for, the second — that it is ready.
206
+ Where the pipeline wakes for this base both are mandatory, and the order between them is one.
207
+ Neither replaces the other: the first says the work is handed in and what it waits for, the second
208
+ — that it is ready. Where no run comes, there is nothing between them, and they are written as one.
186
209
 
187
210
  Right after the PR opens:
188
211
 
@@ -192,6 +215,15 @@ PR #<номер> открыт черновиком, папка задачи уж
192
215
  попрошу тебя влить. Следующая задача уже взята: #<номер>, ветка <имя ветки>.
193
216
  ```
194
217
 
218
+ Где CI на эту базу не просыпается, оба сообщения складываются в одно — его пишут тем же ходом,
219
+ каким открыли PR:
220
+
221
+ ```
222
+ PR #<номер> открыт и готов к слиянию: набор проверок перед push зелёный, папка задачи разобрана.
223
+ CI на PR в ветку эпика у нас не ходит — влей его, пожалуйста. Следующая задача уже взята:
224
+ #<номер>, ветка <имя ветки>.
225
+ ```
226
+
195
227
  The last line names what is taken, not an intent to take, and that is no figure of speech. A sample
196
228
  that ends with a promise is carried out as a promise: the session says the last line and ends the
197
229
  turn on it. The message looks complete, and nobody sees the emptiness behind it, neither the owner
@@ -217,93 +249,67 @@ merging by a green page.
217
249
  Between the two messages the executor does not wait: the work is handed in for review, and the next
218
250
  task is taken by the same move. They return to the PR by the turn that reads the end of the run.
219
251
 
220
- ### The work state stands as a section in the PR body
221
-
222
- Saying it aloud is not enough, and the requirement does not hold on that alone. A message lives
223
- until the next message, and the merge decision is taken on the PR page — there is no conversation
224
- there at all. The section stands last and says exactly one thing: is anything left before the merge.
225
-
226
- ```markdown
227
- ## Оставшийся шаг
228
-
229
- Папка задачи разобрана коммитом `<sha>` — за работой убрано. Осталось дождаться прогона и снять
230
- черновик; до этого кнопка слияния заблокирована хостингом.
231
- ```
232
-
233
- The draft is lifted — the section is rewritten by the same call that edits the body:
252
+ ### An edit after remarks goes without a plan on disk
234
253
 
235
- ```markdown
236
- ## Оставшийся шаг
254
+ The review returned remarks, or the run went red — it is fixed in the same branch. The plan is no
255
+ longer there, and the folder is not assembled again: the progress guard lets the edit through on the
256
+ sign from the branch history. What exactly is fixed is taken from the remark, not from the plan.
237
257
 
238
- Не осталось: прогон зелёный, черновик снят. Можно вливать.
239
- ```
258
+ A merge left in the working copy is either pushed in the same turn or not made — otherwise the owner
259
+ sees the old state and decides by it.
240
260
 
241
- The section heading and the words of both samples are written in the language of the PR, not the
242
- language of the pattern. The samples are set in the language of this tree's PRs and are carried over
243
- whole — the order of thoughts, the wording and the heading, the heading last. It looks like part of
244
- the form, not part of the text. The same holds for the two messages to the owner above: they are
245
- samples of **what** is said, not of which words.
261
+ **Next move:** the run is green and there are no remarks — the draft is lifted, and the owner is
262
+ told the work is ready. Where no run comes, the same move follows the fix itself.
246
263
 
247
- The section is neither left empty nor removed altogether: a missing section and "no steps left" read
248
- the same and mean different things. The full sample of a PR body — in the pattern for creating a
249
- commit and a PR, if the tree laid it out.
264
+ ## State `задачи-эпика-кончились`: the epic is handed in by a request into the main branch
250
265
 
251
- An open PR is re-read by the account that will merge it, not by the one that opened it. The host's
252
- answer to the author says only that the call went through: the right to open and the visibility of
253
- what was opened are different things, and the second is checked only from the reader's side. An
254
- invisible PR gives itself away by nothing — it is in the answer to its author, it carries labels,
255
- and the owner's review queue is simply empty.
266
+ Every task of the epic is merged into its branch and every folder is taken apart — only then does
267
+ the epic branch get a request of its own, and its base is the main branch. Until that minute the
268
+ branch is not offered to a person at all: the merge button on it means the whole epic, and there is
269
+ nothing to press it for while a task is still being written.
256
270
 
257
- There is nothing to check this by machine, and there will be no check: no audit reads the PR body,
258
- and the host asks about nothing but the title. The requirement is held by the same thing as the
259
- spoken word — by whoever writes the body. The difference between them is one, and it is all. The
260
- owner reads a message only if they return to the conversation, and the section they see where they
261
- look when pressing the button.
271
+ Before opening, three things are checked by a command rather than by memory:
262
272
 
263
- ### An edit after remarks goes without a plan on disk
273
+ ```bash
274
+ gh pr list --base <ветка эпика> --state open # no task of the epic is left unmerged
275
+ git ls-tree -r --name-only HEAD -- docs/tasks/ # no folder of a task of this epic is left
276
+ git fetch origin && git merge origin/main # the main branch is merged into the epic branch
277
+ ```
264
278
 
265
- The review returned remarks, or the run went red — it is fixed in the same branch. The plan is no
266
- longer there, and the folder is not assembled again: the progress guard lets the edit through on the
267
- sign from the branch history. What exactly is fixed is taken from the remark, not from the plan.
279
+ A folder left in the epic branch reaches the main branch with it: what one branch needed becomes the
280
+ tree's for good. A foreign folder, arrived with a merge of the main branch, is not touched.
268
281
 
269
- Main merged in to look at something is the same edit as main merged in for the work, and it leaves
270
- by the same turn. A merge left in the working copy is either pushed in the same turn or not made —
271
- otherwise the owner sees the old state and decides by it.
282
+ The body is written the same way as a task's, and its "Что сделано" is the list of the tasks by
283
+ number: the reviewer opens one page instead of five. The plan of the epic stays in the tree — it
284
+ outlives the branch.
272
285
 
273
- **Next move:** the run is green and there are no remarks — the draft is lifted, and the owner is
274
- told the work is ready.
286
+ **Next move:** the request is open as a draft, the run is awaited, the draft is lifted, and the
287
+ owner is asked to merge — by the number, in one turn.
275
288
 
276
289
  ## Common misses
277
290
 
278
- - **The texts are edited before the folder is taken apart:** the list of what to re-read lies in the
279
- plan, and the taking-apart deletes it.
280
- - **A decisions entry repeating a rule's article word for word is no reason next to it.** The rule
281
- comes into the context by itself, the spec — only when opened; the pair diverges in silence. Such
282
- an entry leaves whole, even if the section goes empty; a reason the article does not state is
283
- appended to the article.
291
+ - **The texts are edited before the folder is taken apart:** the list lies in the plan, which the
292
+ taking-apart deletes.
293
+ - **A decisions entry repeating a rule's article word for word is no reason next to it.** It leaves
294
+ whole even if the section empties; a reason the article lacks is appended to it.
284
295
  - **The PR body stays older than the taking-apart.** The taking-apart is the last commit of the
285
- branch, and it makes untrue everything the body promised to do before the merge. The reviewer
286
- reads the list of what is left as what is left, so the body is edited in the same turn.
287
- - **A rule statement is lifted together with its binding line.** The link goes by text: a line
288
- without a statement and a statement without a line redden the spec audit alike.
289
- - **The section "What of the law is not here" is read by eye, grep does not help here.** The word to
290
- search for is not the one expected. A rule referred to an article the law does not have, and by
291
- the word of its theme that line was found — while the untruth was elsewhere.
296
+ branch and makes untrue everything the body promised to do before the merge; it is edited in the
297
+ same turn.
298
+ - **A rule statement is lifted together with its binding line.** The link goes by text, and either
299
+ half alone reddens the spec audit.
300
+ - **The section "What of the law is not here" is read by eye, grep does not help here.** The word
301
+ to search for is not the one expected, and the untruth is not where the theme word leads.
292
302
  - **"Audited" cannot be said without opening the file.** The rule is read whole: a stale statement
293
- stands among true ones and differs from them by nothing.
294
- - **The merge is not done after the merge into main.** Main then holds a "proposed, not yet rolled
295
- out" section with what has been working for a month: a silent lie, the more convincing the older.
296
- - **Scenario numbers are not renumbered at the merge.** The id is the key of the link to the tests,
297
- and a shift breaks the audit for the neighbours.
303
+ stands among true ones and differs by nothing.
304
+ - **The merge is not done after the merge into main:** main then holds a "proposed, not rolled out" section with what has worked for a month.
305
+ - **Scenario numbers are not renumbered at the merge.** The id is the key of the link to the tests.
298
306
  - **"What is not included" is read whole after the merge, not appended to.** The feature's
299
- boundaries land next to the domain's. Half repeat what stood there in other words, and the line
300
- "this section does not exist yet" becomes a lie by the very work that merges it. The spec audit
301
- does not look there.
307
+ boundaries land next to the domain's, and the line "this section does not exist yet" becomes a lie
308
+ by the very work that merges it. The spec audit does not look there.
302
309
  - **One's own line of the work queue audit is found by name** — by the task number and the branch
303
- name. The audit answers for the whole tree, and one closing had eight of someone else's folders
304
- against one of its own.
310
+ name: the audit answers for the whole tree.
305
311
  - **The pair "size label — line in the epic plan" breaks from both sides.** A task on the trail of a
306
- closed one inherits the label without the line about sessions. A closed epic takes the line away
307
- from everyone who carries it.
308
- - **A rule without a binding does not enter the domain spec.** There is no code carrying it out — so
309
- it is an intent, and its place is the domain's open questions.
312
+ closed one inherits the label without the line about sessions, and a closed epic takes the line
313
+ away from everyone who carries it.
314
+ - **A rule without a binding does not enter the domain spec.** Nothing carries it out, so it is an
315
+ intent, and its place is the domain's open questions.
@@ -167,50 +167,64 @@ The grill ended with one task — the step is skipped. Several came out, and the
167
167
  matters — the epic is declared here, before the first of them, and twice. As a card in the work
168
168
  queue with the epic label, and as a plan next to it.
169
169
 
170
- The epic plan names three things, and none is derived from the others:
170
+ ```bash
171
+ npm run task:new -- --epic --title '<Возможность, которая разрабатывается>' --slug <slug> < тело.md
172
+ ```
171
173
 
172
- ```markdown
173
- # <Возможность, которая разрабатывается>
174
+ The call puts the epic label on the card, lays a draft of the plan in the tree's directory of plans
175
+ and writes the path to it into the body: the audit reads the plan by that path, and a card without
176
+ it points into emptiness. Everything the epic cannot be created without is asked before the card is
177
+ made — an administrator alone can take a made one off the board.
174
178
 
175
- Одной фразой: что у владельца появится, когда эпик кончится.
179
+ The draft is filled in by hand, and three things in it are derived from nothing: the opportunity in
180
+ one phrase, the makeup of the tasks in order, and how the branches of the tasks stand. A set without
181
+ an order is no order: two tasks whose order rested on understanding went into work the other way
182
+ round, and the second was redone under the first. The assigned order holds to the end of the epic; a
183
+ revision is the owner's decision.
176
184
 
177
- | № | Задача | Почему здесь |
178
- | --- | ------------ | ------------------------ |
179
- | 1 | <что делает> | <на чём стоят следующие> |
180
- | 2 | <что делает> | <что из первой ей нужно> |
181
- ```
185
+ The cards are created for all the tasks at once, right here — by the same call with `--epic-of`, for
186
+ every row of the makeup. The issued numbers return to the same table, and from this minute "take the
187
+ next" answers with a number, not a name.
182
188
 
183
- A set without an order is no order: two tasks whose order rested on understanding went into work the
184
- other way round, and the second was redone under the first. The assigned order holds to the end of
185
- the epic; a revision is the owner's decision, and it is written into the progress of the task that
186
- caused it.
189
+ **Next move:** the declared epic is committed together with the task numbers, and in the same turn
190
+ its branch is taken.
187
191
 
188
- The plan lies outside the task folder: that one dies with the very first merge. The directory for it
189
- is named by the rule's companion — the package has no path of its own.
192
+ ### State `эпик-заведён`: the branch of the epic
190
193
 
191
- The cards are created for all the tasks at once, right here: by the task creation call for every row
192
- of the table, with the epic label. The issued numbers return to the same table — as a column or a
193
- prefix to the name — and from this minute "take the next" answers with a number, not a name.
194
+ ```bash
195
+ git checkout -b <КЛЮЧ>-<номер эпика>-<slug> origin/main
196
+ ```
194
197
 
195
- A task under an epic names it in its body — the card number and the path to the plan in one line —
196
- and the plan names the task from its side. A one-sided binding looks as whole as a two-sided one:
197
- the reader comes now from the epic, now from the card, and the second side exists for only one of
198
- them.
198
+ The branch is taken before the first task of the epic, not with it: taken later, it leaves the first
199
+ task standing on the main branch, and the epic starts as half of itself already merged.
199
200
 
200
- **Next move:** the declared epic is committed together with the task numbers, and in the same turn
201
- its first task is taken — by creating the branch and the folder.
201
+ The plan of the epic is committed into it and the branch is pushed at once — the branches of the
202
+ tasks are taken from it, and one that exists only on the machine is a base nobody else has. The card
203
+ names the branch: the reader comes to the epic from the queue, and the queue holds no branches.
204
+
205
+ Nothing else is committed into the epic branch: it carries the plan and the merges of the tasks. An
206
+ edit made in it directly reaches the main branch unreviewed.
207
+
208
+ **Next move:** the first task of the epic is taken — the branch of the task from the branch of the
209
+ epic, and the folder.
202
210
 
203
211
  ### State `договорённость-записана`: the task, the branch, the folder
204
212
 
205
213
  ```bash
206
- npm run task:new -- --title '<Что не так>' --slug <slug> --label documentation --label area:tooling < тело.md
207
- git checkout -b <КЛЮЧ>-<номер>-<slug>
214
+ npm run task:new -- --epic-of <номер эпика> --title '<Что не так>' --slug <slug> --label area:tooling < тело.md
215
+ git checkout -b <КЛЮЧ>-<номер>-<slug> <ветка эпика>
208
216
  npm run task:move -- <номер> in-progress
209
217
  ```
210
218
 
211
219
  The body comes as a file and is never empty: an empty task tells nothing to the executor or the
212
220
  owner, and it can be filled in later only on the owner's word.
213
221
 
222
+ The call writes the line about the epic into the body itself and prints the branch line with the
223
+ branch of the epic as its base: the shape of that line is read by a machine from both sides, and by
224
+ hand it comes out in a shape of its own once out of three. Work outside an epic goes by the same
225
+ call with `--outside-epic '<слово владельца>'` — a refusal without that second way out is read as
226
+ "there is no way" and gets bypassed by a call to the hosting past this command.
227
+
214
228
  `task:new` renames `_draft-<slug>` to `<КЛЮЧ>-<номер>-<slug>` and fills in the plan header. The
215
229
  branch is created by a second call: a compound "create and commit at once" is refused by the
216
230
  main-branch guard whole.
@@ -59,6 +59,12 @@ procedures in one by one through `router.rpc`.
59
59
 
60
60
  - A third suffix: `*.rpc.ts` and `*.connect.ts` are the previous names, they leave together with
61
61
  the last domain moved, and no new such files are created.
62
+ - A right written in the mark by a constant: the contract audit reads the mark as text and does not
63
+ find at all what was taken out into a name. Openness and the right are written as a string at the
64
+ place of the declaration — even where a constant with that very value is declared next to it.
65
+ - A sample call of the mark written as an explanation next to the real mark: the parser takes the
66
+ first match in the file, and the right from the comment goes into the audit. A sample belongs in
67
+ the pattern, not in the file of the procedure.
62
68
  - `inject()` in a procedure class: on the backend dependencies go through the constructor.
63
69
  - The body in a closure inside the router registration: a test cannot reach it.
64
70
  - A procedure without an access declaration: the application does not start.