@rt-tools/agent-kit 0.29.4 → 0.30.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.
- package/assets/checks/board-epics.github.mjs +17 -2
- package/assets/checks/board-folders.mjs +40 -1
- package/assets/checks/board-runs.github.mjs +7 -2
- package/assets/checks/board.github.mjs +23 -3
- 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/checks/task-new-queue.github.mjs +51 -0
- package/assets/checks/task-new.github.mjs +4 -41
- 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 +31 -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 +144 -4
- 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/hooks/write-targets.sh +69 -3
- package/assets/patterns/admin-nav-item.md +2 -1
- package/assets/patterns/browser-verification-stand.md +3 -0
- package/assets/patterns/doc-style-human.md +21 -0
- 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-docker.md +4 -2
- package/assets/patterns/git-workflow-merge.md +6 -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-domain.md +12 -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/patterns/testing-e2e.md +16 -2
- package/assets/patterns/testing-unit.md +4 -0
- package/assets/pitfalls/doc-style.md +8 -0
- package/assets/pitfalls/styling-bem.md +11 -0
- package/assets/pitfalls/turn-conduct.md +14 -0
- package/assets/rules/browser-verification.md +7 -5
- package/assets/rules/component-structure.md +8 -0
- package/assets/rules/deploy-flow.github.md +28 -2
- package/assets/rules/doc-style.md +20 -3
- package/assets/rules/git-workflow.azure.md +4 -0
- package/assets/rules/git-workflow.github.md +8 -25
- package/assets/rules/git-workflow.gitlab.md +4 -0
- package/assets/rules/lib-layers.md +2 -2
- package/assets/rules/queue-audit.github.md +77 -0
- package/assets/rules/reuse-first.md +7 -0
- package/assets/rules/shared-code.md +3 -0
- package/assets/rules/spec-driven.md +3 -1
- package/assets/rules/status-report.md +6 -0
- package/assets/rules/task-flow.md +18 -21
- package/assets/rules/testing.md +7 -1
- package/assets/rules/turn-conduct.md +27 -26
- 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/proposals.d.ts.map +1 -1
- package/lib/proposals.js +9 -1
- package/lib/proposals.js.map +1 -1
- package/lib/ship.d.ts +9 -0
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +16 -0
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.js +30 -29
- package/lib/shipment.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.29.4.tgz +0 -0
|
@@ -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.
|
|
@@ -54,6 +54,13 @@ flowchart TD
|
|
|
54
54
|
- **Work starts with reading the ready-made, not with a blank file.** First the base is found — a
|
|
55
55
|
kit component, a base class, a sample in a neighbouring domain — then one's own is written on
|
|
56
56
|
top of it.
|
|
57
|
+
- **A sample is taken whole, and every departure from it is a decision written before the code.**
|
|
58
|
+
A sample read for one side of it — the data flow, the store, the columns — is not a sample: its
|
|
59
|
+
layout, its waiting state and its empty states are part of it as much as the markup of the table.
|
|
60
|
+
The executor lists what the sample holds, copies it, and names each departure in the progress
|
|
61
|
+
with its reason; a departure that appears in the code without a line in the progress is a miss,
|
|
62
|
+
not a choice. The check before showing the work is a measurement of one's own screen against the
|
|
63
|
+
sample's, node by node, not of one's own screen alone.
|
|
57
64
|
- **A restriction invented on the spot is checked by a search over the tree before it becomes an
|
|
58
65
|
argument.** "This is not allowed" is a statement about the tree like any other, and a tree
|
|
59
66
|
where the technique is already applied answers it with one command. Named to the owner before
|
|
@@ -101,3 +101,6 @@ name of the edit event in three. Cutting that down is work by domains, and it is
|
|
|
101
101
|
- The same logic written anew under another name is not caught by the check, and there will be no
|
|
102
102
|
such check: two checks of the same shape from different domains are not a copy. Only whoever reads
|
|
103
103
|
the edit can notice it — so says the law too.
|
|
104
|
+
- A value set declared by the contract (`@<scope>/common/proto`) is shared too. A screen enum with
|
|
105
|
+
the same members `npm run check:dupes` refuses even under another name. The api layer service maps
|
|
106
|
+
the contract value into what `State` needs — a label, a sign — and the screen declares no set.
|
|
@@ -231,7 +231,9 @@ flowchart TD
|
|
|
231
231
|
grows into dozens of subdomains, and the one needed is told from the rest only by reading: whoever
|
|
232
232
|
takes apart a complaint about a file pays the whole window for that and therefore judges by memory.
|
|
233
233
|
The command reads the bindings of the companions — the very ones the audit keeps fresh — and,
|
|
234
|
-
called without a name, names the resources no spec speaks of.
|
|
234
|
+
called without a name, names the resources no spec speaks of. It knows only what the package
|
|
235
|
+
lays out; for an application file it answers that the package carries no such name, and the
|
|
236
|
+
product spec is found by the file path in the bindings of the domain specs.
|
|
235
237
|
<!-- rt-when: *.md -->
|
|
236
238
|
|
|
237
239
|
## The shape of a compressed article
|
|
@@ -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 —
|
|
@@ -169,7 +173,9 @@ flowchart TD
|
|
|
169
173
|
- **A line is not added to the known list for a red check.** The list was gathered by the day the
|
|
170
174
|
check was created and has only shrunk since: an added line silences the signal, not the cause,
|
|
171
175
|
and in history looks the same as a fix. A place where the check is right by the letter and
|
|
172
|
-
wrong in substance is reviewed by the owner, and until their answer the check is right.
|
|
176
|
+
wrong in substance is reviewed by the owner, and until their answer the check is right. An inline
|
|
177
|
+
mark that switches a check off for one place is the same line, written into the file instead of
|
|
178
|
+
the list. It is not placed even for a moment.
|
|
173
179
|
- **An exchange counts as read on both sides, not by the success of calls.** Sending and editing
|
|
174
180
|
state answer with success even when there is nothing to read the result with: over two hundred
|
|
175
181
|
records stood as new because there was nobody to collect them, and only those whose file still
|
|
@@ -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
|
|
@@ -247,28 +247,29 @@ flowchart TD
|
|
|
247
247
|
For a call with a reading twin, the kind is chosen by the action, not the command's name.
|
|
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
|
-
a search over them.
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
a search over them. With edits in the turn, only the rule the gate demands counts, and the
|
|
251
|
+
refusal names it. The guard refuses on the question tool before the menu leaves, and at
|
|
252
|
+
the turn's end for a question in prose. What was found lands in the grill section "What the
|
|
253
|
+
rules already say".
|
|
253
254
|
- **The owner's answer is sought in their own messages before the rules.** The law says a question
|
|
254
|
-
with a written answer is not put to the owner, and the most reachable record lies
|
|
255
|
-
|
|
256
|
-
- **The size of work is never a reason to cut its boundaries.**
|
|
257
|
-
|
|
258
|
-
clarification. What is costly is done at cost, or called costly outright, with the price named.
|
|
255
|
+
with a written answer is not put to the owner, and the most reachable record lies in the
|
|
256
|
+
conversation: the owner's first message and their answers to past rounds.
|
|
257
|
+
- **The size of work is never a reason to cut its boundaries.** An offer to drop a part is a request
|
|
258
|
+
to reassign the goal, served as a clarification. What is costly is done at cost, or called costly outright, with the price named.
|
|
259
259
|
- **The actions the executor does not do without the owner's word are listed in the rule's
|
|
260
260
|
companion.** Each tree has its own list; the package knows only the demand that it be named.
|
|
261
|
-
Unnamed,
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
Unnamed, the appraisal "this is safe" is assigned by whoever finds it convenient.
|
|
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
|
-
rolled back" always comes, the list only when read, and an argument on top of the list cancels it
|
|
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, and an argument cancels it silently. Actions outside the list the executor does not gate.
|
|
272
273
|
- **A turn in which the executor admitted a miss does not end until the incident record exists.**
|
|
273
274
|
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
275
|
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 {
|