@rt-tools/agent-kit 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agents/cargo-writer.md +54 -0
- package/assets/checks/board-epic-link.github.mjs +29 -0
- package/assets/checks/board-epic-plan.github.mjs +86 -0
- package/assets/checks/board-epics.github.mjs +217 -69
- package/assets/checks/board-long-work.github.mjs +5 -1
- package/assets/checks/board-pull-state.github.mjs +163 -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-glossary.mjs +10 -2
- package/assets/checks/check-lib-layers.mjs +24 -1
- package/assets/checks/check-prose-style.mjs +19 -3
- package/assets/checks/check-reuse.mjs +26 -2
- package/assets/checks/check-schema-drift.mjs +19 -3
- package/assets/checks/check-specs.mjs +8 -1
- package/assets/checks/epic-table.github.mjs +268 -0
- package/assets/checks/lib-boundaries.mjs +2 -2
- package/assets/checks/lib-common.mjs +46 -0
- package/assets/checks/lib-manifests.mjs +18 -13
- package/assets/checks/rt-kit-checks.config.mjs +19 -0
- package/assets/checks/signals.mjs +39 -5
- package/assets/checks/spec-anchors.mjs +48 -4
- package/assets/checks/spec-common.mjs +40 -6
- package/assets/checks/spec-contract.mjs +33 -7
- package/assets/checks/spec-scenarios.mjs +24 -1
- package/assets/checks/specs-for.mjs +214 -0
- package/assets/checks/task-new.github.mjs +237 -6
- package/assets/commands/night.md +115 -0
- package/assets/defaults/gate-map.sh +20 -5
- package/assets/defaults/project.sh +13 -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 +64 -31
- package/assets/hooks/epic-over.sh +49 -0
- package/assets/hooks/epic-stop-guard.sh +108 -0
- package/assets/hooks/exam-guard.sh +10 -10
- package/assets/hooks/git-guard-delivery-conflict.sh +56 -1
- package/assets/hooks/git-guard-delivery-draft.sh +10 -6
- 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-tree.sh +50 -0
- package/assets/hooks/git-guard-delivery.sh +71 -27
- package/assets/hooks/git-guard-discard.sh +144 -0
- package/assets/hooks/git-guard-push-tests.sh +36 -16
- 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/reuse-first-guard.sh +29 -4
- package/assets/hooks/rule-article.sh +3 -0
- package/assets/hooks/rule-source-guard.sh +17 -2
- package/assets/hooks/skill-gate-layers.sh +4 -0
- package/assets/hooks/skill-gate.sh +7 -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 +21 -2
- package/assets/hooks/stand-login-guard.sh +3 -0
- package/assets/hooks/turn-exit-guard.sh +55 -67
- package/assets/hooks/turn-exit-patterns.sh +28 -1
- package/assets/hooks/turn-exit-verdict.sh +84 -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 +37 -7
- package/assets/laws/verifiability.md +22 -4
- 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 +44 -18
- package/assets/patterns/git-workflow-pr.gitlab.md +1 -1
- package/assets/patterns/git-workflow-stack.md +32 -9
- package/assets/patterns/status-report-table.github.md +11 -0
- package/assets/patterns/task-flow-close.md +96 -90
- package/assets/patterns/task-flow-start.md +40 -26
- package/assets/patterns/ts-procedure.md +6 -0
- package/assets/pitfalls/agent-kit.md +19 -0
- package/assets/pitfalls/git-workflow.github.md +44 -0
- package/assets/pitfalls/task-flow.md +25 -23
- package/assets/rules/autonomous-work.md +15 -3
- package/assets/rules/browser-verification.md +8 -0
- package/assets/rules/deploy-flow.github.md +6 -0
- package/assets/rules/doc-style.md +13 -4
- package/assets/rules/git-workflow.azure.md +10 -0
- package/assets/rules/git-workflow.github.md +144 -126
- package/assets/rules/git-workflow.gitlab.md +10 -0
- package/assets/rules/lib-layers.md +11 -0
- package/assets/rules/spec-driven.md +17 -1
- package/assets/rules/status-report.md +7 -0
- package/assets/rules/task-flow.md +78 -54
- package/assets/rules/testing.md +7 -0
- package/assets/rules/turn-conduct.md +30 -3
- package/assets/samples/tasks/_template/plan.md +4 -1
- package/assets/skills/agent-kit.md +40 -25
- package/bin/agent-kit.d.ts.map +1 -1
- package/bin/agent-kit.js +9 -2
- 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/commands.d.ts +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +59 -2
- package/lib/commands.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/hooks-map.d.ts +5 -0
- package/lib/hooks-map.d.ts.map +1 -1
- package/lib/hooks-map.js +9 -3
- package/lib/hooks-map.js.map +1 -1
- 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/plan.d.ts +2 -0
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +8 -0
- package/lib/plan.js.map +1 -1
- package/lib/proposals.d.ts +25 -0
- package/lib/proposals.d.ts.map +1 -1
- package/lib/proposals.js +43 -1
- package/lib/proposals.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 +40 -14
- package/lib/shipment.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.28.0.tgz +0 -0
- package/rt-tools-agent-kit-0.26.0.tgz +0 -0
|
@@ -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
|
-
| `папка-разобрана` | no folder in the branch, a record in the archive | open the PR
|
|
61
|
-
| `работа-отдана` | the PR is open
|
|
62
|
+
| `папка-разобрана` | no folder in the branch, a record in the archive | open the PR: a draft where a run is waited for, ready where the pipeline does not wake | `task-flow-close` |
|
|
63
|
+
| `работа-отдана` | the PR is open into the epic branch, with a reviewer | 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}
|
|
@@ -104,35 +107,37 @@ flowchart TD
|
|
|
104
107
|
I -->|Stages are over| T[The agreement merges into the domain spec, texts are brought up to what was done, then the suite runs]
|
|
105
108
|
T --> N[The task folder is taken apart by the last commit: the grill — to the archive, findings — to the epic plan, the plan — away]
|
|
106
109
|
N --> S[Work queue audit]
|
|
107
|
-
S --> K[The PR opens
|
|
110
|
+
S --> K[The PR opens; the executor names the number, what it waits for and what comes next]
|
|
108
111
|
K --> W[The rules review of the closed work goes to the background, findings land on disk]
|
|
109
112
|
W --> L[While the PR waits for review, the next task is taken]
|
|
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
|
|
116
|
+
M -->|Green and no remarks| O[The draft, if there was one, 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
|
|
117
123
|
- **Editing application code is refused until the work has reached a state in which code is
|
|
118
124
|
edited.** The guard demands three things: a task folder by branch name, a plan in it and a
|
|
119
|
-
declared state. The
|
|
125
|
+
declared state. The agreement has a guard of its own on the same events.
|
|
120
126
|
- **The guard judges the declared transition, not the presence of files.** An empty plan lies the
|
|
121
127
|
same as a written one, so the refusal is lifted by the declared state — `этап-идёт`,
|
|
122
128
|
`этапы-кончились`, `разбор-кончился`. The fourth road is the branch history: a folder taken apart
|
|
123
|
-
|
|
124
|
-
- **A state line moved forward is the same declaration of intent, only machine-readable.**
|
|
125
|
-
|
|
126
|
-
- **A refusal by state names the mandatory action of
|
|
127
|
-
|
|
129
|
+
means handed-in work.
|
|
130
|
+
- **A state line moved forward is the same declaration of intent, only machine-readable.** It is
|
|
131
|
+
declared by the turn in which its mandatory action is begun by deed.
|
|
132
|
+
- **A refusal by state names the mandatory action of that state.** Hearing only "wrong state", the
|
|
133
|
+
executor rewrites the state line instead of the step.
|
|
128
134
|
- **Only a word from the list counts as a state name.** A word of one's own says nothing about the
|
|
129
135
|
entry, the exit or the action.
|
|
130
|
-
- **Two requirements — two guards, and one can be lifted without losing the other.**
|
|
131
|
-
|
|
132
|
-
code-editing state.
|
|
136
|
+
- **Two requirements — two guards, and one can be lifted without losing the other.** A line about
|
|
137
|
+
unchanged behaviour lifts the agreement, not the requirement to reach the code-editing state.
|
|
133
138
|
- **A merged agreement does not lock the branch.** After the merge the "proposed" directory is gone
|
|
134
|
-
from disk
|
|
135
|
-
|
|
139
|
+
from disk while the plan refers to it to the end: the guard tells merged from never-created by the
|
|
140
|
+
branch history.
|
|
136
141
|
- **The agreement is required by the edit paths, not by an appraisal of the task.** `apps/**` and
|
|
137
142
|
`libs/**` are the sign; rules, texts, tooling and dependencies fall outside it. The bypass is the
|
|
138
143
|
line `**Behaviour:** unchanged — <the reason of the owner>` in the plan; an empty reason is not
|
|
@@ -152,31 +157,33 @@ flowchart TD
|
|
|
152
157
|
- **An instruction to work by the progress covers all its steps, including those that change
|
|
153
158
|
history.** Questions are asked about what the progress lacks.
|
|
154
159
|
- **A question written by a past session does not become a question to the owner.** It is addressed
|
|
155
|
-
to the handover's author, and some
|
|
160
|
+
to the handover's author, and some are closed by a work step.
|
|
156
161
|
- **The owner's instruction holds until they cancel it, and a new fact against it is a line in the
|
|
157
162
|
reply about the cost, not a new question.** Re-asked is what the instruction does not cover. A
|
|
158
163
|
menu where two options of three offer to cancel the owner's decision is that very cancellation.
|
|
159
164
|
- **An answer in the owner's message counts the same as an answer in a document.** A question
|
|
160
|
-
already answered in the conversation is not asked
|
|
165
|
+
already answered in the conversation is not asked again.
|
|
161
166
|
- **The owner's word about the design is a task setting, not a decision.** What they named is
|
|
162
167
|
usually already in the tree under that word — a name on a screen, a spec section, a model field —
|
|
163
168
|
and is checked against them before the edit. Diverged — the owner is asked.
|
|
164
169
|
- **A task folder is created for any work, no exceptions.** An exception with even one lawful form
|
|
165
|
-
is executed as permission. It
|
|
170
|
+
is executed as permission. It goes in before the first edit.
|
|
166
171
|
- **The task folder goes into the branch by a commit, not lives in one working tree.** Uncommitted,
|
|
167
172
|
it passes edits without refusal, and the refusal comes at the end, when the plan is already gone.
|
|
168
173
|
Outside history one draft without a number is lawful.
|
|
169
174
|
- **The task folder is taken apart by the last commit before the PR opens, not after approval.** A
|
|
170
175
|
person merges as soon as they see green, and no room is left for a closing commit.
|
|
171
176
|
- **After opening the PR, the executor tells the owner the number, what it waits for and what comes
|
|
172
|
-
next.**
|
|
173
|
-
nothing about the locked merge button.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
next.** A draft waits for the run, and next it is lifted: a green run says nothing is broken and
|
|
178
|
+
nothing about the locked merge button. A PR opened ready waits for the owner's hand, and that is
|
|
179
|
+
said in the same words.
|
|
180
|
+
- **A request to merge never comes before the work is checked.** Where the pipeline wakes for this
|
|
181
|
+
base: folder taken apart and pushed → PR as a draft → run green → draft lifted → the request to
|
|
182
|
+
merge, naming the number. Where it does not wake, the green push gate is the check, and opening
|
|
183
|
+
the PR and asking to merge are one turn.
|
|
184
|
+
- **A PR that waits for a run opens as a draft, and one that waits for nothing opens ready.** Before
|
|
185
|
+
it opens the owner sees no edits, and an open PR reads as an invitation to merge. Which of the two
|
|
186
|
+
applies is decided by the bases the pipeline wakes for, and that is read from its file.
|
|
180
187
|
- **The plan guard is the lower bound of the requirement, not its limit.** It demands a folder only
|
|
181
188
|
for an edit of application code; the article above — for any work.
|
|
182
189
|
- **An instruction to work by a rule is an instruction to do its steps, including those that change
|
|
@@ -184,13 +191,22 @@ flowchart TD
|
|
|
184
191
|
- **A taken task does not end a turn.** Creating the task, the branch, the column and the folder is
|
|
185
192
|
preparation: the work moves to the written-plan state, where the action is different. The
|
|
186
193
|
turn-exit guard names the first stage in its refusal.
|
|
194
|
+
- **The stages of a plan cover its done-sign whole.** A sign written wider than the sum of the
|
|
195
|
+
stages means a part of the order is given to no step at all: every stage closes, the run is
|
|
196
|
+
green, and half the order is not done. Either the stages are written up to the sign, or the sign
|
|
197
|
+
is narrowed to what the stages give.
|
|
198
|
+
- **A stage's readiness sign is taken from the output of a command run while the plan is written.**
|
|
199
|
+
Written by a guess, it is checked at the stage itself — latest of everything that depended on it.
|
|
200
|
+
Some lines come not from the work but from an unconfigured tree, and no stage puts them out.
|
|
201
|
+
- **A plan for work that ports a technique from outside is written by a measurement of one's own
|
|
202
|
+
code.** Reading the sample says how the sample is built; what of it is needed here is said by a
|
|
203
|
+
count over one's own files.
|
|
187
204
|
- **Waiting for one part of a stage is never a stop of the stage.** The parts independent of what is
|
|
188
205
|
awaited are done in the same turn; the owner is told what is done and what is left for their step.
|
|
189
206
|
A refused command reads the same: everything else is done first.
|
|
190
207
|
- **A finding made mid-stage is checked against the plan's exit conditions before the first edit.**
|
|
191
|
-
Nearness of subject proves no belonging
|
|
192
|
-
|
|
193
|
-
does not do, and is filed as a task.
|
|
208
|
+
Nearness of subject proves no belonging. A finding named by no exit condition goes to the section
|
|
209
|
+
on what the work does not do, and is filed as a task.
|
|
194
210
|
- **Done work is marked only in the progress.** "Where we stand" is rewritten by every session, not
|
|
195
211
|
appended: it is the first thing the next session reads.
|
|
196
212
|
- **A word for a new notion is looked up in the tree's glossary.** The package carries the common
|
|
@@ -203,38 +219,46 @@ flowchart TD
|
|
|
203
219
|
- **Work ordered in words becomes a task in the queue in the same turn.** Even if it will not be
|
|
204
220
|
done now. A draft folder is not the queue: it has no number, and one session knows of it.
|
|
205
221
|
Postponed work names a date; postponed silently, it reads as done.
|
|
206
|
-
- **
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
- **
|
|
210
|
-
|
|
222
|
+
- **Work begins with the epic, and a task outside one is not taken.** The epic names what the whole
|
|
223
|
+
is, and the main branch takes that whole or does not take it. Work outside an epic exists only by
|
|
224
|
+
the owner's word about that work, said about that work.
|
|
225
|
+
- **The epic branch is taken before the first task of the epic, not with it.** Taken later, it
|
|
226
|
+
leaves the first task standing on the main branch, and the epic starts as half of itself already
|
|
227
|
+
merged.
|
|
228
|
+
- **The next task is taken from the epic plan, and the queue list is asked only where there is no
|
|
229
|
+
epic.** By a list of numbers someone else's epic cannot be told from one's own.
|
|
230
|
+
- **An epic is not closed by a sign confirmed by reading alone.** What is checkable by eye is
|
|
231
|
+
called checked only with a command and its output.
|
|
211
232
|
- **The tasks of an epic are created all at once, by the same turn as the epic itself.** Creating
|
|
212
|
-
them one at a time hides the volume.
|
|
233
|
+
them one at a time hides the volume.
|
|
234
|
+
- **A task of an epic is linked to the epic card as a sub-issue, not only named in the plan.** The
|
|
235
|
+
board reads no text: without the link a task of an epic looks exactly like a task outside one.
|
|
236
|
+
Closed tasks are linked too — the share of what is done counts them.
|
|
213
237
|
|
|
214
238
|
- **The epic plan names how the branches of its tasks stand, on a par with their order.** Two
|
|
215
|
-
arrangements: each branch from
|
|
216
|
-
|
|
217
|
-
|
|
239
|
+
arrangements: each branch from the epic branch, or a stack — each from the previous. The
|
|
240
|
+
arrangement written in the plan is the epic's decision, not that of whoever creates the branch.
|
|
241
|
+
- **The PR of the epic opens when its last folder is taken apart, and not a task earlier.** A folder
|
|
242
|
+
left in the epic branch reaches the main branch with it: what one branch needed becomes the tree's
|
|
243
|
+
for good. Until then the epic branch is not offered to a person at all — the merge button on it
|
|
244
|
+
means the whole epic.
|
|
218
245
|
- **The epic plan lies where it is found without the network and after the merge.** The card does
|
|
219
246
|
not hold the task order, and the task folder would hold it only until the first merge; the
|
|
220
247
|
directory — in the rule's companion. What the owner names along the way is appended there by the
|
|
221
248
|
turn that accepted it.
|
|
222
|
-
- **Building by a sample begins with reading the sample itself
|
|
223
|
-
|
|
224
|
-
the directories.
|
|
249
|
+
- **Building by a sample begins with reading the sample itself.** The repeated part is opened whole,
|
|
250
|
+
by walking the directories.
|
|
225
251
|
- **What acts on the tree, not on the edit, lies outside the index.** The path to the sample and the
|
|
226
252
|
permission to work outside the epic do not belong to the branch and live next to the handover. A
|
|
227
253
|
number in the permitted list repeats the owner's word, not replaces it.
|
|
228
|
-
- **Closed work is reviewed by the rules
|
|
229
|
-
|
|
230
|
-
with an edit of the rules layer or a proposal outward.
|
|
254
|
+
- **Closed work is reviewed by the rules as a closing step, not as a separate request.** What was
|
|
255
|
+
loaded and what was missing is seen only by the session that led the work.
|
|
231
256
|
- **The review of closed work goes to the background, and the executor takes the next task.** The
|
|
232
257
|
role works in a turn of its own; the digest is gathered before the launch, the findings are
|
|
233
258
|
accepted in one turn.
|
|
234
259
|
- **The review's findings wait for the owner, and only the digest of observations leaves for the
|
|
235
|
-
package.** A proposal
|
|
236
|
-
|
|
237
|
-
never an opinion.
|
|
260
|
+
package.** A proposal sent unreviewed becomes the work of someone who did not order it. The digest
|
|
261
|
+
is always sent: it says what was used and is never an opinion.
|
|
238
262
|
- **The cheap closing step goes before the costly one, and the run — after the merge.** Merging the
|
|
239
263
|
agreement and bringing the texts up to date cost minutes, the run costs the session window; a run
|
|
240
264
|
before the merge checks what will not reach main.
|
|
@@ -246,8 +270,8 @@ flowchart TD
|
|
|
246
270
|
- **Opening the PR and lifting the draft are refused while the branch carries its task folder.** A
|
|
247
271
|
person presses merge on the host, where there are no guards: a lifted draft reads to them as an
|
|
248
272
|
invitation. The branch content is judged, not the working tree.
|
|
249
|
-
- **A branch that removed the folder
|
|
250
|
-
|
|
273
|
+
- **A branch that removed the folder adds a record to the archive.** Removing is cheaper than taking
|
|
274
|
+
apart, and the grill leaves first — the only record of the owner's words.
|
|
251
275
|
- **The bypass is the line `Task-folder-skip: <reason>` in the PR or in the command itself.** An
|
|
252
276
|
empty reason is no bypass, and the bypass lifts the refusal but does not silence the work queue
|
|
253
277
|
audit line.
|
package/assets/rules/testing.md
CHANGED
|
@@ -181,6 +181,13 @@ flowchart TD
|
|
|
181
181
|
apart by the run's colour. So a negative assertion goes paired with a positive one: first it is
|
|
182
182
|
checked that the place sought is found at all, and only then that it lacks what must not be
|
|
183
183
|
there.
|
|
184
|
+
- **A count taken over a run's output says nothing until the run is known to have reached the step
|
|
185
|
+
counted.** A build, an install and a suite refuse at preparation steps of their own —
|
|
186
|
+
configuration parsing, dependency resolution, path resolution — and such a refusal carries the
|
|
187
|
+
same exit code as a failure of the work itself. A pattern search for the failure's own marks comes
|
|
188
|
+
back empty there, and the emptiness reads as success of everything behind it. So the count goes
|
|
189
|
+
paired with a positive check, the same way a negative assertion does: first the output is read for
|
|
190
|
+
the sign that the counted step ran at all, and only then the marks in it are counted.
|
|
184
191
|
- **A test title promises more than the body checks, and the audit does not see it.** The
|
|
185
192
|
scenario number stands in the title — the scenario counts as covered, and nobody asks what
|
|
186
193
|
exactly is asserted. The body is read together with the title: the promise in the title and the
|
|
@@ -27,9 +27,17 @@ demand, not with the rule.
|
|
|
27
27
|
|
|
28
28
|
## Turn exits
|
|
29
29
|
|
|
30
|
-
A turn ends in four ways and no others: a question to the owner the rules do not answer
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
A turn ends in four ways and no others: a question to the owner the rules do not answer **and no
|
|
31
|
+
task in the work queue that can be taken without waiting for the answer**; a guard's refusal; a
|
|
32
|
+
filled window where there is no compaction; work handed in, with the next begun. What confirms
|
|
33
|
+
each, the turn map lists where the tree laid it out.
|
|
34
|
+
|
|
35
|
+
The queue is asked by a command in the same turn, and its output stands in the turn itself: "there
|
|
36
|
+
are no tasks" is a statement about the tree, and the executor's memory does not confirm it. A turn
|
|
37
|
+
where the owner's answer holds one piece of work while an independent one lies next to it ends
|
|
38
|
+
with the work taken, and the question goes in a line beside it. The price is measured not in turns
|
|
39
|
+
but in days: a session stood a night and a morning naming the owner one and the same step while
|
|
40
|
+
three independent tasks lay untaken.
|
|
33
41
|
|
|
34
42
|
Everything else is the turn going on, not its end. A milestone does not end a turn: not a commit,
|
|
35
43
|
not a read agreement, not the boundary "read — now editing", not a green check.
|
|
@@ -75,6 +83,18 @@ flowchart TD
|
|
|
75
83
|
|
|
76
84
|
## How the law applies here
|
|
77
85
|
|
|
86
|
+
- **A promise to do the work in the next turn is an announcement of intent.** It differs from a
|
|
87
|
+
command named and not run only in that it sounds politer and is therefore recognised as
|
|
88
|
+
a stop less often. An offer to the owner to object to the announced intent is part of the
|
|
89
|
+
promise, not a question: a turn ends with a question when the work does not go without the
|
|
90
|
+
answer, and here it went.
|
|
91
|
+
- **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
|
|
92
|
+
not add up does not end: it goes on with the next item of the order. How many items the order
|
|
93
|
+
holds is written nowhere in the tree — only whoever read the order knows it.
|
|
94
|
+
- **The owner's word to work without stops holds until they cancel it themselves.** A turn ending
|
|
95
|
+
with waiting for that same word invents the cancellation. A new fact against the instruction is a
|
|
96
|
+
line about the price in the reply, not waiting; a decision the tree does not hold is asked as a
|
|
97
|
+
question by the tool.
|
|
78
98
|
- **A summary of someone else's step.** A run, the owner's review and a merge go on without the
|
|
79
99
|
executor and are not sped up by watching. Such a summary the owner reads as work: full, with
|
|
80
100
|
numbers and states, the emptiness behind it unseen. Someone else's step is named with one's own
|
|
@@ -161,6 +181,13 @@ flowchart TD
|
|
|
161
181
|
The guard reads the previous stage number from the branch history and holds a turn where the
|
|
162
182
|
number grew and the command did not run: a session later, marked from memory cannot be told from
|
|
163
183
|
checked.
|
|
184
|
+
- **The end of an epic is a stop, and it is the one lawful waiting for a word.** Every task of the
|
|
185
|
+
epic is merged or handed over, so there is no next task to take: a guard refuses taking one, and
|
|
186
|
+
the two guards that judge the end of a turn let the stop through by the same reading. The turn
|
|
187
|
+
shows the table of the epic's tasks, says what was done on each and what confirms it, and says
|
|
188
|
+
outright that the session waits for orders.
|
|
189
|
+
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
190
|
+
|
|
164
191
|
- **The word about a stop the guard reads from the owner, not from the executor.** Otherwise the
|
|
165
192
|
stop is declared by whoever finds it convenient, and the ban holds until the first inconvenience.
|
|
166
193
|
- **The phrase "waiting for your word" is a stop declared by the executor, and the guard refuses it
|
|
@@ -40,7 +40,10 @@ what is named here is read twice — before the work and after it.>
|
|
|
40
40
|
|
|
41
41
|
The command is written in backticks: the turn exit guard reads it and does not let out a turn in
|
|
42
42
|
which the stage is declared closed and the command was not run. An acceptance written in prose
|
|
43
|
-
cannot be confirmed by anything.
|
|
43
|
+
cannot be confirmed by anything. The command is run right here, while the plan is written, not at
|
|
44
|
+
the end of the stage: its output is what names the readiness sign. A sign written by a guess is
|
|
45
|
+
sometimes impossible to meet — the line the stage must put out comes from an unconfigured tree
|
|
46
|
+
rather than from the work — and that is found out latest of everything that depended on it.
|
|
44
47
|
|
|
45
48
|
## What this work does not do
|
|
46
49
|
|
|
@@ -49,6 +49,10 @@ layout is worse than a whole one. Either the override here or the resource itsel
|
|
|
49
49
|
and that is the work of the tree where the package lives as sources; nothing is said about it
|
|
50
50
|
here.
|
|
51
51
|
|
|
52
|
+
**A file whose body matches the package is never a refusal.** The header alone diverged from the
|
|
53
|
+
body — the layout puts it again and says the header went stale. The word "edited by hand" stays
|
|
54
|
+
for a file whose body differs, and it sends the reader looking for an edit that is there.
|
|
55
|
+
|
|
52
56
|
**A layout is an edit of the tree, not a service call:** it rewrites hundreds of tracked files at
|
|
53
57
|
once, so the work is set up before `sync`, by the same rules as any other.
|
|
54
58
|
|
|
@@ -58,9 +62,14 @@ push gate: an edition bumped without a layout turns the main branch red and lock
|
|
|
58
62
|
**The layout puts the hook declaration together with the hook itself.** A hook is called by an
|
|
59
63
|
entry in the agent settings, and one laid out without it is indistinguishable from the outside
|
|
60
64
|
from a working one. The layout appends an entry for every event missing from the settings and
|
|
61
|
-
reports it. The edit only adds: entries are neither rewritten nor removed,
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
reports it. The edit only adds: entries are neither rewritten nor removed, and settings that
|
|
66
|
+
cannot be parsed as JSON the package does not touch — it prints a ready-made piece to enter by
|
|
67
|
+
hand.
|
|
68
|
+
|
|
69
|
+
**An entry is written only for the dispatcher that lies on disk.** A tree that did not take it
|
|
70
|
+
used to get settings calling a file that is not there — and such settings look working from the
|
|
71
|
+
outside. The layout holds no list of what the tree removed, so a hand-removed entry comes back on
|
|
72
|
+
the next layout: it is removed together with the dispatcher, not on its own.
|
|
64
73
|
|
|
65
74
|
**This is held by the edit-location guard, not by memory.** It refuses an edit of a file with the
|
|
66
75
|
layout header at the minute of the edit and names the address: the source, if the tree holds
|
|
@@ -77,11 +86,13 @@ the size of what would be wiped. Appending at the end and editing in place pass.
|
|
|
77
86
|
|
|
78
87
|
```bash
|
|
79
88
|
npx agent-kit doctor # what is laid out, what lags, what lies from a dropped resource
|
|
89
|
+
npx agent-kit doctor --since <path> # the same, plus what a new edition added into a replaced section
|
|
80
90
|
npx agent-kit sync # lay out
|
|
81
91
|
npx agent-kit sync --check # write nothing, refuse on a divergence
|
|
82
92
|
npx agent-kit stats # what was used, what never, what people stumbled on
|
|
83
93
|
npx agent-kit enroll --code <code> # enrol the tree in the intake and put its token
|
|
84
94
|
npx agent-kit propose # send the cargo to the intake: the digest, proposals and analyses
|
|
95
|
+
npx agent-kit fate # the fate of one's own records and the overrides that are due to be lifted
|
|
85
96
|
npx agent-kit adopt [files] # hand the package your own file lying on its path
|
|
86
97
|
```
|
|
87
98
|
|
|
@@ -121,7 +132,10 @@ So the bump takes three steps, and the first goes before the installation.
|
|
|
121
132
|
"resource · heading". Each is read in the snapshot and in the new edition: what the package
|
|
122
133
|
added is added to the override by hand.
|
|
123
134
|
|
|
124
|
-
|
|
135
|
+
The snapshot is given to the state review as an argument — `agent-kit doctor --since <path to the
|
|
136
|
+
snapshot>` — and it names the articles the new edition added inside a replaced section: the
|
|
137
|
+
resource, the heading and the opening of the article. Without the argument the review is as
|
|
138
|
+
before.
|
|
125
139
|
|
|
126
140
|
For every named section the articles are compared, not the headings: the heading is exactly
|
|
127
141
|
what matched, that is what replaced the section. A ready-made pair of commands is in the cold
|
|
@@ -179,6 +193,20 @@ brings them in a batch, and a remark made in the middle of work is put by the ag
|
|
|
179
193
|
the `/feedback` command. Both write into one file of the day and in one form; neither goes to
|
|
180
194
|
the network — the send carries them away.
|
|
181
195
|
|
|
196
|
+
**The wording of a record is judged by the send, not only by the guard on an edit.** The guard
|
|
197
|
+
stands on a `.md` of the tree, and a record leaves by a command — that is, past it. The send calls
|
|
198
|
+
the wording check laid out in the tree on the text of every record: one with findings does not
|
|
199
|
+
leave and is named by its file, its line and the first finding, while the rest of the batch goes.
|
|
200
|
+
A refused record stays lying on the disk with the mark «отбито» and leaves after the fix. A tree
|
|
201
|
+
that laid out no such check sends as before and says so by a line: silence about it would read as
|
|
202
|
+
a check that found nothing.
|
|
203
|
+
|
|
204
|
+
**The text of a record is written by the role `cargo-writer`, and it writes no files.** The
|
|
205
|
+
record is read by a person who knows neither this task nor this tree, while it is written by a
|
|
206
|
+
session thinking in the words of the rules layer. The role writes into the ready-made shape —
|
|
207
|
+
its own shape gets the block refused by the quote — and hands the text back: putting it on the
|
|
208
|
+
disk belongs to whoever answers for the send.
|
|
209
|
+
|
|
182
210
|
Every record carries four lines: **place** — where the edit goes in the resource, **reason** —
|
|
183
211
|
what went wrong without it, **closest** — the exact quote of the resource line this is closest
|
|
184
212
|
to, and **what it closes** — which overrides of the tree are lifted when the edit arrives as a
|
|
@@ -216,6 +244,14 @@ name, the token they issue as a one-off invitation code — the code enrols the
|
|
|
216
244
|
and puts the token into the file of the key `token`. Before the invitation the send refuses by
|
|
217
245
|
design, not by misconfiguration.
|
|
218
246
|
|
|
247
|
+
**The fate of its own records the tree asks by `agent-kit fate`.** The command reads the intake by
|
|
248
|
+
the token — the same one the cargo goes under — and prints every record with its state, what it was
|
|
249
|
+
fixed by and the version of the release. Under a record stands the override the mark of its section
|
|
250
|
+
ties to it: it is lifted now when the article already lies in the laid-out edition, and it waits for
|
|
251
|
+
an installation when the fix came out and has not reached this tree. A mark the intake gave no
|
|
252
|
+
record for is named apart. The command lifts nothing itself: the mark holds one article, and the
|
|
253
|
+
section may have been written into since.
|
|
254
|
+
|
|
219
255
|
**The tree sign is computed by the sender, not by a person.** It is derived from the repository
|
|
220
256
|
address, and the intake record is created by exactly it: a tree enrolled under its own word the
|
|
221
257
|
intake does not recognise. What would go and under which sign is printed by the dry run.
|
|
@@ -289,24 +325,3 @@ work until the role has had its say. A tree it gets in the way of names it by th
|
|
|
289
325
|
- **It differs from dropping by the `skip` key in that it removes nothing.** A drop does not put
|
|
290
326
|
the role file at all: there is nobody left to call, and the guard next to it stays and keeps
|
|
291
327
|
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,8 +315,9 @@ const COMMANDS = {
|
|
|
309
315
|
cost: runCost,
|
|
310
316
|
stats: runStats,
|
|
311
317
|
propose: runPropose,
|
|
318
|
+
fate: runFate,
|
|
312
319
|
enroll: runEnroll,
|
|
313
|
-
doctor: (env) => doctor(env),
|
|
320
|
+
doctor: (env, argv) => doctor(env, optionOf(argv, '--since', '')),
|
|
314
321
|
adopt: (env, argv) => adopt(env, argv.slice(1).filter((value) => !value.startsWith('--') && value !== optionOf(argv, '--root', ''))),
|
|
315
322
|
};
|
|
316
323
|
export async function main(argv) {
|