@rt-tools/agent-kit 0.38.0 → 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.
Files changed (59) hide show
  1. package/assets/checks/check-turn-map.mjs +4 -4
  2. package/assets/checks/decision-table.json +91 -24
  3. package/assets/checks/flow-data.mjs +22 -23
  4. package/assets/checks/flow-forecast.mjs +12 -8
  5. package/assets/checks/flow-guard.mjs +365 -163
  6. package/assets/checks/flow-step.mjs +188 -58
  7. package/assets/checks/flow-verdict.mjs +124 -9
  8. package/assets/checks/record-count.mjs +27 -0
  9. package/assets/checks/task-flow-script.mjs +33 -7
  10. package/assets/checks/work-result.mjs +92 -11
  11. package/assets/commands/night.md +3 -3
  12. package/assets/defaults/turn-map.md +4 -2
  13. package/assets/docs/GLOSSARY.md +1 -1
  14. package/assets/hooks/ask-judge.md +4 -2
  15. package/assets/hooks/facts.sh +66 -0
  16. package/assets/hooks/git-guard-delivery-epic.sh +2 -2
  17. package/assets/hooks/git-guard-delivery-rerun.sh +17 -5
  18. package/assets/hooks/git-guard-push-ahead.sh +24 -2
  19. package/assets/hooks/git-guard-push-marks.sh +209 -12
  20. package/assets/hooks/git-guard-push-tests.sh +29 -2
  21. package/assets/hooks/pre-push.sh +26 -2
  22. package/assets/hooks/push-ahead-call-guard.sh +447 -0
  23. package/assets/hooks/push-set.sh +31 -8
  24. package/assets/hooks/turn-exit-guard.sh +1 -1
  25. package/assets/hooks/turn-judge.md +16 -6
  26. package/assets/patterns/doc-style-human.md +36 -76
  27. package/assets/pitfalls/doc-style-human.md +112 -0
  28. package/assets/pitfalls/epic-flow.md +92 -0
  29. package/assets/pitfalls/mockups.needs-mockups.md +87 -0
  30. package/assets/pitfalls/observability.needs-app.md +186 -0
  31. package/assets/pitfalls/platform-access.md +94 -0
  32. package/assets/pitfalls/queue-audit.github.md +78 -0
  33. package/assets/pitfalls/task-flow-archive.md +2 -1
  34. package/assets/pitfalls/task-flow-close.2.md +2 -1
  35. package/assets/pitfalls/task-flow-owner.md +29 -0
  36. package/assets/pitfalls/task-flow-resume.md +2 -2
  37. package/assets/pitfalls/task-flow-start.md +1 -1
  38. package/assets/pitfalls/turn-conduct.md +1 -1
  39. package/assets/rules/autonomous-work.md +1 -1
  40. package/assets/rules/epic-flow.md +24 -63
  41. package/assets/rules/mockups.needs-mockups.md +25 -64
  42. package/assets/rules/observability.needs-app.md +43 -172
  43. package/assets/rules/platform-access.md +28 -75
  44. package/assets/rules/queue-audit.github.md +25 -52
  45. package/assets/rules/task-flow-owner.md +6 -6
  46. package/assets/rules/turn-conduct.md +22 -19
  47. package/assets/task-flow/flow.js +10 -14
  48. package/assets/task-flow/flow.md +7 -8
  49. package/assets/task-flow/measure/ci.mjs +184 -0
  50. package/assets/task-flow/measure/owner.mjs +13 -6
  51. package/assets/task-flow/measure/session.mjs +92 -15
  52. package/assets/task-flow/source/git.mjs +179 -11
  53. package/assets/task-flow/source/host.mjs +105 -0
  54. package/assets/task-flow/source/owner.mjs +33 -13
  55. package/assets/task-flow/source/session.mjs +47 -10
  56. package/lib/agent-checks.d.ts.map +1 -1
  57. package/lib/agent-checks.js +14 -2
  58. package/lib/agent-checks.js.map +1 -1
  59. package/package.json +1 -1
