@cratis/pi 7.51.2 → 7.51.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +7 -1
- package/package/corpus/rules/authoring-skills.md +7 -1
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +4 -55
- package/package/corpus/skills/cratis-application-slice-specifications/references/command-result-assertions.md +36 -0
- package/package/corpus/skills/cratis-application-slice-specifications/references/reading-play-specifications.md +30 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +4 -69
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authentication.md +8 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +9 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/frontend.md +19 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/identity-endpoints.md +40 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/local-development.md +7 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/product-sources.md +11 -0
- package/package/corpus/skills/cratis-arc-command/SKILL.md +8 -99
- package/package/corpus/skills/cratis-arc-command/references/causation-details.md +26 -0
- package/package/corpus/skills/cratis-arc-command/references/client-contract.md +16 -0
- package/package/corpus/skills/cratis-arc-command/references/event-source-id-details.md +13 -0
- package/package/corpus/skills/cratis-arc-command/references/generation-boundaries.md +8 -0
- package/package/corpus/skills/cratis-arc-command/references/product-sources.md +16 -0
- package/package/corpus/skills/cratis-arc-command/references/provide-example.md +19 -0
- package/package/corpus/skills/cratis-arc-command/references/proxy-generation.md +8 -0
- package/package/corpus/skills/cratis-arc-command/references/return-shape-examples.md +24 -0
- package/package/corpus/skills/cratis-arc-command-kotlin/SKILL.md +3 -61
- package/package/corpus/skills/cratis-arc-command-kotlin/references/artifacts.md +16 -0
- package/package/corpus/skills/cratis-arc-command-kotlin/references/authorization-override-example.md +17 -0
- package/package/corpus/skills/cratis-arc-command-kotlin/references/project-setup.md +40 -0
- package/package/corpus/skills/cratis-arc-command-typescript/SKILL.md +4 -105
- package/package/corpus/skills/cratis-arc-command-typescript/references/parameter-binding.md +26 -0
- package/package/corpus/skills/cratis-arc-command-typescript/references/project-setup.md +89 -0
- package/package/corpus/skills/cratis-arc-query-typescript/SKILL.md +3 -74
- package/package/corpus/skills/cratis-arc-query-typescript/references/product-sources.md +11 -0
- package/package/corpus/skills/cratis-arc-query-typescript/references/scenario-example.md +23 -0
- package/package/corpus/skills/cratis-arc-query-typescript/references/storage-examples.md +52 -0
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +3 -63
- package/package/corpus/skills/cratis-arc-react-page/references/data-page.md +28 -0
- package/package/corpus/skills/cratis-arc-react-page/references/dialogs.md +47 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +3 -80
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/connection-options.md +61 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/lifecycle.md +30 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +8 -101
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/client-options.md +43 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/idioms-and-inspection.md +35 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/product-sources.md +10 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/reactor-example.md +33 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +7 -88
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/annotations-and-handlers.md +32 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/append-concurrency.md +9 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/connection-string.md +27 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/event-type-annotations.md +9 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/product-sources.md +13 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/read-models-and-projections.md +29 -0
- package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +3 -103
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/connection-options.md +52 -0
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/lifecycle.md +31 -0
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/project-setup.md +36 -0
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +1 -21
- package/package/corpus/skills/cratis-chronicle-projection/references/definition-changes.md +27 -0
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +5 -110
- package/package/corpus/skills/cratis-chronicle-reactor/references/cross-service-events.md +13 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/filtering.md +34 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/read-model-injection.md +29 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/return-event-metadata.md +51 -0
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +7 -92
- package/package/corpus/skills/cratis-chronicle-reducer/references/filtering.md +36 -0
- package/package/corpus/skills/cratis-chronicle-reducer/references/instance-reducer-example.md +20 -0
- package/package/corpus/skills/cratis-chronicle-reducer/references/product-sources.md +8 -0
- package/package/corpus/skills/cratis-chronicle-reducer/references/replay-hooks-and-definition-changes.md +35 -0
- package/package/corpus/skills/cratis-chronicle-reducer/references/specification-example.md +15 -0
- package/package/corpus/skills/cratis-components-styling/SKILL.md +1 -15
- package/package/corpus/skills/cratis-components-styling/references/renderer-adapters.md +21 -0
- package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +1 -24
- package/package/corpus/skills/cratis-governed-release-methodology/references/lifecycle-phases.md +30 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +2 -15
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/product-sources.md +11 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +3 -93
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +37 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/trigger-declaration.md +48 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/trigger-reads-example.md +16 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +5 -97
- package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +9 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/constraints-produces-concurrency.md +89 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/routes-and-external-operations.md +21 -0
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +5 -38
- package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +14 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/neighbouring-skills.md +14 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +9 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/product-sources.md +16 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +6 -74
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/facilitation-stance.md +12 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/file-layout.md +19 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/modeling-reasoning.md +13 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/neighbouring-skills.md +16 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +33 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +6 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +2 -17
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +18 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +5 -89
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +6 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/layout.md +30 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/repairs.md +42 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/state-and-recovery.md +30 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +10 -42
- package/package/corpus/skills/cratis-screenplay-model-review/references/baseline-comparison.md +7 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +11 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/interview-batch.md +14 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/model-inventory-report.md +8 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +21 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +15 -68
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/completeness-self-check.md +12 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/handoff-template.md +15 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +9 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/independent-review.md +10 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/neighbouring-skills.md +10 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/per-turn-protocol.md +5 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/product-sources.md +9 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +12 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +25 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +8 -0
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +3 -67
- package/package/corpus/skills/cratis-screenplay-projections/references/joins.md +41 -0
- package/package/corpus/skills/cratis-screenplay-projections/references/variants.md +41 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +3 -31
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +9 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/neighbouring-skills.md +11 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/product-sources.md +23 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +11 -75
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/interview-batch.md +16 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/neighbouring-skills.md +10 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/public-event-coverage.md +12 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/quality-checklist.md +17 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/review-questions.md +9 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +28 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/version-skew.md +14 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +18 -94
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +25 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +9 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/identity-edits.md +14 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/model-reasoning.md +9 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/neighbouring-skills.md +10 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/product-sources.md +9 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/public-boundaries-and-keys.md +16 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +36 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +17 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +5 -63
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +6 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/outcome-comparison.md +33 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +40 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +11 -77
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +21 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +18 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/interview-batch.md +20 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/product-sources.md +12 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/review-questions.md +13 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +15 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +1 -8
- package/package/corpus/skills/cratis-screenplay-toolchain/references/neighbouring-skills.md +12 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +6 -99
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/file-references.md +38 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/layout-arrangement.md +31 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/localized-strings.md +15 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +6 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/ui-profile-and-theme.md +34 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +1 -10
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/neighbouring-skills.md +14 -0
- package/package.json +1 -1
|
@@ -12,32 +12,11 @@ which it only records, and what a retry, a race or a replay does. Grammar lives
|
|
|
12
12
|
skills; this skill owns the decisions. The `.play` model is the source of truth: a rule that
|
|
13
13
|
lives only in code, or only in a description, is a finding, not a solution.
|
|
14
14
|
|
|
15
|
-
**First append into a scope.** The default
|
|
16
|
-
strategy compares the scope's tail sequence number. When nothing matches the scope yet (the
|
|
17
|
-
first event on a new event source, or the first event of a new source type, stream type or
|
|
18
|
-
stream id), there is no tail and the append is **not checked**: two writers opening the same
|
|
19
|
-
source or narrowed partition can both succeed. This is the append most exposed to a race, so a
|
|
20
|
-
concurrency scope alone does not protect "only one writer may open this". For a target that
|
|
21
|
-
needs it:
|
|
22
|
-
- enable the check, application-wide with `ConcurrencyOptions.CheckFirstAppendIntoAScope`
|
|
23
|
-
(default `false`) or per append with `ConcurrencyScopeBuilder.ExpectingNoMatchingEvent()`,
|
|
24
|
-
and handle the `ConcurrencyViolation` it can now raise; or
|
|
25
|
-
- use a unique event constraint, which the kernel enforces for every writer whether or not the
|
|
26
|
-
append declared a scope (the model's `unique event`).
|
|
27
|
-
Require target evidence that the check ran: a concurrent first-append scenario against a real
|
|
28
|
-
Chronicle, asserting one append wins, one is rejected, and `IAppendResult.ConcurrencyCheckPerformed`
|
|
29
|
-
is `true` (a skipped check and a passing one look identical otherwise; a current client against
|
|
30
|
-
an older kernel always reads `false`). Treat the default as unchecked until target evidence shows otherwise (a future major release can flip the default, so read the target's release notes). The Stage scaffold pins Chronicle client/kernel and Arc releases (see `cratis-stage-rendering-and-sandbox` `references/rendered-application.md`;
|
|
31
|
-
the CLI bundle's Chronicle follows the installed CLI: `cratis --version`); the APIs exist for gap-fill, not as automatically rendered enforcement.
|
|
15
|
+
**First append into a scope is not checked by default.** The optimistic strategy compares the scope's tail sequence number; with no matching event yet there is no tail, so two writers opening the same source can both succeed. A concurrency scope alone does not protect "only one writer may open this": enable `ConcurrencyOptions.CheckFirstAppendIntoAScope` or `ExpectingNoMatchingEvent()`, or use a unique event constraint. Treat the default as unchecked until target evidence shows otherwise. Read [references/consistency-and-concurrency.md](references/consistency-and-concurrency.md) ("First append into a scope") for the options and the evidence to require.
|
|
32
16
|
|
|
33
17
|
## Product sources
|
|
34
18
|
|
|
35
|
-
|
|
36
|
-
Chronicle (CHR0012, CHR0034 and the constraint and concurrency behavior below), Arc
|
|
37
|
-
(`[ProtectedDecision]`, `DecisionRead<T>`) and Stage (rendered apps pin the Arc and
|
|
38
|
-
Chronicle client/kernel listed in the Stage skill's `references/rendered-application.md`;
|
|
39
|
-
protected-read APIs are available to gap-fill). Tool versions: `cratis-screenplay-toolchain`
|
|
40
|
-
`SKILL.md`. Re-check the Chronicle limits below before relying on a constraint in a new release.
|
|
19
|
+
Read [references/product-sources.md](references/product-sources.md) when checking a rule against the Screenplay, Chronicle, Arc or Stage sources.
|
|
41
20
|
|
|
42
21
|
## When / when not
|
|
43
22
|
- Use: choosing `identifier` and `for`; adding or naming a `constraint`; a rule that depends on
|
|
@@ -57,22 +36,7 @@ missing, one question at a time, with options. **Unattended:** assume the most c
|
|
|
57
36
|
option, mark it `ASSUMED` in the slice or module `documentation` and in the session `STATE.md`
|
|
58
37
|
(`.ai-work/screenplay/<model-slug>/STATE.md`), and continue.
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
end?" Follow-up: if the answer needs "and" for two lifecycles, ask which facts live
|
|
62
|
-
independently of the other.
|
|
63
|
-
2. **Competition.** "Can two people do this at once, and what must never happen then?" Follow-up:
|
|
64
|
-
for each answer ask whether it is a uniqueness, a count or a state rule.
|
|
65
|
-
3. **Retry.** "If the reply is lost and the client sends the request again, what should the
|
|
66
|
-
second request see?" Follow-up: is the identifier chosen before the first attempt?
|
|
67
|
-
4. **Ownership** (full protocol and options in `references/boundaries.md`). Who decides these
|
|
68
|
-
rules and operates them when they fail; how much can each side move alone; which external
|
|
69
|
-
systems take part and who owns each adapter; what delay or disagreement the business
|
|
70
|
-
tolerates. Follow-up on technical-function teams: which business capability does each serve?
|
|
71
|
-
5. **Growth.** "Roughly how many events per instance per year, over how many years, and which
|
|
72
|
-
commands read the stream versus a view?" Follow-up: if the estimate is large, check the
|
|
73
|
-
identity before anything else (`references/stream-patterns.md`, Growth and snapshots).
|
|
74
|
-
6. **Change.** "Has this event ever been stored in a running system?" It decides whether an edit
|
|
75
|
-
is ordinary or contract evolution.
|
|
39
|
+
Ask only what is missing: (1) instance - what real-world thing the stream is about; (2) competition - what must never happen when two people act at once; (3) retry - what a repeated request should see; (4) ownership; (5) growth; (6) change - whether the event was ever stored in a running system. Read [references/interview-batch.md](references/interview-batch.md) for each question's follow-up; ownership options are in `references/boundaries.md`.
|
|
76
40
|
|
|
77
41
|
## Procedure
|
|
78
42
|
1. **Establish identity and membership.** For every `concept XId` used as an `identifier`, write
|
|
@@ -127,9 +91,8 @@ option, mark it `ASSUMED` in the slice or module `documentation` and in the sess
|
|
|
127
91
|
meaning change, rename, removal, split or merge) and write its compatibility scenarios before
|
|
128
92
|
editing. Admit the **release baseline** in the release job; admitted
|
|
129
93
|
revisions need `newGeneration`. Modes/CLI/MCP: `references/evolution.md`.
|
|
130
|
-
Pin persisted/public enum member numbers before reordering or removing
|
|
131
|
-
|
|
132
|
-
executable bytes; non-positional pins need ESM v12 consumer admission.
|
|
94
|
+
Pin persisted/public enum member numbers before reordering or removing members (`references/evolution.md`, "Enum member numbers").
|
|
95
|
+
|
|
133
96
|
Renames and other identity-affecting edits are made by the identity owner (the
|
|
134
97
|
identity procedure in `cratis-screenplay-modeling-lifecycle`).
|
|
135
98
|
6. **Test ownership and interfaces** with `references/boundaries.md`: ownership interview,
|
|
@@ -148,13 +111,8 @@ option, mark it `ASSUMED` in the slice or module `documentation` and in the sess
|
|
|
148
111
|
- Constraint names are application-wide identities (PLAY0392); properties must be declared
|
|
149
112
|
directly on the event (PLAY0391); never mix event and property rules under one name (PLAY0135);
|
|
150
113
|
`ignore casing` is not allowed on `unique event` (PLAY0393).
|
|
151
|
-
- Generations are declared in full, numbered 1..N without gaps, in the same slice
|
|
152
|
-
|
|
153
|
-
shape is PLAY0449. An `id` pin equal to the event's current name is PLAY0471 (information).
|
|
154
|
-
Differing pins carry `storedName` in ESM v16;
|
|
155
|
-
equal-name pins are no-ops. Pins are event-name identifiers, shared by all
|
|
156
|
-
generations and unique application-wide (PLAY0472). Consumers must admit v16;
|
|
157
|
-
a renderer that stops before v16 does not. See `references/evolution.md`.
|
|
114
|
+
- Generations are declared in full, numbered 1..N without gaps, in the same slice (PLAY0446-0448); `id` pins are shared by all generations and unique application-wide (PLAY0472); `storedName` needs ESM v16. See `references/evolution.md` ("Generations, pins and storedName diagnostics").
|
|
115
|
+
|
|
158
116
|
- `reads` is PLAY0271 and `require` over read-model paths is PLAY0268 at binding. A `concurrency`
|
|
159
117
|
block compiles but is PLAY0271 at binding. Keep both when they state real intent; they are not
|
|
160
118
|
protection. `description` text never reaches rendered code: a rule that lives only in prose is
|
|
@@ -164,17 +122,8 @@ option, mark it `ASSUMED` in the slice or module `documentation` and in the sess
|
|
|
164
122
|
refuse PLAY0268 (command-surface `references/compliance.md`). Legacy markers are
|
|
165
123
|
deprecated (PLAY0565). Never remove protection to pass a tool. PLAY0515 also refuses
|
|
166
124
|
scalar/composite stream-id types and route mapping sources, including nested paths.
|
|
167
|
-
- Stream-id literals must be nonempty
|
|
168
|
-
|
|
169
|
-
has no such bound but is unadmitted. PLAY0504 is an error for route/destination
|
|
170
|
-
nominal type mismatch. Composite ids use at least two named scalar parts,
|
|
171
|
-
complete named mappings and canonical comparison, not guessed legacy splits.
|
|
172
|
-
Stored key-schema changes require a new stream identity or migration; see
|
|
173
|
-
toolchain `references/sources-and-streams.md`. A stored stream name exactly `All` (name or `id "All"`) refuses binding with
|
|
174
|
-
PLAY0273, parallel to source `Default`. Streams `all`, `ALL` and `Default`
|
|
175
|
-
remain valid. Rename via `propose-rename`; a pin retaining `All` cannot fix it.
|
|
176
|
-
Existing `All` history reads as source-only appends, not the renamed stream.
|
|
177
|
-
Source evidence and migration limits are in that reference.
|
|
125
|
+
- Stream-id literals must be nonempty NFC text; composite ids use at least two named scalar parts; PLAY0504 is an error for route/destination type mismatch; a stored stream name exactly `All` refuses binding with PLAY0273 (rename via `propose-rename`). Read [references/stream-id-rules.md](references/stream-id-rules.md) when choosing stream-id types, literals, composite ids or renaming a stream.
|
|
126
|
+
|
|
178
127
|
- Chronicle limits: before 19.59.6 (InMemory: 19.59.3) the SQL and InMemory providers do not settle unique claims (see the Requires line below);
|
|
179
128
|
index updates run after commit and may fail silently; composite values can
|
|
180
129
|
collide on the separator. A declared constraint is a declaration, not a runtime test.
|
|
@@ -208,15 +157,7 @@ Requires Chronicle 19.59.6 or later (19.59.3 for the InMemory provider) for the
|
|
|
208
157
|
- Team and system often align, but not by law: decide modules on ownership, language and change
|
|
209
158
|
cadence, and record where they differ.
|
|
210
159
|
|
|
211
|
-
**Review questions** (findings only with a domain consequence)
|
|
212
|
-
- What single question does this stream answer? Does it grow for the right reason?
|
|
213
|
-
- What happens when two people do this at the same moment? When the reply is lost?
|
|
214
|
-
- Is any stream a collection or a log wearing an instance's name (decision tree and red flags in
|
|
215
|
-
`references/stream-patterns.md`)?
|
|
216
|
-
- Does an optional property cover two situations that the business names differently?
|
|
217
|
-
- Does a consumer in another module depend on an event we treat as internal?
|
|
218
|
-
- Could this calculated value matter historically (price, assessment)? Then it may be a fact.
|
|
219
|
-
- Is "eventually consistent" here a business choice, or an unexamined gap?
|
|
160
|
+
**Review questions** (findings only with a domain consequence): read [references/review-questions.md](references/review-questions.md) for the stream, race, optional-property, boundary and eventual-consistency questions (decision tree and red flags for collection- or log-shaped streams are in `references/stream-patterns.md`).
|
|
220
161
|
|
|
221
162
|
## Gate
|
|
222
163
|
Do not report done until all hold; otherwise report what is open:
|
|
@@ -241,14 +182,7 @@ Do not report done until all hold; otherwise report what is open:
|
|
|
241
182
|
`bash` the repository's compile check over this skill folder.
|
|
242
183
|
|
|
243
184
|
## Route near misses
|
|
244
|
-
-
|
|
245
|
-
`cratis-screenplay-projections`; compiler facts and traps: `cratis-screenplay-toolchain`.
|
|
246
|
-
- Chronicle C# compliance and event-source ids: `cratis-chronicle-event-modeling`.
|
|
247
|
-
- Reactions, todo lists, captures, external facts: `cratis-screenplay-automations-and-translations`.
|
|
248
|
-
- Commands, read models and lineage: `cratis-screenplay-slice-design`. Specs:
|
|
249
|
-
`cratis-screenplay-scenario-coverage`.
|
|
250
|
-
- Reviewing someone else's model: `cratis-screenplay-model-review`.
|
|
251
|
-
- Rendering and the code left to write after it: `cratis-screenplay-render-and-gap-fill`.
|
|
185
|
+
Read [references/neighbouring-skills.md](references/neighbouring-skills.md) when the work is grammar, Chronicle C# compliance, reactions, slice design, review or rendering rather than stream and consistency decisions.
|
|
252
186
|
|
|
253
187
|
## Lineage
|
|
254
188
|
Adapted in part from TrogonStack/agentskills (MIT); attribution and provenance entries are in
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
- 8. Projection lag and rebuild
|
|
13
13
|
- 9. Corrections and backdated facts
|
|
14
14
|
- 10. Specification limits (no local spec engine)
|
|
15
|
+
- First append into a scope
|
|
15
16
|
|
|
16
17
|
For installed tool versions see `SKILL.md` of `cratis-screenplay-toolchain`.
|
|
17
18
|
|
|
@@ -209,3 +210,23 @@ behaviour. Write the answer in the slice `documentation`.
|
|
|
209
210
|
- These are sequential histories. They do not run simultaneous commands or prove race safety;
|
|
210
211
|
concurrent execution and failure-recovery tests belong to the target implementer, reported
|
|
211
212
|
separately.
|
|
213
|
+
|
|
214
|
+
## First append into a scope
|
|
215
|
+
|
|
216
|
+
**First append into a scope.** The default optimistic
|
|
217
|
+
strategy compares the scope's tail sequence number. When nothing matches the scope yet (the
|
|
218
|
+
first event on a new event source, or the first event of a new source type, stream type or
|
|
219
|
+
stream id), there is no tail and the append is **not checked**: two writers opening the same
|
|
220
|
+
source or narrowed partition can both succeed. This is the append most exposed to a race, so a
|
|
221
|
+
concurrency scope alone does not protect "only one writer may open this". For a target that
|
|
222
|
+
needs it:
|
|
223
|
+
- enable the check, application-wide with `ConcurrencyOptions.CheckFirstAppendIntoAScope`
|
|
224
|
+
(default `false`) or per append with `ConcurrencyScopeBuilder.ExpectingNoMatchingEvent()`,
|
|
225
|
+
and handle the `ConcurrencyViolation` it can now raise; or
|
|
226
|
+
- use a unique event constraint, which the kernel enforces for every writer whether or not the
|
|
227
|
+
append declared a scope (the model's `unique event`).
|
|
228
|
+
Require target evidence that the check ran: a concurrent first-append scenario against a real
|
|
229
|
+
Chronicle, asserting one append wins, one is rejected, and `IAppendResult.ConcurrencyCheckPerformed`
|
|
230
|
+
is `true` (a skipped check and a passing one look identical otherwise; a current client against
|
|
231
|
+
an older kernel always reads `false`). Treat the default as unchecked until target evidence shows otherwise (a future major release can flip the default, so read the target's release notes). The Stage scaffold pins Chronicle client/kernel and Arc releases (see `cratis-stage-rendering-and-sandbox` `references/rendered-application.md`;
|
|
232
|
+
the CLI bundle's Chronicle follows the installed CLI: `cratis --version`); the APIs exist for gap-fill, not as automatically rendered enforcement.
|
package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
- Compatibility scenarios (write before editing)
|
|
9
9
|
- Identity rules
|
|
10
10
|
- Identity owner
|
|
11
|
+
- Generations, pins and storedName diagnostics
|
|
12
|
+
- Enum member numbers
|
|
11
13
|
|
|
12
14
|
Stored facts outlive the code and the model that wrote them. Plan a change by asking what
|
|
13
15
|
happens to facts already stored, to every reader of the event, and to the deployment window
|
|
@@ -141,3 +143,19 @@ the catalog-changing request to the owner; never leave a requested change silent
|
|
|
141
143
|
events are gap-fill, with migrations hand-written per `cratis-chronicle-event-type-migration`.
|
|
142
144
|
|
|
143
145
|
Complete compiled example: `evolution-example.md` (generation, rename pin, meaning change).
|
|
146
|
+
|
|
147
|
+
## Generations, pins and storedName diagnostics
|
|
148
|
+
|
|
149
|
+
- Generations are declared in full, numbered 1..N without gaps, in the same slice
|
|
150
|
+
(PLAY0446-0448). Referencing a removed property is PLAY0273; a `given` needing a previous-generation
|
|
151
|
+
shape is PLAY0449. An `id` pin equal to the event's current name is PLAY0471 (information).
|
|
152
|
+
Differing pins carry `storedName` in ESM v16;
|
|
153
|
+
equal-name pins are no-ops. Pins are event-name identifiers, shared by all
|
|
154
|
+
generations and unique application-wide (PLAY0472). Consumers must admit v16;
|
|
155
|
+
a renderer that stops before v16 does not. See `references/evolution.md`.
|
|
156
|
+
|
|
157
|
+
## Enum member numbers
|
|
158
|
+
|
|
159
|
+
Pin persisted/public enum member numbers before reordering or removing
|
|
160
|
+
members; never renumber or reuse a published number. Positional pins preserve
|
|
161
|
+
executable bytes; non-positional pins need ESM v12 consumer admission.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Interview batch for streams and consistency
|
|
2
|
+
|
|
3
|
+
The six interview questions, with follow-ups.
|
|
4
|
+
|
|
5
|
+
1. **Instance.** "What is the real-world thing this stream is about, and when does it start and
|
|
6
|
+
end?" Follow-up: if the answer needs "and" for two lifecycles, ask which facts live
|
|
7
|
+
independently of the other.
|
|
8
|
+
2. **Competition.** "Can two people do this at once, and what must never happen then?" Follow-up:
|
|
9
|
+
for each answer ask whether it is a uniqueness, a count or a state rule.
|
|
10
|
+
3. **Retry.** "If the reply is lost and the client sends the request again, what should the
|
|
11
|
+
second request see?" Follow-up: is the identifier chosen before the first attempt?
|
|
12
|
+
4. **Ownership** (full protocol and options in `references/boundaries.md`). Who decides these
|
|
13
|
+
rules and operates them when they fail; how much can each side move alone; which external
|
|
14
|
+
systems take part and who owns each adapter; what delay or disagreement the business
|
|
15
|
+
tolerates. Follow-up on technical-function teams: which business capability does each serve?
|
|
16
|
+
5. **Growth.** "Roughly how many events per instance per year, over how many years, and which
|
|
17
|
+
commands read the stream versus a view?" Follow-up: if the estimate is large, check the
|
|
18
|
+
identity before anything else (`references/stream-patterns.md`, Growth and snapshots).
|
|
19
|
+
6. **Change.** "Has this event ever been stored in a running system?" It decides whether an edit
|
|
20
|
+
is ordinary or contract evolution.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Neighbouring skills
|
|
2
|
+
|
|
3
|
+
Which skill owns each task next to stream and consistency design.
|
|
4
|
+
|
|
5
|
+
- Construct grammar: `cratis-screenplay-command-surface` (identifier, `for`, constraints),
|
|
6
|
+
`cratis-screenplay-projections`; compiler facts and traps: `cratis-screenplay-toolchain`.
|
|
7
|
+
- Chronicle C# compliance and event-source ids: `cratis-chronicle-event-modeling`.
|
|
8
|
+
- Reactions, todo lists, captures, external facts: `cratis-screenplay-automations-and-translations`.
|
|
9
|
+
- Commands, read models and lineage: `cratis-screenplay-slice-design`. Specs:
|
|
10
|
+
`cratis-screenplay-scenario-coverage`.
|
|
11
|
+
- Reviewing someone else's model: `cratis-screenplay-model-review`.
|
|
12
|
+
- Rendering and the code left to write after it: `cratis-screenplay-render-and-gap-fill`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Product sources
|
|
2
|
+
|
|
3
|
+
Sources behind the stream and consistency rules.
|
|
4
|
+
|
|
5
|
+
## Product sources
|
|
6
|
+
|
|
7
|
+
Screenplay (`identifier`, `for`, constraints, generations, `id` pins and their diagnostics),
|
|
8
|
+
Chronicle (CHR0012, CHR0034 and the constraint and concurrency behavior below), Arc
|
|
9
|
+
(`[ProtectedDecision]`, `DecisionRead<T>`) and Stage (rendered apps pin the Arc and
|
|
10
|
+
Chronicle client/kernel listed in the Stage skill's `references/rendered-application.md`;
|
|
11
|
+
protected-read APIs are available to gap-fill). Tool versions: `cratis-screenplay-toolchain`
|
|
12
|
+
`SKILL.md`. Re-check the Chronicle limits below before relying on a constraint in a new release.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Review questions
|
|
2
|
+
|
|
3
|
+
Questions to ask when reviewing streams and consistency.
|
|
4
|
+
|
|
5
|
+
**Review questions** (findings only with a domain consequence)
|
|
6
|
+
- What single question does this stream answer? Does it grow for the right reason?
|
|
7
|
+
- What happens when two people do this at the same moment? When the reply is lost?
|
|
8
|
+
- Is any stream a collection or a log wearing an instance's name (decision tree and red flags in
|
|
9
|
+
`references/stream-patterns.md`)?
|
|
10
|
+
- Does an optional property cover two situations that the business names differently?
|
|
11
|
+
- Does a consumer in another module depend on an event we treat as internal?
|
|
12
|
+
- Could this calculated value matter historically (price, assessment)? Then it may be a fact.
|
|
13
|
+
- Is "eventually consistent" here a business choice, or an unexamined gap?
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Stream-id literals, composite ids and the reserved `All` name
|
|
2
|
+
|
|
3
|
+
Rules for stream-id literals, composite ids and the reserved `All` stream name.
|
|
4
|
+
|
|
5
|
+
- Stream-id literals must be nonempty, well-formed NFC text (refused,
|
|
6
|
+
not normalized); integer ids in Double mode stay within ±(2^53−1). Exact mode
|
|
7
|
+
has no such bound but is unadmitted. PLAY0504 is an error for route/destination
|
|
8
|
+
nominal type mismatch. Composite ids use at least two named scalar parts,
|
|
9
|
+
complete named mappings and canonical comparison, not guessed legacy splits.
|
|
10
|
+
Stored key-schema changes require a new stream identity or migration; see
|
|
11
|
+
toolchain `references/sources-and-streams.md`. A stored stream name exactly `All` (name or `id "All"`) refuses binding with
|
|
12
|
+
PLAY0273, parallel to source `Default`. Streams `all`, `ALL` and `Default`
|
|
13
|
+
remain valid. Rename via `propose-rename`; a pin retaining `All` cannot fix it.
|
|
14
|
+
Existing `All` history reads as source-only appends, not the renamed stream.
|
|
15
|
+
Source evidence and migration limits are in that reference.
|
|
@@ -207,11 +207,4 @@ does not. It is separate from compilation and `--warnaserror`.
|
|
|
207
207
|
|
|
208
208
|
## Route near misses
|
|
209
209
|
|
|
210
|
-
-
|
|
211
|
-
- MCP editing loop, proposals, identities: `cratis-screenplay-model-authoring`.
|
|
212
|
-
- Construct depth: `cratis-screenplay-command-surface`, `cratis-screenplay-projections`,
|
|
213
|
-
`cratis-screenplay-read-surface`, `cratis-screenplay-captures-and-reactions`,
|
|
214
|
-
`cratis-screenplay-specifications`, `cratis-screenplay-ui-composition`.
|
|
215
|
-
- Rendering and gap-fill: `cratis-screenplay-render-and-gap-fill`,
|
|
216
|
-
`cratis-stage-rendering-and-sandbox`.
|
|
217
|
-
- Running systems (Chronicle server operations through the `cratis` CLI, with its authorization boundaries): `cratis-chronicle-cli-operations`.
|
|
210
|
+
Read [references/neighbouring-skills.md](references/neighbouring-skills.md) when the work is modeling phases, MCP editing, construct depth, rendering or running systems.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Neighbouring skills
|
|
2
|
+
|
|
3
|
+
Which skill owns each task next to the toolchain.
|
|
4
|
+
|
|
5
|
+
- What to model, phases, gates: `cratis-screenplay-modeling-lifecycle`.
|
|
6
|
+
- MCP editing loop, proposals, identities: `cratis-screenplay-model-authoring`.
|
|
7
|
+
- Construct depth: `cratis-screenplay-command-surface`, `cratis-screenplay-projections`,
|
|
8
|
+
`cratis-screenplay-read-surface`, `cratis-screenplay-captures-and-reactions`,
|
|
9
|
+
`cratis-screenplay-specifications`, `cratis-screenplay-ui-composition`.
|
|
10
|
+
- Rendering and gap-fill: `cratis-screenplay-render-and-gap-fill`,
|
|
11
|
+
`cratis-stage-rendering-and-sandbox`.
|
|
12
|
+
- Running systems (Chronicle server operations through the `cratis` CLI, with its authorization boundaries): `cratis-chronicle-cli-operations`.
|
|
@@ -45,11 +45,8 @@ routes, toolbars and dialog destinations, each with a separate support level
|
|
|
45
45
|
installed shape through MCP `syntax-schema`; details:
|
|
46
46
|
`references/screen-composition-contract.md`.
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
dispatches on had a keyword entry. On an older language-service version they still
|
|
51
|
-
look unrecognized — **check `screenplay`, not the editor**, because absent
|
|
52
|
-
highlighting was never evidence that a construct is wrong.
|
|
48
|
+
Absent editor highlighting is never evidence that a construct is wrong: check `screenplay`, not the editor (see [references/screen-composition-contract.md](references/screen-composition-contract.md)).
|
|
49
|
+
|
|
53
50
|
|
|
54
51
|
## Compose in this order
|
|
55
52
|
|
|
@@ -106,31 +103,7 @@ A slot is declared once by name, optionally marked
|
|
|
106
103
|
|
|
107
104
|
## `arrangement` — responsive `flow` or pixel-precise `freeform`
|
|
108
105
|
|
|
109
|
-
|
|
110
|
-
or `regular` — phone landscape, phone portrait, desktop short, desktop tall.
|
|
111
|
-
|
|
112
|
-
**`arrangement flow`** nests slots under `row`, `column` or `grid` containers.
|
|
113
|
-
|
|
114
|
-
- A container may declare `gap <n>`.
|
|
115
|
-
- A slot leaf takes `width <n>`, `height <n>`, `grow`, and `span <n>` for grid tracks.
|
|
116
|
-
- `when width <class>[, height <class>]` or `when height <class>` **replaces the
|
|
117
|
-
entire tree** for that condition — it is not a partial override.
|
|
118
|
-
|
|
119
|
-
**`arrangement freeform`** declares one variant per matrix point. Excerpt, inside
|
|
120
|
-
the `layout` above in place of its `arrangement flow`:
|
|
121
|
-
|
|
122
|
-
```screenplay excerpt
|
|
123
|
-
arrangement freeform
|
|
124
|
-
variant width regular, height regular
|
|
125
|
-
place navigation at 0,0 size 240,fill
|
|
126
|
-
place content at 240,0 size fill,fill
|
|
127
|
-
variant width compact, height regular
|
|
128
|
-
place navigation hidden
|
|
129
|
-
place content at 0,0 size fill,fill
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
`place <Slot> at <x>,<y> size <w>,<h>` where either dimension may be `fill`, or
|
|
133
|
-
`place <Slot> hidden` to drop the slot from that variant entirely.
|
|
106
|
+
A `when width/height <class>` variant replaces the entire tree for that condition, never a partial override. Read [references/layout-arrangement.md](references/layout-arrangement.md) when writing `flow` containers, `freeform` variants or `place` lines.
|
|
134
107
|
|
|
135
108
|
## `screen template` and `dialog template`
|
|
136
109
|
|
|
@@ -306,81 +279,15 @@ nested/failure scopes, PLAY0485, examples and tagged evidence.
|
|
|
306
279
|
|
|
307
280
|
## `ui profile` and `theme`
|
|
308
281
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
```screenplay excerpt
|
|
312
|
-
ui profile Desktop
|
|
313
|
-
target platform web
|
|
314
|
-
target size regular
|
|
315
|
-
layout AppShell
|
|
316
|
-
theme Nordic
|
|
317
|
-
packages
|
|
318
|
-
Cratis.Components
|
|
319
|
-
|
|
320
|
-
theme Nordic
|
|
321
|
-
compatible with Cratis.Components
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
- `target platform` takes a comma-separated list. `web`, `ios` and `android` are
|
|
325
|
-
the documented examples; ⚠️ **the parser accepts any identifier** — there is no
|
|
326
|
-
enforced list, so a typo is silent.
|
|
327
|
-
- `target size` is documented as `compact`, `regular` or `expanded`; ⚠️ again any
|
|
328
|
-
identifier parses.
|
|
329
|
-
- `packages` are listed **in override-priority order** — a later package's `Button`
|
|
330
|
-
shadows an earlier one's — and `core`, the built-in vocabulary, is always the
|
|
331
|
-
final fallback.
|
|
332
|
-
- Component package metadata is owned by the package/runtime catalog; the model
|
|
333
|
-
selects packages and icons, never copying metadata into `.play`.
|
|
334
|
-
- `compatible with` lists the packages a theme actually supports, each at most
|
|
335
|
-
once. A profile selecting a theme not declared compatible with one of its own
|
|
336
|
-
packages gets a compile-time **warning**.
|
|
282
|
+
A `ui profile` selects the layout, theme and `packages`, listed in override-priority order (a later package shadows an earlier one); `target platform` and `target size` accept any identifier, so a typo is silent. Read [references/ui-profile-and-theme.md](references/ui-profile-and-theme.md) when writing a profile or theme.
|
|
337
283
|
|
|
338
284
|
## Localized strings
|
|
339
285
|
|
|
340
|
-
Localized text lives in companion `.strings` files
|
|
341
|
-
`MySystem.<locale>.strings`, line-based, dotted keys, `=` assignment, `//`
|
|
342
|
-
comments. `{placeholder}` tokens are kept verbatim for runtime substitution.
|
|
343
|
-
|
|
344
|
-
Reference them with `$strings.<dotted.key>`, unquoted, anywhere a literal is
|
|
345
|
-
accepted in: a validation rule's `message`; a screen action, table column or
|
|
346
|
-
summary field `label`; a screen or section `title`; a contribution `label`; and a
|
|
347
|
-
form field `label`. The value is stored as the literal text `$strings.<key>`, and
|
|
348
|
-
the printer emits it unquoted so a round trip preserves it.
|
|
286
|
+
Localized text lives in companion `.strings` files and is referenced unquoted as `$strings.<dotted.key>`. Read [references/localized-strings.md](references/localized-strings.md) when localizing messages, labels or titles.
|
|
349
287
|
|
|
350
288
|
## `file` — implementation or provenance, never a substitute
|
|
351
289
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
- **Backend implementation attachment.** On a command `handler` (which never
|
|
355
|
-
binds, `PLAY0268`), a validation
|
|
356
|
-
rule predicate, a query `performer`, a reducer rule, a reaction trigger, a
|
|
357
|
-
`constraint` and a `policy`, `file` stands in for the inline body: the
|
|
358
|
-
implementation lives there. These are the files a host inventories.
|
|
359
|
-
- **UI realization file.** On a `screen`, `file` names the file that realizes
|
|
360
|
-
the screen. It sits on the **screen itself**, not on a directive inside it:
|
|
361
|
-
`File` is a member of `ScreenSyntax`, and the directive types have no such
|
|
362
|
-
member. Screens are deferred from the executable model (`PLAY0269`), and the
|
|
363
|
-
attachment loader does not collect screen files: they are never loaded, hashed
|
|
364
|
-
or checked, so a missing screen file gets no `PLAY0430`–`PLAY0434` warning.
|
|
365
|
-
- **Provenance.** On a **pure declaration** — `concept`, `type`, `event`,
|
|
366
|
-
`readmodel`, `projection`, `slice`, `specification`, top-level `trigger` — it
|
|
367
|
-
only records which file realizes it.
|
|
368
|
-
|
|
369
|
-
The rules:
|
|
370
|
-
|
|
371
|
-
- **Repository relative, never absolute** (an absolute path is warning `PLAY0264`).
|
|
372
|
-
- **Syntax compilation never resolves it.** The `screenplay` tool and
|
|
373
|
-
`PlayFileCompiler` do not read files, so a stale path does not invalidate the
|
|
374
|
-
document. A host that loads attachments (the MCP server, `AttachmentFiles.Load`)
|
|
375
|
-
reads **backend implementation** files only, resolved from the model root
|
|
376
|
-
rather than the `.play` file's directory, to hash their content; a refused or
|
|
377
|
-
missing file stays unresolved with a `PLAY0430`–`PLAY0434` warning. Screen
|
|
378
|
-
files and declaration-only `file` references are never read; check a screen
|
|
379
|
-
file's path yourself.
|
|
380
|
-
- **It never replaces the declaration** — a `projection` still declares its
|
|
381
|
-
blocks, an `event` still declares its properties.
|
|
382
|
-
- **Loaded is not run.** Screenplay hashes attached code and can map an inline
|
|
383
|
-
body back to its source for an editor, but never compiles or executes it.
|
|
290
|
+
`file` is a backend attachment, a screen realization file or declaration provenance; use repository-relative paths (`PLAY0264`) and never let it replace the declaration. **Loaded is not run.** Read [references/file-references.md](references/file-references.md) when attaching or checking a `file`, or diagnosing `PLAY0430`–`PLAY0434`.
|
|
384
291
|
|
|
385
292
|
## Verify
|
|
386
293
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# The file directive
|
|
2
|
+
|
|
3
|
+
This reference holds the three meanings of `file` and the rules for paths and loading.
|
|
4
|
+
|
|
5
|
+
## `file` — implementation or provenance, never a substitute
|
|
6
|
+
|
|
7
|
+
Three meanings, one word:
|
|
8
|
+
|
|
9
|
+
- **Backend implementation attachment.** On a command `handler` (which never
|
|
10
|
+
binds, `PLAY0268`), a validation
|
|
11
|
+
rule predicate, a query `performer`, a reducer rule, a reaction trigger, a
|
|
12
|
+
`constraint` and a `policy`, `file` stands in for the inline body: the
|
|
13
|
+
implementation lives there. These are the files a host inventories.
|
|
14
|
+
- **UI realization file.** On a `screen`, `file` names the file that realizes
|
|
15
|
+
the screen. It sits on the **screen itself**, not on a directive inside it:
|
|
16
|
+
`File` is a member of `ScreenSyntax`, and the directive types have no such
|
|
17
|
+
member. Screens are deferred from the executable model (`PLAY0269`), and the
|
|
18
|
+
attachment loader does not collect screen files: they are never loaded, hashed
|
|
19
|
+
or checked, so a missing screen file gets no `PLAY0430`–`PLAY0434` warning.
|
|
20
|
+
- **Provenance.** On a **pure declaration** — `concept`, `type`, `event`,
|
|
21
|
+
`readmodel`, `projection`, `slice`, `specification`, top-level `trigger` — it
|
|
22
|
+
only records which file realizes it.
|
|
23
|
+
|
|
24
|
+
The rules:
|
|
25
|
+
|
|
26
|
+
- **Repository relative, never absolute** (an absolute path is warning `PLAY0264`).
|
|
27
|
+
- **Syntax compilation never resolves it.** The `screenplay` tool and
|
|
28
|
+
`PlayFileCompiler` do not read files, so a stale path does not invalidate the
|
|
29
|
+
document. A host that loads attachments (the MCP server, `AttachmentFiles.Load`)
|
|
30
|
+
reads **backend implementation** files only, resolved from the model root
|
|
31
|
+
rather than the `.play` file's directory, to hash their content; a refused or
|
|
32
|
+
missing file stays unresolved with a `PLAY0430`–`PLAY0434` warning. Screen
|
|
33
|
+
files and declaration-only `file` references are never read; check a screen
|
|
34
|
+
file's path yourself.
|
|
35
|
+
- **It never replaces the declaration** — a `projection` still declares its
|
|
36
|
+
blocks, an `event` still declares its properties.
|
|
37
|
+
- **Loaded is not run.** Screenplay hashes attached code and can map an inline
|
|
38
|
+
body back to its source for an editor, but never compiles or executes it.
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/layout-arrangement.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Layout arrangement
|
|
2
|
+
|
|
3
|
+
This reference holds the responsive `flow` and pixel-precise `freeform` arrangement forms.
|
|
4
|
+
|
|
5
|
+
## `arrangement` — responsive `flow` or pixel-precise `freeform`
|
|
6
|
+
|
|
7
|
+
The size-class matrix is **2×2**: width `compact` or `regular`, height `compact`
|
|
8
|
+
or `regular` — phone landscape, phone portrait, desktop short, desktop tall.
|
|
9
|
+
|
|
10
|
+
**`arrangement flow`** nests slots under `row`, `column` or `grid` containers.
|
|
11
|
+
|
|
12
|
+
- A container may declare `gap <n>`.
|
|
13
|
+
- A slot leaf takes `width <n>`, `height <n>`, `grow`, and `span <n>` for grid tracks.
|
|
14
|
+
- `when width <class>[, height <class>]` or `when height <class>` **replaces the
|
|
15
|
+
entire tree** for that condition — it is not a partial override.
|
|
16
|
+
|
|
17
|
+
**`arrangement freeform`** declares one variant per matrix point. Excerpt, inside
|
|
18
|
+
the `layout` above in place of its `arrangement flow`:
|
|
19
|
+
|
|
20
|
+
```screenplay excerpt
|
|
21
|
+
arrangement freeform
|
|
22
|
+
variant width regular, height regular
|
|
23
|
+
place navigation at 0,0 size 240,fill
|
|
24
|
+
place content at 240,0 size fill,fill
|
|
25
|
+
variant width compact, height regular
|
|
26
|
+
place navigation hidden
|
|
27
|
+
place content at 0,0 size fill,fill
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`place <Slot> at <x>,<y> size <w>,<h>` where either dimension may be `fill`, or
|
|
31
|
+
`place <Slot> hidden` to drop the slot from that variant entirely.
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/localized-strings.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Localized strings
|
|
2
|
+
|
|
3
|
+
This reference holds the `.strings` file format and where `$strings` references are accepted.
|
|
4
|
+
|
|
5
|
+
## Localized strings
|
|
6
|
+
|
|
7
|
+
Localized text lives in companion `.strings` files — `MySystem.play` pairs with
|
|
8
|
+
`MySystem.<locale>.strings`, line-based, dotted keys, `=` assignment, `//`
|
|
9
|
+
comments. `{placeholder}` tokens are kept verbatim for runtime substitution.
|
|
10
|
+
|
|
11
|
+
Reference them with `$strings.<dotted.key>`, unquoted, anywhere a literal is
|
|
12
|
+
accepted in: a validation rule's `message`; a screen action, table column or
|
|
13
|
+
summary field `label`; a screen or section `title`; a contribution `label`; and a
|
|
14
|
+
form field `label`. The value is stored as the literal text `$strings.<key>`, and
|
|
15
|
+
the printer emits it unquoted so a round trip preserves it.
|
|
@@ -340,3 +340,9 @@ columns, `on row-click navigate to <Screen> by <param>`, sections, conditional
|
|
|
340
340
|
`when … execute … with … from …` actions and localized labels.
|
|
341
341
|
The AI corpus may link to that path and name the expected checks, but must not copy
|
|
342
342
|
the `.play` source into `.cratis/ai/` or maintain a second canonical application.
|
|
343
|
+
|
|
344
|
+
These constructs went unhighlighted and uncompleted by the Monaco and VS Code
|
|
345
|
+
language service until every construct the parser
|
|
346
|
+
dispatches on had a keyword entry. On an older language-service version they still
|
|
347
|
+
look unrecognized — **check `screenplay`, not the editor**, because absent
|
|
348
|
+
highlighting was never evidence that a construct is wrong.
|
package/package/corpus/skills/cratis-screenplay-ui-composition/references/ui-profile-and-theme.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# UI profile and theme
|
|
2
|
+
|
|
3
|
+
This reference holds the `ui profile` and `theme` excerpt and its rules for platforms, sizes, package order and theme compatibility.
|
|
4
|
+
|
|
5
|
+
## `ui profile` and `theme`
|
|
6
|
+
|
|
7
|
+
Excerpt: `AppShell` is the layout above.
|
|
8
|
+
|
|
9
|
+
```screenplay excerpt
|
|
10
|
+
ui profile Desktop
|
|
11
|
+
target platform web
|
|
12
|
+
target size regular
|
|
13
|
+
layout AppShell
|
|
14
|
+
theme Nordic
|
|
15
|
+
packages
|
|
16
|
+
Cratis.Components
|
|
17
|
+
|
|
18
|
+
theme Nordic
|
|
19
|
+
compatible with Cratis.Components
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- `target platform` takes a comma-separated list. `web`, `ios` and `android` are
|
|
23
|
+
the documented examples; ⚠️ **the parser accepts any identifier** — there is no
|
|
24
|
+
enforced list, so a typo is silent.
|
|
25
|
+
- `target size` is documented as `compact`, `regular` or `expanded`; ⚠️ again any
|
|
26
|
+
identifier parses.
|
|
27
|
+
- `packages` are listed **in override-priority order** — a later package's `Button`
|
|
28
|
+
shadows an earlier one's — and `core`, the built-in vocabulary, is always the
|
|
29
|
+
final fallback.
|
|
30
|
+
- Component package metadata is owned by the package/runtime catalog; the model
|
|
31
|
+
selects packages and icons, never copying metadata into `.play`.
|
|
32
|
+
- `compatible with` lists the packages a theme actually supports, each at most
|
|
33
|
+
once. A profile selecting a theme not declared compatible with one of its own
|
|
34
|
+
packages gets a compile-time **warning**.
|
|
@@ -234,13 +234,4 @@ recoverable publication) instead.
|
|
|
234
234
|
|
|
235
235
|
## Route near misses
|
|
236
236
|
|
|
237
|
-
-
|
|
238
|
-
MCP), `cratis-screenplay-event-modeling` (method), and the per-surface
|
|
239
|
-
`cratis-screenplay-*` skills.
|
|
240
|
-
- Which tool says what, and diagnostics: `cratis-screenplay-toolchain`.
|
|
241
|
-
- Running the render workflow end to end and gap-fill: `cratis-screenplay-render-and-gap-fill`.
|
|
242
|
-
- Understanding the generated command, validator or read model as C#: `cratis-arc-command`
|
|
243
|
-
and `cratis-chronicle-read-model`; checking hand-written code against its slice:
|
|
244
|
-
`cratis-application-slice-conformance`.
|
|
245
|
-
- Inspecting the Chronicle store the sandbox writes into: `cratis-chronicle-cli-operations`
|
|
246
|
-
and `cratis-chronicle-web-workbench`.
|
|
237
|
+
Read [references/neighbouring-skills.md](references/neighbouring-skills.md) when the work is authoring or checking the model, tooling, the render workflow, generated C# or the Chronicle store.
|
package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/neighbouring-skills.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Neighbouring skills
|
|
2
|
+
|
|
3
|
+
Which skill owns each task next to Stage rendering.
|
|
4
|
+
|
|
5
|
+
- Writing or checking the `.play` model: `cratis-screenplay-model-authoring` (compiler and
|
|
6
|
+
MCP), `cratis-screenplay-event-modeling` (method), and the per-surface
|
|
7
|
+
`cratis-screenplay-*` skills.
|
|
8
|
+
- Which tool says what, and diagnostics: `cratis-screenplay-toolchain`.
|
|
9
|
+
- Running the render workflow end to end and gap-fill: `cratis-screenplay-render-and-gap-fill`.
|
|
10
|
+
- Understanding the generated command, validator or read model as C#: `cratis-arc-command`
|
|
11
|
+
and `cratis-chronicle-read-model`; checking hand-written code against its slice:
|
|
12
|
+
`cratis-application-slice-conformance`.
|
|
13
|
+
- Inspecting the Chronicle store the sandbox writes into: `cratis-chronicle-cli-operations`
|
|
14
|
+
and `cratis-chronicle-web-workbench`.
|