@rt-tools/agent-kit 0.24.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agents/business-analyst.md +51 -50
- package/assets/agents/conscience.md +37 -35
- package/assets/agents/project-manager.md +49 -48
- package/assets/agents/prose-editor.md +31 -29
- package/assets/agents/qa-engineer.md +50 -48
- package/assets/agents/rules-reviewer.md +63 -58
- package/assets/agents/skill-curator.md +83 -78
- package/assets/agents/spec-critic.md +34 -29
- package/assets/agents/spec-writer.md +35 -32
- package/assets/agents/strict-teacher.md +39 -37
- package/assets/checks/archive-age.mjs +48 -28
- package/assets/checks/archive-prune.mjs +16 -14
- package/assets/checks/board-epics.github.mjs +75 -41
- package/assets/checks/board-folders.mjs +61 -0
- package/assets/checks/board-gh.github.mjs +35 -26
- package/assets/checks/board-long-work.github.mjs +24 -24
- package/assets/checks/board-paths.github.mjs +21 -16
- package/assets/checks/board-runs.github.mjs +45 -43
- package/assets/checks/board-titles.github.mjs +19 -17
- package/assets/checks/board.github.mjs +149 -127
- package/assets/checks/check-archive-age.mjs +23 -19
- package/assets/checks/check-board.github.mjs +172 -164
- 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 +120 -37
- package/assets/checks/check-push-gate.mjs +53 -50
- package/assets/checks/check-reuse.mjs +50 -40
- package/assets/checks/check-schema-drift.mjs +87 -83
- package/assets/checks/check-specs.mjs +155 -134
- package/assets/checks/check-state-next.mjs +66 -52
- package/assets/checks/check-states.mjs +32 -30
- package/assets/checks/check-styles.mjs +52 -51
- package/assets/checks/check-turn-map.mjs +54 -46
- package/assets/checks/lib-boundaries.mjs +32 -30
- package/assets/checks/lib-common.mjs +30 -29
- package/assets/checks/lib-domains.mjs +34 -34
- package/assets/checks/lib-manifests.mjs +17 -15
- package/assets/checks/lib-reexports.mjs +18 -18
- package/assets/checks/rt-kit-checks.config.mjs +174 -142
- package/assets/checks/signals.mjs +43 -39
- package/assets/checks/spec-anchors.mjs +114 -87
- package/assets/checks/spec-common.mjs +128 -84
- package/assets/checks/spec-contract.mjs +30 -30
- package/assets/checks/spec-proposed.mjs +27 -24
- package/assets/checks/spec-scenarios.mjs +51 -28
- package/assets/checks/task-new.github.mjs +85 -56
- package/assets/commands/feedback.md +65 -59
- package/assets/commands/next-session.md +64 -57
- package/assets/commands/skill-curator.md +83 -79
- package/assets/defaults/gate-map.sh +108 -97
- package/assets/defaults/project.sh +225 -185
- package/assets/defaults/shell.sh +73 -68
- package/assets/defaults/turn-map.md +45 -44
- package/assets/docs/GLOSSARY.md +142 -65
- package/assets/hooks/browser-device-id.sh +12 -12
- package/assets/hooks/browser-guard-device-id.sh +30 -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 +11 -10
- package/assets/hooks/conscience-guard.sh +91 -45
- package/assets/hooks/constitution-index.sh +16 -16
- package/assets/hooks/deny-tail.sh +28 -26
- package/assets/hooks/dev-server-guard.sh +46 -43
- package/assets/hooks/dispatch.sh +60 -46
- package/assets/hooks/docs-guard.sh +100 -91
- package/assets/hooks/exam-guard.sh +105 -93
- package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
- package/assets/hooks/git-guard-delivery-draft.sh +45 -38
- package/assets/hooks/git-guard-delivery-folder.sh +50 -43
- package/assets/hooks/git-guard-delivery-signature.sh +88 -52
- package/assets/hooks/git-guard-delivery.sh +196 -180
- 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 +26 -24
- 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 +19 -17
- package/assets/hooks/qa-dataid-guard.sh +52 -49
- package/assets/hooks/rerun-guard.sh +31 -30
- package/assets/hooks/reuse-first-guard.sh +108 -87
- package/assets/hooks/roles.sh +14 -14
- package/assets/hooks/rule-article.sh +36 -34
- package/assets/hooks/rule-source-guard.sh +47 -42
- package/assets/hooks/skill-gate-layers.sh +59 -57
- package/assets/hooks/skill-gate-rearm.sh +15 -8
- package/assets/hooks/skill-gate.sh +89 -81
- package/assets/hooks/skill-loaded.sh +6 -6
- package/assets/hooks/sql-guard-parse.sh +68 -66
- package/assets/hooks/sql-guard-request.sh +48 -46
- package/assets/hooks/sql-guard-target.sh +57 -51
- package/assets/hooks/sql-guard-write.sh +84 -79
- package/assets/hooks/sql-guard.sh +52 -47
- package/assets/hooks/stand-login-guard.sh +40 -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 +256 -204
- package/assets/hooks/turn-exit-patterns.sh +53 -0
- package/assets/hooks/utf8.sh +11 -11
- package/assets/hooks/waiting-turn-guard.sh +94 -94
- package/assets/hooks/window-fill-guard.sh +70 -62
- package/assets/hooks/work-start-guard.sh +52 -49
- package/assets/hooks/write-targets.sh +96 -44
- package/assets/laws/autonomous-work.md +29 -27
- package/assets/laws/code-structure.md +31 -30
- package/assets/laws/delivery.md +148 -137
- package/assets/laws/entity-editing.md +52 -50
- package/assets/laws/entity-models.md +14 -13
- package/assets/laws/frontend-application.md +39 -38
- package/assets/laws/lib-imports.md +27 -27
- package/assets/laws/lists.md +31 -29
- package/assets/laws/navigation.md +37 -37
- package/assets/laws/observability.md +41 -40
- package/assets/laws/project-documentation.md +106 -99
- package/assets/laws/reuse-first.md +31 -29
- package/assets/laws/shared-code.md +27 -27
- package/assets/laws/verifiability.md +131 -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 +93 -86
- package/assets/patterns/git-workflow-commit.github.md +152 -141
- package/assets/patterns/git-workflow-commit.gitlab.md +95 -89
- 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 +98 -93
- package/assets/patterns/git-workflow-migration.md +54 -52
- package/assets/patterns/git-workflow-pr-ready.md +57 -56
- package/assets/patterns/git-workflow-pr.azure.md +126 -121
- package/assets/patterns/git-workflow-pr.github.md +179 -175
- package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
- package/assets/patterns/git-workflow-restart.md +35 -31
- package/assets/patterns/git-workflow-secrets.md +80 -73
- package/assets/patterns/git-workflow-stack.md +131 -106
- package/assets/patterns/lib-layers-move.md +62 -53
- package/assets/patterns/lib-layers-new.md +59 -45
- package/assets/patterns/observability-record.md +72 -67
- package/assets/patterns/platform-access-di.md +31 -29
- package/assets/patterns/reuse-first-extend.md +66 -61
- package/assets/patterns/shared-code-new.md +39 -38
- package/assets/patterns/spec-driven-domain.md +161 -151
- package/assets/patterns/spec-driven-rule.md +179 -168
- package/assets/patterns/spec-driven-sweep.md +41 -39
- package/assets/patterns/status-report-table.github.md +37 -36
- package/assets/patterns/styling-bem-component.md +42 -42
- package/assets/patterns/styling-bem-layout.md +39 -34
- package/assets/patterns/styling-bem-sheet.md +59 -58
- package/assets/patterns/task-flow-archive.md +222 -215
- package/assets/patterns/task-flow-close.md +215 -203
- package/assets/patterns/task-flow-handoff.md +154 -145
- package/assets/patterns/task-flow-resume.md +138 -133
- package/assets/patterns/task-flow-start.md +204 -192
- package/assets/patterns/testing-e2e.md +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 +152 -141
- package/assets/pitfalls/doc-style.md +96 -91
- package/assets/pitfalls/git-workflow.azure.md +49 -46
- package/assets/pitfalls/git-workflow.github.md +264 -234
- package/assets/pitfalls/git-workflow.gitlab.md +49 -45
- package/assets/pitfalls/spec-driven.md +73 -71
- package/assets/pitfalls/styling-bem.md +46 -40
- package/assets/pitfalls/task-flow.md +262 -246
- package/assets/pitfalls/testing.md +99 -92
- package/assets/pitfalls/turn-conduct.md +96 -81
- package/assets/rules/angular-patterns.md +81 -80
- package/assets/rules/api-layer.md +77 -74
- package/assets/rules/autonomous-work.md +75 -74
- package/assets/rules/browser-verification.md +223 -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 +198 -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 +250 -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 +272 -260
- package/assets/rules/status-report.md +55 -58
- package/assets/rules/styling-bem.md +81 -77
- package/assets/rules/task-flow.md +282 -270
- package/assets/rules/testing.md +224 -209
- package/assets/rules/turn-conduct.md +255 -258
- package/assets/rules/turn-entry.md +92 -87
- package/assets/rules/typescript-conventions.md +94 -88
- package/assets/samples/specs/_template/spec.md +47 -47
- package/assets/samples/tasks/_template/grill.md +20 -20
- package/assets/samples/tasks/_template/plan.md +32 -30
- package/assets/samples/tasks/_template/progress.md +16 -16
- package/assets/skills/agent-kit-extend.md +129 -113
- package/assets/skills/agent-kit.md +235 -211
- package/assets/skills/write-a-skill.md +76 -71
- package/assets/templates/findings.md +19 -19
- package/assets/templates/gate-map.sh +16 -14
- package/assets/templates/implementation.md +28 -27
- package/assets/templates/pattern.md +17 -17
- package/assets/templates/pitfalls.md +6 -6
- package/assets/templates/postmortem.md +24 -23
- package/assets/templates/project.sh +24 -24
- package/assets/templates/proposal.md +62 -60
- package/assets/templates/rule.md +38 -38
- package/assets/workflows/feature.js +46 -46
- package/assets/workflows/plan.js +54 -54
- package/lib/catalog.d.ts +2 -0
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +4 -3
- package/lib/catalog.js.map +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +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/plan.d.ts +11 -0
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +10 -1
- package/lib/plan.js.map +1 -1
- package/lib/ship.d.ts +0 -7
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +10 -2
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.js +6 -2
- package/lib/shipment.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +45 -11
- package/lib/sync.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.26.0.tgz +0 -0
- package/rt-tools-agent-kit-0.24.0.tgz +0 -0
|
@@ -2,96 +2,93 @@
|
|
|
2
2
|
name: status-report
|
|
3
3
|
kind: rule
|
|
4
4
|
law: work-conduct
|
|
5
|
-
description:
|
|
5
|
+
description: Rule under the work-conduct law. Load when the owner asked where the work stands — "what is the status", "which epic", "what are you doing now". Names the shape of the reply — a paragraph about the epic and a table of its tasks — and what backs a cell about the tree. Pattern status-report-table.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Status report — how it works here
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
когда он спросил.
|
|
10
|
+
Rule under the work-conduct law. The law says that the work state outlives the session and is read
|
|
11
|
+
from the outside; here — in what shape it is shown to the owner when they asked.
|
|
13
12
|
|
|
14
|
-
##
|
|
13
|
+
## What it is called here
|
|
15
14
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
15
|
+
| In the law | Here |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| the work state | the "State" cell in the reply table |
|
|
18
|
+
| the place where the state is read | the reply to the owner and the progress entry in the task folder |
|
|
19
|
+
| the work asked about | a paragraph about the epic, under it all its tasks in order and those created outside it |
|
|
20
|
+
| the mark of done work | a run number, a PR number, a count of scenarios — not the word "done" |
|
|
21
|
+
| what backs the state | a command run by the same turn as the reply |
|
|
23
22
|
|
|
24
|
-
##
|
|
23
|
+
## Where it lives
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
Ready-made calls and a sample of a filled table — in the pattern `status-report-table` next to it.
|
|
26
|
+
Here is said what the reply must hold; how it is asked from the host and the tree — there.
|
|
28
27
|
|
|
29
|
-
##
|
|
28
|
+
## Flow
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
The flow of one status reply: what is asked from the tree before the first line of the reply and in
|
|
31
|
+
what order it lands for the owner.
|
|
33
32
|
|
|
34
33
|
```mermaid
|
|
35
34
|
flowchart TD
|
|
36
|
-
A[
|
|
37
|
-
B --> C{
|
|
38
|
-
C
|
|
39
|
-
C
|
|
40
|
-
D --> F[
|
|
35
|
+
A[The owner asked where the work is] --> B[The state is asked by commands: branch, PR, run, board]
|
|
36
|
+
B --> C{The work runs under an epic}
|
|
37
|
+
C -->|Yes| D[The task order is taken whole from the epic plan]
|
|
38
|
+
C -->|No| E[The row of the current task goes first]
|
|
39
|
+
D --> F[A row per epic task: ordinal number, what it is about, state]
|
|
41
40
|
F --> E
|
|
42
|
-
E --> G[
|
|
43
|
-
G --> H[
|
|
44
|
-
H --> I[
|
|
41
|
+
E --> G[A row per task created outside the epic]
|
|
42
|
+
G --> H[The State cell carries a number from a command's output]
|
|
43
|
+
H --> I[Under the table — what we wait for from the owner and the call that lifts it]
|
|
45
44
|
```
|
|
46
45
|
|
|
47
|
-
##
|
|
46
|
+
## How the law applies here
|
|
48
47
|
|
|
49
|
-
-
|
|
50
|
-
|
|
48
|
+
- **The work state is shown as a table, not as prose.** A retelling the owner reads whole to find
|
|
49
|
+
one row, and next time does not read at all.
|
|
51
50
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
52
51
|
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
- **The epic itself is described by text above the table, not by a row in it.** The columns are made
|
|
53
|
+
for a task — number, subject, state — and an epic squeezed into them loses the one thing it is
|
|
54
|
+
named for: why it is and where it goes. The paragraph says this in one or two sentences and names
|
|
55
|
+
how many tasks the epic has and which one runs now.
|
|
57
56
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
58
57
|
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
- **The epic's tasks are listed all, and in the order the plan assigned them.** With only the done
|
|
59
|
+
and the next one named, the owner sees neither how much is left nor where the work goes, while the
|
|
60
|
+
epic's order is assigned in advance and holds to the end. Each row has a short description, in
|
|
61
|
+
one's own words and one sentence: a task number says nothing about its subject.
|
|
63
62
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
64
63
|
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
- **Every cell about the tree's state is backed by a command run by the same turn.** A statement
|
|
65
|
+
without a command the owner reads as a verified fact and learns of a divergence last. The output
|
|
66
|
+
is named by a number — the run number, the time, how many scenarios of how many; "all green"
|
|
67
|
+
without a number is not written.
|
|
69
68
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
70
69
|
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
номер прогона встанет в клетку.
|
|
70
|
+
- **A run confirms the commit it ran on.** A run older than the branch tip speaks of a past tree and
|
|
71
|
+
will be read as of the present one; the tip is checked before the run number goes into the cell.
|
|
74
72
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
75
73
|
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
читает как поломку.
|
|
74
|
+
- **A draft PR is called a draft aloud, together with what we wait for.** A draft's merge is locked
|
|
75
|
+
by the host, and a green page permits the owner nothing; silence they read as breakage.
|
|
79
76
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
80
77
|
|
|
81
|
-
-
|
|
82
|
-
|
|
78
|
+
- **A task folder left as an empty template is "created, not started".** A created task with an
|
|
79
|
+
unfilled grill reads as work in progress and gets created a second time.
|
|
83
80
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
84
81
|
|
|
85
|
-
-
|
|
86
|
-
|
|
82
|
+
- **Under the table — no more than two lines.** What we wait for from the owner and the call that
|
|
83
|
+
lifts it. The rest the owner asks themselves, and asks exactly what they need.
|
|
87
84
|
<!-- rt-when: ответ владельцу о состоянии работы -->
|
|
88
85
|
|
|
89
|
-
##
|
|
86
|
+
## What of the law is not here
|
|
90
87
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
None of the agreements on the shape of the reply is checked by machine: the reply to the owner does
|
|
89
|
+
not land in the tree, and there is nothing to read it. It is held by the memory of whoever replies,
|
|
90
|
+
and a violation is visible only to the owner — by looking for a row in the text and not finding it.
|
|
94
91
|
|
|
95
|
-
##
|
|
92
|
+
## Patterns
|
|
96
93
|
|
|
97
|
-
- `status-report-table` —
|
|
94
|
+
- `status-report-table` — ready-made calls for each cell and a sample of a filled table.
|
|
@@ -2,125 +2,129 @@
|
|
|
2
2
|
name: styling-bem
|
|
3
3
|
kind: rule
|
|
4
4
|
law: frontend-application
|
|
5
|
-
description:
|
|
5
|
+
description: Rule under the frontend-application law. Load when editing any *.scss and a component template. Names the BEM directives, the styling tokens, the shared layout layer of the application and the check for a class without a rule. Ready-made code in patterns styling-bem-layout and -component.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Styling — how it works here
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
`component-structure`,
|
|
13
|
-
|
|
10
|
+
Rule under the law `docs/constitution/frontend-application.md`. The law says what must be true;
|
|
11
|
+
here — what it is called in this tree and where it lives. The layout of a component file —
|
|
12
|
+
`component-structure`, state — `angular-patterns`, the browser environment — `platform-access`,
|
|
13
|
+
the layer of calls to the server — `api-layer`. All five under one law.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
**Cold part:** `pitfalls.md` next to it — traps already stepped on. Loaded on demand, not
|
|
16
|
+
together with the rule.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## What it is called here
|
|
19
19
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
20
|
+
| In the law | Here |
|
|
21
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
+
| the shared set of styling values | the kit scales `--rt-*`; one's own on top of them — `--<prefix>-*` in the application's `styles.scss` |
|
|
23
|
+
| a class in the markup | the `rtBlock` and `rtElem` directives from `@rt-tools`, not a string in an attribute |
|
|
24
|
+
| a style rule | an `&__<element>` declaration in `.scss` — its own or in the application's shared layer |
|
|
25
|
+
| the shared layout layer | `apps/<app>/src/styles/`: `<prefix>-page`, `<prefix>-form`, `<prefix>-panel`, `<prefix>-window` in the admin, `<prefix>-site-page` on the site |
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Where it lives
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
|
|
30
|
+
travels between repositories, the layout does not, and a path named in the rule lies in the
|
|
31
|
+
first tree that keeps its code differently.
|
|
32
32
|
|
|
33
|
-
##
|
|
33
|
+
## Flow
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
The flow of a styling edit: where a value comes from, where the layout lives and what opens an
|
|
36
|
+
overlay.
|
|
37
37
|
|
|
38
38
|
```mermaid
|
|
39
39
|
flowchart TD
|
|
40
|
-
A[
|
|
41
|
-
B
|
|
42
|
-
B
|
|
43
|
-
B
|
|
44
|
-
C --> F[
|
|
40
|
+
A[Styling is edited] --> B{What is being set}
|
|
41
|
+
B -->|Colour, spacing, font size| C[Taken as a styling token, not written as a value in place]
|
|
42
|
+
B -->|Screen layout| D[Declared in the application's shared layer, not in the screen's styles]
|
|
43
|
+
B -->|A layer above the page| E[Opened by the kit service; the layer number is taken from the scale]
|
|
44
|
+
C --> F[The class is set by a directive, and every element class has its own rule]
|
|
45
45
|
D --> F
|
|
46
46
|
E --> F
|
|
47
|
-
F --> G{
|
|
48
|
-
G
|
|
49
|
-
H --> I[
|
|
47
|
+
F --> G{The size of a control}
|
|
48
|
+
G -->|Chosen by the pointer sign, not by the screen width| H[The styles file stays within the length limit]
|
|
49
|
+
H --> I[The stylelint run: a warning fails it the same as an error]
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
##
|
|
52
|
+
## How the law applies here
|
|
53
53
|
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
из частей.
|
|
54
|
+
- **Styling is taken as a `--rt-*` token, not written as a value in place.** Composite values —
|
|
55
|
+
`box-shadow`, `text-shadow` — are taken as a ready-made token whole, not assembled from parts.
|
|
57
56
|
<!-- rt-when: *.scss *.css -->
|
|
58
57
|
|
|
59
|
-
-
|
|
60
|
-
|
|
58
|
+
- **Every element class has its own style rule.** A class without a rule looks working and
|
|
59
|
+
silently does nothing.
|
|
61
60
|
<!-- rt-when: *.scss *.css -->
|
|
62
61
|
|
|
63
|
-
-
|
|
64
|
-
|
|
62
|
+
- **A class is set by a directive, not by a string in an attribute.** `rtElem` gets the block name
|
|
63
|
+
by injection from the nearest ancestor with `rtBlock`, and there is nothing to repeat that
|
|
64
|
+
resolution by the text of the template.
|
|
65
65
|
<!-- rt-when: *.html *.scss -->
|
|
66
66
|
|
|
67
|
-
-
|
|
68
|
-
|
|
67
|
+
- **The layout is declared in the application's shared layer, not in the screen's styles.** A
|
|
68
|
+
screen component outside the kit has an empty styles file by default.
|
|
69
69
|
<!-- rt-when: *.scss *.css -->
|
|
70
70
|
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
- **One thing is called by one name in every place it occurs.** A layout that keeps three
|
|
72
|
+
vocabularies for the page, the edit panel and the window, with shared names in different
|
|
73
|
+
meanings, does not count as a shared layer: the place of declaration matches, the meaning of the
|
|
74
|
+
name does not. Choosing a name, the executor lands in a foreign vocabulary and brings a foreign
|
|
75
|
+
spacing, and the checks do not see it. Where an element stands is set by the kind of block, not
|
|
76
|
+
by a second set of names.
|
|
76
77
|
<!-- rt-when: *.scss *.css *.html -->
|
|
77
78
|
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
- **The sheet and the window are opened by the kit service, not by a layer number.** The scale's
|
|
80
|
+
numbers compare only between neighbours in the markup; the service moves the markup outside, to
|
|
81
|
+
`<body>`, and there is nothing left to compare it with.
|
|
81
82
|
<!-- rt-when: *.ts *.scss -->
|
|
82
83
|
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
- **The layer number is taken from the scale, not written as a number in the component file.**
|
|
85
|
+
The scale is the only place where the layers are visible side by side: a number written in place
|
|
86
|
+
does not land in it, and the next node takes the same number without learning of it.
|
|
86
87
|
<!-- rt-when: *.scss *.css -->
|
|
87
88
|
|
|
88
|
-
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
- **A width limit is declared together with the fate of what did not fit.** A limit and a place in
|
|
90
|
+
a row hide or wrap nothing by themselves: a node that may receive a value longer than its place
|
|
91
|
+
has either ellipsis truncation or wrapping. Without that the text silently runs past the border
|
|
92
|
+
and lies over its neighbour, and allowing an element to shrink does not replace truncation.
|
|
92
93
|
<!-- rt-when: *.scss *.css -->
|
|
93
94
|
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
- **Truncation goes in a pair with a tooltip.** A truncated text without a tooltip reads as the
|
|
96
|
+
whole value: a person has no way to learn where the text actually ends. The whole value they see
|
|
97
|
+
either in the place itself or on hover — and a tooltip given a width limit of its own obeys the
|
|
98
|
+
article above the same as a cell.
|
|
98
99
|
<!-- rt-when: *.scss *.css -->
|
|
99
100
|
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
- **The size of a control is chosen by the pointer sign, not by the screen width.** A tablet in
|
|
102
|
+
landscape is wider than the narrow-viewport threshold, yet it is tapped with a finger:
|
|
103
|
+
`pointer: coarse` answers about the way of pressing, the width — about the room for the layout.
|
|
104
|
+
The steps are taken from the kit, not assigned in pixels.
|
|
104
105
|
<!-- rt-when: *.scss *.css -->
|
|
105
106
|
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
- **A styles file is no longer than 500 lines.** The limit is shared with code and texts, but
|
|
108
|
+
stylelint does not judge length at all — a check of the tree holds it. A grown screen file is
|
|
109
|
+
split by blocks, and shared layout leaves for its own layer.
|
|
109
110
|
<!-- rt-when: *.scss *.css -->
|
|
110
111
|
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
- **A stylelint warning fails the run the same as an error.** `!important` is declared a warning,
|
|
113
|
+
and the run goes with `--max-warnings 0`: otherwise the ban reads as a wish — two such warnings
|
|
114
|
+
lay in the tree while `npm run stylelint` returned zero and was no gate.
|
|
114
115
|
<!-- rt-when: *.scss *.css -->
|
|
115
116
|
|
|
116
|
-
##
|
|
117
|
+
## What of the law is not here
|
|
117
118
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
The "class without a rule" check counts a match by element name, not by the pair "block —
|
|
120
|
+
element": a class that has a rule, but under a foreign block, it lets through. The reverse
|
|
121
|
+
direction — removing the rule of a live class — is not checked at all and is caught by reading
|
|
122
|
+
the template.
|
|
121
123
|
|
|
122
|
-
##
|
|
124
|
+
## Patterns
|
|
123
125
|
|
|
124
|
-
- `styling-bem-layout` —
|
|
125
|
-
- `styling-bem-component` —
|
|
126
|
-
|
|
126
|
+
- `styling-bem-layout` — a screen on the shared layout layer, the application's blocks.
|
|
127
|
+
- `styling-bem-component` — styles of a kit component, `:host`, modifiers, the site's styling
|
|
128
|
+
language.
|
|
129
|
+
- `styling-bem-sheet` — the sheet and the window above the page: what opens them, the backdrop,
|
|
130
|
+
the measurement.
|