@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,32 +1,33 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
2
|
+
# Map "what is edited — which rule". The package default: real paths, not samples.
|
|
3
3
|
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
4
|
+
# The trees of this workshop are built alike — Nx, `apps/` and `libs/`, the same extensions and the
|
|
5
|
+
# same directory names — so the package carries the map instead of every project writing it anew.
|
|
6
|
+
# Fifteen editions of it would drift apart silently, and the drift could be noticed only by the gate
|
|
7
|
+
# no longer demanding a rule where there is one.
|
|
8
8
|
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# A tree adds its own by an override — `.claude/rt-kit/gate-map.sh`. It loads second, declares
|
|
10
|
+
# `skill_for` anew and calls `skill_for_default` from here for everything it did not name.
|
|
11
11
|
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
12
|
+
# The function prints the RULE NAME or stays silent. Silence means "there is no rule for this", and
|
|
13
|
+
# the gate lets it through. There may be several names, one per line: the first is the file's domain
|
|
14
|
+
# rule, the following ones act as the second layer. The gate demands the first one not loaded.
|
|
15
15
|
#
|
|
16
|
-
#
|
|
16
|
+
# The order of branches decides: the first match wins, so the specific goes before the general.
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
18
|
+
# Rules that apply not by the kind of file but by what is written into it are not chosen here: they
|
|
19
|
+
# come as a layer over the domain one — `hooks/skill-gate-layers.sh`. The map judges the path, the
|
|
20
|
+
# layer judges the text, and both are called from the gate in one shell.
|
|
21
21
|
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
22
|
+
# A command counts as a CALL only when it stands at the start of a line or right after a separator.
|
|
23
|
+
# A substring match catches any MENTION: a line about a commit in the body of the commit itself and
|
|
24
|
+
# a search through history were refused as a real commit.
|
|
25
25
|
#
|
|
26
|
-
# `([A-Za-z_]…=…[[:space:]]+)*` —
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
26
|
+
# `([A-Za-z_]…=…[[:space:]]+)*` — environment variables before the call: the storage address is put
|
|
27
|
+
# as a prefix of the command itself, and without this piece the call was not recognised at all.
|
|
28
|
+
# `(npx…)?` — a launch through the package runner, `([^[:space:]]*/)?` — the path to the executable.
|
|
29
|
+
# The search parses a multi-line command line by line, so the start of the line is the start of each
|
|
30
|
+
# one.
|
|
30
31
|
rt_gate_invokes() {
|
|
31
32
|
printf '%s\n' "$1" \
|
|
32
33
|
| grep -qE "(^|[;&|(])[[:space:]]*([A-Za-z_][A-Za-z0-9_]*=[^[:space:]]*[[:space:]]+)*((npx|pnpm|yarn|bun|npm)([[:space:]]+(exec|run|dlx))?[[:space:]]+)?([^[:space:]]*/)?$2([[:space:]]|$)"
|
|
@@ -40,53 +41,55 @@ skill_for_default() {
|
|
|
40
41
|
case "$kind" in
|
|
41
42
|
edit)
|
|
42
43
|
case "$target" in
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
#
|
|
44
|
+
# A built tree is never code, and nobody edits it: the path to the artifact comes
|
|
45
|
+
# from the command that RUNS it. Under the artifact lie the same directory names as
|
|
46
|
+
# under the source, so the branch stands first — any branch below would match it and
|
|
47
|
+
# demand a rule that gives the work nothing.
|
|
47
48
|
*/node_modules/* | */dist/* | */build/* | */.nx/* | */coverage/*) return 0 ;;
|
|
48
49
|
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
50
|
+
# An override over a laid-out text is an edit of the same text: the path differs,
|
|
51
|
+
# the subject is the same. The branch stands first because the override path ends
|
|
52
|
+
# with the same file name as the laid-out copy, and the branches below would sort it
|
|
53
|
+
# by extension — that is, by the wording rule instead of the structure rule.
|
|
53
54
|
*/.claude/rt-kit/overrides/laws/* | */.claude/rt-kit/overrides/rules/* | */.claude/rt-kit/overrides/patterns/*)
|
|
54
55
|
printf '%s\n' 'spec-driven' ;;
|
|
55
56
|
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
57
|
+
# A rule and a pattern are the same kind of agreement as a spec: mandatory sections,
|
|
58
|
+
# a statement with a binding, the border between an article of the law and a
|
|
59
|
+
# statement of the rule. The branch stands before the general exception and before
|
|
60
|
+
# `*.md`: under the exception the rule text was rewritten without a single
|
|
61
|
+
# requirement, and `*.md` would send it to the wording rule — it is about words, not
|
|
62
|
+
# structure.
|
|
61
63
|
*/.claude/skills/*.md) printf '%s\n' 'spec-driven' ;;
|
|
62
64
|
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
+
# The rest of the agent's own files are edited without a rule: the rule for them is
|
|
66
|
+
# the file itself.
|
|
65
67
|
*/.claude/skills/* | */.claude/agents/* | */.claude/commands/* | */.claude/workflows/*) return 0 ;;
|
|
66
68
|
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
+
# The project's texts. A spec holds the structure of a domain, a law holds the
|
|
70
|
+
# agreement, and both are edited differently from code.
|
|
69
71
|
*/docs/specs/*) printf '%s\n' 'spec-driven' ;;
|
|
70
72
|
*/docs/tasks/*) printf '%s\n' 'task-flow' ;;
|
|
71
73
|
*/docs/constitution/*) printf '%s\n' 'spec-driven' ;;
|
|
72
74
|
*.md) printf '%s\n' 'doc-style' ;;
|
|
73
75
|
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
#
|
|
76
|
+
# Linter configs are the same thing, only the bans in them are executable: they are
|
|
77
|
+
# the enforcement of the rules about types and about styling, and the comments in
|
|
78
|
+
# them retell those rules by name. They were edited without a single rule at hand.
|
|
77
79
|
*/eslint.config.mjs | */eslint.config.js) printf '%s\n' 'typescript-conventions' ;;
|
|
78
80
|
*/stylelint.config.js | */stylelint.config.mjs) printf '%s\n' 'styling-bem' ;;
|
|
79
81
|
|
|
80
|
-
#
|
|
81
|
-
#
|
|
82
|
-
#
|
|
83
|
-
#
|
|
82
|
+
# The duplicates check enforces the statements of the shared-code rule and is
|
|
83
|
+
# required only by it: the lib layout rule speaks of it in one line with a
|
|
84
|
+
# reference, and the bindings of its signs stand with the shared-code rule. Two
|
|
85
|
+
# refusals in a row on an edit of two comment lines cost a session, and the second
|
|
86
|
+
# rule read is never of use.
|
|
84
87
|
*/tools/check-dupes.mjs | */tools/dupes-allowlist.json) printf '%s\n' 'shared-code' ;;
|
|
85
88
|
|
|
86
|
-
#
|
|
87
|
-
#
|
|
88
|
-
#
|
|
89
|
-
#
|
|
89
|
+
# The other checks are the same: a check enforces the statements of its rule, and
|
|
90
|
+
# the signs it judges by are declared in the rule's binding. Editing a sign in a
|
|
91
|
+
# check, one opens the second place next to it — otherwise they drift apart
|
|
92
|
+
# silently, and the check counts as a refusal what the rule allows.
|
|
90
93
|
*/check-specs.mjs) printf '%s\n' 'spec-driven' ;;
|
|
91
94
|
*/check-doc-paths.mjs | */doc-paths-allowlist.json | */check-file-size.mjs)
|
|
92
95
|
printf '%s\n' 'doc-style' ;;
|
|
@@ -96,42 +99,46 @@ skill_for_default() {
|
|
|
96
99
|
*/check-reuse.mjs | */reuse-allowlist.json) printf '%s\n' 'reuse-first' ;;
|
|
97
100
|
*/check-board.mjs | */board.mjs | */task-new.mjs | */check-schema-drift.mjs)
|
|
98
101
|
printf '%s\n' 'git-workflow' ;;
|
|
99
|
-
#
|
|
102
|
+
# A tree's own code linter rule is written by the same conventions as the code under
|
|
103
|
+
# it.
|
|
100
104
|
*/eslint-rules/*) printf '%s\n' 'typescript-conventions' ;;
|
|
101
105
|
|
|
102
|
-
#
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
-
#
|
|
106
|
+
# The storage schema, its migrations and the client setup: the directory order is
|
|
107
|
+
# lexicographic, and the timestamp is set by the tool at creation. The chain breaks
|
|
108
|
+
# silently and fails only on an apply from scratch, that is, after the merge. The
|
|
109
|
+
# client setup stands here too: the same apply reads it, and it was edited without a
|
|
110
|
+
# rule at hand. The rule lives with the delivery.
|
|
107
111
|
*/schema.prisma | */prisma/migrations/* | */prisma.config.ts)
|
|
108
112
|
printf '%s\n' 'git-workflow' ;;
|
|
109
|
-
#
|
|
110
|
-
#
|
|
113
|
+
# The pipeline and the image: the checks decide what runs before the merge at all,
|
|
114
|
+
# and the image decides what arrives on production. Both were edited without a
|
|
115
|
+
# single delivery rule.
|
|
111
116
|
*/.github/workflows/*.yml | */.gitlab-ci.yml | */azure-pipelines*.yml)
|
|
112
117
|
printf '%s\n' 'git-workflow' ;;
|
|
113
118
|
*/Dockerfile | */*.Dockerfile | */docker-compose*.yml | */docker-compose*.yaml)
|
|
114
119
|
printf '%s\n' 'git-workflow' ;;
|
|
115
120
|
|
|
116
|
-
#
|
|
117
|
-
#
|
|
121
|
+
# An end-to-end spec checks a running application, not a class: by file name it is
|
|
122
|
+
# no different from an ordinary module, and without this branch it would go to the
|
|
123
|
+
# language conventions.
|
|
118
124
|
*-e2e/*) printf '%s\n' 'testing' ;;
|
|
119
125
|
|
|
120
|
-
#
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
#
|
|
125
|
-
#
|
|
126
|
-
#
|
|
127
|
-
#
|
|
126
|
+
# Delivery: the set of dependencies is what arrives on production. An edit of
|
|
127
|
+
# scripts is not a dependency, and the rule about versions does not apply to it. A
|
|
128
|
+
# caveat: removing a dependency comes as an edit without a version number and does
|
|
129
|
+
# not land here — it is caught by the tree snapshot, which is edited by the same
|
|
130
|
+
# commit. Its own edition is not a dependency: the `"version"` line in the package's
|
|
131
|
+
# own manifest speaks of this package's release, not of someone else's version it
|
|
132
|
+
# pulls. The number sign caught it on a par with a dependency, and bumping its own
|
|
133
|
+
# version led the executor to the rule about others' versions — not to where it says
|
|
134
|
+
# how releases are made.
|
|
128
135
|
*/package.json)
|
|
129
136
|
printf '%s' "$written" | grep -v '"version"[[:space:]]*:' \
|
|
130
137
|
| grep -qE '"(dependencies|devDependencies|peerDependencies|optionalDependencies|overrides|resolutions|packageManager)"|"[^"]+"[[:space:]]*:[[:space:]]*"[~^]?[0-9]+\.[0-9]+' \
|
|
131
138
|
&& printf '%s\n' 'dependencies' ;;
|
|
132
139
|
*/pnpm-lock.yaml | */pnpm-workspace.yaml | */package-lock.json) printf '%s\n' 'dependencies' ;;
|
|
133
140
|
|
|
134
|
-
#
|
|
141
|
+
# Borders between libs: the manifest, the aliases, the barrel.
|
|
135
142
|
*/project.json | */tsconfig.base.json | */eslint/boundaries/* | */src/index.ts | */public-api.ts | */ng-package.json)
|
|
136
143
|
printf '%s\n' 'lib-layers' ;;
|
|
137
144
|
|
|
@@ -139,8 +146,8 @@ skill_for_default() {
|
|
|
139
146
|
*.component.ts | *.component.html) printf '%s\n' 'component-structure' ;;
|
|
140
147
|
*.scss) printf '%s\n' 'styling-bem' ;;
|
|
141
148
|
|
|
142
|
-
#
|
|
143
|
-
#
|
|
149
|
+
# Framework classes: state, streams and where a subscription lives. The backend does
|
|
150
|
+
# not go here — it has neither components nor subscriptions in a template.
|
|
144
151
|
*/libs/api/* | */apps/api/*) printf '%s\n' 'typescript-conventions' ;;
|
|
145
152
|
*.store.ts | *.service.ts | *.directive.ts | *.pipe.ts | *.guard.ts | *.interceptor.ts) printf '%s\n' 'angular-patterns' ;;
|
|
146
153
|
|
|
@@ -148,8 +155,8 @@ skill_for_default() {
|
|
|
148
155
|
esac
|
|
149
156
|
;;
|
|
150
157
|
bash)
|
|
151
|
-
#
|
|
152
|
-
#
|
|
158
|
+
# The branches go by a call check, not by a substring match: a mention of a command is
|
|
159
|
+
# not a command, and the gate refused its own text about a commit.
|
|
153
160
|
if rt_gate_invokes "$target" "git[[:space:]]+(commit|push|merge|rebase|cherry-pick)" \
|
|
154
161
|
|| rt_gate_invokes "$target" "git[[:space:]]+worktree[[:space:]]+(add|remove)" \
|
|
155
162
|
|| rt_gate_invokes "$target" "git[[:space:]]+checkout[[:space:]]+-b" \
|
|
@@ -159,28 +166,30 @@ skill_for_default() {
|
|
|
159
166
|
|| rt_gate_invokes "$target" "[^[:space:]]*task:new" \
|
|
160
167
|
|| rt_gate_invokes "$target" "prisma[[:space:]]+(migrate|db)"; then
|
|
161
168
|
printf '%s\n' 'git-workflow'
|
|
162
|
-
#
|
|
163
|
-
#
|
|
164
|
-
#
|
|
165
|
-
#
|
|
169
|
+
# An edit of the PR body through the hosting client is caught by two signs at once — the
|
|
170
|
+
# client call AND the request address. One word about the PR is not enough: it lands in
|
|
171
|
+
# the line of any command that writes about it. No check reads the PR body, and a
|
|
172
|
+
# statement about the tree goes stale in it silently.
|
|
166
173
|
elif rt_gate_invokes "$target" "(gh|glab)[[:space:]]+api" \
|
|
167
174
|
&& printf '%s' "$target" | grep -qE '(-X|--method)[[:space:]]+(PATCH|PUT).*(pulls|merge_requests)/[0-9]+'; then
|
|
168
175
|
printf '%s\n' 'git-workflow'
|
|
169
|
-
#
|
|
170
|
-
#
|
|
171
|
-
#
|
|
172
|
-
#
|
|
176
|
+
# Images and the registry on the owner's machine: the owner's own stands and the work of
|
|
177
|
+
# their other branches lie there too. Removal and cleanup matter more than the build —
|
|
178
|
+
# they carry away someone else's for good. Read commands stay outside the gate: they are
|
|
179
|
+
# what a shortage of space is investigated with, and demanding a rule for them would
|
|
180
|
+
# refuse the very technique. So the general cleanup is caught with `prune`.
|
|
173
181
|
elif rt_gate_invokes "$target" "docker[[:space:]]+(build|buildx|pull|push|run|compose|login|rm|rmi|stop|start|restart|image|volume|builder|network)" \
|
|
174
182
|
|| rt_gate_invokes "$target" "docker[[:space:]]+system[[:space:]]+prune"; then
|
|
175
183
|
printf '%s\n' 'git-workflow'
|
|
176
184
|
fi
|
|
177
185
|
|
|
178
|
-
#
|
|
179
|
-
#
|
|
180
|
-
#
|
|
181
|
-
#
|
|
182
|
-
#
|
|
183
|
-
#
|
|
186
|
+
# The task body and the PR body are published by a client call and never become a file
|
|
187
|
+
# of the tree: the gate checked the extension of the edited file and stayed silent on
|
|
188
|
+
# such a command. A person reads this text, and more often than any file of the tree:
|
|
189
|
+
# the owner read seven of their tasks and two PRs and called the language in them
|
|
190
|
+
# unreadable, and not one check reported it. Two signs at once: the client call and the
|
|
191
|
+
# body in the arguments — one word about the PR is not enough, it is in the line of any
|
|
192
|
+
# command that writes about it.
|
|
184
193
|
if { rt_gate_invokes "$target" "(gh|glab)[[:space:]]+(pr|mr|issue)[[:space:]]+(create|edit)" \
|
|
185
194
|
|| rt_gate_invokes "$target" "[^[:space:]]*task:new"; } \
|
|
186
195
|
&& printf '%s' "$target" | grep -qE '(--body|--body-file|--description|-F[[:space:]]*body)'; then
|
|
@@ -188,31 +197,33 @@ skill_for_default() {
|
|
|
188
197
|
printf '%s\n' 'doc-style-human'
|
|
189
198
|
fi
|
|
190
199
|
|
|
191
|
-
#
|
|
192
|
-
#
|
|
193
|
-
#
|
|
200
|
+
# The PR merge is the last moment when the folder of a closed task can still be taken
|
|
201
|
+
# apart by the same PR: after the merge the queue audit sees it, and there is nobody
|
|
202
|
+
# left to answer for it. Required as the SECOND layer, on top of the delivery rule.
|
|
194
203
|
rt_gate_invokes "$target" "(gh[[:space:]]+pr|glab[[:space:]]+mr)[[:space:]]+merge" \
|
|
195
204
|
&& printf '%s\n' 'task-flow'
|
|
196
205
|
|
|
197
|
-
#
|
|
198
|
-
#
|
|
199
|
-
#
|
|
200
|
-
#
|
|
201
|
-
#
|
|
206
|
+
# A request to a running application: what lies here is not the code but what answers on
|
|
207
|
+
# the port. The reply of the previous session's build is indistinguishable from the
|
|
208
|
+
# reply of the live branch. Both signs are needed — the client call AND the address: the
|
|
209
|
+
# address alone is not enough, it lands in the line of any command that writes about it,
|
|
210
|
+
# and the gate refused the check of the gate itself. The port is not listed: a one-off
|
|
211
|
+
# stand of one's own is raised on any free one.
|
|
202
212
|
if printf '%s' "$target" | grep -qE '(localhost|127\.0\.0\.1):[0-9]{4,5}' \
|
|
203
213
|
&& { rt_gate_invokes "$target" curl || rt_gate_invokes "$target" wget; }; then
|
|
204
214
|
printf '%s\n' 'browser-verification'
|
|
205
215
|
fi
|
|
206
216
|
;;
|
|
207
|
-
#
|
|
208
|
-
#
|
|
217
|
+
# The check through the browser is the only area where the rule is needed not for a file
|
|
218
|
+
# edit but for a tool: what lies there is not the files but the stand and the coordinates.
|
|
209
219
|
browser) printf '%s\n' 'browser-verification' ;;
|
|
210
220
|
esac
|
|
211
221
|
|
|
212
222
|
return 0
|
|
213
223
|
}
|
|
214
224
|
|
|
215
|
-
#
|
|
225
|
+
# Without a project override the map is the default. With an override it will declare `skill_for`
|
|
226
|
+
# anew.
|
|
216
227
|
skill_for() {
|
|
217
228
|
skill_for_default "$@"
|
|
218
229
|
}
|