@@ -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.
@@ -237,7 +237,8 @@ indistinguishable from a sent one.
237
237
  - **No plan on disk after the taking-apart, and the folder is not assembled again.** An edit after
238
238
  review remarks and a fix of a red run pass the progress guard on the sign from the branch history.
239
239
  A folder removed by its commit is the sign of handed-in work. A folder assembled anew would bring
240
- back the delivery guard's refusal on the very next call.
240
+ back the delivery guard's refusal on the very next call. The one exception is the `git revert` the
241
+ engine names for a step whose fix lies in the folder; the last commit then takes the folder apart again.
241
242
  - **If the folder is simply deleted, `grill.md` is the first to go.** Deleting is easier than taking
242
243
  apart, and the owner's words are written only there, with nowhere to recover them from. So the
243
244
  guard demands that the branch add a record to the archive. What exactly was moved it does not
@@ -98,7 +98,8 @@ task is taken by the same move. They return to the PR by the turn that reads the
98
98
 
99
99
  The review returned remarks, or the run went red — it is fixed in the same branch. The plan is no
100
100
  longer there, and the folder is not assembled again: the progress guard lets the edit through on the
101
- sign from the branch history. What exactly is fixed is taken from the remark, not from the plan.
101
+ sign from the branch history. What exactly is fixed is taken from the remark, not from the plan. The
102
+ one exception is the `git revert` the engine names for a step whose fix lies in the folder.
102
103
 
103
104
  A merge left in the working copy is either pushed in the same turn or not made — otherwise the owner
104
105
  sees the old state and decides by it.
@@ -27,3 +27,32 @@ Said for all four parts at once, in the cold part of `task-flow`, `pitfalls-2.md
27
27
  ## Patterns
28
28
 
29
29
  - `task-flow-cycle`.
30
+
31
+ ## The hot part before its second cut
32
+
33
+ What the rule `task-flow-owner` handed over when cut to its statements a second time, word for
34
+ word: its opening line and every article with its boundary and exception.
35
+
36
+ Rule under the law `docs/constitution/work-conduct.md`. Cold part: `pitfalls.md`; every article whole — `pitfalls-2.md` of `task-flow`.
37
+
38
+ - **What needs the owner's word is taken from a list, not appraised on the spot.**
39
+ - **A stop the owner sets on a later step is written down the moment it is said.**
40
+ - **A reply to the owner's order begins with the result, not with intent or its justification.**
41
+ - **The last run of the main branch is read first thing in a session and after every known merge.**
42
+ - **A session does not start work by itself.** An empty message, one word or one path order no work.
43
+ - **A refusal by an external limiter removes the way, not the task.** The way is taken from the guard that already described this fix.
44
+ - **A question written by a past session does not become a question to the owner.** It goes to the handover's author; some are closed by a work step.
45
+ - **The owner's instruction holds until they cancel it, and a new fact against it is a line in the reply about the cost, not a new question.**
46
+ - **An answer in the owner's message counts the same as an answer in a document.**
47
+ - **The owner's word about the design is a task setting, not a decision.** It is checked against the tree before the edit; diverged — the owner is asked.
48
+ - **A tool the owner named is used, and a substitute is named in the same reply.** With the reason.
49
+ - **A rule of the tree outweighs a standing instruction of the host.**
50
+ - **An instruction to work by a rule or by the progress is an instruction to do all its steps, including those that change history.**
51
+ - **A word for a new notion is looked up in the tree's glossary.**
52
+ - **Work ordered in words becomes a task in the queue in the same turn.** Postponed work names a date.
53
+ - **An improvement of a rule names the metric it should move, and the next report judges it.**
54
+ - **Work is judged by the role `goal-critic` against the owner's words.**
55
+ - **A mission is set by the owner.** A session only proposes a wording and waits for approval.
56
+ - **Building by a sample begins with reading the sample itself, whole, by walking the directories.**
57
+ - **Exploration of a tree that holds a code graph begins with the graph.**
58
+ - **The path to a sample lies outside the history, the permission to work outside the epic — in the main branch.**
@@ -131,8 +131,8 @@ host by the branch. A PR reopened for remarks after the folder left keeps its st
131
131
  - **PR:** не открыт · осталось: разбор папки, сверка очереди
132
132
  ```
