@cratis/pi 7.48.4 → 7.50.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/agents/screenplay-modeler.md +6 -2
- package/package/corpus/agents/screenplay-renderer.md +2 -2
- package/package/corpus/agents/screenplay-reviewer.md +2 -1
- package/package/corpus/agents/slice-implementer.md +13 -3
- package/package/corpus/harnesses/copilot/instructions/react.instructions.md +1 -0
- package/package/corpus/hooks/README.md +51 -1
- package/package/corpus/hooks/scripts/cratis-guard-writes.sh +75 -0
- package/package/corpus/hooks/scripts/cratis-pattern-scan.sh +1 -1
- package/package/corpus/hooks/scripts/cratis-patterns.json +8 -0
- package/package/corpus/hooks/scripts/cratis-quality-gate.sh +6 -0
- package/package/corpus/hooks/scripts/cratis-slice-scope-report.sh +54 -0
- package/package/corpus/rules/react.md +1 -0
- package/package/corpus/skills/cratis-application-slice-conformance/LICENSE +5 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/build-prompts.md +47 -20
- package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +8 -1
- package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +20 -0
- package/package/corpus/skills/cratis-application-slice-specifications/LICENSE +4 -0
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +27 -0
- package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +15 -0
- package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +8 -0
- package/package/corpus/skills/cratis-arc-react-page/LICENSE +4 -0
- package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +6 -0
- package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +9 -0
- package/package/corpus/skills/cratis-chronicle-event-modeling/LICENSE +5 -0
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +16 -2
- package/package/corpus/skills/cratis-chronicle-reactor/LICENSE +4 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +16 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/slice-delivery-checklist.md +38 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +17 -1
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +2 -0
- package/package/corpus/skills/cratis-event-model-diagram/LICENSE +5 -0
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +6 -1
- package/package/corpus/skills/cratis-event-model-diagram/references/provenance.md +9 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +24 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +19 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +10 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +10 -9
- package/package/corpus/skills/cratis-screenplay-discovery/references/divergent-sweep.md +9 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/document-intake.md +123 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/domain-analysis-template.md +15 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +49 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +2 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +26 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +17 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +7 -5
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +7 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +12 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +70 -102
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +101 -4
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/expert-verification.md +32 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +31 -7
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +13 -4
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +9 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +27 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/re-entry-and-passes.md +188 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +9 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +3 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +57 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +6 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/verified-sources.md +20 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/verification.json +4 -0
- package/package/corpus/skills/cratis-screenplay-model-review/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +28 -50
- package/package/corpus/skills/cratis-screenplay-model-review/references/baseline-comparison.md +9 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +6 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-review/references/mode-compliance.md +5 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/model-inventory-report.md +51 -3
- package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +20 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/stressor-analysis.md +86 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/verified-sources.md +15 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/walkthrough.md +135 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/core-rules-digest.md +7 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/per-turn-protocol.md +6 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +16 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +21 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +13 -11
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +2 -2
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/{drift-and-ledger.md → drift-and-fallback-record.md} +34 -10
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +12 -11
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/hand-written-changes.md +150 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +11 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +3 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +2 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +6 -6
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +7 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +10 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +46 -3
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +2 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +5 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +70 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +33 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +16 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +23 -6
- package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +4 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +69 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +4 -1
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +1 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +0 -7
- package/package.json +1 -1
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
# Drift, publication refusals and the fallback
|
|
1
|
+
# Drift, publication refusals and the fallback record
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- 1. Drift: the model changed, the output was not re-rendered
|
|
6
|
+
- 2. Publication refusals (code changed under the model)
|
|
7
|
+
- 3. Build breaks in `Customizations/` after a re-render
|
|
8
|
+
- Hand-written code changed since it was last verified
|
|
9
|
+
- 4. Fallback record
|
|
2
10
|
|
|
3
11
|
## 1. Drift: the model changed, the output was not re-rendered
|
|
4
12
|
The ownership manifest `.cratis-render.json` at the destination records `semanticRevision`
|
|
5
13
|
(`rev1:<sha256>`), the target, the renderer, the application name and a hash per managed file.
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
of the revision**. The MCP workspace names the application after the model root folder (without
|
|
15
|
+
Rendering the same model under different application names changes `semanticRevision`, so
|
|
16
|
+
**the application name is part of the revision**. The MCP workspace names the application after the model root folder (without
|
|
10
17
|
`.screenplay/identities.json`), so its `modelRevision` is not comparable with a render's manifest
|
|
11
18
|
revision by assumption. Without `.screenplay/identities.json` it changes when the root folder is
|
|
12
19
|
renamed (relocating the root while keeping its name does not); source positions and descriptions do
|
|
@@ -59,10 +66,18 @@ Re-render checklist: `cratis-stage-rendering-and-sandbox` `references/rendered-a
|
|
|
59
66
|
A generated contract changed. Read the error line and the generated type it names, fix the
|
|
60
67
|
adapter, rebuild. Never edit the generated file.
|
|
61
68
|
|
|
62
|
-
##
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
## Hand-written code changed since it was last verified
|
|
70
|
+
|
|
71
|
+
Read `references/hand-written-changes.md` for the read-only investigation: agree the baseline,
|
|
72
|
+
walk changes per file, distinguish undelivered scope from removed delivered code, and return
|
|
73
|
+
restoration briefs or model edit requests including affected screens. Neither this investigation
|
|
74
|
+
nor `conform` is a behavioral equivalence verdict; passing specifications remain necessary.
|
|
75
|
+
|
|
76
|
+
## 4. Fallback record
|
|
77
|
+
One file per model: `.ai-work/screenplay/<model-slug>/fallback-record.md`, untracked. A durable
|
|
78
|
+
record belongs in repository documentation or an issue, not in this work record. Use the same
|
|
79
|
+
fields for a hand-written slice's result packet; add probe-specific fields only where applicable.
|
|
80
|
+
One entry per assigned scope, with realization rows per slice:
|
|
66
81
|
|
|
67
82
|
| Field | Content |
|
|
68
83
|
| --- | --- |
|
|
@@ -72,13 +87,22 @@ non-renderable scope:
|
|
|
72
87
|
| class | capability gap / tool skew / model fix pending |
|
|
73
88
|
| decision | stay design / renderable-mode change (user, date) / implementer |
|
|
74
89
|
| fallback location | project and folder of the hand-written code |
|
|
90
|
+
| delivered at | delivery code source identity, using the lifecycle's source-identity definition; name the accepted model identity separately |
|
|
91
|
+
| element map | one row per qualified command, event, read model, query, screen, reaction or capture declaration: code symbol and repository-relative file location, or `no counterpart, because …` |
|
|
92
|
+
| files | created and modified paths, distinguished |
|
|
93
|
+
| seams touched outside the slice folder | each shared path, symbol and reason (registration, route, migration or adapter hook), or `none`; retain these for removal or re-delivery |
|
|
94
|
+
| assumptions | each declaration address, non-behavioral choice and consequence if wrong, or `none`; the delivery block list wins |
|
|
95
|
+
| checks run | exact iteration and completion commands, each with result or `not run: <reason>` |
|
|
75
96
|
| spec mapping | `.play` specification to test name, one line each; missing tests listed |
|
|
76
|
-
| field inventory |
|
|
97
|
+
| field inventory | one row per command, event and read-model property with its input-to-code-to-storage chain where applicable, or `no counterpart, because …`; `n/n` mapped; extras: none, or listed with reason |
|
|
77
98
|
| realization requirements applied | explicit realization notes from slice `description` or `documentation` applied, one line each; other description prose used as a hint is listed separately |
|
|
78
99
|
| spec delta | at re-delivery: specifications added, changed or removed since `last verified`, each with test status |
|
|
79
100
|
| divergences | where the code deliberately differs from the model, with reason and approver |
|
|
80
101
|
| revisit trigger | issue and condition (for example "Stage#58 ships list queries") |
|
|
81
|
-
| last verified | source identity and date the mapping
|
|
102
|
+
| last verified | accepted model identity, code source identity and date the whole mapping and check results were reconciled |
|
|
103
|
+
|
|
104
|
+
Keep one row per element, field and specification, with no code excerpts. These mappings help a
|
|
105
|
+
reviewer navigate; they are not proof of behavior without the checks they name.
|
|
82
106
|
|
|
83
107
|
When a revisit trigger fires, probe again; if the scope now renders, plan the migration from
|
|
84
108
|
hand-written code to managed output with the user.
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md
CHANGED
|
@@ -16,11 +16,11 @@ reconciliation, specification mapping, delta delivery and the final status are o
|
|
|
16
16
|
comes back.
|
|
17
17
|
|
|
18
18
|
## One scope per brief
|
|
19
|
-
One
|
|
20
|
-
paths and addresses, not pasted contents:
|
|
19
|
+
One fallback record entry (`drift-and-fallback-record.md`), one scope, one implementer. The brief
|
|
20
|
+
is a set of paths and addresses, not pasted contents:
|
|
21
21
|
- model root, source identity, the qualified slice addresses (`Module/Feature/Slice`) in scope,
|
|
22
22
|
their specifications and the referenced contract locations;
|
|
23
|
-
- the blocking codes from the probe and the
|
|
23
|
+
- the blocking codes from the probe and the fallback record entry id;
|
|
24
24
|
- target project, owned paths, and the repository's conventions (Arc and Chronicle hand-written
|
|
25
25
|
slices; `rules/vertical-slices.md`);
|
|
26
26
|
- the skill per slice kind: State Change `cratis-screenplay-command-surface`; State View
|
|
@@ -45,9 +45,9 @@ The brief also carries, from the slice build prompts (`cratis-application-slice-
|
|
|
45
45
|
`done` only if every scenario in the contract is implemented and no specification lacks an
|
|
46
46
|
executable equivalent; a re-delivery can be only added specifications; touch only the slice's
|
|
47
47
|
own paths; do not change existing specification files unless an approved contract revision says so (`build-prompts.md` section 1); when the
|
|
48
|
-
requirements
|
|
49
|
-
|
|
50
|
-
per scope; a
|
|
48
|
+
requirements hit the delivery block list, return an edit request and report `blocked`; non-behavioral
|
|
49
|
+
assumptions follow `build-prompts.md` section 3 and remain visible. Ownership is assigned per brief,
|
|
50
|
+
one implementer per scope; a fallback record or `STATE.md` line records it and is not a lock, and atomic claiming is used
|
|
51
51
|
only where a tracker provides a verified operation. Git effects follow the brief's separate
|
|
52
52
|
authorization.
|
|
53
53
|
|
|
@@ -57,8 +57,9 @@ ambiguous addresses; contracts are never inferred from names.
|
|
|
57
57
|
|
|
58
58
|
## What comes back
|
|
59
59
|
- Status `done | partial | blocked` from `cratis-application-slice-conformance`.
|
|
60
|
-
- The
|
|
61
|
-
|
|
60
|
+
- The realization fields from `drift-and-fallback-record.md`, "Fallback record", in the slice's
|
|
61
|
+
result packet: element and specification mappings, files, shared seams, assumptions, identities
|
|
62
|
+
and check results, with no second schema.
|
|
62
63
|
- Edit requests for the modeler session: address, change, rationale. Walkthrough-derived cases
|
|
63
64
|
belong in accepted `.play` specifications first, never as a second behavioural contract in
|
|
64
65
|
code-only tests. Integration tests may check wiring and persistence without inventing rules.
|
|
@@ -67,7 +68,7 @@ ambiguous addresses; contracts are never inferred from names.
|
|
|
67
68
|
|
|
68
69
|
## Rules the model states only in prose
|
|
69
70
|
A rule that exists only in a description, or a state-dependent rule the model marks as not
|
|
70
|
-
enforced, is unenforced in generated scope. List it in the
|
|
71
|
+
enforced, is unenforced in generated scope. List it in the fallback record as a target requirement. In
|
|
71
72
|
hand-written code it needs an atomic enforcement point: a protected read or a concurrency scope
|
|
72
73
|
(Stage 4.73.1 rendered apps scaffold the Arc/Chronicle set in `cratis-stage-rendering-and-sandbox` `references/rendered-application.md`: protected-read APIs
|
|
73
74
|
are available to gap-fill, with projection/key admission and active enrollment), or a Chronicle constraint. A stale view or
|
|
@@ -105,8 +106,8 @@ stable array or list. The Stage scaffold pins an older Arc, so raise the version
|
|
|
105
106
|
reaction or drop an effect to dodge rendering.
|
|
106
107
|
|
|
107
108
|
## Re-delivery
|
|
108
|
-
The work list is the full in-scope contract delta since the
|
|
109
|
+
The work list is the full in-scope contract delta since the fallback record's last verified source
|
|
109
110
|
identity (specifications, rules, mappings, realization notes), then the whole contract is
|
|
110
|
-
reconciled again and the field inventory redone. The specification delta is one
|
|
111
|
+
reconciled again and the field inventory redone. The specification delta is one fallback record field.
|
|
111
112
|
When the scope later renders (a revisit trigger fires), plan the migration to managed output
|
|
112
113
|
with the user: the hand-written files collide with planned paths and must move first.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Investigating hand-written code changes
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Scope and baseline
|
|
6
|
+
- Inspect the changes
|
|
7
|
+
- Finding kinds
|
|
8
|
+
- Judge each difference
|
|
9
|
+
- Resolution routing
|
|
10
|
+
- Report
|
|
11
|
+
- Reconcile the record
|
|
12
|
+
|
|
13
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
14
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
15
|
+
|
|
16
|
+
A read-only investigation of code changes against the slice contract. It edits neither code nor
|
|
17
|
+
model: findings become re-delivery briefs or model edit requests. An accepted model remains the
|
|
18
|
+
contract; new code is evidence of a difference, not authority to revise the model.
|
|
19
|
+
|
|
20
|
+
## Scope and baseline
|
|
21
|
+
|
|
22
|
+
1. Name the repository, feature or slices and target ref. Default: `HEAD` plus uncommitted changes.
|
|
23
|
+
For another branch, verify the ref with `git -C <repo> rev-parse --verify <ref>`, trying
|
|
24
|
+
`origin/<branch>` if appropriate. Read with `git -C <repo> show <ref>:<path>`, never switch the
|
|
25
|
+
checkout, because that can disturb somebody else's work. Do not mix working-tree edits into
|
|
26
|
+
an investigation of another ref.
|
|
27
|
+
2. Use the fallback record's `last verified` code identity, or the extraction's anchored analysis
|
|
28
|
+
note. An explicitly supplied starting commit overrides it. Read the element map, fields,
|
|
29
|
+
shared seams, approved divergences and feature-level legacy-source notes before judging.
|
|
30
|
+
3. Check the baseline resolves and is an ancestor of the target:
|
|
31
|
+
`git -C <repo> merge-base --is-ancestor <baseline> <ref>`. A missing, unreachable, non-ancestor
|
|
32
|
+
or dirty identity needs one agreed starting commit. Offer the nearest recorded `delivered at`
|
|
33
|
+
or `last verified` commit; otherwise show `git -C <repo> log --oneline -10` as candidates,
|
|
34
|
+
not as an assumed baseline.
|
|
35
|
+
4. Without usable Git history, say that this investigation cannot run. Route to
|
|
36
|
+
`cratis screenplay conform <model-root> --project <path>` for structural evidence and
|
|
37
|
+
`cratis-application-slice-conformance` for a contract review; neither invents a change range.
|
|
38
|
+
|
|
39
|
+
## Inspect the changes
|
|
40
|
+
|
|
41
|
+
1. Share one history read among scopes with the same baseline. List commits oldest first over
|
|
42
|
+
the recorded slice files, shared seams and `Customizations/`:
|
|
43
|
+
`git -C <repo> log --reverse --format='%H %s (%an)' <baseline>..<ref> -- <paths>`.
|
|
44
|
+
Inspect each commit's changes, grouped by file. Include uncommitted changes separately only
|
|
45
|
+
for the default target. A net diff alone can hide a hand edit followed by another delivery.
|
|
46
|
+
2. A delivery record naming a commit in `delivered at` identifies its as-built code. Stage's
|
|
47
|
+
ownership manifest identifies managed files, not the author of an arbitrary commit. Attribute
|
|
48
|
+
later edits to their actual commits, including edits in a file another delivery created;
|
|
49
|
+
`git -C <repo> diff <delivered-commit>..<ref> -- <file>` shows the candidates, not the full
|
|
50
|
+
attribution. Stage-managed output uses the manifest/refusal procedure in
|
|
51
|
+
`drift-and-fallback-record.md`, not hand-written repair.
|
|
52
|
+
3. Map changed files to slices through the element map, field chains and specification mapping,
|
|
53
|
+
then structural addresses from `conform`, then names as a last resort. A business change
|
|
54
|
+
mapping to no slice is itself a finding: use the recorded feature folders to locate it, or
|
|
55
|
+
state that it needs a proposed slice. Read only those contracts and the changed code at the
|
|
56
|
+
target ref, not just the diff hunk.
|
|
57
|
+
4. Separate behavior from noise per file. Dependency, CI, formatting and documentation edits,
|
|
58
|
+
generated Arc proxies, corpus configuration, harness adapters, work records, lockfiles,
|
|
59
|
+
`bin/` and `obj/` normally belong to tooling or generated-output review. Domain-generated
|
|
60
|
+
values, serialization attributes, test helpers, logging and refactors are noise only when
|
|
61
|
+
behavior is preserved. A changed default, authorization gate or disabled test is not noise
|
|
62
|
+
merely because it shares a file or commit with infrastructure edits.
|
|
63
|
+
|
|
64
|
+
## Finding kinds
|
|
65
|
+
|
|
66
|
+
| Kind | A code change in the range that … | Model side |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| Fields | adds, removes or renames a command input, event property or read-model/query-result field; changes type, optionality or identity | `command`, `event`, `readmodel`, `query`, `identifier` |
|
|
69
|
+
| Rules | changes validation, a guard, error, default, authorization or a specification so the contract no longer describes the behavior | rules, constraints, `authorize`, `specification` |
|
|
70
|
+
| Screens | changes a page, component or route's displayed or submitted values | `screen`, forms, bindings |
|
|
71
|
+
| Wiring | changes appended events, decision reads, projection inputs or reaction/capture links | `produces`, `reads`, `from`, triggers, `invokes`, captures |
|
|
72
|
+
| Declarations | adds, removes or renames a command, event, read model, query or reaction | the declaration |
|
|
73
|
+
| Slices | adds an uncovered behavior, or removes code a delivery record shows was delivered | the slice |
|
|
74
|
+
|
|
75
|
+
## Judge each difference
|
|
76
|
+
|
|
77
|
+
- Report only changes in the agreed range. A pre-existing mismatch is not caused by this range;
|
|
78
|
+
do not call it approved merely because it existed at the baseline. Return any blocking
|
|
79
|
+
pre-existing defect separately for a conformance review.
|
|
80
|
+
- A change restoring the accepted contract is no finding; mention restoration in the summary.
|
|
81
|
+
An approved, recorded divergence is no new finding. An unapproved difference still is.
|
|
82
|
+
- Model-only scope without delivery evidence is undelivered work, not a code-change finding.
|
|
83
|
+
A declaration or slice whose element map shows delivery but whose code was removed **is** a
|
|
84
|
+
Declarations or Slices finding; do not hide it as undelivered work.
|
|
85
|
+
- One difference is one finding at the declaration where it starts. Name the affected chain,
|
|
86
|
+
not duplicate findings for every downstream carrier.
|
|
87
|
+
|
|
88
|
+
## Resolution routing
|
|
89
|
+
|
|
90
|
+
Default with an accepted model: restore code by re-delivery, with the identity effects named.
|
|
91
|
+
A wanted behavior change instead needs a model edit request, review and acceptance before code
|
|
92
|
+
follows it. With an extraction candidate and no accepted model, propose updating the candidate
|
|
93
|
+
from the evidence and retain expert confirmation; code is not an accepted business decision.
|
|
94
|
+
|
|
95
|
+
| Finding | Restore code | Alternative model edit request |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| Fields or Wiring | `slice-implementer`, or re-render Stage-owned scope | modeler using `cratis-screenplay-slice-design`; event/identity effects stated |
|
|
98
|
+
| Rules | re-deliver the contracted rule and specifications | `cratis-screenplay-scenario-coverage` and the owning command/consistency skill |
|
|
99
|
+
| Screens | re-deliver the contracted page | `cratis-screenplay-read-surface` and `cratis-screenplay-ui-composition` |
|
|
100
|
+
| Declarations added in code | removal needs a human decision, not deletion from this investigation | discovery or slice design, with identity effects |
|
|
101
|
+
| Delivered slice removed in code | re-deliver | removal through the lifecycle's identity owner |
|
|
102
|
+
|
|
103
|
+
For an evidently accidental edit (misspelled property, debugging leftover, disabled test), say
|
|
104
|
+
why restoration is recommended. A declined finding does not silently authorize divergence:
|
|
105
|
+
record the reason and approver if the owner deliberately accepts it.
|
|
106
|
+
|
|
107
|
+
Every model edit request affecting a field, command or read model names all affected screens,
|
|
108
|
+
forms and bindings in the same request, to be changed in place. Adding another screen beside
|
|
109
|
+
an inconsistent one leaves the defect. Use the `screenplay` MCP server's `find-references` with
|
|
110
|
+
`kind: "Property"` and follow `screen-binding` links (model-authoring
|
|
111
|
+
`references/property-links.md`); incomplete links require bounded manual inspection too.
|
|
112
|
+
|
|
113
|
+
## Report
|
|
114
|
+
|
|
115
|
+
Group findings by kind, omitting empty sections. Each checkbox carries the range's responsible
|
|
116
|
+
commits (identity, subject, author), resolving file locator, declaration, model behavior, code
|
|
117
|
+
behavior and proposed resolution. A short report looks like:
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
## Code changes against the contract: <scope>
|
|
121
|
+
Range: <baseline> -> <ref> [plus uncommitted changes]
|
|
122
|
+
Inspected: <n> commits, <n> behavior-changing files
|
|
123
|
+
|
|
124
|
+
### Fields
|
|
125
|
+
- [ ] <Module/Feature/Slice> <declaration>: model <x>; code <y>.
|
|
126
|
+
Responsible: <commit, subject, author>; delivery: <recorded identity>.
|
|
127
|
+
Location: <repository-relative path and locator>; proof: <specification>.
|
|
128
|
+
Proposed: restore | model edit request <change>; screens: <affected list>.
|
|
129
|
+
|
|
130
|
+
### Summary
|
|
131
|
+
<What changed, the largest consequence, and the first recommended resolution.>
|
|
132
|
+
Commits: <one per line; delivery commits identified by their record>.
|
|
133
|
+
Not relevant: <noise files and reasons>.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
No behavior change in the range: say so in one line, including the inspected scope. Partial
|
|
137
|
+
coverage is not a clean report; name paths or evidence that could not be inspected.
|
|
138
|
+
|
|
139
|
+
## Reconcile the record
|
|
140
|
+
|
|
141
|
+
Apply no changes from the report itself. The owner chooses resolutions; model edits are batched
|
|
142
|
+
through the modeler, code repairs are queued for delivery, and declined findings retain their
|
|
143
|
+
reasons. Advance `last verified` only after every finding has a decided resolution and the
|
|
144
|
+
resulting code and specifications have been checked. Unanswered or failed resolutions keep
|
|
145
|
+
the baseline unchanged; an empty finding list still requires the checks before advancing it.
|
|
146
|
+
|
|
147
|
+
After writing a fallback entry, check every declaration address resolves (`find-declaration`
|
|
148
|
+
on the `screenplay` MCP server) and every element, field and specification row is nonempty.
|
|
149
|
+
Field mappings name the concrete input-to-code-to-storage chain where applicable, or state
|
|
150
|
+
`no counterpart, because …`. A complete record navigates evidence; it is not behavioral proof.
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Moved and rewritten (Cratis)
|
|
4
4
|
- The render workflow of the earlier model skill set: capability probe, renderability
|
|
5
|
-
classification, delivery protocol, drift and fallback
|
|
5
|
+
classification, delivery protocol, drift and fallback record. Rewritten for Stage 4.24 and cli
|
|
6
6
|
3.27.1, then re-verified on cli 3.28.2 (Stage 4.24.1) and 3.28.3 (Stage 4.24.2) by running `cratis render`; the
|
|
7
7
|
helper scripts are not shipped (their steps are the manual commands in `references/delivery-protocol.md`).
|
|
8
8
|
- The fallback-conformance checklist moved into `cratis-application-slice-conformance`
|
|
@@ -22,3 +22,13 @@ by Martin Dilger and Nebulit GmbH (https://nebulit.de), used with the explicit c
|
|
|
22
22
|
| `.claude/skills/update-slice-status/SKILL.md`: closed status vocabulary and the already-in-status claim guard | `references/gap-fill-handoff.md`; the `done \| partial \| blocked` status | Idea; our own wording kept (statuses differ on purpose) |
|
|
23
23
|
|
|
24
24
|
No TrogonStack/agentskills text is used in this skill.
|
|
25
|
+
|
|
26
|
+
### Eventmodelers Build-Kits
|
|
27
|
+
|
|
28
|
+
Source: https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits, by Martin Dilger and Nebulit GmbH
|
|
29
|
+
(https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH.
|
|
30
|
+
|
|
31
|
+
| Source skill | Used in | How |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| `detect-model-drift` | `references/hand-written-changes.md`; `references/drift-and-fallback-record.md` investigation pointer; `SKILL.md` step 8 | copied and translated: scoped baseline/ref reads, delivery attribution, finding kinds and report, behavior-preserving noise, removal of delivered code distinguished from undelivered scope, affected screens in each edit request and resolution routing; used with their explicit consent; model-first restoration remains the default rather than changing the model to fit code |
|
|
34
|
+
| `record-evidence` (classic stack) | `references/drift-and-fallback-record.md` *Fallback record*; `references/hand-written-changes.md` record checks; `references/gap-fill-handoff.md` result pointer | adapted closely: element, field and specification mapping including concrete input-to-storage chains, resolving addresses and nonempty rows, files, shared seams, assumptions and checks per slice, with no code excerpts; used with their explicit consent |
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md
CHANGED
|
@@ -30,8 +30,8 @@ ESM). Only the probe answers renderability. `PLAY0270` entries are information,
|
|
|
30
30
|
| Class | Meaning | Typical examples (each verified in `admission.md`) | Action |
|
|
31
31
|
| --- | --- | --- | --- |
|
|
32
32
|
| **Model fix (in mode)** | the model is in, or the user chose, renderable mode and breaks its own subset in a way that has a renderable equivalent with the same meaning | a `produces` whose `for` is not the command identifier; one `StateChange` slice with two commands (`STAGE-ESM-004`); two projections for one read model (`-007`); a policy Stage cannot express portably (`-015`; role-only and opaque pure policies render at 4.73.1) | edit request to the modeler session with address, change and rationale |
|
|
33
|
-
| **Capability gap** | the intended meaning needs a construct Stage does not render yet | a snapshot list query (`-010`; observable lists and keyed or unkeyed lists bind and observable lists render), DateTime equality filters and required parameters after optional filters (`-010`); context/single-result filters, opaque `scoped to`/`performer` and composite `by` remain PLAY0268; Translate, clocks, captures, non-event triggers and opaque reaction bodies (`-024`); claim-reading/opaque `runs as` gates (`-034`), legacy `from` (`-035`), mixed effects in one handler (`-037`, retries can duplicate events; keep it whole), unsupported reaction mappings (`-039`); unsupported generated types/result combinations (`-028`/`-038`); `then no readmodel` (`-027`); evolved events (`STAGE-ESM-026`); conditional `produces when` (`-006`); `reads` (`PLAY0271`); code validation (`-005`); protected identities/enums (`-040`), non-text secrets (`-041`) or unadmitted explicit subject lineage (`PLAY0268`); a command `handler` (`PLAY0268`) | keep the model;
|
|
34
|
-
| **Tool skew** | the bundled compiler disagrees with documented semantics | the false `PLAY0285` on reaction cascades from a cratis before 3.28.2 bundle (cli#242); codes the standalone compiler does not raise | record in the session state and the
|
|
33
|
+
| **Capability gap** | the intended meaning needs a construct Stage does not render yet | a snapshot list query (`-010`; observable lists and keyed or unkeyed lists bind and observable lists render), DateTime equality filters and required parameters after optional filters (`-010`); context/single-result filters, opaque `scoped to`/`performer` and composite `by` remain PLAY0268; Translate, clocks, captures, non-event triggers and opaque reaction bodies (`-024`); claim-reading/opaque `runs as` gates (`-034`), legacy `from` (`-035`), mixed effects in one handler (`-037`, retries can duplicate events; keep it whole), unsupported reaction mappings (`-039`); unsupported generated types/result combinations (`-028`/`-038`); `then no readmodel` (`-027`); evolved events (`STAGE-ESM-026`); conditional `produces when` (`-006`); `reads` (`PLAY0271`); code validation (`-005`); protected identities/enums (`-040`), non-text secrets (`-041`) or unadmitted explicit subject lineage (`PLAY0268`); a command `handler` (`PLAY0268`) | keep the model; fallback record entry; options a to c in `SKILL.md`; link the Stage issue |
|
|
34
|
+
| **Tool skew** | the bundled compiler disagrees with documented semantics | the false `PLAY0285` on reaction cascades from a cratis before 3.28.2 bundle (cli#242); codes the standalone compiler does not raise | record in the session state and the fallback record; never "fix" a correct model |
|
|
35
35
|
| **Environment** | not the model | restore failures, missing SDK, a destination that is not writable | fix the environment or report blocked |
|
|
36
36
|
|
|
37
37
|
## Triage rules
|
|
@@ -48,7 +48,7 @@ ESM). Only the probe answers renderability. `PLAY0270` entries are information,
|
|
|
48
48
|
- Admission can pass and a Debug test still fail. Admission is never a passing test; see
|
|
49
49
|
`cratis-stage-rendering-and-sandbox` `references/render-example.md`.
|
|
50
50
|
|
|
51
|
-
## Stage issues to cite in
|
|
51
|
+
## Stage issues to cite in fallback record entries
|
|
52
52
|
Historical issue pointers (not a fresh issue-state check): portable query semantics Stage#58;
|
|
53
53
|
Translate and unsupported automation forms Stage#79; mapping expressions and projection blocks Stage#117; modeled authentication
|
|
54
54
|
Stage#120; per-persona screens Stage#194; evolved events Stage#204; mixed reaction effects Stage#207;
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
- The model
|
|
6
6
|
- The probe
|
|
7
7
|
- Classification
|
|
8
|
-
- Decision and
|
|
8
|
+
- Decision and fallback record entry
|
|
9
9
|
- The report
|
|
10
10
|
|
|
11
11
|
A marina model with one renderable command and one snapshot list view. The model compiles and binds;
|
|
@@ -92,7 +92,7 @@ lookup, or marking the list `observable`. The first changes what the harbour mas
|
|
|
92
92
|
second changes delivery from a snapshot to a live subscription. Both are **modeling decisions for
|
|
93
93
|
the user**, never renderer workarounds. Here the user keeps the snapshot list.
|
|
94
94
|
|
|
95
|
-
## Decision and
|
|
95
|
+
## Decision and fallback record entry
|
|
96
96
|
|
|
97
97
|
Case A, then case B for `ReserveBerth` (rendered with `--scope`) and case C for the list: the user keeps
|
|
98
98
|
the full model, the view is delivered by hand, and the model stays the contract.
|
|
@@ -34,3 +34,8 @@ This skill also adapts material from agentic-engineer by Martin Dilger and Nebul
|
|
|
34
34
|
(https://github.com/Nebulit-GmbH/agentic-engineer, commit 07b0f30648d663cb588d7e2c7aa031af9dfc21f2;
|
|
35
35
|
https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted
|
|
36
36
|
material remains credited to Martin Dilger and Nebulit GmbH.
|
|
37
|
+
|
|
38
|
+
This skill also adapts material from the Eventmodelers Build-Kits skills by Martin Dilger and
|
|
39
|
+
Nebulit GmbH (https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits; https://nebulit.de), used
|
|
40
|
+
with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted material remains credited
|
|
41
|
+
to Martin Dilger and Nebulit GmbH.
|
|
@@ -64,7 +64,7 @@ question is not four approvals.
|
|
|
64
64
|
4. **Coverage matrix before any spec** (`references/coverage-matrix.md`). Rows: every command,
|
|
65
65
|
reaction, capture, read model and gated query. Columns: the scenario types below. Each cell
|
|
66
66
|
is `spec <Name>`, `n/a: <domain reason>`, `recorded: <why not expressible>`,
|
|
67
|
-
`open: <case>`, `question: <id>` or `gap: <code>`. "Fewer specs" is never a reason; a
|
|
67
|
+
`n/a: technical` (closed list), `open: <case>`, `question: <id>` or `gap: <code>`. "Fewer specs" is never a reason; a
|
|
68
68
|
declaration (constraint, policy) or another command's denial is not a spec.
|
|
69
69
|
5. **Per read model, decide the shape**: single-transition specs only, or also a lifecycle
|
|
70
70
|
family (cumulative givens). Write the decision and reason in the matrix, before drafting any
|
|
@@ -105,7 +105,7 @@ question is not four approvals.
|
|
|
105
105
|
| Rule rejection | Which input is refused, with what message? | one spec per rule; `then error "<exact message>"` (prefer `$strings.<key>`); always pinned (a bare `then error` is valid language but not accepted here) |
|
|
106
106
|
| Denial | Who must not do this? | `given caller` without the policy -> `then denied`; one per gated command and query, only where the whole Boolean gate is false; ownership claims need other-owner denial |
|
|
107
107
|
| State violation | Which prior facts make this wrong? | givens + constraint (`unique event` exclusivity) -> `then error`; else `recorded` |
|
|
108
|
-
| Duplicate / retry |
|
|
108
|
+
| Duplicate / retry | Done again to something in that state, or sent twice (lost acknowledgement)? | `when <Command>`, same identifier, earlier fact as `given` -> constraint message, or the accepted repeat |
|
|
109
109
|
| Competing claim | Two people claim the same thing at once? | `when <Command>`, other source's fact as `given` (different `for`) -> constraint "another event source..." |
|
|
110
110
|
| Alternative path | Which branches exist, including "nothing happens"? | true and false witnesses per `produces when`; unconditional productions always fire |
|
|
111
111
|
| Ordering | Facts late or out of order? | view family with reordered givens; translation specs; else `recorded` |
|
|
@@ -151,12 +151,12 @@ target requirements.
|
|
|
151
151
|
never `n/a` automatically. Include a whitespace-only rejection for text `not empty`:
|
|
152
152
|
**4.151.0** changes outcomes in every ESM version. Unicode/identity boundaries
|
|
153
153
|
and evidence: command-surface `references/validate-rules.md`.
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
A business rule gets one rejection spec if an expert could recognize it from its message;
|
|
155
|
+
binder-enforced shape is no scenario (catalogue §2).
|
|
156
156
|
- Persona Cannot lines are intent: each needs an executable gate plus a `then denied` spec whose
|
|
157
157
|
caller is a synthesized persona witness or an explicit gate fixture, else record a gap.
|
|
158
|
-
- Descriptions are not rendered: a rule only in prose is unenforced
|
|
159
|
-
|
|
158
|
+
- Descriptions are not rendered: a rule only in prose is unenforced; make it a rule layer, a
|
|
159
|
+
spec or a recorded target requirement.
|
|
160
160
|
- Prove projections with events (`given`/`when append`), not `given readmodel`; seed read models
|
|
161
161
|
only for performer-backed views or commands that decide on view state.
|
|
162
162
|
- No contradiction between a family and single-transition specs of the same view.
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md
CHANGED
|
@@ -21,6 +21,13 @@ Write it **before** drafting specs, keep it in `.ai-work/screenplay/<model-slug>
|
|
|
21
21
|
PLAY0268/0271; report the model as design-complete, not binding-ready) and marked
|
|
22
22
|
NOT enforced in the slice `description`, with its target named (Arc `[ProtectedDecision]`,
|
|
23
23
|
Chronicle DCB, or a constraint). It is also in the phase report.
|
|
24
|
+
- `n/a: technical` - deliberately unspecified because the language or runtime already
|
|
25
|
+
guarantees it. The list is closed: binder-enforced shape (type, required property),
|
|
26
|
+
collision of `generated` identifiers, and an infrastructure fault the runtime absorbs with
|
|
27
|
+
nothing a person could notice. A repeat or re-delivery the business would notice (a second
|
|
28
|
+
fact, email, charge or count) is never technical: it is Duplicate/retry (catalogue section 5).
|
|
29
|
+
Anything else needs a domain reason or another cell value. Review treats a spec in these
|
|
30
|
+
categories as a smell, not as coverage.
|
|
24
31
|
- `open: <required case>` - planned but not yet drafted. Never counts as coverage.
|
|
25
32
|
- `question: <id>` - needs a domain answer; listed in open questions.
|
|
26
33
|
- `gap: <code>` - expressible in design mode but blocked in the chosen mode (e.g. removal in
|
|
@@ -31,6 +31,16 @@ by Martin Dilger and Nebulit GmbH (https://nebulit.de), used with the explicit c
|
|
|
31
31
|
| `.claude/skills/examples/SKILL.md`: neighborhood-first reading, never overwrite existing examples, short domain-specific values, report fields changed and reused | `references/scenario-catalogue.md` "Example data" | Handoff report (fixtures changed, preserved, reused value origins, inconsistencies) adapted; rest idea, our own wording kept (board tooling, `add_field_examples` and name-based type guessing dropped because declared types decide values) |
|
|
32
32
|
| `.claude/skills/eventmodeling-elaborating-scenarios/SKILL.md`: Step 3 skip unresolved steps, board-only restrictions, "every scenario produces events" | none | Considered and not adopted: removing a prerequisite changes the test; Screenplay has rejections and queries |
|
|
33
33
|
|
|
34
|
+
### Eventmodelers Build-Kits
|
|
35
|
+
|
|
36
|
+
Source: https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits, by Martin Dilger and Nebulit GmbH
|
|
37
|
+
(https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH.
|
|
38
|
+
|
|
39
|
+
| Source skill | Used in | How |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `eventmodeling-elaborating-scenarios` | `references/scenario-catalogue.md` sections 2 and 5, *Example data*; `references/scenario-examples.md`; `references/coverage-matrix.md` *Cell values*; `SKILL.md` | adapted closely: a rejection earns a scenario only if a domain expert could recognize the rule, the duplicate question put as a business question, essential values shown in the body with the rest left out, descriptions that carry no fact a step could state, and a closed list of technical cases left unspecified; concept-rule and once-only specifications are kept on purpose, and a repeat the business would notice is never technical |
|
|
42
|
+
| `eventmodeling-elaborating-scenarios` (examples, error-state and compensation scenarios) and `eventmodeling-identifying-outputs` (error states shown) | `references/scenario-catalogue.md` sections 9 (*Shown*, *Recoverable*) and 10 (follow-up work after a reversal) | copied and translated: the payment-failure view update and the retry after failure, and the compensation triggered by a cancellation, restated as view and retry specifications and an Automation-slice specification; the board scenario syntax is dropped |
|
|
43
|
+
|
|
34
44
|
## Cratis-original
|
|
35
45
|
Coverage matrix and obligation derivation from declarations, cell vocabulary (`spec`, `n/a`,
|
|
36
46
|
`recorded`, `open`, `question`, `gap`), scenario types per Screenplay semantics, denial fixtures
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md
CHANGED
|
@@ -56,6 +56,13 @@ name them as unfinished.
|
|
|
56
56
|
|
|
57
57
|
## 2. Rule rejection (one per rule)
|
|
58
58
|
- Ask: "Which values would you refuse, and what would you tell the person?"
|
|
59
|
+
- Test: could a domain expert recognize the rule from its message and argue about it? If not,
|
|
60
|
+
it is not a scenario. Not scenarios in Screenplay: a type mismatch the binder rejects, a
|
|
61
|
+
missing required property, malformed JSON, a collision of `generated` identifiers, an
|
|
62
|
+
infrastructure fault (matrix cell `n/a: technical`).
|
|
63
|
+
- Deliberate exceptions: a concept rule is domain vocabulary that renders into a validator at
|
|
64
|
+
every use, so it gets its one acceptance, rejection and boundary set; this is not per-field
|
|
65
|
+
schema testing. Every rule stated in the brief or a persona `Cannot` line maps to a matrix cell.
|
|
59
66
|
- Applies: every command `validate`/`require` rule that is a business rule, and every
|
|
60
67
|
`concept` rule.
|
|
61
68
|
- Concept rules travel with every use: cover each once with representative acceptance,
|
|
@@ -114,9 +121,12 @@ name them as unfinished.
|
|
|
114
121
|
protected decision.
|
|
115
122
|
|
|
116
123
|
## 5. Duplicate action and retry
|
|
117
|
-
- Ask
|
|
118
|
-
|
|
119
|
-
|
|
124
|
+
- Ask first as a business question: "What if someone does this again to something already in
|
|
125
|
+
that state?" (confirm a confirmed reservation, resolve a resolved todo). Then take the
|
|
126
|
+
delivery view: a double click, a timeout and retry, a replayed message; retry semantics are
|
|
127
|
+
owned by `cratis-screenplay-streams-and-consistency`.
|
|
128
|
+
- Decide which promise the business needs (once-only facts are business promises, such as
|
|
129
|
+
"a reservation is confirmed once", and stay specified):
|
|
120
130
|
- **once-only fact**: the second attempt must not create a second fact (`unique event`);
|
|
121
131
|
- **idempotent handling**: the second attempt must *succeed* without a new fact - not
|
|
122
132
|
expressible as a constraint outcome; record it as a target requirement;
|
|
@@ -176,6 +186,17 @@ name them as unfinished.
|
|
|
176
186
|
- Shape: the reported outcome is a **fact** (a refusal received is an event), specified in the
|
|
177
187
|
Translate or Automation slice; a missing answer is a time-based scenario. A rejection
|
|
178
188
|
(`then error`) is only for requests we refuse ourselves.
|
|
189
|
+
- **Shown:** a failure fact that someone must act on reaches a view the person reads (a status
|
|
190
|
+
literal and the reason, mapped from the failure event). Pin it with a view specification:
|
|
191
|
+
`given <OpeningFact>`, `given <FailureFact>`, then `then query` with the failed status and
|
|
192
|
+
the reason. A failure only an automation sees is covered by the review question in
|
|
193
|
+
`cratis-screenplay-automations-and-translations`. A failure a person must act on that no
|
|
194
|
+
screen shows is a gap.
|
|
195
|
+
- **Recoverable:** after the failure fact, the retry the business allows is accepted:
|
|
196
|
+
`given <FailureFact>`, `when <RetryCommand>`, `then <AttemptFact>`. It catches a once-only
|
|
197
|
+
constraint (`unique event`) that locks legitimate recovery out, and is the opposite case to
|
|
198
|
+
section 5 (duplicate action). `RetryingPaymentAfterADecline` in `invoicing-dues-example.md` is the
|
|
199
|
+
complete form. When the business forbids a retry, the case is a state violation with its message.
|
|
179
200
|
- n/a: no external system in the path.
|
|
180
201
|
|
|
181
202
|
## 10. Compensation
|
|
@@ -183,6 +204,12 @@ name them as unfinished.
|
|
|
183
204
|
- Shape: the reversal command's own specs, plus a spec proving the effect of the reversal:
|
|
184
205
|
a released claim (`ReservingABerthNightFreedByACancellation`) or a removed row
|
|
185
206
|
(`BerthBoardLifecycle3Cancelled`). Corrections are new facts, never edits of old ones.
|
|
207
|
+
- When undoing one fact obliges follow-up work (a refund after a paid booking is cancelled), the
|
|
208
|
+
follow-up is an Automation slice. Specify it there: `given <PriorFact>`, `when append
|
|
209
|
+
<CancellationFact>`, `then <RefundRequested>` (or the pending-work row), and the case where no
|
|
210
|
+
compensation is owed (cancelled before payment: no refund fact). Recipes:
|
|
211
|
+
`cratis-screenplay-automations-and-translations` `references/cases-to-specify.md`;
|
|
212
|
+
`RequestingARefundAfterAReversal` in `invoicing-dues-design.md` is the complete form.
|
|
186
213
|
- Often reveals a missing event: if nothing can undo a fact the business can reverse, ask.
|
|
187
214
|
|
|
188
215
|
## 11. Evolution compatibility
|
|
@@ -221,6 +248,22 @@ rules, gates, mappings or contracts to make an example pass.
|
|
|
221
248
|
condition. Denial: valid business input, vary only the caller. Validation: satisfy every other
|
|
222
249
|
rule.
|
|
223
250
|
- Unknown domain values stay questions, not plausible inventions.
|
|
251
|
+
- Show the deciding values in the spec body: the values the rule reads (the command card's
|
|
252
|
+
`Reads:` line in slice-design `references/command-inventory.md`), the identities tying the
|
|
253
|
+
steps together (the same `for` and identifier throughout) and the asserted outcome. Choose them
|
|
254
|
+
at the edge that matters (one day past the limit, the amount exactly at the cap), never vague.
|
|
255
|
+
Screenplay requires every required property on givens, commands and expected events, so
|
|
256
|
+
put the non-deciding values in a typed `example` fixture at feature scope and write only
|
|
257
|
+
the deciding values as step overrides; reuse an example only where its meaning agrees across
|
|
258
|
+
features. If a rule needs a value no declaration carries, add the property (an input, event
|
|
259
|
+
field or view field) instead of explaining it in `description`.
|
|
260
|
+
- Comparison differs by `then` form. An event `then` states every required property and the
|
|
261
|
+
whole set of new facts must match (assert nothing extra, in order unless `events in any
|
|
262
|
+
order`). `then readmodel` and `then query` match as a subset of the stated properties unless
|
|
263
|
+
`exactly` is written, and a query's row count is always exact. Use `exactly` only when an
|
|
264
|
+
unexpected extra property must fail.
|
|
265
|
+
- A spec `description` names the behavior witnessed or an outside condition or regulation.
|
|
266
|
+
It never carries a fact that belongs in a `given`, a value or an outcome.
|
|
224
267
|
- Handoff after fixture work reports: the spec names added or changed; each meaningful fixture
|
|
225
268
|
change and why (a demonstrated contradiction, never a rule changed to fit); which existing
|
|
226
269
|
intentional examples were preserved; where a reused value came from (the event, command input
|
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md
CHANGED
|
@@ -29,6 +29,8 @@ Screenplay specifications.
|
|
|
29
29
|
| Then (success) | every expected event with payload and an explicit `for`, including events the command declares inline (the inline default applies to the `produces event` declaration, not to the expectation) | "an event is produced" |
|
|
30
30
|
| Then (refusal) | `then error "Invoice already settled"`, the rule's own message | `then error` with no message, or `then error ""` |
|
|
31
31
|
| Then (denial) | `then denied` | `then error` for a caller who is not allowed |
|
|
32
|
+
| Description | the behavior witnessed, or an outside condition or regulation | `description "customer already ordered twice"` with no givens (write two `given OrderPlaced` with the same `for`) |
|
|
33
|
+
| Values | the deciding values stated literally, others from a typed `example` | every field filled with noise, so the deciding value hides |
|
|
32
34
|
| Reason | slice `documentation` says why the rule exists | the rule appears only in a spec title |
|
|
33
35
|
|
|
34
36
|
## 1. Command: success, rule rejection and denial
|
|
@@ -33,3 +33,8 @@ This skill also adapts material from agentic-engineer by Martin Dilger and Nebul
|
|
|
33
33
|
(https://github.com/Nebulit-GmbH/agentic-engineer, commit 07b0f30648d663cb588d7e2c7aa031af9dfc21f2;
|
|
34
34
|
https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted
|
|
35
35
|
material remains credited to Martin Dilger and Nebulit GmbH.
|
|
36
|
+
|
|
37
|
+
This skill also adapts material from the Eventmodelers Build-Kits skills by Martin Dilger and
|
|
38
|
+
Nebulit GmbH (https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits; https://nebulit.de), used
|
|
39
|
+
with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted material remains credited
|
|
40
|
+
to Martin Dilger and Nebulit GmbH.
|
|
@@ -74,7 +74,8 @@ report and slice `documentation`, and continue.
|
|
|
74
74
|
separate reasons change these values, then split (`references/slicing.md` *Generic edits*).
|
|
75
75
|
One input per thing the caller decides or supplies; `identifier` on the property naming the
|
|
76
76
|
instance (omit only for allocation); inline `produces event <Name>` (no `for`) when the command owns the event; plain `produces <Name>` needs `for <identifier>`. Trace each input
|
|
77
|
-
(`references/field-lineage.md`)
|
|
77
|
+
(`references/field-lineage.md`) and list the values each rule reads: input, state or context
|
|
78
|
+
(`references/command-inventory.md`). A conditional input is a granularity question: two
|
|
78
79
|
decisions are two commands; one decision with a dependent rule is an implication
|
|
79
80
|
(`require a == false or b > c`). Never a boolean attestation input (`confirmsX == true`)
|
|
80
81
|
standing in for a rule. Place each rule in its layer (`references/rule-layers.md`). A rule
|
|
@@ -83,7 +84,7 @@ report and slice `documentation`, and continue.
|
|
|
83
84
|
`[ProtectedDecision]` + `DecisionRead<T>` on Arc 22.39.0+ (available to gap-fill
|
|
84
85
|
code with the Arc and Chronicle the Stage 4.73.1 scaffold pins); Chronicle DCB; or a constraint). Never copy state
|
|
85
86
|
into the command as input or hide a rule in `handler` / hint prose; descriptions reach code
|
|
86
|
-
only as XML comments
|
|
87
|
+
only as XML comments. Fill the **refusal inventory**: success, each distinct refusal with
|
|
87
88
|
layer and message, and the denied persona.
|
|
88
89
|
4. **Name and shape the event.** Past tense, the specific change that became true
|
|
89
90
|
(`LockerRelocated`, `VolumeCorrected`); never `XUpdated`/`Changed`/`Edited`/`Saved`/
|
|
@@ -131,7 +132,7 @@ report and slice `documentation`, and continue.
|
|
|
131
132
|
(`references/read-model-design.md`). One actor's point of view
|
|
132
133
|
per screen, at a real beat of the story, not one per persona for symmetry; know where the
|
|
133
134
|
actor sees each state change's result. Beyond Level 1: `cratis-screenplay-ui-composition`.
|
|
134
|
-
8. **Lineage pass.** Build the matrix in `references/field-lineage.md` from the `.play` files
|
|
135
|
+
8. **Lineage pass.** After each field edit run `--check field-origins,input-surfaces`. Build the matrix in `references/field-lineage.md` from the `.play` files
|
|
135
136
|
(read them), not from memory or an earlier summary. For each read model, write one line per
|
|
136
137
|
contributing event in its StateView slice `documentation`: which fields it sets and why. An
|
|
137
138
|
event with no reason does not belong in the view. A field without an origin is a gap: add
|
|
@@ -166,7 +167,7 @@ report and slice `documentation`, and continue.
|
|
|
166
167
|
- A `unique` constraint names a property the event declares directly; the constraint name is
|
|
167
168
|
its identity (renaming starts an empty index).
|
|
168
169
|
- Unauthorized is `then denied`; a broken rule is `then error`; authorization runs first.
|
|
169
|
-
- A mapping to an undeclared target fails only at binding (V3, PLAY0273); a declared property that nothing maps (for example after a one-sided rename that AutoMap relied on) is reported by
|
|
170
|
+
- A mapping to an undeclared target fails only at binding (V3, PLAY0273); a declared property that nothing maps (for example after a one-sided rename that AutoMap relied on) is reported by `field-origins` only where coverage is known: trace by hand too.
|
|
170
171
|
|
|
171
172
|
### Modeling defaults (follow unless the domain gives a reason not to)
|
|
172
173
|
|