@cratis/pi 7.129.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.
Files changed (67) hide show
  1. package/package/corpus/agents/coordinator.md +1 -1
  2. package/package/corpus/agents/orchestrator.md +1 -1
  3. package/package/corpus/agents/planner.md +1 -1
  4. package/package/corpus/harnesses/copilot/instructions/browser.instructions.md +4 -2
  5. package/package/corpus/harnesses/copilot/instructions/csharp.instructions.md +2 -2
  6. package/package/corpus/harnesses/copilot/instructions/framework.instructions.md +1 -1
  7. package/package/corpus/harnesses/copilot/instructions/orleans.instructions.md +2 -1
  8. package/package/corpus/harnesses/copilot/instructions/pull-requests.instructions.md +2 -3
  9. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +1 -1
  10. package/package/corpus/harnesses/pi/agents/coordinator.md +1 -1
  11. package/package/corpus/harnesses/pi/agents/orchestrator.md +1 -1
  12. package/package/corpus/harnesses/pi/agents/planner.md +1 -1
  13. package/package/corpus/harnesses/pi/extensions/cratis-hooks/index.ts +1 -1
  14. package/package/corpus/hooks/README.md +17 -5
  15. package/package/corpus/hooks/pre-commit.md +2 -2
  16. package/package/corpus/hooks/scripts/cratis-quality-gate.sh +1 -0
  17. package/package/corpus/hooks/scripts/cratis-run-specs.sh +147 -0
  18. package/package/corpus/hooks/scripts/quality-gates.json +5 -7
  19. package/package/corpus/rules/browser.md +4 -2
  20. package/package/corpus/rules/csharp.md +2 -2
  21. package/package/corpus/rules/framework.md +1 -1
  22. package/package/corpus/rules/general.md +2 -2
  23. package/package/corpus/rules/orleans.md +2 -1
  24. package/package/corpus/rules/pull-requests.md +2 -3
  25. package/package/corpus/rules/specs.csharp.md +1 -1
  26. package/package/corpus/skills/binlog-generation/SKILL.md +1 -1
  27. package/package/corpus/skills/coverage-analysis/references/setup-discovery.md +1 -1
  28. package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +1 -1
  29. package/package/corpus/skills/cratis-arc-command-execution/references/command-refusals.md +1 -1
  30. package/package/corpus/skills/cratis-arc-command-execution/references/occurrence-commands.md +1 -1
  31. package/package/corpus/skills/cratis-arc-command-operation/references/testing.md +1 -1
  32. package/package/corpus/skills/cratis-arc-command-validation/references/input-binding.md +1 -1
  33. package/package/corpus/skills/cratis-arc-command-validation/references/validation-severity.md +1 -1
  34. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/immediate-append-refusal.md +1 -1
  35. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/occurrences.md +1 -1
  36. package/package/corpus/skills/cratis-chronicle-event-constraints/references/storage-uniqueness.md +1 -1
  37. package/package/corpus/skills/cratis-chronicle-event-specifications/SKILL.md +1 -1
  38. package/package/corpus/skills/cratis-chronicle-event-type-migration/references/explicit-migrations.md +1 -1
  39. package/package/corpus/skills/cratis-chronicle-reactor/references/starting-and-replaying.md +1 -1
  40. package/package/corpus/skills/cratis-chronicle-read-model/references/collection-observation.md +1 -1
  41. package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +1 -1
  42. package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +1 -1
  43. package/package/corpus/skills/cratis-ci-pipeline-performance/references/build-once-and-shard.md +7 -3
  44. package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +1 -1
  45. package/package/corpus/skills/cratis-ci-pipeline-performance/references/test-setup-cost.md +1 -1
  46. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-labels-and-release.md +2 -2
  47. package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +17 -6
  48. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +5 -1
  49. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/worked-examples.md +17 -8
  50. package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +37 -23
  51. package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +24 -10
  52. package/package/corpus/skills/cratis-engineering-review-rounds/verification.json +4 -2
  53. package/package/corpus/skills/cratis-orchestration-lanes/references/context-handoff.md +1 -1
  54. package/package/corpus/skills/cratis-orchestration-lanes/references/lane-brief.md +2 -2
  55. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +2 -2
  56. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +4 -3
  57. package/package/corpus/skills/cratis-screenplay-toolchain/references/fast-path.md +1 -1
  58. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +1 -1
  59. package/package/corpus/skills/cratis-specifications-csharp/references/running-specs.md +7 -3
  60. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +2 -1
  61. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +1 -1
  62. package/package/corpus/skills/csharp-refactoring/SKILL.md +2 -2
  63. package/package/corpus/skills/eliminate-redundant-restores/SKILL.md +2 -1
  64. package/package/corpus/skills/filter-syntax/SKILL.md +1 -1
  65. package/package/corpus/skills/msbuild/references/build-perf-baseline.md +4 -1
  66. package/package/corpus/skills/run-tests/SKILL.md +9 -0
  67. package/package.json +1 -1
