@cratis/pi 7.130.0 → 7.131.1

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 (23) hide show
  1. package/package/corpus/harnesses/copilot/instructions/browser.instructions.md +4 -2
  2. package/package/corpus/harnesses/copilot/instructions/pull-requests.instructions.md +1 -2
  3. package/package/corpus/rules/browser.md +4 -2
  4. package/package/corpus/rules/general.md +2 -2
  5. package/package/corpus/rules/pull-requests.md +1 -2
  6. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-labels-and-release.md +1 -1
  7. package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +14 -4
  8. package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +37 -23
  9. package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +24 -10
  10. package/package/corpus/skills/cratis-engineering-review-rounds/verification.json +4 -2
  11. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +1 -0
  12. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +3 -0
  13. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +2 -1
  14. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +2 -2
  15. package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +1 -1
  16. package/package/corpus/skills/cratis-screenplay-read-surface/references/screen-patterns.md +5 -0
  17. package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +1 -1
  18. package/package/corpus/skills/cratis-screenplay-specifications/references/source-notes.md +2 -1
  19. package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +3 -2
  20. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +3 -1
  21. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +2 -2
  22. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +3 -3
  23. 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, close idle browsers, and look for stale tabs from
20
- other sessions before opening one.
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
- - Group small related changes into one branch and one PR; see the skill for consolidation and the release-action windows.
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, close idle browsers, and look for stale tabs from
19
- other sessions before opening one.
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
- Don't interrupt with questions the repository can answer. Make reversible implementation choices and report them rather than asking the user to approve an implementation plan they already asked you to carry out. Once the user authorizes an action, do not ask them to authorize it again unless the target or consequence materially changes. Ask only when the answer can't be found locally, reasonable product or domain choices have meaningfully different consequences, a consequential effect was not included in the request, the change is hard to reverse and its scope is unclear, or the user asked for checkpoints.
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
- When a question is necessary, write it for the person doing the work, not for the governance system: explain the concrete choice, why it matters now, the consequence of each option, and the recommended option in plain language. Never present unexplained internal labels such as "execution authority," "capability contract," "delegation architecture," "operation profile," or "decider." Do not bundle unrelated verdicts. Ask who should be named in a durable decision record only after explaining that a significant decision has been made and why preserving it is warranted; a decision record is never a prerequisite for carrying out the user's direct request.
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
- - Group small related changes into one branch and one PR; see the skill for consolidation and the release-action windows.
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).
@@ -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 requests when the changes are genuinely unrelated, when one is urgent and the others are not, or when one is risky enough to want its own revert.
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. Rerun a job only for a diagnosed flake, including a demonstrated transient
138
- infrastructure failure, and only after the run completes. For example,
139
- `gh run rerun <id> --repo OWNER/REPO --failed` retries failed jobs. Watch the
140
- resulting attempt once. A deterministic failure needs a fix, not a retry.
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. Related work goes into
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 related, ready deliveries under one candidate and one PR. Check with
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 candidate per repository by default. Apply the split criteria in
71
- `pull-requests.md` for unrelated work, different risk, or an urgent fix. Name
72
- the exception in the reviewer comment; a major awaiting human confirmation
73
- must not silently hold unrelated safe work indefinitely.
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
- ## Size by readiness, then freeze
111
+ ## Cadence, then freeze
107
112
 
108
- Before the final gate, list in-flight deliveries and their expected readiness.
109
- Hold the cut for work expected ready within about one gate duration, so the
110
- assembled gate runs once on the larger set. Cut without work further out or
111
- blocked on a design decision, consumer proof, or another repository.
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 and readiness estimates in one line in the reviewer comment,
118
- not the release note: `Cut with A and B; C waits for consumer proof.` Keep local
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
- - Drop an item that has been stuck for about two hours rather than holding the
132
- candidate; it joins the next one.
133
- - Cut a candidate at least every few hours with whatever is green.
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. **Whole change reviewed.** The candidate has a completed review without
147
- Blockers or missing required evidence. Targeted delivery reviews alone do
148
- not satisfy this condition.
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
- - **One PR per delivery:** duplicate gates and fragmented releases replace an
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 whole-change review, fresh discussion, and main-overlap check.
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
- - Run one quick round per delivery. A second is warranted only after a blocker,
26
- not to seek reassurance or eliminate suggestions.
27
- - Run one whole-change review per PR on the assembled change. Quick delivery
28
- rounds do not replace it. Start whole-change inspection in parallel with the
29
- gate when possible, but keep it provisional: required gates must pass before
30
- an approval report is finalized. Do not launch duplicate gates for review.
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 follows a whole-change review and reviews from the last reviewed
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; a bounded loop does
110
- not replace the final independent whole-change review or full required gates.
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": "Run one quick round per delivery" },
8
- { "kind": "skill-contains", "value": "Run one whole-change review per PR" },
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" },
@@ -59,6 +59,7 @@ A todo list + reaction + unique constraint proves the first. It does **not** pro
59
59
  the send can succeed and the append fail (crash, lost reply, constraint race), and the retry
