@rt-tools/agent-kit 0.29.4 → 0.30.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.
- package/assets/checks/board-epics.github.mjs +17 -2
- package/assets/checks/board-folders.mjs +40 -1
- package/assets/checks/check-board.github.mjs +2 -1
- package/assets/checks/check-prose-style.mjs +6 -2
- package/assets/checks/spec-anchors.mjs +5 -1
- package/assets/defaults/gate-map.sh +4 -1
- package/assets/defaults/shell.sh +6 -2
- package/assets/hooks/claim-guard.sh +42 -13
- package/assets/hooks/epic-stop-guard.sh +26 -1
- package/assets/hooks/git-guard-delivery-epic.sh +11 -1
- package/assets/hooks/git-guard-delivery-tree.sh +29 -0
- package/assets/hooks/git-guard-delivery.sh +6 -6
- package/assets/hooks/git-guard-push-tests.sh +10 -1
- package/assets/hooks/grill-gate-bypass.sh +61 -0
- package/assets/hooks/grill-gate.sh +143 -3
- package/assets/hooks/proposal-guard.sh +3 -0
- package/assets/hooks/turn-exit-guard.sh +3 -3
- package/assets/hooks/turn-exit-verdict.sh +18 -1
- package/assets/patterns/git-workflow-commit.azure.md +4 -0
- package/assets/patterns/git-workflow-commit.github.md +15 -0
- package/assets/patterns/git-workflow-commit.gitlab.md +4 -0
- package/assets/patterns/git-workflow-pr-body.github.md +4 -0
- package/assets/patterns/queue-audit-read.github.md +47 -0
- package/assets/patterns/spec-driven-rule.md +8 -2
- package/assets/patterns/task-flow-close.md +11 -9
- package/assets/patterns/task-flow-start.md +21 -22
- package/assets/pitfalls/doc-style.md +8 -0
- package/assets/pitfalls/turn-conduct.md +14 -0
- package/assets/rules/component-structure.md +4 -0
- package/assets/rules/doc-style.md +20 -3
- package/assets/rules/git-workflow.azure.md +4 -0
- package/assets/rules/git-workflow.github.md +7 -24
- package/assets/rules/git-workflow.gitlab.md +4 -0
- package/assets/rules/queue-audit.github.md +77 -0
- package/assets/rules/status-report.md +6 -0
- package/assets/rules/task-flow.md +18 -21
- package/assets/rules/testing.md +4 -0
- package/assets/rules/turn-conduct.md +22 -20
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +12 -2
- package/lib/commands.js.map +1 -1
- package/lib/hooks-map.d.ts +14 -0
- package/lib/hooks-map.d.ts.map +1 -1
- package/lib/hooks-map.js +55 -8
- package/lib/hooks-map.js.map +1 -1
- package/lib/sync.d.ts +9 -0
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +6 -1
- package/lib/sync.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.30.0.tgz +0 -0
- package/rt-tools-agent-kit-0.29.4.tgz +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: git-workflow
|
|
3
3
|
kind: rule
|
|
4
4
|
law: delivery
|
|
5
|
-
description: Rule under the delivery law for a tree on GitHub. Load for
|
|
5
|
+
description: Rule under the delivery law for a tree on GitHub. Load for a task and a branch, commit, push, opening a PR and merging. Names the pair of task and branch, the machine account and the delivery guards. Patterns git-workflow-commit, -pr, -merge, -stack. Rollout — deploy-flow, audit — queue-audit.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Delivery — how it works here
|
|
@@ -80,7 +80,8 @@ flowchart TD
|
|
|
80
80
|
checkout -b <КЛЮЧ>-<номер задачи>-<slug> <ветка эпика>`; from `main` only the epic branch itself is
|
|
81
81
|
taken — a task branched from `main` carries into it what the epic has not finished.
|
|
82
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.
|
|
83
|
+
into `main`, it leaves the epic branch a copy nobody merges. In a chain the base is the previous
|
|
84
|
+
branch, lawful while it carries the epic branch.
|
|
84
85
|
- **The PR of an epic into the main branch opens after all its tasks are merged and their folders
|
|
85
86
|
are taken apart.** The merge button there means the whole epic, and there is nothing to press it
|
|
86
87
|
for while a task of it is still written.
|
|
@@ -146,29 +147,11 @@ flowchart TD
|
|
|
146
147
|
names its closing columns itself; unnamed — not judged.
|
|
147
148
|
- **The board holds tasks, not PRs about them.** A PR card has no column and never leaves the queue.
|
|
148
149
|
The queue audit finds such cards, a line each.
|
|
149
|
-
- **A lagging column is found by the queue audit, not by eye.** It judges the column by the PR both
|
|
150
|
-
ways: an open PR with the task not in review, and review with no open PR.
|
|
151
|
-
- **A branch with an open PR lags behind its base silently.** The guard judges the base once, at
|
|
152
|
-
opening, and the run does not see what merged after. The work queue audit counts the lag.
|
|
153
|
-
- **The link between a task and an epic is read by the audit both ways.** A one-sided binding looks
|
|
154
|
-
as whole as a two-sided one.
|
|
155
150
|
- **Tasks fixed by one edit are merged before the merge.** The second is erased with its number, and
|
|
156
151
|
the missing is added to the first: after the merge the branch went in whole.
|
|
157
|
-
- **Work that one session cannot close is marked in two places, and they are audited.** The board
|
|
158
|
-
label and the sessions line in the epic plan say the same to two readers; only what legitimately
|
|
159
|
-
does not split is marked.
|
|
160
|
-
- **The tip of an open PR without a run is seen by the work queue audit, unless the pipeline does
|
|
161
|
-
not wake for its base.** A page without a run looks the same as with a green one; where no run
|
|
162
|
-
comes at all, the audit is silent about that PR.
|
|
163
152
|
- **What checks a PR whose base is not the main branch is asked before the first PR of an epic
|
|
164
153
|
opens.** The trigger either wakes for it as for one into main, or does not, and then the push
|
|
165
154
|
gate is the only check behind the work — pattern `git-workflow-stack`.
|
|
166
|
-
- **A run pushed out of the pipeline queue gets a separate audit line.** It looks failed though it
|
|
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.
|
|
170
|
-
- **A draft with a green run on its tip is an audit discrepancy.** A green page permits nothing: the
|
|
171
|
-
host locks the button.
|
|
172
155
|
- **One's own drafts are judged all at once, not only the checked-out branch's.** Two signs — a
|
|
173
156
|
green run on the tip and a folder taken apart; a folder still there means ongoing work.
|
|
174
157
|
- **Opening a PR is refused while the branch carries its task folder.** Opening is the last point
|
|
@@ -180,8 +163,6 @@ flowchart TD
|
|
|
180
163
|
that.** Work here means creating a task or a branch, moving the column and opening a PR.
|
|
181
164
|
- **A conflicting PR of a neighbouring session is not one's own.** One's own branch is the one this
|
|
182
165
|
working copy led; a neighbour's PR is named to the owner, and work is taken as usual.
|
|
183
|
-
- **A conflicting open PR is a work queue audit discrepancy.** The conflict arrives with someone
|
|
184
|
-
else's merge, and the host shows the mark only inside the PR.
|
|
185
166
|
- **A document goes in the same commit as the edit.** The bypass is the line `Docs-skip: <reason>`
|
|
186
167
|
in the commit body; an empty reason is not accepted.
|
|
187
168
|
- **The commit subject is checked against the format on the spot.** A subject parsed by type and
|
|
@@ -207,6 +188,10 @@ flowchart TD
|
|
|
207
188
|
what the author edited means checking half: the branch answers whole.
|
|
208
189
|
- **The main branch is taken by the remote ref — in words and in actions.** The local one is
|
|
209
190
|
yesterday's snapshot and silent about it: by it a merged branch counts as unmerged.
|
|
191
|
+
- **A commit lands with its final content, and a later commit of the same branch does not correct
|
|
192
|
+
it.** It is made after the check against the mockup, the sample and the measurement; what is not
|
|
193
|
+
checked stays in the working tree. A third commit fixing the first shows the reviewer the miss
|
|
194
|
+
instead of the work, and rewriting history hides the trace, not the cause.
|
|
210
195
|
- **A code edit is handed to a person by an open PR, not by a pushed branch.** A branch reaches no
|
|
211
196
|
inbox; the PR opens in the turn the work is said handed over.
|
|
212
197
|
- **What is not ready to merge opens as a draft — `gh pr create --draft`.** The host locks a draft's
|
|
@@ -264,8 +249,6 @@ flowchart TD
|
|
|
264
249
|
checks it.** The guard judges a commit that named itself as it; a person's passes by.
|
|
265
250
|
- **The PR state is reread from the host right after publishing.** Opening and setting a reviewer
|
|
266
251
|
answer zero even having done nothing.
|
|
267
|
-
- **The author of an open PR and whether it has a reviewer are audited by the work queue.** Before the
|
|
268
|
-
merge neither miss shows: a PR opened by a person never gets a reviewer.
|
|
269
252
|
- **Reviewers are asked by a REST call, not by the client's selection.** Its fields come from GraphQL,
|
|
270
253
|
where the account has no rights.
|
|
271
254
|
|
|
@@ -89,6 +89,10 @@ flowchart TD
|
|
|
89
89
|
- **A branch without a task number gets no delivery conditions.** A local trial branch is
|
|
90
90
|
legitimate, and demanding a fresh base of it would refuse work that will not go to main: no MR
|
|
91
91
|
opens from such a branch.
|
|
92
|
+
- **A commit lands with its final content, and a later commit of the same branch does not correct
|
|
93
|
+
it.** It is made after the check against the mockup, the sample and the measurement; what is not
|
|
94
|
+
checked stays in the working tree. A third commit fixing the first shows the reviewer the miss
|
|
95
|
+
instead of the work, and rewriting history hides the trace, not the cause.
|
|
92
96
|
- **A code edit is handed to a person by an open MR, not by a pushed branch.** A branch is not shown
|
|
93
97
|
to them in the branch list, reaches no to-do list and has no discussion: before the MR opens there
|
|
94
98
|
is no edit for a person. It opens in the turn in which the executor says the work is handed over,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: queue-audit
|
|
3
|
+
kind: rule
|
|
4
|
+
law: delivery
|
|
5
|
+
description: Rule under the delivery law for a tree on GitHub — the work queue audit. Load when editing the audit and its modules, or when its line has to be read. Names what the audit judges about columns, open PRs, runs and epics. Pattern queue-audit-read.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Work queue audit — how it works here
|
|
9
|
+
|
|
10
|
+
Rule under the law `docs/constitution/delivery.md`. The law says what must be true about the work
|
|
11
|
+
queue; here — what the audit reads in a tree on GitHub and which discrepancies it names. Creating a
|
|
12
|
+
task, a branch and a PR is the rule `git-workflow`.
|
|
13
|
+
|
|
14
|
+
## What it is called here
|
|
15
|
+
|
|
16
|
+
| In the law | Here |
|
|
17
|
+
| -------------------------- | ------------------------------------------------------------ |
|
|
18
|
+
| the work queue | the project board; a task is an issue on it |
|
|
19
|
+
| a discrepancy of the queue | a line of the audit; a run with lines exits with code 1 |
|
|
20
|
+
| the audit run | `npm run check:board` |
|
|
21
|
+
|
|
22
|
+
## Where it lives
|
|
23
|
+
|
|
24
|
+
In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
|
|
25
|
+
travels between repositories, the layout does not, and a path named in the rule lies in the first
|
|
26
|
+
tree that keeps its code differently.
|
|
27
|
+
|
|
28
|
+
## Flow
|
|
29
|
+
|
|
30
|
+
What the audit reads, in the order it reads it.
|
|
31
|
+
|
|
32
|
+
```mermaid
|
|
33
|
+
flowchart TD
|
|
34
|
+
A[The audit starts] --> B[Open tasks and their columns]
|
|
35
|
+
B --> C[Epics: links both ways, the base of task PRs, long work]
|
|
36
|
+
C --> D[Open PRs: column, lag behind the base, conflict]
|
|
37
|
+
D --> E{The pipeline wakes for the base}
|
|
38
|
+
E -->|Yes| F[The run on the tip: absent, pushed out, green on a draft]
|
|
39
|
+
E -->|No| G[One line for all such PRs, not a discrepancy]
|
|
40
|
+
F --> H[The last run of the main branch]
|
|
41
|
+
G --> H
|
|
42
|
+
H --> I[Lines are printed, the exit code says whether any were]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## How the law applies here
|
|
46
|
+
|
|
47
|
+
- **A lagging column is found by the queue audit, not by eye.** It judges the column by the PR both
|
|
48
|
+
ways: an open PR with the task not in review, and review with no open PR.
|
|
49
|
+
- **A branch with an open PR lags behind its base silently.** The guard judges the base once, at
|
|
50
|
+
opening, and the run does not see what merged after. The work queue audit counts the lag.
|
|
51
|
+
- **The link between a task and an epic is read by the audit both ways.** A one-sided binding looks
|
|
52
|
+
as whole as a two-sided one.
|
|
53
|
+
- **Work that one session cannot close is marked in two places, and they are audited.** The board
|
|
54
|
+
label and the sessions line in the epic plan say the same to two readers; only what legitimately
|
|
55
|
+
does not split is marked.
|
|
56
|
+
- **The tip of an open PR without a run is seen by the work queue audit, unless the pipeline does
|
|
57
|
+
not wake for its base.** A page without a run looks the same as with a green one; where no run
|
|
58
|
+
comes at all, the audit is silent about that PR.
|
|
59
|
+
- **A run pushed out of the pipeline queue gets a separate audit line.** It looks failed though it
|
|
60
|
+
never checked the branch, and the step count tells them apart.
|
|
61
|
+
- **The last run of the main branch is judged by the audit too: red and pushed out get lines of
|
|
62
|
+
their own.** The merge itself is checked by nobody; a pipeline asleep on a push to main is named.
|
|
63
|
+
- **A draft with a green run on its tip is an audit discrepancy.** A green page permits nothing: the
|
|
64
|
+
host locks the button.
|
|
65
|
+
- **A conflicting open PR is a work queue audit discrepancy.** The conflict arrives with someone
|
|
66
|
+
else's merge, and the host shows the mark only inside the PR.
|
|
67
|
+
- **The author of an open PR and whether it has a reviewer are audited by the work queue.** Before the
|
|
68
|
+
merge neither miss shows: a PR opened by a person never gets a reviewer.
|
|
69
|
+
|
|
70
|
+
## What of the law is not here
|
|
71
|
+
|
|
72
|
+
The audit reads the queue and the host, not the tree: what a PR body says about the work it reads
|
|
73
|
+
as text and does not judge. A column moved by hand between two runs is seen only on the next run.
|
|
74
|
+
|
|
75
|
+
## Patterns
|
|
76
|
+
|
|
77
|
+
- `queue-audit-read` — running the audit and acting on each of its lines.
|
|
@@ -78,6 +78,12 @@ flowchart TD
|
|
|
78
78
|
will be read as of the present one; the tip is checked before the run number goes into the cell.
|
|
79
79
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
80
80
|
|
|
81
|
+
- **A red run on an open PR is the first line of any reply about the work, whatever its cause.** A
|
|
82
|
+
runner failure checks no code, and for the owner the run is red all the same: the merge button is
|
|
83
|
+
open. A refused rerun does not lift the line — the reply says the PR stays unchecked and is not
|
|
84
|
+
merged before a green run.
|
|
85
|
+
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
86
|
+
|
|
81
87
|
- **A draft PR is called a draft aloud, together with what we wait for.** A draft's merge is locked
|
|
82
88
|
by the host, and a green page permits the owner nothing; silence they read as breakage.
|
|
83
89
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
@@ -143,18 +143,19 @@ flowchart TD
|
|
|
143
143
|
accepted.
|
|
144
144
|
- **What needs the owner's word is taken from a list, not appraised on the spot.** The appraisal
|
|
145
145
|
"this is safe" is assigned by whoever finds it convenient.
|
|
146
|
+
- **A stop the owner sets on a later step is written down the moment it is said.** It is quoted in
|
|
147
|
+
the waiting line: it holds that step and releases the exit guard.
|
|
146
148
|
- **A reply to the owner's order begins with the result, not with intent or its justification.** A
|
|
147
149
|
justification under someone else's accepted decision reads as its appraisal. One exception:
|
|
148
150
|
execution stopped by an obstacle — then the obstacle is named.
|
|
149
151
|
- **The last run of the main branch is read first thing in a session and after every known
|
|
150
|
-
merge.** A red main branch after a merge lives until the owner notices
|
|
151
|
-
|
|
152
|
+
merge.** A red main branch after a merge lives until the owner notices; a red or pushed-out run is
|
|
153
|
+
fixed before new work is taken.
|
|
152
154
|
- **A session does not start work by itself.** The handover, the state from the startup hook and an
|
|
153
155
|
assigned epic say what to do, not whether to work: a start needs the owner's word in the same
|
|
154
156
|
session. An empty message, one word or one path order no work.
|
|
155
157
|
- **A refusal by an external limiter removes the way, not the task.** It names no exit: the way is
|
|
156
|
-
taken from the guard that already described this fix
|
|
157
|
-
body, a word to the owner — and the task stays the same.
|
|
158
|
+
taken from the guard that already described this fix, and the task stays the same.
|
|
158
159
|
- **An instruction to work by the progress covers all its steps, including those that change
|
|
159
160
|
history.** Questions are asked about what the progress lacks.
|
|
160
161
|
- **A question written by a past session does not become a question to the owner.** It is addressed
|
|
@@ -198,6 +199,9 @@ flowchart TD
|
|
|
198
199
|
- **A plan for work that ports a technique from outside is written by a measurement of one's own
|
|
199
200
|
code.** Reading the sample says how it is built; what is needed here is said by a count over
|
|
200
201
|
one's own files.
|
|
202
|
+
- **A count that becomes the measure of the work is bounded by the declaration, not by the file.**
|
|
203
|
+
A file holds neighbouring sets too: a count over it took a neighbour's suite and came out twice
|
|
204
|
+
the real measure.
|
|
201
205
|
- **Waiting for one part of a stage is never a stop of the stage.** The parts independent of what is
|
|
202
206
|
awaited are done in the same turn; the owner is told what is done and what is left for their step.
|
|
203
207
|
- **A finding made mid-stage is checked against the plan's exit conditions before the first edit.**
|
|
@@ -227,7 +231,6 @@ flowchart TD
|
|
|
227
231
|
leaves the first task standing on the main branch.
|
|
228
232
|
- **The epic card moves to in progress by the same turn that takes its first task.** The owner
|
|
229
233
|
follows the epic by one card: left where it was declared, the card reads as never started.
|
|
230
|
-
Nothing checks this yet: the rule `git-workflow` holds the move command and names the gap.
|
|
231
234
|
- **The next task is taken from the epic plan, and the queue list is asked only where there is no
|
|
232
235
|
epic.** By a list of numbers someone else's epic cannot be told from one's own.
|
|
233
236
|
- **Which epic this working copy leads is read from the table of assignments, and the owner writes
|
|
@@ -248,8 +251,8 @@ flowchart TD
|
|
|
248
251
|
left in the epic branch reaches the main branch with it. Until then the epic branch is not
|
|
249
252
|
offered to a person at all — the merge button on it means the whole epic.
|
|
250
253
|
- **The epic plan lies where it is found without the network and after the merge.** The card does
|
|
251
|
-
not hold the task order, and the task folder dies with the merge
|
|
252
|
-
|
|
254
|
+
not hold the task order, and the task folder dies with the merge. What the owner names along the
|
|
255
|
+
way is appended there by the turn that accepted it.
|
|
253
256
|
- **Building by a sample begins with reading the sample itself, whole, by walking the directories.**
|
|
254
257
|
- **What acts on the tree, not on the edit, lies outside the index.** The path to the sample and the
|
|
255
258
|
permission to work outside the epic do not belong to the branch and live next to the handover. A
|
|
@@ -286,13 +289,11 @@ trace. The owner judges both.
|
|
|
286
289
|
The guard judges by the edit paths, not by whether the work changes behaviour. A refactoring gets no
|
|
287
290
|
sign of its own: the appraisal "behaviour does not change" would be assigned by whoever it hinders.
|
|
288
291
|
|
|
289
|
-
Nothing of the grill itself is checked
|
|
290
|
-
|
|
291
|
-
An empty table passes the same as a filled one.
|
|
292
|
+
Nothing of the grill itself is checked: the guard sees a file edit and knows nothing of the
|
|
293
|
+
exploration, the six questions or the answers. An empty table passes the same as a filled one.
|
|
292
294
|
|
|
293
|
-
The conversation guard
|
|
294
|
-
|
|
295
|
-
what the owner's earlier answer lacks.
|
|
295
|
+
The conversation guard judges shared words between the question's topic and the owner's last
|
|
296
|
+
message, not meaning; its refusal names the lawful move.
|
|
296
297
|
|
|
297
298
|
Nothing watches the plan's immutability: an edit along the way is told from the original record only
|
|
298
299
|
by history.
|
|
@@ -302,17 +303,13 @@ or a spec. This is held by the closing step and the task footprint in the plan.
|
|
|
302
303
|
are edited in the branch, a law is not: its article goes to the owner as text, and the work goes on
|
|
303
304
|
without it.
|
|
304
305
|
|
|
305
|
-
What
|
|
306
|
-
added something to the archive; whether it is the right thing the owner judges at review.
|
|
306
|
+
What went to the archive is not checked: the owner judges it at review.
|
|
307
307
|
|
|
308
308
|
The task folder guard judges the executor's call, not the host's button: a person merging from their
|
|
309
|
-
side passes it in silence
|
|
310
|
-
a section in the PR body, said aloud.
|
|
309
|
+
side passes it in silence, and there the requirement is held by a section in the PR body.
|
|
311
310
|
|
|
312
|
-
A tree may reverse the hand-in order by an override
|
|
313
|
-
|
|
314
|
-
enter the cancelled list and still reads as in force. This is held by reading both texts in a row on
|
|
315
|
-
every edit of the hand-in order.
|
|
311
|
+
A tree may reverse the hand-in order by an override. Which package steps stop being executed then
|
|
312
|
+
nothing counts; it is held by reading both texts in a row on every such edit.
|
|
316
313
|
|
|
317
314
|
## Patterns
|
|
318
315
|
|
package/assets/rules/testing.md
CHANGED
|
@@ -137,6 +137,10 @@ flowchart TD
|
|
|
137
137
|
calling the command — by full path, through a wrapper, with variable substitution — goes into
|
|
138
138
|
the sign alongside the bare name: the bypass the command is called by every day is exactly
|
|
139
139
|
where the guard goes blind.
|
|
140
|
+
- **A test file is edited by the edit tool, the same as a document.** A guard judges a shell
|
|
141
|
+
command by its whole body, so the string a `sed` replaces counts as written. A refused command
|
|
142
|
+
writes nothing while the reply looks like a done edit: the file is reread before the next step.
|
|
143
|
+
The article in full is in the rule `doc-style`.
|
|
140
144
|
- **A check's known list is named and explains itself.** The first field of the list is the
|
|
141
145
|
check's name and a word that what is listed does not count as a refusal. Then either two keys —
|
|
142
146
|
the accepted stays forever, the debt was gathered when the check was created and only shrinks —
|
|
@@ -82,9 +82,7 @@ flowchart TD
|
|
|
82
82
|
|
|
83
83
|
- **A promise to do the work in the next turn is an announcement of intent.** It differs from a
|
|
84
84
|
command named and not run only in that it sounds politer and is therefore recognised as
|
|
85
|
-
a stop less often.
|
|
86
|
-
promise, not a question: a turn ends with a question when the work does not go without the
|
|
87
|
-
answer, and here it went.
|
|
85
|
+
a stop less often.
|
|
88
86
|
- **An order named by a number or by the word "all" is counted aloud before the turn ends.** The reply carries the count — how many out of how many. A turn where the count did
|
|
89
87
|
not add up does not end: it goes on with the next item of the order. How many items the order
|
|
90
88
|
holds is written nowhere in the tree — only whoever read the order knows it.
|
|
@@ -105,6 +103,12 @@ flowchart TD
|
|
|
105
103
|
executor could close is struck out.
|
|
106
104
|
- **A menu under an assigned order.** A choice offered to the owner before the epic is over asks to
|
|
107
105
|
assign the order anew. No work left in the epic — say so: the epic is over — not "what next".
|
|
106
|
+
- **No order at all is a lawful state, and it is said, not filled.** A queue card is not an order.
|
|
107
|
+
The turn names that there is no order and asks for one.
|
|
108
|
+
- **A standing order is written into the progress in the owner's words.** Read once, «merge every
|
|
109
|
+
PR» is lost at the first refusal; the line «Waiting for the owner: no — <their words>» carries it.
|
|
110
|
+
- **Done work is shown on the running application built from it.** Host pages show delivery, not
|
|
111
|
+
«what did you do».
|
|
108
112
|
- **A declaration of intent.** "Taking the next task" is not taking it: the phrase lives to the end
|
|
109
113
|
of the turn, and the work does not move. Only the done is named: the created task's number, the
|
|
110
114
|
branch's name, the moved column.
|
|
@@ -167,11 +171,8 @@ flowchart TD
|
|
|
167
171
|
- **A plan stage is declared closed only after its check command has passed.** The "Checked by"
|
|
168
172
|
(`Чем проверяется`) line carries the command in backticks and what in its output means "matches".
|
|
169
173
|
The guard reads the previous stage number from the branch history and holds a turn where the
|
|
170
|
-
number grew and the command did not run
|
|
171
|
-
|
|
172
|
-
- **The end of an epic is a stop, and it is the one lawful waiting for a word.** Every task of the
|
|
173
|
-
epic is merged or handed over, so there is no next task to take, and both guards of the turn end
|
|
174
|
-
let the stop through. The turn shows
|
|
174
|
+
number grew and the command did not run.
|
|
175
|
+
- **The end of an epic is a stop, and it is the one lawful waiting for a word.** The turn shows
|
|
175
176
|
the table of the epic's tasks, what was done on each and what confirms it, and says that the
|
|
176
177
|
session waits for orders. On the main branch the epic is not read, and the turn is judged as before.
|
|
177
178
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
@@ -201,7 +202,7 @@ flowchart TD
|
|
|
201
202
|
memory.** Everything the reply says about the tree carries a command and its output; said without
|
|
202
203
|
one, it is no statement — not "checked", not "cleared", not "done". The guard reads the turn's
|
|
203
204
|
text to the owner and looks for a command of the same turn; each word has its own kind of
|
|
204
|
-
command.
|
|
205
|
+
command.
|
|
205
206
|
- **The statement guard waits for the reply text rather than judging the record as it found it.**
|
|
206
207
|
The text lands in the turn record no earlier than the host calls the hook. Not having waited, the
|
|
207
208
|
guard returns the turn: an empty record means not "nothing to say" but "nothing to read".
|
|
@@ -210,8 +211,7 @@ flowchart TD
|
|
|
210
211
|
- **A turn about someone else's step is watched by the waiting guard, not by the executor's
|
|
211
212
|
memory.** It refuses a turn's end where someone else's step was spoken of and nothing was done on
|
|
212
213
|
the next task — no task created, no branch, no folder, no column moved. Someone else's step it
|
|
213
|
-
knows by two signs: a PR opened or a red run read in the turn.
|
|
214
|
-
are not an action: they are said instead of one.
|
|
214
|
+
knows by two signs: a PR opened or a red run read in the turn.
|
|
215
215
|
- **A turn that handed work in carries it to a lifted draft.** A draft's merge button is locked by
|
|
216
216
|
the host, and in the PR list ready cannot be told from unfinished. The next task is taken on top
|
|
217
217
|
of that, not instead. The waiting guard demands a command of the same turn about the state of the
|
|
@@ -248,8 +248,7 @@ flowchart TD
|
|
|
248
248
|
- **A turn in which a question was put to the owner does not end until laws and rules were read in
|
|
249
249
|
that same turn.** Reading is any of three roads: loading a rule, reading a file of laws or rules,
|
|
250
250
|
a search over them. The conversation guard refuses at the turn's end, not on the question tool:
|
|
251
|
-
questions are asked in prose more often than by menu.
|
|
252
|
-
"What the rules already say".
|
|
251
|
+
questions are asked in prose more often than by menu.
|
|
253
252
|
- **The owner's answer is sought in their own messages before the rules.** The law says a question
|
|
254
253
|
with a written answer is not put to the owner, and the most reachable record lies not in the tree
|
|
255
254
|
but in the conversation: the owner's first message and their answers to past rounds.
|
|
@@ -258,17 +257,20 @@ flowchart TD
|
|
|
258
257
|
clarification. What is costly is done at cost, or called costly outright, with the price named.
|
|
259
258
|
- **The actions the executor does not do without the owner's word are listed in the rule's
|
|
260
259
|
companion.** Each tree has its own list; the package knows only the demand that it be named.
|
|
261
|
-
Unnamed, it is derived from general words, and
|
|
262
|
-
|
|
263
|
-
|
|
260
|
+
Unnamed, it is derived from general words, and the appraisal "this is safe" is assigned by whoever
|
|
261
|
+
finds it convenient this minute.
|
|
262
|
+
- **What the host's automatic mode refuses is listed in the companion and read before the step.**
|
|
263
|
+
Such a refusal is a refused permission, not a guard: the step is named in one line and the work it
|
|
264
|
+
does not hold goes on. A browser click goes one per call.
|
|
265
|
+
- **Red in the way of one's own task is one's own work, whoever wrote it.** What the linter's fix
|
|
266
|
+
mode repairs is fixed at once in the branch; only a decision goes to the owner, in one line next to
|
|
267
|
+
the fix.
|
|
264
268
|
- **A refusal of an irreversible action has a safe part, and it is done.** The demand to ask the
|
|
265
269
|
owner applies to the action, not the turn: work with a separable harmless part is split, not
|
|
266
270
|
postponed whole. The owner is told what is done and what remained for their word.
|
|
267
271
|
- **The sign of irreversibility is taken from the list, not derived by argument.** The list was
|
|
268
|
-
drawn up by someone who already weighed reversibility
|
|
269
|
-
|
|
270
|
-
silently: from outside it looks like caution, not a skipped step. Actions outside the list the
|
|
271
|
-
executor does not gate.
|
|
272
|
+
drawn up by someone who already weighed reversibility; an argument on top of it cancels it
|
|
273
|
+
silently. Actions outside the list the executor does not gate.
|
|
272
274
|
- **A turn in which the executor admitted a miss does not end until the incident record exists.**
|
|
273
275
|
The incident guard refuses at the turn's end. The records directory is named by the rule's companion, the file name is the date and
|
|
274
276
|
the miss, the form — the layout template. The admission is caught by a set of samples: a miss
|
package/lib/commands.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../projects/agent-kit/src/lib/commands.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../projects/agent-kit/src/lib/commands.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA0B7C,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,2FAA2F;AAC3F,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACpC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAC1B;AA+DD,+DAA+D;AAC/D,eAAO,MAAM,WAAW,EAAE,MAAyB,CAAC;AAocpD;;;;GAIG;AACH,wBAAgB,IAAI,CAChB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,QAAQ,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM,EAC/C,SAAS,GAAE,MAAW,GACvB,iBAAiB,CAgCnB;AA2LD,wBAAgB,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAqEzE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,CA+CpF;AAQD,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CAC1B;AAoLD;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,GAAG,iBAAiB,CA6DlF;AAsFD,wBAAgB,MAAM,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,GAAE,MAAW,GAAG,iBAAiB,CAmF/E;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,YAAY,GAAG,iBAAiB,CA2DzD"}
|
package/lib/commands.js
CHANGED
|
@@ -250,6 +250,8 @@ const gapLines = (result) => result.gaps.flatMap((gap) => [
|
|
|
250
250
|
` ${gap.kind}/${gap.name} — есть только под ${gap.axis}: ${gap.available.join(', ')}, а выбран «${gap.chosen}»`,
|
|
251
251
|
` либо заведи вид под «${gap.chosen}», либо назови в skip: ${gap.ids.join(', ')}`,
|
|
252
252
|
]);
|
|
253
|
+
/** Одноимённые ресурсы одного рода: какое имя двусмысленно и какими путями оно зовётся. */
|
|
254
|
+
const ambiguousLines = (result) => result.ambiguous.map((one) => ` ${one.kind}/${one.name} — одно короткое имя у ${one.ids.join(', ')}: переименуй один из них в пакете`);
|
|
253
255
|
/**
|
|
254
256
|
* Свойства, названные не по перечню пакета, — и деревом, и ресурсами.
|
|
255
257
|
*
|
|
@@ -274,8 +276,9 @@ function strangeTraits(config, assetsDir) {
|
|
|
274
276
|
* выводом, каким видит положенные файлы, — а не следующим просмотром истории.
|
|
275
277
|
*/
|
|
276
278
|
const boundLines = (result) => {
|
|
279
|
+
const short = (result.bound?.short ?? []).map((one) => `запись диспетчера ${one.event} в \`${SETTINGS_PATH}\`: предел ${one.have ?? 'агента по умолчанию'}, гарды объявили ${one.need} с — поле timeout дописывается рукой`);
|
|
277
280
|
if (result.bound === null || (!result.bound.added.length && !result.bound.unreadable && !result.bound.missing)) {
|
|
278
|
-
return
|
|
281
|
+
return short;
|
|
279
282
|
}
|
|
280
283
|
if (result.bound.missing) {
|
|
281
284
|
return [
|
|
@@ -291,6 +294,7 @@ const boundLines = (result) => {
|
|
|
291
294
|
: [
|
|
292
295
|
`в \`${SETTINGS_PATH}\` дописано событий: ${result.bound.added.length}`,
|
|
293
296
|
...result.bound.added.map((event) => ` ${event} — зовёт диспетчер`),
|
|
297
|
+
...short,
|
|
294
298
|
];
|
|
295
299
|
};
|
|
296
300
|
/**
|
|
@@ -430,6 +434,7 @@ const warnings = (result) => [
|
|
|
430
434
|
];
|
|
431
435
|
const describe = (result) => [
|
|
432
436
|
...gapLines(result),
|
|
437
|
+
...ambiguousLines(result),
|
|
433
438
|
...unboundLines(result),
|
|
434
439
|
...driftedLines(result),
|
|
435
440
|
...warnings(result),
|
|
@@ -640,7 +645,7 @@ function syncCheck(config, root, version, assetsDir) {
|
|
|
640
645
|
// Незаполненная дырка в счёт не входит: она говорит о том, чего дерево ещё не описало о
|
|
641
646
|
// себе, а не о расхождении разложенного с редакцией. Она печатается предупреждением —
|
|
642
647
|
// и на сошедшемся дереве тоже.
|
|
643
|
-
const count = result.gaps.length + pending.length + empty.length + result.unbound.length + result.drifted.length;
|
|
648
|
+
const count = result.gaps.length + result.ambiguous.length + pending.length + empty.length + result.unbound.length + result.drifted.length;
|
|
644
649
|
if (!count) {
|
|
645
650
|
return { code: 0, lines: [`sync --check: разложенное сходится с пакетом v${version}`, ...warnings(result)] };
|
|
646
651
|
}
|
|
@@ -674,6 +679,11 @@ export function sync(env, check) {
|
|
|
674
679
|
lines: ['раскладка не начата: у этих ресурсов нет вида под выбор дерева', ...gapLines(result)],
|
|
675
680
|
};
|
|
676
681
|
}
|
|
682
|
+
// Двусмысленное имя отбивает раскладку целиком: каскад по нему снял бы потомков не того
|
|
683
|
+
// родителя, и разложенное читалось бы как верное.
|
|
684
|
+
if (result.ambiguous.length) {
|
|
685
|
+
return { code: 1, lines: ['раскладка не начата: у ресурсов одного рода одинаковое короткое имя', ...ambiguousLines(result)] };
|
|
686
|
+
}
|
|
677
687
|
const refused = result.planned.filter((entry) => isRefusal(entry.outcome));
|
|
678
688
|
if (refused.length) {
|
|
679
689
|
return {
|