@rt-tools/agent-kit 0.26.0 → 0.27.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/agents/cargo-writer.md +54 -0
- package/assets/checks/board-epic-link.github.mjs +29 -0
- package/assets/checks/board-epics.github.mjs +239 -36
- package/assets/checks/board-long-work.github.mjs +5 -1
- package/assets/checks/board-pull-state.github.mjs +168 -0
- package/assets/checks/board-task-dirs.github.mjs +98 -0
- package/assets/checks/board.github.mjs +8 -91
- package/assets/checks/check-board.github.mjs +25 -165
- package/assets/checks/check-prose-style.mjs +19 -3
- package/assets/checks/check-schema-drift.mjs +19 -3
- package/assets/checks/epic-table.github.mjs +268 -0
- package/assets/checks/rt-kit-checks.config.mjs +13 -0
- package/assets/checks/specs-for.mjs +214 -0
- package/assets/checks/task-new.github.mjs +231 -6
- package/assets/commands/night.md +115 -0
- package/assets/defaults/project.sh +7 -0
- package/assets/defaults/turn-map.md +3 -1
- package/assets/docs/GLOSSARY.md +22 -22
- package/assets/hooks/browser-device-id.sh +4 -0
- package/assets/hooks/browser-guard-device-id.sh +4 -0
- package/assets/hooks/commit-msg.sh +3 -0
- package/assets/hooks/dev-server-guard.sh +4 -0
- package/assets/hooks/epic-over.sh +49 -0
- package/assets/hooks/epic-stop-guard.sh +108 -0
- package/assets/hooks/git-guard-delivery-conflict.sh +3 -0
- package/assets/hooks/git-guard-delivery-draft.sh +3 -0
- package/assets/hooks/git-guard-delivery-epic.sh +167 -0
- package/assets/hooks/git-guard-delivery-signature.sh +32 -2
- package/assets/hooks/git-guard-delivery.sh +28 -4
- package/assets/hooks/handoff-entry-guard.sh +20 -2
- package/assets/hooks/prose-style-guard.sh +31 -8
- package/assets/hooks/qa-dataid-guard.sh +33 -11
- package/assets/hooks/rule-article.sh +3 -0
- package/assets/hooks/skill-gate-layers.sh +4 -0
- package/assets/hooks/skill-loaded.sh +4 -0
- package/assets/hooks/sql-guard-parse.sh +3 -0
- package/assets/hooks/sql-guard-request.sh +3 -0
- package/assets/hooks/sql-guard-target.sh +3 -0
- package/assets/hooks/sql-guard-write.sh +3 -0
- package/assets/hooks/stand-login-guard.sh +3 -0
- package/assets/hooks/turn-exit-guard.sh +5 -1
- package/assets/hooks/turn-exit-patterns.sh +10 -0
- package/assets/hooks/utf8.sh +3 -0
- package/assets/hooks/waiting-turn-guard.sh +11 -1
- package/assets/hooks/write-targets.sh +3 -0
- package/assets/laws/delivery.md +23 -1
- package/assets/patterns/git-workflow-commit.azure.md +1 -1
- package/assets/patterns/git-workflow-commit.github.md +9 -2
- package/assets/patterns/git-workflow-commit.gitlab.md +1 -1
- package/assets/patterns/git-workflow-merge.md +8 -5
- package/assets/patterns/git-workflow-pr.azure.md +1 -1
- package/assets/patterns/git-workflow-pr.github.md +8 -3
- package/assets/patterns/git-workflow-pr.gitlab.md +1 -1
- package/assets/patterns/git-workflow-stack.md +13 -9
- package/assets/patterns/status-report-table.github.md +11 -0
- package/assets/patterns/task-flow-close.md +40 -21
- package/assets/patterns/task-flow-start.md +40 -26
- package/assets/pitfalls/agent-kit.md +19 -0
- package/assets/pitfalls/git-workflow.github.md +6 -0
- package/assets/rules/autonomous-work.md +15 -3
- package/assets/rules/doc-style.md +7 -4
- package/assets/rules/git-workflow.github.md +41 -23
- package/assets/rules/spec-driven.md +7 -0
- package/assets/rules/status-report.md +7 -0
- package/assets/rules/task-flow.md +31 -10
- package/assets/rules/turn-conduct.md +7 -0
- package/assets/skills/agent-kit.md +23 -21
- package/bin/agent-kit.d.ts.map +1 -1
- package/bin/agent-kit.js +8 -1
- package/bin/agent-kit.js.map +1 -1
- package/lib/cargo-prose.d.ts +41 -0
- package/lib/cargo-prose.d.ts.map +1 -0
- package/lib/cargo-prose.js +88 -0
- package/lib/cargo-prose.js.map +1 -0
- package/lib/cargo.d.ts +12 -1
- package/lib/cargo.d.ts.map +1 -1
- package/lib/cargo.js +8 -2
- package/lib/cargo.js.map +1 -1
- package/lib/fate.d.ts +29 -0
- package/lib/fate.d.ts.map +1 -0
- package/lib/fate.js +147 -0
- package/lib/fate.js.map +1 -0
- package/lib/override-marks.d.ts +7 -0
- package/lib/override-marks.d.ts.map +1 -1
- package/lib/override-marks.js +14 -0
- package/lib/override-marks.js.map +1 -1
- package/lib/ship.d.ts +29 -2
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +34 -0
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.fixture.d.ts +8 -1
- package/lib/shipment.fixture.d.ts.map +1 -1
- package/lib/shipment.fixture.js +9 -0
- package/lib/shipment.fixture.js.map +1 -1
- package/lib/shipment.js +32 -3
- package/lib/shipment.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.27.0.tgz +0 -0
- package/rt-tools-agent-kit-0.26.0.tgz +0 -0
|
@@ -157,3 +157,22 @@ not see it. It is carried into the override by hand.
|
|
|
157
157
|
- **A trait the package did not declare fails the layout** — whether in the tree's `has` or in a
|
|
158
158
|
resource name. Traits are declared in a list with the package, next to the axes of difference.
|
|
159
159
|
|
|
160
|
+
## Layout pitfalls
|
|
161
|
+
- **The glossary is as much a laid-out resource as a rule.** The startup hook puts it into the
|
|
162
|
+
context in full, before the first reply, and so it looks like an ordinary tree document; it has
|
|
163
|
+
a header, but it reads as a service line. A new word goes into the glossary override, as a
|
|
164
|
+
section of its own.
|
|
165
|
+
|
|
166
|
+
- **A file write by a shell command is checked on all paths named in its body.** The gate takes
|
|
167
|
+
the paths out of the command text and reads the document body in full if the command holds an
|
|
168
|
+
interpreter name; an import line of a laid-out module then demands a second rule, and one is
|
|
169
|
+
demanded at a time — two refusals in a row, and each loses the written body. The edit tool is
|
|
170
|
+
checked by its one path; a shell redirect is for what does not become a tree file.
|
|
171
|
+
- **Your own thing standing next to the laid-out repeats its mechanics silently.** Parsing the
|
|
172
|
+
list of the known, the source roots and the debt snapshot is given by the checks config
|
|
173
|
+
module; a second such parser in your own check is seen by neither the layout audit nor the
|
|
174
|
+
duplicate check. Before starting your own, look at what the checks config module exports.
|
|
175
|
+
- **A rule loaded by a tool may be shown not in full, and the cut is marked by nothing.** A long
|
|
176
|
+
file comes into the context cut at a line, and the cut falls on the tail — where the override
|
|
177
|
+
sections are appended at the end. The shown lines are compared with the file length by one
|
|
178
|
+
command; if they differ, the file is read to the end.
|
|
@@ -267,3 +267,9 @@ a guard.
|
|
|
267
267
|
broken command and is cured by the directory: the path to it is named from the root, and it is
|
|
268
268
|
called from there.
|
|
269
269
|
|
|
270
|
+
## The active account of the host client
|
|
271
|
+
|
|
272
|
+
A client login as the machine account hijacks every neighbouring session on the machine: a
|
|
273
|
+
neighbour with rights to one repository reads its task as nonexistent, and from inside the tree
|
|
274
|
+
the miss is invisible — the answer is an ordinary "not found". That is why the account is
|
|
275
|
+
substituted per call and never made active, even when the active one is already right.
|
|
@@ -16,7 +16,7 @@ work. The course of work itself — rule `task-flow`, the end of a turn — `tur
|
|
|
16
16
|
|
|
17
17
|
| In the law | Here |
|
|
18
18
|
| --- | --- |
|
|
19
|
-
| an autonomous session | the owner's request to work without them, stated in words and with a time boundary |
|
|
19
|
+
| an autonomous session | the owner's request to work without them, stated in words and with a time boundary; started by the command `/night` |
|
|
20
20
|
| a default instead of a question | a "Decisions" line in the grill: what was taken, the reason and the cost of a mistake |
|
|
21
21
|
| work visible from outside | pushing a branch, opening a PR, merging, publishing the package, sending cargo |
|
|
22
22
|
| a chain | the branch of each next piece of work is created from the branch of the previous one |
|
|
@@ -51,6 +51,18 @@ flowchart TD
|
|
|
51
51
|
|
|
52
52
|
## How the law applies here
|
|
53
53
|
|
|
54
|
+
- **The session is started by the command `/night`, and the time boundary goes to it as an
|
|
55
|
+
argument.** Before it there was no launch at all: the order of the night lay in the texts, and
|
|
56
|
+
every session assembled it from memory — what was forgotten showed only in the morning, by a
|
|
57
|
+
branch that cannot be merged or by work missing from the list. The command takes the boundary,
|
|
58
|
+
raises this rule and the pattern, makes the checks that cost a whole night if met at three
|
|
59
|
+
o'clock, and creates the file of the morning list.
|
|
60
|
+
- **The command called without a boundary asks the owner for one and starts nothing.** They are
|
|
61
|
+
still here at that minute; by morning there is nobody to ask, and a session without a boundary is
|
|
62
|
+
work without an end.
|
|
63
|
+
- **The command does not repeat the order of the night.** It raises the rule and the pattern:
|
|
64
|
+
rewritten into the command, the order would become a second source and diverge from the first
|
|
65
|
+
silently.
|
|
54
66
|
- **The branch of the next work is created from the previous one, not from main.** The first — from
|
|
55
67
|
main, each next — from the tip of the previous: `git checkout -b <ключ>-<номер>-<slug> <прошлая
|
|
56
68
|
ветка>`. The owner merges them in turn from the bottom up, and each PR stands on the previous one.
|
|
@@ -74,8 +86,8 @@ flowchart TD
|
|
|
74
86
|
|
|
75
87
|
## What of the law is not here
|
|
76
88
|
|
|
77
|
-
Nothing checks the session's time boundary: the
|
|
78
|
-
a word. Keeping the ban on what is visible from outside is held the same way — by the rule, not by a
|
|
89
|
+
Nothing checks the session's time boundary: the command asks for it and writes it down, and after
|
|
90
|
+
that the session ends when the work is over or the owner said a word. Keeping the ban on what is visible from outside is held the same way — by the rule, not by a
|
|
79
91
|
guard: the push command is no different from the one made by day.
|
|
80
92
|
|
|
81
93
|
## Patterns
|
|
@@ -228,10 +228,13 @@ written in.
|
|
|
228
228
|
|
|
229
229
|
## What of the law is not here
|
|
230
230
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
231
|
+
Part of the wording agreements is checked, and part is not. The wording check sees the listed
|
|
232
|
+
signs — officialese, a word not written here, a sentence over the limit — and it is called twice:
|
|
233
|
+
by the guard on an edit of a `.md` of the tree, and by the send on a cargo record leaving for the
|
|
234
|
+
intake. What is left with the author is one sentence per rule, no claims about the future and
|
|
235
|
+
freshness of a number in the text. The last two the law leaves with the author explicitly: an
|
|
236
|
+
open question is written in the same words as a promise, and a date and an id are numbers like
|
|
237
|
+
the ones that get recomputed.
|
|
235
238
|
|
|
236
239
|
No check reads the reply to the owner, and the misses in it are the same as in tree text: an
|
|
237
240
|
invented fact served alongside a verified one, and an appraisal of someone else's decision
|
|
@@ -21,7 +21,10 @@ with the rule.
|
|
|
21
21
|
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
22
|
| main branch | `main` |
|
|
23
23
|
| task key | the tree's word for its tasks: `board.taskKey` in `.claude/rt-kit/checks.json`, named in `implementation.md` for the reader |
|
|
24
|
-
|
|
|
24
|
+
| epic | a repository issue with the epic label, `[<КЛЮЧ>-<номер>] <Возможность>`, and a plan next to it: the order of tasks and how the branches stand |
|
|
25
|
+
| epic branch | `<КЛЮЧ>-<номер эпика>-<короткий-slug>`, taken from `main`. Task branches are taken from it, and their PRs go into it |
|
|
26
|
+
| PR of an epic | PR into `main` from the epic branch; opens after all its tasks are merged and their folders taken apart |
|
|
27
|
+
| separate branch | `<КЛЮЧ>-<номер задачи>-<короткий-slug>`, taken from the epic branch. A name without a number (`feat/…`, `fix/…`) is legitimate locally: no PR opens from it |
|
|
25
28
|
| task | a repository issue `[<КЛЮЧ>-<номер>] <Что не так>`, assignee the machine account; attached PR: `Closes #<номер>` in its body |
|
|
26
29
|
| work queue | a GitHub Projects board, not bound to the repository: its `projectsV2` is empty, and a task lands on it only when added |
|
|
27
30
|
| task state in the work queue | a board column ("Status"): created, in progress, in review; names in `implementation.md`. A closed task leaves by merge, not by column |
|
|
@@ -43,8 +46,11 @@ work ends.
|
|
|
43
46
|
|
|
44
47
|
```mermaid
|
|
45
48
|
flowchart TD
|
|
46
|
-
A[Work begins] -->
|
|
47
|
-
|
|
49
|
+
A[Work begins] --> Z{The epic of this work is named}
|
|
50
|
+
Z -->|No| Y[The epic is created together with its tasks, and its branch is taken from main]
|
|
51
|
+
Z -->|Yes| B[A command creates the task and it enters the work queue]
|
|
52
|
+
Y --> B
|
|
53
|
+
B --> C[The branch is named by the task number and taken from the epic branch; the column moves in the same motion]
|
|
48
54
|
C --> D{The edit is ready}
|
|
49
55
|
D -->|No| C
|
|
50
56
|
D -->|Yes| E[Main is merged in, the gate set is run whole]
|
|
@@ -56,7 +62,10 @@ flowchart TD
|
|
|
56
62
|
J -->|Run red| K[Fixed in the same branch]
|
|
57
63
|
K --> J
|
|
58
64
|
J -->|Green| L[The last commit takes the task folder apart, the draft is lifted]
|
|
59
|
-
L --> M[A person presses the merge: the executor asks and names the number]
|
|
65
|
+
L --> M[A person presses the merge into the epic branch: the executor asks and names the number]
|
|
66
|
+
M --> N{Tasks of the epic are left}
|
|
67
|
+
N -->|Yes| B
|
|
68
|
+
N -->|No| O[The PR of the epic into main opens: all the folders are taken apart, and the main branch takes the epic whole]
|
|
60
69
|
G --> B
|
|
61
70
|
```
|
|
62
71
|
|
|
@@ -68,14 +77,27 @@ flowchart TD
|
|
|
68
77
|
- **A branch without a task number opens no PR.** Locally it is legitimate, but an edit from it is a
|
|
69
78
|
rollout with nothing behind it in the queue. A task is created, and the work moves to a branch
|
|
70
79
|
with its number.
|
|
71
|
-
- **
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- **
|
|
75
|
-
|
|
80
|
+
- **Work begins with the epic, and the branch of a task is taken from the epic branch.** `git
|
|
81
|
+
checkout -b <КЛЮЧ>-<номер задачи>-<slug> <ветка эпика>`; from `main` only the epic branch itself
|
|
82
|
+
is taken — a task branched from `main` carries into it what the epic has not finished.
|
|
83
|
+
- **The PR of a task has the epic branch as its base — `gh pr create --base <ветка эпика>`.**
|
|
84
|
+
Opened into `main`, it leaves the epic branch a copy nobody merges: half the epic is rolled out
|
|
85
|
+
while the rest is being written.
|
|
86
|
+
- **The PR of an epic into the main branch opens after all its tasks are merged and their folders
|
|
87
|
+
are taken apart.** The merge button on the epic branch means the whole epic, and there is nothing
|
|
88
|
+
to press it for while a task of it is still being written.
|
|
89
|
+
- **The epic branch carries the plan of the epic and the merges of its tasks, and no edits of its
|
|
90
|
+
own.** An edit made in it directly goes into `main` unreviewed: nobody opens a PR about the epic
|
|
91
|
+
branch to the epic branch.
|
|
92
|
+
- **The main branch is merged into the epic branch, and the epic branch into the branches of its
|
|
93
|
+
tasks — while the work runs, not before the hand-over.** Otherwise the reviewer sees the edit
|
|
94
|
+
mixed with someone else's, and everything was checked from a base that is gone.
|
|
95
|
+
- **A wave of branches off one epic branch is checked by a trial merge, not one by one:** each is
|
|
96
|
+
green on its own, and they collide on what one branch cannot show.
|
|
76
97
|
- **The next work's branch is taken from the previous one while the chain is unbroken.** `git
|
|
77
|
-
checkout -b <КЛЮЧ>-<номер>-<slug> <предыдущая
|
|
78
|
-
|
|
98
|
+
checkout -b <КЛЮЧ>-<номер>-<slug> <предыдущая ветка>`; from the epic branch — only the chain's
|
|
99
|
+
first work, otherwise the first merge diverges the rest at once. A chain is set up inside one
|
|
100
|
+
epic and only where the next task edits what the previous one wrote.
|
|
79
101
|
- **A PR in a chain has the previous branch as its base, not main.** `gh pr create --base
|
|
80
102
|
<предыдущая ветка>` — otherwise the review shows the edit mixed with all under it. The host
|
|
81
103
|
retargets the base of a merged lower one itself.
|
|
@@ -123,7 +145,7 @@ flowchart TD
|
|
|
123
145
|
The queue audit finds such cards, a line each.
|
|
124
146
|
- **A lagging column is found by the queue audit, not by eye.** It judges the column by the PR both
|
|
125
147
|
ways: an open PR with the task not in review, and review with no open PR.
|
|
126
|
-
- **A branch with an open PR lags behind
|
|
148
|
+
- **A branch with an open PR lags behind its base silently.** The guard judges the base once, at
|
|
127
149
|
opening, and the run does not see what merged after either. The work queue audit counts the lag.
|
|
128
150
|
- **The link between a task and an epic is read by the audit both ways.** A one-sided binding looks
|
|
129
151
|
as whole as a two-sided one: the reader comes now from the epic plan, now from the card.
|
|
@@ -136,9 +158,8 @@ flowchart TD
|
|
|
136
158
|
looks the same as with a green one: no colour in either. The audit asks the tip, counts the fact
|
|
137
159
|
of a run, not the colour, and gives a fresh tip time.
|
|
138
160
|
- **A PR whose base is not the main branch is checked by the same set as a PR into main.** The
|
|
139
|
-
pipeline trigger reads the base, and
|
|
140
|
-
|
|
141
|
-
without a run on its tip is not merged — pattern `git-workflow-stack`.
|
|
161
|
+
pipeline trigger reads the base, and an empty checks field reads as waiting in the queue. Asked
|
|
162
|
+
before the first PR of an epic opens — pattern `git-workflow-stack`.
|
|
142
163
|
- **A run pushed out of the pipeline queue gets a separate audit line.** It looks failed though it
|
|
143
164
|
never checked the branch; the step count tells them apart — it has zero.
|
|
144
165
|
- **A draft with a green run on its tip is an audit discrepancy.** A green page permits nothing: the
|
|
@@ -183,11 +204,10 @@ flowchart TD
|
|
|
183
204
|
silently makes the exclusion perpetual. Asked by the same tier as the task state at the guard.
|
|
184
205
|
- **The layout audit stands in the push gate set on a par with lint and the build.** An edit past
|
|
185
206
|
the source piles up silently, and the audit is not in the pipeline.
|
|
186
|
-
- **After merging
|
|
207
|
+
- **After merging the base in, the check set is revised by what the branch now carries.** Checking by
|
|
187
208
|
what the author edited means checking half: the branch answers whole.
|
|
188
209
|
- **The main branch is taken by the remote ref — in words and in actions.** The local one is
|
|
189
|
-
yesterday's snapshot and silent about it
|
|
190
|
-
base and the count of the merged: by the local one a merged branch counts as unmerged, and cleanup
|
|
210
|
+
yesterday's snapshot and silent about it: by it a merged branch counts as unmerged, and cleanup
|
|
191
211
|
ends with a list of unmerged that does not exist.
|
|
192
212
|
- **A code edit is handed to a person by an open PR, not by a pushed branch.** A branch reaches no
|
|
193
213
|
inbox and has no discussion: before the PR opens there is no edit for a person. It opens in the
|
|
@@ -221,10 +241,8 @@ flowchart TD
|
|
|
221
241
|
substitution. The guard asks the host about the author at draft lifting: a merged PR cannot be
|
|
222
242
|
reopened.
|
|
223
243
|
- **The host client's active account is chosen per machine, not per tree; the machine account is
|
|
224
|
-
substituted per call, never made active.** A
|
|
225
|
-
neighbouring session on the machine
|
|
226
|
-
nonexistent, and from inside the tree the miss is invisible. Substitution is mandatory even with
|
|
227
|
-
an active account.
|
|
244
|
+
substituted per call, never made active.** A login as the machine account hijacks every
|
|
245
|
+
neighbouring session on the machine. Substitution is mandatory even with an active account.
|
|
228
246
|
|
|
229
247
|
- **The PR author cannot be its reviewer.** GitHub accepts a self review request and silently does
|
|
230
248
|
not create it. Only a request and a review not from the author count.
|
|
@@ -273,7 +291,7 @@ tree, the remote one — whether the ref itself went stale.
|
|
|
273
291
|
|
|
274
292
|
- `git-workflow-commit` — task, branch, commit and push as the machine account.
|
|
275
293
|
- `git-workflow-pr` — opening a PR, the draft and lifting it, the body, reviewer, labels, state.
|
|
276
|
-
- `git-workflow-merge` —
|
|
294
|
+
- `git-workflow-merge` — the base merged into the branch standing on it, the conflict resolved.
|
|
277
295
|
- `git-workflow-stack` — a chain of branches: branching from the previous, the PR base, the handover
|
|
278
296
|
order.
|
|
279
297
|
- `git-workflow-freshness` — one's own open PRs: reading all at once, lag against a dispute.
|
|
@@ -216,6 +216,13 @@ flowchart TD
|
|
|
216
216
|
the name across the whole tree: otherwise red arrives one check per run — that is how splitting
|
|
217
217
|
one rule took down three.
|
|
218
218
|
|
|
219
|
+
- **The spec speaking of a resource is found by a command, not by walking the subdomains.** A domain
|
|
220
|
+
grows into dozens of subdomains, and the one needed is told from the rest only by reading: whoever
|
|
221
|
+
takes apart a complaint about a file pays the whole window for that and therefore judges by memory.
|
|
222
|
+
The command reads the bindings of the companions — the very ones the audit keeps fresh — and,
|
|
223
|
+
called without a name, names the resources no spec speaks of.
|
|
224
|
+
<!-- rt-when: *.md -->
|
|
225
|
+
|
|
219
226
|
## The shape of a compressed article
|
|
220
227
|
|
|
221
228
|
A rule loads whole into a session and pays for it every session, whatever the session works on. A
|
|
@@ -45,6 +45,13 @@ flowchart TD
|
|
|
45
45
|
|
|
46
46
|
## How the law applies here
|
|
47
47
|
|
|
48
|
+
- **The table is assembled by a command, not by the memory of the session.** A session that has just
|
|
49
|
+
started remembers no order of calls, and one that has worked for hours folds the answers otherwise
|
|
50
|
+
than the previous one: two answers about one and the same work then disagree. The command takes the
|
|
51
|
+
order of the tasks from the epic plan and the state of each of them from the hosting; the tree
|
|
52
|
+
names the call in the companion.
|
|
53
|
+
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
54
|
+
|
|
48
55
|
- **The work state is shown as a table, not as prose.** A retelling the owner reads whole to find
|
|
49
56
|
one row, and next time does not read at all.
|
|
50
57
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
@@ -27,7 +27,8 @@ with a guard does.
|
|
|
27
27
|
| the plan | `docs/tasks/<ветка>/plan.md` — the task footprint and stages with readiness signs; not edited after it is written |
|
|
28
28
|
| the progress | `docs/tasks/<ветка>/progress.md` — "Where we stand", decisions along the way, session entries; the only place where done work is marked |
|
|
29
29
|
| the product agreement written before the code | `docs/specs/<домен>/proposed/<фича>/` — the feature spec; survives the merge and merges into the domain spec |
|
|
30
|
-
| an epic —
|
|
30
|
+
| an epic — the unit of delivery | a card in the work queue with the epic label, a branch of its own from the main branch and a plan next to it: the opportunity, the tasks, their order |
|
|
31
|
+
| the epic branch | `<КЛЮЧ>-<номер эпика>-<короткий-slug>`; the branches of its tasks are taken from it, and their PRs go into it |
|
|
31
32
|
| the epic plan | a record outside the task folder: the folder dies with the merge, the epic outlives it; the directory — in the rule's companion |
|
|
32
33
|
| the task folder before the task is created | `docs/tasks/_draft-<slug>/` — outside history while there is no number |
|
|
33
34
|
| exploration | an `Explore` or `general-purpose` session before the first question to the owner |
|
|
@@ -50,16 +51,18 @@ The state is declared in the "Where we stand" section of the progress by the mac
|
|
|
50
51
|
| State | Entry | Mandatory action | Pattern |
|
|
51
52
|
| --- | --- | --- | --- |
|
|
52
53
|
| `просьба-не-разобрана` | the owner's message about new work | exploration over the tree, then questions | `task-flow-start` |
|
|
54
|
+
| `эпик-заведён` | the epic card, all its tasks and its plan lie in the queue | take the epic branch from the main branch | `task-flow-start` |
|
|
53
55
|
| `разбор-закрыт` | the owner's answers lie on disk | a product agreement, or the reason there is none | `task-flow-start` |
|
|
54
|
-
| `договорённость-записана` | the draft lies, or the reason is named | create the task, the branch and the folder | `task-flow-start` |
|
|
56
|
+
| `договорённость-записана` | the draft lies, or the reason is named | create the task, the branch from the epic branch, and the folder | `task-flow-start` |
|
|
55
57
|
| `задача-взята` | task in the work column, branch by number, folder | write the plan | `task-flow-start` |
|
|
56
58
|
| `замысел-записан` | the plan lies and is not edited after writing | do the first stage | `task-flow-start` |
|
|
57
59
|
| `этап-идёт` | a stage is begun | finish the stage and mark it in the progress | `task-flow-resume` |
|
|
58
60
|
| `этапы-кончились` | all stages are marked | merge the agreement, bring texts up to date, run the suite | `task-flow-close` |
|
|
59
61
|
| `разбор-кончился` | the suite is green, texts are up to date | take the folder apart by the last commit | `task-flow-archive` |
|
|
60
62
|
| `папка-разобрана` | no folder in the branch, a record in the archive | open the PR as a draft | `task-flow-close` |
|
|
61
|
-
| `работа-отдана` | the PR is open as a draft | take the next task | `task-flow-resume` |
|
|
63
|
+
| `работа-отдана` | the PR is open as a draft into the epic branch | take the next task of the epic | `task-flow-resume` |
|
|
62
64
|
| `влито` | the PR merged by a person | rules review of the work and the work queue audit | `task-flow-archive` |
|
|
65
|
+
| `задачи-эпика-кончились` | every task of the epic is merged and its folder taken apart | open the PR of the epic into the main branch | `task-flow-close` |
|
|
63
66
|
|
|
64
67
|
No state has a mandatory action that sounds like "wait": waiting for someone else's step is not a
|
|
65
68
|
work state, so in `работа-отдана` the mandatory action is the next task, not the open PR. A blocked
|
|
@@ -92,10 +95,10 @@ flowchart TD
|
|
|
92
95
|
C --> D{The edit touches application code}
|
|
93
96
|
D -->|Yes| E[A product agreement is written — before the code]
|
|
94
97
|
D -->|No| F[The plan states the reason there is none]
|
|
95
|
-
E --> Z{The
|
|
98
|
+
E --> Z{The epic of this work exists}
|
|
96
99
|
F --> Z
|
|
97
|
-
Z -->|
|
|
98
|
-
Z -->|
|
|
100
|
+
Z -->|No| Y[The epic is declared: a card, all its tasks and a plan — then its branch from the main branch]
|
|
101
|
+
Z -->|Yes| G[Task, branch from the epic branch, task folder by branch name]
|
|
99
102
|
Y --> G
|
|
100
103
|
G --> H[A plan with stages; not edited after it is written]
|
|
101
104
|
H --> I{Stage done}
|
|
@@ -110,7 +113,10 @@ flowchart TD
|
|
|
110
113
|
L --> M{Review and run are over}
|
|
111
114
|
M -->|Red run or remarks| V[Fixed in the same branch: the plan is gone from disk, the guard takes the sign of work from the branch history]
|
|
112
115
|
V --> M
|
|
113
|
-
M -->|Green and no remarks| O[The draft is lifted, a person presses merge]
|
|
116
|
+
M -->|Green and no remarks| O[The draft is lifted, a person presses merge into the epic branch]
|
|
117
|
+
O --> P{Tasks of the epic are left}
|
|
118
|
+
P -->|Yes| G
|
|
119
|
+
P -->|No| Q[The PR of the epic into the main branch opens: every folder is taken apart]
|
|
114
120
|
```
|
|
115
121
|
|
|
116
122
|
## How the law applies here
|
|
@@ -203,6 +209,12 @@ flowchart TD
|
|
|
203
209
|
- **Work ordered in words becomes a task in the queue in the same turn.** Even if it will not be
|
|
204
210
|
done now. A draft folder is not the queue: it has no number, and one session knows of it.
|
|
205
211
|
Postponed work names a date; postponed silently, it reads as done.
|
|
212
|
+
- **Work begins with the epic, and a task outside one is not taken.** Every change belongs to an
|
|
213
|
+
epic: the epic names what the whole is, and the main branch takes that whole or does not take it.
|
|
214
|
+
Work outside an epic exists only by the owner's word about that work, said about that work.
|
|
215
|
+
- **The epic branch is taken before the first task of the epic, not with it.** Taken later, it
|
|
216
|
+
leaves the first task standing on the main branch, and the epic starts as half of itself already
|
|
217
|
+
merged.
|
|
206
218
|
- **The next task is taken from the epic plan, and the work queue list is asked only where there is
|
|
207
219
|
no epic.** By a list of numbers the first task of someone else's epic cannot be told from one's
|
|
208
220
|
own. A finished epic is named to the owner by the same turn that takes work outside it.
|
|
@@ -210,11 +222,20 @@ flowchart TD
|
|
|
210
222
|
checked only together with a command and its output.
|
|
211
223
|
- **The tasks of an epic are created all at once, by the same turn as the epic itself.** Creating
|
|
212
224
|
them one at a time hides the volume. The numbers return to the order section by the same edit.
|
|
225
|
+
- **A task of an epic is linked to the epic card as a sub-issue, not only named in the plan.** The
|
|
226
|
+
plan and the task body are text, and the board reads neither: on the board a task of an epic looks
|
|
227
|
+
exactly like a task outside one, and the makeup and the share of what is done are assembled by
|
|
228
|
+
hand from the list of open cards. Closed tasks are linked too — the share counts them.
|
|
213
229
|
|
|
214
230
|
- **The epic plan names how the branches of its tasks stand, on a par with their order.** Two
|
|
215
|
-
arrangements: each branch from
|
|
216
|
-
nothing about this. The stack costs more, its price is
|
|
217
|
-
written in the plan is the epic's decision, not that of
|
|
231
|
+
arrangements, and both live inside the epic: each branch from the epic branch, or a stack — each
|
|
232
|
+
from the previous. The task order says nothing about this. The stack costs more, its price is
|
|
233
|
+
listed in the cold part; the arrangement written in the plan is the epic's decision, not that of
|
|
234
|
+
whoever creates the branch.
|
|
235
|
+
- **The PR of the epic opens when its last folder is taken apart, and not a task earlier.** A folder
|
|
236
|
+
left in the epic branch reaches the main branch with it: what one branch needed becomes the tree's
|
|
237
|
+
for good. Until then the epic branch is not offered to a person at all — the merge button on it
|
|
238
|
+
means the whole epic.
|
|
218
239
|
- **The epic plan lies where it is found without the network and after the merge.** The card does
|
|
219
240
|
not hold the task order, and the task folder would hold it only until the first merge; the
|
|
220
241
|
directory — in the rule's companion. What the owner names along the way is appended there by the
|
|
@@ -161,6 +161,13 @@ flowchart TD
|
|
|
161
161
|
The guard reads the previous stage number from the branch history and holds a turn where the
|
|
162
162
|
number grew and the command did not run: a session later, marked from memory cannot be told from
|
|
163
163
|
checked.
|
|
164
|
+
- **The end of an epic is a stop, and it is the one lawful waiting for a word.** Every task of the
|
|
165
|
+
epic is merged or handed over, so there is no next task to take: a guard refuses taking one, and
|
|
166
|
+
the two guards that judge the end of a turn let the stop through by the same reading. The turn
|
|
167
|
+
shows the table of the epic's tasks, says what was done on each and what confirms it, and says
|
|
168
|
+
outright that the session waits for orders.
|
|
169
|
+
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
170
|
+
|
|
164
171
|
- **The word about a stop the guard reads from the owner, not from the executor.** Otherwise the
|
|
165
172
|
stop is declared by whoever finds it convenient, and the ban holds until the first inconvenience.
|
|
166
173
|
- **The phrase "waiting for your word" is a stop declared by the executor, and the guard refuses it
|
|
@@ -82,6 +82,7 @@ npx agent-kit sync --check # write nothing, refuse on a divergence
|
|
|
82
82
|
npx agent-kit stats # what was used, what never, what people stumbled on
|
|
83
83
|
npx agent-kit enroll --code <code> # enrol the tree in the intake and put its token
|
|
84
84
|
npx agent-kit propose # send the cargo to the intake: the digest, proposals and analyses
|
|
85
|
+
npx agent-kit fate # the fate of one's own records and the overrides that are due to be lifted
|
|
85
86
|
npx agent-kit adopt [files] # hand the package your own file lying on its path
|
|
86
87
|
```
|
|
87
88
|
|
|
@@ -179,6 +180,20 @@ brings them in a batch, and a remark made in the middle of work is put by the ag
|
|
|
179
180
|
the `/feedback` command. Both write into one file of the day and in one form; neither goes to
|
|
180
181
|
the network — the send carries them away.
|
|
181
182
|
|
|
183
|
+
**The wording of a record is judged by the send, not only by the guard on an edit.** The guard
|
|
184
|
+
stands on a `.md` of the tree, and a record leaves by a command — that is, past it. The send calls
|
|
185
|
+
the wording check laid out in the tree on the text of every record: one with findings does not
|
|
186
|
+
leave and is named by its file, its line and the first finding, while the rest of the batch goes.
|
|
187
|
+
A refused record stays lying on the disk with the mark «отбито» and leaves after the fix. A tree
|
|
188
|
+
that laid out no such check sends as before and says so by a line: silence about it would read as
|
|
189
|
+
a check that found nothing.
|
|
190
|
+
|
|
191
|
+
**The text of a record is written by the role `cargo-writer`, and it writes no files.** The
|
|
192
|
+
record is read by a person who knows neither this task nor this tree, while it is written by a
|
|
193
|
+
session thinking in the words of the rules layer. The role writes into the ready-made shape —
|
|
194
|
+
its own shape gets the block refused by the quote — and hands the text back: putting it on the
|
|
195
|
+
disk belongs to whoever answers for the send.
|
|
196
|
+
|
|
182
197
|
Every record carries four lines: **place** — where the edit goes in the resource, **reason** —
|
|
183
198
|
what went wrong without it, **closest** — the exact quote of the resource line this is closest
|
|
184
199
|
to, and **what it closes** — which overrides of the tree are lifted when the edit arrives as a
|
|
@@ -216,6 +231,14 @@ name, the token they issue as a one-off invitation code — the code enrols the
|
|
|
216
231
|
and puts the token into the file of the key `token`. Before the invitation the send refuses by
|
|
217
232
|
design, not by misconfiguration.
|
|
218
233
|
|
|
234
|
+
**The fate of its own records the tree asks by `agent-kit fate`.** The command reads the intake by
|
|
235
|
+
the token — the same one the cargo goes under — and prints every record with its state, what it was
|
|
236
|
+
fixed by and the version of the release. Under a record stands the override the mark of its section
|
|
237
|
+
ties to it: it is lifted now when the article already lies in the laid-out edition, and it waits for
|
|
238
|
+
an installation when the fix came out and has not reached this tree. A mark the intake gave no
|
|
239
|
+
record for is named apart. The command lifts nothing itself: the mark holds one article, and the
|
|
240
|
+
section may have been written into since.
|
|
241
|
+
|
|
219
242
|
**The tree sign is computed by the sender, not by a person.** It is derived from the repository
|
|
220
243
|
address, and the intake record is created by exactly it: a tree enrolled under its own word the
|
|
221
244
|
intake does not recognise. What would go and under which sign is printed by the dry run.
|
|
@@ -289,24 +312,3 @@ work until the role has had its say. A tree it gets in the way of names it by th
|
|
|
289
312
|
- **It differs from dropping by the `skip` key in that it removes nothing.** A drop does not put
|
|
290
313
|
the role file at all: there is nobody left to call, and the guard next to it stays and keeps
|
|
291
314
|
refusing. Here it is the other way round — the role is in place, the guard is silent.
|
|
292
|
-
|
|
293
|
-
## Layout pitfalls
|
|
294
|
-
|
|
295
|
-
- **The glossary is as much a laid-out resource as a rule.** The startup hook puts it into the
|
|
296
|
-
context in full, before the first reply, and so it looks like an ordinary tree document; it has
|
|
297
|
-
a header, but it reads as a service line. A new word goes into the glossary override, as a
|
|
298
|
-
section of its own.
|
|
299
|
-
|
|
300
|
-
- **A file write by a shell command is checked on all paths named in its body.** The gate takes
|
|
301
|
-
the paths out of the command text and reads the document body in full if the command holds an
|
|
302
|
-
interpreter name; an import line of a laid-out module then demands a second rule, and one is
|
|
303
|
-
demanded at a time — two refusals in a row, and each loses the written body. The edit tool is
|
|
304
|
-
checked by its one path; a shell redirect is for what does not become a tree file.
|
|
305
|
-
- **Your own thing standing next to the laid-out repeats its mechanics silently.** Parsing the
|
|
306
|
-
list of the known, the source roots and the debt snapshot is given by the checks config
|
|
307
|
-
module; a second such parser in your own check is seen by neither the layout audit nor the
|
|
308
|
-
duplicate check. Before starting your own, look at what the checks config module exports.
|
|
309
|
-
- **A rule loaded by a tool may be shown not in full, and the cut is marked by nothing.** A long
|
|
310
|
-
file comes into the context cut at a line, and the cut falls on the tail — where the override
|
|
311
|
-
sections are appended at the end. The shown lines are compared with the file length by one
|
|
312
|
-
command; if they differ, the file is read to the end.
|
package/bin/agent-kit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-kit.d.ts","sourceRoot":"","sources":["../../../projects/agent-kit/src/bin/agent-kit.ts"],"names":[],"mappings":";AAeA,OAAO,EAAqC,iBAAiB,EAAqB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-kit.d.ts","sourceRoot":"","sources":["../../../projects/agent-kit/src/bin/agent-kit.ts"],"names":[],"mappings":";AAeA,OAAO,EAAqC,iBAAiB,EAAqB,MAAM,oBAAoB,CAAC;AA+W7G,wBAAsB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAU9E"}
|
package/bin/agent-kit.js
CHANGED
|
@@ -16,7 +16,8 @@ import { adopt, doctor, init, list, stats, sync } from '../lib/commands.js';
|
|
|
16
16
|
import { CONFIG_PATH, readConfig } from '../lib/config.js';
|
|
17
17
|
import { costLines, costOf, CostUnavailableError } from '../lib/cost.js';
|
|
18
18
|
import { enroll, httpEnroll } from '../lib/enroll.js';
|
|
19
|
-
import { httpShip } from '../lib/ship.js';
|
|
19
|
+
import { httpReadOwn, httpShip } from '../lib/ship.js';
|
|
20
|
+
import { fate } from '../lib/fate.js';
|
|
20
21
|
import { propose, treeSlugOf } from '../lib/shipment.js';
|
|
21
22
|
import { DEFAULT_DAYS } from '../lib/observations.js';
|
|
22
23
|
import { staleBuild } from '../lib/freshness.js';
|
|
@@ -38,6 +39,7 @@ const USAGE = [
|
|
|
38
39
|
' stats --days N за сколько дней; без довода — за три',
|
|
39
40
|
' stats --json то же машиночитаемо — этим сводку прикладывают к предложению',
|
|
40
41
|
' propose отправить груз в приём: сводку со снимком надстроек, предложения и разборы',
|
|
42
|
+
' fate судьба своих записей в приёме и надстройки, которые пора снять',
|
|
41
43
|
' propose --dry-run показать, что уехало бы, и ничего не отправлять',
|
|
42
44
|
' adopt [файлы] отдать пакету файлы, лежащие на его путях не от него',
|
|
43
45
|
' enroll --code <код> завести дерево по приглашению владельца: обмен кода на токен',
|
|
@@ -284,6 +286,10 @@ async function runPropose(env, argv) {
|
|
|
284
286
|
today: new Date().toISOString().slice(0, 10),
|
|
285
287
|
});
|
|
286
288
|
}
|
|
289
|
+
/** Судьба своих записей: чтение приёма по токену дерева и надстройки под ними. */
|
|
290
|
+
function runFate(env) {
|
|
291
|
+
return fate(env, { read: httpReadOwn });
|
|
292
|
+
}
|
|
287
293
|
/** Приписка дерева к приёмнику по коду приглашения. */
|
|
288
294
|
async function runEnroll(env, argv) {
|
|
289
295
|
const config = readConfig(env.root);
|
|
@@ -309,6 +315,7 @@ const COMMANDS = {
|
|
|
309
315
|
cost: runCost,
|
|
310
316
|
stats: runStats,
|
|
311
317
|
propose: runPropose,
|
|
318
|
+
fate: runFate,
|
|
312
319
|
enroll: runEnroll,
|
|
313
320
|
doctor: (env) => doctor(env),
|
|
314
321
|
adopt: (env, argv) => adopt(env, argv.slice(1).filter((value) => !value.startsWith('--') && value !== optionOf(argv, '--root', ''))),
|