@rt-tools/agent-kit 0.24.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/business-analyst.md +51 -50
- package/assets/agents/cargo-writer.md +54 -0
- package/assets/agents/conscience.md +37 -35
- package/assets/agents/project-manager.md +49 -48
- package/assets/agents/prose-editor.md +31 -29
- package/assets/agents/qa-engineer.md +50 -48
- package/assets/agents/rules-reviewer.md +63 -58
- package/assets/agents/skill-curator.md +83 -78
- package/assets/agents/spec-critic.md +34 -29
- package/assets/agents/spec-writer.md +35 -32
- package/assets/agents/strict-teacher.md +39 -37
- package/assets/checks/archive-age.mjs +48 -28
- package/assets/checks/archive-prune.mjs +16 -14
- package/assets/checks/board-epic-link.github.mjs +29 -0
- package/assets/checks/board-epics.github.mjs +286 -49
- package/assets/checks/board-folders.mjs +61 -0
- package/assets/checks/board-gh.github.mjs +35 -26
- package/assets/checks/board-long-work.github.mjs +29 -25
- package/assets/checks/board-paths.github.mjs +21 -16
- package/assets/checks/board-pull-state.github.mjs +168 -0
- package/assets/checks/board-runs.github.mjs +45 -43
- package/assets/checks/board-task-dirs.github.mjs +98 -0
- package/assets/checks/board-titles.github.mjs +19 -17
- package/assets/checks/board.github.mjs +133 -194
- package/assets/checks/check-archive-age.mjs +23 -19
- package/assets/checks/check-board.github.mjs +131 -263
- package/assets/checks/check-descriptions.mjs +30 -29
- package/assets/checks/check-doc-paths.mjs +91 -88
- package/assets/checks/check-dupes.mjs +84 -80
- package/assets/checks/check-file-size.mjs +74 -71
- package/assets/checks/check-glossary.mjs +47 -37
- package/assets/checks/check-hook-scope.mjs +30 -27
- package/assets/checks/check-lib-layers.mjs +22 -21
- package/assets/checks/check-profile-drift.mjs +48 -43
- package/assets/checks/check-prose-style.mjs +138 -39
- package/assets/checks/check-push-gate.mjs +53 -50
- package/assets/checks/check-reuse.mjs +50 -40
- package/assets/checks/check-schema-drift.mjs +104 -84
- package/assets/checks/check-specs.mjs +155 -134
- package/assets/checks/check-state-next.mjs +66 -52
- package/assets/checks/check-states.mjs +32 -30
- package/assets/checks/check-styles.mjs +52 -51
- package/assets/checks/check-turn-map.mjs +54 -46
- package/assets/checks/epic-table.github.mjs +268 -0
- package/assets/checks/lib-boundaries.mjs +32 -30
- package/assets/checks/lib-common.mjs +30 -29
- package/assets/checks/lib-domains.mjs +34 -34
- package/assets/checks/lib-manifests.mjs +17 -15
- package/assets/checks/lib-reexports.mjs +18 -18
- package/assets/checks/rt-kit-checks.config.mjs +187 -142
- package/assets/checks/signals.mjs +43 -39
- package/assets/checks/spec-anchors.mjs +114 -87
- package/assets/checks/spec-common.mjs +128 -84
- package/assets/checks/spec-contract.mjs +30 -30
- package/assets/checks/spec-proposed.mjs +27 -24
- package/assets/checks/spec-scenarios.mjs +51 -28
- package/assets/checks/specs-for.mjs +214 -0
- package/assets/checks/task-new.github.mjs +315 -61
- package/assets/commands/feedback.md +65 -59
- package/assets/commands/next-session.md +64 -57
- package/assets/commands/night.md +115 -0
- package/assets/commands/skill-curator.md +83 -79
- package/assets/defaults/gate-map.sh +108 -97
- package/assets/defaults/project.sh +232 -185
- package/assets/defaults/shell.sh +73 -68
- package/assets/defaults/turn-map.md +47 -44
- package/assets/docs/GLOSSARY.md +142 -65
- package/assets/hooks/browser-device-id.sh +16 -12
- package/assets/hooks/browser-guard-device-id.sh +34 -28
- package/assets/hooks/browser-guard-no-asking.sh +5 -4
- package/assets/hooks/browser-guard-no-listing.sh +12 -11
- package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
- package/assets/hooks/browser-guard-require-select.sh +34 -23
- package/assets/hooks/claim-guard.sh +62 -56
- package/assets/hooks/commit-msg.sh +14 -10
- package/assets/hooks/conscience-guard.sh +91 -45
- package/assets/hooks/constitution-index.sh +16 -16
- package/assets/hooks/deny-tail.sh +28 -26
- package/assets/hooks/dev-server-guard.sh +50 -43
- package/assets/hooks/dispatch.sh +60 -46
- package/assets/hooks/docs-guard.sh +100 -91
- package/assets/hooks/epic-over.sh +49 -0
- package/assets/hooks/epic-stop-guard.sh +108 -0
- package/assets/hooks/exam-guard.sh +105 -93
- package/assets/hooks/git-guard-delivery-conflict.sh +41 -36
- package/assets/hooks/git-guard-delivery-draft.sh +48 -38
- package/assets/hooks/git-guard-delivery-epic.sh +167 -0
- package/assets/hooks/git-guard-delivery-folder.sh +50 -43
- package/assets/hooks/git-guard-delivery-signature.sh +119 -53
- package/assets/hooks/git-guard-delivery.sh +223 -183
- package/assets/hooks/git-guard-main.sh +38 -34
- package/assets/hooks/git-guard-push-tests.sh +99 -87
- package/assets/hooks/glossary-load.sh +23 -22
- package/assets/hooks/grill-gate-ask.sh +12 -11
- package/assets/hooks/grill-gate.sh +94 -87
- package/assets/hooks/guard-note.sh +20 -19
- package/assets/hooks/handoff-entry-guard.sh +45 -25
- package/assets/hooks/handoff-write.sh +74 -67
- package/assets/hooks/hook-input.sh +67 -58
- package/assets/hooks/lint-after-edit.sh +95 -61
- package/assets/hooks/observe.sh +28 -26
- package/assets/hooks/override-write-guard.sh +23 -21
- package/assets/hooks/postmortem-guard.sh +42 -39
- package/assets/hooks/profile-check.sh +22 -20
- package/assets/hooks/proposal-guard.sh +57 -49
- package/assets/hooks/prose-style-guard.sh +49 -24
- package/assets/hooks/qa-dataid-guard.sh +83 -58
- package/assets/hooks/rerun-guard.sh +31 -30
- package/assets/hooks/reuse-first-guard.sh +108 -87
- package/assets/hooks/roles.sh +14 -14
- package/assets/hooks/rule-article.sh +39 -34
- package/assets/hooks/rule-source-guard.sh +47 -42
- package/assets/hooks/skill-gate-layers.sh +63 -57
- package/assets/hooks/skill-gate-rearm.sh +15 -8
- package/assets/hooks/skill-gate.sh +89 -81
- package/assets/hooks/skill-loaded.sh +10 -6
- package/assets/hooks/sql-guard-parse.sh +71 -66
- package/assets/hooks/sql-guard-request.sh +51 -46
- package/assets/hooks/sql-guard-target.sh +60 -51
- package/assets/hooks/sql-guard-write.sh +87 -79
- package/assets/hooks/sql-guard.sh +52 -47
- package/assets/hooks/stand-login-guard.sh +43 -37
- package/assets/hooks/task-context-load.sh +60 -55
- package/assets/hooks/task-flow-context.sh +87 -69
- package/assets/hooks/task-flow-draft-guard.sh +55 -48
- package/assets/hooks/task-flow-guard.sh +67 -64
- package/assets/hooks/turn-entry-load.sh +39 -32
- package/assets/hooks/turn-exit-guard.sh +260 -204
- package/assets/hooks/turn-exit-patterns.sh +63 -0
- package/assets/hooks/utf8.sh +14 -11
- package/assets/hooks/waiting-turn-guard.sh +104 -94
- package/assets/hooks/window-fill-guard.sh +70 -62
- package/assets/hooks/work-start-guard.sh +52 -49
- package/assets/hooks/write-targets.sh +99 -44
- package/assets/laws/autonomous-work.md +29 -27
- package/assets/laws/code-structure.md +31 -30
- package/assets/laws/delivery.md +170 -137
- package/assets/laws/entity-editing.md +52 -50
- package/assets/laws/entity-models.md +14 -13
- package/assets/laws/frontend-application.md +39 -38
- package/assets/laws/lib-imports.md +27 -27
- package/assets/laws/lists.md +31 -29
- package/assets/laws/navigation.md +37 -37
- package/assets/laws/observability.md +41 -40
- package/assets/laws/project-documentation.md +106 -99
- package/assets/laws/reuse-first.md +31 -29
- package/assets/laws/shared-code.md +27 -27
- package/assets/laws/verifiability.md +131 -124
- package/assets/laws/work-conduct.md +250 -244
- package/assets/patterns/admin-lists-screen.md +72 -69
- package/assets/patterns/admin-nav-item.md +51 -46
- package/assets/patterns/angular-patterns-state.md +32 -31
- package/assets/patterns/api-layer-pair.md +33 -31
- package/assets/patterns/autonomous-work-run.md +50 -49
- package/assets/patterns/browser-verification-measure.md +124 -88
- package/assets/patterns/browser-verification-stand.md +169 -157
- package/assets/patterns/component-structure-new.md +51 -42
- package/assets/patterns/dependencies-upgrade.md +55 -39
- package/assets/patterns/doc-style-human.md +55 -37
- package/assets/patterns/doc-style-sweep.md +82 -79
- package/assets/patterns/doc-style-trace.md +87 -81
- package/assets/patterns/doc-style-write.md +130 -122
- package/assets/patterns/entity-aside.md +77 -63
- package/assets/patterns/entity-models-new.md +37 -37
- package/assets/patterns/entity-store.md +33 -33
- package/assets/patterns/git-workflow-commit.azure.md +94 -87
- package/assets/patterns/git-workflow-commit.github.md +160 -142
- package/assets/patterns/git-workflow-commit.gitlab.md +96 -90
- package/assets/patterns/git-workflow-docker.md +165 -147
- package/assets/patterns/git-workflow-freshness.md +45 -45
- package/assets/patterns/git-workflow-merge.md +102 -94
- package/assets/patterns/git-workflow-migration.md +54 -52
- package/assets/patterns/git-workflow-pr-ready.md +57 -56
- package/assets/patterns/git-workflow-pr.azure.md +127 -122
- package/assets/patterns/git-workflow-pr.github.md +186 -177
- package/assets/patterns/git-workflow-pr.gitlab.md +139 -132
- package/assets/patterns/git-workflow-restart.md +35 -31
- package/assets/patterns/git-workflow-secrets.md +80 -73
- package/assets/patterns/git-workflow-stack.md +136 -107
- package/assets/patterns/lib-layers-move.md +62 -53
- package/assets/patterns/lib-layers-new.md +59 -45
- package/assets/patterns/observability-record.md +72 -67
- package/assets/patterns/platform-access-di.md +31 -29
- package/assets/patterns/reuse-first-extend.md +66 -61
- package/assets/patterns/shared-code-new.md +39 -38
- package/assets/patterns/spec-driven-domain.md +161 -151
- package/assets/patterns/spec-driven-rule.md +179 -168
- package/assets/patterns/spec-driven-sweep.md +41 -39
- package/assets/patterns/status-report-table.github.md +48 -36
- package/assets/patterns/styling-bem-component.md +42 -42
- package/assets/patterns/styling-bem-layout.md +39 -34
- package/assets/patterns/styling-bem-sheet.md +59 -58
- package/assets/patterns/task-flow-archive.md +222 -215
- package/assets/patterns/task-flow-close.md +234 -203
- package/assets/patterns/task-flow-handoff.md +154 -145
- package/assets/patterns/task-flow-resume.md +138 -133
- package/assets/patterns/task-flow-start.md +228 -202
- package/assets/patterns/testing-e2e.md +102 -101
- package/assets/patterns/testing-unit.md +77 -70
- package/assets/patterns/ts-procedure.md +32 -29
- package/assets/patterns/turn-entry-map.md +50 -48
- package/assets/pitfalls/agent-kit.md +172 -142
- package/assets/pitfalls/doc-style.md +96 -91
- package/assets/pitfalls/git-workflow.azure.md +49 -46
- package/assets/pitfalls/git-workflow.github.md +270 -234
- package/assets/pitfalls/git-workflow.gitlab.md +49 -45
- package/assets/pitfalls/spec-driven.md +73 -71
- package/assets/pitfalls/styling-bem.md +46 -40
- package/assets/pitfalls/task-flow.md +262 -246
- package/assets/pitfalls/testing.md +99 -92
- package/assets/pitfalls/turn-conduct.md +96 -81
- package/assets/rules/angular-patterns.md +81 -80
- package/assets/rules/api-layer.md +77 -74
- package/assets/rules/autonomous-work.md +87 -74
- package/assets/rules/browser-verification.md +223 -214
- package/assets/rules/component-structure.md +72 -69
- package/assets/rules/dependencies.md +74 -67
- package/assets/rules/deploy-flow.azure.md +118 -108
- package/assets/rules/deploy-flow.github.md +145 -135
- package/assets/rules/deploy-flow.gitlab.md +120 -110
- package/assets/rules/doc-style.md +201 -173
- package/assets/rules/entity-conventions.needs-admin.md +81 -79
- package/assets/rules/entity-models.md +73 -70
- package/assets/rules/git-workflow.azure.md +224 -228
- package/assets/rules/git-workflow.github.md +268 -239
- package/assets/rules/git-workflow.gitlab.md +218 -217
- package/assets/rules/lib-layers.md +85 -86
- package/assets/rules/lists.md +101 -97
- package/assets/rules/navigation.md +78 -78
- package/assets/rules/observability.needs-app.md +165 -153
- package/assets/rules/platform-access.md +76 -75
- package/assets/rules/reuse-first.md +153 -143
- package/assets/rules/shared-code.md +82 -79
- package/assets/rules/spec-driven.md +279 -260
- package/assets/rules/status-report.md +62 -58
- package/assets/rules/styling-bem.md +81 -77
- package/assets/rules/task-flow.md +303 -270
- package/assets/rules/testing.md +224 -209
- package/assets/rules/turn-conduct.md +262 -258
- package/assets/rules/turn-entry.md +92 -87
- package/assets/rules/typescript-conventions.md +94 -88
- package/assets/samples/specs/_template/spec.md +47 -47
- package/assets/samples/tasks/_template/grill.md +20 -20
- package/assets/samples/tasks/_template/plan.md +32 -30
- package/assets/samples/tasks/_template/progress.md +16 -16
- package/assets/skills/agent-kit-extend.md +129 -113
- package/assets/skills/agent-kit.md +259 -233
- package/assets/skills/write-a-skill.md +76 -71
- package/assets/templates/findings.md +19 -19
- package/assets/templates/gate-map.sh +16 -14
- package/assets/templates/implementation.md +28 -27
- package/assets/templates/pattern.md +17 -17
- package/assets/templates/pitfalls.md +6 -6
- package/assets/templates/postmortem.md +24 -23
- package/assets/templates/project.sh +24 -24
- package/assets/templates/proposal.md +62 -60
- package/assets/templates/rule.md +38 -38
- package/assets/workflows/feature.js +46 -46
- package/assets/workflows/plan.js +54 -54
- 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/catalog.d.ts +2 -0
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +4 -3
- package/lib/catalog.js.map +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +5 -2
- package/lib/commands.js.map +1 -1
- package/lib/companion.js +3 -2
- package/lib/companion.js.map +1 -1
- package/lib/enroll.d.ts +7 -1
- package/lib/enroll.d.ts.map +1 -1
- package/lib/enroll.js +12 -3
- package/lib/enroll.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/plan.d.ts +11 -0
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +10 -1
- package/lib/plan.js.map +1 -1
- package/lib/ship.d.ts +29 -9
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +44 -2
- 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 +38 -5
- package/lib/shipment.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +45 -11
- package/lib/sync.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.24.0.tgz +0 -0
|
@@ -1,54 +1,57 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: '
|
|
2
|
+
description: A remark about the rules layer, made in the middle of work, lands as a block in the proposals file
|
|
3
|
+
argument-hint: '<what gets in the way, what was missing, what went wrong>'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Put the user's remark as a block into the proposals file. The remark: `$ARGUMENTS`
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Called **in the middle of work**, not after it: what we stumbled on an hour ago is forgotten by
|
|
9
|
+
the review of the closed task, and the reply itself lives to the end of the session and dies
|
|
10
|
+
with it. The review of a closed task looks at what was loaded and at the progress; replies it
|
|
11
|
+
does not see at all.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
The command sends nothing. It puts a block on disk, and the ordinary send, called separately,
|
|
14
|
+
carries it away. Tell the user this in the last line — otherwise what was put is read as sent,
|
|
15
|
+
and they wait for a reply nobody sent.
|
|
15
16
|
|
|
16
|
-
## 1.
|
|
17
|
+
## 1. Understand what the remark is about
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
The user's remark is prose: "this rule gets in the way", "the gate demands the wrong thing",
|
|
20
|
+
"this is not in the rules at all". Your part is to turn it into three things:
|
|
20
21
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
22
|
+
- **the address** — where the edit goes;
|
|
23
|
+
- **the resource** — what exactly is edited;
|
|
24
|
+
- **the ready-made text** — exactly what to insert.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
The address is one of three, and it is not chosen for convenience:
|
|
26
27
|
|
|
27
|
-
пакет —
|
|
28
|
-
компаньон — implementation.md
|
|
29
|
-
дерево —
|
|
28
|
+
пакет — an edit of a @rt-tools/agent-kit resource; true for any tree and goes outside
|
|
29
|
+
компаньон — implementation.md next to the rule: the names of this tree and the binding of articles
|
|
30
|
+
дерево — an override of this tree; never goes outside
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
`patterns/git-workflow-commit.md
|
|
32
|
+
The resource is named by the package identifier — `rules/styling-bem.md`, `hooks/skill-gate.sh`,
|
|
33
|
+
`patterns/git-workflow-commit.md` — and for the addresses "компаньон" and "дерево" by a path in
|
|
34
|
+
the tree.
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
**An unclear address is asked about, not assigned by guess.** A wrong address sends the edit to a
|
|
37
|
+
foreign repository: what was said about our tree goes to everyone, and what was said about
|
|
38
|
+
everyone stays lying at home. Until the user has answered, nothing is written to the file.
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
No need to ask when the address is visible from the remark itself: it is about a rule you have
|
|
41
|
+
just loaded — that is `пакет`; it is about the names, paths and commands of this tree —
|
|
42
|
+
`компаньон` or `дерево`.
|
|
40
43
|
|
|
41
|
-
## 2.
|
|
44
|
+
## 2. Find today's file
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
The block goes to the same place where the review of a closed task puts it: they have one
|
|
47
|
+
addressee and one format, and a second file next to it would mean that the send reads two
|
|
48
|
+
places, and the user does not remember in which one their remark lies.
|
|
46
49
|
|
|
47
50
|
```bash
|
|
48
51
|
ls .claude/rt-kit/proposals/$(date +%F)-*.md 2>/dev/null
|
|
49
52
|
```
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
Found — append to it. Not found — start one from the template, named by the branch:
|
|
52
55
|
|
|
53
56
|
```bash
|
|
54
57
|
mkdir -p .claude/rt-kit/proposals
|
|
@@ -56,48 +59,51 @@ cp .claude/rt-kit/templates/proposal.md \
|
|
|
56
59
|
".claude/rt-kit/proposals/$(date +%F)-$(git branch --show-current).md"
|
|
57
60
|
```
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
In a fresh file the template header stays, and the unfilled sample block — `rules/<правило>.md`
|
|
63
|
+
with the brackets — is replaced by your block: the send skips such a sample, but it lies there as
|
|
64
|
+
silent litter.
|
|
62
65
|
|
|
63
|
-
## 3.
|
|
66
|
+
## 3. Write the block
|
|
64
67
|
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
The heading form is not decoration: by it the send picks what goes outside. A block without an
|
|
69
|
+
address in the heading goes nowhere and stays lying silently.
|
|
67
70
|
|
|
68
71
|
```markdown
|
|
69
72
|
## <адрес> · <ресурс>
|
|
70
73
|
|
|
71
|
-
- **место:**
|
|
72
|
-
- **повод:**
|
|
73
|
-
- **ближайшее:**
|
|
74
|
+
- **место:** section «<heading>», at the end
|
|
75
|
+
- **повод:** what went wrong in this work without this rule
|
|
76
|
+
- **ближайшее:** «<the exact resource line this is closest to>» — <what it does not cover>
|
|
74
77
|
|
|
75
|
-
>
|
|
76
|
-
>
|
|
78
|
+
> The ready-made text of the edit — exactly what to insert, in the style of the neighbouring
|
|
79
|
+
> rules: in Russian, as a statement, without padding.
|
|
77
80
|
```
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
**The line «ближайшее» is mandatory, and it is the only one the machine checks.** The quote is
|
|
83
|
+
searched for in the resource, and one not found refuses the block: either the resource was not
|
|
84
|
+
read, or the statement has been rewritten since. There is nothing close at all — write exactly
|
|
85
|
+
that: «нет». It exists so that the resource gets read: a review ends with a proposal to add an
|
|
86
|
+
article to the very resource that already described the miss, and a second article about the
|
|
87
|
+
same thing costs more than its absence. A refused block stays lying with a mark and a reason — it
|
|
88
|
+
is visible that the review took place, and visible why it did not become an edit.
|
|
85
89
|
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
The reason is written from the case, not from a wish: "it was inconvenient here" does not become
|
|
91
|
+
a rule. The user's remark is retold by its meaning, not by your conclusions about how it should
|
|
92
|
+
have been.
|
|
88
93
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
**An address of this tree never appears in the block text** — no path, no root name, no name of a
|
|
95
|
+
foreign repository: the file goes to a foreign repository in full. A found address refuses the
|
|
96
|
+
send with the line number, and that is a check, not a reminder. Fix the text, do not bypass it.
|
|
92
97
|
|
|
93
|
-
## 4.
|
|
98
|
+
## 4. Say what came out
|
|
94
99
|
|
|
95
|
-
|
|
100
|
+
In one line: which file the block landed in, how many blocks it holds now and what will carry
|
|
101
|
+
it away.
|
|
96
102
|
|
|
97
103
|
```bash
|
|
98
|
-
npx agent-kit propose --dry-run #
|
|
99
|
-
npx agent-kit propose #
|
|
104
|
+
npx agent-kit propose --dry-run # what would have gone
|
|
105
|
+
npx agent-kit propose # send the cargo to the intake
|
|
100
106
|
```
|
|
101
107
|
|
|
102
|
-
|
|
103
|
-
|
|
108
|
+
The send carries away the blocks with the address «пакет» and marks them sent; the blocks
|
|
109
|
+
«компаньон» and «дерево» stay lying — they are edited by whoever works in this tree.
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: '[
|
|
2
|
+
description: Closing the session — the main branch pulled, merged branches removed, the handover written
|
|
3
|
+
argument-hint: '[empty | <what to add to the handover in your own words>]'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Close the session: bring the tree to the main branch, remove the merged branches and write the
|
|
7
|
+
handover for the next session. The owner's addition to the handover: `$ARGUMENTS`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Called as **the last action of the session** — after the work is committed and the PR is open or
|
|
10
|
+
merged. The command merges nothing, pushes nothing and opens nothing: closing a session is
|
|
11
|
+
cleanup, not delivery.
|
|
12
12
|
|
|
13
|
-
## 1.
|
|
13
|
+
## 1. Read the tree profile
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
The main branch name, the task folders directory and the handover directory differ from tree to
|
|
16
|
+
tree:
|
|
16
17
|
|
|
17
18
|
```bash
|
|
18
19
|
for profile in .claude/rt-kit/defaults/project.sh .claude/rt-kit/project.sh; do
|
|
@@ -22,63 +23,66 @@ printf 'главная: %s · задачи: %s · передача: %s\n' \
|
|
|
22
23
|
"${RT_MAIN_BRANCH:-main}" "${RT_TASKS_DIR:-docs/tasks}" "${RT_HANDOFF_DIR:-.claude/handoff}"
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
Hard-coding these names into the command is not allowed: in the first tree that calls the main
|
|
27
|
+
branch differently, the cleanup goes to the wrong place.
|
|
27
28
|
|
|
28
|
-
## 2.
|
|
29
|
+
## 2. Stop if the tree holds uncommitted changes
|
|
29
30
|
|
|
30
31
|
```bash
|
|
31
32
|
git status --short
|
|
32
33
|
```
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
Non-empty output ends the command. Name the files to the owner and touch neither the branches
|
|
36
|
+
nor main: a branch switch carries the edit along or is refused halfway, and the owner decides
|
|
37
|
+
what to do with it.
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
An untracked file is uncommitted too. Say it in a separate line: it may be left from work that
|
|
40
|
+
was abandoned.
|
|
39
41
|
|
|
40
|
-
## 3.
|
|
42
|
+
## 3. Find out whether the work goes by the rule
|
|
41
43
|
|
|
42
44
|
```bash
|
|
43
45
|
git fetch --prune --quiet
|
|
44
46
|
branch="$(git branch --show-current)"
|
|
45
47
|
```
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
The work goes **by the rule** if the branch name carries the task number — that is
|
|
50
|
+
`rt_task_branch_ok` from the profile — or if the task folders directory holds a folder named after
|
|
51
|
+
the branch. The PR is **merged** when the branch commits are already in the remote main:
|
|
50
52
|
|
|
51
53
|
```bash
|
|
52
54
|
git merge-base --is-ancestor HEAD "origin/${RT_MAIN_BRANCH:-main}" && echo влит || echo 'не влит'
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
## 4.
|
|
57
|
+
## 4. Bring the tree to the main branch
|
|
56
58
|
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
+
- **Work by the rule and the PR is merged** — the task is closed, the branch is no longer
|
|
60
|
+
needed. The local main moves up to the remote one without switching to it:
|
|
59
61
|
|
|
60
62
|
```bash
|
|
61
63
|
git fetch origin "${RT_MAIN_BRANCH:-main}:${RT_MAIN_BRANCH:-main}"
|
|
62
64
|
```
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
`git pull`
|
|
68
|
-
|
|
66
|
+
The working tree is not touched at all, so the step runs even when uncommitted changes lie
|
|
67
|
+
in it — and they lie there by the word of this very command, which a step earlier told not
|
|
68
|
+
to touch them. Switching to main is needed only to work there; the cleanup does not need
|
|
69
|
+
it, and `git pull` on the task branch pulls something other than main and answers
|
|
70
|
+
"no such ref was fetched": by this minute the branch has already been removed from the
|
|
71
|
+
remote by the merge of the PR.
|
|
69
72
|
|
|
70
|
-
-
|
|
73
|
+
- **Everything else** — the work is not over, and the branch stays the place where it goes on:
|
|
71
74
|
|
|
72
75
|
```bash
|
|
73
76
|
git merge "origin/${RT_MAIN_BRANCH:-main}"
|
|
74
77
|
```
|
|
75
78
|
|
|
76
|
-
|
|
77
|
-
|
|
79
|
+
A conflict is resolved now, not at the start of the next session: name it to the owner and
|
|
80
|
+
stop the command until it is decided.
|
|
78
81
|
|
|
79
|
-
## 5.
|
|
82
|
+
## 5. Remove the branches
|
|
80
83
|
|
|
81
|
-
|
|
84
|
+
Only those merged into main are removed: their commits are in it, and there is nothing to
|
|
85
|
+
restore.
|
|
82
86
|
|
|
83
87
|
```bash
|
|
84
88
|
git branch --merged "origin/${RT_MAIN_BRANCH:-main}" \
|
|
@@ -86,12 +90,13 @@ git branch --merged "origin/${RT_MAIN_BRANCH:-main}" \
|
|
|
86
90
|
| xargs -r git branch -d
|
|
87
91
|
```
|
|
88
92
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
Being merged is judged from the remote ref, not from the local main: the local one lags
|
|
94
|
+
silently, and a merged branch counts as unmerged against it. Three branches so appeared to carry
|
|
95
|
+
two commits past main each, while past the remote they had zero — the session would have ended
|
|
96
|
+
with a list of unmerged work that does not exist.
|
|
92
97
|
|
|
93
|
-
|
|
94
|
-
|
|
98
|
+
**Do not delete** an unmerged branch. Name it to the owner together with the number of commits
|
|
99
|
+
missing from main — by them it is visible what exactly is lost if it is deleted:
|
|
95
100
|
|
|
96
101
|
```bash
|
|
97
102
|
for b in $(git branch --no-merged "origin/${RT_MAIN_BRANCH:-main}" --format='%(refname:short)'); do
|
|
@@ -99,35 +104,37 @@ for b in $(git branch --no-merged "origin/${RT_MAIN_BRANCH:-main}" --format='%(r
|
|
|
99
104
|
done
|
|
100
105
|
```
|
|
101
106
|
|
|
102
|
-
|
|
107
|
+
Dead refs to remote branches were removed by `git fetch --prune` in step 3.
|
|
103
108
|
|
|
104
|
-
## 6.
|
|
109
|
+
## 6. Write the handover
|
|
105
110
|
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
What stands in it and in which form — pattern `task-flow-handoff`; here only the place and the
|
|
112
|
+
order. One file per branch, and it lies outside the tree history:
|
|
108
113
|
|
|
109
114
|
```bash
|
|
110
115
|
mkdir -p "${RT_HANDOFF_DIR:-.claude/handoff}"
|
|
111
|
-
#
|
|
116
|
+
# the file — ${RT_HANDOFF_DIR:-.claude/handoff}/<branch>.md
|
|
112
117
|
```
|
|
113
118
|
|
|
114
|
-
|
|
119
|
+
The name is taken from the branch the work went on — not from the one the command switched to in
|
|
120
|
+
step 4.
|
|
115
121
|
|
|
116
|
-
|
|
117
|
-
|
|
122
|
+
To what the pattern demands, this command adds its own: what it removed — the removed branches,
|
|
123
|
+
the state of main, what stayed unmerged. The next session starts exactly from this.
|
|
118
124
|
|
|
119
|
-
|
|
120
|
-
|
|
125
|
+
A session that ended in nothing writes a handover too: "we tried so — it did not work, because"
|
|
126
|
+
is worth more than an empty file. Insert the owner's addition from `$ARGUMENTS` as a section of
|
|
127
|
+
its own, without retelling.
|
|
121
128
|
|
|
122
|
-
## 7.
|
|
129
|
+
## 7. Hand over the result
|
|
123
130
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
The last line — the path to the handover: the owner pastes it into a new session with one paste.
|
|
132
|
+
Before it: what became of the main branch, which branches were removed, which stayed unmerged.
|
|
133
|
+
Do not retell the handover content — the owner will read it anyway.
|
|
127
134
|
|
|
128
|
-
##
|
|
135
|
+
## What the command does not do
|
|
129
136
|
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
|
|
137
|
+
- does not merge the PR and does not push: that is delivery, and it is not done blind;
|
|
138
|
+
- does not delete an unmerged branch and does not touch the task folder;
|
|
139
|
+
- does not commit the handover — it lies outside the tree on purpose, otherwise a second record
|
|
140
|
+
of the same thing is started next to the progress.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: The start of an autonomous session — the time boundary, the checks before the first work, the cycle until morning and the list the owner reads
|
|
3
|
+
argument-hint: '[until when: «до 8 утра» | «часов шесть» | empty — the boundary is asked]'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Start an autonomous session: the owner is leaving, and the work goes on without them until the
|
|
7
|
+
boundary they named. The boundary from the owner: `$ARGUMENTS`
|
|
8
|
+
|
|
9
|
+
The order of the night itself is not written here. It lies in the rule `autonomous-work` and the
|
|
10
|
+
pattern `autonomous-work-run`, and rewriting it into the command would start a second source that
|
|
11
|
+
diverges from the first silently. The command does four things: it takes the boundary, raises the
|
|
12
|
+
rule, checks the tree before the first work and names where the morning list is written.
|
|
13
|
+
|
|
14
|
+
## 1. The boundary of time
|
|
15
|
+
|
|
16
|
+
The law says an autonomous session ends by the owner's word or at a named boundary. A session
|
|
17
|
+
without a boundary is work without an end — that is, work the owner did not ask for.
|
|
18
|
+
|
|
19
|
+
The boundary stands in the arguments — take it as it is written. There is none — ask the owner:
|
|
20
|
+
they are still here at the minute of the call, and by morning there will be nobody to ask. The
|
|
21
|
+
question is one, and the work does not start before the answer.
|
|
22
|
+
|
|
23
|
+
Write the boundary down at once: the session will be long, and the first message goes out of the
|
|
24
|
+
window before the night ends.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
printf 'граница ночи: %s\n' "$ARGUMENTS"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## 2. Raise the rule and the pattern
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Skill: autonomous-work
|
|
34
|
+
Skill: autonomous-work-run
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The companion of the rule is read as a file next to it: the rule says what must be true, the
|
|
38
|
+
companion — what it is called in this tree and what here is held by nothing at all.
|
|
39
|
+
|
|
40
|
+
## 3. Read the tree profile
|
|
41
|
+
|
|
42
|
+
The main branch name, the task folders directory and the handover directory differ from tree to
|
|
43
|
+
tree:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
for profile in .claude/rt-kit/defaults/project.sh .claude/rt-kit/project.sh; do
|
|
47
|
+
[ -f "$profile" ] && . "$profile"
|
|
48
|
+
done
|
|
49
|
+
printf 'главная: %s · задачи: %s · передача: %s\n' \
|
|
50
|
+
"${RT_MAIN_BRANCH:-main}" "${RT_TASKS_DIR:-docs/tasks}" "${RT_HANDOFF_DIR:-.claude/handoff}"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 4. Checks before the first work
|
|
54
|
+
|
|
55
|
+
All four are made before the first task is taken. Each of them by morning costs a whole night: a
|
|
56
|
+
session that runs into them at three o'clock has nobody to ask.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git status --short # uncommitted work
|
|
60
|
+
git fetch origin # the tip of the main branch
|
|
61
|
+
git log --oneline -1 origin/main
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- **The tree holds uncommitted changes.** Name them to the owner and ask what to do with them:
|
|
65
|
+
they are still here. Work that goes on top of somebody else's edit carries it into a foreign
|
|
66
|
+
branch.
|
|
67
|
+
- **Another session is working in this tree.** Ask the list of sessions: two nights in one working
|
|
68
|
+
copy switch branches under each other.
|
|
69
|
+
- **The tip of the main branch has moved.** The first branch of the night is created from a fresh
|
|
70
|
+
base, not from the local ref: the local one is yesterday's snapshot and is silent about it.
|
|
71
|
+
- **The source of the work is named.** An epic plan if there is one, the work queue otherwise. A
|
|
72
|
+
night that takes tasks by their look at the list takes somebody else's first.
|
|
73
|
+
|
|
74
|
+
## 5. Name what will not be done
|
|
75
|
+
|
|
76
|
+
Say it to the owner before they leave, in one line: nothing goes outside during the night — no
|
|
77
|
+
push, no request, no publishing, no cargo mark. Everything visible from outside is undone by a
|
|
78
|
+
person, and there is none until morning.
|
|
79
|
+
|
|
80
|
+
There they also hear which tasks the night will not take: the ones that need their word. Read
|
|
81
|
+
from the source of the work, not guessed on the spot.
|
|
82
|
+
|
|
83
|
+
## 6. The morning list is a file
|
|
84
|
+
|
|
85
|
+
The law demands a trace on disk at every step: a session breaks off without warning — on the
|
|
86
|
+
window, on a refusal, on the network — and what was not written vanishes with it. The last reply
|
|
87
|
+
does not survive such a break.
|
|
88
|
+
|
|
89
|
+
The list lies next to the handover of the session, is created by this command and is appended to
|
|
90
|
+
after each closed piece of work — not assembled at the end:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
printf '# Список к утру · ночь с %s\n\n' "$(date +%d.%m.%Y)" \
|
|
94
|
+
> "${RT_HANDOFF_DIR:-.claude/handoff}/$(date +%Y-%m-%d)-ночь.md"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
A row per closed piece of work, and the row order is the merge order. The shape of the row and
|
|
98
|
+
the line of a postponed task are in the pattern `autonomous-work-run`.
|
|
99
|
+
|
|
100
|
+
## 7. The cycle
|
|
101
|
+
|
|
102
|
+
Then the work goes by the rule and the pattern: a task from the source of the work, the branch
|
|
103
|
+
from the previous one, the task folder, the plan, the stages, the folder taken apart into the
|
|
104
|
+
description of the past. A default is written where the owner's answer would have been written. A
|
|
105
|
+
guard's refusal is a step of the work, not the end of the night.
|
|
106
|
+
|
|
107
|
+
The night ends at the named boundary, and the last reply gives the list — the same one that lies
|
|
108
|
+
in the file.
|
|
109
|
+
|
|
110
|
+
## What this command does not do
|
|
111
|
+
|
|
112
|
+
- It does not merge and does not open requests: they are visible from outside.
|
|
113
|
+
- It does not decide what to work on: the source of the work is the epic plan or the queue.
|
|
114
|
+
- It does not tell night from day. There is no such sign in the tree, and the command adds none:
|
|
115
|
+
it is called by the owner's word and by nothing else.
|