@cratis/pi 7.130.0 → 7.131.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/package/corpus/harnesses/copilot/instructions/browser.instructions.md +4 -2
- package/package/corpus/harnesses/copilot/instructions/pull-requests.instructions.md +1 -2
- package/package/corpus/rules/browser.md +4 -2
- package/package/corpus/rules/general.md +2 -2
- package/package/corpus/rules/pull-requests.md +1 -2
- package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-labels-and-release.md +1 -1
- package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +14 -4
- package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +37 -23
- package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +24 -10
- package/package/corpus/skills/cratis-engineering-review-rounds/verification.json +4 -2
- package/package.json +1 -1
|
@@ -16,8 +16,10 @@ Authority in [`general.md`](../../../rules/general.md). Read this before any bro
|
|
|
16
16
|
request or an applicable policy names that exact action. A configured browser tool is not
|
|
17
17
|
a permit.
|
|
18
18
|
- **[contract] One production tab per session.** No parallel polling or parallel findings on
|
|
19
|
-
production. Run the health check first
|
|
20
|
-
|
|
19
|
+
production. Run the health check first and close your own idle pages before opening one.
|
|
20
|
+
- **[contract] Close only what you opened.** Promptly close the browser backend you
|
|
21
|
+
started; if no shutdown tool exists, close your pages and report it. Subagents do the
|
|
22
|
+
same. Never touch a user's or shared session; no `pkill`/`killall`. One browser per lane.
|
|
21
23
|
- **[convention] Prefer staging or a local copy** for interactive and visual smoke runs.
|
|
22
24
|
- **[contract] Only the `browser-operator` agent receives browser tools.** Hand it the URL,
|
|
23
25
|
scope, permit and artifact directory. The main session does not do browser work itself
|
|
@@ -33,5 +33,4 @@ applyTo: "**/*"
|
|
|
33
33
|
|
|
34
34
|
- Run `node .cratis/ai/hooks/scripts/cratis-check-pr.mjs --body-file <file> --label <intent>`; it applies the exact `policy / verify` release-note rules and the Bash hook runs it on `gh pr create` and `gh pr edit`. If it fails, fix the description, not the code. Before every body edit, run `git diff --stat origin/main...HEAD` and delete bullets the diff no longer supports.
|
|
35
35
|
- Run the affected-project gates before marking work ready (build, built specs, lint and type-check; zero warnings), and the repository's required CI checks after an authorized push. `no-release` and documentation-only PRs still satisfy every required check; none is a blanket exemption from red CI.
|
|
36
|
-
-
|
|
37
|
-
- Open the PR once, when verified: each push starts CI. One PR per body of work, opened by the orchestrator (`cratis-engineering-release-trains`), with `--assignee @me`.
|
|
36
|
+
- The release train is the PR: fold finished branches into the repository's one train (see the skill). Open it once, when verified, as the orchestrator (`cratis-engineering-release-trains`) with `--assignee @me`. Split only for a named major, an urgent security fix authorized in writing, or an accepted outsider issue (patch or minor, own release).
|
|
@@ -15,8 +15,10 @@ Authority in [`general.md`](./general.md). Read this before any browser call.
|
|
|
15
15
|
request or an applicable policy names that exact action. A configured browser tool is not
|
|
16
16
|
a permit.
|
|
17
17
|
- **[contract] One production tab per session.** No parallel polling or parallel findings on
|
|
18
|
-
production. Run the health check first
|
|
19
|
-
|
|
18
|
+
production. Run the health check first and close your own idle pages before opening one.
|
|
19
|
+
- **[contract] Close only what you opened.** Promptly close the browser backend you
|
|
20
|
+
started; if no shutdown tool exists, close your pages and report it. Subagents do the
|
|
21
|
+
same. Never touch a user's or shared session; no `pkill`/`killall`. One browser per lane.
|
|
20
22
|
- **[convention] Prefer staging or a local copy** for interactive and visual smoke runs.
|
|
21
23
|
- **[contract] Only the `browser-operator` agent receives browser tools.** Hand it the URL,
|
|
22
24
|
scope, permit and artifact directory. The main session does not do browser work itself
|
|
@@ -63,9 +63,9 @@ obtaining credentials, and other local conventions ("Product policy" above).
|
|
|
63
63
|
|
|
64
64
|
Default to agentic behavior: inspect local rules, skills, code, tests, and generated patterns; make conservative assumptions supported by that context; implement and verify end to end when feasible. A user's direct request authorizes every clearly named in-scope action, including external effects such as pushing, opening or merging a pull request, applying the requested label, deployment, issue mutation, and operations against a named environment. The user is the authority for their request; do not require them to identify another approver, decision record, or formal operation profile.
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
Decide what the repository or research can answer, record the evidence, and get a cross-provider check when the decision is risky. Report reversible choices instead of asking approval for a plan the user requested; do not re-ask for an authorized action unless its target or consequence materially changes. Deciding never widens the task's authorization ([capability-is-not-authority.md](./capability-is-not-authority.md)). Ask only about human-only matters (credentials, money, production access, legal, merging majors), undecided product choices with different consequences, an effect the request did not include, a hard-to-reverse change with unclear scope, or requested checkpoints.
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
Write a necessary question plainly: the choice, why now, each option's consequence, your recommendation. No unexplained internal labels ("execution authority," "operation profile," "decider"); do not bundle verdicts. A decision record never gates a direct request; offer one only after explaining the decision.
|
|
69
69
|
|
|
70
70
|
## Destructive operations
|
|
71
71
|
|
|
@@ -32,5 +32,4 @@ applyTo: "**/*"
|
|
|
32
32
|
|
|
33
33
|
- Run `node .cratis/ai/hooks/scripts/cratis-check-pr.mjs --body-file <file> --label <intent>`; it applies the exact `policy / verify` release-note rules and the Bash hook runs it on `gh pr create` and `gh pr edit`. If it fails, fix the description, not the code. Before every body edit, run `git diff --stat origin/main...HEAD` and delete bullets the diff no longer supports.
|
|
34
34
|
- Run the affected-project gates before marking work ready (build, built specs, lint and type-check; zero warnings), and the repository's required CI checks after an authorized push. `no-release` and documentation-only PRs still satisfy every required check; none is a blanket exemption from red CI.
|
|
35
|
-
-
|
|
36
|
-
- Open the PR once, when verified: each push starts CI. One PR per body of work, opened by the orchestrator (`cratis-engineering-release-trains`), with `--assignee @me`.
|
|
35
|
+
- The release train is the PR: fold finished branches into the repository's one train (see the skill). Open it once, when verified, as the orchestrator (`cratis-engineering-release-trains`) with `--assignee @me`. Split only for a named major, an urgent security fix authorized in writing, or an accepted outsider issue (patch or minor, own release).
|
package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-labels-and-release.md
CHANGED
|
@@ -70,7 +70,7 @@ Do not open a pull request per task when the tasks belong to the same body of wo
|
|
|
70
70
|
|
|
71
71
|
Before a consolidation or a re-land of reverted work merges, prove it dropped nothing with `cratis-engineering-consolidation-guard`.
|
|
72
72
|
|
|
73
|
-
Split into separate pull
|
|
73
|
+
Split into a separate pull request only for the exceptions in `cratis-engineering-release-trains`: a named major awaiting human confirmation, an urgent security fix authorized in writing, or an accepted outsider issue. Unrelated or riskier work rides a later train instead.
|
|
74
74
|
|
|
75
75
|
## Quality gates
|
|
76
76
|
|
|
@@ -134,10 +134,20 @@ After the run completes with a failure:
|
|
|
134
134
|
3. Fix all in-scope causes together. Report unrelated or unavailable causes as
|
|
135
135
|
blockers rather than silently waiving them. Re-run the required local gate
|
|
136
136
|
on the fixed state, then push once when the request authorizes it.
|
|
137
|
-
4.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
4. Flaky tests never hang a release. Classify within about 15 minutes from one
|
|
138
|
+
failed-log read and the test's history on main: real (in code the change
|
|
139
|
+
touched) or flaky. A flaky or pre-existing claim needs independent root-cause
|
|
140
|
+
validation; an unknown or repeating failure without a matching signature is
|
|
141
|
+
real and a blocker, not a quarantine candidate.
|
|
142
|
+
- Confirmed flake: after the run completes, rerun once, e.g.
|
|
143
|
+
`gh run rerun <id> --repo OWNER/REPO --failed`; a known flake with a
|
|
144
|
+
matching signature may go straight to quarantine. If it fails again,
|
|
145
|
+
quarantine the test in the same train via the repo's mechanism, open a
|
|
146
|
+
tracked "Flaky: <test>" issue with the evidence (label `flaky`), and push
|
|
147
|
+
once. Never quarantine silently or disable security or critical-path
|
|
148
|
+
coverage; if the security lens vetoes, evict the item or escalate.
|
|
149
|
+
- Real failure: fix in one round or evict the item. Never retry in loops; a
|
|
150
|
+
train waits at most one CI cycle on a flake.
|
|
141
151
|
|
|
142
152
|
Never put a CI skip token in a title or commit. Do not spend a push on each
|
|
143
153
|
individual fix or use CI to discover whether speculative fixes compile.
|
|
@@ -13,7 +13,8 @@ compatibility: Requires git and the GitHub CLI (gh).
|
|
|
13
13
|
A **candidate** is the branch assembling deliveries intended to ship together.
|
|
14
14
|
A repository includes its main checkout and all its worktrees. Consider their
|
|
15
15
|
concurrent work together, not as separate releases merely because it has
|
|
16
|
-
separate branches. One person or session assembles the candidate.
|
|
16
|
+
separate branches. One person or session assembles the candidate. Even a single
|
|
17
|
+
item ships as a train: the train is the PR, and item branches get no PR.
|
|
17
18
|
|
|
18
19
|
## Authority and routing
|
|
19
20
|
|
|
@@ -39,8 +40,8 @@ run handling, and `cratis-engineering-review-rounds` for proportionate review.
|
|
|
39
40
|
Each push to an open PR starts checks on shared runners. Push the branch for
|
|
40
41
|
backup or hand-off if needed, but open the PR only once, when the work is
|
|
41
42
|
verified locally and ready. Push to it again only for a correction that review
|
|
42
|
-
or CI found. Do not open a draft PR to see what CI says.
|
|
43
|
-
one PR (see below and `cratis-engineering-consolidation-guard`). An orchestrator
|
|
43
|
+
or CI found. Do not open a draft PR to see what CI says. All work goes into
|
|
44
|
+
the repository's one train PR (see below and `cratis-engineering-consolidation-guard`). An orchestrator
|
|
44
45
|
opens the one PR; a sub-agent delivers a verified branch and does not open or
|
|
45
46
|
push to a PR unless the request says so. Pass `--assignee @me` when creating it.
|
|
46
47
|
|
|
@@ -53,7 +54,7 @@ push to a PR unless the request says so. Pass `--assignee @me` when creating it.
|
|
|
53
54
|
gh pr list --state open --json number,headRefName,title,author
|
|
54
55
|
```
|
|
55
56
|
|
|
56
|
-
2. Group
|
|
57
|
+
2. Group ready deliveries under one candidate and one PR. Check with
|
|
57
58
|
the person assembling an existing candidate before changing it. Independent
|
|
58
59
|
work branches start from `origin/main`; work that depends on an unmerged
|
|
59
60
|
candidate may start from that candidate's latest commit (see Replace waits
|
|
@@ -67,10 +68,14 @@ push to a PR unless the request says so. Pass `--assignee @me` when creating it.
|
|
|
67
68
|
ready delivery branches with merge commits. Keep each logical change in its
|
|
68
69
|
own commits. Return a conflicting or failing delivery for correction rather
|
|
69
70
|
than guessing its intent in the assembled branch.
|
|
70
|
-
5. Keep one
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
5. Keep one train per repository. Split only for a named major awaiting human
|
|
72
|
+
confirmation, an urgent security fix authorized in writing, or an accepted
|
|
73
|
+
issue reported by someone outside the organization (patch or minor), which
|
|
74
|
+
ships promptly on its own release right after private security work; issues
|
|
75
|
+
captured by internal bots are not outsider issues. Name the exception in the
|
|
76
|
+
reviewer comment. Other unrelated or differently risky work rides a later
|
|
77
|
+
train, not its own PR. Item branches get no PR, CI or
|
|
78
|
+
`run-integration` label; they get local gates and a delta review.
|
|
74
79
|
|
|
75
80
|
Minimal assembly, after agreeing on the included deliveries:
|
|
76
81
|
|
|
@@ -103,19 +108,19 @@ release, publish, or deploy run, or another session's watched merge. Leave
|
|
|
103
108
|
others running and report them. Follow `cratis-engineering-ci-gates` for the
|
|
104
109
|
cancellation checks; folding a PR is not blanket cancellation authority.
|
|
105
110
|
|
|
106
|
-
##
|
|
111
|
+
## Cadence, then freeze
|
|
107
112
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
A train holds at most about 10 items, or one review slot of glue. Cut the next
|
|
114
|
+
train as soon as the previous one merges, or at least every 4 hours while ready
|
|
115
|
+
items wait. Never hold the cut for work that is not yet ready; keep items blocked
|
|
116
|
+
on a design decision, consumer proof, or another repository out.
|
|
112
117
|
|
|
113
118
|
After the cut, nothing joins. Late deliveries go into the next candidate.
|
|
114
119
|
Corrections needed to make the frozen candidate pass are not new deliveries;
|
|
115
120
|
rerun the affected required gates for that changed code state.
|
|
116
121
|
|
|
117
|
-
Record the cut
|
|
118
|
-
|
|
122
|
+
Record the cut in one line in the reviewer comment, not the release note:
|
|
123
|
+
`Cut with A and B; C waits for consumer proof.` Keep local
|
|
119
124
|
coordination records under `.ai-work/`, never in public release text.
|
|
120
125
|
|
|
121
126
|
## Replace waits with local work
|
|
@@ -128,9 +133,17 @@ queued, do the next independent piece of work.
|
|
|
128
133
|
- Prove against locally built packages instead of waiting for a release; see
|
|
129
134
|
[cratis-engineering-local-cross-repo-verification](../cratis-engineering-local-cross-repo-verification/SKILL.md).
|
|
130
135
|
Only the final version pin waits for the release.
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
|
|
136
|
+
- Evict a stuck or failing item instead of holding the train (next section).
|
|
137
|
+
- Cut a train at least every 4 hours with whatever is green.
|
|
138
|
+
|
|
139
|
+
## Evict, don't hold
|
|
140
|
+
|
|
141
|
+
If train CI or the glue review fails and the failure is attributable to one
|
|
142
|
+
item, revert that item out of the train with a revert commit (never rewrite
|
|
143
|
+
history), push once, ship the rest, and send the item to the next train after
|
|
144
|
+
its fix. Diagnose an unattributable failure; never evict the whole train blindly.
|
|
145
|
+
Merge as soon as CI is green and the review passed (majors stay with a human),
|
|
146
|
+
then cut the next train. A train's gate and CI run on the real merged state.
|
|
134
147
|
|
|
135
148
|
## Apply the ship bar
|
|
136
149
|
|
|
@@ -143,9 +156,10 @@ making a speculative shipping push. Recheck the merge conditions after CI.
|
|
|
143
156
|
reason why they do not apply. The assembled local gate is green. Required
|
|
144
157
|
integration coverage follows repository policy and must pass before merge;
|
|
145
158
|
name anything that cannot run locally rather than calling it a local pass.
|
|
146
|
-
3. **
|
|
147
|
-
|
|
148
|
-
|
|
159
|
+
3. **Reviewed.** Each item head is certified in the review log and the
|
|
160
|
+
train's glue review (merge resolutions, fix-ups, main-merge conflict
|
|
161
|
+
resolutions) completed without Blockers or missing required evidence. A
|
|
162
|
+
whole-change review is needed only for an item without a review-log entry.
|
|
149
163
|
4. **Release decision settled.** Release intent follows `pull-requests.md`.
|
|
150
164
|
For a major release, require explicit human confirmation and human merge.
|
|
151
165
|
An agent never merges it; preparing the PR does not answer that checkpoint.
|
|
@@ -185,7 +199,7 @@ steps. The next session must recheck the ship bar, not blindly merge on green.
|
|
|
185
199
|
|
|
186
200
|
## What breaks
|
|
187
201
|
|
|
188
|
-
- **
|
|
202
|
+
- **A PR per item or a delivery outside the train:** duplicate gates and fragmented releases replace an
|
|
189
203
|
assembled check of the actual shipped change.
|
|
190
204
|
- **A growing frozen candidate:** late work invalidates the gate and cut.
|
|
191
205
|
- **Green means permitted:** checks neither resolve objections nor approve a
|
|
@@ -195,7 +209,7 @@ steps. The next session must recheck the ship bar, not blindly merge on green.
|
|
|
195
209
|
|
|
196
210
|
Run the repository's exact assembled gate and inspect its successful exit.
|
|
197
211
|
Run `gh pr checks <pr>` before merge: required checks must pass for the tested
|
|
198
|
-
head. Confirm the
|
|
212
|
+
head. Confirm the review-log-certified items and glue review, fresh discussion, and main-overlap check.
|
|
199
213
|
For release notes, execute the repository's `cratis-check-pr.mjs` command from
|
|
200
214
|
`pull-requests.md`; a zero exit is the pass signal. No checklist replaces those
|
|
201
215
|
behavioral and CI signals.
|
|
@@ -22,12 +22,25 @@ advisory preference is not a merge gate. Missing required evidence yields
|
|
|
22
22
|
|
|
23
23
|
## Budget the review
|
|
24
24
|
|
|
25
|
-
-
|
|
26
|
-
not to seek reassurance
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
- Review each branch whole once, the first time or when the coordinator orders
|
|
26
|
+
it; a second round only after a blocker, not to seek reassurance.
|
|
27
|
+
- After that, review deltas only: from the last reviewed head in the review
|
|
28
|
+
log to the new head. A certified item is never re-reviewed whole.
|
|
29
|
+
- For a release train, review glue only: recreate the merge of the certified
|
|
30
|
+
item heads and review `git diff <that merge> <train head>` (merge resolutions,
|
|
31
|
+
fix-ups; for main merges, the conflict resolutions). Item reviews are not an
|
|
32
|
+
integration pass; the train's gate and CI still run on the merged state.
|
|
33
|
+
- Start review in parallel with the gate when possible, but keep it
|
|
34
|
+
provisional: required gates must pass before an approval report is finalized.
|
|
35
|
+
Do not launch duplicate gates for review.
|
|
36
|
+
- Keep a review log at the path the coordinator names, default
|
|
37
|
+
`.ai-work/review-log.tsv` (ignored work area, configurable). Append one row per
|
|
38
|
+
attempt: repo, branch/PR, full base and head SHAs, run id, mode, ranges
|
|
39
|
+
covered, verdict (PASS / NOT PASS / INCOMPLETE), date. An attempt is always
|
|
40
|
+
recorded, but an unexamined partition never advances certified coverage.
|
|
41
|
+
Rerunning a missing partition at a later head covers its original base to head
|
|
42
|
+
range plus the new delta. An item is certified only with complete coverage, the
|
|
43
|
+
security lens run and blockers resolved; an incomplete slot is not a pass.
|
|
31
44
|
- Use ordinary depth by default. Deep review needs one named risk class:
|
|
32
45
|
**security**, **algorithmic**, **concurrency**, or **cross-cutting**, plus a
|
|
33
46
|
one-line justification tied to the changed behavior. Data-loss exposure or
|
|
@@ -84,8 +97,8 @@ later completes a valid review.
|
|
|
84
97
|
|
|
85
98
|
## Delta rounds
|
|
86
99
|
|
|
87
|
-
A delta round
|
|
88
|
-
SHA, not from an arbitrary base. Carry the prior Blockers, unresolved evidence
|
|
100
|
+
A delta round is the default after a first whole review and reviews from the last
|
|
101
|
+
reviewed SHA, not from an arbitrary base; take that SHA from the review log. Carry the prior Blockers, unresolved evidence
|
|
89
102
|
gaps, Suggestions, and Dismissed findings with their reasons. Supply the round
|
|
90
103
|
number, prior report, original base, last reviewed SHA, and new head explicitly.
|
|
91
104
|
|
|
@@ -106,8 +119,9 @@ unresolved findings and limits; a narrow delta cannot certify surfaces that
|
|
|
106
119
|
were never examined. Reuse earlier approval only for the exact committed SHAs
|
|
107
120
|
and examined scope, never for a dirty tree or a changed head. Dirty-tree feedback
|
|
108
121
|
is preliminary, not reusable committed approval. Do not duplicate completed
|
|
109
|
-
premium reviews or gates on unchanged exact reviewed scope
|
|
110
|
-
|
|
122
|
+
premium reviews or gates on unchanged exact reviewed scope. Certified item
|
|
123
|
+
coverage plus the train's glue or delta review replaces a repeat whole-change
|
|
124
|
+
review; it never replaces the required gates, which run on the merged state.
|
|
111
125
|
|
|
112
126
|
Do not start a follow-up round for advisory findings alone. Fix them only when
|
|
113
127
|
cheap in an existing correction pass; otherwise leave them as Suggestions.
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
6
|
{ "kind": "skill-contains", "value": "../../rules/review-reports.md" },
|
|
7
|
-
{ "kind": "skill-contains", "value": "
|
|
8
|
-
{ "kind": "skill-contains", "value": "
|
|
7
|
+
{ "kind": "skill-contains", "value": "Review each branch whole once" },
|
|
8
|
+
{ "kind": "skill-contains", "value": "review glue only" },
|
|
9
9
|
{ "kind": "skill-contains", "value": "SHA, not from an arbitrary base" },
|
|
10
|
+
{ "kind": "skill-contains", "value": "covers its original base to head" },
|
|
11
|
+
{ "kind": "skill-contains", "value": "an incomplete slot is not a pass" },
|
|
10
12
|
{ "kind": "skill-contains", "value": "Prior: <complete round 1 report, including dismissals and scope limits>" },
|
|
11
13
|
{ "kind": "skill-contains", "value": "3 rounds per work item" },
|
|
12
14
|
{ "kind": "skill-contains", "value": "Never file an issue merely to dispose of advisory feedback" },
|