@rt-tools/agent-kit 0.23.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/README.md +8 -2
- 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 +150 -128
- package/assets/checks/check-archive-age.mjs +23 -19
- package/assets/checks/check-board.github.mjs +179 -157
- package/assets/checks/check-descriptions.mjs +30 -29
- package/assets/checks/check-doc-paths.mjs +104 -82
- package/assets/checks/check-dupes.mjs +84 -80
- package/assets/checks/check-file-size.mjs +79 -70
- 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 +125 -33
- 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 +115 -91
- package/assets/defaults/project.sh +228 -178
- package/assets/defaults/shell.sh +85 -65
- 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 +46 -14
- 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 +84 -39
- package/assets/hooks/docs-guard.sh +105 -86
- package/assets/hooks/exam-guard.sh +146 -84
- package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
- package/assets/hooks/git-guard-delivery-draft.sh +85 -0
- 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 +207 -253
- package/assets/hooks/git-guard-main.sh +65 -26
- package/assets/hooks/git-guard-push-tests.sh +133 -75
- 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 +70 -50
- 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 +52 -36
- 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 +104 -0
- 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 +115 -30
- 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 -114
- package/assets/laws/work-conduct.md +250 -250
- 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 +143 -67
- package/assets/patterns/browser-verification-stand.md +181 -128
- package/assets/patterns/component-structure-new.md +51 -42
- package/assets/patterns/dependencies-upgrade.md +55 -39
- package/assets/patterns/doc-style-human.md +93 -0
- 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 -75
- package/assets/patterns/git-workflow-commit.github.md +153 -129
- package/assets/patterns/git-workflow-commit.gitlab.md +96 -78
- 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 +99 -86
- 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 +103 -92
- 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 -188
- 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 +209 -148
- 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 -242
- 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 -137
- 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 +83 -72
- package/assets/rules/task-flow.md +282 -270
- package/assets/rules/testing.md +224 -188
- 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 +236 -222
- 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 +68 -4
- 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 +13 -4
- package/lib/enroll.js.map +1 -1
- package/lib/observations.d.ts +10 -1
- package/lib/observations.d.ts.map +1 -1
- package/lib/observations.js +1 -0
- package/lib/observations.js.map +1 -1
- package/lib/override-marks.d.ts +24 -0
- package/lib/override-marks.d.ts.map +1 -0
- package/lib/override-marks.js +98 -0
- package/lib/override-marks.js.map +1 -0
- 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 +7 -3
- 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.23.0.tgz +0 -0
|
@@ -1,298 +1,312 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-kit
|
|
3
|
-
description:
|
|
3
|
+
description: The portable rules layer of the agent — laws, rules, hooks and checks shipped by the package and adjusted by the tree through overrides. Load when a file with the rt-kit header is edited, the package is upgraded or the layout audit refuses. The shape of a new skill — write-a-skill.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# The portable rules layer
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Laws, rules, patterns, hooks, checks and roles are shipped by the package; the tree takes them
|
|
9
|
+
by layout and adjusts them with overrides. A laid-out file carries a header and is not edited —
|
|
10
|
+
either the package or the override is edited.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
**Cold part:** `pitfalls.md` next to it — pitfalls, traps already stepped on. Loaded on demand,
|
|
13
|
+
not together with the skill.
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## When to use
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
`rt-kit v
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
17
|
+
- The file you are about to edit carries the header
|
|
18
|
+
`rt-kit v<version> · <resource> · <checksum> · правится надстройкой, не здесь`.
|
|
19
|
+
- The package was updated, or `sync --check` refused in the push gate.
|
|
20
|
+
- Your own behaviour has to be added on top of the package one: a guard, the gate map, the
|
|
21
|
+
set of checks.
|
|
22
|
+
- The package is installed into a tree whose hooks and checks are already its own.
|
|
22
23
|
|
|
23
|
-
##
|
|
24
|
+
## Where what is set up
|
|
24
25
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
26
|
+
| What you change | Where the edit goes |
|
|
27
|
+
| ------------------------------------------------- | ------------------------------------------------------- |
|
|
28
|
+
| which rule the gate demands for which file | `.claude/rt-kit/gate-map.sh` — your own `skill_for` |
|
|
29
|
+
| ports, addresses, linters, branch form, inventory | `.claude/rt-kit/project.sh` — your own `rt_*` |
|
|
30
|
+
| paths and identifiers the checks live by | `.claude/rt-kit/checks.json` |
|
|
31
|
+
| which uniformity signs the tree takes | `checks.json`, keys `reuse.bundles` and `reuse.signals` |
|
|
32
|
+
| a section of a laid-out text | `.claude/rt-kit/overrides/<resource identifier>` |
|
|
33
|
+
| what to take and what to drop | `.claude/rt-kit.json`, keys `only` and `skip` |
|
|
34
|
+
| which roles are called by hand, not mandatorily | `.claude/rt-kit.json`, key `rolesOff` |
|
|
35
|
+
| what the tree has: storage, admin, packages | `.claude/rt-kit.json`, key `has` |
|
|
36
|
+
| the mechanism itself — guard, check, rule text | the resource in the package |
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
`_default
|
|
39
|
-
|
|
38
|
+
An override redeclares the function and may call the default by the same name with the
|
|
39
|
+
`_default` suffix. Text merges by `## ` sections: a matching heading replaces, a new one is
|
|
40
|
+
appended, an empty one lifts the package section.
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
A ready-made sample for every row of this table is the skill `agent-kit-extend`: how the edit
|
|
43
|
+
itself looks, what checks it and how it ends if put in the wrong place.
|
|
43
44
|
|
|
44
|
-
##
|
|
45
|
+
## Order
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
The layout puts everything or nothing: a refusal on even one file writes nothing — half a
|
|
48
|
+
layout is worse than a whole one. Either the override here or the resource itself is edited —
|
|
49
|
+
and that is the work of the tree where the package lives as sources; nothing is said about it
|
|
50
|
+
here.
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
**A layout is an edit of the tree, not a service call:** it rewrites hundreds of tracked files at
|
|
53
|
+
once, so the work is set up before `sync`, by the same rules as any other.
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
**The package version bump and the layout go in one change.** The layout audit stands in the
|
|
56
|
+
push gate: an edition bumped without a layout turns the main branch red and locks the whole tree.
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
там печатается готовый кусок и запись идёт рукой, как прежде.
|
|
58
|
+
**The layout puts the hook declaration together with the hook itself.** A hook is called by an
|
|
59
|
+
entry in the agent settings, and one laid out without it is indistinguishable from the outside
|
|
60
|
+
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, what the tree removed
|
|
62
|
+
does not come back, and settings that cannot be parsed as JSON the package does not touch — it
|
|
63
|
+
prints a ready-made piece to enter by hand.
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
**This is held by the edit-location guard, not by memory.** It refuses an edit of a file with the
|
|
66
|
+
layout header at the minute of the edit and names the address: the source, if the tree holds
|
|
67
|
+
it, otherwise the override. The copy is edited not only by hand: the tree formatter rewrites a
|
|
68
|
+
laid-out file its own way, and the layout reads that exactly as a hand edit. Removing the copy
|
|
69
|
+
the guard lets through — a removed file the layout puts anew.
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
**An override is edited by section, not put in full.** Sections are added to it by different
|
|
72
|
+
branches and different sessions, and put in full it carries away all that this edit did not
|
|
73
|
+
touch. This is held by the second guard — it refuses a write over a non-empty override and names
|
|
74
|
+
the size of what would be wiped. Appending at the end and editing in place pass.
|
|
74
75
|
|
|
75
|
-
##
|
|
76
|
+
## Commands
|
|
76
77
|
|
|
77
78
|
```bash
|
|
78
|
-
npx agent-kit doctor #
|
|
79
|
-
npx agent-kit sync #
|
|
80
|
-
npx agent-kit sync --check #
|
|
81
|
-
npx agent-kit stats #
|
|
82
|
-
npx agent-kit enroll --code
|
|
83
|
-
npx agent-kit propose #
|
|
84
|
-
npx agent-kit adopt [
|
|
79
|
+
npx agent-kit doctor # what is laid out, what lags, what lies from a dropped resource
|
|
80
|
+
npx agent-kit sync # lay out
|
|
81
|
+
npx agent-kit sync --check # write nothing, refuse on a divergence
|
|
82
|
+
npx agent-kit stats # what was used, what never, what people stumbled on
|
|
83
|
+
npx agent-kit enroll --code <code> # enrol the tree in the intake and put its token
|
|
84
|
+
npx agent-kit propose # send the cargo to the intake: the digest, proposals and analyses
|
|
85
|
+
npx agent-kit adopt [files] # hand the package your own file lying on its path
|
|
85
86
|
```
|
|
86
87
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
находят по тексту отказа раскладки — то есть в ту минуту, когда работа уже встала.
|
|
88
|
+
Adoption sets the former content aside next to it, marked `.before-rt-kit`, and frees the path
|
|
89
|
+
for the layout; without names all foreign files are handed over at once.
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
Some commands of the layer are run by the agent, not by the program: `/feedback` puts a remark
|
|
92
|
+
about the rules as a block into the proposals file, `/skill-curator` reviews a closed task,
|
|
93
|
+
`/next-session` closes the session.
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
There are no commands for editing the package itself here: they are called where its resources
|
|
96
|
+
lie.
|
|
95
97
|
|
|
96
|
-
##
|
|
98
|
+
## Version bump
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
A matching heading replaces the package section in full, and everything the package added to such
|
|
101
|
+
a section in a new version vanishes silently: the layout matches, the headings match, and the
|
|
102
|
+
statements are gone. The heading audit catches a renamed section, not an extended one — the loss
|
|
103
|
+
has no other witnesses.
|
|
101
104
|
|
|
102
|
-
|
|
105
|
+
So the bump takes three steps, and the first goes before the installation.
|
|
103
106
|
|
|
104
|
-
1.
|
|
105
|
-
|
|
107
|
+
1. **A snapshot of the former edition of the resources.** The installation wipes it without a
|
|
108
|
+
trace, and there is nothing to compare with afterwards.
|
|
106
109
|
|
|
107
110
|
```bash
|
|
108
|
-
cp -r node_modules/@rt-tools/agent-kit/assets /tmp/agent-kit-assets
|
|
111
|
+
cp -r node_modules/@rt-tools/agent-kit/assets /tmp/agent-kit-assets-<former version>
|
|
109
112
|
```
|
|
110
113
|
|
|
111
|
-
2.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
3.
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
2. **Installation and layout.** The usual way. The layout puts the edition that is
|
|
115
|
+
**installed**, not the one the tree declared: the installed one is left over from a
|
|
116
|
+
neighbouring branch and lands in full, silently, with the same successful exit. A mismatch of
|
|
117
|
+
the exact number the layout refuses by itself; the fix is to install dependencies and repeat
|
|
118
|
+
the call.
|
|
119
|
+
3. **An audit of the replaced sections against the snapshot.** Which sections are replaced is
|
|
120
|
+
named by `doctor` — with the line "замещено надстройками разделов" and a list of
|
|
121
|
+
"resource · heading". Each is read in the snapshot and in the new edition: what the package
|
|
122
|
+
added is added to the override by hand.
|
|
119
123
|
|
|
120
|
-
|
|
124
|
+
Neither `doctor` nor `sync --check` audits this itself: they have no former edition.
|
|
121
125
|
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
For every named section the articles are compared, not the headings: the heading is exactly
|
|
127
|
+
what matched, that is what replaced the section. A ready-made pair of commands is in the cold
|
|
128
|
+
part next to it.
|
|
124
129
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
предложения.
|
|
130
|
+
Then the decision is the usual one: the section the override was started for stays replaced,
|
|
131
|
+
and the section whose reason left with the fixed edition is lifted.
|
|
128
132
|
|
|
129
|
-
##
|
|
133
|
+
## What the package ships and what stays with the tree
|
|
130
134
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
The package is installed by foreign trees, and it ships them only what they carry out. A
|
|
136
|
+
resource that has no subject in a foreign tree, or nobody there to call it, is never a package
|
|
137
|
+
resource — it lives as the tree's own resource where the subject exists.
|
|
134
138
|
|
|
135
|
-
|
|
139
|
+
The sign is not an appraisal but two questions to the resource:
|
|
136
140
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
|
141
|
-
|
|
142
|
-
Ответ «нет» хотя бы на один — ресурс остаётся дереву, которое пакет пишет.
|
|
141
|
+
| Question | "No" means |
|
|
142
|
+
| ------------------------------------------------- | ------------------------------------------------ |
|
|
143
|
+
| Does the consumer have what the resource speaks of? | no subject: nothing to fill the companion with |
|
|
144
|
+
| Does the consumer have someone to call it? | no executor: the command does not run there |
|
|
143
145
|
|
|
144
|
-
|
|
145
|
-
снимает раскладку у себя; ресурс при этом остаётся в пакете и продолжает ехать всем остальным.
|
|
146
|
-
Убирается он из самого пакета, а не из своей раскладки.
|
|
146
|
+
"No" to even one — the resource stays with the tree that writes the package.
|
|
147
147
|
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
**The list of dropped resources does not close the boundary.** A line in `skip` says "I do not
|
|
149
|
+
need this" and lifts the layout at home; the resource stays in the package and keeps going to
|
|
150
|
+
everyone else. It is removed from the package itself, not from your own layout.
|
|
150
151
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
**The tree's own rule is declared on a par with the package one:** the same shape, the same law
|
|
153
|
+
above, a companion next to it and its own branch in the gate map. The reader must not see that
|
|
154
|
+
it is younger.
|
|
154
155
|
|
|
155
|
-
|
|
156
|
+
What must be true at that is written as an agreement in the tree that writes the package: the
|
|
157
|
+
check that holds the boundary lives there too. A foreign tree has no business judging the
|
|
158
|
+
package resources, so the check does not go here.
|
|
159
|
+
|
|
160
|
+
## Feedback upwards
|
|
161
|
+
|
|
162
|
+
The rules layer is edited not from memory but by how it was used. This is held by three things.
|
|
156
163
|
|
|
157
|
-
|
|
164
|
+
**Observations** are written by the guards themselves — into `.claude/rt-kit/observations/`, a
|
|
165
|
+
file per day. A line holds the package resource name, the kind of event, the kind of edit, the
|
|
166
|
+
version and a session sign; no tree paths and no tree name are there. Switched off by the key
|
|
167
|
+
`"observe": false` in the config.
|
|
158
168
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
нет. Выключаются ключом `"observe": false` в конфиге.
|
|
169
|
+
**The digest** is `agent-kit stats`. Its most valuable line is not "what was used" but **what is
|
|
170
|
+
laid out and never loaded**: a rule nobody opened gives itself away by nothing.
|
|
162
171
|
|
|
163
|
-
|
|
164
|
-
|
|
172
|
+
**The cost** is `agent-kit cost`. The digest says what was used; the cost — what it cost: the
|
|
173
|
+
weight of entering work, the weight of one rule and the weight of the whole layer. Counted is
|
|
174
|
+
not the file but what the session receives. The number is comparable only with one taken by the
|
|
175
|
+
same command.
|
|
165
176
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
177
|
+
**Proposals** come by two roads: the review of a closed task — by the `/skill-curator` command —
|
|
178
|
+
brings them in a batch, and a remark made in the middle of work is put by the agent itself with
|
|
179
|
+
the `/feedback` command. Both write into one file of the day and in one form; neither goes to
|
|
180
|
+
the network — the send carries them away.
|
|
170
181
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
182
|
+
Every record carries four lines: **place** — where the edit goes in the resource, **reason** —
|
|
183
|
+
what went wrong without it, **closest** — the exact quote of the resource line this is closest
|
|
184
|
+
to, and **what it closes** — which overrides of the tree are lifted when the edit arrives as a
|
|
185
|
+
package edition.
|
|
174
186
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
187
|
+
The third line is the only one the machine checks: the quote is searched for in the resource,
|
|
188
|
+
and one not found refuses the block. There is nothing close at all — write exactly that: «нет».
|
|
189
|
+
A refused block stays lying with the mark «отбито» and the reason: it is visible that the review
|
|
190
|
+
took place and why it did not become an edit.
|
|
179
191
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
192
|
+
The fourth is written because the proposal goes outside while the override stays lying here:
|
|
193
|
+
without it, it replaces an already fixed section forever. There is nothing to lift — write
|
|
194
|
+
exactly that; the fourth line is never empty.
|
|
183
195
|
|
|
184
|
-
|
|
185
|
-
без неё она замещает уже исправленный раздел навсегда. Снимать нечего — так и пишется; пустой
|
|
186
|
-
четвёртая строка не бывает.
|
|
196
|
+
The same link is put on the override itself — as a markup comment in its section:
|
|
187
197
|
|
|
188
|
-
|
|
189
|
-
(форма — шаблон `proposal.md`), а `agent-kit propose` увозит в приём те, что адресованы
|
|
190
|
-
пакету, вместе со сводкой и разборами происшествий. Адрес дерева в сводке или в тексте
|
|
191
|
-
предложения отбивает отправку целиком.
|
|
198
|
+
<!-- rt-proposed: rules/task-flow.md · «the article in full, as in the proposal» · 2026-09-03 -->
|
|
192
199
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
200
|
+
Nobody opens the proposal records on the day of the update: nothing points to them. The mark is
|
|
201
|
+
invisible in the assembled text, survives the merge by headings and is read by the machine: the
|
|
202
|
+
layout lists the sections whose article already exists in the new edition. A person lifts them —
|
|
203
|
+
something else may have been added to the section. A section without a mark counts as permanent.
|
|
196
204
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
205
|
+
Every proposal gets an address: «пакет», «компаньон» or «дерево». They are dumped into a file in
|
|
206
|
+
`.claude/rt-kit/proposals/` (the form is the template `proposal.md`), and `agent-kit propose`
|
|
207
|
+
carries to the intake those addressed to the package, together with the digest and the incident
|
|
208
|
+
analyses. A tree address in the digest or in the proposal text refuses the send in full.
|
|
200
209
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
единственный способ узнать признак до заведения записи.
|
|
210
|
+
The intake is a closed service: the digest speaks of the team's working habits, and in an open
|
|
211
|
+
work queue that is laid out for all to see. The intake address is declared by the key `intake`
|
|
212
|
+
in the tree config, the token by the key `token`, and it lies outside the tree.
|
|
205
213
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
214
|
+
Both values come from the intake owner and are not invented by the consumer: the address they
|
|
215
|
+
name, the token they issue as a one-off invitation code — the code enrols the tree in the intake
|
|
216
|
+
and puts the token into the file of the key `token`. Before the invitation the send refuses by
|
|
217
|
+
design, not by misconfiguration.
|
|
209
218
|
|
|
210
|
-
|
|
211
|
-
|
|
219
|
+
**The tree sign is computed by the sender, not by a person.** It is derived from the repository
|
|
220
|
+
address, and the intake record is created by exactly it: a tree enrolled under its own word the
|
|
221
|
+
intake does not recognise. What would go and under which sign is printed by the dry run.
|
|
212
222
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
краснеет. Текст репозитория говорит, кому предложение отправлено и о чём оно; ресурс пакета
|
|
216
|
-
при этом называть можно — он в истории есть.
|
|
223
|
+
**The mark of a send is a trace for a person, not a store of state.** A clean tree after a send
|
|
224
|
+
means the whole cargo already lay in the intake, not that the send did not work.
|
|
217
225
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
считается, только войдя в ресурс пакета: до этого на него не ссылаются как на действующее
|
|
221
|
-
требование и не считают дырку закрытой.
|
|
226
|
+
They are reviewed where the editable resources lie and all consumers are visible at once — and
|
|
227
|
+
what arrives here is the intake's reply about how many records landed.
|
|
222
228
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
отложить. Стережёт это гард предложения на завершении хода.
|
|
229
|
+
**The proposal file name is not named in tree texts.** It gives a reader of a foreign tree
|
|
230
|
+
nothing, and a link to a directory on the author's machine leads nowhere and turns the path check
|
|
231
|
+
red. Repository text says whom the proposal was sent to and what it is about; the package
|
|
232
|
+
resource may be named.
|
|
228
233
|
|
|
229
|
-
|
|
234
|
+
A proposal does not straighten the work. It lies as text, is read by eye and does not come into
|
|
235
|
+
the context by itself. It counts as closed only once it has entered a package resource: until
|
|
236
|
+
then it is not referred to as a current requirement and the hole is not counted closed.
|
|
230
237
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
238
|
+
**The owner's word about a proposal — "send it", "file it", "write a proposal" and any other form
|
|
239
|
+
of the same — is carried out by a send in the same turn.** A dry run does not count as a send: it
|
|
240
|
+
shows what would be sent and leaves no trace outside. The marks the send leaves in the tree land
|
|
241
|
+
as a second commit in the same branch. This is checked by the proposal guard at the end of the
|
|
242
|
+
turn.
|
|
243
|
+
|
|
244
|
+
## Installation where everything is already your own
|
|
245
|
+
|
|
246
|
+
1. `init`, then `skip` on everything the tree holds itself; an empty layout is a lawful start.
|
|
247
|
+
2. A snapshot of what the tree's checks say, before a single edit: it is the measure.
|
|
248
|
+
3. Resource by resource: bring the package edition up to the local one, move the subject matter
|
|
249
|
+
into an override, lift the drop, lay out, run the scenarios and compare with the snapshot.
|
|
250
|
+
4. The package does not write a layout over your own: a file without a header is foreign to
|
|
251
|
+
it. It is handed over with the `adopt` command — the former content lands next to it, marked
|
|
252
|
+
`.before-rt-kit`.
|
|
253
|
+
5. A resource whose local edition is richer than the package one in substance is not taken into
|
|
254
|
+
the layout. The sign is an article that the package edition lacks and cannot have: it follows
|
|
255
|
+
from the tree's subject. It goes into `skip`, and a proposal to remove it from the package
|
|
256
|
+
goes upwards.
|
|
257
|
+
6. Your own scenarios of a handed-over file are rewritten for the package behaviour or removed:
|
|
258
|
+
fixing the package edition in place is not allowed, its address is the package source or the
|
|
259
|
+
override.
|
|
260
|
+
|
|
261
|
+
## Tree traits
|
|
262
|
+
|
|
263
|
+
Some package rules are true only where there is a storage, an admin or an application. The tree
|
|
264
|
+
lists what it has by the key `has`; a resource names the trait it needs by a prefix in its name —
|
|
265
|
+
`observability.needs-app.md` — and to a tree that did not name such a trait it is not put at
|
|
266
|
+
all: neither itself nor the draft of its companion.
|
|
249
267
|
|
|
250
268
|
```json
|
|
251
269
|
{ "has": ["packages", "app"] }
|
|
252
270
|
```
|
|
253
271
|
|
|
254
|
-
-
|
|
255
|
-
|
|
256
|
-
-
|
|
272
|
+
- **Silence does not answer a requirement.** A tree with an empty `has` gets not one marked
|
|
273
|
+
resource: put at a guess, it comes back as an empty companion with nothing to fill it.
|
|
274
|
+
- **A requirement is not a kind.** A kind is chosen once; a tree has several traits at once.
|
|
257
275
|
|
|
258
|
-
##
|
|
276
|
+
## Disabled role
|
|
259
277
|
|
|
260
|
-
|
|
261
|
-
|
|
278
|
+
A role with a guard next to it is not called at the executor's discretion: the guard holds the
|
|
279
|
+
work until the role has had its say. A tree it gets in the way of names it by the key `rolesOff`
|
|
280
|
+
— by the role file name.
|
|
262
281
|
|
|
263
282
|
```json
|
|
264
283
|
{ "rolesOff": ["strict-teacher"] }
|
|
265
284
|
```
|
|
266
285
|
|
|
267
|
-
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
Длинный файл приезжает в контекст обрезанным по строке, а снаружи это выглядит концом: показанное
|
|
295
|
-
кончается осмысленным пунктом. Бьёт обрыв ровно по хвосту, а хвост — то место, где дерево
|
|
296
|
-
отменяет умолчания пакета: разделы надстройки сливаются по совпавшему заголовку и новыми уходят
|
|
297
|
-
в конец. Отсюда порядок: решение о порядке работы принимается после того, как показанные строки
|
|
298
|
-
сверены с длиной файла одной командой, а расходятся они — файл дочитывается чтением.
|
|
286
|
+
- **What is switched off is the mandatory call, not the role.** The role file stays laid out, and
|
|
287
|
+
it can be called by hand at any minute. The list is read by the guards themselves — through a
|
|
288
|
+
helper lying next to them.
|
|
289
|
+
- **It differs from dropping by the `skip` key in that it removes nothing.** A drop does not put
|
|
290
|
+
the role file at all: there is nobody left to call, and the guard next to it stays and keeps
|
|
291
|
+
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.
|