@@ -229,6 +229,6 @@ assert the value can be claimed again.
229
229
  ## How it is proven
230
230
 
231
231
  `dotnet build` in Debug (which compiles the `#if DEBUG` specification code) and
232
- `dotnet test`, both clean. A constraint specification is only meaningful if it
232
+ the owning project's built spec executable (see [specs.csharp](../../rules/specs.csharp.md)), both clean. A constraint specification is only meaningful if it
233
233
  has been seen to fail: remove the seeding `Given` once and confirm the
234
234
  specification goes red before trusting it green.
@@ -41,6 +41,6 @@ the store-local alias. Custom schema generators resolving explicit compensation
41
41
  targets need the registry-aware overloads or throw
42
42
  `RegistryAwareEventTypeSchemasNotSupported`.
43
43
 
44
- Run `dotnet build -c Debug` and migration specs with `dotnet test`; assert both
44
+ Run `dotnet build -c Debug` and migration spec executables (see [specs.csharp](../../../rules/specs.csharp.md)); assert both
45
45
  directions and real observer delivery where pinning or protected-value release
46
46
  matters. A successful nomination alone does not prove a generation can be read.
@@ -29,5 +29,5 @@ handler is still subscribed to.
29
29
 
30
30
  Verify first registration, restart with an existing position, replay and
31
31
  failed-partition redelivery separately. Assert the external effect count, not
32
- only that the handler was invoked. Run `dotnet test` on the owning spec project;
32
+ only that the handler was invoked. Run the owning spec project's built executable (see [specs.csharp](../../../rules/specs.csharp.md));
33
33
  server-first compatibility and durable positions also need kernel integration.
@@ -41,7 +41,7 @@ pretending observation succeeded.
41
41
 
42
42
  ## Verify
43
43
 
44
- Run `dotnet build -c Debug` and `dotnet test` for the owning query specs. Cover
44
+ Run `dotnet build -c Debug` and the owning query spec executable (see [specs.csharp](../../../rules/specs.csharp.md)). Cover
45
45
  empty, add, update, remove, filter exit and disposal.
46
46
  Requires Arc 22.87.0 for Chronicle observations in `QueryScenario`.
47
47
  Requires Arc 22.91.1 with Chronicle 19.59.1 for default-mode children/joins/reducers. Scenario rebuilds do
@@ -283,6 +283,6 @@ Read `references/view-lifecycle-checks.md` when delivering a read model from a c
283
283
 
284
284
  ## How it is proven
285
285
 
286
- `dotnet build` in Debug and `dotnet test`, both clean. A projection
286
+ `dotnet build` in Debug and the owning project's built spec executable (see [specs.csharp](../../rules/specs.csharp.md)), both clean. A projection
287
287
  specification is only meaningful once it has been seen to fail: drop one seeded
288
288
  event and confirm the assertion goes red before trusting it green.
