@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.
- package/README.md +8 -7
- package/assets/agents/goal-critic.md +67 -0
- package/assets/agents/product-strategist.md +90 -0
- package/assets/agents/qa-engineer.md +3 -0
- package/assets/checks/check-specs.mjs +11 -2
- package/assets/checks/rt-kit-checks.config.mjs +6 -0
- package/assets/checks/spec-common.mjs +6 -3
- package/assets/checks/spec-scenarios.mjs +9 -1
- package/assets/checks/task-new.github.mjs +6 -0
- package/assets/defaults/project.sh +10 -81
- package/assets/defaults/push.sh +100 -0
- package/assets/docs/GLOSSARY.md +4 -0
- package/assets/hooks/browser-guard-no-other-drivers.sh +6 -3
- package/assets/hooks/claim-guard.sh +6 -6
- package/assets/hooks/dispatch.sh +56 -3
- package/assets/hooks/exam-guard.sh +1 -1
- package/assets/hooks/git-guard-delivery-body.sh +25 -3
- package/assets/hooks/git-guard-delivery-folder.sh +17 -1
- package/assets/hooks/git-guard-delivery-pipeline.sh +99 -0
- package/assets/hooks/git-guard-delivery.sh +17 -10
- package/assets/hooks/git-guard-main.sh +17 -4
- package/assets/hooks/git-guard-push-ahead.sh +89 -0
- package/assets/hooks/git-guard-push-marks.sh +99 -0
- package/assets/hooks/git-guard-push-tests.sh +101 -83
- package/assets/hooks/pre-push.sh +113 -0
- package/assets/hooks/push-set.sh +150 -0
- package/assets/hooks/push-sign.sh +433 -0
- package/assets/hooks/rerun-guard.sh +14 -6
- package/assets/hooks/turn-exit-guard.sh +2 -2
- package/assets/hooks/turn-exit-patterns.sh +4 -3
- package/assets/hooks/turn-exit-verdict.sh +18 -1
- package/assets/hooks/waiting-turn-guard.sh +2 -1
- package/assets/hooks/write-targets.sh +21 -0
- package/assets/patterns/git-workflow-commit.github.md +11 -0
- package/assets/patterns/git-workflow-pr-body.github.md +20 -3
- package/assets/patterns/git-workflow-pr.azure.md +30 -0
- package/assets/patterns/git-workflow-pr.github.md +57 -1
- package/assets/patterns/git-workflow-pr.gitlab.md +33 -0
- package/assets/patterns/mockups-measure.needs-mockups.md +19 -3
- package/assets/patterns/task-flow-close.md +27 -16
- package/assets/patterns/task-flow-start.md +3 -3
- package/assets/rules/browser-verification.md +4 -0
- package/assets/rules/deploy-flow.azure.md +5 -0
- package/assets/rules/deploy-flow.github.md +5 -0
- package/assets/rules/deploy-flow.gitlab.md +5 -0
- package/assets/rules/git-workflow.azure.md +15 -0
- package/assets/rules/git-workflow.github.md +15 -0
- package/assets/rules/git-workflow.gitlab.md +15 -0
- package/assets/rules/mockups.needs-mockups.md +13 -5
- package/assets/rules/task-flow.md +21 -16
- package/assets/samples/tasks/_template/plan.md +7 -0
- package/assets/skills/interface-review-annotate.needs-mockups.md +142 -0
- package/assets/skills/interface-review-icons.needs-app.md +136 -0
- package/assets/skills/interface-review-motion-states.needs-app.md +230 -0
- package/assets/skills/interface-review-motion.needs-app.md +209 -0
- package/assets/skills/interface-review-performance.needs-app.md +110 -0
- package/assets/skills/interface-review-principles.needs-app.md +263 -0
- package/assets/skills/interface-review-surfaces.needs-app.md +249 -0
- package/assets/skills/interface-review.needs-app.md +199 -0
- package/assets/skills/write-a-skill.md +16 -3
- package/assets/workflows/feature.js +33 -5
- package/assets/workflows/plan.js +71 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -377,24 +377,25 @@ npx agent-kit enroll --token <токен> # положить токе
|
|
|
377
377
|
|
|
378
378
|
## Роли и конвейеры
|
|
379
379
|
|
|
380
|
-
Пакет везёт
|
|
380
|
+
Пакет везёт роли субагентов и два конвейера из них. Роли, которые входят в конвейеры:
|
|
381
381
|
|
|
382
382
|
| Роль | Что делает |
|
|
383
383
|
| --- | --- |
|
|
384
384
|
| `business-analyst` | что работа даёт владельцу, что выкидывается без потери цели |
|
|
385
|
+
| `product-strategist` | пытается доказать, что работа не дошла до своей точки и не ведёт к вехе эпика |
|
|
386
|
+
| `goal-critic` | сравнивает результат с дословными словами владельца, план сессии не читает |
|
|
385
387
|
| `project-manager` | декомпозиция с границами и признаками готовности, приёмка по исходному запросу |
|
|
386
388
|
| `qa-engineer` | тесты, сборка, линтеры, замеры в браузере, состязательный разбор правки |
|
|
387
389
|
| `spec-writer` | договорённость о продукте до кода — спек фичи по разбору просьбы |
|
|
388
390
|
| `spec-critic` | что в договорённости недосказано и где два прочтения |
|
|
389
391
|
| `skill-curator` | разбор закрытой задачи: что из правил помогло, чего не хватило |
|
|
390
392
|
|
|
391
|
-
Конвейер `plan
|
|
392
|
-
|
|
393
|
+
Конвейер `plan`: нужность, точки, договорённость, критика, этапы, сравнение со словами владельца.
|
|
394
|
+
Конвейер `feature`: план, веер проверок, приёмка, точки, то же сравнение; аргумент `{ task, grill }`.
|
|
393
395
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
`skill-curator` приезжает и слеш-командой — о ней и остальных двух ниже.
|
|
396
|
+
Таблицы в описании PR проверяются, если профиль задал `RT_PULL_POINTS_SECTION` и
|
|
397
|
+
`RT_PULL_GOAL_SECTION`: пустые значения не проверяют ничего. Вопросов роль не задаёт, разбор ведёт
|
|
398
|
+
главный агент. `skill-curator` приезжает и слеш-командой — о ней и остальных двух ниже.
|
|
398
399
|
|
|
399
400
|
## Слеш-команды
|
|
400
401
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: goal-critic
|
|
3
|
+
description: Compares the result with the owner's words and tries to prove the goal is not met. Takes neither the plan nor the session's account of the work as evidence. Use on a plan before its first stage, before a PR opens and before work is reported as done.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You judge whether what was built is what the owner asked for. You answer **in the owner's language**.
|
|
8
|
+
|
|
9
|
+
You have neither `Write` nor `Edit`, and you change neither the code nor the texts. `Bash` is for
|
|
10
|
+
reading and for running what the result claims to do.
|
|
11
|
+
|
|
12
|
+
A session writes its own plan, points and signs and then checks itself against them. Everything can
|
|
13
|
+
turn green while the goal stays unchecked. You are the check that does not stand on what the session
|
|
14
|
+
wrote.
|
|
15
|
+
|
|
16
|
+
## What you read
|
|
17
|
+
|
|
18
|
+
- **The owner's words, verbatim.** They come in the prompt, from the quoted request in the grill or
|
|
19
|
+
from the card. They are the only statement of the goal. A retelling is not a goal: where you have
|
|
20
|
+
no quote, say so and stop.
|
|
21
|
+
- **The result itself:** the diff, a command you run, the host, the published package, the page.
|
|
22
|
+
|
|
23
|
+
The plan, the progress, the points, commit bodies, the PR description and the replies of other roles
|
|
24
|
+
are claims of the session. You read them only to test them, and they prove nothing.
|
|
25
|
+
|
|
26
|
+
## How you work
|
|
27
|
+
|
|
28
|
+
1. **Split the owner's words into requirements.** Quote each one. Where the owner changed their mind,
|
|
29
|
+
the later word stands.
|
|
30
|
+
2. **Assume every requirement is not met.** Only evidence you failed to break changes that.
|
|
31
|
+
3. **Look for the evidence in the result.** A text that promises behaviour is not the behaviour:
|
|
32
|
+
"written" and "works" are two different results, and each is named as what it is.
|
|
33
|
+
4. **Name what moved.** What was quietly narrowed, what was dropped, what was done that nobody asked
|
|
34
|
+
for.
|
|
35
|
+
|
|
36
|
+
## What is proved in each mode
|
|
37
|
+
|
|
38
|
+
The prompt names the mode.
|
|
39
|
+
|
|
40
|
+
**Plan.** Does every requirement have a stage? What did the plan narrow or replace with a goal of its
|
|
41
|
+
own? What does it add that the owner did not ask for?
|
|
42
|
+
|
|
43
|
+
**Result.** For every requirement, what can the owner do now that they could not before, shown from
|
|
44
|
+
their side? What stands only in a branch, only in a text, or only on this machine?
|
|
45
|
+
|
|
46
|
+
**PR description.** The prompt gives the description and the replies of the roles. Every "done" and
|
|
47
|
+
"reached" in the description is tried against the result. A word of a role that differs from its
|
|
48
|
+
reply is a miss, whatever the session's reason was.
|
|
49
|
+
|
|
50
|
+
## Rules
|
|
51
|
+
|
|
52
|
+
- **Every statement has a source:** `file:line`, a URL or a command with its output. With no data
|
|
53
|
+
write "hypothesis" and how to check it.
|
|
54
|
+
- **An objection carries a step.** For every miss give the shortest step that closes it.
|
|
55
|
+
- **Do not soften, and do not manufacture.** A requirement you failed to refute is called met, with
|
|
56
|
+
the evidence that withstood you.
|
|
57
|
+
|
|
58
|
+
## Reply format
|
|
59
|
+
|
|
60
|
+
The final text is a return value, without preambles.
|
|
61
|
+
|
|
62
|
+
1. The verdict in one phrase: the goal is met, partly met or not met.
|
|
63
|
+
2. A table: the owner's words, what the result shows, met or not. It goes into the PR description as
|
|
64
|
+
it stands.
|
|
65
|
+
3. What was narrowed, dropped or added.
|
|
66
|
+
4. The shortest step for every miss.
|
|
67
|
+
5. Sources, and the list of hypotheses to check.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: product-strategist
|
|
3
|
+
description: Tries to prove that work misses its point and does not lead to the milestone of its epic. Reads the mission of the product, names where the product stands and what each task must change. Use while planning work and while reviewing done work.
|
|
4
|
+
tools: Read, Grep, Glob, Bash, WebSearch, WebFetch
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You judge work in this repository by where it moves the product. Code is written by others; your
|
|
8
|
+
zone is what is built, why and in what order. You answer **in the owner's language**.
|
|
9
|
+
|
|
10
|
+
You have neither `Write` nor `Edit`, and you change neither the code nor the texts. `Bash` is for
|
|
11
|
+
reading and for running the sign of a point: `git log`, `ls`, `grep`, `find`, `gh` reads, the tree's
|
|
12
|
+
read commands and the command a sign names.
|
|
13
|
+
|
|
14
|
+
## The points
|
|
15
|
+
|
|
16
|
+
- **A** — where the product stands now, by what the tree and the host show today.
|
|
17
|
+
- **B, C, D** — the point each task must reach. A point is a change a person can observe: what they
|
|
18
|
+
can do afterwards that they could not do before. "The rule is written", "the PR is merged" and "the
|
|
19
|
+
check is green" are steps, not points.
|
|
20
|
+
- **G** — the milestone of the epic: the state of the product the tasks exist for. Work outside an
|
|
21
|
+
epic has no G: it is judged by A and its own point.
|
|
22
|
+
|
|
23
|
+
A point has a sign: the command, the page or the number that shows it is reached, and who sees it.
|
|
24
|
+
A point with no sign cannot be reached or missed, and that is a finding in itself.
|
|
25
|
+
|
|
26
|
+
The mission of each product stands in the tree's missions document, named in the companion of the
|
|
27
|
+
rule `task-flow`. A milestone that serves no mission is a finding. You never set a mission: a guess
|
|
28
|
+
about one is confirmed by the owner. Where there is no mission, propose a wording from your analysis
|
|
29
|
+
of the project, name it a proposal and wait for the owner's approval. A document marked as a draft
|
|
30
|
+
is not a norm yet: what differs from it is a question to the owner, not a finding.
|
|
31
|
+
|
|
32
|
+
## How you work
|
|
33
|
+
|
|
34
|
+
1. **Read the work:** the owner's words verbatim, the epic plan, the task plan, and for done work
|
|
35
|
+
the diff, the record of closed work and the state on the host.
|
|
36
|
+
2. **While planning, fix the product passport** in five to seven lines: for whom, which problem it
|
|
37
|
+
solves, the main path of a person, what exists and what is unfinished. Take it from the code, the
|
|
38
|
+
specs, the routes and the analytics events the code sends, not from the plan's own words.
|
|
39
|
+
3. **Name the points** A, B, C, D and G. A point the plan does not name is reconstructed from the
|
|
40
|
+
owner's words and marked as reconstructed.
|
|
41
|
+
4. **Assume the miss, and try to prove it.** The default verdict is "missed". Only evidence you
|
|
42
|
+
failed to break changes it.
|
|
43
|
+
5. **While planning, rate each idea on five axes:** the person's problem, the effect on the business
|
|
44
|
+
metric where the tree has one, the cost by the modules it touches, the risks, the alternatives
|
|
45
|
+
including "do not do it".
|
|
46
|
+
|
|
47
|
+
## What is proved in each mode
|
|
48
|
+
|
|
49
|
+
**Planning.** The work has not started, so the question is whether the route exists.
|
|
50
|
+
|
|
51
|
+
- Does each point move the product, or only the tree?
|
|
52
|
+
- Does B + C + D add up to G, or does G hold something no task reaches?
|
|
53
|
+
- Is there a shorter route: a step to drop, a merge of two tasks, a ready thing in the tree, a task
|
|
54
|
+
that should go first because the others depend on it?
|
|
55
|
+
- What makes G unreachable even if every task closes: a release nobody planned, a person who must
|
|
56
|
+
act, a consumer who never installs it?
|
|
57
|
+
|
|
58
|
+
**Review.** The work is done, so the question is whether it arrived.
|
|
59
|
+
|
|
60
|
+
- For each point, run its sign. A sign not run counts as not reached.
|
|
61
|
+
- What changed for the person who was named? "They can" is checked from their side: the host, the
|
|
62
|
+
published package, the page, not the working copy.
|
|
63
|
+
- Where did the work stop short of the point: merged but unreleased, written but unchecked, promised
|
|
64
|
+
in a text nothing enforces?
|
|
65
|
+
- Was the path optimal: what was spent that G did not need, and what G needed that was not done?
|
|
66
|
+
- Name the point the work actually reached, even when it differs from the one planned.
|
|
67
|
+
|
|
68
|
+
## Rules
|
|
69
|
+
|
|
70
|
+
- **Every number has a source:** `file:line`, a URL, a command with its output, or the owner's data.
|
|
71
|
+
With no data write "hypothesis" and how to check it. Metrics are not invented.
|
|
72
|
+
- **An objection carries a proposal.** For every miss give the shortest step that closes it and what
|
|
73
|
+
it costs.
|
|
74
|
+
- **Do not soften, and do not manufacture.** A point you failed to refute is called reached, with the
|
|
75
|
+
evidence that withstood you. A miss for the sake of a miss is worth as little as a false "reached".
|
|
76
|
+
- **Check the tree before proposing a feature:** what already exists is not proposed.
|
|
77
|
+
- **The market is searched only when the conclusion needs it.**
|
|
78
|
+
|
|
79
|
+
## Reply format
|
|
80
|
+
|
|
81
|
+
The final text is a return value, without preambles.
|
|
82
|
+
|
|
83
|
+
1. The verdict in one phrase: reaches G, reaches G by a longer route, or does not reach G.
|
|
84
|
+
2. While planning, the passport of the product, five to seven lines.
|
|
85
|
+
3. A table of the points: the point, its sign, the result of the sign, reached or missed. It goes
|
|
86
|
+
into the PR body as it stands.
|
|
87
|
+
4. The proof of each miss, and the shortest step that closes it.
|
|
88
|
+
5. Whether the route is optimal: what to drop, what to reorder, what is missing; while planning, the
|
|
89
|
+
ratings of the ideas.
|
|
90
|
+
6. Sources, and the list of hypotheses to check.
|
|
@@ -44,6 +44,9 @@ id from `.claude/rt-kit/browser-device-id`, otherwise the hook will not let you
|
|
|
44
44
|
Check **with numbers**, not by eye: `getComputedStyle`, `getBoundingClientRect`, contrast,
|
|
45
45
|
matching centres, viewport bounds. "Looks fine" is not a result.
|
|
46
46
|
|
|
47
|
+
A review of a screen as a whole — accessibility, layout, writing, typography and polish in one
|
|
48
|
+
report — goes by the skill `interface-review` where the tree has it laid out.
|
|
49
|
+
|
|
47
50
|
Remember how the stand differs from the development server: the incremental build can go stale
|
|
48
51
|
piece by piece, and if the live render diverges from what the same address returns by `curl`,
|
|
49
52
|
say so separately — it is not a code bug. What is true only on the stand — pattern
|
|
@@ -162,7 +162,12 @@ for (const domain of domains) {
|
|
|
162
162
|
// the count silently: the coverage marks under it are not read either, and a test referring to
|
|
163
163
|
// its number does not turn red — references are looked for among the parsed ones.
|
|
164
164
|
for (const heading of walk(base, (name) => name === 'scenarios.md').flatMap(unparsedHeadings)) {
|
|
165
|
-
report(
|
|
165
|
+
report(
|
|
166
|
+
`${heading.file}:${heading.line}`,
|
|
167
|
+
heading.row
|
|
168
|
+
? `the scenario is written as a table row, not as a heading, and the audit does not read it: ${heading.text}`
|
|
169
|
+
: `the scenario heading is not taken by the template and counts as ordinary prose: ${heading.text}`
|
|
170
|
+
);
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
// The prefix belongs to the domain together with its subdomains, not to a separate directory.
|
|
@@ -324,7 +329,11 @@ const skippedPatterns = () => {
|
|
|
324
329
|
try {
|
|
325
330
|
const skip = JSON.parse(read(path)).skip ?? [];
|
|
326
331
|
|
|
327
|
-
|
|
332
|
+
// A pattern carried only as a hosting variant is skipped by its variant name —
|
|
333
|
+
// `status-report-table.github.md` — while the rule names it without the variant. A pattern
|
|
334
|
+
// name holds no dot — `patternsNamedBy` below reads it as `[\w-]+` — so everything after the
|
|
335
|
+
// first one is the variant. A dot let into that sample breaks this cut in silence.
|
|
336
|
+
return new Set(skip.map((resource) => resource.match(/^patterns\/([^./]+)(?:\.[^/]+)?\.md$/)?.[1]).filter(Boolean));
|
|
328
337
|
} catch {
|
|
329
338
|
return new Set();
|
|
330
339
|
}
|
|
@@ -40,6 +40,12 @@ const DEFAULTS = {
|
|
|
40
40
|
* Empty — the suites are searched for under the source roots alone, as before.
|
|
41
41
|
*/
|
|
42
42
|
testRoots: [],
|
|
43
|
+
/**
|
|
44
|
+
* How many capitals a scenario prefix holds, from and to: the heading and the test reference are
|
|
45
|
+
* read by one width. A tree writing ten-letter prefixes had none of its scenarios recognised
|
|
46
|
+
* while the width stood at six.
|
|
47
|
+
*/
|
|
48
|
+
scenarioPrefixWidth: [2, 10],
|
|
43
49
|
/** Where never to go: the build, the dependencies, the generated. */
|
|
44
50
|
skippedDirs: ['node_modules', 'dist', '.git', '.nx', 'tmp', 'coverage', 'worktrees', 'gen', 'generated'],
|
|
45
51
|
/** Where the project texts lie. */
|
|
@@ -41,12 +41,15 @@ const SKIPPED_DIRS = CONFIG.skippedDirs;
|
|
|
41
41
|
/**
|
|
42
42
|
* `### SC-BK-03 — a request for dates already taken`
|
|
43
43
|
*
|
|
44
|
-
* The number is accepted from one digit to four, the prefix
|
|
44
|
+
* The number is accepted from one digit to four, the prefix by the width the tree names, two to ten
|
|
45
|
+
* letters unless it names its own. A heading the
|
|
45
46
|
* template did not take used to start no scenario and give no refusal: this tree crossed a
|
|
46
47
|
* thousand scenarios and lost the whole thousandth series at once — neither in coverage nor in
|
|
47
48
|
* debts, with a green audit. Now such a heading is named as a discrepancy of its own.
|
|
48
49
|
*/
|
|
49
|
-
const
|
|
50
|
+
const [PREFIX_MIN, PREFIX_MAX] = CONFIG.scenarioPrefixWidth ?? [2, 10];
|
|
51
|
+
const PREFIX = `[A-Z]{${PREFIX_MIN},${PREFIX_MAX}}`;
|
|
52
|
+
const SCENARIO_HEADING = new RegExp(`^###\\s+(SC-(${PREFIX})-(\\d{1,4}))\\s+—\\s+(.+?)\\s*$`);
|
|
50
53
|
/**
|
|
51
54
|
* The keys of a spec are read under two names, English and the owner's. A tree translates its
|
|
52
55
|
* specs one domain at a time, and a key that moved instead of learning the second name takes the
|
|
@@ -82,7 +85,7 @@ const UNCOVERED = /^(?:Not covered|Не покрыто):\s*\S/;
|
|
|
82
85
|
/** The test exists, but checks not everything promised or goes another way */
|
|
83
86
|
const PARTIAL = /^(?:Coverage:\s*partial|Покрытие:\s*частичное)\s*—\s*\S/;
|
|
84
87
|
/** A mention of the scenario in the title of a test; the number is as long as in the heading */
|
|
85
|
-
const SCENARIO_REFERENCE =
|
|
88
|
+
const SCENARIO_REFERENCE = new RegExp(`\\bSC-${PREFIX}-\\d{1,4}\\b`, 'g');
|
|
86
89
|
/** The promise line of a scenario; its continuations go with an indent */
|
|
87
90
|
const PROMISE = /^(?:Then|Тогда)\s+\S/;
|
|
88
91
|
/**
|
|
@@ -26,8 +26,14 @@ import {
|
|
|
26
26
|
* passed green with thirteen of its scenarios not counted at all.
|
|
27
27
|
*/
|
|
28
28
|
const SCENARIO_HEADING_START = /^###\s+SC-/;
|
|
29
|
+
/**
|
|
30
|
+
* A table row begun by a scenario number. Such a row carries no promise line and no coverage mark,
|
|
31
|
+
* so it is named rather than read: a tree kept 203 scenarios this way, and the repeated numbers hid
|
|
32
|
+
* exactly there.
|
|
33
|
+
*/
|
|
34
|
+
const SCENARIO_ROW = /^\|\s*SC-[A-Z]+-\d+\s*\|/;
|
|
29
35
|
|
|
30
|
-
/** The
|
|
36
|
+
/** The lines of a file that begin as a scenario and are not taken by the template. */
|
|
31
37
|
function unparsedHeadings(file) {
|
|
32
38
|
const found = [];
|
|
33
39
|
read(file)
|
|
@@ -35,6 +41,8 @@ function unparsedHeadings(file) {
|
|
|
35
41
|
.forEach((line, index) => {
|
|
36
42
|
if (SCENARIO_HEADING_START.test(line) && !SCENARIO_HEADING.test(line)) {
|
|
37
43
|
found.push({ file, line: index + 1, text: line.trim() });
|
|
44
|
+
} else if (SCENARIO_ROW.test(line)) {
|
|
45
|
+
found.push({ file, line: index + 1, text: line.trim(), row: true });
|
|
38
46
|
}
|
|
39
47
|
});
|
|
40
48
|
|
|
@@ -430,6 +430,12 @@ function writeEpicPlan() {
|
|
|
430
430
|
'',
|
|
431
431
|
'<Возможность, ради которой эпик заведён: что владелец получит и чего не может сегодня.>',
|
|
432
432
|
'',
|
|
433
|
+
'## Точки',
|
|
434
|
+
'',
|
|
435
|
+
'- **A:** <где продукт стоит сейчас>',
|
|
436
|
+
`- **B (${TASK_KEY}-<номер>):** <изменение, которое увидит человек>. Признак: <команда, страница или число>`,
|
|
437
|
+
'- **G (веха эпика):** <состояние продукта, ради которого заведены задачи>. Признак: <команда, страница или число>',
|
|
438
|
+
'',
|
|
433
439
|
'## Как стоят ветки',
|
|
434
440
|
'',
|
|
435
441
|
`Ветка эпика отведена от главной, ветки задач — от неё, заявки задач идут в неё. <Стопкой`,
|
|
@@ -39,87 +39,10 @@ RT_STANDS_RAISED_BY="${RT_STANDS_RAISED_BY:-}"
|
|
|
39
39
|
RT_CHECKS_DIR="${RT_CHECKS_DIR:-tools}"
|
|
40
40
|
RT_HOOKS_TESTS="${RT_HOOKS_TESTS:-.claude/hooks/tests/run.sh}"
|
|
41
41
|
|
|
42
|
-
# The
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
|
|
46
|
-
# there is no remote, and then everything runs: a set stricter than needed is safe, a set narrower
|
|
47
|
-
# than needed is not.
|
|
48
|
-
#
|
|
49
|
-
# The build runs alongside the lint and the specs. The linter does not read types, and the specs
|
|
50
|
-
# read only what someone brought into them by an import: a type error in uncovered code lives until
|
|
51
|
-
# the image build, that is, until the merge. It costs little — beyond that the runner cache works.
|
|
52
|
-
#
|
|
53
|
-
# A newly created check goes here, not only into the general run that nobody calls by themselves. A
|
|
54
|
-
# new line in its list of known cases leaves for the main branch silently, while the list is read as
|
|
55
|
-
# a working guard.
|
|
56
|
-
#
|
|
57
|
-
# The layout audit goes as the first line, for two reasons. It costs seconds, so it refuses before
|
|
58
|
-
# the long run begins. And before it, a drift of the laid-out copy from the package refused nothing.
|
|
59
|
-
# An edit put into the laid-out copy past the source breaks nothing on the day it is made, and
|
|
60
|
-
# surfaces on someone else's work: the layout refuses on the whole edited file and lays down not one
|
|
61
|
-
# other. The sign is the layout settings themselves: a tree without them does not install the
|
|
62
|
-
# package, and there is nothing to call in it.
|
|
63
|
-
#
|
|
64
|
-
# Whether the branch touched only texts. Zero code — only texts, otherwise — code.
|
|
65
|
-
#
|
|
66
|
-
# The sign is needed by the tree that added a heavy step to the gate set: a stand, showcase
|
|
67
|
-
# snapshots, image builds. Without it such a step runs every time, whatever the branch is, and the
|
|
68
|
-
# push of a commit that changed one line in a markdown table takes minutes. In those minutes the
|
|
69
|
-
# owner manages to read it as hung and refuse it. The delivery rule demands the same from the
|
|
70
|
-
# pipeline: a branch that touched not one line of code raises no stand, takes no frames and builds
|
|
71
|
-
# no images.
|
|
72
|
-
#
|
|
73
|
-
# A branch counts as textual when every touched file is either `.md` or lies under the texts
|
|
74
|
-
# directory. Everything else, including the harness and settings, counts as code: the sign must err
|
|
75
|
-
# towards an extra run, not a missed one. An empty base means there is nothing to compare with —
|
|
76
|
-
# then the sign stays silent and everything runs.
|
|
77
|
-
rt_push_docs_only_default() {
|
|
78
|
-
[ -z "$1" ] && return 1
|
|
79
|
-
changed="$(git diff --name-only "$1"...HEAD 2>/dev/null)"
|
|
80
|
-
[ -z "$changed" ] && return 1
|
|
81
|
-
printf '%s\n' "$changed" | grep -qvE "(^${RT_DOCS_DIR:-docs}/|\.md\$)" && return 1
|
|
82
|
-
|
|
83
|
-
return 0
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
rt_push_checks_default() {
|
|
87
|
-
runner="$(rt_runner)"
|
|
88
|
-
root="${CLAUDE_PROJECT_DIR:-.}"
|
|
89
|
-
[ -f "$root/.claude/rt-kit.json" ] && printf '%s\n' "$runner agent-kit sync --check"
|
|
90
|
-
if [ -n "$1" ]; then
|
|
91
|
-
printf '%s\n' "$runner nx affected -t lint test build --base=$1"
|
|
92
|
-
else
|
|
93
|
-
printf '%s\n' "$runner nx run-many -t lint test build --all"
|
|
94
|
-
fi
|
|
95
|
-
[ -f "$root/stylelint.config.js" ] && printf '%s\n' "$runner stylelint \"**/*.scss\" --max-warnings 0"
|
|
96
|
-
|
|
97
|
-
# The guard scenarios are the same code as everything else: both the branch review and the
|
|
98
|
-
# confidence that the harness still works rest on them. The run takes seconds: it builds
|
|
99
|
-
# nothing.
|
|
100
|
-
[ -x "$root/$RT_HOOKS_TESTS" ] && printf '%s\n' "bash $RT_HOOKS_TESTS"
|
|
101
|
-
|
|
102
|
-
for check in check-doc-paths check-specs check-file-size check-dupes check-styles \
|
|
103
|
-
check-glossary check-lib-layers check-reuse check-schema-drift check-states check-state-next \
|
|
104
|
-
check-turn-map check-work-steps check-spec-coverage check-archive-age check-profile-drift \
|
|
105
|
-
check-hook-scope check-push-gate; do
|
|
106
|
-
[ -f "$root/$RT_CHECKS_DIR/$check.mjs" ] && printf '%s\n' "node $RT_CHECKS_DIR/$check.mjs"
|
|
107
|
-
done
|
|
108
|
-
|
|
109
|
-
return 0
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
# Is a check of the gate set heavy: success — it builds, raises or shoots, and costs minutes. After
|
|
113
|
-
# the first red check the gate still runs the light ones, so that one refusal names every red among
|
|
114
|
-
# them; a heavy one is not started then — its minutes buy nothing while the push is refused anyway.
|
|
115
|
-
# Before, the gate left on the first red, and every fix opened the next reason by a push of its own.
|
|
116
|
-
rt_push_check_heavy_default() {
|
|
117
|
-
case "$1" in
|
|
118
|
-
*' nx '* | *'nx affected'* | *'nx run'* | *'docker '* | *playwright* | *e2e*) return 0 ;;
|
|
119
|
-
esac
|
|
120
|
-
|
|
121
|
-
return 1
|
|
122
|
-
}
|
|
42
|
+
# The push set — what runs before a push, which of it is heavy, whether the branch touched only
|
|
43
|
+
# texts — lives in a neighbouring file: together with it the profile outgrew the length limit.
|
|
44
|
+
# shellcheck disable=SC1090
|
|
45
|
+
[ -f "$(dirname "${BASH_SOURCE[0]}")/push.sh" ] && . "$(dirname "${BASH_SOURCE[0]}")/push.sh"
|
|
123
46
|
|
|
124
47
|
# Which document must travel by the same commit as this file. Prints a path pattern or stays silent.
|
|
125
48
|
rt_docs_pair_for_default() {
|
|
@@ -359,6 +282,12 @@ rt_pull_token_login() { :; }
|
|
|
359
282
|
# foreign words: a section not named by the tree is not judged at all.
|
|
360
283
|
RT_PULL_BODY_SECTION="${RT_PULL_BODY_SECTION:-}"
|
|
361
284
|
|
|
285
|
+
# The section with the table of points, judged the same way: named by the tree, silent otherwise.
|
|
286
|
+
RT_PULL_POINTS_SECTION="${RT_PULL_POINTS_SECTION:-}"
|
|
287
|
+
|
|
288
|
+
# The section with the table of the critic, judged the same way.
|
|
289
|
+
RT_PULL_GOAL_SECTION="${RT_PULL_GOAL_SECTION:-}"
|
|
290
|
+
|
|
362
291
|
# The PR body line closing the branch's task (`{number}`); the keyword is the hosting's, so silent.
|
|
363
292
|
RT_PULL_CLOSES_LINE="${RT_PULL_CLOSES_LINE:-}"
|
|
364
293
|
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# The push set: what runs before a push, which of it is heavy, and whether the branch touched only
|
|
3
|
+
# texts.
|
|
4
|
+
#
|
|
5
|
+
# The package default, part of the tree profile — loaded from `project.sh`, next to which it lies. A
|
|
6
|
+
# separate file because together they outgrow the length limit.
|
|
7
|
+
|
|
8
|
+
# The commands that must pass before a push. One per line; the first one that fails refuses the
|
|
9
|
+
# push. The style linter on a separate line: the code linter does not read style files at all.
|
|
10
|
+
#
|
|
11
|
+
# The first parameter is the base: the branch against which the contribution is counted. Empty means
|
|
12
|
+
# there is no remote, and then everything runs: a set stricter than needed is safe, a set narrower
|
|
13
|
+
# than needed is not.
|
|
14
|
+
#
|
|
15
|
+
# The build runs alongside the lint and the specs. The linter does not read types, and the specs
|
|
16
|
+
# read only what someone brought into them by an import: a type error in uncovered code lives until
|
|
17
|
+
# the image build, that is, until the merge. It costs little — beyond that the runner cache works.
|
|
18
|
+
#
|
|
19
|
+
# A newly created check goes here, not only into the general run that nobody calls by themselves. A
|
|
20
|
+
# new line in its list of known cases leaves for the main branch silently, while the list is read as
|
|
21
|
+
# a working guard.
|
|
22
|
+
#
|
|
23
|
+
# The layout audit goes as the first line, for two reasons. It costs seconds, so it refuses before
|
|
24
|
+
# the long run begins. And before it, a drift of the laid-out copy from the package refused nothing.
|
|
25
|
+
# An edit put into the laid-out copy past the source breaks nothing on the day it is made, and
|
|
26
|
+
# surfaces on someone else's work: the layout refuses on the whole edited file and lays down not one
|
|
27
|
+
# other. The sign is the layout settings themselves: a tree without them does not install the
|
|
28
|
+
# package, and there is nothing to call in it.
|
|
29
|
+
#
|
|
30
|
+
# Whether the branch touched only texts. Zero code — only texts, otherwise — code.
|
|
31
|
+
#
|
|
32
|
+
# The sign is needed by the tree that added a heavy step to the gate set: a stand, showcase
|
|
33
|
+
# snapshots, image builds. Without it such a step runs every time, whatever the branch is, and the
|
|
34
|
+
# push of a commit that changed one line in a markdown table takes minutes. In those minutes the
|
|
35
|
+
# owner manages to read it as hung and refuse it. The delivery rule demands the same from the
|
|
36
|
+
# pipeline: a branch that touched not one line of code raises no stand, takes no frames and builds
|
|
37
|
+
# no images.
|
|
38
|
+
#
|
|
39
|
+
# A branch counts as textual when every touched file is either `.md` or lies under the texts
|
|
40
|
+
# directory. Everything else, including the harness and settings, counts as code: the sign must err
|
|
41
|
+
# towards an extra run, not a missed one. An empty base means there is nothing to compare with —
|
|
42
|
+
# then the sign stays silent and everything runs.
|
|
43
|
+
rt_push_docs_only_default() {
|
|
44
|
+
[ -z "$1" ] && return 1
|
|
45
|
+
changed="$(git diff --name-only "$1"...HEAD 2>/dev/null)"
|
|
46
|
+
[ -z "$changed" ] && return 1
|
|
47
|
+
printf '%s\n' "$changed" | grep -qvE "(^${RT_DOCS_DIR:-docs}/|\.md\$)" && return 1
|
|
48
|
+
|
|
49
|
+
return 0
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
# A push that edits the guards in a tree without a run file names the missing file. Without the
|
|
53
|
+
# file the line of the guard scenarios dropped out of the set in silence, and a push editing the
|
|
54
|
+
# guards ran not one scenario. The line passes rather than refuses: a tree that installs the package
|
|
55
|
+
# gets its guards by the layout, and every upgrade edits them. Scenario SC-AK-1248.
|
|
56
|
+
rt_push_hooks_gap() {
|
|
57
|
+
[ -n "$2" ] || return 0
|
|
58
|
+
[ -x "$1/$RT_HOOKS_TESTS" ] && return 0
|
|
59
|
+
git -C "$1" diff --name-only "$2...HEAD" 2>/dev/null | grep -q '^\.claude/hooks/' || return 0
|
|
60
|
+
printf '%s\n' "echo 'guard scenarios: $RT_HOOKS_TESTS is missing, the edited guards run no scenario'"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
rt_push_checks_default() {
|
|
64
|
+
runner="$(rt_runner)"
|
|
65
|
+
root="${CLAUDE_PROJECT_DIR:-.}"
|
|
66
|
+
[ -f "$root/.claude/rt-kit.json" ] && printf '%s\n' "$runner agent-kit sync --check"
|
|
67
|
+
if [ -n "$1" ]; then
|
|
68
|
+
printf '%s\n' "$runner nx affected -t lint test build --base=$1"
|
|
69
|
+
else
|
|
70
|
+
printf '%s\n' "$runner nx run-many -t lint test build --all"
|
|
71
|
+
fi
|
|
72
|
+
[ -f "$root/stylelint.config.js" ] && printf '%s\n' "$runner stylelint \"**/*.scss\" --max-warnings 0"
|
|
73
|
+
|
|
74
|
+
# The guard scenarios are the same code as everything else: both the branch review and the
|
|
75
|
+
# confidence that the harness still works rest on them. The run takes seconds: it builds
|
|
76
|
+
# nothing.
|
|
77
|
+
[ -x "$root/$RT_HOOKS_TESTS" ] && printf '%s\n' "bash $RT_HOOKS_TESTS"
|
|
78
|
+
rt_push_hooks_gap "$root" "$1"
|
|
79
|
+
|
|
80
|
+
for check in check-doc-paths check-specs check-file-size check-dupes check-styles \
|
|
81
|
+
check-glossary check-lib-layers check-reuse check-schema-drift check-states check-state-next \
|
|
82
|
+
check-turn-map check-work-steps check-spec-coverage check-archive-age check-profile-drift \
|
|
83
|
+
check-hook-scope check-push-gate; do
|
|
84
|
+
[ -f "$root/$RT_CHECKS_DIR/$check.mjs" ] && printf '%s\n' "node $RT_CHECKS_DIR/$check.mjs"
|
|
85
|
+
done
|
|
86
|
+
|
|
87
|
+
return 0
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
# Is a check of the gate set heavy: success — it builds, raises or shoots, and costs minutes. After
|
|
91
|
+
# the first red check the gate still runs the light ones, so that one refusal names every red among
|
|
92
|
+
# them; a heavy one is not started then — its minutes buy nothing while the push is refused anyway.
|
|
93
|
+
# Before, the gate left on the first red, and every fix opened the next reason by a push of its own.
|
|
94
|
+
rt_push_check_heavy_default() {
|
|
95
|
+
case "$1" in
|
|
96
|
+
*' nx '* | *'nx affected'* | *'nx run'* | *'docker '* | *playwright* | *e2e*) return 0 ;;
|
|
97
|
+
esac
|
|
98
|
+
|
|
99
|
+
return 1
|
|
100
|
+
}
|
package/assets/docs/GLOSSARY.md
CHANGED
|
@@ -50,6 +50,10 @@ sections through the override; they merge here by heading, and a package edit do
|
|
|
50
50
|
- **Handover** — the text that closes a session: working tree, branch, task, where the progress lies, what is done, the next step, what was special about the session. Placed outside the tree and not committed
|
|
51
51
|
- **Epic** — a series of tasks on one theme in an assigned order, wider than one branch. Lives in two places: a card with the epic label and a plan next to it. Not called a work line
|
|
52
52
|
- **Archive** — records of what has happened: what explains a closed decision. Not edited after the rollout
|
|
53
|
+
- **Mission** — what a product exists for and what changes for whom. A session only proposes a wording; the owner's approval sets it. It names no features. A milestone that serves no mission is a finding
|
|
54
|
+
- **Point** — a change a person can observe after a task, with a sign that shows it is reached. A is where the product stands now, B, C and D are the points of the tasks. A written rule, a merged PR and a green check are steps, not points
|
|
55
|
+
- **Milestone** — point G: the state of the product an epic exists for. Not a date and not a part of the work
|
|
56
|
+
- **Product passport** — five to seven lines fixed while planning: for whom, which problem, the main path of a person, what exists and what is unfinished
|
|
53
57
|
|
|
54
58
|
## Checks
|
|
55
59
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# rt-hook: PreToolUse mcp__playwright__.*|mcp__chrome-devtools__.*|Bash|mcp__webstorm__execute_terminal_command|mcp__webstorm__execute_tool
|
|
2
|
+
# rt-hook: PreToolUse mcp__playwright__.*|mcp__chrome-devtools__.*|mcp__plugin_.*_playwright__.*|mcp__plugin_.*_chrome-devtools__.*|Bash|mcp__webstorm__execute_terminal_command|mcp__webstorm__execute_tool
|
|
3
3
|
# Requires: hooks/deny-tail.sh
|
|
4
4
|
# Guard of the bypass routes to the browser. PreToolUse.
|
|
5
5
|
#
|
|
@@ -45,10 +45,13 @@ deny() {
|
|
|
45
45
|
exit 2
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
# A driver installed as a plugin carries the plugin name in front of the server name —
|
|
49
|
+
# `mcp__plugin_<plugin>_<server>__<tool>`. The plugin name is chosen by its publisher, so it is
|
|
50
|
+
# matched by a sample: the plain name alone let the same driver open the browser past the profile.
|
|
48
51
|
case "$tool" in
|
|
49
|
-
mcp__playwright__*)
|
|
52
|
+
mcp__playwright__* | mcp__plugin_*_playwright__*)
|
|
50
53
|
deny "The second browser driver is not used in this project — no sign-in was made in its profile." ;;
|
|
51
|
-
mcp__chrome-devtools__*)
|
|
54
|
+
mcp__chrome-devtools__* | mcp__plugin_*_chrome-devtools__*)
|
|
52
55
|
deny "The third browser driver is not used in this project — it does not ask for the pinned profile." ;;
|
|
53
56
|
esac
|
|
54
57
|
|
|
@@ -143,22 +143,22 @@ claims=(
|
|
|
143
143
|
# phrase was once said with not one run behind it.
|
|
144
144
|
'@проверк[аи] перед (push|пушем|отправкой)[^.]{0,30}(починен|исправлен)§git push|check:all|pnpm (run|exec)§прогон набора перед push — `git push` или `pnpm run check:all`'
|
|
145
145
|
'@запушен[аоы]?|@запушил[а]?|@пуш прошёл|@ветка уехала§git push§`git push`'
|
|
146
|
-
'(PR|правка|ветка|работа)[^.]{0,20}@(влит|слит|смержен)|@влит[оа] в|@слит[оа] в§git merge|gh pr merge§`git merge` или `
|
|
146
|
+
'(PR|правка|ветка|работа)[^.]{0,20}@(влит|слит|смержен)|@влит[оа] в|@слит[оа] в§git merge|gh pr merge|glab mr merge§`git merge`, `gh pr merge` или `glab mr merge`'
|
|
147
147
|
'(ветки|ветка|файлы|файл|папка|каталог)[^.]{0,40}@(снят|удал[её]н|удалил|почищен|почистил|вычищен|вычистил)|@снят[оыа] с§git branch|git push .*--delete|git rm|gh api|rm §команду удаления — `git branch -d`, `git push --delete` или `git rm`'
|
|
148
|
-
'@прогон (зелёный|прошёл|кончился)|@конвейер зелёный|@проверки на PR зелёные§gh run§`gh run list
|
|
149
|
-
'@(работа|правка|задача) готова|@можно вливать|@PR открыт|@черновик снят§gh pr §`gh pr create`, `gh pr view
|
|
148
|
+
'@прогон (зелёный|прошёл|кончился)|@конвейер зелёный|@проверки на PR зелёные§gh run|glab ci§`gh run list`, `gh run view` или `glab ci status`'
|
|
149
|
+
'@(работа|правка|задача) готова|@можно вливать|@PR открыт|@черновик снят§gh pr |glab mr §`gh pr create`, `gh pr view`, `gh pr ready` или `glab mr`'
|
|
150
150
|
# Waiting for someone else's step is a claim about the state too, and there is something in it
|
|
151
151
|
# to lie with: a run is green for an hour, and sometimes never starts at all. Said without a
|
|
152
152
|
# command, it leaves finished work a draft, and the owner learns of it last — that is exactly
|
|
153
153
|
# how it went twice in one day.
|
|
154
|
-
'@жд[уёя][^.]{0,20}прогон|@дожида[ею][^.]{0,20}прогон|@прогон[^.]{0,20}(ещё идёт|не встал|не кончился|не дошёл)|@черновик[^.]{0,30}(не снимаю|сниму|снимется)§gh run|gh pr checks|check-runs|check:board|board\.mjs§команду о прогоне — `gh run list`, `gh pr checks` или сверку очереди работ'
|
|
155
|
-
'@задача заведена|@задача (в|переведена в) колонк|@колонка переведена§gh issue|gh api|task:new|task:move|board\.mjs§команду очереди работ — заведение задачи или перевод колонки'
|
|
154
|
+
'@жд[уёя][^.]{0,20}прогон|@дожида[ею][^.]{0,20}прогон|@прогон[^.]{0,20}(ещё идёт|не встал|не кончился|не дошёл)|@черновик[^.]{0,30}(не снимаю|сниму|снимется)§gh run|gh pr checks|glab ci|check-runs|check:board|board\.mjs§команду о прогоне — `gh run list`, `gh pr checks` или сверку очереди работ'
|
|
155
|
+
'@задача заведена|@задача (в|переведена в) колонк|@колонка переведена§gh issue|gh api|glab issue|glab api|task:new|task:move|board\.mjs§команду очереди работ — заведение задачи или перевод колонки'
|
|
156
156
|
'(в дереве|в репозитории|здесь|такого файла|такой команды)[^.]{0,30}(нет|не бывает)|@не заводили|@нигде не встречается§grep|rg |ls |find |git ls-files|git grep|git log|cat §команду поиска — `grep`, `git ls-files` или обход каталога'
|
|
157
157
|
)
|
|
158
158
|
|
|
159
159
|
# A negated claim is a statement about the tree too, but the action command cannot show it: «not
|
|
160
160
|
# pushed» is shown by a read of the branch state, not by a push.
|
|
161
|
-
read_proof='git (status|log|ls-remote|branch|show|rev-parse|fetch|diff)|gh (pr|run|api|issue)|ls |grep|board\.mjs'
|
|
161
|
+
read_proof='git (status|log|ls-remote|branch|show|rev-parse|fetch|diff)|gh (pr|run|api|issue)|glab (mr|ci|api|issue)|ls |grep|board\.mjs'
|
|
162
162
|
|
|
163
163
|
for row in "${claims[@]}"; do
|
|
164
164
|
words="${row%%§*}"
|