60
60
  sends again.
61
61
 
62
+ - A specification runs its own slice only: to prove an automation that invokes another slice's command, state `then invokes <Command>` with the values passed (ESM v34); that command's own slice states its events. A command spec never states what another slice's reaction appends.
62
63
  - A reaction cascade is not one transaction: earlier accepted facts stay when a later invoked
63
64
  command rejects (Screenplay `reactions.md`). Design each step to be retried on its own.
64
65
  - Read `references/effects-and-idempotency.md` when specifying redelivery,
@@ -178,6 +178,9 @@ append without `when` holds on any change, not on every delivery. Maps apply to
178
178
  before and after states; `$.field` reads the mapped merged state. An expression
179
179
  guard evaluates the after state only on a change. Root `when removed` never holds.
180
180
 
181
+ A command's specification never states the public event an outbound Translate slice publishes
182
+ (`PLAY0285`, decision 0115); the outbound slice's own specification does.
183
+
181
184
  Captures run after reactions to the same input settle; each capture append settles
182
185
  its own cascade before the next. Mixed capture/reaction assertions may need
183
186
  `then events in any order`: reference order does not prove independent observer
@@ -9,7 +9,8 @@ The CLI and Stage render supported event-triggered Automation slices as Chronicl
9
9
  reactors. Translate/captures, non-event triggers and opaque bodies remain `STAGE-ESM-024`;
10
10
  Claim-reading/opaque `runs as` gates (`-034`), legacy `from` (`-035`), mixed effects (`-037`), unsupported mappings (`-039`)
11
11
  and protected destinations (`-040`) also remain refused. Command specs that cascade into
12
- reactions remain `-011`; supported single-hop append specs now render, as do semantic
12
+ reactions remain `-011`. Specifications that state the commands their reactions invoke
13
+ (`then invokes`, ESM v34) are not yet admitted either: check current boundaries. Supported single-hop append specs now render, as do semantic
13
14
  reaction `from` and role/authenticated system identities. Only refused scope is hand-written delivery with the model as
14
15
  its contract. Source: Stage `Documentation/reference/reaction-rendering.md`;
15
16
  full admission: `cratis-stage-rendering-and-sandbox` `references/admission.md`.
@@ -28,7 +28,7 @@ Language claims follow Screenplay `reactions.md`, `triggers.md`, `captures.md` a
28
28
 
29
29
  The compiler's ESM admission decides, not the slice type. Reactions, triggers and
30
30
  captures bind/reference-execute from v6; older compilers refuse them. Read toolchain
31
- `references/diagnostics.md` when diagnosing skew or false PLAY0285 cascades.
31
+ `references/diagnostics.md` when diagnosing skew or `PLAY0285`/`PLAY0816` on a specification.
32
32
  - **Stage realization:** read `cratis-stage-rendering-and-sandbox` `references/admission.md`
33
33
  before claiming rendering. Supported event-triggered Automation renders; captures,
34
34
  Translate, clocks and opaque bodies remain gap-fill (`-024`).
@@ -225,7 +225,7 @@ Requires Screenplay 4.176.0 or later (`screenplay --version`) for PLAY0694; olde
225
225
 
226
226
  - [ ] `screenplay <model> --warnaserror` reports zero errors and zero warnings
227
227
  (standalone, or a `cratis` whose compiler admits ESM v6). Under an older compiler expect