@@ -75,7 +75,7 @@ named reference before applying one.
75
75
  **Build once, shard the tests.** Fits execution-bound workflows where build and
76
76
  tests run serially or several jobs each rebuild. Default: one job builds in
77
77
  `Release`, uploads the output with `actions/upload-artifact`, and a matrix of shard jobs downloads it and runs
78
- `dotnet test --no-build`. Pitfall: a shard whose filter matches nothing still
78
+ each built spec executable; only VSTest projects use `dotnet test <project> --no-build`. Pitfall: a shard whose filter matches nothing still
79
79
  passes, so assert that every shard ran tests. Read
80
80
  `references/build-once-and-shard.md` when applying or reviewing this.
81
81
 
@@ -75,15 +75,19 @@ jobs:
75
75
  with:
76
76
  name: build-output
77
77
  - run: tar --zstd -xf build-output.tar.zst
78
+ # Example assumes each xUnit v3 mtp-off AssemblyName matches its directory.
79
+ # Use evaluated TargetPath for custom outputs; TUnit/native runners need their own report flags.
80
+ # Only VSTest uses dotnet test <project> --no-build --configuration Release with --logger/--results-directory.
78
81
  - name: Test the shard's projects
79
82
  env:
80
83
  PROJECTS: ${{ matrix.projects }}
81
84
  run: |
82
85
  failed=0
83
86
  for project in $PROJECTS; do
84
- dotnet test "$project" --no-build --configuration Release \
85
- --logger "trx;LogFileName=$(basename "$project").trx" \
86
- --results-directory "$RUNNER_TEMP/test-results" || failed=1
87
+ mkdir -p "$RUNNER_TEMP/test-results"
88
+ # xUnit v3 mtp-off example: resolve each project's actual AssemblyName/TFM.
89
+ "$project/bin/Release/net10.0/$(basename "$project")" \
90
+ -trx "$RUNNER_TEMP/test-results/$(basename "$project").trx" || failed=1
87
91
  done
88
92
  exit "$failed"
89
93
  - name: Verify every project ran tests
@@ -24,7 +24,7 @@ cost runner-minutes and developer trust; diagnose before retrying.
24
24
  ## Find hangs and crashes in .NET
25
25
 
26
26
  ```bash
27
- dotnet test Repo.slnx --configuration Release --no-build \
27
+ dotnet test VSTest.Specs.csproj --configuration Release --no-build \
28
28
  --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type mini \
29
29
  --blame-crash --blame-crash-dump-type mini \
30
30
  --results-directory TestResults
@@ -32,7 +32,7 @@ Measure before guessing, with the language's profiler on the test process:
32
32
 
33
33
  ```bash
34
34
  dotnet tool install --global dotnet-trace
