@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,197 +2,207 @@
|
|
|
2
2
|
name: spec-driven-domain
|
|
3
3
|
kind: pattern
|
|
4
4
|
rule: spec-driven
|
|
5
|
-
description:
|
|
5
|
+
description: Pattern of rule spec-driven. Load when creating or editing a domain spec in docs/specs — the mandatory sections, the scenario form, binding a rule to code, the order of work from spec to code. Not for creating a law, a rule or a pattern — that is pattern spec-driven-rule.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Domain spec
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Pattern of the rule `spec-driven`. What must be true — the law
|
|
11
11
|
`docs/constitution/project-documentation.md`.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## When to use
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
15
|
+
- A new domain or a feature in `proposed/` is created.
|
|
16
|
+
- A `.proto` is edited — the specs of the touched domains go in the same branch.
|
|
17
|
+
- A divergence between a spec and the code was noticed.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Layout
|
|
20
20
|
|
|
21
21
|
```
|
|
22
|
-
docs/specs
|
|
23
|
-
spec.md —
|
|
24
|
-
implementation.md —
|
|
25
|
-
scenarios.md —
|
|
26
|
-
|
|
27
|
-
proposed
|
|
22
|
+
docs/specs/<domain>/
|
|
23
|
+
spec.md — how the domain works
|
|
24
|
+
implementation.md — the table "rule → file:symbol"
|
|
25
|
+
scenarios.md — scenarios SC-<PREFIX>-<NUMBER>
|
|
26
|
+
<subdomain>/ — its own spec.md, implementation.md and scenarios.md
|
|
27
|
+
proposed/<feature>/ — only what does not exist yet
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
The template is `docs/specs/_template/spec.md`, the index with prefixes is `docs/specs/README.md`.
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
A subdomain is asked the same as a domain: the same mandatory sections, the same companion next
|
|
33
|
+
to it, the same link between scenarios and tests. A domain with half its subdomains described and
|
|
34
|
+
half created as empty directories is never green.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
Work that touched a domain and its subdomain writes two product agreements, not one. A subdomain
|
|
37
|
+
has a scenario prefix of its own, and the audit gives no spec a second prefix: the scenarios of
|
|
38
|
+
such work part into two numberings — one per spec they will merge into. The plan names both, and
|
|
39
|
+
they merge apart, each into its own spec.
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## Mandatory sections
|
|
42
42
|
|
|
43
|
-
`## Зачем` · `## Терминология`
|
|
44
|
-
`## Правила` · `## Что не входит` · `## Контракт`
|
|
45
|
-
`## Данные` · `## Экраны и состояния` · `## Сквозные требования`
|
|
43
|
+
`## Зачем` · `## Терминология` with the subsection `### Как это называется в интерфейсе` ·
|
|
44
|
+
`## Правила` · `## Что не входит` · `## Контракт` with the subsection `### Коды отказов` ·
|
|
45
|
+
`## Данные` · `## Экраны и состояния` · `## Сквозные требования` with four subsections
|
|
46
46
|
`### Локали`, `### SEO`, `### Мобильная раскладка`, `### Мультиобъектность` · `## Решения` ·
|
|
47
47
|
`## Открытые вопросы` · `## История изменений`.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
The heading text is checked verbatim. "Not applicable" is a legitimate answer, a missing section
|
|
50
|
+
is not.
|
|
50
51
|
|
|
51
|
-
`## Решения`
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
`## Решения` is a temporary place. A decision lives in it until the layer it belongs to is found;
|
|
53
|
+
the found layer takes it as an item, and nothing stays in the spec. A section that has grown reads
|
|
54
|
+
as a sign of a rule not yet created, not as a trait of a complex domain: splitting such a spec by
|
|
55
|
+
lines is useless, because what splits in it is not the description of the domain but the unwritten
|
|
56
|
+
rule.
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
**The heading of a decisions-section entry is not a date.** A date says when the decision was
|
|
59
|
+
made, while the section answers "why so and not otherwise": a decision cannot be selected or
|
|
60
|
+
found by date, yet an entry named by one reads as archive and stays in the spec forever. An entry
|
|
61
|
+
starts with the decision itself.
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
**A statement standing in another section of the same spec is not created as a second rule
|
|
64
|
+
item.** The structure of a record lives in the data section, the order of calls in the contract
|
|
65
|
+
section, the reason the domain exists in the `## Зачем` section: all three say what the rule would
|
|
66
|
+
say. The second copy diverges from the first silently, and there is nothing to notice it by — the
|
|
67
|
+
audit knows a rule item against an anchor, and nobody compares two statements about one thing.
|
|
68
|
+
The decision at that point leaves the decisions section whole: the place where the requirement
|
|
69
|
+
lives is found.
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
`**Законы:**` —
|
|
71
|
-
|
|
71
|
+
The header carries the status, the revision date, the scenario prefix, the dependencies on other
|
|
72
|
+
domains, the `**Законы:**` line — the laws the domain applies — and the `**Процедуры:**` line —
|
|
73
|
+
the lib roots whose procedures the domain serves.
|
|
72
74
|
|
|
73
75
|
```markdown
|
|
74
|
-
**Зависимости:** `catalog` (
|
|
76
|
+
**Зависимости:** `catalog` (booking request contents), `availability` (date occupancy)
|
|
75
77
|
**Законы:** `access`, `locales`, `lists`
|
|
76
|
-
**Процедуры:** `libs/api
|
|
78
|
+
**Процедуры:** `libs/api/<domain>`
|
|
77
79
|
```
|
|
78
80
|
|
|
79
|
-
|
|
80
|
-
обе стороны.
|
|
81
|
+
A law named anywhere in the spec text must stand in this line: the link is checked both ways.
|
|
81
82
|
|
|
82
|
-
##
|
|
83
|
+
## A rule and its binding
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
A rule is worded so that it can be broken, and starts with a bold phrase:
|
|
85
86
|
|
|
86
87
|
```markdown
|
|
87
|
-
-
|
|
88
|
+
- **One maximum discount is applied.** Adding discounts up gives a price below cost.
|
|
88
89
|
```
|
|
89
90
|
|
|
90
|
-
|
|
91
|
+
The binding lives in `implementation.md` next to it, and the key of the link is the rule text
|
|
92
|
+
itself:
|
|
91
93
|
|
|
92
94
|
```markdown
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
95
|
+
| Rule | Where it is carried out |
|
|
96
|
+
| -------------------------------- | ------------------------------------------------------------------ |
|
|
97
|
+
| One maximum discount is applied. | `libs/api/<domain>/util/src/lib/quote.calculator.ts:calculateQuote` |
|
|
96
98
|
```
|
|
97
99
|
|
|
98
|
-
|
|
99
|
-
`Q
|
|
100
|
+
A rule that found no place in code is an intention: its place is "Open questions" as
|
|
101
|
+
`Q-<law letter>-<number>`, not a formal anchor.
|
|
100
102
|
|
|
101
|
-
##
|
|
103
|
+
## Scenario
|
|
102
104
|
|
|
103
105
|
```markdown
|
|
104
|
-
### SC-BK-19 —
|
|
106
|
+
### SC-BK-19 — confirmation for occupied dates is refused
|
|
105
107
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
Given the property has a confirmed booking on overlapping dates
|
|
109
|
+
When the owner confirms the booking request
|
|
110
|
+
Then the refusal is shown to the owner as occupied dates, not as a database error
|
|
109
111
|
```
|
|
110
112
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
`Не покрыто:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
113
|
+
**"Then" names one outcome.** A wording through "either … or" describes two structures at once,
|
|
114
|
+
and the scenario gives no way to learn which one works: it is green under either. A fork is
|
|
115
|
+
described by two scenarios with different "Given" — then a change of behaviour fails exactly the
|
|
116
|
+
one that stopped being true, instead of passing silently.
|
|
117
|
+
|
|
118
|
+
The identifier is put at the start of the test title, followed by a dash. A scenario without a
|
|
119
|
+
test is marked `Не покрыто: <reason>`, a scenario with an incomplete test — `Покрытие: частичное
|
|
120
|
+
— <what is missing>`.
|
|
121
|
+
|
|
122
|
+
A scenario that cannot be checked by anything at all is not created. The "not covered" mark says
|
|
123
|
+
"there is no test yet" and promises one will appear; where no check exists, there is no promise,
|
|
124
|
+
and the marked scenario hangs in the suite forever, reads as debt and makes every next reader
|
|
125
|
+
find out anew whether it is time to close it. The rule the scenario was meant for stays a rule:
|
|
126
|
+
it is held by the line in the companion and the entry in the change history, and that is enough.
|
|
127
|
+
|
|
128
|
+
The number in the identifier lives like this:
|
|
129
|
+
|
|
130
|
+
| What happened | What is done with the number |
|
|
131
|
+
| ------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
132
|
+
| a scenario was added | the next free one is taken — the largest issued **across all branches** plus one, not a gap in the middle |
|
|
133
|
+
| the promise changed | the number stays, the test title is edited by the same commit |
|
|
134
|
+
| a scenario was deleted | the number stays empty and is not given to a new scenario; the test is deleted with the scenario |
|
|
135
|
+
| the numbers looked worth compacting | they are not renumbered: only the number ties them to the tests, and the run stays green under both edits |
|
|
136
|
+
|
|
137
|
+
The number is written the same way as its neighbours' in the same file: the audit looks for it by
|
|
138
|
+
a pattern, and a number written differently matches neither in the spec nor in the test title.
|
|
139
|
+
|
|
140
|
+
**A free number is looked for across all branches, not in the main one alone.** Neighbouring work
|
|
141
|
+
keeps its numbers on disk and has not reached main yet: six numbers were issued twice this way,
|
|
142
|
+
and the work whose agreement was not merged had to move. The number is the only thing tying a
|
|
143
|
+
scenario to its test, and issued a second time it leaves the old reference looking right and
|
|
144
|
+
leading elsewhere.
|
|
145
|
+
|
|
146
|
+
This is asked by a tree command, if the tree created one: it reads scenario headings across all
|
|
147
|
+
branches — local and remote — and prints the first free number past the largest taken. The
|
|
148
|
+
command's name is given by the rule's companion.
|
|
149
|
+
|
|
150
|
+
## Order of work
|
|
151
|
+
|
|
152
|
+
1. A task is created by scenarios: what will become true when the work is finished.
|
|
153
|
+
2. The domain spec (or `proposed/<feature>/`) is edited **before** the code.
|
|
154
|
+
3. The code is written to the scenarios, and the tests are named by their identifiers.
|
|
155
|
+
4. `npm run check:specs` — before the push.
|
|
156
|
+
5. Acceptance goes by the scenarios, not by a retelling of the edit.
|
|
157
|
+
|
|
158
|
+
A rule promising a result a person sees is confirmed on the running application, not by
|
|
159
|
+
inference from the call graph. Reading confirms headings, the link to bindings and the shape of
|
|
160
|
+
data; a rule with nothing to confirm it on leaves as an open question and is not written as a
|
|
161
|
+
statement.
|
|
162
|
+
|
|
163
|
+
## Common misses
|
|
164
|
+
|
|
165
|
+
- A grown domain is split into new domains instead of subdomains: a new domain has to be entered
|
|
166
|
+
in the index, audited against the code separately and explained as to why it is not a subdomain
|
|
167
|
+
of its neighbour — while a subdomain stays in its domain and inherits its contract. A
|
|
168
|
+
neighbouring domain is created only when the subject lives as an entity of its own. The
|
|
169
|
+
boundary is drawn by the owner: a split rewrites the numbers in all the domain's test titles,
|
|
170
|
+
and it cannot be put back by the same move.
|
|
171
|
+
- A count of rules or scenarios in the domain index: it is recomputed at every edit of any spec,
|
|
172
|
+
and a year later most such numbers silently describe the spec of the day before yesterday. The
|
|
173
|
+
index holds the domain, the prefix and one line of "what it is about".
|
|
174
|
+
- `tasks.md` in a spec: steps are a session artefact; their place is the branch or the PR
|
|
175
|
+
description.
|
|
176
|
+
- A field table copied from the contract: the source is `libs/common/proto/proto/<area>/v1/`,
|
|
177
|
+
and only one of the two compiles.
|
|
178
|
+
- Columns and indexes in a spec: they are in `prisma/schema.prisma`, and the spec keeps the rule
|
|
179
|
+
the constraint expresses.
|
|
180
|
+
- The place where a rule is carried out inside the rule text: it changes at the first
|
|
181
|
+
refactoring, and `implementation.md` exists for it.
|
|
182
|
+
- A `Не покрыто` mark with an existing test is a refusal: the debt was closed, and the mark was
|
|
183
|
+
not removed.
|
|
184
|
+
- The `Не покрыто` mark is read verbatim and from the start of the line. Any word between it and
|
|
185
|
+
the colon — `Не покрыто, и прогоном не покрывается вовсе: …` — and the scenario counts as not
|
|
186
|
+
marked at all, and the reason the mark was written for never reaches the PR.
|
|
187
|
+
- A law named in the text but forgotten in the `**Законы:**` line: then the law gives no way to
|
|
188
|
+
learn which domains stand on it.
|
|
189
|
+
- A `.proto` edit without the specs of the touched domains: `docs-guard` refuses such a commit.
|
|
190
|
+
- **A rule inferred from the call graph errs silently.** It reads as confidently as a measured
|
|
191
|
+
one, and the binding audit lets it through — the symbol is in place, it just describes the wrong
|
|
192
|
+
thing. Two rules of one spec turned out inverted: the link went not between the stores but
|
|
193
|
+
through the component listening to them — and both nearly became a task for a defect that does
|
|
194
|
+
not exist.
|
|
195
|
+
|
|
196
|
+
- **A grown domain splits into subdomains, not into new domains.** A new domain would have to be
|
|
197
|
+
entered in the index, audited against the code separately and explained as to why it is not a
|
|
198
|
+
subdomain of its neighbour; a subdomain stays in its domain and inherits its contract. A
|
|
199
|
+
neighbouring domain is created only when the subject lives as an entity of its own.
|
|
200
|
+
- **The largest issued number is looked for across the whole domain by a command, not by eye at
|
|
201
|
+
the tail of the file.** Numbers in the scenarios file are out of order: edits inserted them next
|
|
202
|
+
to their neighbours by meaning, and the last line does not show the maximum. Six new numbers out
|
|
203
|
+
of eleven landed on taken ones — the spec audit caught it, not reading, and the test titles had
|
|
204
|
+
to be rewritten along the way.
|
|
205
|
+
- **The boundary between domains is drawn by the owner, not by the author of the next edit.** The
|
|
206
|
+
author sees their edit, not what the subject will grow into: a domain created along the way
|
|
207
|
+
turns out a month later to be half of its neighbour, and parting them means parting the scenario
|
|
208
|
+
numbers too.
|