228
- `PLAY0268` at binding and a false `PLAY0285` on cascade specifications, and report them
228
+ `PLAY0268` at binding, and `then invokes` unreadable before 4.246.0 (ESM v34); report them
229
229
  as tool skew.
230
230
  - [ ] The tool that bound the model is named (standalone, or a `cratis` whose compiler admits ESM v6, for ESM v6 constructs); reference scenarios use
231
231
  `screenplay test`/MCP. Unadmitted refusal/redelivery is not executed evidence.
@@ -40,7 +40,7 @@ V2 executable diagnostics: <clean | n diagnostics: codes | not run: reason>
40
40
  V3 binding-ready: <ready | blocked: codes | not run: reason>
41
41
  V4 reference specs run: <route, expected vs discovered, passed/failed/unsupported; overall unbound | not run: no route>
42
42
  V5 rendered, target-verified: admission <...>; publication <...>; build <...>; tests <...> (each "not run: reason" when absent)
43
- Gaps: <capability gaps and tool-version gaps, e.g. a false PLAY0285 on cascades from a cratis before 3.28.2 bundle>
43
+ Gaps: <capability gaps and tool-version gaps, e.g. `then invokes` unreadable by a compiler older than 4.246.0>
44
44
 
45
45
  ## Inventory (read-only audit; MCP describe-application view=summary, find-assertion-gaps)
46
46
  Modules n, features n, slices n (StateChange n, StateView n, Automation n, Translate n),
@@ -118,6 +118,11 @@ module Berths
118
118
  action BookBerth for screen
119
119
  ```
120
120
 
121
+ State what an action acts on: `action CancelBooking for item` acts on the selected row or the record the screen shows,
122
+ `action BookBerth for screen` does not depend on a selection. An omitted subject is inferred from the declared data
123
+ and identifier types and reported as `PLAY0818` (and `PLAY0819` when the row binding differs from legacy name matching),
124
+ so write the clause. Source: Screenplay v5.1.0 `Documentation/screenplay/action-subjects.md`.
125
+
121
126
  ## What a screen pattern is not
122
127
 
123
128
  - Not a column or a lane: a screen is a declaration in a slice, not a position on a timeline.
@@ -29,7 +29,7 @@ projection is the fact's occurrence time: the reference runner executes it in `f
29
29
  **Which tools bind these actions.** A compiler that admits ESM v6 binds the clock, trigger
30
30
  and capture actions, and the `Automation` and `Translate` slices, reactions and captures they
31
31
  drive; the reference runner executes them through `screenplay test` or MCP `run-specifications`,
32
- with the semantics in [Reactions and cascades](reactions-and-cascades.md). The complete example in
32
+ with the semantics in [Reactions and one slice per specification](reactions-and-cascades.md). The complete example in
33
33
  that reference reports `executableReady` with no executable error in `open-workspace` readiness
34
34
  and `read-workspace` view `executable-diagnostics`.
35
35
 