35
- dotnet-trace collect --format speedscope -- dotnet test Project.Specs --no-build --configuration Release
35
+ dotnet-trace collect --format speedscope -- ./<project-dir>/bin/Release/<TFM>/<AssemblyName>
36
36
  ```
37
37
 
38
38
  Read the inclusive time of the setup methods. Pass means the profile names the
@@ -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
 
@@ -81,7 +81,7 @@ Documentation-only changes use repository-supported non-release intent, ordinari
81
81
  Before marking code/automation work ready, select the affected-project gates that apply from the following list; run wider checks for cross-cutting changes and repository-required merge/release gates:
82
82
 
83
83
  - `dotnet build`: zero errors, zero warnings
84
- - `dotnet test`: all specs pass
84
+ - Built C# spec executables: all specs pass; `dotnet test <project> --no-build` only for VSTest (see specs.csharp)
85
85
  - `yarn lint`: zero errors
86
86
  - `npx tsc -b`: zero TypeScript errors
87
87
  - Code follows all project coding standards and conventions
@@ -81,8 +81,9 @@ a red run to discover the next failure.
81
81
 
82
82
  Several agents, worktrees or builds often share one machine. Keep it responsive:
83
83
 
84
- - Cap parallelism, for example `dotnet build -m:2`, `dotnet test -m:2` with the
85
- spec runner's thread limit, and `vitest run --maxWorkers=2`.
84
+ - Cap parallelism, for example `dotnet build -m:2`, built spec executables with their
85
+ runner-specific thread limit, and `vitest run --maxWorkers=2`. Do not pass MSBuild
86
+ `-m` to executables; `dotnet test <project> --no-build -m:2` is VSTest-only.
86
87
  - Run one heavy phase at a time (build, then specs, then frontend lint and
87
88
  tests), never several at once.
88
89
  - Do not start a heavy phase while another agent's runs in the same machine's
@@ -133,10 +134,20 @@ After the run completes with a failure:
133
134
  3. Fix all in-scope causes together. Report unrelated or unavailable causes as
134
135
  blockers rather than silently waiving them. Re-run the required local gate
135
136
  on the fixed state, then push once when the request authorizes it.
136
- 4. Rerun a job only for a diagnosed flake, including a demonstrated transient
137
- infrastructure failure, and only after the run completes. For example,
138
- `gh run rerun <id> --repo OWNER/REPO --failed` retries failed jobs. Watch the
139
- 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.
140
151
 
141
152
  Never put a CI skip token in a title or commit. Do not spend a push on each
142
153
  individual fix or use CI to discover whether speculative fixes compile.
@@ -162,9 +162,13 @@ From the consumer root, with the printed NuGet environment sourced:
162
162
 
163
163
  ```bash
164
164
  dotnet build path/to/consumer.slnx -c Release -warnaserror
165
- dotnet test path/to/Integration.csproj -c Release --no-build --filter '<regression>'
165
+ ./<integration-project-dir>/bin/Release/<TFM>/<AssemblyName> <runner-specific-filter>
166
166
  ```
167
167
 
168
+ Resolve the integration project's actual built spec entrypoint and filter syntax with
169
+ [running-specs](../cratis-specifications-csharp/references/running-specs.md); without
170
+ apphost use `dotnet <TargetPath.dll>`. Only VSTest uses `dotnet test <project> -c Release
171
+ --no-build --filter '<regression>'`. Keep the sourced local NuGet environment.
168
172
  Substitute the repository's actual commands; for frontend fixes run build, lint,
169
173
  specs and the previously broken UI action. Pass: the reproducing spec/action now
170
174
  succeeds, at least one intended filtered spec actually ran, and the consumer's
@@ -50,10 +50,14 @@ step. Apply the entry point's check/restore/cleanup sequence to both repositorie
50
50
  export CHRONICLE_KERNEL_VERSION="$stamp"
51
51
  cd "$consumer"
52
52
  dotnet build path/to/Studio.slnx -c Release -p:StudioFullBuild=true -warnaserror
53
- dotnet test Source/Integrations/Specs/Specs.csproj -c Release --no-build \
54
- --filter '<regression>'
53
+ ./<integration-project-dir>/bin/Release/<TFM>/<AssemblyName> <runner-specific-filter>
55
54
  ```
56
55
 
56
+ Resolve the actual output and filter for `Source/Integrations/Specs/Specs.csproj`
57
+ via [running-specs](../../cratis-specifications-csharp/references/running-specs.md).
58
+ Without apphost use `dotnet <TargetPath.dll>`; only VSTest uses
59
+ `dotnet test <project> -c Release --no-build --filter '<regression>'`.
60
+ Inspect the current consumer workflow before claiming CI equivalence.
57
61
  Studio defaults kernel selection to the client version when the environment
58
62
  override is absent. Ensure logs show the stamped local image. Local Debug
59
63
  Studio builds skip analyzers; use `-p:StudioFullBuild=true` to match CI analyzer
@@ -83,9 +87,11 @@ bash "$local" use-nuget "$arc" "$stamp"
83
87
  Gates (Arc `dotnet-build.yml`), run in this order after sourcing the printed env:
84
88
  `yarn install --immutable`; in `Source/DotNET/Screenplay.Embedded`: `npm ci --workspaces=false`,
85
89
  `npm run typecheck`, `npm test`, `npm run build`; `dotnet build --configuration Release
86
- -p:CratisSpecsTargetFramework=net10.0`; then `dotnet test <project> --no-build --configuration
87
- Release --framework net10.0` for each project that `python3 scripts/ci-test-shards.py projects
88
- --shard specs-N` prints. Finish by listing Arc's `obj/project.assets.json` files for the stamp.
90
+ -p:CratisSpecsTargetFramework=net10.0`; then each project's evaluated Release/net10.0
91
+ spec executable (or `dotnet <TargetPath.dll>` without apphost) for each project that
92
+ `python3 scripts/ci-test-shards.py projects --shard specs-N` prints. Only identified
93
+ VSTest projects use `dotnet test <project> --no-build --configuration Release --framework
94
+ net10.0`. Inspect the current consumer workflow before claiming equivalence. Finish by listing Arc's `obj/project.assets.json` files for the stamp.
89
95
 
90
96
  - Pass: the Fundamentals IDs in `project.assets.json` are at the stamp, build has 0 warnings and 0 errors, 18 spec projects run and none fail.
91
97
  - Time: pack about 4 min, build about 6 min, the spec projects about 18 min.
@@ -134,9 +140,12 @@ bash "$local" use-nuget "$direct" "$stamp"
134
140
  ```
135
141
 
