@rt-tools/agent-kit 0.37.1 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/assets/checks/action-of.mjs +154 -0
- package/assets/checks/board-runs.github.mjs +40 -5
- package/assets/checks/check-board.github.mjs +38 -7
- package/assets/checks/check-state-next.mjs +22 -10
- package/assets/checks/check-turn-map.mjs +26 -6
- package/assets/checks/check-work-steps.mjs +4 -173
- package/assets/checks/decide.mjs +285 -0
- package/assets/checks/decision-table.json +21432 -0
- package/assets/checks/decision-table.mjs +495 -0
- package/assets/checks/epic-window.mjs +98 -0
- package/assets/checks/flow-condition.mjs +64 -0
- package/assets/checks/flow-data.mjs +135 -0
- package/assets/checks/flow-forecast.mjs +334 -0
- package/assets/checks/flow-guard-run.mjs +90 -0
- package/assets/checks/flow-guard.mjs +496 -0
- package/assets/checks/flow-model.mjs +271 -0
- package/assets/checks/flow-override.mjs +130 -0
- package/assets/checks/flow-plan.mjs +206 -0
- package/assets/checks/flow-scaffold.mjs +224 -0
- package/assets/checks/flow-step.mjs +495 -0
- package/assets/checks/flow-sync.mjs +296 -0
- package/assets/checks/flow-syntax.mjs +292 -0
- package/assets/checks/flow-verdict.mjs +227 -0
- package/assets/checks/merge-read.mjs +239 -0
- package/assets/checks/owner-nudges.mjs +389 -0
- package/assets/checks/push-inputs.mjs +59 -16
- package/assets/checks/record-count.mjs +437 -0
- package/assets/checks/record-recount.mjs +187 -0
- package/assets/checks/record-turn.mjs +155 -0
- package/assets/checks/task-flow-script.mjs +318 -0
- package/assets/checks/tree-assignment.mjs +26 -7
- package/assets/checks/work-result.mjs +362 -0
- package/assets/checks/work-steps-lib.mjs +205 -0
- package/assets/commands/night.md +6 -6
- package/assets/defaults/gate-map.sh +39 -12
- package/assets/defaults/merges.sh +48 -0
- package/assets/defaults/project.sh +6 -5
- package/assets/defaults/turn-map.md +23 -22
- package/assets/docs/GLOSSARY.md +5 -1
- package/assets/hooks/ask-judge.md +67 -0
- package/assets/hooks/browser-guard-device-id.sh +11 -9
- package/assets/hooks/browser-guard-no-asking.sh +12 -6
- package/assets/hooks/browser-guard-no-listing.sh +13 -7
- package/assets/hooks/browser-guard-no-other-drivers.sh +25 -17
- package/assets/hooks/browser-guard-require-select.sh +15 -15
- package/assets/hooks/commit-msg.sh +13 -3
- package/assets/hooks/conscience-guard.sh +9 -25
- package/assets/hooks/decide.sh +141 -0
- package/assets/hooks/deny-tail.sh +16 -11
- package/assets/hooks/dev-server-guard.sh +27 -20
- package/assets/hooks/dispatch.sh +47 -4
- package/assets/hooks/docs-guard.sh +31 -200
- package/assets/hooks/end-conversation-guard.sh +12 -21
- package/assets/hooks/epic-stop-guard.sh +54 -152
- package/assets/hooks/exam-guard.sh +32 -65
- package/assets/hooks/facts-docs.sh +221 -0
- package/assets/hooks/facts-flow.sh +173 -0
- package/assets/hooks/facts.sh +374 -0
- package/assets/hooks/flow-step-guard.sh +93 -0
- package/assets/hooks/git-guard-delivery-body.sh +4 -4
- package/assets/hooks/git-guard-delivery-conflict.sh +16 -10
- package/assets/hooks/git-guard-delivery-draft.sh +3 -3
- package/assets/hooks/git-guard-delivery-epic.sh +18 -9
- package/assets/hooks/git-guard-delivery-folder.sh +32 -7
- package/assets/hooks/git-guard-delivery-merge.sh +2 -2
- package/assets/hooks/git-guard-delivery-merged.sh +12 -1
- package/assets/hooks/git-guard-delivery-pipeline.sh +1 -1
- package/assets/hooks/git-guard-delivery-rerun.sh +44 -0
- package/assets/hooks/git-guard-delivery-signature.sh +82 -45
- package/assets/hooks/git-guard-delivery-task.sh +47 -0
- package/assets/hooks/git-guard-delivery.sh +112 -101
- package/assets/hooks/git-guard-discard.sh +8 -18
- package/assets/hooks/git-guard-main.sh +13 -19
- package/assets/hooks/git-guard-no-verify.sh +56 -16
- package/assets/hooks/git-guard-push-ahead.sh +39 -6
- package/assets/hooks/git-guard-push-marks.sh +262 -13
- package/assets/hooks/git-guard-push-tests.sh +58 -52
- package/assets/hooks/git-guard-tree-assignment.sh +7 -4
- package/assets/hooks/guard-note.sh +8 -6
- package/assets/hooks/handoff-entry-guard.sh +19 -38
- package/assets/hooks/handoff-write.sh +3 -1
- package/assets/hooks/hook-input.sh +0 -41
- package/assets/hooks/metric-marks.sh +19 -7
- package/assets/hooks/observe.sh +1 -1
- package/assets/hooks/override-write-guard.sh +27 -9
- package/assets/hooks/pre-push.sh +40 -12
- package/assets/hooks/prose-style-guard.sh +6 -19
- package/assets/hooks/pull-merges.sh +76 -0
- package/assets/hooks/push-ahead-call-guard.sh +447 -0
- package/assets/hooks/push-set.sh +38 -8
- package/assets/hooks/qa-dataid-guard.sh +7 -17
- package/assets/hooks/record-turn.sh +52 -0
- package/assets/hooks/rerun-guard.sh +11 -16
- package/assets/hooks/reuse-first-guard.sh +7 -21
- package/assets/hooks/role-calls.sh +25 -3
- package/assets/hooks/rule-source-guard.sh +54 -21
- package/assets/hooks/skill-gate-rearm.sh +18 -5
- package/assets/hooks/skill-gate.sh +156 -20
- package/assets/hooks/skill-loaded.sh +18 -3
- package/assets/hooks/sql-guard-target.sh +2 -2
- package/assets/hooks/sql-guard-write.sh +12 -12
- package/assets/hooks/sql-guard.sh +58 -16
- package/assets/hooks/task-context-load.sh +3 -1
- package/assets/hooks/task-flow-context.sh +5 -18
- package/assets/hooks/task-flow-draft-guard.sh +25 -74
- package/assets/hooks/task-flow-guard.sh +28 -130
- package/assets/hooks/tree-assignment-guard.sh +25 -14
- package/assets/hooks/turn-entry-load.sh +3 -1
- package/assets/hooks/turn-exit-guard.sh +92 -452
- package/assets/hooks/turn-exit-role.sh +3 -1
- package/assets/hooks/turn-judge.md +113 -0
- package/assets/hooks/window-fill-guard.sh +22 -41
- package/assets/patterns/doc-style-human.md +36 -76
- package/assets/patterns/git-workflow-commit.azure.md +9 -155
- package/assets/patterns/git-workflow-commit.github.md +11 -269
- package/assets/patterns/git-workflow-commit.gitlab.md +9 -161
- package/assets/patterns/git-workflow-docker.md +8 -231
- package/assets/patterns/git-workflow-freshness.md +8 -56
- package/assets/patterns/git-workflow-merge.md +6 -176
- package/assets/patterns/git-workflow-migration.md +5 -75
- package/assets/patterns/git-workflow-pr-body.github.md +6 -159
- package/assets/patterns/git-workflow-pr-ready.md +9 -70
- package/assets/patterns/git-workflow-pr.azure.md +13 -285
- package/assets/patterns/git-workflow-pr.github.md +13 -251
- package/assets/patterns/git-workflow-pr.gitlab.md +13 -286
- package/assets/patterns/git-workflow-restart.md +5 -42
- package/assets/patterns/git-workflow-secrets.md +10 -76
- package/assets/patterns/git-workflow-stack.md +7 -207
- package/assets/patterns/status-report-table.github.md +1 -1
- package/assets/patterns/task-flow-archive.md +12 -233
- package/assets/patterns/task-flow-close.md +16 -292
- package/assets/patterns/task-flow-cycle.md +13 -39
- package/assets/patterns/task-flow-graph.needs-graph.md +8 -62
- package/assets/patterns/task-flow-handoff.md +13 -161
- package/assets/patterns/task-flow-resume.md +18 -218
- package/assets/patterns/task-flow-start.md +9 -247
- package/assets/patterns/turn-entry-map.md +2 -2
- package/assets/pitfalls/agent-kit-extend.md +200 -0
- package/assets/pitfalls/agent-kit.2.md +323 -0
- package/assets/pitfalls/angular-patterns.md +98 -0
- package/assets/pitfalls/browser-verification.md +265 -0
- package/assets/pitfalls/component-structure.md +98 -0
- package/assets/pitfalls/dependencies.md +92 -0
- package/assets/pitfalls/deploy-flow.azure.md +171 -0
- package/assets/pitfalls/deploy-flow.github.md +211 -0
- package/assets/pitfalls/deploy-flow.gitlab.md +173 -0
- package/assets/pitfalls/doc-style-human.md +112 -0
- package/assets/pitfalls/doc-style.2.md +286 -0
- package/assets/pitfalls/entity-conventions.needs-admin.md +96 -0
- package/assets/pitfalls/entity-models.md +89 -0
- package/assets/pitfalls/epic-flow.md +92 -0
- package/assets/pitfalls/git-workflow-commit.azure.md +190 -0
- package/assets/pitfalls/git-workflow-commit.github.md +307 -0
- package/assets/pitfalls/git-workflow-commit.gitlab.md +196 -0
- package/assets/pitfalls/git-workflow-docker.md +275 -0
- package/assets/pitfalls/git-workflow-freshness.md +88 -0
- package/assets/pitfalls/git-workflow-hosting.azure.md +31 -0
- package/assets/pitfalls/git-workflow-hosting.github.md +32 -0
- package/assets/pitfalls/git-workflow-hosting.gitlab.md +31 -0
- package/assets/pitfalls/git-workflow-merge.md +220 -0
- package/assets/pitfalls/git-workflow-migration.md +103 -0
- package/assets/pitfalls/git-workflow-pr-body.github.md +185 -0
- package/assets/pitfalls/git-workflow-pr-ready.md +104 -0
- package/assets/pitfalls/git-workflow-pr.2.azure.md +172 -0
- package/assets/pitfalls/git-workflow-pr.2.github.md +184 -0
- package/assets/pitfalls/git-workflow-pr.2.gitlab.md +180 -0
- package/assets/pitfalls/git-workflow-pr.azure.md +159 -0
- package/assets/pitfalls/git-workflow-pr.github.md +107 -0
- package/assets/pitfalls/git-workflow-pr.gitlab.md +151 -0
- package/assets/pitfalls/git-workflow-push.azure.md +30 -0
- package/assets/pitfalls/git-workflow-push.github.md +30 -0
- package/assets/pitfalls/git-workflow-push.gitlab.md +30 -0
- package/assets/pitfalls/git-workflow-queue.azure.md +30 -0
- package/assets/pitfalls/git-workflow-queue.github.md +30 -0
- package/assets/pitfalls/git-workflow-queue.gitlab.md +30 -0
- package/assets/pitfalls/git-workflow-restart.md +72 -0
- package/assets/pitfalls/git-workflow-secrets.md +114 -0
- package/assets/pitfalls/git-workflow-stack.md +254 -0
- package/assets/pitfalls/git-workflow.2.azure.md +291 -0
- package/assets/pitfalls/git-workflow.2.github.md +294 -0
- package/assets/pitfalls/git-workflow.2.gitlab.md +278 -0
- package/assets/pitfalls/lib-layers.md +114 -0
- package/assets/pitfalls/lists.md +117 -0
- package/assets/pitfalls/mockups.needs-mockups.md +87 -0
- package/assets/pitfalls/navigation.md +94 -0
- package/assets/pitfalls/observability.needs-app.md +186 -0
- package/assets/pitfalls/platform-access.md +94 -0
- package/assets/pitfalls/queue-audit.github.md +78 -0
- package/assets/pitfalls/reuse-first.md +201 -0
- package/assets/pitfalls/spec-driven.2.md +318 -0
- package/assets/pitfalls/styling-bem.2.md +125 -0
- package/assets/pitfalls/task-flow-archive.md +265 -0
- package/assets/pitfalls/task-flow-close.2.md +166 -0
- package/assets/pitfalls/task-flow-close.md +167 -0
- package/assets/pitfalls/task-flow-cycle.md +73 -0
- package/assets/pitfalls/task-flow-graph.needs-graph.md +98 -0
- package/assets/pitfalls/task-flow-handoff.md +200 -0
- package/assets/pitfalls/task-flow-handover.md +30 -0
- package/assets/pitfalls/task-flow-owner.md +58 -0
- package/assets/pitfalls/task-flow-plan.md +29 -0
- package/assets/pitfalls/task-flow-resume.md +257 -0
- package/assets/pitfalls/task-flow-start.md +287 -0
- package/assets/pitfalls/task-flow.2.md +303 -0
- package/assets/pitfalls/task-flow.md +4 -4
- package/assets/pitfalls/testing.2.md +279 -0
- package/assets/pitfalls/turn-conduct.md +16 -17
- package/assets/pitfalls/typescript-conventions.md +161 -0
- package/assets/pitfalls/write-a-skill.md +128 -0
- package/assets/rules/angular-patterns.md +21 -86
- package/assets/rules/autonomous-work.md +2 -2
- package/assets/rules/browser-verification.md +28 -256
- package/assets/rules/component-structure.md +25 -87
- package/assets/rules/dependencies.md +20 -78
- package/assets/rules/deploy-flow.azure.md +26 -156
- package/assets/rules/deploy-flow.github.md +34 -200
- package/assets/rules/deploy-flow.gitlab.md +27 -159
- package/assets/rules/doc-style.md +32 -286
- package/assets/rules/entity-conventions.needs-admin.md +26 -82
- package/assets/rules/entity-models.md +14 -63
- package/assets/rules/epic-flow.md +24 -63
- package/assets/rules/git-workflow-hosting.azure.md +26 -0
- package/assets/rules/git-workflow-hosting.github.md +38 -0
- package/assets/rules/git-workflow-hosting.gitlab.md +27 -0
- package/assets/rules/git-workflow-push.azure.md +28 -0
- package/assets/rules/git-workflow-push.github.md +28 -0
- package/assets/rules/git-workflow-push.gitlab.md +28 -0
- package/assets/rules/git-workflow-queue.azure.md +23 -0
- package/assets/rules/git-workflow-queue.github.md +30 -0
- package/assets/rules/git-workflow-queue.gitlab.md +23 -0
- package/assets/rules/git-workflow.azure.md +21 -282
- package/assets/rules/git-workflow.github.md +24 -284
- package/assets/rules/git-workflow.gitlab.md +21 -269
- package/assets/rules/lib-layers.md +30 -103
- package/assets/rules/lists.md +21 -105
- package/assets/rules/mockups.needs-mockups.md +25 -64
- package/assets/rules/navigation.md +10 -69
- package/assets/rules/observability.needs-app.md +43 -172
- package/assets/rules/platform-access.md +28 -75
- package/assets/rules/queue-audit.github.md +25 -52
- package/assets/rules/reuse-first.md +20 -195
- package/assets/rules/spec-driven.md +35 -308
- package/assets/rules/styling-bem.md +20 -117
- package/assets/rules/task-flow-handover.md +24 -0
- package/assets/rules/task-flow-owner.md +34 -0
- package/assets/rules/task-flow-plan.md +38 -0
- package/assets/rules/task-flow.md +22 -300
- package/assets/rules/testing.md +32 -273
- package/assets/rules/turn-conduct.md +105 -106
- package/assets/rules/turn-entry.md +2 -2
- package/assets/rules/typescript-conventions.md +41 -147
- package/assets/samples/tasks/_template/plan.md +30 -6
- package/assets/samples/tasks/_template/progress.md +0 -1
- package/assets/skills/agent-kit-extend.md +25 -168
- package/assets/skills/agent-kit.md +27 -299
- package/assets/skills/write-a-skill.md +20 -106
- package/assets/task-flow/flow.js +184 -0
- package/assets/task-flow/flow.md +101 -0
- package/assets/task-flow/measure/agreement.mjs +24 -0
- package/assets/task-flow/measure/ci.mjs +184 -0
- package/assets/task-flow/measure/copy.mjs +22 -0
- package/assets/task-flow/measure/epic-of.mjs +50 -0
- package/assets/task-flow/measure/epic-text.mjs +35 -0
- package/assets/task-flow/measure/epic.mjs +114 -0
- package/assets/task-flow/measure/folder.mjs +16 -0
- package/assets/task-flow/measure/footprint.mjs +28 -0
- package/assets/task-flow/measure/grill.mjs +21 -0
- package/assets/task-flow/measure/host.mjs +8 -0
- package/assets/task-flow/measure/owner.mjs +27 -0
- package/assets/task-flow/measure/plan.mjs +27 -0
- package/assets/task-flow/measure/pr.mjs +20 -0
- package/assets/task-flow/measure/progress.mjs +50 -0
- package/assets/task-flow/measure/session.mjs +252 -0
- package/assets/task-flow/measure/task.mjs +23 -0
- package/assets/task-flow/measure/text.mjs +77 -0
- package/assets/task-flow/source/git.mjs +254 -0
- package/assets/task-flow/source/host.mjs +277 -0
- package/assets/task-flow/source/marks.mjs +56 -0
- package/assets/task-flow/source/owner.mjs +94 -0
- package/assets/task-flow/source/records.mjs +116 -0
- package/assets/task-flow/source/session.mjs +269 -0
- package/assets/task-flow/source/steps.mjs +28 -0
- package/assets/task-flow/source/tree.mjs +42 -0
- package/bin/agent-kit.d.ts.map +1 -1
- package/bin/agent-kit.js +30 -0
- package/bin/agent-kit.js.map +1 -1
- package/lib/agent-checks.d.ts +55 -0
- package/lib/agent-checks.d.ts.map +1 -0
- package/lib/agent-checks.js +221 -0
- package/lib/agent-checks.js.map +1 -0
- package/lib/assets.d.ts.map +1 -1
- package/lib/assets.js +7 -2
- package/lib/assets.js.map +1 -1
- package/lib/cargo.d.ts +29 -0
- package/lib/cargo.d.ts.map +1 -1
- package/lib/cargo.js +27 -1
- package/lib/cargo.js.map +1 -1
- package/lib/cascade.d.ts.map +1 -1
- package/lib/cascade.js +3 -1
- package/lib/cascade.js.map +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +78 -2
- package/lib/commands.js.map +1 -1
- package/lib/config.d.ts +18 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +18 -1
- package/lib/config.js.map +1 -1
- package/lib/epic-window-send.d.ts +74 -0
- package/lib/epic-window-send.d.ts.map +1 -0
- package/lib/epic-window-send.js +166 -0
- package/lib/epic-window-send.js.map +1 -0
- package/lib/hooks-map.d.ts +4 -0
- package/lib/hooks-map.d.ts.map +1 -1
- package/lib/hooks-map.js +2 -2
- package/lib/hooks-map.js.map +1 -1
- package/lib/integrity.d.ts +3 -0
- package/lib/integrity.d.ts.map +1 -1
- package/lib/integrity.js +7 -0
- package/lib/integrity.js.map +1 -1
- package/lib/metric-lines.d.ts +2 -1
- package/lib/metric-lines.d.ts.map +1 -1
- package/lib/metric-lines.js +49 -1
- package/lib/metric-lines.js.map +1 -1
- package/lib/metric-send-mark.d.ts +6 -3
- package/lib/metric-send-mark.d.ts.map +1 -1
- package/lib/metric-send-mark.js +15 -5
- package/lib/metric-send-mark.js.map +1 -1
- package/lib/metric-send.d.ts +6 -2
- package/lib/metric-send.d.ts.map +1 -1
- package/lib/metric-send.js +47 -13
- package/lib/metric-send.js.map +1 -1
- package/lib/metrics.d.ts +17 -0
- package/lib/metrics.d.ts.map +1 -1
- package/lib/metrics.js +26 -15
- package/lib/metrics.js.map +1 -1
- package/lib/observations.js +3 -3
- package/lib/observations.js.map +1 -1
- package/lib/outcomes.d.ts +5 -2
- package/lib/outcomes.d.ts.map +1 -1
- package/lib/outcomes.js +5 -4
- package/lib/outcomes.js.map +1 -1
- package/lib/push-gate.d.ts +13 -0
- package/lib/push-gate.d.ts.map +1 -1
- package/lib/push-gate.js +11 -7
- package/lib/push-gate.js.map +1 -1
- package/lib/push-set-usefulness.d.ts +78 -0
- package/lib/push-set-usefulness.d.ts.map +1 -0
- package/lib/push-set-usefulness.js +225 -0
- package/lib/push-set-usefulness.js.map +1 -0
- package/lib/sync.d.ts +10 -0
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +14 -1
- package/lib/sync.js.map +1 -1
- package/lib/work-result.d.ts +43 -0
- package/lib/work-result.d.ts.map +1 -0
- package/lib/work-result.js +39 -0
- package/lib/work-result.js.map +1 -0
- package/package.json +1 -1
- package/assets/hooks/claim-guard.sh +0 -212
- package/assets/hooks/grill-gate-ask.sh +0 -26
- package/assets/hooks/grill-gate-bypass.sh +0 -61
- package/assets/hooks/grill-gate-options.sh +0 -50
- package/assets/hooks/grill-gate.sh +0 -482
- package/assets/hooks/postmortem-guard.sh +0 -124
- package/assets/hooks/proposal-guard.sh +0 -154
- package/assets/hooks/stand-login-guard.sh +0 -107
- package/assets/hooks/turn-exit-epic.sh +0 -173
- package/assets/hooks/turn-exit-patterns.sh +0 -123
- package/assets/hooks/turn-exit-verdict.sh +0 -149
- package/assets/hooks/waiting-turn-guard.sh +0 -320
- package/assets/hooks/work-start-guard.sh +0 -175
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Admin navigation — how it works here — cold part
|
|
2
|
+
|
|
3
|
+
What the rule `navigation` handed over when cut to its statements, every article whole.
|
|
4
|
+
|
|
5
|
+
Rule under the law `docs/constitution/navigation.md`. The law says how the user finds a section and
|
|
6
|
+
gets into it; here — what the menu is assembled from in this tree and how it looks. The look is
|
|
7
|
+
spoken of by the rule: the law is silent about it on purpose.
|
|
8
|
+
|
|
9
|
+
## What it is called here
|
|
10
|
+
|
|
11
|
+
| In the law | Here |
|
|
12
|
+
| ------------------------ | ------------------------------------------------------------------------------- |
|
|
13
|
+
| menu item | an entry in the `admin-nav.items.ts` declaration |
|
|
14
|
+
| section with a panel | an item with columns; has no address of its own |
|
|
15
|
+
| second-level panel | the `rt-page-header` popup from the kit package, laid out in columns and groups |
|
|
16
|
+
| unread sign | a dot, comes as a predicate by the item id |
|
|
17
|
+
| the "no screen yet" flag | `disabled` in the declaration |
|
|
18
|
+
|
|
19
|
+
## Where it lives
|
|
20
|
+
|
|
21
|
+
In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
|
|
22
|
+
travels between repositories, the layout does not, and a path named in the rule lies in the first
|
|
23
|
+
tree that keeps its code differently.
|
|
24
|
+
|
|
25
|
+
## Flow
|
|
26
|
+
|
|
27
|
+
The flow of creating a section: one declaration per item and route, two layers of gating and the
|
|
28
|
+
data path into the header.
|
|
29
|
+
|
|
30
|
+
```mermaid
|
|
31
|
+
flowchart TD
|
|
32
|
+
A[A section is created] --> B[The item is declared once: it is the source of both the menu and route gating]
|
|
33
|
+
B --> C{What closes the section}
|
|
34
|
+
C -->|A user right| D[The right stands in the item declaration]
|
|
35
|
+
C -->|A section flag| E[The item is declared without a screen of its own, with a hint why]
|
|
36
|
+
C -->|Nothing| F[The item is open to everyone signed in]
|
|
37
|
+
D --> G[The route is closed by the same declaration, not by a list of its own]
|
|
38
|
+
E --> G
|
|
39
|
+
F --> G
|
|
40
|
+
G --> H{The header needs domain data}
|
|
41
|
+
H -->|Yes| I[It comes by a token: the declaration does not import the application shell]
|
|
42
|
+
H -->|No| J[Done]
|
|
43
|
+
I --> J
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## How the law applies here
|
|
47
|
+
|
|
48
|
+
- **An item is declared once and serves as the source of both the menu and route gating.** A second
|
|
49
|
+
declaration next to the routes would drift from the first, and the result would be "the item is
|
|
50
|
+
not visible, but the page opens".
|
|
51
|
+
- **The declaration imports no `shell`.** Otherwise the graph `shell → container/feature → shell`
|
|
52
|
+
closes into a cycle and the layout check stops.
|
|
53
|
+
- **Gating has two layers: the user right and the section flag.** An item with a flag is declared
|
|
54
|
+
without rights and without an address — a right opens the screen, and there is no screen; it is
|
|
55
|
+
visible to everyone all the while.
|
|
56
|
+
- **Domain data comes into the header by a token, not by an import.** The interface and the
|
|
57
|
+
`InjectionToken` live in `container/util`; the composition root ties them to the implementation.
|
|
58
|
+
|
|
59
|
+
## What of the law is not here
|
|
60
|
+
|
|
61
|
+
The menu holds seventeen second-level items and the "Finance" section that have no screen yet: they
|
|
62
|
+
are rolled out as unavailable, because a vanished item cannot be told from one that never existed.
|
|
63
|
+
|
|
64
|
+
The rendering of the header itself lives in `rt-page-header` from `@rt-tools/ui-kit-v2`. The project
|
|
65
|
+
does not write it and cannot break it: it declares the items, and the kit draws them. The kit sets:
|
|
66
|
+
|
|
67
|
+
- the hint on an unavailable item and `aria-disabled` instead of the native `disabled`;
|
|
68
|
+
- section highlighting by address prefix;
|
|
69
|
+
- opening the second-level panel on hover, and on touch — by a tap;
|
|
70
|
+
- the panel layout in columns, inside a column — in groups with a caption; if the first group in a
|
|
71
|
+
column has no heading, its items start from the top of the panel;
|
|
72
|
+
- the panel width by the number of columns, not by the length of captions, and its fit from its own
|
|
73
|
+
section to the right edge of the screen;
|
|
74
|
+
- the expand pointer on a section with a panel and its absence on a section without one;
|
|
75
|
+
- a separate mobile layout: the menu collapses into a button, expands with the same sections and
|
|
76
|
+
groups and scrolls when the items do not fit in height.
|
|
77
|
+
|
|
78
|
+
None of this the rule binds to project code: there is nothing to bind.
|
|
79
|
+
|
|
80
|
+
## Patterns
|
|
81
|
+
|
|
82
|
+
- `admin-nav-item` — create a menu item and its route: the declaration, rights, the flag, address
|
|
83
|
+
nesting, the caption in all locales.
|
|
84
|
+
|
|
85
|
+
## Pitfalls
|
|
86
|
+
|
|
87
|
+
- An unavailable item has no click handler at all: `aria-disabled` does not refuse a click.
|
|
88
|
+
- A branch where the ro-route constant was not merged in differs only in that the button in the
|
|
89
|
+
header opens nothing on it.
|
|
90
|
+
- Groups inside an expanded section on a narrow screen do not collapse separately, so the set of
|
|
91
|
+
expanded ones holds only section ids.
|
|
92
|
+
- The panel width is computed by the number of columns, not by the content; the numbers are set by
|
|
93
|
+
`--rt-*` tokens, raw values are forbidden by the styling rule.
|
|
94
|
+
- An address move touches links and the e2e specs — they walk by addresses.
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Observability — how it works here — cold part
|
|
2
|
+
|
|
3
|
+
What the rule `observability` handed over when cut to its statements, every article whole.
|
|
4
|
+
|
|
5
|
+
Rule under the law `docs/constitution/observability.md`. The law says what the owner must know
|
|
6
|
+
about the running application; here — what it is called in this tree, where it lives and what
|
|
7
|
+
is not here yet.
|
|
8
|
+
|
|
9
|
+
## What it is called here
|
|
10
|
+
|
|
11
|
+
| In the law | Here |
|
|
12
|
+
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
13
|
+
| what the application writes about itself | application logs: one line per logger call, in machine form |
|
|
14
|
+
| the step of importance | the level: from debugging details to a failure that took the process down |
|
|
15
|
+
| the request number | the request id, also the response header |
|
|
16
|
+
| the marker by which all failures of one request are found | the same request number — it stands in every log line |
|
|
17
|
+
| failure details | the parsed cause: class, text, protocol code, code and details from the storage, a trimmed stack |
|
|
18
|
+
| the generic error text going outside | an internal error without details |
|
|
19
|
+
| scrubbing secrets | replacing values by field name |
|
|
20
|
+
| a failure in the store | what the failures domain saved: a failure group and its occurrences |
|
|
21
|
+
| what the application came up with | the startup digest: one log line with the version, the port, the storage address and the lists of features — enabled, disabled and broken |
|
|
22
|
+
|
|
23
|
+
## Where it lives
|
|
24
|
+
|
|
25
|
+
In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
|
|
26
|
+
travels between repositories, the layout does not, and a path named in the rule lies in the
|
|
27
|
+
first tree that keeps its code differently.
|
|
28
|
+
|
|
29
|
+
## Flow
|
|
30
|
+
|
|
31
|
+
The flow of handling a request through the eyes of observability: where the request number is
|
|
32
|
+
created, how a failure differs from a breakage and what goes outside.
|
|
33
|
+
|
|
34
|
+
```mermaid
|
|
35
|
+
flowchart TD
|
|
36
|
+
A[A request arrives] --> B{The request number came from outside}
|
|
37
|
+
B -->|Yes| C[Cleaned and shortened]
|
|
38
|
+
B -->|No| D[Created anew, one for the whole request]
|
|
39
|
+
C --> E[Stands in every log line about this request]
|
|
40
|
+
D --> E
|
|
41
|
+
E --> F{How the work ended}
|
|
42
|
+
F -->|Done| G[The response leaves with the request number in the header]
|
|
43
|
+
F -->|Input or rights| H[Written apart from a breakage and without a stack: a check that fired]
|
|
44
|
+
F -->|Breakage| I[The cause is parsed in one place, the line fields are always scrubbed]
|
|
45
|
+
H --> J[Outside — a code and a generic text; the details stay in the logs]
|
|
46
|
+
I --> J
|
|
47
|
+
J --> K[The request number stands in the failure details too]
|
|
48
|
+
G --> L[Done]
|
|
49
|
+
K --> L
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## How the law applies here
|
|
53
|
+
|
|
54
|
+
- **The request number is created once per request and stands in every log line about it.** By
|
|
55
|
+
time the lines of one request cannot be picked out: there are a dozen requests a second.
|
|
56
|
+
- **The request number goes to the caller as a response header and in the failure details.** It
|
|
57
|
+
also stands in the logs, so a number named by a person is found by a direct filter. The header
|
|
58
|
+
is open to a page of a foreign domain: without explicit permission the browser does not hand
|
|
59
|
+
it over.
|
|
60
|
+
- **A number that came from outside is cleaned and shortened, and an empty one is created anew.**
|
|
61
|
+
The value from the header comes from anyone, and it lands in a filter over the store.
|
|
62
|
+
- **Outside goes the code and a generic error text; the details stay in the logs.** Otherwise a
|
|
63
|
+
guest on a broken rollout reads a column name and the storage layout.
|
|
64
|
+
- **A failure on input or rights is written apart from a breakage and without a stack.** It is a
|
|
65
|
+
check that fired. On one level with breakages it floods the alarm with guests' typos.
|
|
66
|
+
- **The cause of a failure is parsed in one place.** Otherwise the same error arrives in the logs
|
|
67
|
+
in three different shapes.
|
|
68
|
+
- **A field added to the answer of a refusal is added where the answer is assembled, not where the
|
|
69
|
+
refusal is thrown.** The application parses failures in one place and builds the body there out
|
|
70
|
+
of what it knows: every throw may name the field, and the body carries none of them. Neither the
|
|
71
|
+
linter nor the tests next to the throws see it — the loss shows on the screen of whoever reads
|
|
72
|
+
the answer.
|
|
73
|
+
- **The fields of a log line are always scrubbed, not at the discretion of whoever writes.**
|
|
74
|
+
Deciding on every call whether the fields hold a secret means being wrong once.
|
|
75
|
+
- **At startup the application writes what it came up with.** Half of the features are enabled by
|
|
76
|
+
the presence of an environment variable and are silently off without it. Otherwise the
|
|
77
|
+
question "why does it not work there when it works locally" is answered by reading the
|
|
78
|
+
production settings over ssh.
|
|
79
|
+
- **The startup digest holds the names of features and their state, but not the values of
|
|
80
|
+
variables.** The states are laid out as three lists, not as a map "name → state": scrubbing
|
|
81
|
+
works by key name, and the map would arrive in the log scrubbed exactly where the state is
|
|
82
|
+
needed.
|
|
83
|
+
- **A feature enabled by a pair of keys knows a third state.** The halves of the pair lie on
|
|
84
|
+
different sides of the delivery, and exactly one can be filled; then the feature is neither off
|
|
85
|
+
nor on but broken — a list of two states has no name for this case, and it reads as enabled.
|
|
86
|
+
- **The level threshold decides whether a log line appears in the output, but not in the failure
|
|
87
|
+
store.** The threshold is set for the volume of output, and under a high threshold the selected
|
|
88
|
+
lines of a lower level would silently vanish from the store.
|
|
89
|
+
- **A selected log line is saved to the store as a failure.** Selected are the failure level and
|
|
90
|
+
everything above it, and lines of a lower level — by a list of names declared in the code.
|
|
91
|
+
- **The logger hands a failure to the sink and does not see the store.** The sink interface is
|
|
92
|
+
declared next to the logger, the failures domain implements it, and it is set from outside at
|
|
93
|
+
startup.
|
|
94
|
+
- **Log lines of the storage client, the failures domain and the alerts domain do not go to the
|
|
95
|
+
sink.** The source is cut off, not the moment of writing: a slow insert into the failures table
|
|
96
|
+
itself produces a log line of the storage client, and a marker "I am inside a write" cannot
|
|
97
|
+
catch it. The alerts domain is cut off for the same reason: a failed alert would become a new
|
|
98
|
+
failure, and that one — a new alert.
|
|
99
|
+
- **A call to a foreign service goes with an explicit wait limit.** Without it a silent — not
|
|
100
|
+
failed — service holds the connection up to the environment default, and that is minutes: there
|
|
101
|
+
is no failure, nothing to record, and to the owner such silence is indistinguishable from
|
|
102
|
+
healthy work. The limit is named as a number next to the client, because the price of waiting
|
|
103
|
+
differs per service.
|
|
104
|
+
- **A send outside creates its own line before the call, and the outcome is appended to it
|
|
105
|
+
after.** The line is created by whoever sees the store, not by whoever sends: the client of the
|
|
106
|
+
external service does not see the store at all. The line also serves as a lock — a second call
|
|
107
|
+
on the same record does not leave — and an unclosed line shows the difference between "running
|
|
108
|
+
right now" and "fell in the middle of sending".
|
|
109
|
+
- **Recording a failure does not delay the response and does not take the request down.**
|
|
110
|
+
Between the logger and the store stands a bounded queue; a full queue drops the new failure and
|
|
111
|
+
counts what was dropped.
|
|
112
|
+
- **The request context is captured at the moment of the logger call, not at the moment of
|
|
113
|
+
writing.** By the time of writing the execution storage has already been handed to the next
|
|
114
|
+
request.
|
|
115
|
+
- **The owner reads what was recorded in their own section, closed by a separate right.** The
|
|
116
|
+
groups that are theirs, and under a group — its occurrences with the cause, the log line fields
|
|
117
|
+
and the bodies.
|
|
118
|
+
- **The store does not grow without limit: once a day the excess and the old are removed.**
|
|
119
|
+
Occurrences are removed: first the excess beyond the limit, then the old beyond the age.
|
|
120
|
+
A group left with no occurrence after that goes in a third step — and only if it is older than
|
|
121
|
+
an hour: between its creation and its first occurrence a separate request passes.
|
|
122
|
+
- **The store limit is named in rows, not bytes.** Deletion does not shrink the physical size of
|
|
123
|
+
the table, and the condition "size under the limit" would never become true.
|
|
124
|
+
- **The owner learns of a new failure by themselves — by an event journal line and by mail.**
|
|
125
|
+
Both roads are opened by one threshold: a new group, or a group silent for longer than a day.
|
|
126
|
+
- **The mail holds nothing that is closed by the right to the failures screen.** It goes to an
|
|
127
|
+
address closed by no right, and details in it would bypass the right by mail.
|
|
128
|
+
- **The owner reads the failure rate as a curve above the feed: a bar is a bucket of the chosen
|
|
129
|
+
period.** The group counter says how many times it happened, but not when: by it a breakage
|
|
130
|
+
streaming right now cannot be told from one accumulated over a month.
|
|
131
|
+
- **The alarm is raised by growth in breakages, not in all failures.** A rejected call is a check
|
|
132
|
+
that fired, and those are nine in ten: against them growth in breakages is not visible at all.
|
|
133
|
+
- **A spike is counted over the last closed bucket; the current one is not given to the rule.**
|
|
134
|
+
It is still filling, and at the start of every period a comparison with it would show a drop in
|
|
135
|
+
the rate.
|
|
136
|
+
- **The rate is analysed by a schedule tick, not by a screen request.** The curve computes the
|
|
137
|
+
alarm on every response, but the owner may never open the screen, and must learn of a spike
|
|
138
|
+
without it.
|
|
139
|
+
- **The owner learns of a spike by a journal line and by mail; a repeat of the mail is held by a
|
|
140
|
+
fuse.** One incident takes one line in the feed, and a mail about a lasting breakage is needed
|
|
141
|
+
the next day too.
|
|
142
|
+
|
|
143
|
+
## What of the law is not here
|
|
144
|
+
|
|
145
|
+
A failure that happened before the application came up has nowhere to be recorded: the store
|
|
146
|
+
does not exist yet at that moment. Such failures stay only in the container output. A failure of
|
|
147
|
+
the store itself goes there too: its log lines are excluded from failures entirely, otherwise a
|
|
148
|
+
breakage of the store produces a stream that speeds itself up.
|
|
149
|
+
|
|
150
|
+
The list of selected lower-level names is checked against nothing. A new place that needs the
|
|
151
|
+
store appends itself to it by hand, and a forgotten one silently stays only in the output.
|
|
152
|
+
|
|
153
|
+
Nothing checks that the level was chosen right. A new place decides on its own which level to
|
|
154
|
+
take, and the mistake shows only when the code is read.
|
|
155
|
+
|
|
156
|
+
The completeness of the startup digest is checked by nothing. Feature names are listed by hand,
|
|
157
|
+
while the environment variable is read by dozens of files across all domains: a new feature that
|
|
158
|
+
forgot to append itself to the digest silently lands in none of the three lists — and in
|
|
159
|
+
production looks not disabled but nonexistent. That is why reading an environment variable
|
|
160
|
+
itself demands this rule as a second layer: the guard sees the access to the environment in the
|
|
161
|
+
text of the edit, but not whether the digest was appended.
|
|
162
|
+
|
|
163
|
+
## Patterns
|
|
164
|
+
|
|
165
|
+
- `observability-record` — how to add a new log line.
|
|
166
|
+
|
|
167
|
+
## Pitfalls
|
|
168
|
+
|
|
169
|
+
- **The request context lives in the execution storage and does not move into deferred work.** A
|
|
170
|
+
deferred write reads the context of the request that took the place of the original one. The
|
|
171
|
+
context is captured at the moment of the logger call.
|
|
172
|
+
- **The logger is set on the whole application, so the framework lines go the same way as our
|
|
173
|
+
own.** Everything the framework writes about itself lands in the same output and the same
|
|
174
|
+
selection.
|
|
175
|
+
- **A stream failure arrives after the response has started.** Control returns when only the
|
|
176
|
+
header has been sent. Without a wrapper such a failure does not reach the logs at all.
|
|
177
|
+
- **Serialising a log line must not throw.** Otherwise a circular reference in the fields takes
|
|
178
|
+
down the request whose log the fields were assembled for.
|
|
179
|
+
- **The key that wraps a foreign body for scrubbing is chosen by the scrubbing rules.** Scrubbing
|
|
180
|
+
works by key name, and a bare value passes it entirely — but a key that itself counts as free
|
|
181
|
+
text carries the whole body into the store as one scrubbing mark. A new wrapper is checked
|
|
182
|
+
against the key lists before it gets such a name.
|
|
183
|
+
- **A repeat fuse whose key is built from what measures time never fires.** When the analysis
|
|
184
|
+
tick equals the bucket width, every analysis sees an empty lock and sends again. From the
|
|
185
|
+
outside it looks working: the fuse is declared, the binding matches, mails go out every hour.
|
|
186
|
+
The key is taken from the subject of the alert, not from the stretch of time it is counted by.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Browser environment — how it works here — cold part
|
|
2
|
+
|
|
3
|
+
What the rule `platform-access` handed over when cut to its statements, every article whole.
|
|
4
|
+
|
|
5
|
+
Rule under the law `docs/constitution/frontend-application.md`. The law says what must be true; here
|
|
6
|
+
— what replaces a direct call to the global object in this tree. State — `angular-patterns`, the
|
|
7
|
+
component file — `component-structure`, styles — `styling-bem`, the server access layer —
|
|
8
|
+
`api-layer`. All five under one law.
|
|
9
|
+
|
|
10
|
+
The rule is about the front end: `libs/api/**` and `apps/api/**` are NestJS, the environment there
|
|
11
|
+
is its own, and nothing of the listed applies.
|
|
12
|
+
|
|
13
|
+
## What it is called here
|
|
14
|
+
|
|
15
|
+
| Direct call | Here |
|
|
16
|
+
| ---------------------------------------- | ----------------------------------------------------- |
|
|
17
|
+
| `globalThis.open(...)`, `window.open()` | `inject(WINDOW).open(...)` |
|
|
18
|
+
| `globalThis.crypto.randomUUID()` | `inject(WINDOW).crypto.randomUUID()` |
|
|
19
|
+
| `isPlatformBrowser(inject(PLATFORM_ID))` | `inject(PlatformService).isPlatformBrowser` |
|
|
20
|
+
| `document.defaultView` | `inject(WINDOW)` |
|
|
21
|
+
| direct `document` | `inject(DOCUMENT)` from `@angular/common` — as before |
|
|
22
|
+
| DOM initialisation after rendering | `afterNextRender()` |
|
|
23
|
+
|
|
24
|
+
`WINDOW`, `PlatformService` and `StorageService` come from `@rt-tools/core`.
|
|
25
|
+
|
|
26
|
+
## Where it lives
|
|
27
|
+
|
|
28
|
+
In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
|
|
29
|
+
travels between repositories, the layout does not, and a path named in the rule lies in the first
|
|
30
|
+
tree that keeps its code differently.
|
|
31
|
+
|
|
32
|
+
## Flow
|
|
33
|
+
|
|
34
|
+
The flow of reaching the runtime: how the global object is taken, where the environment is checked
|
|
35
|
+
and what is done in a file without dependency injection.
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart TD
|
|
39
|
+
A[Code needs the global object or the environment] --> B{Where it lies}
|
|
40
|
+
B -->|A class with dependency injection| C[The global object comes by a token, not taken directly]
|
|
41
|
+
B -->|A pure function| D[The window is taken as a parameter: there is no injection there]
|
|
42
|
+
C --> E{It matters where the code runs}
|
|
43
|
+
D --> E
|
|
44
|
+
E -->|Yes| F[The platform service is asked, not the presence of a name in the environment]
|
|
45
|
+
E -->|No| G[Work goes on]
|
|
46
|
+
F --> G
|
|
47
|
+
G --> H{The class is created at application startup}
|
|
48
|
+
H -->|Yes| I[Server-side page rendering is checked too: the linter does not see it]
|
|
49
|
+
H -->|No| J[Done]
|
|
50
|
+
I --> J
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## How the law applies here
|
|
54
|
+
|
|
55
|
+
- **The global object comes by the `WINDOW` token, not taken directly.** The type is narrowed by a
|
|
56
|
+
cast to `Window & typeof globalThis`: constructors like `IntersectionObserver` are declared on the
|
|
57
|
+
global object, not on the `Window` interface.
|
|
58
|
+
- **The environment is checked through `PlatformService`, not through `typeof window`.** A check by
|
|
59
|
+
the presence of a global is right by accident and breaks on the first environment where the global
|
|
60
|
+
is stubbed.
|
|
61
|
+
- **A direct call to the global object is refused by the linter.** Sixteen browser environment names
|
|
62
|
+
are banned on the front-end trees; the three places where direct access is deliberate are taken
|
|
63
|
+
out from under the ban by a list in the config, not by a disable on the line.
|
|
64
|
+
|
|
65
|
+
## What of the law is not here
|
|
66
|
+
|
|
67
|
+
The ban acts on names, not on paths to them: the linter lets `this.#document.defaultView` through,
|
|
68
|
+
because there is no global name in such a line. Such a call is lawful — the window there already
|
|
69
|
+
came by injection — but a real bypass would look the same, and it can be seen only by reading.
|
|
70
|
+
|
|
71
|
+
Direct access remains in three places, and deliberately: the inline script against theme flicker in
|
|
72
|
+
`apps/site/src/index.html` (it runs before the application starts), the startup failure handler in
|
|
73
|
+
`apps/*/src/main.ts`, and the code inside `page.evaluate` in the end-to-end specs — it runs in the
|
|
74
|
+
page, outside DI. A new place is not added to this list without the owner's explicit agreement.
|
|
75
|
+
|
|
76
|
+
## Patterns
|
|
77
|
+
|
|
78
|
+
- `platform-access-di` — ready-made injects, the type cast, pure functions, the environment check.
|
|
79
|
+
|
|
80
|
+
## Pitfalls
|
|
81
|
+
|
|
82
|
+
- **The token factory throws `Window is not available` if the document has no `defaultView`.** Under
|
|
83
|
+
server-side page rendering `defaultView` exists, and an inject as a class field in a root service
|
|
84
|
+
is safe, but a service that must work without a DOM at all takes the window inside a method under
|
|
85
|
+
an environment check.
|
|
86
|
+
- **After an edit that adds `WINDOW` to a service created at startup, not only the build is needed
|
|
87
|
+
but also a running page-rendering server.** The site is real SSR, and the failure shows only
|
|
88
|
+
there.
|
|
89
|
+
- **No environment check is needed around storage:** `StorageService` falls back to memory outside
|
|
90
|
+
the browser anyway, and an extra `if (!isBrowser)` around a read and a write is dead code.
|
|
91
|
+
- **There is no DI in `*.logic.ts` and `*.util.ts`:** the window is taken as a parameter, and the
|
|
92
|
+
calling component injects it.
|
|
93
|
+
- **Preparing the state of an end-to-end spec by writing to storage is not allowed:** the spec walks
|
|
94
|
+
the same steps as the user.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Work queue audit — how it works here — cold part
|
|
2
|
+
|
|
3
|
+
What the rule `queue-audit` handed over when cut to its statements, every article whole.
|
|
4
|
+
|
|
5
|
+
Rule under the law `docs/constitution/delivery.md`. The law says what must be true about the work
|
|
6
|
+
queue; here — what the audit reads in a tree on GitHub and which discrepancies it names. Creating a
|
|
7
|
+
task, a branch and a PR is the rule `git-workflow`.
|
|
8
|
+
|
|
9
|
+
## What it is called here
|
|
10
|
+
|
|
11
|
+
| In the law | Here |
|
|
12
|
+
| -------------------------- | ------------------------------------------------------------ |
|
|
13
|
+
| the work queue | the project board; a task is an issue on it |
|
|
14
|
+
| a discrepancy of the queue | a line of the audit; a run with lines exits with code 1 |
|
|
15
|
+
| the audit run | `npm run check:board` |
|
|
16
|
+
|
|
17
|
+
## Where it lives
|
|
18
|
+
|
|
19
|
+
In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
|
|
20
|
+
travels between repositories, the layout does not, and a path named in the rule lies in the first
|
|
21
|
+
tree that keeps its code differently.
|
|
22
|
+
|
|
23
|
+
## Flow
|
|
24
|
+
|
|
25
|
+
What the audit reads, in the order it reads it.
|
|
26
|
+
|
|
27
|
+
```mermaid
|
|
28
|
+
flowchart TD
|
|
29
|
+
A[The audit starts] --> B[Open tasks and their columns]
|
|
30
|
+
B --> C[Epics: links both ways, the base of task PRs, long work]
|
|
31
|
+
C --> D[Open PRs: column, lag behind the base, conflict]
|
|
32
|
+
D --> E{The pipeline wakes for the base}
|
|
33
|
+
E -->|Yes| F[The run on the tip: absent, pushed out, green on a draft]
|
|
34
|
+
E -->|No| G[One line for all such PRs, not a discrepancy]
|
|
35
|
+
F --> H[The last run of the main branch]
|
|
36
|
+
G --> H
|
|
37
|
+
H --> I[Lines are printed, the exit code says whether any were]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## How the law applies here
|
|
41
|
+
|
|
42
|
+
- **A lagging column is found by the queue audit, not by eye.** It judges the column by the PR both
|
|
43
|
+
ways: an open PR with the task not in review, and review with no open PR.
|
|
44
|
+
- **A branch with an open PR lags behind its base silently.** The guard judges the base once, at
|
|
45
|
+
opening, and the run does not see what merged after. The work queue audit counts the lag in a
|
|
46
|
+
summary line and refuses nothing by it: a lag without a conflict the host merges itself.
|
|
47
|
+
- **The link between a task and an epic is read by the audit both ways.** A one-sided binding looks
|
|
48
|
+
as whole as a two-sided one.
|
|
49
|
+
- **Work that one session cannot close is marked in two places, and they are audited.** The board
|
|
50
|
+
label and the sessions line in the epic plan say the same to two readers; only what legitimately
|
|
51
|
+
does not split is marked.
|
|
52
|
+
- **The tip of an open PR without a run is seen by the work queue audit, unless the pipeline does
|
|
53
|
+
not wake for its base.** A page without a run looks the same as with a green one; where no run
|
|
54
|
+
comes at all, the audit is silent about that PR.
|
|
55
|
+
- **A run pushed out of the pipeline queue gets a separate audit line.** It looks failed though it
|
|
56
|
+
never checked the branch, and the step count tells them apart.
|
|
57
|
+
- **The last run of the main branch is judged by the audit too: red and pushed out get lines of
|
|
58
|
+
their own.** The merge itself is checked by nobody; a pipeline asleep on a push to main is named.
|
|
59
|
+
- **A draft with a green run on its tip is an audit discrepancy.** A green page permits nothing: the
|
|
60
|
+
host locks the button.
|
|
61
|
+
- **A conflicting open PR is a work queue audit discrepancy.** The conflict arrives with someone
|
|
62
|
+
else's merge, and the host shows the mark only inside the PR.
|
|
63
|
+
- **An open PR without a reviewer is a work queue audit discrepancy.** It reaches no inbox, and
|
|
64
|
+
before the merge the miss does not show. A request to the author does not count, so a PR opened
|
|
65
|
+
by a person shows here too; the author apart is not judged.
|
|
66
|
+
|
|
67
|
+
## What of the law is not here
|
|
68
|
+
|
|
69
|
+
The audit reads the queue and the host, not the tree: what a PR body says about the work it reads
|
|
70
|
+
as text and does not judge. A column moved by hand between two runs is seen only on the next run.
|
|
71
|
+
|
|
72
|
+
## Patterns
|
|
73
|
+
|
|
74
|
+
- `queue-audit-read` — running the audit and acting on each of its lines.
|
|
75
|
+
|
|
76
|
+
## Pitfalls
|
|
77
|
+
|
|
78
|
+
No trap of this rule is recorded yet. A trap met on an edit lands here, under this heading.
|