@@ -16,7 +16,8 @@ Actions beyond commands (`given clock`, `when clock`, `when trigger`, `given cap
16
16
  | Parser, binder and reference execution | Original evidence for the worked example |
17
17
  | Inline facts, `optional` and clock spelling | Changed examples compile; the reference runner was not rerun for them |
18
18
  | ESM v7 | Generated fixtures and `then returns` (`specifications.md` "Generated fixtures and return expectations"): the excerpt matches the compiled example in `cratis-screenplay-toolchain`, whose specifications run in the reference runner |
19
- | ESM v6 | Specification actions and reaction cascades, `then no readmodel`, `$strings` rejections, `invokes` caller rule |
19
+ | ESM v34 | `then invokes`; a specification runs its own slice only (Screenplay decision 0115, `Documentation/screenplay/specifications.md`) |
20
+ | ESM v6 | Specification actions and same-slice reactions, `then no readmodel`, `$strings` rejections, `invokes` caller rule |
20
21
 
21
22
  The inline-facts update followed `commands.md`, `events.md`, `types.md` and
22
23
  `specifications.md`. That pass compiled the changed examples; it did not rerun the reference
@@ -13,7 +13,7 @@ This reference holds the given/when/then construct table and the enumeration and
13
13
  | `given readmodel <ReadModelType>` | prior read-model state, established directly — a **complete** instance including its identifier |
14
14
  | `given caller` / `given caller as <Persona>` | explicit caller (`authenticated`, roles, claims; empty means anonymous), or an authenticated synthesized persona witness |
15
15
  | `when <CommandType>` | run a command |
16
- | `when append <EventType>` | append one event: constraints and projections run, the command does not; reactions run only from ESM v6, where `then` lists what followed |
16
+ | `when append <EventType>` | append one event: constraints and projections run, the command does not; only the specification's own slice's reactions run (ESM v6), and `then` lists what followed |
17
17
  | `when query <Query>` | perform a query with the argument values beneath it |
18
18
  | `then result [exactly]` | one expected row of the performed query; repeat for several |
19
19
  | `then no result` | the performed query returns nothing |
@@ -23,7 +23,8 @@ This reference holds the given/when/then construct table and the enumeration and
23
23
  | `given capture` / `when capture <Capture>` | earlier/current records for non-event sources; for `source events` use typed `given <Event>` / `when append <Event>` (PLAY0701) |
24
24
  | `generated <name> = <value>` | beneath `when <Command>`: the fixture for a generated property other than the identifier (ESM v7); `for` beneath the `when` supplies the generated identifier |
25
25
  | `then returns [<value>]` | the command's response (ESM v7): `then returns "<uuid>"` for a scalar, `then returns` with named `field = value` lines for a subset of a record |
26
- | `then <EventType>` | an expected new event |
26
+ | `then <EventType>` | an expected new event of the specification's own slice |
27
+ | `then invokes <Command>` | a command the slice's own reactions invoke, with the values passed beneath it (ESM v34, Screenplay 4.246.0) |
27
28
  | `then events in any order` | compare the new events without regard to order |
28
29
  | `then readmodel <ReadModelType> [exactly]` | read-model state afterwards — must state the identifier |
29
30
  | `then no readmodel <ReadModelType> for <key>` | exactly that keyed instance is absent; the key is concrete and typed |
@@ -396,7 +396,9 @@ or V4 execution. Run the CLI or MCP for those verdicts.
396
396
  | PLAY0282 | `validate` rule targets a field absent from the command |
397
397
  | PLAY0283 | `reads View by field` type matches no `by` param of the view's queries |
398
398
  | PLAY0284 | `children`/`nested` never populates a declared element field |
399
- | PLAY0285 | a spec's `then` event contradicts every possible declared producer of its `when` command (decidable literals, property copies, equality conditions). Fix the model or the spec deliberately. **False positive** on reaction cascades with an older bundled compiler. On an older bundle confirm with the standalone tool, record a tool gap, do not "fix" a correct model |
399
+ | PLAY0285 | a spec's `then` event contradicts every possible declared producer of its `when` command (decidable literals, property copies, equality conditions). Follows only reactions, invocations and publications declared in the specification's own slice (decision 0115), so stating another slice's reaction event or an outbound publication is refused; move the `then` to that slice or state `then invokes <Command>`. Fix the model or the spec deliberately |
400
+ | PLAY0815 | a specification `then invokes` line is not `then invokes <Command>` |
401
+ | PLAY0816 | a specification states `then invokes <Command>`, but no reaction declared in its own slice invokes that command; a specification runs its own slice only, so the invocation can never be made |
400
402
  | PLAY0286 | spec value is not a member of the enum |
401
403
  | PLAY0287 | producer/capture/spec assigns a field the event lacks |
402
404
  | PLAY0291-0294 | bad single-line JSON / unknown key / wrong shape / duplicate key |
@@ -161,10 +161,10 @@ Requires Screenplay 4.105.0 or later (`screenplay --version`) for list queries (
161
161
  due **after** the given clock and **at or before** the when clock, once each, in time
162
162
  order. `when clock` needs `given clock`. Limits: 10,000 occurrences per advance, 1,000
163
163
  facts per scenario. A scenario with given equal to when fires nothing.
164
- - Command specifications that list reaction cascades.
164
+ - Command specifications that list another slice's reaction events (`PLAY0285`; decision 0115).
165
165
  - In a `then` list after `when append`, only what followed the appended event.
166
166
 
167
- Requires Screenplay 4.61 or later (`screenplay --version`) for ESM v6 constructs, and Cratis CLI 3.28.2 or later for the bundled compiler; older compilers refuse them with PLAY0268 and report a false PLAY0285 on cascades.
167
+ Requires Screenplay 4.61 or later (`screenplay --version`) for ESM v6 constructs, and Cratis CLI 3.28.2 or later for the bundled compiler; older compilers refuse them with PLAY0268. `then invokes` needs Screenplay 4.246.0 (ESM v34).
168
168
 
169
169
  Requires Screenplay 4.125.0 or later (`screenplay --version`) for reaction `runs as system`.
170
170
 
@@ -17,9 +17,9 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
17
17
  13. Projection `key` routes only on `from` (projection-level: PLAY0381). `all` is per event source. Joins never create instances and match the joined event's source id.
18
18
  14. AutoMap is on by default: same-named event properties fill read-model properties silently (scoped: case-insensitive, same type only; flat-bound: exact name, no type check, so a type mismatch invalidates the model). Use `no automap` for control.
19
19
  15. `given readmodel` bypasses the projection; prove a projection with `given` events + `when append`/command + `then readmodel`/`then query`.
20
- 16. PLAY0285/0286/0287 are static spec checks: do not edit expectations blindly. An older bundled compiler can report PLAY0285 falsely on reaction cascades; confirm with the standalone tool before changing a `then`.
20
+ 16. PLAY0285/0286/0287 are static spec checks: do not edit expectations blindly. A spec runs its own slice only (decision 0115): PLAY0285 on an event another slice's reaction appends is correct, so move the `then` to that slice or state `then invokes <Command>` (ESM v34, PLAY0815/0816).
21
21
  17. `null` in specs only for optional read-model properties (PLAY0350). A `when` command or `then` event states every property with a concrete value, optional ones too (PLAY0524); whether an optional detail is really a separate fact is a review question, not the fix for this code.
22
- 18. `then` events are exhaustive and ordered (use `then events in any order` for order only). From ESM v6 they include reaction cascades; after `when append` they list only what followed the append.
22
+ 18. `then` events are exhaustive and ordered (use `then events in any order` for order only). They are the facts of the specification's own slice (its reactions follow, other slices' do not); after `when append` they list only what followed the append.
23
23
  19. Under `command reads protected`, omitted `by` uses the command identifier; absent identifier is PLAY0782. Eligible reads bind v25; legacy reads and `concurrency` retain PLAY0271. Combining reads/concurrency under opt-in is PLAY0783.
24
24
  20. Declare each event once, in its producing slice; renaming a persisted event needs `id "OldName"`; renaming a constraint discards its index.
25
25
  21. Quoted `import "x/*.play"` = my files; unquoted `import Ctx.Event` = another context's contract (does not bind: PLAY0268).
@@ -36,7 +36,7 @@ Compiler syntax: `cheat-sheet.md`. Negative capability claims depend on the tool
36
36
  30. Claims compare with `matches` (`claim "dept" matches "Finance"`); `==` is PLAY0120. Conditions with `contains`/`starts with` compile but do not bind.
37
37
  31. One `every`/`all` block per projection level for V3; `$eventContext.occurred.Week` does not bind.
38
38
  32. Concept rules: `min`/`max`/`length ==`, not `length 3 to 10` (PLAY0141).
39
- 33. Which compiler matters: an older cratis bundle can reject constructs the standalone tool binds (ESM v6 Automation/Translate) and report a false PLAY0285 on cascades. Check `cratis --version` and name the tool in every verdict.
39
+ 33. Which compiler matters: an older cratis bundle can reject constructs the standalone tool binds (ESM v6 Automation/Translate) and cannot read `then invokes` (ESM v34). Check `cratis --version` and name the tool in every verdict.
40
40
 
41
41
  34. A `from <Event> key <property>` routes only if every such event carries that property: an event that frees or updates a row keyed by another stream's id must carry that id in its payload, or the row never changes. The compiler may not report a missing key property; check by hand.
42
42
  35. `description`/`documentation` are authoring metadata: board, MCP and Prologue show them; `cratis render` emits them only as XML doc comments (invalid XML characters are CLI-RENDER-005), never as behavior. A rule only in prose is unenforced in rendered code; make it a rule layer, a spec or a recorded target requirement.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.130.0",
3
+ "version": "7.131.1",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [