@rt-tools/agent-kit 0.33.1 → 0.34.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 (63) hide show
  1. package/README.md +8 -7
  2. package/assets/agents/goal-critic.md +67 -0
  3. package/assets/agents/product-strategist.md +90 -0
  4. package/assets/agents/qa-engineer.md +3 -0
  5. package/assets/checks/check-specs.mjs +11 -2
  6. package/assets/checks/rt-kit-checks.config.mjs +6 -0
  7. package/assets/checks/spec-common.mjs +6 -3
  8. package/assets/checks/spec-scenarios.mjs +9 -1
  9. package/assets/checks/task-new.github.mjs +6 -0
  10. package/assets/defaults/project.sh +10 -81
  11. package/assets/defaults/push.sh +100 -0
  12. package/assets/docs/GLOSSARY.md +4 -0
  13. package/assets/hooks/browser-guard-no-other-drivers.sh +6 -3
  14. package/assets/hooks/claim-guard.sh +6 -6
  15. package/assets/hooks/dispatch.sh +56 -3
  16. package/assets/hooks/exam-guard.sh +1 -1
  17. package/assets/hooks/git-guard-delivery-body.sh +25 -3
  18. package/assets/hooks/git-guard-delivery-folder.sh +17 -1
  19. package/assets/hooks/git-guard-delivery-pipeline.sh +99 -0
  20. package/assets/hooks/git-guard-delivery.sh +17 -10
  21. package/assets/hooks/git-guard-main.sh +17 -4
  22. package/assets/hooks/git-guard-push-ahead.sh +89 -0
  23. package/assets/hooks/git-guard-push-marks.sh +99 -0
  24. package/assets/hooks/git-guard-push-tests.sh +101 -83
  25. package/assets/hooks/pre-push.sh +113 -0
  26. package/assets/hooks/push-set.sh +150 -0
  27. package/assets/hooks/push-sign.sh +433 -0
  28. package/assets/hooks/rerun-guard.sh +14 -6
  29. package/assets/hooks/turn-exit-guard.sh +2 -2
  30. package/assets/hooks/turn-exit-patterns.sh +4 -3
  31. package/assets/hooks/turn-exit-verdict.sh +18 -1
  32. package/assets/hooks/waiting-turn-guard.sh +2 -1
  33. package/assets/hooks/write-targets.sh +21 -0
  34. package/assets/patterns/git-workflow-commit.github.md +11 -0
  35. package/assets/patterns/git-workflow-pr-body.github.md +20 -3
  36. package/assets/patterns/git-workflow-pr.azure.md +30 -0
  37. package/assets/patterns/git-workflow-pr.github.md +57 -1
  38. package/assets/patterns/git-workflow-pr.gitlab.md +33 -0
  39. package/assets/patterns/mockups-measure.needs-mockups.md +19 -3
  40. package/assets/patterns/task-flow-close.md +27 -16
  41. package/assets/patterns/task-flow-start.md +3 -3
  42. package/assets/rules/browser-verification.md +4 -0
  43. package/assets/rules/deploy-flow.azure.md +5 -0
  44. package/assets/rules/deploy-flow.github.md +5 -0
  45. package/assets/rules/deploy-flow.gitlab.md +5 -0
  46. package/assets/rules/git-workflow.azure.md +15 -0
  47. package/assets/rules/git-workflow.github.md +15 -0
  48. package/assets/rules/git-workflow.gitlab.md +15 -0
  49. package/assets/rules/mockups.needs-mockups.md +13 -5
  50. package/assets/rules/task-flow.md +21 -16
  51. package/assets/samples/tasks/_template/plan.md +7 -0
  52. package/assets/skills/interface-review-annotate.needs-mockups.md +142 -0
  53. package/assets/skills/interface-review-icons.needs-app.md +136 -0
  54. package/assets/skills/interface-review-motion-states.needs-app.md +230 -0
  55. package/assets/skills/interface-review-motion.needs-app.md +209 -0
  56. package/assets/skills/interface-review-performance.needs-app.md +110 -0
  57. package/assets/skills/interface-review-principles.needs-app.md +263 -0
  58. package/assets/skills/interface-review-surfaces.needs-app.md +249 -0
  59. package/assets/skills/interface-review.needs-app.md +199 -0
  60. package/assets/skills/write-a-skill.md +16 -3
  61. package/assets/workflows/feature.js +33 -5
  62. package/assets/workflows/plan.js +71 -4
  63. package/package.json +1 -1
@@ -98,9 +98,14 @@ things about the tree, and the tree has changed since.
98
98
 
99
99
  ## PR body sample
100
100
 
101
- Four sections, and one order between them: the link line, what was done, what confirms it, the
102
- remaining step. A section with nothing to say says so in words — an empty heading and a removed
103
- heading read alike and mean different things.
101
+ Six sections, and one order between them: the link line, what was done, the points, the goal, what
102
+ confirms it, the remaining step. A section with nothing to say says so in words — an empty heading
103
+ and a removed heading read alike and mean different things.
104
+
105
+ The table of points comes from the reply of the role `product-strategist`: a sign not run is
106
+ written as not run, and its point as not reached. The table of the goal comes from the reply of the
107
+ role `goal-critic`. Both go in word for word, and the critic reads the finished body against the
108
+ replies.
104
109
 
105
110
  ```markdown
106
111
  Closes #86
@@ -109,6 +114,18 @@ Closes #86
109
114
 
110
115
  - <правка, названная тем, что она меняет для читателя, а не тем, какие файлы задела>
111
116
 
117
+ ## Точки
118
+
119
+ | Точка | Признак | Результат |
120
+ | --- | --- | --- |
121
+ | <изменение, которое увидит человек> | <команда, страница или число> | <вывод признака: достигнута или промах> |
122
+
123
+ ## Цель
124
+
125
+ | Слова владельца | Что показывает результат | Итог |
126
+ | --- | --- | --- |
127
+ | <дословная цитата> | <что видно в результате> | <выполнено или нет> |
128
+
112
129
  ## Чем подтверждено
113
130
 
114
131
  - <проверка>: <её вывод одной строкой>
@@ -160,6 +160,36 @@ An open PR means the work item awaits review — the state is moved in the same
160
160
  npm run task:move -- 86 in-review
161
161
  ```
162
162
 
163
+ ## Answering under remarks
164
+
165
+ Remarks on a PR live in threads, and the client has no command for them, so they go through the
166
+ REST call of the same client. They are read at once, before the first edit:
167
+
168
+ ```bash
169
+ az devops invoke --area git --resource pullRequestThreads \
170
+ --route-parameters project=<проект> repositoryId=<репозиторий> pullRequestId=<номер> \
171
+ --api-version 7.1 --query "value[?comments[0].commentType=='text'].{id:id, text:comments[0].content}"
172
+ ```
173
+
174
+ The person is asked by the asking tool whether to answer under them, in the turn the remarks were
175
+ read. The answer holds for this PR. Silence is not a yes: a message on the host stays there, and
176
+ it goes out under an account the person answers for.
177
+
178
+ After a yes every thread gets its own answer, once the edit has reached the host: a commit named
179
+ before the push does not exist for the reader yet.
180
+
181
+ ```bash
182
+ az devops invoke --area git --resource pullRequestThreadComments --http-method POST \
183
+ --route-parameters project=<проект> repositoryId=<репозиторий> pullRequestId=<номер> threadId=<id> \
184
+ --in-file ответ.json --api-version 7.1
185
+ ```
186
+
187
+ The file holds `{"content": "<текст>", "commentType": 1}`.
188
+
189
+ An answer is written in the owner's language and names one of two things: the commit that closes
190
+ the remark, or why the remark is declined. The count of answers is compared with the count of
191
+ threads read at the start: a remark left without one is a remark the person checks again by hand.
192
+
163
193
  ## What is checked before the PR is published
164
194
 
165
195
  The pipeline sees only what was sent, and it is sent by a push. Linters, unit tests and hook
@@ -139,6 +139,25 @@ no longer on the server: the push will not update it but create it anew, and the
139
139
  stays outside the main branch. The push answer says this with a new-branch mark instead of a list
140
140
  of commits — otherwise it looks exactly like a successful push.
141
141
 
142
+ **After a push that carries a merge of the base, the PR's count is matched against the comparison
143
+ of the branches.** The host counts the commits and files of a PR from the base commit it stored
144
+ when the PR opened or was last retargeted, and a push does not always move it. The base merged into
145
+ the branch then shows inside the PR as its own work: a PR with 30 commits of its own read as 153
146
+ with 371 files, while the comparison of the same branches answered 30 at the same minute. The count
147
+ is asked from both sides:
148
+
149
+ ```bash
150
+ $GH api "repos/$REPO/pulls/321" --jq '{base: .base.sha[0:9], commits: .commits, files: .changed_files}'
151
+ $GH api "repos/$REPO/compare/<база>...<ветка>" --jq '{ahead: .ahead_by, behind: .behind_by}'
152
+ ```
153
+
154
+ `commits` other than `ahead` is cured by setting the same base again — the host recounts the PR in
155
+ the same answer:
156
+
157
+ ```bash
158
+ $GH api -X PATCH "repos/$REPO/pulls/321" -f base=<база> --jq '{base: .base.sha[0:9], commits: .commits}'
159
+ ```
160
+
142
161
  **The run's outcome is read by a separate call, not by the wait's return code.** The client
143
162
  command that waits for the run's end returns zero on red too: it waited for the end, not for
144
163
  success. Read as an outcome, this zero makes green what fell, and what was said to the owner
@@ -155,6 +174,42 @@ This is not written as bare GraphQL by project, item and field option ids: the c
155
174
  them itself, and a query assembled from memory silently sets the wrong column — the board has no
156
175
  refusal for that.
157
176
 
