@rt-tools/agent-kit 0.24.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agents/business-analyst.md +51 -50
- package/assets/agents/cargo-writer.md +54 -0
- package/assets/agents/conscience.md +37 -35
- package/assets/agents/project-manager.md +49 -48
- package/assets/agents/prose-editor.md +31 -29
- package/assets/agents/qa-engineer.md +50 -48
- package/assets/agents/rules-reviewer.md +63 -58
- package/assets/agents/skill-curator.md +83 -78
- package/assets/agents/spec-critic.md +34 -29
- package/assets/agents/spec-writer.md +35 -32
- package/assets/agents/strict-teacher.md +39 -37
- package/assets/checks/archive-age.mjs +48 -28
- package/assets/checks/archive-prune.mjs +16 -14
- package/assets/checks/board-epic-link.github.mjs +29 -0
- package/assets/checks/board-epics.github.mjs +286 -49
- package/assets/checks/board-folders.mjs +61 -0
- package/assets/checks/board-gh.github.mjs +35 -26
- package/assets/checks/board-long-work.github.mjs +29 -25
- package/assets/checks/board-paths.github.mjs +21 -16
- package/assets/checks/board-pull-state.github.mjs +168 -0
- package/assets/checks/board-runs.github.mjs +45 -43
- package/assets/checks/board-task-dirs.github.mjs +98 -0
- package/assets/checks/board-titles.github.mjs +19 -17
- package/assets/checks/board.github.mjs +133 -194
- package/assets/checks/check-archive-age.mjs +23 -19
- package/assets/checks/check-board.github.mjs +131 -263
- package/assets/checks/check-descriptions.mjs +30 -29
- package/assets/checks/check-doc-paths.mjs +91 -88
- package/assets/checks/check-dupes.mjs +84 -80
- package/assets/checks/check-file-size.mjs +74 -71
- package/assets/checks/check-glossary.mjs +47 -37
- package/assets/checks/check-hook-scope.mjs +30 -27
- package/assets/checks/check-lib-layers.mjs +22 -21
- package/assets/checks/check-profile-drift.mjs +48 -43
- package/assets/checks/check-prose-style.mjs +138 -39
- package/assets/checks/check-push-gate.mjs +53 -50
- package/assets/checks/check-reuse.mjs +50 -40
- package/assets/checks/check-schema-drift.mjs +104 -84
- package/assets/checks/check-specs.mjs +155 -134
- package/assets/checks/check-state-next.mjs +66 -52
- package/assets/checks/check-states.mjs +32 -30
- package/assets/checks/check-styles.mjs +52 -51
- package/assets/checks/check-turn-map.mjs +54 -46
- package/assets/checks/epic-table.github.mjs +268 -0
- package/assets/checks/lib-boundaries.mjs +32 -30
- package/assets/checks/lib-common.mjs +30 -29
- package/assets/checks/lib-domains.mjs +34 -34
- package/assets/checks/lib-manifests.mjs +17 -15
- package/assets/checks/lib-reexports.mjs +18 -18
- package/assets/checks/rt-kit-checks.config.mjs +187 -142
- package/assets/checks/signals.mjs +43 -39
- package/assets/checks/spec-anchors.mjs +114 -87
- package/assets/checks/spec-common.mjs +128 -84
- package/assets/checks/spec-contract.mjs +30 -30
- package/assets/checks/spec-proposed.mjs +27 -24
- package/assets/checks/spec-scenarios.mjs +51 -28
- package/assets/checks/specs-for.mjs +214 -0
- package/assets/checks/task-new.github.mjs +315 -61
- package/assets/commands/feedback.md +65 -59
- package/assets/commands/next-session.md +64 -57
- package/assets/commands/night.md +115 -0
- package/assets/commands/skill-curator.md +83 -79
- package/assets/defaults/gate-map.sh +108 -97
- package/assets/defaults/project.sh +232 -185
- package/assets/defaults/shell.sh +73 -68
- package/assets/defaults/turn-map.md +47 -44
- package/assets/docs/GLOSSARY.md +142 -65
- package/assets/hooks/browser-device-id.sh +16 -12
- package/assets/hooks/browser-guard-device-id.sh +34 -28
- package/assets/hooks/browser-guard-no-asking.sh +5 -4
- package/assets/hooks/browser-guard-no-listing.sh +12 -11
- package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
- package/assets/hooks/browser-guard-require-select.sh +34 -23
- package/assets/hooks/claim-guard.sh +62 -56
- package/assets/hooks/commit-msg.sh +14 -10
- package/assets/hooks/conscience-guard.sh +91 -45
- package/assets/hooks/constitution-index.sh +16 -16
- package/assets/hooks/deny-tail.sh +28 -26
- package/assets/hooks/dev-server-guard.sh +50 -43
- package/assets/hooks/dispatch.sh +60 -46
- package/assets/hooks/docs-guard.sh +100 -91
- package/assets/hooks/epic-over.sh +49 -0
- package/assets/hooks/epic-stop-guard.sh +108 -0
- package/assets/hooks/exam-guard.sh +105 -93
- package/assets/hooks/git-guard-delivery-conflict.sh +41 -36
- package/assets/hooks/git-guard-delivery-draft.sh +48 -38
- package/assets/hooks/git-guard-delivery-epic.sh +167 -0
- package/assets/hooks/git-guard-delivery-folder.sh +50 -43
- package/assets/hooks/git-guard-delivery-signature.sh +119 -53
- package/assets/hooks/git-guard-delivery.sh +223 -183
- package/assets/hooks/git-guard-main.sh +38 -34
- package/assets/hooks/git-guard-push-tests.sh +99 -87
- package/assets/hooks/glossary-load.sh +23 -22
- package/assets/hooks/grill-gate-ask.sh +12 -11
- package/assets/hooks/grill-gate.sh +94 -87
- package/assets/hooks/guard-note.sh +20 -19
- package/assets/hooks/handoff-entry-guard.sh +45 -25
- package/assets/hooks/handoff-write.sh +74 -67
- package/assets/hooks/hook-input.sh +67 -58
- package/assets/hooks/lint-after-edit.sh +95 -61
- package/assets/hooks/observe.sh +28 -26
- package/assets/hooks/override-write-guard.sh +23 -21
- package/assets/hooks/postmortem-guard.sh +42 -39
- package/assets/hooks/profile-check.sh +22 -20
- package/assets/hooks/proposal-guard.sh +57 -49
- package/assets/hooks/prose-style-guard.sh +49 -24
- package/assets/hooks/qa-dataid-guard.sh +83 -58
- package/assets/hooks/rerun-guard.sh +31 -30
- package/assets/hooks/reuse-first-guard.sh +108 -87
- package/assets/hooks/roles.sh +14 -14
- package/assets/hooks/rule-article.sh +39 -34
- package/assets/hooks/rule-source-guard.sh +47 -42
- package/assets/hooks/skill-gate-layers.sh +63 -57
- package/assets/hooks/skill-gate-rearm.sh +15 -8
- package/assets/hooks/skill-gate.sh +89 -81
- package/assets/hooks/skill-loaded.sh +10 -6
- package/assets/hooks/sql-guard-parse.sh +71 -66
- package/assets/hooks/sql-guard-request.sh +51 -46
- package/assets/hooks/sql-guard-target.sh +60 -51
- package/assets/hooks/sql-guard-write.sh +87 -79
- package/assets/hooks/sql-guard.sh +52 -47
- package/assets/hooks/stand-login-guard.sh +43 -37
- package/assets/hooks/task-context-load.sh +60 -55
- package/assets/hooks/task-flow-context.sh +87 -69
- package/assets/hooks/task-flow-draft-guard.sh +55 -48
- package/assets/hooks/task-flow-guard.sh +67 -64
- package/assets/hooks/turn-entry-load.sh +39 -32
- package/assets/hooks/turn-exit-guard.sh +260 -204
- package/assets/hooks/turn-exit-patterns.sh +63 -0
- package/assets/hooks/utf8.sh +14 -11
- package/assets/hooks/waiting-turn-guard.sh +104 -94
- package/assets/hooks/window-fill-guard.sh +70 -62
- package/assets/hooks/work-start-guard.sh +52 -49
- package/assets/hooks/write-targets.sh +99 -44
- package/assets/laws/autonomous-work.md +29 -27
- package/assets/laws/code-structure.md +31 -30
- package/assets/laws/delivery.md +170 -137
- package/assets/laws/entity-editing.md +52 -50
- package/assets/laws/entity-models.md +14 -13
- package/assets/laws/frontend-application.md +39 -38
- package/assets/laws/lib-imports.md +27 -27
- package/assets/laws/lists.md +31 -29
- package/assets/laws/navigation.md +37 -37
- package/assets/laws/observability.md +41 -40
- package/assets/laws/project-documentation.md +106 -99
- package/assets/laws/reuse-first.md +31 -29
- package/assets/laws/shared-code.md +27 -27
- package/assets/laws/verifiability.md +131 -124
- package/assets/laws/work-conduct.md +250 -244
- package/assets/patterns/admin-lists-screen.md +72 -69
- package/assets/patterns/admin-nav-item.md +51 -46
- package/assets/patterns/angular-patterns-state.md +32 -31
- package/assets/patterns/api-layer-pair.md +33 -31
- package/assets/patterns/autonomous-work-run.md +50 -49
- package/assets/patterns/browser-verification-measure.md +124 -88
- package/assets/patterns/browser-verification-stand.md +169 -157
- package/assets/patterns/component-structure-new.md +51 -42
- package/assets/patterns/dependencies-upgrade.md +55 -39
- package/assets/patterns/doc-style-human.md +55 -37
- package/assets/patterns/doc-style-sweep.md +82 -79
- package/assets/patterns/doc-style-trace.md +87 -81
- package/assets/patterns/doc-style-write.md +130 -122
- package/assets/patterns/entity-aside.md +77 -63
- package/assets/patterns/entity-models-new.md +37 -37
- package/assets/patterns/entity-store.md +33 -33
- package/assets/patterns/git-workflow-commit.azure.md +94 -87
- package/assets/patterns/git-workflow-commit.github.md +160 -142
- package/assets/patterns/git-workflow-commit.gitlab.md +96 -90
- package/assets/patterns/git-workflow-docker.md +165 -147
- package/assets/patterns/git-workflow-freshness.md +45 -45
- package/assets/patterns/git-workflow-merge.md +102 -94
- package/assets/patterns/git-workflow-migration.md +54 -52
- package/assets/patterns/git-workflow-pr-ready.md +57 -56
- package/assets/patterns/git-workflow-pr.azure.md +127 -122
- package/assets/patterns/git-workflow-pr.github.md +186 -177
- package/assets/patterns/git-workflow-pr.gitlab.md +139 -132
- package/assets/patterns/git-workflow-restart.md +35 -31
- package/assets/patterns/git-workflow-secrets.md +80 -73
- package/assets/patterns/git-workflow-stack.md +136 -107
- package/assets/patterns/lib-layers-move.md +62 -53
- package/assets/patterns/lib-layers-new.md +59 -45
- package/assets/patterns/observability-record.md +72 -67
- package/assets/patterns/platform-access-di.md +31 -29
- package/assets/patterns/reuse-first-extend.md +66 -61
- package/assets/patterns/shared-code-new.md +39 -38
- package/assets/patterns/spec-driven-domain.md +161 -151
- package/assets/patterns/spec-driven-rule.md +179 -168
- package/assets/patterns/spec-driven-sweep.md +41 -39
- package/assets/patterns/status-report-table.github.md +48 -36
- package/assets/patterns/styling-bem-component.md +42 -42
- package/assets/patterns/styling-bem-layout.md +39 -34
- package/assets/patterns/styling-bem-sheet.md +59 -58
- package/assets/patterns/task-flow-archive.md +222 -215
- package/assets/patterns/task-flow-close.md +234 -203
- package/assets/patterns/task-flow-handoff.md +154 -145
- package/assets/patterns/task-flow-resume.md +138 -133
- package/assets/patterns/task-flow-start.md +228 -202
- package/assets/patterns/testing-e2e.md +102 -101
- package/assets/patterns/testing-unit.md +77 -70
- package/assets/patterns/ts-procedure.md +32 -29
- package/assets/patterns/turn-entry-map.md +50 -48
- package/assets/pitfalls/agent-kit.md +172 -142
- package/assets/pitfalls/doc-style.md +96 -91
- package/assets/pitfalls/git-workflow.azure.md +49 -46
- package/assets/pitfalls/git-workflow.github.md +270 -234
- package/assets/pitfalls/git-workflow.gitlab.md +49 -45
- package/assets/pitfalls/spec-driven.md +73 -71
- package/assets/pitfalls/styling-bem.md +46 -40
- package/assets/pitfalls/task-flow.md +262 -246
- package/assets/pitfalls/testing.md +99 -92
- package/assets/pitfalls/turn-conduct.md +96 -81
- package/assets/rules/angular-patterns.md +81 -80
- package/assets/rules/api-layer.md +77 -74
- package/assets/rules/autonomous-work.md +87 -74
- package/assets/rules/browser-verification.md +223 -214
- package/assets/rules/component-structure.md +72 -69
- package/assets/rules/dependencies.md +74 -67
- package/assets/rules/deploy-flow.azure.md +118 -108
- package/assets/rules/deploy-flow.github.md +145 -135
- package/assets/rules/deploy-flow.gitlab.md +120 -110
- package/assets/rules/doc-style.md +201 -173
- package/assets/rules/entity-conventions.needs-admin.md +81 -79
- package/assets/rules/entity-models.md +73 -70
- package/assets/rules/git-workflow.azure.md +224 -228
- package/assets/rules/git-workflow.github.md +268 -239
- package/assets/rules/git-workflow.gitlab.md +218 -217
- package/assets/rules/lib-layers.md +85 -86
- package/assets/rules/lists.md +101 -97
- package/assets/rules/navigation.md +78 -78
- package/assets/rules/observability.needs-app.md +165 -153
- package/assets/rules/platform-access.md +76 -75
- package/assets/rules/reuse-first.md +153 -143
- package/assets/rules/shared-code.md +82 -79
- package/assets/rules/spec-driven.md +279 -260
- package/assets/rules/status-report.md +62 -58
- package/assets/rules/styling-bem.md +81 -77
- package/assets/rules/task-flow.md +303 -270
- package/assets/rules/testing.md +224 -209
- package/assets/rules/turn-conduct.md +262 -258
- package/assets/rules/turn-entry.md +92 -87
- package/assets/rules/typescript-conventions.md +94 -88
- package/assets/samples/specs/_template/spec.md +47 -47
- package/assets/samples/tasks/_template/grill.md +20 -20
- package/assets/samples/tasks/_template/plan.md +32 -30
- package/assets/samples/tasks/_template/progress.md +16 -16
- package/assets/skills/agent-kit-extend.md +129 -113
- package/assets/skills/agent-kit.md +259 -233
- package/assets/skills/write-a-skill.md +76 -71
- package/assets/templates/findings.md +19 -19
- package/assets/templates/gate-map.sh +16 -14
- package/assets/templates/implementation.md +28 -27
- package/assets/templates/pattern.md +17 -17
- package/assets/templates/pitfalls.md +6 -6
- package/assets/templates/postmortem.md +24 -23
- package/assets/templates/project.sh +24 -24
- package/assets/templates/proposal.md +62 -60
- package/assets/templates/rule.md +38 -38
- package/assets/workflows/feature.js +46 -46
- package/assets/workflows/plan.js +54 -54
- package/bin/agent-kit.d.ts.map +1 -1
- package/bin/agent-kit.js +8 -1
- package/bin/agent-kit.js.map +1 -1
- package/lib/cargo-prose.d.ts +41 -0
- package/lib/cargo-prose.d.ts.map +1 -0
- package/lib/cargo-prose.js +88 -0
- package/lib/cargo-prose.js.map +1 -0
- package/lib/cargo.d.ts +12 -1
- package/lib/cargo.d.ts.map +1 -1
- package/lib/cargo.js +8 -2
- package/lib/cargo.js.map +1 -1
- package/lib/catalog.d.ts +2 -0
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +4 -3
- package/lib/catalog.js.map +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +5 -2
- package/lib/commands.js.map +1 -1
- package/lib/companion.js +3 -2
- package/lib/companion.js.map +1 -1
- package/lib/enroll.d.ts +7 -1
- package/lib/enroll.d.ts.map +1 -1
- package/lib/enroll.js +12 -3
- package/lib/enroll.js.map +1 -1
- package/lib/fate.d.ts +29 -0
- package/lib/fate.d.ts.map +1 -0
- package/lib/fate.js +147 -0
- package/lib/fate.js.map +1 -0
- package/lib/override-marks.d.ts +7 -0
- package/lib/override-marks.d.ts.map +1 -1
- package/lib/override-marks.js +14 -0
- package/lib/override-marks.js.map +1 -1
- package/lib/plan.d.ts +11 -0
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +10 -1
- package/lib/plan.js.map +1 -1
- package/lib/ship.d.ts +29 -9
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +44 -2
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.fixture.d.ts +8 -1
- package/lib/shipment.fixture.d.ts.map +1 -1
- package/lib/shipment.fixture.js +9 -0
- package/lib/shipment.fixture.js.map +1 -1
- package/lib/shipment.js +38 -5
- package/lib/shipment.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +45 -11
- package/lib/sync.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.27.0.tgz +0 -0
- package/rt-tools-agent-kit-0.24.0.tgz +0 -0
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
2
|
+
# Tree profile: what checks an edit here and what counts as reinvention.
|
|
3
3
|
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
4
|
+
# The package default. Everything the trees of this workshop have in common lives here: the Nx
|
|
5
|
+
# runner, the code linter, the style linter, the set of reinvention samples. A tree adds its own by
|
|
6
|
+
# an override — `.claude/rt-kit/project.sh`: it loads second, declares the same function anew and
|
|
7
|
+
# may call the same one from here with the `_default` suffix.
|
|
8
8
|
#
|
|
9
|
-
#
|
|
9
|
+
# Every function may stay silent. Silence means "there is no rule for this", and the hook lets it
|
|
10
|
+
# through.
|
|
10
11
|
|
|
11
|
-
#
|
|
12
|
-
#
|
|
12
|
+
# The package runner — by the lockfile, not by agreement: trees with pnpm and with npm lie in one
|
|
13
|
+
# workshop, and an `npm` hardwired here would, in the first of them, print a command that does not
|
|
14
|
+
# exist.
|
|
13
15
|
rt_runner() {
|
|
14
16
|
root="${CLAUDE_PROJECT_DIR:-.}"
|
|
15
17
|
if [ -f "$root/pnpm-lock.yaml" ]; then
|
|
@@ -21,47 +23,51 @@ rt_runner() {
|
|
|
21
23
|
fi
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
+
# Where the applications are up. Goes into the refusal text when someone raises a second instance.
|
|
27
|
+
# Ports differ from tree to tree, so the default stays silent: naming someone else's port is worse
|
|
28
|
+
# than naming none.
|
|
26
29
|
RT_STANDS="${RT_STANDS:-}"
|
|
27
30
|
|
|
28
|
-
#
|
|
29
|
-
#
|
|
31
|
+
# Where the tree's checks and the scenario set of its guards lie. A check the tree does not have is
|
|
32
|
+
# not called by the push gate: the list is printed from what lies on disk.
|
|
30
33
|
RT_CHECKS_DIR="${RT_CHECKS_DIR:-tools}"
|
|
31
34
|
RT_HOOKS_TESTS="${RT_HOOKS_TESTS:-.claude/hooks/tests/run.sh}"
|
|
32
35
|
|
|
33
|
-
#
|
|
34
|
-
#
|
|
36
|
+
# The commands that must pass before a push. One per line; the first one that fails refuses the
|
|
37
|
+
# push. The style linter on a separate line: the code linter does not read style files at all.
|
|
35
38
|
#
|
|
36
|
-
#
|
|
37
|
-
#
|
|
39
|
+
# The first parameter is the base: the branch against which the contribution is counted. Empty means
|
|
40
|
+
# there is no remote, and then everything runs: a set stricter than needed is safe, a set narrower
|
|
41
|
+
# than needed is not.
|
|
38
42
|
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
43
|
+
# The build runs alongside the lint and the specs. The linter does not read types, and the specs
|
|
44
|
+
# read only what someone brought into them by an import: a type error in uncovered code lives until
|
|
45
|
+
# the image build, that is, until the merge. It costs little — beyond that the runner cache works.
|
|
42
46
|
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
47
|
+
# A newly created check goes here, not only into the general run that nobody calls by themselves. A
|
|
48
|
+
# new line in its list of known cases leaves for the main branch silently, while the list is read as
|
|
49
|
+
# a working guard.
|
|
46
50
|
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
# Тронула ли ветка только тексты. Нулевой код — только тексты, иначе — код.
|
|
51
|
+
# The layout audit goes as the first line, for two reasons. It costs seconds, so it refuses before
|
|
52
|
+
# the long run begins. And before it, a drift of the laid-out copy from the package refused nothing.
|
|
53
|
+
# An edit put into the laid-out copy past the source breaks nothing on the day it is made, and
|
|
54
|
+
# surfaces on someone else's work: the layout refuses on the whole edited file and lays down not one
|
|
55
|
+
# other. The sign is the layout settings themselves: a tree without them does not install the
|
|
56
|
+
# package, and there is nothing to call in it.
|
|
54
57
|
#
|
|
55
|
-
#
|
|
56
|
-
# сборку образов. Без него такой шаг идёт подряд, чем бы ветка ни была, и пуш коммита, менявшего
|
|
57
|
-
# одну строку в таблице markdown, занимает минуты — за которые владелец успевает прочитать его
|
|
58
|
-
# как зависший и отбить. Правило поставки требует того же от конвейера: ветка, не тронувшая ни
|
|
59
|
-
# строки кода, не поднимает стенда, не снимает кадров и не собирает образов.
|
|
58
|
+
# Whether the branch touched only texts. Zero code — only texts, otherwise — code.
|
|
60
59
|
#
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
#
|
|
60
|
+
# The sign is needed by the tree that added a heavy step to the gate set: a stand, showcase
|
|
61
|
+
# snapshots, image builds. Without it such a step runs every time, whatever the branch is, and the
|
|
62
|
+
# push of a commit that changed one line in a markdown table takes minutes. In those minutes the
|
|
63
|
+
# owner manages to read it as hung and refuse it. The delivery rule demands the same from the
|
|
64
|
+
# pipeline: a branch that touched not one line of code raises no stand, takes no frames and builds
|
|
65
|
+
# no images.
|
|
66
|
+
#
|
|
67
|
+
# A branch counts as textual when every touched file is either `.md` or lies under the texts
|
|
68
|
+
# directory. Everything else, including the harness and settings, counts as code: the sign must err
|
|
69
|
+
# towards an extra run, not a missed one. An empty base means there is nothing to compare with —
|
|
70
|
+
# then the sign stays silent and everything runs.
|
|
65
71
|
rt_push_docs_only_default() {
|
|
66
72
|
[ -z "$1" ] && return 1
|
|
67
73
|
changed="$(git diff --name-only "$1"...HEAD 2>/dev/null)"
|
|
@@ -82,8 +88,9 @@ rt_push_checks_default() {
|
|
|
82
88
|
fi
|
|
83
89
|
[ -f "$root/stylelint.config.js" ] && printf '%s\n' "$runner stylelint \"**/*.scss\" --max-warnings 0"
|
|
84
90
|
|
|
85
|
-
#
|
|
86
|
-
#
|
|
91
|
+
# The guard scenarios are the same code as everything else: both the branch review and the
|
|
92
|
+
# confidence that the harness still works rest on them. The run takes seconds: it builds
|
|
93
|
+
# nothing.
|
|
87
94
|
[ -x "$root/$RT_HOOKS_TESTS" ] && printf '%s\n' "bash $RT_HOOKS_TESTS"
|
|
88
95
|
|
|
89
96
|
for check in check-doc-paths check-specs check-file-size check-dupes check-styles \
|
|
@@ -95,25 +102,26 @@ rt_push_checks_default() {
|
|
|
95
102
|
return 0
|
|
96
103
|
}
|
|
97
104
|
|
|
98
|
-
#
|
|
105
|
+
# Which document must travel by the same commit as this file. Prints a path pattern or stays silent.
|
|
99
106
|
rt_docs_pair_for_default() {
|
|
100
107
|
case "$1" in
|
|
101
|
-
#
|
|
108
|
+
# A test is not a description of the code: it checks it.
|
|
102
109
|
*.spec.ts) return 0 ;;
|
|
103
|
-
#
|
|
110
|
+
# The contract is edited together with the domain spec: having drifted apart, both lie.
|
|
104
111
|
*.proto) printf '%s' 'docs/specs/.*/spec\.md' ;;
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
#
|
|
112
|
+
# A rule and its sidecar are not named here: their pair is held by the guard itself, and
|
|
113
|
+
# held more precisely — it checks the section against the statements, not the fact of a file
|
|
114
|
+
# edit. A hook and its scenario set: the guard parses the text of commands, and a refinement
|
|
115
|
+
# of the pattern usually shifts the border rather than narrows it.
|
|
109
116
|
.claude/hooks/*.sh) printf '%s' '.claude/hooks/tests/.*' ;;
|
|
110
117
|
esac
|
|
111
118
|
}
|
|
112
119
|
|
|
113
|
-
#
|
|
120
|
+
# What this file is linted with right after the edit. Prints a command or stays silent.
|
|
114
121
|
#
|
|
115
|
-
#
|
|
116
|
-
#
|
|
122
|
+
# The path is substituted here rather than left as a positional parameter: the hook executes what is
|
|
123
|
+
# printed by evaluating the string, and `$1` in it would resolve to the hook's own parameter, that
|
|
124
|
+
# is, to nothing.
|
|
117
125
|
rt_lint_for_default() {
|
|
118
126
|
runner="$(rt_runner)"
|
|
119
127
|
case "$1" in
|
|
@@ -122,49 +130,52 @@ rt_lint_for_default() {
|
|
|
122
130
|
esac
|
|
123
131
|
}
|
|
124
132
|
|
|
125
|
-
#
|
|
126
|
-
#
|
|
133
|
+
# The directory of task folders. Empty — there is no conduct of work by a folder in the tree, and
|
|
134
|
+
# the plan guard stays silent. The directory of the project's texts: by it the edit composition sign
|
|
135
|
+
# tells a text branch from a code branch.
|
|
127
136
|
RT_DOCS_DIR="${RT_DOCS_DIR:-docs}"
|
|
128
137
|
|
|
129
138
|
RT_TASKS_DIR="${RT_TASKS_DIR:-docs/tasks}"
|
|
130
139
|
|
|
131
|
-
#
|
|
132
|
-
#
|
|
133
|
-
#
|
|
140
|
+
# The directory of records about finished work. What explains the decisions of a closed task is
|
|
141
|
+
# moved there. The delivery guard demands that a branch which removed a task folder add something
|
|
142
|
+
# here: removing is easier than taking apart, and the owner's words are written nowhere else.
|
|
134
143
|
RT_ARCHIVE_DIR="${RT_ARCHIVE_DIR:-docs/archive}"
|
|
135
144
|
|
|
136
|
-
#
|
|
137
|
-
#
|
|
138
|
-
#
|
|
145
|
+
# The size of the session window in tokens and the guard thresholds. Empty — there is no guard:
|
|
146
|
+
# there is nothing to count the share from, and a size derived from the session record would lie —
|
|
147
|
+
# the model is written there without a mark about the extended window. The tree sets it in the agent
|
|
148
|
+
# settings, by an environment variable of the same name.
|
|
139
149
|
#
|
|
140
|
-
#
|
|
141
|
-
#
|
|
142
|
-
#
|
|
143
|
-
#
|
|
144
|
-
#
|
|
145
|
-
#
|
|
150
|
+
# The same two numbers set the threshold at which the tool compacts the context itself — and so the
|
|
151
|
+
# threshold at which the session handover is written. In the agent settings they are answered by a
|
|
152
|
+
# pair: the autocompaction window size and the percentage share at which it comes. Having drifted
|
|
153
|
+
# apart, they give a session that either compacts before the handover is written or lives up to the
|
|
154
|
+
# window limit. Whether they are aligned is told by the layout status review; here the package has
|
|
155
|
+
# no values of its own, because the window belongs to the tree, not to it.
|
|
146
156
|
#
|
|
147
|
-
#
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
#
|
|
157
|
+
# Aligned means not matching numbers but spread ones. The compaction threshold must stand BELOW the
|
|
158
|
+
# stop threshold: what continues the session fires first, not what stops it. A matching pair is a
|
|
159
|
+
# race, and the guard wins it: it stands on the tool call, while compaction comes between turns.
|
|
160
|
+
# Exactly so the session halted at the threshold instead of continuing compacted — while the audit
|
|
161
|
+
# counted both sides as configured.
|
|
152
162
|
#
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
#
|
|
163
|
+
# How much lower is the tree's own number: compaction is not instant, and a difference of one
|
|
164
|
+
# percent satisfies the "below" requirement without saving the work. The margin is declared, not
|
|
165
|
+
# derived from the difference.
|
|
156
166
|
RT_WINDOW_TOKENS="${RT_WINDOW_TOKENS:-}"
|
|
157
167
|
RT_WINDOW_WARN_PCT="${RT_WINDOW_WARN_PCT:-40}"
|
|
158
168
|
RT_WINDOW_STOP_PCT="${RT_WINDOW_STOP_PCT:-50}"
|
|
159
169
|
RT_WINDOW_MARGIN_PCT="${RT_WINDOW_MARGIN_PCT:-5}"
|
|
160
170
|
|
|
161
|
-
#
|
|
162
|
-
#
|
|
171
|
+
# Where the session handover is put. Outside the tree: the work state lives in the progress and is
|
|
172
|
+
# committed, while the handover retells it for pasting into a new session and does not travel into
|
|
173
|
+
# history.
|
|
163
174
|
RT_HANDOFF_DIR="${RT_HANDOFF_DIR:-.claude/handoff}"
|
|
164
175
|
|
|
165
|
-
#
|
|
166
|
-
#
|
|
167
|
-
#
|
|
176
|
+
# The commands that pass after the stop threshold: the session closes with them. Refusing them would
|
|
177
|
+
# take away its only way to end. A call counts by the start of the line or right after a separator —
|
|
178
|
+
# a mention of a command in text does not count as a command.
|
|
168
179
|
rt_handoff_allowed_cmd_default() {
|
|
169
180
|
case "$1" in
|
|
170
181
|
git\ * | *[\;\&\|]\ *git\ * | *\$\(git\ *) return 0 ;;
|
|
@@ -175,43 +186,46 @@ rt_handoff_allowed_cmd_default() {
|
|
|
175
186
|
return 1
|
|
176
187
|
}
|
|
177
188
|
|
|
178
|
-
#
|
|
179
|
-
#
|
|
180
|
-
#
|
|
181
|
-
#
|
|
189
|
+
# Where the texts read before a question to the owner lie: laws, rules and product agreements. By
|
|
190
|
+
# them the conversation guard judges whether anything at all was read during the turn, and it names
|
|
191
|
+
# them in the hint. Empty for laws and rules at once — the tree does not get this requirement: there
|
|
192
|
+
# is nothing to read.
|
|
182
193
|
RT_LAWS_DIR="${RT_LAWS_DIR:-docs/constitution}"
|
|
183
194
|
RT_RULES_DIR="${RT_RULES_DIR:-.claude/skills}"
|
|
184
195
|
RT_SPECS_DIR="${RT_SPECS_DIR:-docs/specs}"
|
|
185
196
|
|
|
186
|
-
#
|
|
197
|
+
# The directory of plans that outlive one task: the order of an epic's tasks lies there, not in the
|
|
198
|
+
# rules.
|
|
187
199
|
RT_PLANS_DIR="${RT_PLANS_DIR:-docs/plans}"
|
|
188
200
|
|
|
189
|
-
#
|
|
190
|
-
#
|
|
201
|
+
# The main branch. The guard needs it to find the common ancestor and understand what the branch did
|
|
202
|
+
# with the task folder and with the archive. If there is no common ancestor, there is nothing to
|
|
203
|
+
# compare with — the check stays silent.
|
|
191
204
|
RT_MAIN_BRANCH="${RT_MAIN_BRANCH:-main}"
|
|
192
205
|
|
|
193
|
-
#
|
|
194
|
-
#
|
|
195
|
-
#
|
|
206
|
+
# The name of the hosting client in the launch line. By it the restart guard recognises the call:
|
|
207
|
+
# each kind of hosting has its own client, and a guessed name matches nothing. The default is
|
|
208
|
+
# written for the most common kind; a tree with other hosting names its own.
|
|
196
209
|
RT_HOST_CLI="${RT_HOST_CLI:-gh}"
|
|
197
210
|
|
|
198
|
-
#
|
|
199
|
-
#
|
|
211
|
+
# The PR body by its number. A bypass of a requirement is written in the PR, and the merge command
|
|
212
|
+
# does not carry it — only the number is there. An empty reply means "nobody to ask": then the
|
|
213
|
+
# bypass is looked for only in the command text.
|
|
200
214
|
rt_report_body_default() {
|
|
201
215
|
command -v gh >/dev/null 2>&1 || return 1
|
|
202
216
|
gh pr view "$1" --json body -q '.body' 2>/dev/null
|
|
203
217
|
}
|
|
204
218
|
|
|
205
|
-
#
|
|
219
|
+
# Whether this is application code. Success — yes, and then the edit demands a plan on disk.
|
|
206
220
|
#
|
|
207
|
-
#
|
|
208
|
-
#
|
|
209
|
-
#
|
|
221
|
+
# The sign is the path, not a judgement by eye: the judgement is made by the one it hinders, and the
|
|
222
|
+
# threshold drifts. Rules, texts, the harness and dependencies do not fall under the requirement —
|
|
223
|
+
# otherwise the grill of a task could not be conducted before the branch is created.
|
|
210
224
|
#
|
|
211
|
-
#
|
|
212
|
-
#
|
|
213
|
-
#
|
|
214
|
-
#
|
|
225
|
+
# The path is judged relative to the tree root. A directory with the word `projects` in its name
|
|
226
|
+
# occurs outside the repository too, and an edit of a file outside the root does not dispose of this
|
|
227
|
+
# branch's plan at all. The guards hand the whole absolute path here, and a substring pattern would
|
|
228
|
+
# match the agent's home directory exactly as it matches the tree's code.
|
|
215
229
|
rt_is_app_code_default() {
|
|
216
230
|
root="${CLAUDE_PROJECT_DIR:-$PWD}"
|
|
217
231
|
case "$1" in
|
|
@@ -225,123 +239,154 @@ rt_is_app_code_default() {
|
|
|
225
239
|
esac
|
|
226
240
|
}
|
|
227
241
|
|
|
228
|
-
#
|
|
229
|
-
#
|
|
242
|
+
# Parsing a shell command — whether it writes and which paths it names — lives in a neighbouring
|
|
243
|
+
# file: together with it the profile outgrew the length limit, and these two functions are read
|
|
244
|
+
# apart.
|
|
230
245
|
# shellcheck disable=SC1090
|
|
231
246
|
[ -f "$(dirname "${BASH_SOURCE[0]}")/shell.sh" ] && . "$(dirname "${BASH_SOURCE[0]}")/shell.sh"
|
|
232
247
|
|
|
233
|
-
#
|
|
234
|
-
#
|
|
248
|
+
# The name of a branch from which a PR may be opened: the task number stands in the name. The prefix
|
|
249
|
+
# is either the kind of edit or the work queue label: both forms carry the number, and that is what
|
|
250
|
+
# is needed.
|
|
235
251
|
#
|
|
236
|
-
#
|
|
237
|
-
#
|
|
238
|
-
#
|
|
252
|
+
# The tail after the number is lowercase and hyphenated. A branch name is read by eye in a list and
|
|
253
|
+
# typed by hand, and case in it distinguishes two branches that differ only by it — and the one
|
|
254
|
+
# needed is not found at the first switch.
|
|
239
255
|
rt_task_branch_ok_default() {
|
|
240
256
|
printf '%s' "$1" \
|
|
241
257
|
| grep -qE '^([A-Z]+-)?[0-9]+-[a-z0-9][a-z0-9-]*$|^(feat|fix|refactor|docs|chore|style|perf|test|build|ci)/[0-9]+-[a-z0-9][a-z0-9-]*$'
|
|
242
258
|
}
|
|
243
259
|
|
|
244
|
-
#
|
|
245
|
-
#
|
|
260
|
+
# The task number from the branch name. A second question to the same name: the form answers "is it
|
|
261
|
+
# fit", this one — "what is it", and they cannot be folded into one: one returns a code, the other a
|
|
262
|
+
# string.
|
|
246
263
|
#
|
|
247
|
-
#
|
|
248
|
-
#
|
|
249
|
-
#
|
|
250
|
-
#
|
|
264
|
+
# The forms are the same the form check above knows: the prefix is either the task key with a
|
|
265
|
+
# hyphen, or the kind of edit with a slash, or there is none at all. Having drifted from it, the
|
|
266
|
+
# parse would leave the form lawful and the number empty — and the check of the branch number
|
|
267
|
+
# against the PR title number would be skipped silently while looking matched.
|
|
251
268
|
#
|
|
252
|
-
#
|
|
253
|
-
#
|
|
254
|
-
#
|
|
269
|
+
# The tail after the number is deliberately not judged here. `RT-9_guest` is a miss in the
|
|
270
|
+
# separator, not a deliberately taskless branch, and the number has to be taken out of it so that
|
|
271
|
+
# the name form has something to be checked against. Requiring the hyphen left such a name without a
|
|
272
|
+
# number, and the guard let it through as a trial branch.
|
|
255
273
|
rt_task_branch_number_default() {
|
|
256
274
|
printf '%s' "$1" | sed -nE 's#^([A-Za-z]+[-/])?([0-9]+).*#\2#p'
|
|
257
275
|
}
|
|
258
276
|
|
|
259
|
-
#
|
|
260
|
-
#
|
|
261
|
-
#
|
|
277
|
+
# The address of the production storage: the pattern by which it is recognised on the command line —
|
|
278
|
+
# the tunnel port, the host, the domain. Any write by it is refused outright, and the opt-out does
|
|
279
|
+
# not apply. The default stays silent: someone else's address here is more dangerous than an unnamed
|
|
280
|
+
# one — it would refuse work with the local database.
|
|
262
281
|
RT_PROD_DSN="${RT_PROD_DSN:-}"
|
|
263
282
|
|
|
264
|
-
#
|
|
265
|
-
#
|
|
283
|
+
# The dev environment connections by sight: by the query text alone production cannot be told from a
|
|
284
|
+
# local copy, the database is chosen by the connection identifier. The identifiers are local to the
|
|
285
|
+
# machine.
|
|
266
286
|
RT_PROD_CONNECTIONS="${RT_PROD_CONNECTIONS:-}"
|
|
267
287
|
RT_LOCAL_CONNECTIONS="${RT_LOCAL_CONNECTIONS:-}"
|
|
268
288
|
|
|
269
|
-
#
|
|
289
|
+
# The ports of one-off databases: no question is asked about them. Not named — there is no exception
|
|
290
|
+
# at all.
|
|
270
291
|
RT_SCRATCH_PORT_RE="${RT_SCRATCH_PORT_RE:-}"
|
|
271
292
|
|
|
272
|
-
#
|
|
293
|
+
# The form of the number in the PR title. The same number stands on the task and on the branch.
|
|
273
294
|
RT_TASK_TITLE_RE="${RT_TASK_TITLE_RE:-^\[[A-Za-z]+-[0-9]+\][[:space:]]+[^[:space:]]}"
|
|
274
295
|
|
|
275
|
-
#
|
|
276
|
-
#
|
|
296
|
+
# What creates a task and what audits the work queue. They go into the refusal text of the delivery
|
|
297
|
+
# guard: a refusal without an action is bypassed, not carried out.
|
|
277
298
|
RT_TASK_NEW_CMD="${RT_TASK_NEW_CMD:-npm run task:new}"
|
|
278
299
|
RT_BOARD_CHECK_CMD="${RT_BOARD_CHECK_CMD:-npm run check:board}"
|
|
279
300
|
|
|
280
|
-
#
|
|
281
|
-
#
|
|
301
|
+
# What removes the archive records that outstayed their term. The progress guard does not judge this
|
|
302
|
+
# command. Records age by the calendar, and the term step goes red by itself, without a single edit
|
|
303
|
+
# in the branch. That includes a branch into which work is brought by merges and where no task
|
|
304
|
+
# folders are created at all. Demanding a plan for such a cleanup would leave the PR red with no way
|
|
305
|
+
# out. Empty — the command is not named, and there is no exit from under the guard.
|
|
306
|
+
RT_ARCHIVE_PRUNE_CMD="${RT_ARCHIVE_PRUNE_CMD:-}"
|
|
307
|
+
|
|
308
|
+
# The account that is set as the assignee and that opens the PR. The default stays silent: every
|
|
309
|
+
# tree has its own, and some have none at all.
|
|
282
310
|
RT_TASK_BOT="${RT_TASK_BOT:-}"
|
|
283
311
|
|
|
284
|
-
#
|
|
285
|
-
#
|
|
286
|
-
#
|
|
287
|
-
#
|
|
312
|
+
# The emails of the people who commit into this tree by hand, separated by spaces. By naming them
|
|
313
|
+
# the tree turns on the second half of the signature check: the machine account and these people are
|
|
314
|
+
# known, everything else is refused. Empty — only a commit that called itself the machine account is
|
|
315
|
+
# judged, and a commit under someone else's account passes silently.
|
|
316
|
+
RT_HUMAN_EMAILS="${RT_HUMAN_EMAILS:-}"
|
|
317
|
+
|
|
318
|
+
# What substitutes the machine account token into a call and how that substitution looks in full.
|
|
319
|
+
# The hosting client holds two accounts at once — the logged-in one and the one whose token stands
|
|
320
|
+
# in the call environment — and only the explicit substitution is visible from the command text.
|
|
321
|
+
# Both defaults stay silent: a tree without a separate machine account does not judge the PR author
|
|
322
|
+
# at all.
|
|
288
323
|
RT_PULL_TOKEN_VAR="${RT_PULL_TOKEN_VAR:-}"
|
|
289
324
|
RT_PULL_TOKEN_HINT="${RT_PULL_TOKEN_HINT:-}"
|
|
290
325
|
|
|
291
|
-
#
|
|
292
|
-
#
|
|
293
|
-
#
|
|
294
|
-
#
|
|
295
|
-
#
|
|
326
|
+
# Who will come to the hosting by this token. The substitution in the command speaks only of intent:
|
|
327
|
+
# it reads a file, and the file may be missing on the machine. Then the value is empty, the client
|
|
328
|
+
# answers from the logged-in account, and the PR comes out from the owner with a command that looks
|
|
329
|
+
# right. Asking this costs one call, but only the tree knows how to ask: the hosting, the client and
|
|
330
|
+
# the token path are each tree's own. The default stays silent: a tree that did not declare the
|
|
331
|
+
# function does not get the second tier.
|
|
296
332
|
#
|
|
297
|
-
#
|
|
298
|
-
#
|
|
333
|
+
# The contract: prints the login under which the writing call will go. Empty output means "could not
|
|
334
|
+
# ask" — the guard lets the call through and reports it.
|
|
299
335
|
rt_pull_token_login() { :; }
|
|
300
336
|
|
|
301
|
-
#
|
|
302
|
-
#
|
|
303
|
-
#
|
|
304
|
-
#
|
|
337
|
+
# The section the PR body must carry from the minute it is opened: the merge decision is made on its
|
|
338
|
+
# page, where there is no conversation at all, and what was said aloud does not remain there. The
|
|
339
|
+
# default stays silent — the heading is written in the PR's language, and the package does not know
|
|
340
|
+
# foreign words: a section not named by the tree is not judged at all.
|
|
305
341
|
RT_PULL_BODY_SECTION="${RT_PULL_BODY_SECTION:-}"
|
|
306
342
|
|
|
307
|
-
#
|
|
308
|
-
#
|
|
309
|
-
#
|
|
343
|
+
# The command that moves a task between the columns of the work queue, and the name of the first
|
|
344
|
+
# column — the one the task leaves when it is taken into work. The name has no default: the tree
|
|
345
|
+
# names the columns in its own words, and an invented one would match nothing and silently turn off
|
|
346
|
+
# the column check.
|
|
310
347
|
RT_TASK_MOVE_CMD="${RT_TASK_MOVE_CMD:-npm run task:move}"
|
|
311
348
|
RT_BOARD_BACKLOG="${RT_BOARD_BACKLOG:-}"
|
|
312
349
|
|
|
313
|
-
#
|
|
314
|
-
#
|
|
315
|
-
#
|
|
316
|
-
#
|
|
350
|
+
# The label of an epic card: by it the guard tells the branch of an epic from the branch of a task,
|
|
351
|
+
# and the branch of an epic is judged by other conditions — its request goes into the main branch,
|
|
352
|
+
# and it opens only when the folders of all its tasks are taken apart. The word is each tree's own,
|
|
353
|
+
# and the default is empty: a tree that has not named it keeps no epics, and the conditions about
|
|
354
|
+
# them are not judged at all.
|
|
355
|
+
RT_BOARD_EPIC_LABEL="${RT_BOARD_EPIC_LABEL:-}"
|
|
356
|
+
|
|
357
|
+
# The email the machine account's commit is signed with. As a whole value, not a pattern: the
|
|
358
|
+
# hosting's service address consists of a number, a login and a domain, and is matched by the number
|
|
359
|
+
# — nobody checks the login next to it. A "number, plus, login" pattern would pass with someone
|
|
360
|
+
# else's number, that is, with exactly the miss for which the delivery guard reads the signature.
|
|
317
361
|
#
|
|
318
|
-
#
|
|
319
|
-
#
|
|
320
|
-
#
|
|
321
|
-
#
|
|
362
|
+
# From here it also takes the machine account's login — the left part of the address, before the at
|
|
363
|
+
# sign and after the plus. The login is not declared as a second property: two declarations of one
|
|
364
|
+
# name would drift apart silently. The task assignee is not fit for this — where the hosting has
|
|
365
|
+
# restricted the machine account, a person is set as the assignee, and the commit stays the
|
|
366
|
+
# machine's.
|
|
322
367
|
#
|
|
323
|
-
#
|
|
324
|
-
#
|
|
368
|
+
# The default stays silent, and then the signature is not judged: the package has no machine account
|
|
369
|
+
# of its own, and an invented one would refuse work in someone else's tree.
|
|
325
370
|
RT_COMMIT_EMAIL="${RT_COMMIT_EMAIL:-}"
|
|
326
371
|
|
|
327
|
-
#
|
|
328
|
-
#
|
|
329
|
-
#
|
|
330
|
-
#
|
|
372
|
+
# The task state as one object: exists, open, onBoard, assigned, numbered. Asks the work queue
|
|
373
|
+
# helper — the same one the audit and the create command use, so that the guard and the queue
|
|
374
|
+
# understand "the task is in order" alike. No node, no helper, no network — silence, and the state
|
|
375
|
+
# tier is skipped: there is nothing to check with.
|
|
331
376
|
rt_task_state_default() {
|
|
332
377
|
command -v node >/dev/null 2>&1 || return 1
|
|
333
378
|
[ -f "${RT_BOARD_HELPER:-tools/board.mjs}" ] || return 1
|
|
334
379
|
state="$(node "${RT_BOARD_HELPER:-tools/board.mjs}" task "$1" 2>/dev/null)" || return 1
|
|
335
380
|
[ -z "$state" ] && return 1
|
|
336
|
-
#
|
|
337
|
-
#
|
|
381
|
+
# A reply marked "there was no network" is never a state: by it a task that does not exist
|
|
382
|
+
# cannot be told from a task that was not asked about.
|
|
338
383
|
printf '%s' "$state" | jq -e 'has("offline") | not' >/dev/null 2>&1 || return 1
|
|
339
384
|
printf '%s' "$state"
|
|
340
385
|
}
|
|
341
386
|
|
|
342
|
-
#
|
|
343
|
-
#
|
|
344
|
-
#
|
|
387
|
+
# The PR state as one object: exists, draft, author, reviewers, reviewed. Asks the same work queue
|
|
388
|
+
# helper as the task state — so that the guard and the audit understand "the PR has a review" alike.
|
|
389
|
+
# No node, no helper, no network — silence, and the tier is skipped.
|
|
345
390
|
rt_pull_state_default() {
|
|
346
391
|
command -v node >/dev/null 2>&1 || return 1
|
|
347
392
|
[ -f "${RT_BOARD_HELPER:-tools/board.mjs}" ] || return 1
|
|
@@ -351,11 +396,10 @@ rt_pull_state_default() {
|
|
|
351
396
|
printf '%s' "$state"
|
|
352
397
|
}
|
|
353
398
|
|
|
354
|
-
#
|
|
355
|
-
#
|
|
356
|
-
#
|
|
357
|
-
#
|
|
358
|
-
# сверить.
|
|
399
|
+
# One's own open PRs marked as conflicting — one line per PR: "#number branch". Asks the same work
|
|
400
|
+
# queue helper as the two neighbours above. Empty output means "no conflicting ones", a failing exit
|
|
401
|
+
# code — "nobody to ask", and the guard tier is skipped: refusing work on the silence of the network
|
|
402
|
+
# would stop it every time there is nothing to check it against.
|
|
359
403
|
rt_conflicting_pulls_default() {
|
|
360
404
|
command -v node >/dev/null 2>&1 || return 1
|
|
361
405
|
command -v jq >/dev/null 2>&1 || return 1
|
|
@@ -366,12 +410,13 @@ rt_conflicting_pulls_default() {
|
|
|
366
410
|
printf '%s' "$state" | jq -r '.conflicting[]? | "#\(.number) \(.branch)"'
|
|
367
411
|
}
|
|
368
412
|
|
|
369
|
-
#
|
|
370
|
-
#
|
|
371
|
-
#
|
|
413
|
+
# What counts as reinvention in this tree. One line per "pattern<tab>replacement". The patterns are
|
|
414
|
+
# narrow on purpose: the guard checks only NEW text, and a wide pattern would refuse an edit that
|
|
415
|
+
# creates nothing new.
|
|
372
416
|
rt_reinvented_in_default() {
|
|
373
|
-
#
|
|
374
|
-
#
|
|
417
|
+
# Four tab-separated fields: what over, the pattern, the cancel pattern, the replacement. An
|
|
418
|
+
# empty field is written empty — they are read one by one, and collapsing the third carried the
|
|
419
|
+
# advice into the cancel.
|
|
375
420
|
case "$1" in
|
|
376
421
|
*.ts)
|
|
377
422
|
printf '%s\t%s\t%s\t%s\n' 'added' 'get [a-zA-Z]+\(\)[[:space:]]*(:|\{)' '' 'computed(): производное значение сигналом, а не геттером'
|
|
@@ -382,27 +427,28 @@ rt_reinvented_in_default() {
|
|
|
382
427
|
esac
|
|
383
428
|
}
|
|
384
429
|
|
|
385
|
-
#
|
|
386
|
-
#
|
|
430
|
+
# Where the uniformity signal sets lie — they are laid out next to the checks, and the layout of
|
|
431
|
+
# checks is each tree's own. Both the guard on an edit and the full audit read them.
|
|
387
432
|
RT_REUSE_SIGNALS_DIR="${RT_REUSE_SIGNALS_DIR:-tools/signals}"
|
|
388
433
|
|
|
389
|
-
#
|
|
390
|
-
#
|
|
434
|
+
# Where an anchor for the specs is not required. The showcase, the root markup and the build are
|
|
435
|
+
# common to all trees; a tree adds its own by an override.
|
|
391
436
|
RT_QA_SKIP_RE="${RT_QA_SKIP_RE:-/node_modules/|/dist/|\.stories\.html\$|/src/index\.html\$}"
|
|
392
437
|
|
|
393
|
-
#
|
|
394
|
-
#
|
|
438
|
+
# By which name a tag is recognised as a component of this tree. The default is a compound tag: a
|
|
439
|
+
# hyphenated name belongs to a component, not to markup, and that is true wherever there are
|
|
440
|
+
# components of one's own.
|
|
395
441
|
RT_QA_COMPONENT_RE="${RT_QA_COMPONENT_RE:--}"
|
|
396
442
|
|
|
397
|
-
#
|
|
398
|
-
#
|
|
399
|
-
#
|
|
443
|
+
# The tags the spec does not press: styling, page markup, indicators. Listed by name, separated by
|
|
444
|
+
# spaces. The default stays silent: every kit has its own, and a foreign name here would silence the
|
|
445
|
+
# check on a tag this tree does not have.
|
|
400
446
|
rt_qa_decorative_default() {
|
|
401
447
|
return 0
|
|
402
448
|
}
|
|
403
449
|
|
|
404
|
-
#
|
|
405
|
-
#
|
|
450
|
+
# Defaults under the shared names. The project override will declare any of them anew — and call the
|
|
451
|
+
# same name from here with the `_default` suffix for everything it did not name itself.
|
|
406
452
|
rt_push_checks() { rt_push_checks_default "$@"; }
|
|
407
453
|
rt_push_docs_only() { rt_push_docs_only_default "$@"; }
|
|
408
454
|
|
|
@@ -412,9 +458,10 @@ rt_task_branch_ok() { rt_task_branch_ok_default "$@"; }
|
|
|
412
458
|
rt_task_branch_number() { rt_task_branch_number_default "$@"; }
|
|
413
459
|
rt_reinvented_in() { rt_reinvented_in_default "$@"; }
|
|
414
460
|
rt_is_app_code() { rt_is_app_code_default "$@"; }
|
|
415
|
-
#
|
|
416
|
-
#
|
|
417
|
-
#
|
|
461
|
+
# The directory of the rules package sources in this tree, from the root. Empty — the tree does not
|
|
462
|
+
# carry the package, and it has one edit address: the override. The tree that develops the package
|
|
463
|
+
# itself names the directory — otherwise the edit-place guard would send it to the override instead
|
|
464
|
+
# of the source.
|
|
418
465
|
rt_kit_sources_dir_default() { printf ''; }
|
|
419
466
|
|
|
420
467
|
rt_shell_writes() { rt_shell_writes_default "$@"; }
|