@rt-tools/agent-kit 0.24.0 → 0.26.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/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-epics.github.mjs +75 -41
- 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 +24 -24
- package/assets/checks/board-paths.github.mjs +21 -16
- package/assets/checks/board-runs.github.mjs +45 -43
- package/assets/checks/board-titles.github.mjs +19 -17
- package/assets/checks/board.github.mjs +149 -127
- package/assets/checks/check-archive-age.mjs +23 -19
- package/assets/checks/check-board.github.mjs +172 -164
- 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 +120 -37
- package/assets/checks/check-push-gate.mjs +53 -50
- package/assets/checks/check-reuse.mjs +50 -40
- package/assets/checks/check-schema-drift.mjs +87 -83
- 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/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 +174 -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/task-new.github.mjs +85 -56
- package/assets/commands/feedback.md +65 -59
- package/assets/commands/next-session.md +64 -57
- package/assets/commands/skill-curator.md +83 -79
- package/assets/defaults/gate-map.sh +108 -97
- package/assets/defaults/project.sh +225 -185
- package/assets/defaults/shell.sh +73 -68
- package/assets/defaults/turn-map.md +45 -44
- package/assets/docs/GLOSSARY.md +142 -65
- package/assets/hooks/browser-device-id.sh +12 -12
- package/assets/hooks/browser-guard-device-id.sh +30 -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 +11 -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 +46 -43
- package/assets/hooks/dispatch.sh +60 -46
- package/assets/hooks/docs-guard.sh +100 -91
- package/assets/hooks/exam-guard.sh +105 -93
- package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
- package/assets/hooks/git-guard-delivery-draft.sh +45 -38
- package/assets/hooks/git-guard-delivery-folder.sh +50 -43
- package/assets/hooks/git-guard-delivery-signature.sh +88 -52
- package/assets/hooks/git-guard-delivery.sh +196 -180
- 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 +26 -24
- 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 +19 -17
- package/assets/hooks/qa-dataid-guard.sh +52 -49
- 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 +36 -34
- package/assets/hooks/rule-source-guard.sh +47 -42
- package/assets/hooks/skill-gate-layers.sh +59 -57
- package/assets/hooks/skill-gate-rearm.sh +15 -8
- package/assets/hooks/skill-gate.sh +89 -81
- package/assets/hooks/skill-loaded.sh +6 -6
- package/assets/hooks/sql-guard-parse.sh +68 -66
- package/assets/hooks/sql-guard-request.sh +48 -46
- package/assets/hooks/sql-guard-target.sh +57 -51
- package/assets/hooks/sql-guard-write.sh +84 -79
- package/assets/hooks/sql-guard.sh +52 -47
- package/assets/hooks/stand-login-guard.sh +40 -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 +256 -204
- package/assets/hooks/turn-exit-patterns.sh +53 -0
- package/assets/hooks/utf8.sh +11 -11
- package/assets/hooks/waiting-turn-guard.sh +94 -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 +96 -44
- package/assets/laws/autonomous-work.md +29 -27
- package/assets/laws/code-structure.md +31 -30
- package/assets/laws/delivery.md +148 -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 +93 -86
- package/assets/patterns/git-workflow-commit.github.md +152 -141
- package/assets/patterns/git-workflow-commit.gitlab.md +95 -89
- 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 +98 -93
- 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 +126 -121
- package/assets/patterns/git-workflow-pr.github.md +179 -175
- package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
- 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 +131 -106
- 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 +37 -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 +215 -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 +204 -192
- 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 +152 -141
- package/assets/pitfalls/doc-style.md +96 -91
- package/assets/pitfalls/git-workflow.azure.md +49 -46
- package/assets/pitfalls/git-workflow.github.md +264 -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 +75 -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 +198 -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 +250 -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 +272 -260
- package/assets/rules/status-report.md +55 -58
- package/assets/rules/styling-bem.md +81 -77
- package/assets/rules/task-flow.md +282 -270
- package/assets/rules/testing.md +224 -209
- package/assets/rules/turn-conduct.md +255 -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 +235 -211
- 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/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/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 +0 -7
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +10 -2
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.js +6 -2
- 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.26.0.tgz +0 -0
- package/rt-tools-agent-kit-0.24.0.tgz +0 -0
|
@@ -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.
|
|
@@ -1,121 +1,125 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
argument-hint: '[
|
|
2
|
+
description: Review of a closed task through the eyes of the tree's rules — what was loaded, what helped, what was missing
|
|
3
|
+
argument-hint: '[empty | <what to look at first>]'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Launch the `skill-curator` agent on the review of the task just closed. The user's emphasis:
|
|
7
7
|
`$ARGUMENTS`
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Called **right after the PR is opened** — in the same turn in which the work is handed in for
|
|
10
|
+
review. The agent edits nothing: it brings ready-made wording, and the decision to insert it is
|
|
11
|
+
made by the user.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
**The launch is in the background, and the turn does not end on it.** While the agent works, the
|
|
14
|
+
next task is taken: it asks nothing and goes no faster for being waited on. Steps 1 and 2 are
|
|
15
|
+
done before the launch — while the task is still in mind; steps 4–6 receive the returned reply in
|
|
16
|
+
one turn and bring the executor back to the previous work.
|
|
17
17
|
|
|
18
|
-
## 1.
|
|
18
|
+
## 1. Find the list of what was loaded
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
The rules gate writes it, one file per session:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
ls -t "${TMPDIR}claude-skill-gate/"*.loaded | head -5
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
You need the file of the **current** session: its identifier stands in the scratchpad path from
|
|
27
|
+
the system prompt. Taking the newest by time blind is not allowed — a parallel session in another
|
|
28
|
+
window overtakes yours, and the review goes to someone else's task.
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
The record is reset at context compaction, so the list covers the last stretch of the session.
|
|
31
|
+
If you know what was loaded earlier — add it to the summary in words, do not pass the list off as
|
|
32
|
+
complete.
|
|
32
33
|
|
|
33
|
-
## 2.
|
|
34
|
+
## 2. Assemble the summary
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
Without it the review degenerates into a retelling of the rules: the agent saw neither the task
|
|
37
|
+
nor where you stumbled. In the summary:
|
|
37
38
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
(
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
39
|
+
- **what was done** — the task in one sentence, the volume in numbers (files, commits, branch);
|
|
40
|
+
- **what went wrong** — item by item, and this is the main part. Each: what broke, what caught
|
|
41
|
+
it (or why nothing caught it), whether you found it yourself or a check did;
|
|
42
|
+
- **what was at hand** — which rules were loaded and what each gave: where it worked, where it
|
|
43
|
+
stayed silent, where it led astray. A rule that was loaded and was of no use is as much a
|
|
44
|
+
finding as a missing one;
|
|
45
|
+
- **environment traps** — a linter rule, a tool limitation, a stand behaviour that you ran into
|
|
46
|
+
and that is in no rule.
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
Honesty here is worth more than completeness: "the review found it, not me" and "the item was
|
|
49
|
+
marked done by work that did not happen" are exactly what rules are made of. A smoothed summary
|
|
50
|
+
gives a smoothed review.
|
|
50
51
|
|
|
51
|
-
## 3.
|
|
52
|
+
## 3. Launch the agent in the background and return to work
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
With the `Agent` tool, `subagent_type: 'skill-curator'`. Into the prompt — the path to `.loaded`
|
|
55
|
+
and the summary in full.
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
The turn does not end on this: while the agent works, the next task is taken. The reply arrives
|
|
58
|
+
as a notification, and then come steps 4–6 — one turn, after which the executor returns to what
|
|
59
|
+
they were doing.
|
|
59
60
|
|
|
60
|
-
## 4.
|
|
61
|
+
## 4. Put the findings into the task folder
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
The role's reply lives in the conversation and dies with it, so it goes to disk at once — next to
|
|
64
|
+
the progress, in the task folder. You write it, not the role: it writes no files at all.
|
|
64
65
|
|
|
65
66
|
```bash
|
|
66
|
-
cat > docs/tasks
|
|
67
|
+
cat > docs/tasks/<branch>/curator.md # block heading — «## <адрес> · <ресурс>»
|
|
67
68
|
```
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
The role has already set the address of every block — «пакет», «компаньон» or «дерево». Your part
|
|
71
|
+
is not to lose it and not to rewrite the text in your own words.
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
The task folder dies with the merge, and the findings must outlive the whole epic: the owner
|
|
74
|
+
reads them at once, when the epic is over. So when the folder is taken apart, the findings file is
|
|
75
|
+
not deleted but moves to the epic plan — the work-closing pattern. Work outside an epic shows the
|
|
76
|
+
findings to the owner at once.
|
|
75
77
|
|
|
76
|
-
## 5.
|
|
78
|
+
## 5. Send the observation digest — and only it
|
|
77
79
|
|
|
78
80
|
```bash
|
|
79
|
-
npx agent-kit propose --dry-run #
|
|
80
|
-
npx agent-kit propose #
|
|
81
|
+
npx agent-kit propose --dry-run # what would have gone
|
|
82
|
+
npx agent-kit propose # send the cargo to the intake
|
|
81
83
|
```
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
The cargo goes out at every run: the observation digest with a snapshot of the overrides, the
|
|
86
|
+
incident analyses and the proposals lying in the proposals directory. The digest is fact: what
|
|
87
|
+
was used, what was never used, what the tree overrode. It always goes and does not wait for the
|
|
88
|
+
owner's word.
|
|
86
89
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
**The review findings do not land in the proposals directory by themselves, and so do not go.**
|
|
91
|
+
A proposal is a draft of an edit to a foreign tree, and some drafts fall away at the first
|
|
92
|
+
reading; gone without review, it becomes the work of someone who did not order it. Only what the
|
|
93
|
+
owner has named right moves to the proposals directory — and goes at that moment.
|
|
91
94
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
The send refuses if an address of this tree is found in the digest or in the proposal text — a
|
|
96
|
+
path, a root name, a foreign repository. This is not nitpicking: the cargo goes outside in full.
|
|
97
|
+
Fix the text, do not bypass the check. An incident analysis is not covered by the check: by
|
|
98
|
+
design it names the tree files where the miss happened.
|
|
96
99
|
|
|
97
|
-
## 6.
|
|
100
|
+
## 6. Hand the findings to the owner — at the end of the epic
|
|
98
101
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
Show the findings **as they are**: the role writes ready-made text for insertion, and retelling
|
|
103
|
+
spoils it. On each, say your own view — agree or not and why; a rule you disagree with does not
|
|
104
|
+
need inserting.
|
|
102
105
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
+
Work in an epic does not show them at once: the findings accumulate at the epic plan and are read
|
|
107
|
+
at once, when the epic is over — so the owner sees what repeats, not scattered notes. What they
|
|
108
|
+
named right moves to the proposals directory and goes in step 5.
|
|
106
109
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
`agent-kit sync`.
|
|
110
|
+
On every proposal the agent puts the mark «пакет», «компаньон» or «дерево»: the texts arrive from
|
|
111
|
+
`@rt-tools/agent-kit`, and an in-place edit of a laid-out file is lost on the next
|
|
112
|
+
`agent-kit sync`. Leave the mark in the proposal text — a person decides by it.
|
|
110
113
|
|
|
111
|
-
|
|
114
|
+
Where each goes:
|
|
112
115
|
|
|
113
|
-
- **пакет** —
|
|
114
|
-
|
|
115
|
-
- **компаньон** — `implementation.md`
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
- **пакет** — an edit of a resource in `@rt-tools/agent-kit`; here also lands everything true
|
|
117
|
+
for any tree of the workshop;
|
|
118
|
+
- **компаньон** — `implementation.md` next to the rule: the names of this tree and the binding
|
|
119
|
+
of articles;
|
|
120
|
+
- **дерево** — an override: `.claude/rt-kit/overrides/<identifier>` for texts,
|
|
121
|
+
`.claude/rt-kit/gate-map.sh` and `project.sh` for the map and the profile.
|
|
118
122
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
A rule and its companion change together: a divergence between them is worse than no rule. A new
|
|
124
|
+
rule also needs an entry in the gate map, otherwise nobody loads it — and after editing the map
|
|
125
|
+
or a hook, a full run of their scenarios is mandatory.
|