@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,27 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* The check of the turn map: its size and its completeness.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* The map is put into the context by the hook of entry into the session — whole, before the first
|
|
6
|
+
* reply. That is what tells it from a rule: a rule the executor reads himself and pays a turn for
|
|
7
|
+
* it, the map comes for free. For free — while it is short: a map grown to the size of a rule eats
|
|
8
|
+
* the very window it was started for, and there is nothing to notice that with — it keeps coming
|
|
9
|
+
* and keeps being right.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* The second thing that is not seen without the check: a state started in the rule and forgotten in
|
|
12
|
+
* the map. The session then gets the map, does not find its state in it and goes to read the rule —
|
|
13
|
+
* that is, the map works exactly up to the first new state.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* Three things are checked:
|
|
16
|
+
* the size — the bytes of the laid-out map against the declared limit;
|
|
17
|
+
* the states — the names from the table of the rule against the names in the map, both ways;
|
|
18
|
+
* the exits — all four exits of a turn are named.
|
|
19
19
|
*
|
|
20
|
-
* FAIL-OPEN:
|
|
21
|
-
*
|
|
22
|
-
*
|
|
20
|
+
* FAIL-OPEN: there is no map in the tree — nothing to check, a zero code. The tree may leave it
|
|
21
|
+
* unlaid. An empty table of states in the map counts as a refusal: that is not «there is nothing
|
|
22
|
+
* to check» but «the map is broken».
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* A non-zero exit code and the list of discrepancies.
|
|
25
25
|
*/
|
|
26
26
|
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
27
27
|
import { join } from 'node:path';
|
|
@@ -31,26 +31,26 @@ const MAP = join(ROOT, '.claude/rt-kit/defaults/turn-map.md');
|
|
|
31
31
|
const RULE = join(ROOT, '.claude/skills/task-flow/SKILL.md');
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* The size limit of the map in bytes.
|
|
35
35
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
36
|
+
* The number is one and lives here: the map comes into every session whole, and the limit for it is
|
|
37
|
+
* a property of the technique, not of the tree. Six kilobytes are taken by measurement, not by eye:
|
|
38
|
+
* on the day it was started the map weighs 4495 bytes, and the rule it is squeezed out of 63803.
|
|
39
|
+
* The spare of a kilobyte and a half is two or three new states; going past it, the map stops being
|
|
40
|
+
* a squeeze, and then it is to be split, not the limit raised.
|
|
41
41
|
*/
|
|
42
42
|
const LIMIT_BYTES = 6144;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
45
|
+
* The names of the states: a row of a table whose first cell stands in backticks — and for the turn
|
|
46
|
+
* map a list line «- `имя` — действие; ведёт `паттерн`» as well. In the rule a list is not read this
|
|
47
|
+
* way: patterns are written there in the same form, and they would get into the states.
|
|
48
|
+
* whose first cell stands in backticks.
|
|
49
49
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
50
|
+
* Both forms are read on purpose. A list is a third cheaper than a table — the formatter pads the
|
|
51
|
+
* columns with spaces up to a common width, and those spaces travel into the context of every
|
|
52
|
+
* session meaning nothing; the table meanwhile stays lawful, and a tree that has not rewritten it
|
|
53
|
+
* works as before.
|
|
54
54
|
*/
|
|
55
55
|
function statesOf(text, { listed: readListed = false } = {}) {
|
|
56
56
|
const states = [];
|
|
@@ -86,12 +86,20 @@ function statesOf(text, { listed: readListed = false } = {}) {
|
|
|
86
86
|
return states;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
/**
|
|
90
|
-
|
|
89
|
+
/**
|
|
90
|
+
* The exits of a turn named by the law. Each has two names: the English one is brought by the
|
|
91
|
+
* package, the Russian one is held by a tree whose map is still its own. Either of the two is enough.
|
|
92
|
+
*/
|
|
93
|
+
const EXITS = [
|
|
94
|
+
['a question to the owner', 'вопрос владельцу'],
|
|
95
|
+
['a guard refusal', 'отказ гарда'],
|
|
96
|
+
['the window filled', 'заполненное окно'],
|
|
97
|
+
['work handed over', 'работа отдана'],
|
|
98
|
+
];
|
|
91
99
|
|
|
92
100
|
function main() {
|
|
93
101
|
if (!existsSync(MAP)) {
|
|
94
|
-
console.log('check-turn-map:
|
|
102
|
+
console.log('check-turn-map: the tree has no turn map — there is nothing to check');
|
|
95
103
|
|
|
96
104
|
return 0;
|
|
97
105
|
}
|
|
@@ -101,18 +109,18 @@ function main() {
|
|
|
101
109
|
const faults = [];
|
|
102
110
|
|
|
103
111
|
if (bytes > LIMIT_BYTES) {
|
|
104
|
-
faults.push(
|
|
112
|
+
faults.push(`the map has grown: ${bytes} bytes at a limit of ${LIMIT_BYTES}`);
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
const inMap = statesOf(text, { listed: true });
|
|
108
116
|
|
|
109
117
|
if (inMap.length === 0) {
|
|
110
|
-
faults.push('
|
|
118
|
+
faults.push('the map carries no state at all — the table is broken');
|
|
111
119
|
}
|
|
112
120
|
|
|
113
121
|
for (const state of inMap) {
|
|
114
122
|
if (!state.rest[0]) {
|
|
115
|
-
faults.push(`${state.name}:
|
|
123
|
+
faults.push(`${state.name}: the map carries no mandatory action`);
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
126
|
|
|
@@ -123,38 +131,38 @@ function main() {
|
|
|
123
131
|
|
|
124
132
|
for (const state of ruleNames) {
|
|
125
133
|
if (!mapNames.has(state)) {
|
|
126
|
-
faults.push(`${state}:
|
|
134
|
+
faults.push(`${state}: the state is declared by the rule and forgotten in the map`);
|
|
127
135
|
}
|
|
128
136
|
}
|
|
129
137
|
|
|
130
138
|
for (const state of mapNames) {
|
|
131
139
|
if (!ruleNames.has(state)) {
|
|
132
|
-
faults.push(`${state}:
|
|
140
|
+
faults.push(`${state}: the state stands in the map, and the rule does not declare it`);
|
|
133
141
|
}
|
|
134
142
|
}
|
|
135
143
|
}
|
|
136
144
|
|
|
137
|
-
for (const
|
|
138
|
-
if (!text.includes(
|
|
139
|
-
faults.push(
|
|
145
|
+
for (const names of EXITS) {
|
|
146
|
+
if (!names.some((name) => text.includes(name))) {
|
|
147
|
+
faults.push(`the turn exit «${names[0]}» is not named in the map`);
|
|
140
148
|
}
|
|
141
149
|
}
|
|
142
150
|
|
|
143
151
|
if (faults.length > 0) {
|
|
144
|
-
console.log(`check-turn-map:
|
|
152
|
+
console.log(`check-turn-map: divergences ${faults.length}, size ${bytes} bytes at a limit of ${LIMIT_BYTES}\n`);
|
|
145
153
|
|
|
146
154
|
for (const fault of faults) {
|
|
147
155
|
console.log(` ${fault}`);
|
|
148
156
|
}
|
|
149
157
|
|
|
150
|
-
console.log('\
|
|
151
|
-
console.log('
|
|
158
|
+
console.log('\nThe map is shorter than the rule — that is what makes it useful. Grown, it eats the very');
|
|
159
|
+
console.log('window it is put into the context for. It is edited in the package resource, not in the laid-out copy.');
|
|
152
160
|
|
|
153
161
|
return 1;
|
|
154
162
|
}
|
|
155
163
|
|
|
156
164
|
console.log(
|
|
157
|
-
`check-turn-map: ${inMap.length}
|
|
165
|
+
`check-turn-map: ${inMap.length} states, ${EXITS.length} turn exits, ` + `${bytes} bytes at a limit of ${LIMIT_BYTES} — it matches`
|
|
158
166
|
);
|
|
159
167
|
|
|
160
168
|
return 0;
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// rt-kit v0.26.0 · checks/epic-table.github.mjs · ca65adf7e1b9 · правится надстройкой, не здесь
|
|
3
|
+
/**
|
|
4
|
+
* The table of the epic's tasks: the order from the plan, the state from the hosting.
|
|
5
|
+
*
|
|
6
|
+
* The shape of the answer to the question "where is the work" is written down — the rule of the
|
|
7
|
+
* status report and the pattern next to it — and the table itself was assembled by the session: it
|
|
8
|
+
* remembered which calls to make and how to fold the answers into cells. A session that has just
|
|
9
|
+
* started remembers none of that, and two sessions fold the same answers differently: one names the
|
|
10
|
+
* run on the head, another the last run of the branch.
|
|
11
|
+
*
|
|
12
|
+
* node tools/epic-table.mjs # the epic of the current branch
|
|
13
|
+
* node tools/epic-table.mjs 1940 # the epic named by its number
|
|
14
|
+
*
|
|
15
|
+
* The answer goes to the standard output and is carried to the owner as it is. A non-zero code
|
|
16
|
+
* means the table was not assembled, and then no table is printed at all: an empty one reads as an
|
|
17
|
+
* empty epic.
|
|
18
|
+
*/
|
|
19
|
+
import { execFileSync } from 'node:child_process';
|
|
20
|
+
import { readFileSync } from 'node:fs';
|
|
21
|
+
import { join } from 'node:path';
|
|
22
|
+
|
|
23
|
+
import { OfflineError, TASK_KEY, botToken, fetchBoard, fetchOpenPulls, ghJson, numberFromBranch, numberFromTitle } from './board.mjs';
|
|
24
|
+
import { declaredEpicOf, planPathOf, planRows } from './board-epics.mjs';
|
|
25
|
+
import { verdictOnHead } from './board-runs.mjs';
|
|
26
|
+
import { ROOT } from './rt-kit-checks.config.mjs';
|
|
27
|
+
|
|
28
|
+
/** The machine mode: the numbers of the unfinished tasks instead of the table for the owner. */
|
|
29
|
+
const UNFINISHED = '--unfinished';
|
|
30
|
+
|
|
31
|
+
/** The machine account's token is substituted per call, as everywhere in the work with the queue. */
|
|
32
|
+
const OPTIONS = { token: botToken() };
|
|
33
|
+
|
|
34
|
+
/** How the outcome of the run is named in the cell: the word of the hosting says nothing to the owner. */
|
|
35
|
+
const VERDICT = {
|
|
36
|
+
success: 'зелёный',
|
|
37
|
+
failure: 'красный',
|
|
38
|
+
running: 'идёт',
|
|
39
|
+
none: 'не начинался',
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** The current branch: the task number is read from it when the epic is not named by an argument. */
|
|
43
|
+
function branchOf() {
|
|
44
|
+
try {
|
|
45
|
+
return execFileSync('git', ['branch', '--show-current'], { cwd: ROOT, encoding: 'utf8' }).trim();
|
|
46
|
+
} catch {
|
|
47
|
+
return '';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* A card with its body: the belonging to an epic and the path to the plan are declared exactly
|
|
53
|
+
* there, and the reading of the queue takes the body of the task apart, not its title.
|
|
54
|
+
*/
|
|
55
|
+
function issueOf(number) {
|
|
56
|
+
try {
|
|
57
|
+
return ghJson(['issue', 'view', String(number), '--json', 'number,title,state,body,labels'], OPTIONS);
|
|
58
|
+
} catch (error) {
|
|
59
|
+
if (error instanceof OfflineError) {
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Which epic is asked about: the argument names it, and without an argument it is taken from the
|
|
68
|
+
* current branch — the branch gives the task, the body of the task declares the epic.
|
|
69
|
+
*/
|
|
70
|
+
function epicAsked(argv) {
|
|
71
|
+
const named = argv.map((one) => one.replace(/^#/, '')).find((one) => /^\d+$/.test(one));
|
|
72
|
+
if (named !== undefined) {
|
|
73
|
+
return { number: Number(named), why: '' };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const branch = branchOf();
|
|
77
|
+
const number = numberFromBranch(branch);
|
|
78
|
+
if (number === null) {
|
|
79
|
+
return { number: null, why: `ветка «${branch}» не несёт номера задачи — назовите эпик доводом: node tools/epic-table.mjs <номер>` };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const issue = issueOf(number);
|
|
83
|
+
if (!issue) {
|
|
84
|
+
return { number: null, why: `у хостинга нет задачи #${number} — назовите эпик доводом` };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const declared = declaredEpicOf(String(issue.body ?? ''));
|
|
88
|
+
if (declared === undefined) {
|
|
89
|
+
return {
|
|
90
|
+
number: null,
|
|
91
|
+
why: `задача #${number} не объявляет эпика — в теле задачи под эпиком стоит строка «Задача эпика #<номер>»`,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return { number: Number(declared), why: '' };
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** The makeup of the epic: the ordinal, the number of the task and what it is about, in the order of the plan. */
|
|
99
|
+
function makeupOf(plan) {
|
|
100
|
+
const key = new RegExp(`(?:#|${TASK_KEY}-)(\\d+)`);
|
|
101
|
+
const rows = [];
|
|
102
|
+
for (const line of planRows(plan).split('\n')) {
|
|
103
|
+
const cells = line
|
|
104
|
+
.split('|')
|
|
105
|
+
.slice(1, -1)
|
|
106
|
+
.map((cell) => cell.trim());
|
|
107
|
+
if (cells.length < 2 || cells.every((cell) => /^:?-+:?$/.test(cell))) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const found = cells.map((cell) => key.exec(cell)).find(Boolean);
|
|
112
|
+
if (found) {
|
|
113
|
+
rows.push({ order: cells[0], number: Number(found[1]), about: cells[cells.length - 1] });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return rows;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** The name of a task without the key in front: the key stands in a column of its own. */
|
|
120
|
+
function nameOf(title) {
|
|
121
|
+
return String(title ?? '').replace(new RegExp(`^\\[${TASK_KEY}-\\d+\\]\\s*`), '');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* One row of the table filled from the hosting: the name of the task and the state cell.
|
|
126
|
+
*
|
|
127
|
+
* A task is counted finished by the same reading the cell is written by: merged, or handed over by
|
|
128
|
+
* a request. Waiting for a merge is not work — the executor has nothing left to do about it, and
|
|
129
|
+
* the work of the epic is over exactly at that minute.
|
|
130
|
+
*
|
|
131
|
+
* The run is asked by the head of the request, not by the branch: the list of the runs of a branch
|
|
132
|
+
* answers about the last commit that started one, and a green run of a commit gone by then reads as
|
|
133
|
+
* a green head.
|
|
134
|
+
*/
|
|
135
|
+
function rowOf(number, board, pulls) {
|
|
136
|
+
const issue = issueOf(number);
|
|
137
|
+
if (!issue) {
|
|
138
|
+
return { name: '—', state: 'не заведена', finished: false };
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const name = nameOf(issue.title);
|
|
142
|
+
if (issue.state !== 'OPEN') {
|
|
143
|
+
return { name, state: 'влито', finished: true };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const pull = pulls.find((one) => numberFromTitle(String(one.title ?? '')) === number);
|
|
147
|
+
if (!pull) {
|
|
148
|
+
const column = board.items.get(number)?.status ?? null;
|
|
149
|
+
return { name, state: column ? `в очереди, столбец «${column}»` : 'заведена, столбца нет', finished: false };
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const verdict = verdictOnHead(pull.headRefOid, OPTIONS);
|
|
153
|
+
const draft = pull.isDraft === true ? 'черновик' : 'готова к слиянию';
|
|
154
|
+
return { name, state: `заявка #${pull.number} ${draft}, прогон на вершине ${VERDICT[verdict] ?? verdict}`, finished: true };
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Why the epic exists, in one sentence — the first phrase of the section the plan opens with.
|
|
159
|
+
*
|
|
160
|
+
* A plan whose first section is worded otherwise loses the phrase, and the paragraph then names
|
|
161
|
+
* only the count of the tasks: that is the open question `Q-WC-9` of the subdomain.
|
|
162
|
+
*/
|
|
163
|
+
function whyOf(plan) {
|
|
164
|
+
const section = /^##\s+Зачем\s*$/m.exec(plan);
|
|
165
|
+
if (!section) {
|
|
166
|
+
return '';
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const rest =
|
|
170
|
+
plan
|
|
171
|
+
.slice(section.index + section[0].length)
|
|
172
|
+
.split(/\n\s*\n/)
|
|
173
|
+
.find((piece) => piece.trim() !== '') ?? '';
|
|
174
|
+
const sentence = rest.trim().replace(/\s+/g, ' ');
|
|
175
|
+
const end = sentence.indexOf('. ');
|
|
176
|
+
return end === -1 ? sentence : sentence.slice(0, end + 1);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** The paragraph above the table: an epic squeezed into columns loses what it is named for. */
|
|
180
|
+
function paragraphOf(epic, plan, rows) {
|
|
181
|
+
const running = rows.findIndex((row) => row.state !== 'влито');
|
|
182
|
+
const where = running === -1 ? 'все закрыты' : `идёт ${running + 1}`;
|
|
183
|
+
const why = whyOf(plan);
|
|
184
|
+
const tail = why === '' ? '' : ` — ${why}`;
|
|
185
|
+
return `**Эпик «${nameOf(epic.title)}» (${TASK_KEY}-${epic.number})**${tail} Задач ${rows.length}, ${where}.`;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/** The table itself: the ordinal, the name, the key, what it is about, the state. */
|
|
189
|
+
function tableOf(rows) {
|
|
190
|
+
const head = ['| № | Задача | Номер | О чём | Состояние |', '| --- | --- | --- | --- | --- |'];
|
|
191
|
+
const body = rows.map((row) => `| ${row.order} | ${row.name} | ${TASK_KEY}-${row.number} | ${row.about} | ${row.state} |`);
|
|
192
|
+
return [...head, ...body];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The epic, its plan and the rows filled from the hosting — or the reason there is nothing to
|
|
197
|
+
* assemble. Both answers of the command stand on this one reading: assembled twice, they would
|
|
198
|
+
* count a task finished differently.
|
|
199
|
+
*/
|
|
200
|
+
function gathered(argv) {
|
|
201
|
+
const asked = epicAsked(argv);
|
|
202
|
+
if (asked.number === null) {
|
|
203
|
+
return { ok: false, why: asked.why };
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const epic = issueOf(asked.number);
|
|
207
|
+
if (!epic) {
|
|
208
|
+
return { ok: false, why: `у хостинга нет карточки эпика #${asked.number}` };
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const found = planPathOf(epic.body);
|
|
212
|
+
if (found.path === null) {
|
|
213
|
+
return { ok: false, why: `карточка эпика #${asked.number}: ${found.why}` };
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const plan = readFileSync(join(ROOT, found.path), 'utf8');
|
|
217
|
+
const rows = makeupOf(plan);
|
|
218
|
+
if (rows.length === 0) {
|
|
219
|
+
return { ok: false, why: `замысел «${found.path}» не несёт состава эпика: состав — таблица со столбцом задач` };
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const board = fetchBoard(OPTIONS);
|
|
223
|
+
const pulls = fetchOpenPulls(OPTIONS);
|
|
224
|
+
return { ok: true, why: '', epic, plan, rows: rows.map((row) => ({ ...row, ...rowOf(row.number, board, pulls) })) };
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** The lines of the answer, or the refusal with the reason: the caller prints and ends. */
|
|
228
|
+
export function epicTable(argv) {
|
|
229
|
+
const found = gathered(argv);
|
|
230
|
+
if (!found.ok) {
|
|
231
|
+
return { ok: false, lines: [found.why] };
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return { ok: true, lines: [paragraphOf(found.epic, found.plan, found.rows), '', ...tableOf(found.rows)] };
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The numbers of the tasks of the epic that are not finished, one per line — the machine answer for
|
|
239
|
+
* the guard of the stop.
|
|
240
|
+
*
|
|
241
|
+
* It is a mode of this very command, not a reader of its own: a second reading of the same tasks
|
|
242
|
+
* would diverge from the printed table in silence, and the guard would refuse work the table calls
|
|
243
|
+
* unfinished. An empty answer with the zero code means the epic is over.
|
|
244
|
+
*/
|
|
245
|
+
export function unfinished(argv) {
|
|
246
|
+
const found = gathered(argv);
|
|
247
|
+
if (!found.ok) {
|
|
248
|
+
return { ok: false, lines: [found.why] };
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return { ok: true, lines: found.rows.filter((row) => row.finished !== true).map((row) => String(row.number)) };
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const isEntryPoint = process.argv[1] && import.meta.url === `file://${process.argv[1]}`;
|
|
255
|
+
|
|
256
|
+
if (isEntryPoint) {
|
|
257
|
+
const argv = process.argv.slice(2);
|
|
258
|
+
const asked = argv.filter((one) => one !== UNFINISHED);
|
|
259
|
+
let outcome;
|
|
260
|
+
try {
|
|
261
|
+
outcome = argv.includes(UNFINISHED) ? unfinished(asked) : epicTable(asked);
|
|
262
|
+
} catch (error) {
|
|
263
|
+
const why = error instanceof OfflineError ? error.message : String(error?.message ?? error);
|
|
264
|
+
outcome = { ok: false, lines: [`состояние спросить нечем: ${why}`, 'таблица не печатается: пустая читается как пустой эпик'] };
|
|
265
|
+
}
|
|
266
|
+
process.stdout.write(outcome.lines.length === 0 ? '' : `${outcome.lines.join('\n')}\n`);
|
|
267
|
+
process.exit(outcome.ok ? 0 : 1);
|
|
268
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* `eslint/boundaries/domains/`,
|
|
2
|
+
* Boundaries and tags: where a lib is described as a source, whose dependency list must stay empty
|
|
3
|
+
* and what the family base sees. All three subjects read the same files
|
|
4
|
+
* `eslint/boundaries/domains/`, and they cannot be laid out apart.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* The name does not begin with `check-`: by walking such names the package default assembles the
|
|
7
|
+
* push gate set, and a helper with one would be run by the gate as a check of its own.
|
|
8
8
|
*/
|
|
9
9
|
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
10
10
|
import { join } from 'node:path';
|
|
@@ -13,14 +13,14 @@ import { BOUNDARIES_DIR, FAMILIES, isDir, projectTag, report } from './lib-commo
|
|
|
13
13
|
import { CONFIG, ROOT } from './rt-kit-checks.config.mjs';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* A lib must be described by exactly one `sourceTag` and in exactly one boundaries file:
|
|
17
|
+
* a lib described twice means two different allowlists for it, and which one wins is a
|
|
18
|
+
* matter of the build order. In other allowlists the tag, on the contrary, occurs as many
|
|
19
|
+
* times as needed: that is the enumeration of those the lib is visible to.
|
|
20
20
|
*/
|
|
21
21
|
function checkBoundaries(libs) {
|
|
22
22
|
if (!isDir(BOUNDARIES_DIR)) {
|
|
23
|
-
report(BOUNDARIES_DIR, '
|
|
23
|
+
report(BOUNDARIES_DIR, 'there is no directory with boundary files');
|
|
24
24
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
@@ -38,20 +38,21 @@ function checkBoundaries(libs) {
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
if (owners.length === 0) {
|
|
41
|
-
report(libPath,
|
|
41
|
+
report(libPath, `the tag ${tag} is described in no file of ${BOUNDARIES_DIR}/`);
|
|
42
42
|
} else if (owners.length > 1) {
|
|
43
|
-
report(libPath,
|
|
43
|
+
report(libPath, `the tag ${tag} is described ${owners.length} times: ${owners.join(', ')}`);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
49
|
+
* Libs whose dependency list must stay empty. The barrel of such a lib travels
|
|
50
|
+
* into the backend bundle, and the API build runs without tree-shaking: any dependency
|
|
51
|
+
* spreads from there across the whole graph.
|
|
52
52
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
53
|
+
* The tags are named by the tree: a tag name is its own word, and one hard-coded here would demand
|
|
54
|
+
* a boundaries description for a lib the tree does not have at all. Empty — the tree keeps no such
|
|
55
|
+
* libs.
|
|
55
56
|
*/
|
|
56
57
|
const NO_DEPENDENCY_TAGS = CONFIG.noDependencyTags;
|
|
57
58
|
|
|
@@ -79,42 +80,43 @@ function checkNoDependencyLibs() {
|
|
|
79
80
|
const opensAt = rest.indexOf('[', listAt);
|
|
80
81
|
const closesAt = rest.indexOf(']', opensAt);
|
|
81
82
|
if (listAt === -1 || opensAt === -1 || closesAt === -1) {
|
|
82
|
-
report(`${BOUNDARIES_DIR}/${name}`,
|
|
83
|
+
report(`${BOUNDARIES_DIR}/${name}`, `${tag} has no list of dependencies`);
|
|
83
84
|
continue;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
const dependencies = rest.slice(opensAt + 1, closesAt).trim();
|
|
87
88
|
if (dependencies.length > 0) {
|
|
88
|
-
report(`${BOUNDARIES_DIR}/${name}`, `${tag}
|
|
89
|
+
report(`${BOUNDARIES_DIR}/${name}`, `${tag} depends on nobody, and its list is not empty: ${dependencies}`);
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
if (!described) {
|
|
93
|
-
report(BOUNDARIES_DIR,
|
|
94
|
+
report(BOUNDARIES_DIR, `the tag ${tag} is described in no boundary file`);
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
/**
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
100
|
+
* The family base sees `common/util` and the `util` layers of the shared domains of its
|
|
101
|
+
* own family. Everything beyond that is named by a line here: the base is called by every
|
|
102
|
+
* domain, and any dependency of it becomes shared by the whole family.
|
|
102
103
|
*/
|
|
103
104
|
const CORE_EXCEPTIONS = {
|
|
104
|
-
//
|
|
105
|
+
// The Connect transport in admin-transport.provider.ts: the sign-in descriptor and the
|
|
106
|
+
// transport token
|
|
105
107
|
'scope:admin-core': ['scope:common-proto', 'scope:common-connect'],
|
|
106
108
|
};
|
|
107
109
|
|
|
108
|
-
/** `scope
|
|
110
|
+
/** `scope:<family>-common-<domain>-util` — the `util` layer of a shared domain of the same family */
|
|
109
111
|
const isFamilyCommonUtil = (tag, family) => new RegExp(`^scope:${family}-common-[a-z0-9-]+-util$`).test(tag);
|
|
110
112
|
|
|
111
113
|
async function checkCoreLibs() {
|
|
112
|
-
//
|
|
113
|
-
//
|
|
114
|
-
//
|
|
114
|
+
// Not every tree with a domain grid has a boundaries index: it is assembled by a separate file,
|
|
115
|
+
// and while its absence was not handled the check fell on the import — that is, it answered a
|
|
116
|
+
// tree where boundaries are declared differently with a breakage.
|
|
115
117
|
const boundaries = join(ROOT, 'eslint/boundaries/index.mjs');
|
|
116
118
|
if (!existsSync(boundaries)) {
|
|
117
|
-
console.log('
|
|
119
|
+
console.log('skipped: the tree has no boundary digest eslint/boundaries/index.mjs');
|
|
118
120
|
|
|
119
121
|
return;
|
|
120
122
|
}
|
|
@@ -134,7 +136,7 @@ async function checkCoreLibs() {
|
|
|
134
136
|
}
|
|
135
137
|
report(
|
|
136
138
|
`${BOUNDARIES_DIR}/${family}-core.config.mjs`,
|
|
137
|
-
`${tag}
|
|
139
|
+
`${tag} sees ${dependency}: the base of a family may reach only scope:common-util and scope:${family}-common-*-util`
|
|
138
140
|
);
|
|
139
141
|
}
|
|
140
142
|
}
|