@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
|
@@ -2,80 +2,82 @@
|
|
|
2
2
|
name: turn-entry-map
|
|
3
3
|
kind: pattern
|
|
4
4
|
rule: turn-entry
|
|
5
|
-
description:
|
|
5
|
+
description: Pattern of rule turn-entry. Load when editing the turn map and the hook that serves it — what goes into the map, how it differs from a rule, how the hook stays silent about what is missing and how that is checked. Not for the shape of the handover itself — that is pattern task-flow-handoff.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# The turn map and its serving — ready-made code
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Pattern of the rule `turn-entry`. What must be true — the law
|
|
11
11
|
`docs/constitution/work-conduct.md`.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## When to use
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
15
|
+
- A state was added to the rule on the course of work — the map fell behind.
|
|
16
|
+
- The entry hook is being edited, or the order in which the parts of the entry are put into the
|
|
17
|
+
context.
|
|
18
|
+
- The map check turned red.
|
|
18
19
|
|
|
19
|
-
##
|
|
20
|
+
## What goes into the map and what does not
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
The map answers the question "what to do", the rule — the question "why". There is one selection
|
|
23
|
+
sign: a line the session reads and then takes the next step — into the map; a line that explains
|
|
24
|
+
where the requirement came from — into the rule.
|
|
24
25
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
26
|
+
| Into the map | Into the rule |
|
|
27
|
+
| --------------------------------------------------- | -------------------------------------------------------- |
|
|
28
|
+
| the state name and its mandatory action | why this action is mandatory |
|
|
29
|
+
| the pattern the state leads to | the incident analysis it grew out of |
|
|
30
|
+
| the four turn exits and what backs each of them | what happens when a turn is ended otherwise |
|
|
31
|
+
| a line that the rest is a continuation of the turn | the list of what a turn must not end with, with examples |
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
An incident analysis never moves into the map: it explains, and an explanation is the rule.
|
|
33
34
|
|
|
34
|
-
##
|
|
35
|
+
## Serving: first the handover, then the map
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
The order is not indifferent. The handover says where exactly this work stands, the map — what is
|
|
38
|
+
done in such a place in general. Read first, the map answers a question the session has not asked
|
|
39
|
+
yet.
|
|
38
40
|
|
|
39
41
|
```bash
|
|
40
|
-
#
|
|
42
|
+
# the handover — by the name of the current branch, not by picking from the directory
|
|
41
43
|
handoff="$ROOT/${RT_HANDOFF_DIR:-.claude/handoff}/$(git branch --show-current).md"
|
|
42
|
-
[ -r "$handoff" ] && { printf '
|
|
44
|
+
[ -r "$handoff" ] && { printf 'HANDOVER OF THE PAST SESSION\n\n'; cat "$handoff"; }
|
|
43
45
|
|
|
44
|
-
#
|
|
45
|
-
[ -r "$map" ] && { printf '
|
|
46
|
+
# the map — as its own file, not parsed out of the rule
|
|
47
|
+
[ -r "$map" ] && { printf 'TURN MAP\n\n'; cat "$map"; }
|
|
46
48
|
|
|
47
49
|
exit 0
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
Three things in this piece are mandatory and easily lost:
|
|
51
53
|
|
|
52
|
-
- **`-r`,
|
|
53
|
-
|
|
54
|
-
- **`exit 0`
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
54
|
+
- **`-r`, not `-f`.** The file may exist and not be readable; `-f` then lets `cat` through, and
|
|
55
|
+
the hook prints a heading over emptiness.
|
|
56
|
+
- **`exit 0` at the end and no other exits.** The entry hook refuses nothing: a session without
|
|
57
|
+
part of the context is better than a refused launch.
|
|
58
|
+
- **The file name is built from the branch.** Picking "the first one found" in the directory
|
|
59
|
+
serves someone else's handover, and it looks like one's own.
|
|
58
60
|
|
|
59
|
-
##
|
|
61
|
+
## What it is checked with
|
|
60
62
|
|
|
61
63
|
```bash
|
|
62
|
-
node tools/check-turn-map.mjs #
|
|
64
|
+
node tools/check-turn-map.mjs # size, completeness of states both ways, four exits
|
|
63
65
|
```
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
The check compares the state names of the map with the rule's table both ways: a state declared
|
|
68
|
+
by the rule and forgotten in the map, and a state left in the map after a rename — both are
|
|
69
|
+
divergences.
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
A live trial of the hook is done on a tree where both parts lie, and is repeated four times: both
|
|
72
|
+
parts, without the handover, without the map, without both. The last case must give empty output
|
|
73
|
+
and a zero code — a hook that stayed silent with a non-zero code reads as a refused launch.
|
|
72
74
|
|
|
73
|
-
##
|
|
75
|
+
## Common misses
|
|
74
76
|
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
|
|
77
|
+
- **The size limit is assigned by measurement, not by eye.** The first number was chosen as
|
|
78
|
+
"twice the current map" — and the check turned red on its own text in the very first run: a map
|
|
79
|
+
in Cyrillic weighs twice what the line count suggests.
|
|
80
|
+
- **Going past the limit means splitting the map, not raising the limit.** Raised once, it is
|
|
81
|
+
raised a second time too, and the map quietly becomes a second copy of the rule.
|
|
82
|
+
- **A map parsed out of the rule on the spot breaks silently.** No check sees an edit of the
|
|
83
|
+
table markup, and the map after it arrives empty — and the session never learns of it.
|
|
@@ -1,148 +1,178 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
1
|
+
# The portable rules layer — cold part
|
|
2
|
+
|
|
3
|
+
Pitfalls and traps already stepped on. Loaded not with the skill but on demand: an ordinary
|
|
4
|
+
layout does not need it — it is for whoever investigates an audit refusal or argues with the
|
|
5
|
+
layout.
|
|
6
|
+
|
|
7
|
+
The skill is `agent-kit`; the editing order, the commands and the structure of the layers stand
|
|
8
|
+
there.
|
|
9
|
+
|
|
10
|
+
## Pitfalls
|
|
11
|
+
|
|
12
|
+
- **A set that tests a guard reads the settings of the tree it was launched from.** The helper
|
|
13
|
+
takes the settings by the project directory, and its agent sets that itself — a `cd` in the
|
|
14
|
+
runner does not override it. A set that created no throwaway tree of its own turns green from a
|
|
15
|
+
line in someone else's settings: six scenarios of the exam guard passed exactly so, because the
|
|
16
|
+
role was disabled in the tree where they were run. One's own tree is declared for every
|
|
17
|
+
scenario, not once per file.
|
|
18
|
+
|
|
19
|
+
- **An override replaces a section whole, and the package items in it have to be kept as a
|
|
20
|
+
copy.** There is no way to append one article to a section: the merge goes by the `## `
|
|
21
|
+
heading. A tree that needs one item of its own copies all the package ones next to it — and
|
|
22
|
+
from that day an edit of any of them, arriving with a new version, does not reach this tree.
|
|
23
|
+
The laid-out audit is silent: it counts an in-place edit as a discrepancy, not a replaced
|
|
24
|
+
section. The sign shows in the overrides themselves — three out of three read ended with a
|
|
25
|
+
paragraph saying the carry-over would have to be done by hand. So an override takes a section
|
|
26
|
+
with few package items, and a replaced section that has grown is a reason to bring one's own
|
|
27
|
+
into the package, not to keep it as a copy. The proposal by which it is brought in names this
|
|
28
|
+
override in the line "closed by": otherwise the arrived edition and the override it closed are
|
|
29
|
+
matched by nothing, and the override goes on replacing an already fixed section.
|
|
30
|
+
|
|
31
|
+
A copied package line is edited in the package source, not in the copy: an edit inside the
|
|
32
|
+
override diverges from the source silently, and it shows only where the text itself serves as
|
|
33
|
+
the link key — in an article that has a binding. Before a line in the override is edited, it is
|
|
34
|
+
looked up in the source; not found — the line is the tree's own, and it is edited in place.
|
|
35
|
+
- **The package's ready-made code names no names of a single tree.** The kit's directive prefix,
|
|
36
|
+
label keys and entity names belong to the tree where the pattern was written; laid out in a
|
|
37
|
+
neighbouring one, they teach to call what is not there at all. A directive name differs from a
|
|
38
|
+
name in an example: an example is seen to be an example, while `<prefix>TableRow` from another
|
|
39
|
+
tree looks like working code and is fixed only after the production build falls. Thirteen such
|
|
40
|
+
names stood in four package resources until a consumer found them — not by its build, but by
|
|
41
|
+
the override with which it covered the section.
|
|
42
|
+
|
|
43
|
+
- **Rules and patterns under a rejected law are not listed in the refusal.** The cascade removes
|
|
44
|
+
them, and the line about them becomes derivable: the layout names it redundant together with
|
|
45
|
+
the law because of which it stopped removing. The refusal measures the layer of laws, not the
|
|
46
|
+
number of files in the package.
|
|
47
|
+
|
|
48
|
+
- **The linter that follows an edit judges the whole file, not the edit made.** An import added
|
|
49
|
+
as a separate step is refused as unused before the line that calls it appears, and the work
|
|
50
|
+
stalls halfway. The edit is made in one call or in the order "usage first, then import".
|
|
51
|
+
- **Guard scenarios can be run without laying anything out — where those scenarios exist.** The
|
|
52
|
+
set's harness takes the guards directory as a variable, and the package edition is run before
|
|
53
|
+
installation. It lives in the package's own repository: resources, the launch line and the
|
|
54
|
+
library go into the shipment, and the scenarios directory is not in it at all. A consumer tree
|
|
55
|
+
is left with its own scenarios for its own guards — looking for the package ones at home means
|
|
56
|
+
spending a session on a diagnosis by consequences, exactly the one the advice promised to
|
|
57
|
+
spare.
|
|
58
|
+
- **A refused edit is not always about the guard's text.** The guard is called by path, and a
|
|
59
|
+
file without the execute bit answers with access denied — a non-zero code that reads as "edit
|
|
60
|
+
refused". The set then refuses everything in a row, build and tests included, and names no
|
|
61
|
+
reason.
|
|
62
|
+
- **An edit of a shell script by pattern replacement is checked with `bash -n` at once.** The
|
|
63
|
+
replacement does not see construct boundaries: a `case` loses its `esac`, the file stays
|
|
64
|
+
syntactically wrong, and a guard with a syntax error answers with a non-zero code — that is,
|
|
65
|
+
"edit refused". Twice in one session, and both times it looked like a defect of the guard
|
|
66
|
+
itself.
|
|
67
|
+
- **A guard subscribed to something other than what it declares looks working.** The guard
|
|
68
|
+
carries its event and call pattern itself, in the `# rt-hook:` line, and it is called by the
|
|
69
|
+
pattern in the agent settings — and the two diverge silently: the guard's path is named in the
|
|
70
|
+
settings, the file is laid out, the scenario set is green. The set catches nothing here on
|
|
71
|
+
purpose — it calls the guard directly with substituted input and reads no declaration at all.
|
|
72
|
+
That is how the rules gate parsed browser calls with a branch that never ran once. The
|
|
73
|
+
discrepancy is found by the layout audit: it compares the declared pattern with the one the
|
|
74
|
+
guard stands under, names both sides and counts it among the discrepancies. The settings are
|
|
75
|
+
fixed, and the correct value lies in the guard — its body parses what is declared.
|
|
76
|
+
- **A laid-out file is recognised by its header, not by its directory.** The layout lands in the
|
|
77
|
+
same `tools/`, `.claude/hooks/` and `.claude/skills/` where the tree's own files lie, so a gate
|
|
78
|
+
map written by paths demands a domain rule for it — and that leads to editing the file in
|
|
79
|
+
place. An in-place edit is lost on the next layout, and until then looks applied. The branch by
|
|
80
|
+
header is placed first in the map and decides before the paths.
|
|
81
|
+
- **Check settings merge by keys, and lists are replaced.** The `checks.json` object lands over
|
|
82
|
+
the default key by key at any depth: naming one board key, the tree does not lose the
|
|
83
|
+
neighbouring ones. A list arrives whole — naming the source roots, the tree gets exactly what
|
|
84
|
+
it named, not the default together with its own: "append to the list" and "remove from the
|
|
85
|
+
list" are indistinguishable in this notation.
|
|
86
|
+
- **A rule's statement moves together with the code.** What is moved into an override stops being
|
|
87
|
+
found by the former symbol, and the binding in the rule's companion lies silently — the spec
|
|
88
|
+
audit catches this, but only when called.
|
|
89
|
+
- **A sign by a path substring also judges what lies outside the tree.** Guards hand the profile
|
|
90
|
+
the full absolute path, and a pattern like `*/projects/*` matches the agent's home directory
|
|
91
|
+
just as it matches the tree's code: a write to a file outside the repository was refused by the
|
|
92
|
+
progress guard with a demand for a plan that had nothing to do with it. The path in the profile
|
|
93
|
+
is first reduced to the tree root, and everything outside the root gets no sign.
|
|
94
|
+
- **Text similarity does not find the nearest article.** A measurement showed that the lawful
|
|
95
|
+
adjacency of two articles of one rule and the lawful move of a good article to a neighbouring
|
|
96
|
+
place give the same number: so a quote is looked up by exact match, not by a similarity
|
|
97
|
+
measure.
|
|
98
|
+
- **The sent mark lives in the working tree, and every branch has a tree of its own.** Set in one
|
|
99
|
+
branch, it is invisible in a neighbouring one, and the same text leaves a second time; it does
|
|
100
|
+
not become a second record though — the intake filters what already arrived by the proposal's
|
|
101
|
+
sign, and its answer says how many records landed and how many already lay there. The line
|
|
102
|
+
"accepted 0, already there 3" means nothing new left.
|
|
103
|
+
- **A mark set only on what was accepted would declare unsent what arrived earlier.** The file
|
|
104
|
+
would stay without it forever: it will never become accepted again, and the proposals guard
|
|
105
|
+
would refuse the turn to every following session. For the sender the difference between
|
|
106
|
+
accepted and already there changes nothing — both outcomes mean one thing: the cargo arrived.
|
|
107
|
+
- **A send refusal that names only a config key leads the reader astray.** Neither the address
|
|
108
|
+
nor the token is in the config, nor will be: both come from the intake's owner — the address by
|
|
109
|
+
word, the token as a one-time invitation code. So the refusal names the invitation, not the
|
|
110
|
+
key: whoever went to edit the config finds no answer there and asks the owner the second time.
|
|
111
|
+
- **A package edition bumped without a layout locks the whole tree.** It turns red not its own
|
|
112
|
+
branch but main: the layout audit stands in the push gate, and it refuses other people's work
|
|
113
|
+
that has nothing to do with the package. The author cannot fix this from their own branch — the
|
|
114
|
+
edit lies in someone else's.
|
|
115
|
+
- **An edit of a laid-out file without an in-place guard surfaces in someone else's branch.** Only
|
|
116
|
+
`sync --check` knew about it, and it spoke on the next layout: the refusal came to whoever
|
|
117
|
+
edited a neighbouring resource that day, and looked like a breakage of their work.
|
|
118
|
+
|
|
119
|
+
## Version bump: how to check replaced sections
|
|
120
|
+
|
|
121
|
+
Measured on two bumps in a row: in one, six replaced sections were short of new statements; in
|
|
122
|
+
the other, two sections were short of eleven articles, and no command said a word about it. The
|
|
123
|
+
previous edition was found by chance as a copy in someone else's working tree: installation wipes
|
|
124
|
+
it without a trace, so the snapshot stands as the first step of the bump.
|
|
125
|
+
|
|
126
|
+
Articles are compared, not headings — the heading is exactly what matched, and that is how the
|
|
127
|
+
section got replaced:
|
|
119
128
|
|
|
120
129
|
```bash
|
|
121
130
|
sec() { awk -v s="$2" '$0 ~ "^## "s {f=1;next} /^## /{f=0} f' "$1" \
|
|
122
131
|
| grep '^- \*\*' | sed 's/^- \*\*//;s/\*\*.*//'; }
|
|
123
|
-
comm -13 <(sec "$OLD
|
|
132
|
+
comm -13 <(sec "$OLD/<resource>" '<heading>' | sort) <(sec "$NEW/<resource>" '<heading>' | sort)
|
|
124
133
|
```
|
|
125
134
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
##
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
A line in the output is an article the override swallowed: the package added it, and the tree did
|
|
136
|
+
not see it. It is carried into the override by hand.
|
|
137
|
+
|
|
138
|
+
## Disabled role: what happens with the settings
|
|
139
|
+
|
|
140
|
+
- **Settings that cannot be read do not disable a role.** No `jq` found, no settings, parsing
|
|
141
|
+
broken in the settings — the guard judges as it judged. The opposite choice would silence the
|
|
142
|
+
rules layer quietly, and there would be nothing to notice it with.
|
|
143
|
+
- **A key written not as a list is caught by the layout, not by the guard.** The guard sees only
|
|
144
|
+
a list of names: a string instead of a list reads to it as "role enabled", and the role works
|
|
145
|
+
although the tree counts it disabled. The settings parsing refuses on this — on the very first
|
|
146
|
+
layout, naming the key.
|
|
147
|
+
- **Disabling lives in the tree's settings, not in the agent's settings.** A line cut out of the
|
|
148
|
+
agent settings by hand is lost on the first edit of that file, and there will be nothing to
|
|
149
|
+
bring the role back with. Here it is declared in one place and visible to anyone who reads the
|
|
150
|
+
tree's settings.
|
|
151
|
+
|
|
152
|
+
## Tree traits: two boundaries
|
|
153
|
+
|
|
154
|
+
- **`only` is stronger than a requirement.** A resource named by name is laid out even with an
|
|
155
|
+
unanswered requirement; the layout list says so aloud, and the refusal over its empty companion
|
|
156
|
+
calls to remove the resource, not to fill in the draft.
|
|
157
|
+
- **A trait the package did not declare fails the layout** — whether in the tree's `has` or in a
|
|
158
|
+
resource name. Traits are declared in a list with the package, next to the axes of difference.
|
|
159
|
+
|
|
160
|
+
## Layout pitfalls
|
|
161
|
+
- **The glossary is as much a laid-out resource as a rule.** The startup hook puts it into the
|
|
162
|
+
context in full, before the first reply, and so it looks like an ordinary tree document; it has
|
|
163
|
+
a header, but it reads as a service line. A new word goes into the glossary override, as a
|
|
164
|
+
section of its own.
|
|
165
|
+
|
|
166
|
+
- **A file write by a shell command is checked on all paths named in its body.** The gate takes
|
|
167
|
+
the paths out of the command text and reads the document body in full if the command holds an
|
|
168
|
+
interpreter name; an import line of a laid-out module then demands a second rule, and one is
|
|
169
|
+
demanded at a time — two refusals in a row, and each loses the written body. The edit tool is
|
|
170
|
+
checked by its one path; a shell redirect is for what does not become a tree file.
|
|
171
|
+
- **Your own thing standing next to the laid-out repeats its mechanics silently.** Parsing the
|
|
172
|
+
list of the known, the source roots and the debt snapshot is given by the checks config
|
|
173
|
+
module; a second such parser in your own check is seen by neither the layout audit nor the
|
|
174
|
+
duplicate check. Before starting your own, look at what the checks config module exports.
|
|
175
|
+
- **A rule loaded by a tool may be shown not in full, and the cut is marked by nothing.** A long
|
|
176
|
+
file comes into the context cut at a line, and the cut falls on the tail — where the override
|
|
177
|
+
sections are appended at the end. The shown lines are compared with the file length by one
|
|
178
|
+
command; if they differ, the file is read to the end.
|