133
133
 
134
- The progress carries no line about a stop. The exit guard reads the owner's stop word from their
135
- last message in the record of the session, and a stop written on disk would only retell it. A task
134
+ The progress carries no line about a stop. The exit guard reads the owner's Esc from their last
135
+ entry in the record of the session, and a stop written on disk would only retell it. A task
136
136
  the owner put off gets the mark «отложено» in the epic plan, set by their word naming it, and the
137
137
  work goes on with the next task.
138
138
 
@@ -266,7 +266,7 @@ state line is rewritten to `этап-идёт`, and from there the work is led b
266
266
  The turn does not end on this boundary. A written plan looks like a finished piece — the file is
267
267
  committed, there is something to report — and the report takes the place of the work: a session
268
268
  ended with "next step — such-and-such" at a window fill of about two percent. A turn ends with the
269
- scenario or with the owner's stop word; a pattern read to the end is neither.
269
+ scenario or with the owner's Esc; a pattern read to the end is neither.
270
270
 
271
271
  **Next move:** the first stage is done in the same turn. `task-flow-script.mjs step` runs the check
272
272
  of each of its steps and marks the step done itself; a hand mark is refused.
@@ -128,7 +128,7 @@ The rule is `turn-conduct`; the articles that hold the law stand there.
128
128
  roles sent to the background and the line "the roles are working"; the owner read it as a stop.
129
129
  The guard counted the launch as work — there were edits in the turn, and the last action was not
130
130
  a wait. Now the last call is not read at all. A turn is released on a wait only by the record: a
131
- background task of the session with a start and no end, younger than twenty minutes, and once
131
+ background task of the session with a start and no end, younger than ninety minutes, and once
132
132
  per task. A turn that only says it waits is held.
133
133
 
134
134
  - **"A promise to do the work in the next turn": an offer to object is part of it.** An offer to the
@@ -102,7 +102,7 @@ flowchart TD
102
102
  Nothing checks the session's time boundary: the command writes it into the head of the list, and
103
103
  the session ends at it or by the owner's word; a queue emptied earlier ends it with the list. A
104
104
  turn-exit guard does not know the boundary either: it releases a working turn at the end of the
105
- scenario or on the owner's stop word, and the command says so. The
105
+ scenario or on the owner's Esc, and the command says so. The
106
106
  ban on what is visible from outside, the chain's base, a written default and a readiness command
107
107
  named before the stage are held the same way — by the rule, not by a guard: the push command is no
108
108
  different from the one made by day.
@@ -2,16 +2,14 @@
2
2
  name: epic-flow
3
3
  kind: rule
4
4
  law: work-conduct
5
- description: Rule under the work-conduct law — the epic as the unit of delivery. Load when an epic is declared, its branch is taken, its next task is chosen and its request into the main branch opens. Pattern epic-flow-declare. One task — task-flow.
5
+ description: Rule under work-conduct — the epic as the unit of delivery. Load when an epic is declared, its branch taken, its next task chosen and its PR into the main branch opened. Pattern epic-flow-declare; one task — task-flow.
6
6
  ---
7
7
 
8
8
  # Epics — how it works here
9
9
 
10
- Rule under the law `docs/constitution/work-conduct.md`. The law says that a series of tasks is
11
- declared an epic before the first of them and keeps the order assigned at planning; the law
12
- `docs/constitution/delivery.md` adds that the main branch takes the epic whole. Here — how a series
13
- of tasks is held together as one epic. The course of
14
- one task is rule `task-flow`, the end of a turn is `turn-conduct`, both under the same law.
10
+ Rule under the law `docs/constitution/work-conduct.md`; the main branch takes the epic whole by
11
+ `docs/constitution/delivery.md`. Cold part: `pitfalls.md`; paths: `implementation.md`;
12
+ end of a turn — `turn-conduct`.
15
13
 
16
14
  **Requires:** `hooks/tree-assignment-guard.sh`, `checks/tree-assignment.mjs`
17
15
 
@@ -24,70 +22,33 @@ one task is rule `task-flow`, the end of a turn is `turn-conduct`, both under th
24
22
  | the epic plan | a record outside the task folder: the folder dies with the merge, the epic outlives it; the directory — in the rule's companion |
25
23
  | who leads which epic | the table of assignments: a row for each working copy, written by the owner |
26
24
 
27
- ## Where it lives
28
-
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 first
31
- tree that keeps its code differently.
32
-
33
- ## Flow
34
-
35
- The course of an epic from the series of tasks the grill gave to the request into the main branch.
36
-
37
- ```mermaid
38
- flowchart TD
39
- A[The grill gave a series of tasks] --> B[The epic is declared: a card, a plan and all its tasks at once]
40
- B --> C[The epic branch is taken from the main branch before the first task]
41
- C --> D[The first task is taken, and the epic card moves to in progress]
42
- D --> E{Tasks of the epic are left}
43
- E -->|Yes| F[The next task is taken from the epic plan]
44
- F --> E
45
- E -->|No| G[Every folder is taken apart, then the request of the epic into the main branch opens]
46
- ```
47
-
48
25
  ## How the law applies here
49
26
 
50
- - **Work begins with the epic, and a task outside one is not taken.** The main branch takes the
51
- whole or does not take it. Work outside an epic exists only by
52
- the owner's word about that work, said about that work.
53
- - **The epic branch is taken before the first task of the epic, not with it.** Taken later, it
54
- leaves the first task on the main branch.
55
- - **The epic card moves to in progress by the same turn that takes its first task.** The owner
56
- follows the epic by one card: left in place, it reads as never started.
27
+ - **Work begins with the epic, and a task outside one is not taken.** Except by the owner's word
28
+ on that work.
29
+ - **The epic branch is taken before the first task of the epic, not with it.**
30
+ - **The epic card moves to in progress by the same turn that takes its first task.**
57
31
  - **The next task is taken from the epic plan, and the queue list is asked only where there is no
58
- epic.** A list of numbers does not tell someone else's epic from one's own.
32
+ epic.**
59
33
  - **Which epic this working copy leads is read from the table of assignments, and the owner writes
60
- it.** A card of the queue is not an order; a guard refuses every call that takes work until
61
- their word.
62
- - **An epic is not closed by a sign confirmed by reading alone.** What is checkable by eye is
63
- called checked only with a command and its output.
64
- - **The tasks of an epic are created all at once, by the same turn as the epic itself.** Creating
65
- them one at a time hides the volume.
66
- - **A task of an epic is linked to the epic card as a sub-issue, not only named in the plan.** The
67
- board reads no text: without the link it looks like a task outside one. Closed tasks are linked.
68
- - **The epic plan names how the branches of its tasks stand, on a par with their order.** Two
69
- arrangements: each branch from the epic branch, or a stack — each from the previous. The written
70
- arrangement binds whoever creates the branch.
71
- - **The PR of the epic opens when its last folder is taken apart, and not a task earlier.** A folder
72
- left in the epic branch reaches the main branch with it. Until then nobody is offered the epic
73
- branch: its button means the whole epic.
74
- - **The epic plan lies where it is found without the network and after the merge.** The card holds
75
- no task order, and the folder dies with the merge. What the owner names along the way is appended
76
- there by the turn that took it.
34
+ it.** A queue card is no order; a guard refuses work until then.
35
+ - **An epic is not closed by a sign confirmed by reading alone.** Checked: a command and its
36
+ output.
37
+ - **The tasks of an epic are created all at once, by the same turn as the epic itself.**
38
+ - **A task of an epic is linked to the epic card as a sub-issue, not only named in the plan.**
39
+ Closed tasks too.
40
+ - **The epic plan names how the branches of its tasks stand, on a par with their order.** Each from
41
+ the epic branch, or a stack, each from the previous; the written one binds whoever branches.
42
+ - **The PR of the epic opens when its last folder is taken apart, and not a task earlier.** Until
43
+ then nobody is offered its branch.
44
+ - **The epic plan lies where it is found without the network and after the merge.** The owner's
45
+ later words go there that turn.
77
46
 