136
142
  Gates (Direct `build.yml`): `dotnet build Source/Direct/Direct.csproj -c Release
137
- -p:DisableProxyGenerator=true`, the same in Debug with `-warnaserror`, `dotnet test` of that
138
- project with `--no-build`, and `dotnet test Source/Assurance/Assurance.csproj`. Then
139
- check `project.assets.json`. Image-based specs also need the producer image tag.
143
+ -p:DisableProxyGenerator=true`, the same in Debug with `-warnaserror`, then the project's
144
+ verified built Debug spec entrypoint. Build `Source/Assurance/Assurance.csproj` in the
145
+ matching configuration and run its verified spec entrypoint too; do not guess assembly
146
+ names or start an application server. See [running-specs](../../cratis-specifications-csharp/references/running-specs.md);
147
+ only VSTest uses `dotnet test <project> --no-build` in that configuration. Inspect the
148
+ current consumer workflow before claiming equivalence. Then check `project.assets.json`. Image-based specs also need the producer image tag.
140
149
 
141
150
  - Pass for a consumer whose pins lag the producer: every Chronicle ID is in the feed at the
142
151
  stamp, the Release build with the owner's floors passes, and `project.assets.json` shows every
@@ -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,7 +59,7 @@ Cap export retries at five and surface the final failure.
59
59
 
60
60
  ## Verified facts (with evidence)
61
61
  - Cap and spec committed: `git log -1` shows the SHA above.
62
- - Spec project passes: `dotnet test Source/Export.Specs` exit 0 at that SHA.
62
+ - Spec project passes: `./Source/Export.Specs/bin/Debug/net10.0/Export.Specs` exit 0 at that SHA.
63
63
  - Pull request is open: `gh pr list --head export-retry` shows one entry; CI run
64
64
  `1234567890` is in progress.
65
65
 
@@ -60,12 +60,12 @@ C# rules.
60
60
  **Decisions already made:** the cap is five and is a constant, not
61
61
  configuration.
62
62
 
63
- **Gate command:** `dotnet test Source/Export.Specs`.
63
+ **Gate command:** `./Source/Export.Specs/bin/Debug/net10.0/Export.Specs`.
64
64
 
65
65
  **Done =**
66
66
  - [ ] A failing upload stops after five attempts and reports the error
67
67
  - [ ] A spec covers the fifth failure and a success on the third attempt
68
- - [ ] `dotnet test Source/Export.Specs` exits 0
68
+ - [ ] `./Source/Export.Specs/bin/Debug/net10.0/Export.Specs` exits 0
69
69
  - [ ] `git diff --stat` shows only the owned files
70
70
 
71
71
  **Stop and report if:** a public type must change, or another file needs edits.
@@ -33,8 +33,8 @@ per tool call and read each result from its exit status, never from a grep of th
33
33
  | Drift or pending-change check | the same command plus `--check` (and `--scope`, `--force` as used) | no write, no recovery: exit 0 current, 6 `changes_pending`, 5 planning failure, refusal or pending recovery |
34
34
  | Bundled-binder check | `cratis screenplay validate --executable <root>` | exit 5 with "does not bind into an executable semantic model" when it does not; never renders or writes. Uses the bundled compiler, not the standalone pin |
35
35
  | Debug build | `dotnet build <dir>/<Project>.csproj -c Debug` | the build's exit status |
36
- | Debug tests | `dotnet test <dir>/<Project>.csproj -c Debug --no-build` | the test runner's exit status plus per-test results |
37
- | List the generated classes | `dotnet test <dir>/<Project>.csproj -c Debug --no-build --list-tests` | the names to map to specifications |
36
+ | Debug tests | `dotnet test <dir>/<Project>.csproj -c Debug --no-build` after the Debug build (Stage-rendered apps use VSTest) | the test runner's exit status plus per-test results |
37
+ | List the generated classes | `dotnet test <dir>/<Project>.csproj -c Debug --no-build --list-tests` | the names to map to specifications; listing is not execution |
38
38
 
39
39
  `<Project>` is the project name the render used: the `--project-name` value when one was given,
40
40
  otherwise the application name. Confirm it from the published `*.csproj` in the destination
@@ -284,8 +284,9 @@ For view specifications:
284
284
  ## Run the specs before calling the work done
285
285
 
286
286
  Symptom: a model delivered with specifications that were never run. `screenplay test <root>` runs the
287
- reference evaluator; after a render, run `dotnet test` (Debug) in the destination for the generated
288
- specification classes. Report both results separately (`cratis-screenplay-toolchain` V4 and V5.tests); a
287
+ reference evaluator; after rendering and building in Debug, run `dotnet test <destination>/<Project>.csproj -c Debug --no-build`
288
+ for the generated specification classes (Stage-rendered apps use VSTest). Run a built spec executable only where spec projects are executables
289
+ (see [specs.csharp](../../rules/specs.csharp.md)). Report both results separately (`cratis-screenplay-toolchain` V4 and V5.tests); a
289
290
  build that succeeds is not a test run, and `unbound`/`unsupported` is not a pass.
290
291
 
291
292
  ## Verify
@@ -293,7 +294,7 @@ build that succeeds is not a test run, and `unbound`/`unsupported` is not a pass
293
294
  - [ ] Validate the complete root with warnings as errors, naming tool/version.
294
295
  Standalone tool version: `cratis-screenplay-toolchain/SKILL.md`. Run specification examples through
295
296
  `screenplay test`; expected unadmitted syntax reports unbound, not passed.
296
- - [ ] `screenplay test` and, after a render, `dotnet test` were run and their counts reported.
297
+ - [ ] `screenplay test` and, after a Debug render and build, the `dotnet test` above were run and their counts reported.
297
298
  - [ ] Executable diagnostics are clean too: `PLAY0350`, `PLAY0352`, `PLAY0388`,
298
299
  `PLAY0389` and `PLAY0273` are only reported at binding.
299
300
  - [ ] Every slice has at least one boundary specification.
@@ -24,7 +24,7 @@ Run these in order and stop at the first failure; each step catches what the one
24
24
  run one create command and one query, and read the console for errors. The check is the app, not the build:
25
25
  a screen reported as `PLAY0269` (deferred from the backend profile, information only) is not evidence that
26
26
  it was rendered. List any authored screen that is absent as not rendered; do not call it delivered.
27
- 10. **Specs:** `dotnet test` in `<dir>` (the generated specifications) and `screenplay test <root>`; see
27
+ 10. **Specs:** after the Debug build, `dotnet test <dir>/<Project>.csproj -c Debug --no-build` (Stage-rendered apps use VSTest) and `screenplay test <root>`; see
28
28
  `cratis-screenplay-specifications`.
29
29
 
30
30
  The rendered `README.md` repeats steps 6-8 for the pinned scaffold. Re-render and gap-fill rules:
@@ -227,7 +227,7 @@ results, plus runtime when it was exercised:
227
227
  2. **Publication**: what was written, unchanged or refused (`.cratis-render.json`,
228
228
  `.cratis-render/journal.json`; `recovered: true` means stop and reconcile).
229
229
  3. **Build**: Debug build of the destination (`dotnet build`).
230
- 4. **Tests**: Debug tests of the destination (`dotnet test`). Generated specifications are
230
+ 4. **Tests**: After the Debug build, run `dotnet test <destination>/<Project>.csproj -c Debug --no-build` for Stage-rendered apps (VSTest). Use a built spec executable only in repositories whose spec projects really are executables (see [specs.csharp](../../../rules/specs.csharp.md)); never start the rendered app's web-server executable to run specs. Generated specifications are
231
231
  compiled in Debug only; map results by generated spec class (`when_<snake>` in namespace
232
232
  `<Slice ns>.when_<snake>`, `when_<snake>_is_queried`, `when_<snake>_is_projected`) back to
233
233
  the `.play` specification, not by test counts.
@@ -11,9 +11,13 @@
11
11
  - Filters
12
12
  - Migrate from 4.x to 5.0
13
13
 
14
- Requires `Cratis.Specifications.XUnit.v3` 5.0 on `net10.0`. Check the
15
- `PackageReference` versions in the specification project; 4.x projects follow the
16
- checklist below before the executable loop applies.
14
+ The xUnit examples and migration checklist require `Cratis.Specifications.XUnit.v3`
15
+ 5.0 on `net10.0`. This is not a requirement to migrate frameworks: identify the
16
+ project's evaluated runner first. TUnit and `Cratis.Specifications.Runner` suites
17
+ also run their built executable, with their own help-confirmed flags, not xUnit
18
+ `-trx`/filter flags. Only legacy VSTest projects use `dotnet test <project> --no-build`.
19
+ Check package versions and the actual configuration/TFM; the 4.x migration checklist
20
+ below applies only when migrating, not as a prerequisite to running an existing suite.
17
21
 
18
22
  Sources: [Running specifications fast](https://github.com/Cratis/Specifications/blob/main/Documentation/running-fast.md),
19
23
  [The native runner](https://github.com/Cratis/Specifications/blob/main/Documentation/runner.md) and
@@ -241,7 +241,8 @@ to disk with no managed staging and no safe stale-file removal; a failure can le
241
241
  result. State the scope in the V5 report.
242
242
  - Report V5 as separate results, each a result or "not run": admission, publication,
243
243
  Debug build (`dotnet build <destination>/<Project>.csproj -c Debug`), Debug tests
244
- (`dotnet test` on the same project) and runtime. Render alone is the first two.
244
+ (`dotnet test <destination>/<Project>.csproj -c Debug --no-build` after the build; Stage-rendered apps use VSTest) and runtime. Render alone is the first two.
245
+ Use a built spec executable only in repositories whose spec projects really are executables (see [specs.csharp](../../rules/specs.csharp.md)); the rendered app's executable starts its web server, not its specs.
245
246
  - A refusal is kept verbatim as reported: `PLAY*` (compile or bind), `PLAN-*` (execution
246
247
  plan), `STAGE-*` (admission), `CLI-RENDER-*`, or a plain ownership error for a managed
247
248
  file. The fix is an intent-preserving model change or a recorded gap, never an edit of
@@ -119,7 +119,7 @@ Why it is shaped this way:
119
119
  | Forced | the same with `--force` | `written: 1`, the rest `unchanged` |
120
120
  | Missing name | render without `--name` | exit 5: `A valid --name is required and must be a C# identifier` |
