@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
package/assets/defaults/shell.sh
CHANGED
|
@@ -1,69 +1,89 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
2
|
+
# Parsing a shell command: whether it writes and which paths it names.
|
|
3
3
|
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
4
|
+
# The package default, part of the tree profile — loaded from `project.sh`, next to which it lies. A
|
|
5
|
+
# separate file because together they outgrow the length limit, and they are read apart: one reader
|
|
6
|
+
# needs the write sign, the other the target.
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
#
|
|
8
|
+
# Whether a shell command writes a file. Success — yes, and then the paths from it are judged by the
|
|
9
|
+
# same sign as the path from an edit tool call.
|
|
10
10
|
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
11
|
+
# The guards are subscribed to the file edit tools, and that is not enough: the same edit is laid
|
|
12
|
+
# down by a command — a redirect, `tee`, `sed -i`, an interpreter with a heredoc. An edit refused
|
|
13
|
+
# twice in one session landed exactly so, and nobody saw it: in the tree it is indistinguishable
|
|
14
|
+
# from one laid down by the tool. The analysis — `2026-08-15-guard-denied-shell-wrote-anyway.md`.
|
|
15
15
|
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
16
|
+
# The list is wide on purpose, and the price of that is named: a read command that carries the name
|
|
17
|
+
# of an interpreter will be refused on a par with an edit command. A narrow list would cost more — a
|
|
18
|
+
# missed form of writing brings back the whole bypass, and it can be found only by a miss.
|
|
19
19
|
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
20
|
+
# Deletion and moving stand in the list on purpose, not by oversight. Removing a file is an edit
|
|
21
|
+
# more destructive than any write. What was written is visible in the tree and rolls back, while
|
|
22
|
+
# what was removed without a plan leaves no trace at all and has to be restored from history. The
|
|
23
|
+
# price of this choice is known and is paid not where it is expected. A temporary file of one's own,
|
|
24
|
+
# put under the code root, is removed by a command, and the guard judges it as an application edit.
|
|
25
|
+
# It demands a plan on disk for an action that has nothing to do with the application. The sign
|
|
26
|
+
# cannot tell one from the other: the path of both lies under the same root. This is cured by the
|
|
27
|
+
# place, not by the sign — and the pitfall of the work-conduct rule says so.
|
|
27
28
|
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
# `grep -rn x libs/ 2>/dev/null`
|
|
31
|
-
#
|
|
32
|
-
#
|
|
29
|
+
# A redirect to the null device and to the error stream is removed before parsing: it writes no
|
|
30
|
+
# file, yet looks like a redirect to a file. That is how the output of a read command is silenced,
|
|
31
|
+
# and without this `grep -rn x libs/ 2>/dev/null` is judged on a par with a write. A rule is
|
|
32
|
+
# demanded for reading, and refusals that fell on no file edit become the majority. A real write
|
|
33
|
+
# next to a silenced stream stays visible: the redirect is removed, not the whole command.
|
|
33
34
|
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
#
|
|
35
|
+
# The arrow is removed there too, and for the same reason. `->` and `=>` mean nothing in the shell,
|
|
36
|
+
# yet the sign in them is the same: a command that printed a "path -> rule" table declared itself
|
|
37
|
+
# writing and gave all its paths up for judgement. The closing bracket of a markup comment goes
|
|
38
|
+
# there too.
|
|
37
39
|
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
40
|
+
# The redirect target is narrowed to the characters paths are made of. A markup quote line — the
|
|
41
|
+
# sign and a word separated by a space — is indistinguishable from a write into a file by one sign,
|
|
42
|
+
# and only the target tells them apart. Behind a real sign stands a path, not a word in words. The
|
|
43
|
+
# price is named directly: a path typed not in Latin letters no longer counts as a write — there is
|
|
44
|
+
# not one such in the tree, and should they appear, the sign will have to be widened.
|
|
43
45
|
rt_shell_writes_default() {
|
|
44
|
-
printf '%s' "$1" \
|
|
45
|
-
| sed -E 's#(&|[0-9]*)>>?[[:space:]]*/dev/(null|stderr)##g; s#[0-9]*>&[0-9-]##g; s#[-=]+>##g'
|
|
46
|
+
cleaned="$(printf '%s' "$1" \
|
|
47
|
+
| sed -E 's#(&|[0-9]*)>>?[[:space:]]*/dev/(null|stderr)##g; s#[0-9]*>&[0-9-]##g; s#[-=]+>##g')"
|
|
48
|
+
|
|
49
|
+
# An interpreter writes by its body, not by the name of the file it runs. The path that stands
|
|
50
|
+
# as its first argument is what it reads: running a tree check by its path does not count as a
|
|
51
|
+
# write. Before, the name itself was checked, and a session that ran a check for diagnosis got a
|
|
52
|
+
# demand for the shared-code rule without editing anything in it. Over two tasks such refusals
|
|
53
|
+
# came to about fifteen, and part of them fell on commands that wrote nothing.
|
|
54
|
+
#
|
|
55
|
+
# An interpreter's body comes in two kinds, and both remain a write: a document on input and
|
|
56
|
+
# code as an argument.
|
|
57
|
+
interp='(^|[|;&(]|[[:space:]])(python3?|node|ruby|deno|bun|php|perl)'
|
|
58
|
+
if printf '%s' "$cleaned" | grep -Eq \
|
|
59
|
+
"${interp}([[:space:]][^|]*)?<<|${interp}([[:space:]]+-[^[:space:]]*)*[[:space:]]+(-e|--eval|-c|-p|--print)([[:space:]]|\$)"; then
|
|
60
|
+
return 0
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
printf '%s' "$cleaned" \
|
|
46
64
|
| grep -Eq \
|
|
47
|
-
'>>?[[:space:]]*[A-Za-z0-9_./~$"'"'"'-]|\btee\b|\bsed\b[^|]*-i|\bperl\b[^|]*-i|\
|
|
65
|
+
'>>?[[:space:]]*[A-Za-z0-9_./~$"'"'"'-]|\btee\b|\bsed\b[^|]*-i|\bperl\b[^|]*-i|\bdd\b[^|]*of=|\bcp\b|\bmv\b|\brm\b|\btouch\b|\btruncate\b|\binstall\b|\bpatch\b|\bgit[[:space:]]+(checkout|restore|apply|stash)\b'
|
|
48
66
|
}
|
|
49
67
|
|
|
50
|
-
#
|
|
68
|
+
# The paths named by a shell command. Prints one per line; the caller judges them.
|
|
51
69
|
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
#
|
|
70
|
+
# There is nothing to parse the shell with for real — and nothing parses it here: everything that
|
|
71
|
+
# looks like a path is pulled out of the text, and each one is handed to the sign. The sign will
|
|
72
|
+
# sift out the excess itself, while a missed one would bring back the bypass. Quotes are removed by
|
|
73
|
+
# replacing them with a space: the path inside them is the same.
|
|
55
74
|
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
75
|
+
# The body of a document gives no paths: the text the command puts into the file lies there, and
|
|
76
|
+
# someone else's path named in it in words would demand a rule for a write that does not exist.
|
|
77
|
+
# Writing the plan was refused three times in a row this way, until the paths under the code
|
|
78
|
+
# directory were named otherwise. What is judged is the command header — that is where the path the
|
|
79
|
+
# command writes to stands.
|
|
60
80
|
#
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
# `plan.md`
|
|
66
|
-
#
|
|
81
|
+
# The exception is an interpreter: its code comes as the body, and the write path stands exactly
|
|
82
|
+
# there. The sign is read from the line that opened the body, not from the whole command: the body
|
|
83
|
+
# belongs to the command of its own header. Before, it was read from the whole text at once, and a
|
|
84
|
+
# word from the document switched off the cutting entirely. The line "**Чем проверяется:** `bash
|
|
85
|
+
# projects/…`" in the plan made the write of `plan.md` an edit of application code. The guard
|
|
86
|
+
# thereby refused the write of the very file whose absence it refuses for.
|
|
67
87
|
rt_shell_paths_default() {
|
|
68
88
|
text="$(printf '%s' "$1" | tr "\"'\`" ' ')"
|
|
69
89
|
text="$(printf '%s' "$text" | awk '
|
|
@@ -83,15 +103,15 @@ rt_shell_paths_default() {
|
|
|
83
103
|
}
|
|
84
104
|
}')"
|
|
85
105
|
|
|
86
|
-
#
|
|
87
|
-
#
|
|
88
|
-
# `python3 <<PY … PY`
|
|
89
|
-
#
|
|
90
|
-
#
|
|
106
|
+
# Paths are taken only from those pieces of the command that write. Before, they were taken from
|
|
107
|
+
# the whole line, and a read command chained with a write gave its paths up as write targets.
|
|
108
|
+
# `python3 <<PY … PY` next to `grep -n … projects/…` was refused for an edit of code that it did
|
|
109
|
+
# not contain. Refusals that fell on no file edit became the majority, and the price was paid by
|
|
110
|
+
# whoever merely read a neighbouring file on the same line.
|
|
91
111
|
#
|
|
92
|
-
#
|
|
93
|
-
#
|
|
94
|
-
#
|
|
112
|
+
# A piece is a top-level line, and inside it `;`, `&&` and `||`. A heredoc body is not torn from
|
|
113
|
+
# its command: it travels with it as one piece, because the interpreter's write path stands
|
|
114
|
+
# exactly there.
|
|
95
115
|
printf '%s' "$text" | awk '
|
|
96
116
|
function trim(s) { sub(/^[ \t]+/, "", s); sub(/[ \t]+$/, "", s); return s }
|
|
97
117
|
function flush( n, i, part) {
|
|
@@ -121,14 +141,14 @@ rt_shell_paths_default() {
|
|
|
121
141
|
| while IFS= read -r piece; do
|
|
122
142
|
[ -z "$piece" ] && continue
|
|
123
143
|
rt_shell_writes "$piece" || continue
|
|
124
|
-
#
|
|
125
|
-
#
|
|
126
|
-
#
|
|
127
|
-
#
|
|
128
|
-
#
|
|
144
|
+
# A piece that writes by a redirect alone gives up the write target, not every path-like
|
|
145
|
+
# word from its text. A file name named in an argument or in the content is not an edit
|
|
146
|
+
# of that file. A read command chained with a write into its own file demanded a rule by
|
|
147
|
+
# someone else's name and ended the turn. The price of such a refusal equals the price
|
|
148
|
+
# of a real one, because there is nothing to bypass it with.
|
|
129
149
|
#
|
|
130
|
-
#
|
|
131
|
-
#
|
|
150
|
+
# The other kinds of writing are parsed as before: for an in-place edit, a copy, a move
|
|
151
|
+
# and an interpreter the path stands in the command itself and not in one place.
|
|
132
152
|
if ! printf '%s' "$piece" | grep -Eq '\bsed\b[^|]*-i|\bperl\b[^|]*-i|\bpython3?\b|\bnode\b|\bruby\b|\bdd\b[^|]*of=|\bcp\b|\bmv\b|\brm\b|\btouch\b|\btruncate\b|\binstall\b|\bpatch\b|\bgit[[:space:]]+(checkout|restore|apply|stash)\b'; then
|
|
133
153
|
printf '%s' "$piece" \
|
|
134
154
|
| grep -oE '(>>?[[:space:]]*|\btee\b([[:space:]]+-a)?[[:space:]]+)[A-Za-z0-9_@.~/-]+' \
|
|
@@ -1,44 +1,45 @@
|
|
|
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
|
-
|
|
1
|
+
# Turn map
|
|
2
|
+
|
|
3
|
+
This is not the rule but its short digest: the rule explains, the map names. The full text is
|
|
4
|
+
rule `task-flow`; it also names the pattern that leads each state. What a turn ends with is
|
|
5
|
+
rule `turn-conduct` under the same law.
|
|
6
|
+
|
|
7
|
+
The work state is declared by a line in the "Where we stand" section of the progress. Until the
|
|
8
|
+
mandatory action is done, the work stays in the same state.
|
|
9
|
+
|
|
10
|
+
## States and mandatory actions
|
|
11
|
+
|
|
12
|
+
- `просьба-не-разобрана` — explore the tree, then ask; leads `task-flow-start`
|
|
13
|
+
- `разбор-закрыт` — the product agreement or the reason there is none; leads `task-flow-start`
|
|
14
|
+
- `договорённость-записана` — create the task, the branch and the folder; leads `task-flow-start`
|
|
15
|
+
- `задача-взята` — write the plan; leads `task-flow-start`
|
|
16
|
+
- `замысел-записан` — do the first stage; leads `task-flow-start`
|
|
17
|
+
- `этап-идёт` — finish the stage and mark it in the progress; leads `task-flow-resume`
|
|
18
|
+
- `этапы-кончились` — run the check set and open the PR as a draft; leads `task-flow-close`
|
|
19
|
+
- `работа-отдана` — take the next task; leads `task-flow-resume`
|
|
20
|
+
- `разбор-кончился` — merge the agreement, bring the texts up to date, take the folder apart; leads `task-flow-close`
|
|
21
|
+
- `папка-разобрана` — leave draft and ask for the merge; leads `task-flow-archive`
|
|
22
|
+
- `влито` — the rules review of the work and the queue audit; leads `task-flow-archive`
|
|
23
|
+
|
|
24
|
+
No state has a mandatory action that sounds like "wait". The run, the owner's review and the
|
|
25
|
+
merge go on without the executor and do not get faster from being watched.
|
|
26
|
+
|
|
27
|
+
## What a turn ends with
|
|
28
|
+
|
|
29
|
+
There are four ways, and no others.
|
|
30
|
+
|
|
31
|
+
- **a question to the owner that the rules do not answer** — the question is asked, and the rules were read in the same turn
|
|
32
|
+
- **a guard refusal** — the refusal is named to the owner, no workaround was looked for
|
|
33
|
+
- **the window filled where there is no compaction** — the progress is written up, the handover is written
|
|
34
|
+
- **work handed over, and the next one started** — the PR is open, and an action on the next task is done, not announced
|
|
35
|
+
|
|
36
|
+
Where the tree has set the compaction threshold below the stop threshold, a filled window does
|
|
37
|
+
not end the turn: the context is compacted, the handover arrives as the entry, and the work goes
|
|
38
|
+
on in the same session. The stop threshold there is insurance for the case when compaction did
|
|
39
|
+
not come.
|
|
40
|
+
|
|
41
|
+
Everything else is the turn going on. A turn does not end with a commit, a written plan, a
|
|
42
|
+
closed grill, a read agreement, a green check, a summary of someone else's step, an announced
|
|
43
|
+
intention or a command named but not run. A transition from state to state even less so: the
|
|
44
|
+
mandatory action is done, and the next one is done in the same turn. Only what is done may be
|
|
45
|
+
named.
|
package/assets/docs/GLOSSARY.md
CHANGED
|
@@ -1,68 +1,145 @@
|
|
|
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
|
-
- **PR** —
|
|
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
|
-
|
|
1
|
+
# Project glossary
|
|
2
|
+
|
|
3
|
+
Words that mean something definite in this tree. Read before writing a spec, a rule, a comment,
|
|
4
|
+
a commit body or a PR description: a word from here is used in the meaning given here, and a word
|
|
5
|
+
that is not here is either added here by the same change or replaced with a plain one.
|
|
6
|
+
|
|
7
|
+
Terms of one domain live in the "Terminology" section of its spec; here are only those that run
|
|
8
|
+
through the whole project.
|
|
9
|
+
|
|
10
|
+
The sections below are shipped by the package: they are the words of the rules layer, and they
|
|
11
|
+
mean the same everywhere the layer is installed. Subject words are added by the tree in its own
|
|
12
|
+
sections through the override; they merge here by heading, and a package edit does not touch them.
|
|
13
|
+
|
|
14
|
+
## Rules layer
|
|
15
|
+
|
|
16
|
+
- **Law** — a file in the constitution directory: what must be true, without paths or file names. True for any application of this class
|
|
17
|
+
- **Application laws** — the layer of laws true only for this application: payments, locales, access. Subject matter is lawful there: it is their subject
|
|
18
|
+
- **Rule** — a skill with `kind: rule`. Binds a law to this tree: what it is called here and where it lives
|
|
19
|
+
- **Pattern** — a skill with `kind: pattern`. Ready-made code and a sequence of steps; stands next to a rule
|
|
20
|
+
- **Companion** — the `implementation.md` file next to a rule: names and paths of this tree. The package knows the technique and does not know the names; the project writes them
|
|
21
|
+
- **Spec** — a description of a domain: how it works. Speaks of what is settled, not of what is coming
|
|
22
|
+
- **Domain** — a subject with a spec of its own. A domain that has grown splits into subdomains, not into neighbouring domains
|
|
23
|
+
- **Scenario** — observable behaviour under the number `SC-<PREFIX>-<NUMBER>`. The number stands in the test title
|
|
24
|
+
- **Binding** — a `` `file:symbol` `` line in a companion or in a spec sidecar: the place where a statement is carried out
|
|
25
|
+
- **Sidecar** — a file next to a spec or a rule: a companion, a list of scenarios
|
|
26
|
+
- **Product agreement** — how the product will behave, written before the code: the only place where a spec speaks of the future. After the rollout it merges into the domain spec
|
|
27
|
+
- **Resource** — a unit of what the rules package ships: a law, a rule, a pattern, a guard, a check, a role, a command, a pipeline, a template, a default, a document
|
|
28
|
+
- **Layout** — the transfer of a resource from the package into the tree, by its kind and by the layer settings
|
|
29
|
+
- **Laid-out file** — a file in the tree with the package header. Edited through the override, not in place: an in-place edit is lost on the next layout
|
|
30
|
+
- **Override** — a file of the tree that merges with the laid-out file by section headings
|
|
31
|
+
- **Disabled role** — a role whose call the tree no longer treats as mandatory: the guard stays silent about it. Named in a list in the tree settings, not removed from the layout, and called by hand
|
|
32
|
+
- **Observation** — a line about an event of the rules layer: a rule was loaded, a gate refused, a guard declined. Written by a guard, lives in the tree, leaves as counters. Not called a log
|
|
33
|
+
- **Digest** — what the observations say over a span of days: what was used, what never was, what people stumbled on
|
|
34
|
+
- **Proposal** — a ready-made wording of a rules edit with an address: the package, a companion or the tree. A person sends it with a command
|
|
35
|
+
- **Remark** — a person's reply in the middle of work, about the rules layer: what gets in the way, what was missing, what went wrong. Lands as a block in the proposals file instead of living until the end of the session
|
|
36
|
+
|
|
37
|
+
## Work
|
|
38
|
+
|
|
39
|
+
- **Task** — a unit of work in the work queue. Created before the branch, and its number stands in the branch name and in the PR title
|
|
40
|
+
- **PR** — the request to merge: the same name as the task, turned into what was done. Not called a report or a pull request, neither in files nor in conversation
|
|
41
|
+
- **Work queue** — the board where the state of every task is visible. It does not see branches
|
|
42
|
+
- **Task folder** — one piece of work from grill to merge: the grill of the request, the plan, the progress. Dies with the merge: it is taken apart, and what explains a decision moves to the archive
|
|
43
|
+
- **Grill** — questioning the owner before the first edit. Written in the owner's words and never rewritten afterwards
|
|
44
|
+
- **Plan** — a file of the task folder: the task footprint and the stages with readiness signs. Not edited after it is written; the result is checked against it at acceptance
|
|
45
|
+
- **Progress** — a file of the task folder: "Where we stand", decisions along the way with reasons, session entries. The only place where done work is marked. Not called a log
|
|
46
|
+
- **Work state** — the unit by which work is conducted: each has a named entry, a mandatory action and an exit. Declared by a line in the "Where we stand" section of the progress, and the guard judges it, not the presence of files
|
|
47
|
+
- **Task footprint** — a section of the plan: which specs, laws, rules and parts of the code the work touches
|
|
48
|
+
- **Session** — one sitting of work on a task. Work lives longer than a session, and between sessions its state is held by the progress
|
|
49
|
+
- **Window fill** — the share of the session's room already taken: the input, the cache write, the cache read and the last reply's output, divided by the window size. Not "spend" and not "budget": it is about room, not cost
|
|
50
|
+
- **Handover** — the text that closes a session: working tree, branch, task, where the progress lies, what is done, the next step, what was special about the session. Placed outside the tree and not committed
|
|
51
|
+
- **Epic** — a series of tasks on one theme in an assigned order, wider than one branch. Lives in two places: a card with the epic label and a plan next to it. Not called a work line
|
|
52
|
+
- **Archive** — records of what has happened: what explains a closed decision. Not edited after the rollout
|
|
53
|
+
|
|
54
|
+
## Checks
|
|
55
|
+
|
|
56
|
+
- **Guard** — an agent hook that refuses an action before it is done and says what lifts the refusal
|
|
57
|
+
- **Gate** — a requirement that lets an action through once per session after it has been met: the rule is loaded, the checks have passed
|
|
58
|
+
- **Fail-open** — the design of a guard under which any breakage of the guard lets the action through. A broken guard has no right to stop work altogether
|
|
59
|
+
- **Run** — a launch of a set of scenarios. "Tests are run", not "put into work"
|
|
60
|
+
- **Audit** — a check that edits nothing and names discrepancies: of the layout against the package, of specs against the code, of the work queue against the branches
|
|
61
|
+
- **Measurement** — a number taken from the running application. A look at the screen is not a measurement
|
|
62
|
+
|
|
63
|
+
## Russian names
|
|
64
|
+
|
|
65
|
+
The layer names its notions in English, and the owner reads about them in Russian. By this table
|
|
66
|
+
a session writes a task, a PR description or a reply to the owner: one Russian name per English
|
|
67
|
+
one, so that the same notion does not arrive under three names.
|
|
68
|
+
|
|
69
|
+
| English | Russian |
|
|
70
|
+
| ----------------- | ------------------------- |
|
|
71
|
+
| application laws | законы приложения |
|
|
72
|
+
| archive | архив |
|
|
73
|
+
| audit | сверка |
|
|
74
|
+
| binding | привязка |
|
|
75
|
+
| check | проверка |
|
|
76
|
+
| companion | компаньон |
|
|
77
|
+
| digest | сводка |
|
|
78
|
+
| disabled role | выключенная роль |
|
|
79
|
+
| domain | домен |
|
|
80
|
+
| draft | черновик |
|
|
81
|
+
| epic | эпик |
|
|
82
|
+
| executor | исполнитель |
|
|
83
|
+
| fail-open | отказ в пользу работы |
|
|
84
|
+
| gate | гейт |
|
|
85
|
+
| grill | разбор |
|
|
86
|
+
| guard | гард |
|
|
87
|
+
| handover | передача |
|
|
88
|
+
| hook | хук |
|
|
89
|
+
| laid-out file | разложенный файл |
|
|
90
|
+
| law | закон |
|
|
91
|
+
| layout | раскладка |
|
|
92
|
+
| measurement | замер |
|
|
93
|
+
| merge | слияние |
|
|
94
|
+
| observation | наблюдение |
|
|
95
|
+
| override | надстройка |
|
|
96
|
+
| owner | владелец |
|
|
97
|
+
| pattern | паттерн |
|
|
98
|
+
| pipeline, step | конвейер, шаг |
|
|
99
|
+
| plan | замысел |
|
|
100
|
+
| PR | PR, заявка |
|
|
101
|
+
| product agreement | договорённость о продукте |
|
|
102
|
+
| progress | ход работы |
|
|
103
|
+
| proposal | предложение |
|
|
104
|
+
| remark | слово |
|
|
105
|
+
| resource | ресурс |
|
|
106
|
+
| role | роль |
|
|
107
|
+
| rollout | выкатка |
|
|
108
|
+
| rule | правило |
|
|
109
|
+
| rules layer | слой правил |
|
|
110
|
+
| run | прогон |
|
|
111
|
+
| scenario | сценарий |
|
|
112
|
+
| session | заход |
|
|
113
|
+
| sidecar | спутник |
|
|
114
|
+
| skill | скил |
|
|
115
|
+
| spec | спек |
|
|
116
|
+
| stand | стенд |
|
|
117
|
+
| task | задача |
|
|
118
|
+
| task folder | папка задачи |
|
|
119
|
+
| task footprint | след задачи |
|
|
120
|
+
| tree | дерево |
|
|
121
|
+
| window fill | заполнение окна |
|
|
122
|
+
| work queue | очередь работ |
|
|
123
|
+
| work state | состояние работы |
|
|
124
|
+
|
|
125
|
+
## Not written here
|
|
126
|
+
|
|
127
|
+
On the left is what is neither written nor said anywhere; on the right is what it is called here.
|
|
128
|
+
|
|
129
|
+
- **ticket** — task
|
|
130
|
+
- **pull request, merge request** — PR, and the action is a merge
|
|
131
|
+
- **issue (of a task)** — task; the issue is what the hosting keeps under the same number
|
|
132
|
+
- **report (of a PR)** — PR; a report is a summary of data, and the word is taken by it
|
|
133
|
+
- **job** — a pipeline step
|
|
134
|
+
- **context window** — the session window, and its share is the window fill
|
|
135
|
+
- **log (of observations or of the progress)** — observation, progress
|
|
136
|
+
- **spec (of a test file)** — test, a file next to its source; a spec is a document
|
|
137
|
+
- **skill (of a rule or a pattern)** — rule, pattern or a skill without a law, by what it really is
|
|
138
|
+
|
|
139
|
+
### Russian words for texts to the owner
|
|
140
|
+
|
|
141
|
+
Tasks, PR descriptions, commit bodies and chat replies are written in the owner's language, and
|
|
142
|
+
these words are not written or said there either.
|
|
66
143
|
|
|
67
144
|
- **спека (о тесте)** — тест — файл рядом с исходником; спек — документ. Одна буква разницы, а значения противоположны
|
|
68
145
|
- **таска, тикет** — задача
|