78
47
  ## What of the law is not here
79
48
 
80
- Nothing compares the makeup of the tasks in the plan with the cards in the queue: the audit reads
81
- the pair "card and plan", not the list. The order of the tasks and the arrangement of the branches
82
- are prose of the plan, and no check reads them; they are held by whoever creates the next branch.
83
-
84
- Nothing tells a sign of the end of an epic checked by a command from one confirmed by reading: both
85
- leave the same line in the plan.
86
-
87
- The rules gate demands this rule only where an epic is declared or a task of it is created. Taking
88
- the epic branch, choosing the next task and opening the request of the epic do not demand it: the
89
- rule is loaded there by its description.
49
+ The audit reads card and plan as a pair, not the makeup, order, branch arrangement or how an end
50
+ sign was checked. The gate demands it only for a new epic or its task; else load it yourself.
90
51
 
91
52
  ## Patterns
92
53
 
93
- - `epic-flow-declare` — declaring an epic with its card, plan and tasks, then taking its branch.
54
+ - `epic-flow-declare` — declaring an epic and its branch.
@@ -7,82 +7,43 @@ description: Rule under the mockups law. Load when a screen is drawn or changed
7
7
 
8
8
  # Mockups — how it works here
9
9
 
10
- Rule under the law `docs/constitution/mockups.md`. The law says what the owner must see before
11
- the code is written; here — what it is called in this tree, where it lives and what is not checked.
10
+ Rule under the law `docs/constitution/mockups.md`. Cold part: `pitfalls.md`. Where it lives: the
11
+ table in `implementation.md` next to it.
12
12
 
13
13
  ## What it is called here
14
14
 
15
- | In the law | Here |
16
- | ----------------------------------- | ---------------------------------------------------------------------------- |
17
- | mockup | a frame on a sheet of the design tool |
18
- | the screen the mockup draws | the page or panel in the application that carries the same name |
19
- | a sheet of the design file | a file page, never a page of the application |
20
- | the description of the behaviour | the domain spec in `docs/specs/<domain>/` |
21
- | the agreement | the product agreement of the task, `docs/specs/<domain>/proposed/<feature>/` |
22
- | approved | shown to the owner and accepted in their words |
23
-
24
- ## Where it lives
25
-
26
- In this tree — the table in `implementation.md` next to it. Paths live there, not here: the rule
27
- travels between repositories, the layout does not, and a path named in the rule lies in the
28
- first tree that keeps its code differently.
29
-
30
- ## Flow
31
-
32
- The flow of a mockup from the first frame to the code: what is read before drawing, what is
33
- measured before showing, and what is checked before work starts by the agreement.
34
-
35
- ```mermaid
36
- flowchart TD
37
- A[A screen is to be drawn or changed] --> B{The behaviour already exists in the tree}
38
- B -->|Yes| C[The spec of its domain is read before the first frame]
39
- B -->|No| D[A sample is asked per screen]
40
- C --> E{A component of the kit goes on the sheet}
41
- D --> E
42
- E -->|Yes| F[It is measured in the running showcase and compared with the copy by numbers]
43
- E -->|No| G[The frames are drawn]
44
- F --> G
45
- G --> H[The coordinates of the frames are measured]
46
- H --> I[The owner approves the mockups]
47
- I --> J{The agreement has visual rules}
48
- J -->|Yes| K[Each rule is found on the mockup of every width; a rule the mockups do not show goes to the owner]
49
- J -->|No| L[The code is written]
50
- K --> L
51
- ```
15
+ | In the law | Here |
16
+ | --- | --- |
17
+ | mockup | a frame on a sheet of the design tool |
18
+ | the screen the mockup draws | the page or panel in the application that carries the same name |
19
+ | a sheet of the design file | a file page, never a page of the application |
20
+ | the description of the behaviour | the domain spec in `docs/specs/<domain>/` |
21
+ | the agreement | the product agreement of the task, `docs/specs/<domain>/proposed/<feature>/` |
22
+ | approved | shown to the owner and accepted in their words |
52
23
 