121
121
  | Debug build | `dotnet build out/Marina.csproj -c Debug` | succeeds, 0 warnings, 0 errors |
122
- | Debug tests | `dotnet test out/Marina.csproj -c Debug` | all specification classes pass |
122
+ | Debug tests | `dotnet test out/Marina.csproj -c Debug --no-build` after the Debug build (Stage-rendered apps use VSTest) | all specification classes pass |
123
123
 
124
124
  Runtime (`docker compose up`, `/healthz`) and the frontend build are separate results.
125
125
 
@@ -132,8 +132,8 @@ Use the repo's own build/test workflow when it documents one (`README`/`CONTRIBU
132
132
 
133
133
  Otherwise:
134
134
  ```bash
135
- dotnet build # 0 errors
136
- dotnet test # stays green; same pass count as before
135
+ dotnet build # 0 errors; use dotnet test <project> --no-build only for VSTest (see specs.csharp)
136
+ ./<project-dir>/bin/<Config>/<TFM>/<AssemblyName> # built spec executable; same discovered/passed counts
137
137
  ```
138
138
 
139
139
  One operation per step; never mix a refactor and a behavior change in the same step. On red, stop and report the failure; repair only your edit without discarding unrelated worktree changes.
@@ -73,7 +73,8 @@ Keep the first restore. Skip a later one only when all four checks pass:
73
73
  ### Step 4: Apply the smallest change