177
+ ## Answering under remarks
178
+
179
+ Remarks arrive on a PR in three places: a comment on a line, the text of a review and a comment in
180
+ the conversation. All three are read at once, before the first edit:
181
+
182
+ ```bash
183
+ gh api repos/<владелец>/<репозиторий>/pulls/<номер>/comments --paginate \
184
+ --jq '.[] | {id, user: .user.login, path, body}'
185
+ gh api repos/<владелец>/<репозиторий>/pulls/<номер>/reviews --paginate \
186
+ --jq '.[] | select(.body != "") | {id, user: .user.login, body}'
187
+ gh api repos/<владелец>/<репозиторий>/issues/<номер>/comments --paginate \
188
+ --jq '.[] | {id, user: .user.login, body}'
189
+ ```
190
+
191
+ The person is asked by the asking tool whether to answer under them, in the turn the remarks were
192
+ read. The answer holds for this PR. Silence is not a yes: a message on the host stays there, and
193
+ it goes out under an account the person answers for.
194
+
195
+ After a yes every remark gets its own answer, once the edit has reached the host: a commit named
196
+ before the push does not exist for the reader yet.
197
+
198
+ ```bash
199
+ gh api -X POST repos/<владелец>/<репозиторий>/pulls/<номер>/comments/<id>/replies \
200
+ -F body=@ответ.md
201
+ ```
202
+
203
+ The text of a review has no thread of its own, so the answer to it goes into the PR conversation:
204
+
205
+ ```bash
206
+ gh api -X POST repos/<владелец>/<репозиторий>/issues/<номер>/comments -F body=@ответ.md
207
+ ```
208
+
209
+ An answer is written in the owner's language and names one of two things: the commit that closes
210
+ the remark, or why the remark is declined. The count of answers is compared with the count of
211
+ remarks read at the start: a remark left without one is a remark the person checks again by hand.
212
+
158
213
  ## What is checked before the PR is published
159
214
 
160
215
  There are no checks on the PR itself: the rollout starts with a push into the main branch, and
@@ -195,7 +250,8 @@ push gate — below is what it does not know.
195
250
  12. **The work queue matches** — `npm run check:board`. The task is on the board, with an
196
251
  assignee and the number in the title; one PR per task, and it closes the task whole.
197
252
  13. **The PR state is read, not derived from return codes** — author `<бот>`, reviewer — the
198
- owner, labels the same as on the task. The owner is told what was read.
253
+ owner, labels the same as on the task, the commit count equal to `ahead_by` of the branch
254
+ comparison. The owner is told what was read.
199
255
  14. **The set is taken from the pipeline file, not assembled from memory.** The push gate is
200
256
  narrower by design: it stands between the command and the push, and everything longer than
201
257
  seconds is taken out of it. What the pipeline runs is written in its file — that list is
@@ -176,6 +176,39 @@ An open MR means the task awaits review — the list is moved in the same motion
176
176
  npm run task:move -- 86 in-review
177
177
  ```
178
178
 
179
+ ## Answering under remarks
180
+
181
+ Remarks on an MR live in discussions, a thread each: a note on a line and a single note in the
182
+ conversation are both among them. They are read at once, before the first edit:
183
+
184
+ ```bash
185
+ glab api projects/:id/merge_requests/<номер>/discussions --paginate \
186
+ | jq '.[] | {id, notes: [.notes[] | select(.system | not) | {author: .author.username, body}]}'
187
+ ```
188
+
189
+ The person is asked by the asking tool whether to answer under them, in the turn the remarks were
190
+ read. The answer holds for this MR. Silence is not a yes: a message on the host stays there, and
191
+ it goes out under an account the person answers for.
192
+
193
+ After a yes every discussion gets its own answer, once the edit has reached the host: a commit
194
+ named before the push does not exist for the reader yet.
195
+
196
+ ```bash
197
+ glab api -X POST projects/:id/merge_requests/<номер>/discussions/<id>/notes \
198
+ -f "body=$(cat ответ.md)"
199
+ ```
200
+
201
+ A comment outside a discussion has no thread of its own, so the answer to it goes under the MR:
202
+
203
+ ```bash
204
+ glab mr note <номер> --message "$(cat ответ.md)"
205
+ ```
206
+
207
+ An answer is written in the owner's language and names one of two things: the commit that closes
208
+ the remark, or why the remark is declined. The count of answers is compared with the count of
209
+ discussions read at the start: a remark left without one is a remark the person checks again by
210
+ hand.
211
+
179
212
  ## What is checked before the MR is published
180
213
 
181
214
  There are no checks on the MR itself until the pipeline is started, and a push starts it.
@@ -2,7 +2,7 @@
2
2
  name: mockups-measure
3
3
  kind: pattern
4
4
  rule: mockups
5
- description: Pattern of rule mockups. Load before the frames of a mockup are shown to the owner — reading the bounds of the sheet's frames and of the buttons inside them in one call, overlapping pairs and the distinct tops of a row. Not for checking a running page — that is the rule browser-verification.
5
+ description: Pattern of rule mockups. Load before frames are shown to the owner and when a design file is audited — reading the bounds of frames and buttons in one call, overlapping pairs, tops of a row, comparing a file page with the code. Not for a running application — that is the rule browser-verification.
6
6
  ---
7
7
 
8
8
  # Measuring a mockup
@@ -13,16 +13,32 @@ Pattern of the rule `mockups`. What must be true — the law `docs/constitution/
13
13
 
14
14
  - The frames of a sheet are about to be shown to the owner.
15
15
  - A row of cards, a toolbar or a form is drawn at a width other than the desktop one.
16
+ - A design file is audited.
16
17
 
17
18
  ## A mockup is measured by node coordinates
18
19
 