53
24
  ## How the law applies here
54
25
 
55
26
  - **A kit component on a design-tool sheet is a copy of the kit, and the copy drifts.** The source
56
- of look is the kit's styles in code. Before a component from the sheet goes into a mockup, it is
57
- measured in the running showcase, and its sizes, alignment and controls are compared with the
58
- bounds of the copy's nodes by numbers. Reading the styles does not show what the layout computes:
59
- the height of a row, where unselected items sit, a control that replaces an icon. A divergence is
60
- a question to the owner, and the answer is fixed once in the copy.
61
- - **A mockup of behaviour the tree already has starts with reading the spec of its domain.** A
62
- screen in a design tool looks like work without code, so exploration stops at the sheet of earlier
63
- mockups. How a payment is taken, what a window asks and which fields a form holds are already
64
- described by the spec and carried out by code. The spec is read before the first frame, and the
65
- sample question is asked per screen: one sheet named as the sample of the whole set leaves the
66
- other screens without one.
67
- - **The agreement is checked against the approved mockups before work by it.** Every visual rule of
68
- the agreement is found on the mockup of each width. A rule the mockups do not show goes to the
69
- owner as a question. Found after the code, it costs a code edit and an agreement edit together.
70
- - **A mockup is measured by node coordinates before it is shown.** The technique is the pattern
71
- `mockups-measure`.
27
+ of look is the kit's styles in code. Before the component goes into a mockup, it is measured in
28
+ the running showcase, and its sizes, alignment and controls are compared with the bounds of the
29
+ copy's nodes by numbers; a divergence is a question to the owner, fixed once in the copy.
30
+ - **A mockup of behaviour the tree already has starts with reading the spec of its domain.** The
31
+ spec is read before the first frame. With a spec or without one, the sample is asked per screen,
32
+ not once for the whole set.
33
+ - **The agreement is checked against the approved mockups before work by it.** Every visual rule is
34
+ found on the mockup of each width; a rule the mockups do not show goes to the owner as a question.
35
+ - **A mockup is measured by node coordinates before it is shown.** Pattern `mockups-measure`.
72
36
  - **An audit of a design file is accepted only when every file page that draws a kit component is
73
- captured, measured and compared with the code of that component.** Names, properties and the list
74
- of variants say what a node is called, not what it draws: an arc drawn as a sector and a rounded
75
- field drawn as a capsule keep correct names. The technique and the report are the pattern
76
- `mockups-measure`.
37
+ captured, measured and compared with the code of that component.** Names, properties and variants
38
+ do not show what a node draws. Pattern `mockups-measure`.
77
39
  - **A design-tool call asks the rules gate for this rule,** like the browser driver does for its
78
- own: without that the measurement pattern stays unread for the whole mockup task.
40
+ own: otherwise the measurement pattern stays unread.
79
41
 
80
42
  ## What of the law is not here
81
43
 
82
- Nothing checks that a mockup matches the screen it draws or that the owner approved it: both live
83
- outside the tree, in the design tool and in the owner's words. The checks above are held by reading.
44
+ Nothing checks that a mockup matches its screen or that the owner approved it: both live outside
45
+ the tree. The checks above are held by reading.
84
46
 
85
47
  ## Patterns
86
48
 
87
- - `mockups-measure` — reading the bounds of frames and buttons in one call and what the numbers
88
- mean.
49
+ - `mockups-measure` — the bounds of frames and buttons in one call and what the numbers mean.