74
74
 
75
75
  - One explicit restore carrying every restore input, then `--no-restore`, `-restore:false` or `--no-build` on later steps.
76
- - Several `dotnet test` steps over one solution: build once, then `dotnet test --no-build` on each. Add `--no-restore -restore:false` if an rsp enables restore, including on .NET 8 and earlier. `--no-restore` alone still rebuilds.
76
+ - Supported executable suites run their built spec runner instead (see [running-specs](../cratis-specifications-csharp/references/running-specs.md)); the dotnet-test examples here are VSTest-only.
77
+ - Several `dotnet test` steps over one VSTest-only solution: build once, then `dotnet test --no-build` on each. Add `--no-restore -restore:false` if an rsp enables restore, including on .NET 8 and earlier. `--no-restore` alone still rebuilds.
77
78
  - Keep self-contained publish settings. A `publish --no-build` still needs a prior build with matching configuration, framework, RID and self-contained output; restore compatibility does not prove that build outputs exist.
78
79
  - Scope the change to CI and scripts. Leave `-restore` in `Directory.Build.rsp`, because developers rely on it; pass `-restore:false` per invocation instead.
79
80
  - Never remove the first restore. If it is a `--locked-mode` gate, keep it there.
@@ -11,7 +11,7 @@ metadata:
11
11
 
12
12
  # Test Filter Syntax Reference
13
13
 
14
- Cratis rules in `.cratis/ai/rules/` (including `csharp.md`, `specs.csharp.md`, and `orleans.md`) and the `cratis-*` skills win where they differ. Specification authoring belongs to **cratis-specifications-csharp**; Cratis core repositories run xUnit v2 on VSTest.
14
+ Cratis rules in `.cratis/ai/rules/` (including `csharp.md`, `specs.csharp.md`, and `orleans.md`) and the `cratis-*` skills win where they differ. Specification authoring belongs to **cratis-specifications-csharp**; identify the actual runner rather than assuming xUnit v2/VSTest. Supported Cratis executable suites use direct runner flags first (see its [running-specs reference](../cratis-specifications-csharp/references/running-specs.md)). The dotnet-test forms below are technical syntax when that entrypoint is explicitly required, not the Cratis default.
15
15
 
16
16
  Filter syntax depends on the **platform** and **test framework**.
17
17