19
- A frame in a design tool makes a layout claim, just like a page. A look at its screenshot misses the
20
- same things: the buttons of a card row are off one line, or frames on the sheet overlap. Before the
20
+ A frame in a design tool makes a layout claim, just like a running screen. A look at its screenshot
21
+ misses the same things: the buttons of a card row are off one line, or frames on the sheet overlap. Before the
21
22
  frames are shown to the owner, one call reads the bounds of the sheet's top-level frames and of the
22
23
  buttons inside them. It prints the overlapping pairs and each row's distinct button tops. Two
23
24
  values in one row are the defect.
24
25
 
26
+ ## An audit compares every file page with the code
27
+
28
+ A file page is a page of the design file, never a page of the application. The audit starts with
29
+ one call that lists the file pages and the kit components each draws; a file page with several
30
+ components counts for each of them. That list opens the report, and a report without it closes
31
+ nothing. Each file page on the list is captured, and the picture is put next to the template and
32
+ styles of its components. The question for every file page is one: does the code draw this. Each
33
+ drawn shape is then read from the node properties — arc data, corner radii, variable modes — and
34
+ compared with the code by numbers. A defect found is searched for across the whole file: it repeats
35
+ on other file pages. The report marks every line of the list as compared or as not captured, and
36
+ with even one of the second kind the audit stays open.
37
+
25
38
  ## Common misses
26
39
 
27
40
  - **At the tablet width the buttons of a card row stood at different heights, and frames on the
28
41
  sheet overlapped.** The owner found both; one call reading node bounds would have shown them.
42
+ - **An audit was called finished by inputs, names and the list of variants.** The spinner arc stood
43
+ on four pictures as a sector and was called normal, because nobody asked whether the code draws
44
+ it so.
@@ -14,9 +14,9 @@ Pattern of the rule `task-flow`. What must be true meanwhile — the law
14
14
 
15
15
  - The stages of the plan are closed.
16
16
  - `npm run check:specs` listed the agreement in its "time to merge" section.
17
- - The spec is measured for length right after the merge: one that has grown is split by the same
18
- commit.
19
- - The domain texts are brought up to what the work did.
17
+ - The spec is measured for length before the merge and right after it: one already over the limit is
18
+ split by a commit of its own first, one that has grown is split by the same commit.
19
+ - The domain texts are up to date, and `product-strategist` reviews the work against its points.
20
20
  - The gate suite is run whole — after the merge and the texts, not before them.
21
21
  - The task folder is taken apart, and the PR opens — a draft or ready, by the base.
22
22
  - The run on the head is green, and the draft is lifted from the PR.
@@ -39,10 +39,17 @@ By one of the last commits of the branch, before the PR opens. By then the code
39
39
  npm run check:specs # the "time to merge" section names the ready directories
40
40
  ```
41
41
 
42
- **The spec is measured for length in the same turn.** Merging is a known move that grows a spec. One
43
- merge took it to 572 lines against a limit of 500, and the executor learned of it from the push
44
- guard's refusal — after the commit. One that has grown is split into subdomains right here, not on
45
- the push.
42
+ **The spec is measured for length before the merge, and again in the same turn after it.** Merging
43
+ is a known move that grows a spec. One merge took it to 572 lines against a limit of 500, and the
44
+ executor learned of it from the push guard's refusal — after the commit. One that has grown is split
45
+ into subdomains right here, not on the push.
46
+
47
+ A spec grows by direct edits too, and a measure taken only after the merge leaves that excess to
48
+ every next merge: one domain spec stood at 885 lines and its scenarios at 1293 before any of nine
49
+ waiting agreements. So the measure goes first: a spec already over the limit is split by a commit
50
+ of its own, and the agreement merges after it. The same holds for a rule or a scenario added to a
51
+ spec directly, with no agreement: the room is measured before the edit, not learned from the push
52
+ set after the work.
46
53
 
47
54
  The order of the move:
48
55
 
@@ -93,14 +100,12 @@ and all the rules need not be read.
93
100
  What is stale lies most often in four places, and all four are read whole:
94
101
 
95
102
  - **"What of the law is not here" in a rule.** The spec audit does not read this section, so an
96
- untruth lives there as long as it likes. For three tasks in a row a rule wrote that the tree
97
- lacked the needed mechanism — and it was there;
103
+ untruth lives there as long as it likes;
98
104
  - **"What is not included" in a domain spec.** A task boundary was written there, and the task is
99
105
  long closed;
100
106
  - **"Where it lives" in a rule.** Files move, the paths in the table stay;
101
- - **A statement of a companion about what the tree does not have.** It is written when the subject
102
- does not exist yet and lives on words about emptiness — no domain specs here, not a scenario
103
- created, six records. One piece of work creates the subject, and nobody rereads the companion.
107
+ - **A statement of a companion about what the tree does not have.** Written before the subject
108
+ exists, it lives on words about emptiness, and nobody rereads it once the subject appears.
104
109
 
105
110
  ```bash
106
111
  # where the rule and the specs speak of what the work touched
@@ -113,13 +118,19 @@ grep -rn -iE "(нет|ни одного|пока|всего|записей) [0-9
113
118
 
114
119
  **A law is not edited in the branch.** An article of a law is an agreement with the owner, and the
115
120
  owner changes it. The work diverged from it — the ready-made text of the article is written: into
116
- the progress and into the PR body. The law file is edited after the answer. The same with
117
- application laws: payments, locales and access are the same agreement, only about this application.
121
+ the progress and into the PR body. The law file is edited after the answer, an application law too.
118
122
 
119
123
  What was done at this step is written into the PR body: what was re-read, what was changed, and if
120
124
  nothing was changed — why. The form of the section — pattern `git-workflow-pr-body`. The body fits
121
- the host's length limit — Azure DevOps takes 4000 characters — so the report is one line per text,
122
- not prose: a body over the limit refuses the opening call, and it gets cut in a hurry.
125
+ the host's length limit — Azure DevOps takes 4000 characters — so the report is one line per text.
126
+
127
+ **The role `product-strategist` reviews the work while the folder still lies here.** It runs the sign
128
+ of each point in the plan and tries to prove the miss. A proved miss is fixed now or named in the PR
129
+ body next to the table of points. Before the PR of an epic the same call judges the milestone.
130
+
131
+ **The role `goal-critic` compares the result with the owner's words in the same state.** It gets the
132
+ words verbatim and the result, without the plan or an account of the work. A session calls it before
133
+ saying the work is done. Its reply is not reworded: a disagreement goes under it as a session line.
123
134
 
124
135
  **Next move:** the updated texts are committed, and in the same turn the task folder is taken apart
125
136
  — by the last commit of the branch, pattern `task-flow-archive`.
@@ -145,9 +145,9 @@ There will be no more questions — from here on, the roles:
145
145
  Workflow(name: "plan", args: "docs/tasks/_draft-<slug>")
146
146
  ```
147
147
 
148
- Need → the product agreement (`spec-writer`) → its adversarial review (`spec-critic`) → the plan and
149
- the breakdown (`project-manager`). Gaps the roles could not close return to the owner — the main
150
- agent carries them.
148
+ Need → the points (`product-strategist`) → the product agreement (`spec-writer`) → its adversarial
149
+ review (`spec-critic`) → the plan and the breakdown (`project-manager`) → `goal-critic`. Gaps the
150
+ roles could not close return to the owner — the main agent carries them, and the route's misses.
151
151
 
152
152
  The agreement that came out of the pipeline is checked against `grill.md` line by line before work
153
153
  by it. The role writes the text without seeing the owner and can turn their answer into its
@@ -128,6 +128,10 @@ flowchart TD
128
128
  shown names the branch it was built from. One such showing cost two turns: the owner repeated a
129
129
  remark whose edit had long been made, and the executor set about explaining a defect already
130
130
  fixed.
131
+ - **An edit of a shared frame is checked on every screen under it.** A frame, a layout or a shell
132
+ edited for one page changes the rest under it, and those pages show in no diff. The list of screens
133
+ is read from what the frame shows, not from the page the task named, and the suite that walks them
134
+ runs before the push. The one page checked reads as the whole edit checked.
131
135
  - **The work branch keeps the tip of main merged in the whole time, not only before delivery.** A
132
136
  branch that has fallen behind builds into a stand with neither others' edits nor one's own
133
137
  neighbouring ones. What is shown on it describes a tree nobody has. The tip is pulled in when its
@@ -88,6 +88,11 @@ flowchart TD
88
88
  - **A PR is checked before the merge by the same pipeline as the main branch.** Checks and image
89
89
  builds go on the PR check pipeline, the rollout does not: it is held by the main-branch
90
90
  condition on its step, and a PR image does not leave for the registry.
91
+ - **A package the tree's own applications install is released from a tip their end-to-end suites
92
+ went green on.** Where the release pipeline runs none of these suites, a PR merged past the
93
+ pipeline reaches them first after the release. When a PR without a green run of its own entered
94
+ the main branch after the last green run of a PR merged into it, those suites must go green on
95
+ the tip of the main branch before the release.
91
96
  - **A divergence of production from the main branch is visible by the work queue audit.** A work
92
97
  item leaves the queue by a merge, but a merge is not yet production: a failed or unstarted rollout
93
98
  touches neither the item nor its state, and there is nowhere to notice it. The audit asks for
@@ -147,6 +147,11 @@ flowchart TD
147
147
  runner pays a whole run for every PR into an epic branch, and pays it for checks the push gate
148
148
  has already run on the same machine; a tree with runners to spare buys the earlier refusal. The
149
149
  answer is written in the pipeline file next to the trigger, together with what is lost by it.
150
+ - **A package the tree's own applications install is released from a tip their end-to-end suites
151
+ went green on.** Where the release pipeline runs none of these suites, a PR merged past the
152
+ pipeline reaches them first after the release. When a PR without a green run of its own entered
153
+ the main branch after the last green run of a PR merged into it, those suites must go green on
154
+ the tip of the main branch before the release.
150
155
  - **A divergence of production from the main branch is visible by the work queue audit.** A task
151
156
  leaves the queue by a merge, but a merge is not yet production: a failed or unstarted rollout
152
157
  touches neither the task nor its column, and there is nowhere to notice it. The audit asks for
@@ -90,6 +90,11 @@ flowchart TD
90
90
  - **A PR is checked before the merge by the same pipeline as the main branch.** Checks and image
91
91
  builds go on the MR pipeline, the rollout does not: it is held by the main-branch
92
92
  rule on its step, and a PR image does not leave for the registry.
93
+ - **A package the tree's own applications install is released from a tip their end-to-end suites
94
+ went green on.** Where the release pipeline runs none of these suites, an MR merged past the
95
+ pipeline reaches them first after the release. When an MR without a green pipeline of its own
96
+ entered the main branch after the last green pipeline of an MR merged into it, those suites must
97
+ go green on the tip of the main branch before the release.
93
98
  - **A divergence of production from the main branch is visible by the work queue audit.** A task
94
99
  leaves the queue by a merge, but a merge is not yet production: a failed or unstarted rollout
95
100
  touches neither the task nor its list, and there is nowhere to notice it. The audit asks for
@@ -113,6 +113,9 @@ flowchart TD
113
113
  - **A push into a branch that has an open PR is followed by rereading its body.** The statement
114
114
  about a green run names the tip by its sha, and moving the tip makes it false in silence: no check
115
115
  reads a PR body.
116
+ - **On remarks to a PR the person is asked whether to answer under them, and after a yes each one
117
+ gets an answer.** Edits alone leave the discussion silent, and the person reads the whole diff
118
+ again. The word holds for that PR, not for the next.
116
119
  - **The draft is lifted by a separate call — `az repos pr update --id <номер> --draft false`.** With
117
120
  it the executor answers for readiness: checks passed, no rework left, the work matches the work
118
121
  item. Lifting the draft and asking to merge are one turn, not two days.
@@ -181,6 +184,18 @@ flowchart TD
181
184
  assembly with: the "set before push" section prints it whole, one command per line, and names
182
185
  beside it what the default printed and the set did not take. A tree writing its override blind
183
186
  added a repeat to it.
187
+ - **A push is sent only by the path the push guard stands on.** A terminal, a process or a script
188
+ started outside the session carries the same command past the gate, unless the tree wired the
189
+ git hook `pre-push`: then git runs the set there too. A send cut off by the session's end is
190
+ asked of the host and repeated by the same path.
191
+ - **A review of a foreign branch starts with the gate set run on its tip.** Reading the diff misses
192
+ what the set judges by the whole tree: a word, a file limit. A check that stands only on an edit,
193
+ such as the wording one, is run over the changed texts apart. The output goes into the review,
194
+ and a later push into that branch is run again.
195
+ - **Where neither the session's push guard nor the git hook fires, the set is run whole, as read
196
+ at the minute of the run.** It is read from the state review or from the tree profile together with the package
197
+ default it calls. A list from memory, from a copy made earlier or from the profile alone drops
198
+ checks: the profile names the set, the task names only the work.
184
199
  - **An exclusion reason naming a task is judged on whether that task is alive.** A deferral with a
185
200
  term and one without look the same until someone asks the number; a dead number in the reason
186
201
  makes the exclusion perpetual without saying a line about it. Asked by the same tier as the task
@@ -131,6 +131,18 @@ flowchart TD
131
131
  person, a task by the work queue, and both read with a token other than the creating one.
132
132
  - **A refusal is read before it is bypassed by a second way.** It can be an early sign of a write
133
133
  limit, and a bypass by another call carries the sign away: the discrepancy surfaces at the owner.
134
+ - **A push is sent only by the path the push guard stands on.** A terminal, a process or a script
135
+ started outside the session carries the same command past the gate, unless the tree wired the
136
+ git hook `pre-push`: then git runs the set there too. A send cut off by the session's end is
137
+ asked of the host and repeated by the same path.
138
+ - **A review of a foreign branch starts with the gate set run on its tip.** Reading the diff misses
139
+ what the set judges by the whole tree: a word, a file limit. A check that stands only on an edit,
140
+ such as the wording one, is run over the changed texts apart. The output goes into the review,
141
+ and a later push into that branch is run again.
142
+ - **Where neither the session's push guard nor the git hook fires, the set is run whole, as read
143
+ at the minute of the run.** It is read from the state review or from the tree profile together with the package
144
+ default it calls. A list from memory, from a copy made earlier or from the profile alone drops
145
+ checks: the profile names the set, the task names only the work.
134
146
  - **The branch number and the PR title number are checked on the spot, the task state — by the
135
147
  board.** The format is read from the command text and works offline; the second tier needs
136
148
  something to ask with.
@@ -219,6 +231,9 @@ flowchart TD
219
231
  - **A push into a branch that has an open PR is followed by rereading its body.** The statement
220
232
  about a green run names the tip by its sha, and moving the tip makes it false in silence: no check
221
233
  reads a PR body.
234
+ - **On remarks to a PR the person is asked whether to answer under them, and after a yes each one
235
+ gets an answer.** Edits alone leave the discussion silent, and the person reads the whole diff
236
+ again. The word holds for that PR, not for the next.
222
237
  - **The draft is not lifted while the PR has no review.** The guard reads the requested reviewer and
223
238
  the review left: a lifted draft reads as "may be merged", and there is nobody to merge.
224
239
  - **The PR merge is pressed by a person, not by the work's executor.** Button and merge call are
@@ -112,6 +112,9 @@ flowchart TD
112
112
  - **A push into a branch that has an open PR is followed by rereading its body.** The statement
113
113
  about a green run names the tip by its sha, and moving the tip makes it false in silence: no check
114
114
  reads a PR body.
115
+ - **On remarks to a PR the person is asked whether to answer under them, and after a yes each one
116
+ gets an answer.** Edits alone leave the discussion silent, and the person reads the whole diff
117
+ again. The word holds for that PR, not for the next.
115
118
  - **The draft is lifted by a separate call — `glab mr update <номер> --ready`.** With it the
116
119
  executor answers for readiness: checks passed, no rework left, the work matches the task. Lifting
117
120
  the draft and asking to merge are one turn, not two days.
@@ -188,6 +191,18 @@ flowchart TD
188
191
  assembly with: the "set before push" section prints it whole, one command per line, and names
189
192
  beside it what the default printed and the set did not take. A tree writing its override blind
190
193
  added a repeat to it.
194
+ - **A push is sent only by the path the push guard stands on.** A terminal, a process or a script
195
+ started outside the session carries the same command past the gate, unless the tree wired the
196
+ git hook `pre-push`: then git runs the set there too. A send cut off by the session's end is
197
+ asked of the host and repeated by the same path.
198
+ - **A review of a foreign branch starts with the gate set run on its tip.** Reading the diff misses
199
+ what the set judges by the whole tree: a word, a file limit. A check that stands only on an edit,
200
+ such as the wording one, is run over the changed texts apart. The output goes into the review,
201
+ and a later push into that branch is run again.
202
+ - **Where neither the session's push guard nor the git hook fires, the set is run whole, as read
203
+ at the minute of the run.** It is read from the state review or from the tree profile together with the package
204
+ default it calls. A list from memory, from a copy made earlier or from the profile alone drops
205
+ checks: the profile names the set, the task names only the work.
191
206
  - **An exclusion reason naming a task is judged on whether that task is alive.** A deferral with a
192
207
  term and one without look the same until someone asks the number; a dead number in the reason
193
208
  makes the exclusion perpetual without saying a line about it. Asked by the same tier as the task
@@ -2,7 +2,7 @@
2
2
  name: mockups
3
3
  kind: rule
4
4
  law: mockups
5
- description: Rule under the mockups law. Load when a screen is drawn or changed in a design tool, before the first frame and before the mockups are shown to the owner. Names the kit copy, the spec read before drawing, the agreement checked against mockups. Pattern mockups-measure.
5
+ description: Rule under the mockups law. Load when a screen is drawn or changed in a design tool, before the mockups are shown to the owner and when a design file is audited. Names the kit copy, the spec read before drawing, the agreement checked against mockups. Pattern mockups-measure.
6
6
  ---
7
7
 
8
8
  # Mockups — how it works here
@@ -16,6 +16,7 @@ the code is written; here — what it is called in this tree, where it lives and
16
16
  | ----------------------------------- | ---------------------------------------------------------------------------- |
17
17
  | mockup | a frame on a sheet of the design tool |
18
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 |
19
20
  | the description of the behaviour | the domain spec in `docs/specs/<domain>/` |
20
21
  | the agreement | the product agreement of the task, `docs/specs/<domain>/proposed/<feature>/` |
21
22
  | approved | shown to the owner and accepted in their words |
@@ -38,7 +39,7 @@ flowchart TD
38
39
  B -->|No| D[A sample is asked per screen]
39
40
  C --> E{A component of the kit goes on the sheet}
40
41
  D --> E
41
- E -->|Yes| F[Its lines and spacing are checked against the kit styles in code]
42
+ E -->|Yes| F[It is measured in the running showcase and compared with the copy by numbers]
42
43
  E -->|No| G[The frames are drawn]
43
44
  F --> G
44
45
  G --> H[The coordinates of the frames are measured]
@@ -52,9 +53,11 @@ flowchart TD
52
53
  ## How the law applies here
53
54
 
54
55
  - **A kit component on a design-tool sheet is a copy of the kit, and the copy drifts.** The source
55
- of look is the kit's styles in code. Before a component from the sheet goes into a mockup, its
56
- visible lines and spacing are checked against the kit's styles. A divergence is a question to the
57
- owner, and the answer is fixed once in the copy.
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.
58
61
  - **A mockup of behaviour the tree already has starts with reading the spec of its domain.** A
59
62
  screen in a design tool looks like work without code, so exploration stops at the sheet of earlier
60
63
  mockups. How a payment is taken, what a window asks and which fields a form holds are already
@@ -66,6 +69,11 @@ flowchart TD
66
69
  owner as a question. Found after the code, it costs a code edit and an agreement edit together.
67
70
  - **A mockup is measured by node coordinates before it is shown.** The technique is the pattern
68
71
  `mockups-measure`.
72
+ - **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`.
69
77
  - **A design-tool call asks the rules gate for this rule,** like the browser driver does for its
70
78
  own: without that the measurement pattern stays unread for the whole mockup task.
71
79
 
@@ -32,7 +32,7 @@ with a guard does.
32
32
  | 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 |
33
33
  | the task folder before the task is created | `docs/tasks/_draft-<slug>/` — outside history while there is no number |
34
34
  | exploration | an `Explore` or `general-purpose` session before the first question to the owner |
35
- | the plan review by roles | `.claude/workflows/plan.js` — need, agreement, critique, plan |
35
+ | the plan review by roles | `.claude/workflows/plan.js` — need, points, agreement, critique, plan, goal |
36
36
 
37
37
  ## Where it lives
38
38
 
@@ -207,7 +207,7 @@ flowchart TD
207
207
  A finding named by no exit condition goes to the section on what the work does not do, and is
208
208
  filed as a task.
209
209
  - **Done work is marked only in the progress.** "Where we stand" is rewritten by every session, not
210
- appended: it is the first thing the next session reads.
210
+ appended.
211
211
  - **The plan names the steps of every stage, and the progress mirrors them with a mark each.** The
212
212
  plan is not edited after it is written, the marks change every turn; a line nobody can call done
213
213
  is not a step.
@@ -227,11 +227,11 @@ flowchart TD
227
227
  whole or does not take it. Work outside an epic exists only by
228
228
  the owner's word about that work, said about that work.
229
229
  - **The epic branch is taken before the first task of the epic, not with it.** Taken later, it
230
- leaves the first task standing on the main branch.
230
+ leaves the first task on the main branch.
231
231
  - **The epic card moves to in progress by the same turn that takes its first task.** The owner
232
- follows the epic by one card: left where it was declared, the card reads as never started.
232
+ follows the epic by one card: left in place, it reads as never started.
233
233
  - **The next task is taken from the epic plan, and the queue list is asked only where there is no
234
- epic.** By a list of numbers someone else's epic cannot be told from one's own.
234
+ epic.** A list of numbers does not tell someone else's epic from one's own.
235
235
  - **Which epic this working copy leads is read from the table of assignments, and the owner writes
236
236
  it.** A card of the queue is not an order; a guard refuses every call that takes work until
237
237
  their word.
@@ -240,18 +240,23 @@ flowchart TD
240
240
  - **The tasks of an epic are created all at once, by the same turn as the epic itself.** Creating
241
241
  them one at a time hides the volume.
242
242
  - **A task of an epic is linked to the epic card as a sub-issue, not only named in the plan.** The
243
- board reads no text: without the link a task of an epic looks exactly like a task outside one.
244
- Closed tasks are linked too — the share of what is done counts them.
245
-
243
+ board reads no text: without the link it looks like a task outside one. Closed tasks are linked.
246
244
  - **The epic plan names how the branches of its tasks stand, on a par with their order.** Two
247
- arrangements: each branch from the epic branch, or a stack — each from the previous. The
248
- arrangement written in the plan is the epic's decision, not that of whoever creates the branch.
245
+ arrangements: each branch from the epic branch, or a stack — each from the previous. The written
246
+ arrangement binds whoever creates the branch.
247
+ - **The plan names the points: the epic its milestone, the task the change a person will see.** The
248
+ role `product-strategist` tries to prove the miss in planning and before the PR. A proved miss is
249
+ fixed or named to the owner; no pipeline stops. Every PR body carries the table of points.
250
+ - **Work is judged by the role `goal-critic` against the owner's words.** A plan is no evidence to
251
+ it, its reply is not edited, and the PR body carries its table.
252
+ - **A mission is set by the owner.** A session only proposes a wording from its analysis and waits
253
+ for approval.
249
254
  - **The PR of the epic opens when its last folder is taken apart, and not a task earlier.** A folder
250
- left in the epic branch reaches the main branch with it. Until then the epic branch is not
251
- offered to a person at all — the merge button on it means the whole epic.
252
- - **The epic plan lies where it is found without the network and after the merge.** The card does
253
- not hold the task order, and the task folder dies with the merge. What the owner names along the
254
- way is appended there by the turn that accepted it.
255
+ left in the epic branch reaches the main branch with it. Until then nobody is offered the epic
256
+ branch: its button means the whole epic.
257
+ - **The epic plan lies where it is found without the network and after the merge.** The card holds
258
+ no task order, and the folder dies with the merge. What the owner names along the way is appended
259
+ there by the turn that took it.
255
260
  - **Building by a sample begins with reading the sample itself, whole, by walking the directories.**
256
261
  - **What acts on the tree, not on the edit, lies outside the index.** The path to the sample and the
257
262
  permission to work outside the epic do not belong to the branch and live next to the handover. A
@@ -289,7 +294,7 @@ The guard judges by the edit paths, not by whether the work changes behaviour. A
289
294
  sign of its own: the appraisal "behaviour does not change" would be assigned by whoever it hinders.
290
295
 
291
296
  Nothing of the grill itself is checked: the guard sees a file edit and knows nothing of the
292
- exploration, the six questions or the answers. An empty table passes the same as a filled one.
297
+ exploration, the six questions or the answers.
293
298
 
294
299
  The conversation guard judges shared words between the question's topic and the owner's last
295
300
  message, not meaning; its refusal names the lawful move.
@@ -13,6 +13,13 @@ stands `**Behaviour:** unchanged — <the owner's reason>`; an empty reason is n
13
13
  After it is written this file is not edited. A stage revision goes to `progress.md` as a decision
14
14
  along the way.
15
15
 
16
+ ## Points
17
+
18
+ - **A:** <where the product stands now>
19
+ - **This task reaches:** <the change a person will see>
20
+ - **Sign:** <the command, the page or the number that shows it, and who sees it>
21
+ - **Milestone G of the epic:** <the point named in the epic plan>
22
+
16
23
  ## Task footprint
17
24
 
18
25
  <What the work touches. Filled in by the exploration before the grill and confirmed by the owner.