@cratis/pi 7.6.4 → 7.7.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/backend-developer.md +14 -0
- package/package/corpus/agents/code-reviewer.md +16 -0
- package/package/corpus/agents/coordinator.md +17 -0
- package/package/corpus/agents/frontend-developer.md +17 -0
- package/package/corpus/agents/orchestrator.md +18 -0
- package/package/corpus/agents/planner.md +24 -0
- package/package/corpus/agents/screenplay-modeler.md +57 -0
- package/package/corpus/agents/screenplay-renderer.md +42 -0
- package/package/corpus/agents/screenplay-reviewer.md +45 -0
- package/package/corpus/agents/slice-implementer.md +32 -5
- package/package/corpus/agents/spec-writer.md +16 -3
- package/package/corpus/prompts/add-reactor.prompt.md +5 -3
- package/package/corpus/prompts/new-vertical-slice.prompt.md +16 -5
- package/package/corpus/prompts/write-specs.prompt.md +12 -6
- package/package/corpus/rules/application-profile.md +7 -3
- package/package/corpus/rules/general.md +8 -3
- package/package/corpus/rules/glossary.md +1 -1
- package/package/corpus/rules/profiles.md +42 -4
- package/package/corpus/rules/reactors.md +30 -22
- package/package/corpus/rules/vertical-slices.md +3 -1
- package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +13 -0
- package/package/corpus/skills/cratis-application-slice-conformance/LICENSE +2 -0
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +173 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +66 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +49 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +23 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/worked-example.md +91 -0
- package/package/corpus/skills/cratis-application-slice-conformance/verification.json +14 -0
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +57 -1
- package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +16 -0
- package/package/corpus/skills/cratis-arc-command/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +68 -8
- package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +199 -0
- package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +10 -0
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +38 -10
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +13 -0
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -0
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +58 -6
- package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +9 -0
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +13 -0
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +47 -0
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/provenance.md +11 -0
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +13 -0
- package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +13 -0
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +35 -16
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +28 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +166 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +31 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +139 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +69 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +88 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +64 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +37 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +34 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +208 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +126 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +93 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/worked-integration.md +98 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +15 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +267 -50
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +185 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +60 -12
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +42 -12
- package/package/corpus/skills/cratis-screenplay-discovery/LICENSE +30 -0
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +229 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/divergent-sweep.md +37 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +64 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +62 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +222 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +66 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +152 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +111 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +37 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +119 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/worked-session.md +87 -0
- package/package/corpus/skills/cratis-screenplay-discovery/verification.json +15 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +140 -77
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +51 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +114 -28
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +50 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +28 -3
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/LICENSE +31 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +239 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/chronicle-observations.md +25 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +79 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/expert-verification.md +48 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +75 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +164 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +88 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +47 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +147 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +10 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +36 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +126 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +57 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +52 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/verification.json +17 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +95 -54
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +50 -20
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +211 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +45 -5
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +64 -7
- package/package/corpus/skills/cratis-screenplay-model-review/LICENSE +34 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +209 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +89 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +128 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +176 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +36 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +149 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +59 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +255 -0
- package/package/corpus/skills/cratis-screenplay-model-review/verification.json +13 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +32 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +239 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/code-reading-and-tokens.md +55 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/handoff-template.md +124 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +84 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +48 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phase-report-inventories.md +25 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +162 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +53 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +63 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/reasoning-notes.md +31 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +31 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +46 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +204 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +55 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +86 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +16 -0
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +14 -3
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +15 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/LICENSE +2 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +179 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +99 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md +67 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +72 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +27 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +56 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +124 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +14 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/LICENSE +31 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +200 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +579 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/chronicle-verification.md +24 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +102 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +41 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +196 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md +102 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +71 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +91 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +13 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/LICENSE +30 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +236 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +107 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +130 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +20 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +201 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +23 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +41 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +122 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +305 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/verification.json +43 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +217 -36
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +28 -4
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/LICENSE +33 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +191 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +154 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +54 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +191 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +70 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +65 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +128 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +378 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +14 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/LICENSE +2 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +177 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +121 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +319 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +96 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +107 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +48 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +113 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +148 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +267 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +51 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +88 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +51 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +134 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +134 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +15 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +53 -5
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/flow-review.md +56 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +65 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +4 -1
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +44 -1
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +10 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +186 -219
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +177 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +150 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +87 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +98 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +19 -0
- package/package/profile-catalog.json +11 -0
- package/package.json +1 -1
package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Vocabulary map
|
|
2
|
+
|
|
3
|
+
Use the Screenplay term in models and reports. Board terms are for orientation when a user
|
|
4
|
+
speaks in them; never model board mechanics (lanes, node ids, positions).
|
|
5
|
+
|
|
6
|
+
| Event Modeling | Screenplay (`.play`) | Chronicle / Arc (C#) | Cratis corpus skill area |
|
|
7
|
+
|---|---|---|---|
|
|
8
|
+
| State Change pattern | `StateChange` slice: `command`, `event`, `constraint`, `screen`, `specification` | command + handler appending events to the event log | `cratis-screenplay-*` commands/events; Chronicle event and command skills |
|
|
9
|
+
| State View pattern | `StateView` slice: `readmodel`, `projection`/`reducer`, `query`, `screen` | read model fed by a projection or reducer; query | projections, reducers, queries |
|
|
10
|
+
| Automation pattern | `Automation` slice: `reaction` (`when`, `invokes`/`produces`), clock/trigger occurrences | reactor (side effect) and/or follow-up command | Chronicle reactor skills (see "automation vs reaction") |
|
|
11
|
+
| Translation pattern | `Translate` slice: `capture`, or a `reaction` translating imported external events | ingestion/adapter appending own events | Screenplay capture skills |
|
|
12
|
+
| Command (blue) | `command` | command record + handler | commands |
|
|
13
|
+
| Event (orange) | `event` (past tense) | event type appended to an event sequence | events |
|
|
14
|
+
| Read model / view (green) | `readmodel` + `query` | read model + query | read models |
|
|
15
|
+
| Wireframe / screen | `screen` | UI (Arc proxies, frontend) | screens / frontend |
|
|
16
|
+
| Actor / persona lane | `persona` with `policy` lines | authorization (roles/claims) | personas/authorization |
|
|
17
|
+
| Swimlane (stream/system) | `module` (bounded area); event-source identity via `for` | event source id, event sequence | streams / event sources |
|
|
18
|
+
| Chapter / workflow | `feature` | feature folder | vertical slices |
|
|
19
|
+
| Slice | `slice` (one behaviour, not one artifact of each kind) | vertical slice folder | vertical slices |
|
|
20
|
+
| Scenario (Given/When/Then) | `specification` | generated spec class `when_<spec_name>` (Debug) or hand-written C# specs | `cratis-screenplay-specifications`; C# spec skills |
|
|
21
|
+
| Storyline (ordered beats) | a **family** of specifications sharing example data, each one transition (no storyline syntax today) | several spec classes | specifications |
|
|
22
|
+
| Field validation | concept `validate` (every use) / command `validate`, `require` | `ConceptValidator<T>` / `CommandValidator<T>` | command validation |
|
|
23
|
+
| Role permission ("Cannot") | `policy` + `authorize` + `then denied` spec; ownership via `claim ... matches subject` | `[Authorize(Policy)]`, generated policies | authorization |
|
|
24
|
+
| Precondition on stream state | `reads` + `require` as stated intent, not enforced today (target: Arc `[ProtectedDecision]` + `DecisionRead<T>`, or Chronicle DCB; `[ProtectedDecision]` is not available in Stage-rendered apps) | decision over a guarded read | command validation |
|
|
25
|
+
| Generated id (`derived:uuid4()`) | `generated` (authorable, not executable) | id supplied before `Handle()` | commands |
|
|
26
|
+
| External system / outbound call | `Translate` slice (inbound); `system`/`operation` (authorable, not executable) or Automation (outbound) | `ICommandOperation` / reactor | operations, reactors |
|
|
27
|
+
| HTML mockup | `screen` Level 1 + board (`visualize-model`) | default Scene composition | ui composition |
|
|
28
|
+
| Event sequence / inbox, outbox / observer | event source `for` identity / not modeled in `.play` (record as target) / `reaction` or projection | event sequence / inbox, outbox / observer | event sources, observers |
|
|
29
|
+
| Ready (corpus behaviour lifecycle) | P6 accepted on a source identity | n/a | n/a |
|
|
30
|
+
| Todo list | a read model listing open work + a `reaction` that closes items via events | read model + reactor | automations |
|
|
31
|
+
|
|
32
|
+
## Translation has one current meaning
|
|
33
|
+
Translation (`Translate` slice) is outside data becoming our own facts: a `capture`, or a
|
|
34
|
+
translator reaction over an imported external event. The corpus glossary defines it this way. Older
|
|
35
|
+
text in some corpus files used "translation" for a reactor that appends follow-up events or returns
|
|
36
|
+
a command for another slice; that is an **Automation** (`produces` or `invokes`). Model by the
|
|
37
|
+
Screenplay meaning, and when you meet the older usage, translate it and say so.
|
|
38
|
+
|
|
39
|
+
## Automation vs reaction vs reactor
|
|
40
|
+
- Event Modeling **Automation**: a processor triggered by events or time, often reading a todo
|
|
41
|
+
list, issuing a command or producing an event.
|
|
42
|
+
- Screenplay **`reaction`**: the construct that models it (`when` trigger, optional `where`,
|
|
43
|
+
`invokes` a command or `produces` events).
|
|
44
|
+
- Chronicle **reactor**: C# observer, usually for side effects; it does not by itself define
|
|
45
|
+
business decisions. A Screenplay reaction is authorable and bindable, but Stage `v4.24.0` renders no Automation or
|
|
46
|
+
Translate slice: the reactor and command are gap-fill code.
|
|
47
|
+
|
|
48
|
+
## Scenario vs specification
|
|
49
|
+
"Scenario" is the Event Modeling example and the scenario *types* `cratis-screenplay-scenario-coverage` uses for
|
|
50
|
+
coverage. "Specification" is the Screenplay construct that states one scenario in
|
|
51
|
+
given/when/then. Report coverage in scenarios, author specifications.
|
|
52
|
+
|
|
53
|
+
## State Change vs `StateChange`
|
|
54
|
+
Prose: "state change" (the pattern). Code: `StateChange` (the slice kind). Same for
|
|
55
|
+
State View/`StateView`, Translation/`Translate`.
|
package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Worked example: reasoning description, constraint, decided rejection
|
|
2
|
+
|
|
3
|
+
A marina berth allocation feature. The feature `description` carries the reasoning (scope, an
|
|
4
|
+
assumption tied to Q1, a rule kept as a constraint). The refusal for a boat that already holds a
|
|
5
|
+
berth is a specification, not a note. Complete and compiling with the standalone compiler and with
|
|
6
|
+
`cratis screenplay validate`.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
```screenplay
|
|
10
|
+
domain Marina.Berths
|
|
11
|
+
|
|
12
|
+
concept BerthId : Uuid
|
|
13
|
+
concept BoatName : String
|
|
14
|
+
|
|
15
|
+
policy HarbourOffice
|
|
16
|
+
require role "HarbourOffice"
|
|
17
|
+
|
|
18
|
+
persona HarbourMaster
|
|
19
|
+
description "Allocates berths. Does: allocate a berth to a boat. Cannot: allocate without the HarbourOffice role."
|
|
20
|
+
policy HarbourOffice
|
|
21
|
+
|
|
22
|
+
module Berths
|
|
23
|
+
feature Allocation
|
|
24
|
+
description "Allocating a berth to a boat. A boat holds one berth at a time; that rule is the OneBerthPerBoat constraint, not a second event type. Assumption Q1: allocation is always manual, so no automation is modeled."
|
|
25
|
+
authorize HarbourOffice
|
|
26
|
+
|
|
27
|
+
slice StateChange AllocateBerth
|
|
28
|
+
command AllocateBerth
|
|
29
|
+
berthId BerthId identifier
|
|
30
|
+
boat BoatName
|
|
31
|
+
produces BerthAllocated
|
|
32
|
+
for berthId
|
|
33
|
+
boat = boat
|
|
34
|
+
|
|
35
|
+
event BerthAllocated
|
|
36
|
+
boat BoatName
|
|
37
|
+
|
|
38
|
+
constraint OneBerthPerBoat
|
|
39
|
+
unique boat on BerthAllocated
|
|
40
|
+
message "That boat already holds a berth"
|
|
41
|
+
|
|
42
|
+
specification AllocatingABerth
|
|
43
|
+
given caller
|
|
44
|
+
authenticated
|
|
45
|
+
role "HarbourOffice"
|
|
46
|
+
when AllocateBerth
|
|
47
|
+
berthId = "5d3c2a52-27c4-4d2b-a0ee-0a6a8a9f7b11"
|
|
48
|
+
boat = "Sea Wren"
|
|
49
|
+
then BerthAllocated
|
|
50
|
+
for "5d3c2a52-27c4-4d2b-a0ee-0a6a8a9f7b11"
|
|
51
|
+
boat = "Sea Wren"
|
|
52
|
+
|
|
53
|
+
specification RejectingASecondBerthForABoat
|
|
54
|
+
given caller
|
|
55
|
+
authenticated
|
|
56
|
+
role "HarbourOffice"
|
|
57
|
+
given BerthAllocated
|
|
58
|
+
for "5d3c2a52-27c4-4d2b-a0ee-0a6a8a9f7b11"
|
|
59
|
+
boat = "Sea Wren"
|
|
60
|
+
when AllocateBerth
|
|
61
|
+
berthId = "8e1f6c3a-6b7d-4c0e-9d5a-3f2b1a4c9e22"
|
|
62
|
+
boat = "Sea Wren"
|
|
63
|
+
then error "That boat already holds a berth"
|
|
64
|
+
|
|
65
|
+
specification RefusingACaller
|
|
66
|
+
given caller
|
|
67
|
+
authenticated
|
|
68
|
+
role "Visitor"
|
|
69
|
+
when AllocateBerth
|
|
70
|
+
berthId = "5d3c2a52-27c4-4d2b-a0ee-0a6a8a9f7b11"
|
|
71
|
+
boat = "Sea Wren"
|
|
72
|
+
then denied
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Why it is shaped this way
|
|
77
|
+
- The one-berth-per-boat rule (`unique boat` across berth event sources) is a constraint with a pinned message, so the competing-claim
|
|
78
|
+
specification can state the exact rejection. No `BerthReassigned` event was added to carry it.
|
|
79
|
+
- The `Cannot` line in the persona resolves to the `HarbourOffice` policy and a `then denied`
|
|
80
|
+
specification whose caller fixture carries a non-matching role.
|
|
81
|
+
- Assumption Q1 lives in the feature description and in STATE.md (Open questions) with its address,
|
|
82
|
+
`Berths.Allocation`.
|
|
83
|
+
- The description is rationale only: the rules themselves are enforced by the constraint, the policy
|
|
84
|
+
and the specifications, not by the prose.
|
|
85
|
+
- The constraint does not say a berth holds one boat at a time: a berth source may replace its
|
|
86
|
+
claimed boat. If berth occupancy must be unique too, model and specify that as its own invariant.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "cratis-screenplay-modeling-lifecycle",
|
|
3
|
+
"input": "Add a berth allocation feature to this Cratis application that already has a .cratis/screenplay model. How should the work be done and verified?",
|
|
4
|
+
"fixtures": [],
|
|
5
|
+
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": "Model first" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "`Outcome:`" },
|
|
8
|
+
{ "kind": "skill-contains", "value": "V3 binding-ready" },
|
|
9
|
+
{ "kind": "skill-contains", "value": "never a state copy" },
|
|
10
|
+
{ "kind": "skill-contains", "value": ".ai-work/screenplay/<model-slug>/STATE.md" },
|
|
11
|
+
{ "kind": "skill-contains", "value": "decided rejection" },
|
|
12
|
+
{ "kind": "skill-contains", "value": "same-model review" },
|
|
13
|
+
{ "kind": "skill-contains", "value": "`id` pins alone are not enough" },
|
|
14
|
+
{ "kind": "skill-contains", "value": "names a rename, move or removal is the approval for it" }
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -27,6 +27,7 @@ source is the single flow model.
|
|
|
27
27
|
| --- | --- | --- |
|
|
28
28
|
| `Cratis.Screenplay` | `4.31.0` | PDL parser, validator, diagnostics, semantic binder |
|
|
29
29
|
| `Cratis.Screenplay` | main `fd18129` | Inline event extraction and context identity guidance |
|
|
30
|
+
| `Cratis.Screenplay` | `4.64.0` (`7e16162`) | Reducer-body binding (`Semantics/`); no PDL syntax change affects the examples |
|
|
30
31
|
|
|
31
32
|
The update follows `commands.md`, `events.md` and `mcp/authoring-tools.md` at
|
|
32
33
|
that main commit (after v4.52.0); no PDL example changes in this update.
|
|
@@ -100,7 +101,10 @@ update the same instance only if the event source id happens to equal
|
|
|
100
101
|
`invoiceId`.
|
|
101
102
|
|
|
102
103
|
For same-source events, map the read-model identity from `$eventSourceId`
|
|
103
|
-
(or `$eventContext.eventSourceId`), not a duplicated payload field.
|
|
104
|
+
(or `$eventContext.eventSourceId`), not a duplicated payload field. That holds for
|
|
105
|
+
executable or design scope; in renderable scope (Stage) never map it from `$eventSourceId`:
|
|
106
|
+
the key of a scoped projection establishes it (`cratis-stage-rendering-and-sandbox`
|
|
107
|
+
`references/admission.md`). An event
|
|
104
108
|
declared by `produces event` is still a named slice-owned contract: projections
|
|
105
109
|
subscribe to it exactly like a standalone event. Verified extraction preserves
|
|
106
110
|
canonical ESM and identities, so it changes no projection contract. Removing a
|
|
@@ -310,7 +314,8 @@ What the executable model does with it (ESM v3):
|
|
|
310
314
|
- The body is an opaque attachment identified by a content hash, never compiled
|
|
311
315
|
or run by Screenplay. The reference runner cannot compute reducer state, so a
|
|
312
316
|
specification that reads a reducer-built read model reports unsupported and
|
|
313
|
-
never passes. A target must supply the transition.
|
|
317
|
+
never passes. A target must supply the transition. Stage 4.24.0 admits only pure reducer bodies
|
|
318
|
+
(Roslyn allowlist); an impure body is gap-fill code, and the model stays the contract.
|
|
314
319
|
|
|
315
320
|
**Prefer a projection where one will do.** A reducer is code, and code is the part
|
|
316
321
|
of a document a reader cannot check at a glance.
|
|
@@ -320,7 +325,10 @@ projection diagnostic codes, and worked examples.
|
|
|
320
325
|
|
|
321
326
|
## Verify
|
|
322
327
|
|
|
323
|
-
- [ ] `screenplay <model> --warnaserror` reports zero errors and zero
|
|
328
|
+
- [ ] Standalone `screenplay <model> --warnaserror` (4.64.0) reports zero errors and zero
|
|
329
|
+
warnings; with only the bundled compiler, `cratis screenplay validate
|
|
330
|
+
--warnings-as-errors` on the model folder (3.27.1 bundles Screenplay 4.60.1, ESM v5 or
|
|
331
|
+
lower). Name which tool produced the result.
|
|
324
332
|
- [ ] Each read model has **exactly one** builder.
|
|
325
333
|
- [ ] No projection-level `key`; every `from` that must address the same
|
|
326
334
|
instance is keyed on the same identity.
|
|
@@ -340,6 +348,9 @@ projection diagnostic codes, and worked examples.
|
|
|
340
348
|
- [ ] A reducer is present only because a projection genuinely could not express it,
|
|
341
349
|
and every rule has a body in a tagged fence or a `file`.
|
|
342
350
|
|
|
351
|
+
Versions, tool capabilities and the executable and renderable subsets: `cratis-screenplay-toolchain` (`references/versions.md`). Where a construct sits in the
|
|
352
|
+
method: `cratis-screenplay-modeling-lifecycle` and `cratis-screenplay-slice-design`.
|
|
353
|
+
|
|
343
354
|
## Route near misses
|
|
344
355
|
|
|
345
356
|
- Deciding which read models exist at all: `cratis-screenplay-event-modeling`.
|
|
@@ -26,6 +26,7 @@ source is the single flow model.
|
|
|
26
26
|
| --- | --- | --- |
|
|
27
27
|
| `Cratis.Screenplay` | `4.31.0` | Original parser, validator and binder evidence |
|
|
28
28
|
| `Cratis.Screenplay` | main `fd18129` | Canonical optionality; changed examples compiled |
|
|
29
|
+
| `Cratis.Screenplay` | `4.64.0` (`7e16162`) | Which query shapes bind and render (`Semantics/`, `Documentation/screenplay/queries.md`) |
|
|
29
30
|
|
|
30
31
|
The update follows `types.md`, `queries.md` and `vscode.md` at that main commit
|
|
31
32
|
(after v4.52.0). Compilation does not establish query execution.
|
|
@@ -75,6 +76,13 @@ query ListInvoices => InvoiceListReadModel[]
|
|
|
75
76
|
authorize IsAuthenticated
|
|
76
77
|
```
|
|
77
78
|
|
|
79
|
+
⚠️ **A list query is design-only.** `=> RM[]`, `observable`, `filter`, `scoped to` and
|
|
80
|
+
`performer` are valid model language, but neither the executable model nor Stage
|
|
81
|
+
4.24.0 binds or renders them (`PLAY0268`). Model them when the application needs them,
|
|
82
|
+
and keep a list the domain needs. A keyed `XById => RM optional` query with one `by` is
|
|
83
|
+
the shape that binds, runs in specifications and renders, but adding it beside a list
|
|
84
|
+
does not unblock anything: while a list remains, the whole application stays unbound.
|
|
85
|
+
|
|
78
86
|
Return-type forms after `=>`: `ReadModel`, `ReadModel optional`, `ReadModel[]`,
|
|
79
87
|
each optionally prefixed `observable`. `ReadModel[] optional` permits an absent
|
|
80
88
|
collection, not absent items. Legacy `Type?` reports information `PLAY0479`,
|
|
@@ -247,7 +255,10 @@ binding failures are errors.
|
|
|
247
255
|
|
|
248
256
|
## Verify
|
|
249
257
|
|
|
250
|
-
- [ ] `screenplay <model> --warnaserror` reports zero errors and zero
|
|
258
|
+
- [ ] Standalone `screenplay <model> --warnaserror` (4.64.0) reports zero errors and zero
|
|
259
|
+
warnings; with only the bundled compiler, `cratis screenplay validate
|
|
260
|
+
--warnings-as-errors` on the model folder (3.27.1 bundles Screenplay 4.60.1, ESM v5 or
|
|
261
|
+
lower). Name which tool produced the result.
|
|
251
262
|
- [ ] Every value the caller must not choose is a `from` parameter, not a `filter`.
|
|
252
263
|
- [ ] Every `scoped to global` is deliberate and defensible.
|
|
253
264
|
- [ ] `observable` is present exactly where the caller should see changes without
|
|
@@ -257,6 +268,9 @@ binding failures are errors.
|
|
|
257
268
|
- [ ] Each read model has exactly one builder and every field traces to an event.
|
|
258
269
|
- [ ] No screen reference is left ambiguous or unresolved.
|
|
259
270
|
|
|
271
|
+
Versions, tool capabilities and the executable and renderable subsets: `cratis-screenplay-toolchain` (`references/versions.md`). Where a construct sits in the
|
|
272
|
+
method: `cratis-screenplay-modeling-lifecycle` and `cratis-screenplay-slice-design`.
|
|
273
|
+
|
|
260
274
|
## Route near misses
|
|
261
275
|
|
|
262
276
|
- How events fill the read model: `cratis-screenplay-projections`.
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cratis-screenplay-render-and-gap-fill
|
|
3
|
+
description: "Deliver an accepted Screenplay `.play` model as code: probe whether `cratis render` admits the whole model, publish, then report admission, publication, Debug build and Debug tests as separate results mapped to the generated specification classes; triage model fix versus capability gap; bounded `Customizations/` adapters; drift by manifest revision; and hand non-renderable scope to `slice-implementer` with the model as the contract. Use when an accepted model must become running code, when asking whether a model renders, or after a model change. Not for: changing the model (use `cratis-screenplay-slice-design`), Stage internals (use `cratis-stage-rendering-and-sandbox`), or checking hand-written code against its slice (use `cratis-application-slice-conformance`)."
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Screenplay render and gap-fill
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Act as a **capability probe and deterministic delivery verifier**, not as a code author.
|
|
12
|
+
`cratis render` takes the whole application: if any reachable construct is outside what Stage
|
|
13
|
+
admits, that run publishes nothing. This skill finds out what renders, publishes it, proves it
|
|
14
|
+
builds and that its generated specifications pass, and reports everything else honestly.
|
|
15
|
+
Behaviour the renderer rejects is delivered by `slice-implementer` with the `.play` model as
|
|
16
|
+
the contract, never smuggled into `Customizations/`.
|
|
17
|
+
|
|
18
|
+
Model-first: the model is the source of truth, Stage-managed output is derived, and hand-written
|
|
19
|
+
code exists only for infrastructure, adapters and scope Stage cannot render yet. The decision
|
|
20
|
+
rule is in `cratis-screenplay-modeling-lifecycle` ("Decide the level first"); it is not restated here.
|
|
21
|
+
|
|
22
|
+
## Verified product sources
|
|
23
|
+
|
|
24
|
+
Version pins live once in `cratis-screenplay-toolchain` `references/versions.md`.
|
|
25
|
+
|
|
26
|
+
| Source | Pin | Used for |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| cratis CLI | `v3.27.1` (`a327e89`) | `cratis render` options, exit codes, publication receipt, bundled Screenplay 4.60.1 and Stage 4.24.0 |
|
|
29
|
+
| Stage | `v4.24.0` (`fa48546`) | admission (`STAGE-ESM-*`), ownership manifest, `Customizations/` seams, Debug-only specifications |
|
|
30
|
+
| Screenplay | `v4.64.0` (`7e16162`) | standalone compiler for V1 to V3; binding codes `PLAY0268` and the code-attachment rules |
|
|
31
|
+
| Rendered apps | Arc `22.25.0`, Chronicle `19.8.1` | `[ProtectedDecision]` (Arc 22.39.0 and later) is not available in code written into one |
|
|
32
|
+
|
|
33
|
+
Facts were read at those tags and `cratis render` was run at 3.27.1 for the worked example
|
|
34
|
+
(`references/worked-example.md`). The renderer facts are owned by `cratis-stage-rendering-and-sandbox`;
|
|
35
|
+
this skill links them and never restates the admission table.
|
|
36
|
+
|
|
37
|
+
## When to use / when not
|
|
38
|
+
|
|
39
|
+
- Use: an accepted model (P6, bound to a source identity) must become running code; "would this
|
|
40
|
+
render?"; a re-render after a model change; a drift check; a build failure in `Customizations/`.
|
|
41
|
+
- Not for: changing the model (return edit requests to the modeler session); choosing the mode
|
|
42
|
+
(the user); Stage internals and the sandbox (`cratis-stage-rendering-and-sandbox`); judging
|
|
43
|
+
hand-written code against its slice (`cratis-application-slice-conformance`).
|
|
44
|
+
|
|
45
|
+
## Interview phase
|
|
46
|
+
**Skip if** the request names the model root, the application name, the destination and the
|
|
47
|
+
decision on non-renderable scope. Otherwise ask only what is missing:
|
|
48
|
+
1. **Which model, which accepted version?** (root, source identity from the lifecycle report).
|
|
49
|
+
2. **Application name** for `--name` (it is part of the application identity: keep it identical on every re-render).
|
|
50
|
+
3. **Destination.** Default `.ai-work/screenplay/<model-slug>/render-probe/<App>`; any other destination needs the user's intent.
|
|
51
|
+
4. **If admission fails:** stay in design mode, change the model for business reasons, or gap-fill by hand? (the three cases below).
|
|
52
|
+
5. **Seams:** outside systems, styles or packages the rendered app needs (`Customizations/`).
|
|
53
|
+
|
|
54
|
+
Unattended: assume visibly (probe destination, default name from the model root folder), never
|
|
55
|
+
assume an answer to 4, and record it as `blocked` for the user.
|
|
56
|
+
|
|
57
|
+
## The three cases (decide first, say which one applies)
|
|
58
|
+
|
|
59
|
+
| Case | Situation | What happens |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| **A. Admission failure** | the probe reports blocking diagnostics | nothing was rendered or published by this run. Report the codes; the user chooses the next step (see "Procedure" 3) |
|
|
62
|
+
| **B. Generated base plus authorized gap-fill** | an earlier admitted whole-model render exists and the user separately authorized hand-written scope, or a seam the model names needs an adapter | the generated output stays managed and untouched; hand-written code lives in `Customizations/` or a separate project (seam adapters by this skill, business gap-fill by `slice-implementer`), serves named model elements only, never claims render admission, and V5 is reported for the generated base **with its scope stated** |
|
|
63
|
+
| **C. Fully hand-written delivery** | the scope cannot render and no generated base is wanted | `slice-implementer` delivers it with the model as the contract (`references/gap-fill-handoff.md`); V5 is `not run: no render` |
|
|
64
|
+
|
|
65
|
+
Two rules hold in every case: a customization never makes a rejected model renderable, and
|
|
66
|
+
a whole-application V5 is never claimed from a subset. The CLI renders whole applications
|
|
67
|
+
only; a dependency-closed scope selection does not exist, so do not fake one with an
|
|
68
|
+
import-only root file.
|
|
69
|
+
|
|
70
|
+
## Procedure
|
|
71
|
+
|
|
72
|
+
1. **Preconditions.** P6 has committed the accepted `.play` files and `.screenplay/identities.json`
|
|
73
|
+
when present; uncommitted model changes return to P6 before delivery. Record the source identity (`cratis-screenplay-modeling-lifecycle`
|
|
74
|
+
`references/verdicts-and-modes.md` "Source identity"), the model root, `--name`,
|
|
75
|
+
`--project-name`, `--root-namespace` and target `cratis`. Take V1 and V3 from
|
|
76
|
+
`cratis-screenplay-toolchain`; report each with tool and version. V3 from the standalone
|
|
77
|
+
compiler does not prove the cratis-bundled binder admits the model.
|
|
78
|
+
2. **Probe.** `cratis render <model-root> --name <App> --destination <probe-dir> -o json`
|
|
79
|
+
(exit 0 published, 5 refused with nothing published, 1 missing input). Classify every
|
|
80
|
+
diagnostic with `references/renderability-gate.md`: model fix in the chosen mode,
|
|
81
|
+
capability gap, tool skew or environment. Group by code and count; do not paste the list.
|
|
82
|
+
3. **When admission fails** (case A) present the options, the user decides:
|
|
83
|
+
(a) keep design mode and record the gaps; (b) narrow to renderable mode, where the modeler
|
|
84
|
+
changes the model for business reasons and **without** removing protection (`@pii`,
|
|
85
|
+
authorization, rules); (c) deliver the non-renderable scope by hand (case C), with a ledger
|
|
86
|
+
entry (`references/drift-and-ledger.md`). Partial render does not exist.
|
|
87
|
+
4. **Publish.** The probe destination by default. Another destination needs the user's intent;
|
|
88
|
+
`--force` needs approval naming its effect and destination (a request that already names them
|
|
89
|
+
counts). Read the receipt: written, unchanged, removed, `recovered`. `recovered: true` means
|
|
90
|
+
stop and reconcile. A refusal is a drift event, not an error to bypass.
|
|
91
|
+
5. **Build, then test**, each its own bounded call and only if the previous result passed. **Debug
|
|
92
|
+
only**: generated specifications compile under `#if DEBUG`. Use the repository's runner
|
|
93
|
+
with an explicit timeout (commands and reading the results: `references/delivery-protocol.md`).
|
|
94
|
+
Map results per `.play` specification through the generated classes: expected, with class,
|
|
95
|
+
passed, failed, no class.
|
|
96
|
+
6. **Seam adapters (Customizations only)** for a named seam; business gap-fill is `slice-implementer` work and needs the user's separate authorization (case B): read the declared hook signatures and
|
|
97
|
+
the generated types the adapter touches (bounded), write the adapter behind a small interface
|
|
98
|
+
with no business decisions, rebuild, retest. Never edit a managed file; never add behaviour the
|
|
99
|
+
model does not state. Detail: `references/delivery-protocol.md` section 4.
|
|
100
|
+
7. **Report authored-UI omissions.** Stage renders the default composition only; list each
|
|
101
|
+
modeled screen, form, layout, theme and persona view as "not rendered".
|
|
102
|
+
8. **Drift:** compare the published manifest's `semanticRevision` with a fresh render of the
|
|
103
|
+
current model under the same inputs (`references/drift-and-ledger.md`).
|
|
104
|
+
9. **Hand off** the packet: verdict lines, spec mapping, edit requests for the modeler, ledger
|
|
105
|
+
entries, UI omissions, learning candidates (at most 3).
|
|
106
|
+
|
|
107
|
+
## Hand-written parts
|
|
108
|
+
|
|
109
|
+
Adapters and non-renderable scope follow the contract rules of `cratis-application-slice-conformance`
|
|
110
|
+
(field inventory, specification mapping, delta delivery, never weaken a spec-derived test, the
|
|
111
|
+
`done | partial | blocked` status). They are linked here, not duplicated. What this skill adds:
|
|
112
|
+
|
|
113
|
+
- One ledger scope per `slice-implementer` brief; the brief carries addresses and paths, not contents.
|
|
114
|
+
- Model-enforced rules realized in code (state-dependent rules) need a protected read or
|
|
115
|
+
concurrency scope; never claim them from prose. In a Stage-rendered app, Arc is 22.25.0.
|
|
116
|
+
- Adapters that call outside systems follow `cratis-engineering-effect-boundaries`; slice
|
|
117
|
+
specifications follow `cratis-application-slice-specifications`.
|
|
118
|
+
- Realization notes in a slice `description` bind adapters and fallback code; executable parts
|
|
119
|
+
(specifications, mappings, constraints) win over prose, and a contradicting description is a model defect to report.
|
|
120
|
+
|
|
121
|
+
## Rules
|
|
122
|
+
|
|
123
|
+
- Compiler contract: what Stage admits is decided by the installed cratis CLI, not by the standalone
|
|
124
|
+
compiler (subsets: `cratis-screenplay-toolchain` `references/renderable-subset.md`).
|
|
125
|
+
- This skill changes no model. Model fixes are edit requests (address, change, rationale) to the owning session.
|
|
126
|
+
- Code reading is bounded: `Customizations/*`, the file and line a build or test error names,
|
|
127
|
+
and the declared hooks. Never browse managed output, `bin/` or `obj/`.
|
|
128
|
+
- `description` and `documentation` never reach rendered code. A rule stated only in prose is
|
|
129
|
+
unenforced there: ledger entry or target requirement, never "delivered".
|
|
130
|
+
- The `cratis run` sandbox enforces neither validation nor authorization on its default engine; it
|
|
131
|
+
is no evidence for denial behaviour.
|
|
132
|
+
- Never remove `@pii`, `@sensitive`, authorization or rules to get a render through; report the gap.
|
|
133
|
+
- Stop and ask only on a genuine contradiction between model, specs, descriptions and declared
|
|
134
|
+
contracts, after reading the slice fully (`cratis-screenplay-modeling-lifecycle` `references/stop-or-assume.md`).
|
|
135
|
+
- Commit set after a delivery the user accepts: the destination's `.cratis-render.json`,
|
|
136
|
+
managed output and `Customizations/`. The model and identity catalog were committed at P6.
|
|
137
|
+
Never `.cratis-render/` (the journal directory) and never `.ai-work/`.
|
|
138
|
+
- Limits stated in this text are prompt policy unless a guard enforces them; say so.
|
|
139
|
+
|
|
140
|
+
## Gate
|
|
141
|
+
|
|
142
|
+
Before reporting done:
|
|
143
|
+
- Source identity, tool versions, `--name` and destination are recorded.
|
|
144
|
+
- V5 is four lines: admission, publication, build (Debug), tests (Debug), each a result or `not run: <reason>`.
|
|
145
|
+
- Every diagnostic is classified; every non-renderable scope has a ledger entry or the user's decision to stay in design mode.
|
|
146
|
+
- No managed file was edited; no `--force` without approval naming it.
|
|
147
|
+
|
|
148
|
+
## Verify
|
|
149
|
+
|
|
150
|
+
- Expected specifications versus generated classes versus passed, listed; a count is not a mapping.
|
|
151
|
+
- Fallback delivery: the ledger entry maps specifications to tests, records the field inventory
|
|
152
|
+
and divergences, and `cratis-application-slice-conformance` returned a status.
|
|
153
|
+
- A passing test does not claim runtime guarantees (namespace, subject, constraint scope, guarded
|
|
154
|
+
reads, migrations, replay) or omitted UI were delivered.
|
|
155
|
+
- Re-render: drift line present. `Customizations/` changes name the seam and the model element served.
|
|
156
|
+
|
|
157
|
+
## Route near misses
|
|
158
|
+
|
|
159
|
+
- Changing the model, mode or slices: `cratis-screenplay-slice-design`, `cratis-screenplay-modeling-lifecycle`.
|
|
160
|
+
- Which specification forms Stage accepts: `cratis-screenplay-scenario-coverage`, `cratis-screenplay-specifications`.
|
|
161
|
+
- Verdict commands, subsets, versions: `cratis-screenplay-toolchain`.
|
|
162
|
+
- Renderer facts, publication recovery, sandbox: `cratis-stage-rendering-and-sandbox`.
|
|
163
|
+
- Automation or translation scope (the whole slice is gap-fill): `cratis-screenplay-automations-and-translations`.
|
|
164
|
+
- Hand-written code against its contract: `cratis-application-slice-conformance`.
|
|
165
|
+
- Code review of delivered code: `cratis-code-review`.
|
|
166
|
+
|
|
167
|
+
## References (load on demand)
|
|
168
|
+
|
|
169
|
+
- `references/renderability-gate.md` - classify the probe's codes, estimate the blast radius.
|
|
170
|
+
- `references/delivery-protocol.md` - inputs, commands, reading results, `Customizations/`.
|
|
171
|
+
- `references/gap-fill-handoff.md` - the brief for `slice-implementer`, ledger flow.
|
|
172
|
+
- `references/drift-and-ledger.md` - drift, publication refusals, the fallback ledger.
|
|
173
|
+
- `references/worked-example.md` - a refused render and its report, with a complete model.
|
|
174
|
+
- `references/provenance.md` - sources and attribution.
|
|
175
|
+
|
|
176
|
+
## Lineage
|
|
177
|
+
|
|
178
|
+
Draws on the earlier model render workflow and on the ideas of Nebulit's slice build
|
|
179
|
+
instructions (own words); see `references/provenance.md`.
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Delivery protocol
|
|
2
|
+
|
|
3
|
+
The render phase proves and publishes; it does not write business behaviour. Run one phase
|
|
4
|
+
per tool call and read each result from its exit status, never from a grep of the log.
|
|
5
|
+
|
|
6
|
+
## 1. Inputs to collect before the first command
|
|
7
|
+
- **Source identity** of the accepted model: the commit plus the digest of the explicit input
|
|
8
|
+
manifest (`cratis-screenplay-modeling-lifecycle` `references/verdicts-and-modes.md`, "Source
|
|
9
|
+
identity"). A dirty flag is never a revision. Bind the whole run to it; if it changes, start over.
|
|
10
|
+
- The **model root**. Use a dedicated folder: implementation attachments are read from it.
|
|
11
|
+
- **Render inputs:** `--name` (application identity, required for plain source, a C# identifier),
|
|
12
|
+
`--project-name`, `--root-namespace`, `--target cratis`. Keep them identical across
|
|
13
|
+
re-renders; changing the name or target makes publication refuse as an identity change.
|
|
14
|
+
- **Destination:** `.ai-work/screenplay/<model-slug>/render-probe/<App>` unless the user named another.
|
|
15
|
+
- Which modeled screens, personas and seams exist (UI omission list, section 4).
|
|
16
|
+
|
|
17
|
+
## 2. Commands
|
|
18
|
+
|
|
19
|
+
| Phase | Command | Result is |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| Admission and publication | `cratis render <root> --name <App> --destination <dir> [--project-name <P>] [--root-namespace <N>] -o json` (forward every option recorded in section 1) | exit 0 published (receipt on stdout), 5 refused (diagnostics, nothing published), 1 missing input |
|
|
22
|
+
| Debug build | `dotnet build <dir>/<Project>.csproj -c Debug` | the build's exit status |
|
|
23
|
+
| Debug tests | `dotnet test <dir>/<Project>.csproj -c Debug --no-build` | the test runner's exit status plus per-test results |
|
|
24
|
+
| List the generated classes | `dotnet test <dir>/<Project>.csproj -c Debug --no-build --list-tests` | the names to map to specifications |
|
|
25
|
+
|
|
26
|
+
`<Project>` is the project name the render used: the `--project-name` value when one was given,
|
|
27
|
+
otherwise the application name. Confirm it from the published `*.csproj` in the destination
|
|
28
|
+
before building, and never assume `<App>.csproj` when a `--project-name` was recorded.
|
|
29
|
+
|
|
30
|
+
Run build only after publication passed, tests only after the build of the same run. Re-render
|
|
31
|
+
after any model edit; never reuse an older destination. Give every build or test call an explicit
|
|
32
|
+
timeout and use the repository's own runner conventions; a timed-out or queued-out phase is
|
|
33
|
+
`not run: <reason>`, never a pass. For results worth keeping, ask the test runner for a results
|
|
34
|
+
file (for example `--logger "trx"` with a results directory under the probe folder) rather than parsing console text.
|
|
35
|
+
|
|
36
|
+
## 3. Reading results
|
|
37
|
+
- **Admission:** ok, or error codes classified with `renderability-gate.md`.
|
|
38
|
+
- **Publication:** written, unchanged and removed counts, plus `recovered`. `refused` when a managed file
|
|
39
|
+
was modified, an unmanaged file sits on a planned path, a modified stale file would be removed,
|
|
40
|
+
or the manifest identity changed (`drift-and-ledger.md`). Ok means `recovered: false` and
|
|
41
|
+
`written + unchanged` equal to the artifact count.
|
|
42
|
+
- **Build:** Debug exit status. Classify each error location as `Customizations/`, managed or outside.
|
|
43
|
+
An error in a managed file after a clean render is a renderer defect or an environment problem:
|
|
44
|
+
report it, never patch the file.
|
|
45
|
+
- **Tests:** map per `.play` specification. A command specification renders as class
|
|
46
|
+
`when_<snake>` in the namespace `<slice namespace>.when_<snake>`; a query assertion adds
|
|
47
|
+
`_is_queried`, a read-model assertion `_is_projected`. The snake form of a name is not always
|
|
48
|
+
what you would guess (`ReservingABerth` becomes `when_reserving_aberth`), so match against the
|
|
49
|
+
listed classes, never predict them. Report four numbers apart: expected specifications,
|
|
50
|
+
specifications with a generated class, passed, failed; list the specifications with no class.
|
|
51
|
+
xUnit totals are not the measure.
|
|
52
|
+
|
|
53
|
+
## 4. Customizations (bounded)
|
|
54
|
+
Two kinds of hand-written code exist next to a generated base, and they differ in who writes
|
|
55
|
+
them and what they may do:
|
|
56
|
+
|
|
57
|
+
- **Seam adapters** (this skill, renderer role): code behind a seam the model names or the user
|
|
58
|
+
asked for (an outbound adapter, a service registration, styles, packages). No business decisions.
|
|
59
|
+
- **Business gap-fill** (`slice-implementer`, only with the user's separate authorization, case B
|
|
60
|
+
in `SKILL.md`): hand-written realization of scope Stage cannot render, with the model as the
|
|
61
|
+
contract (`gap-fill-handoff.md`). It may live in `Customizations/` or a separate project. It
|
|
62
|
+
never claims render admission: the rejected model stays rejected, and V5 covers the generated base only.
|
|
63
|
+
|
|
64
|
+
Allowed seams in Stage's managed publication: `Customizations/Program.cs` implementing the
|
|
65
|
+
partial hooks `ConfigureServices(WebApplicationBuilder)` and `ConfigureApplication(WebApplication)`,
|
|
66
|
+
other `Customizations/*.cs`, `Customizations/Dependencies.props`, `Customizations/styles.css`.
|
|
67
|
+
Stage never plans or reads this folder; a module or feature that would render into it fails
|
|
68
|
+
with `STAGE-CRATIS-005`. Contract and re-render rules: `cratis-stage-rendering-and-sandbox`
|
|
69
|
+
`references/rendered-application.md`. These seams exist only in a generated application (cases A
|
|
70
|
+
with an earlier base, and B); in case C there is no generated `Program.cs`.
|
|
71
|
+
|
|
72
|
+
Seam adapter procedure:
|
|
73
|
+
1. Name the seam and the model element it serves ("outbound mail adapter for the notification
|
|
74
|
+
described on slice X"). No seam, no code.
|
|
75
|
+
2. Read, bounded: the hook signatures in the generated `Program.cs` and only the generated
|
|
76
|
+
types the adapter touches.
|
|
77
|
+
3. Write the adapter behind a small interface; keep business decisions out of it. An adapter
|
|
78
|
+
that calls an outside system follows `cratis-engineering-effect-boundaries`.
|
|
79
|
+
4. Build and test again, as separate calls.
|
|
80
|
+
|
|
81
|
+
Limits to state: services registered here are **not bound** to any Screenplay construct;
|
|
82
|
+
endpoints mapped here are anonymous; middleware order is fixed. A customization never makes a
|
|
83
|
+
rejected model renderable, and never turns a refusal into a V5 pass.
|
|
84
|
+
|
|
85
|
+
## 5. Done check (before reporting)
|
|
86
|
+
- Every modeled specification in the rendered scope has a generated class family that passed.
|
|
87
|
+
- No hand-written behaviour duplicates or extends a rendered slice.
|
|
88
|
+
- Seam adapters only serve named seams; authorized business gap-fill is in the ledger; no managed file was edited.
|
|
89
|
+
- UI omissions are listed: modeled screens, forms, layouts, themes and persona views that the
|
|
90
|
+
default composition does not render.
|
|
91
|
+
- V5 is reported as four lines, with the scope it covers stated. The runtime (`docker compose
|
|
92
|
+
up`, the frontend build) is a further result: `not run` unless it was.
|
|
93
|
+
|
|
94
|
+
## 6. Stop and ask
|
|
95
|
+
Stop only when, after reading the slice and its specifications fully: a rule in a description
|
|
96
|
+
has no field, event or specification behind it; two specifications contradict; a specification
|
|
97
|
+
needs state nothing produces; a declared seam's contract conflicts with the model; or a
|
|
98
|
+
description states behaviour that a specification, mapping or constraint contradicts. Name the
|
|
99
|
+
slice, the element and what is missing. Everything else: proceed from what the model says.
|
package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Drift, publication refusals and the fallback ledger
|
|
2
|
+
|
|
3
|
+
## 1. Drift: the model changed, the output was not re-rendered
|
|
4
|
+
The ownership manifest `.cratis-render.json` at the destination records `semanticRevision`
|
|
5
|
+
(`rev1:<sha256>`), the target, the renderer, the application name and a hash per managed file.
|
|
6
|
+
|
|
7
|
+
Facts verified with `cratis render` 3.27.1 on one model: the same files rendered under the names
|
|
8
|
+
`Marina` and `Harbour` gave different `semanticRevision` values, so **the application name is part
|
|
9
|
+
of the revision**. The MCP workspace names the application after the model root folder (without
|
|
10
|
+
`.screenplay/identities.json`), so its `modelRevision` is not comparable with a render's manifest
|
|
11
|
+
revision by assumption. Without `.screenplay/identities.json` it changes when the root folder is
|
|
12
|
+
renamed (relocating the root while keeping its name does not); source positions and descriptions do
|
|
13
|
+
not change it, and a file move changes it only if it changes logical placement or application identity.
|
|
14
|
+
|
|
15
|
+
Compare in this order:
|
|
16
|
+
1. **Source identity** (`cratis-screenplay-modeling-lifecycle` `references/verdicts-and-modes.md`):
|
|
17
|
+
compute it for the current model and compare it with the identity recorded when the output was
|
|
18
|
+
rendered. Equal: the same model bytes, whatever git says. Different: the output is behind the model.
|
|
19
|
+
2. **Manifest revision:** render the current model with the **same** `--name` and inputs into a
|
|
20
|
+
fresh probe folder (`.../render-probe/<App>-drift`) and compare its manifest `semanticRevision`
|
|
21
|
+
with the published one. Equal: no semantic change since publication. Different: re-render and review the receipt.
|
|
22
|
+
3. Equal revisions prove neither customization conformance nor faithful UI.
|
|
23
|
+
|
|
24
|
+
Use the same toolchain as the render; revisions from another Screenplay version are not
|
|
25
|
+
comparable by assumption. A dirty git flag or commit is context, never a revision.
|
|
26
|
+
|
|
27
|
+
## 2. Publication refusals (code changed under the model)
|
|
28
|
+
|
|
29
|
+
| Refusal | Meaning | Do |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| managed file "modified by the user" | someone edited generated output | the model is authoritative. Diff the file against a fresh probe render; if the edit expresses wanted behaviour, move it into the model (edit request) or a `Customizations/` seam; then ask for approval to re-render with `--force` for that destination |
|
|
32
|
+
| unmanaged existing file on a planned path | a hand-written file collides with a planned artifact | move or rename the hand file (ask); never delete it unasked |
|
|
33
|
+
| modified stale managed file | a file the model no longer plans was edited | as a modified managed file; it will not be removed |
|
|
34
|
+
| manifest identity change (target, renderer, application name) | different render inputs | restore the original inputs, or treat it as an explicit migration the user approves |
|
|
35
|
+
|
|
36
|
+
`--force` replaces modified **active** managed files only; it never overwrites unmanaged files or
|
|
37
|
+
removes modified stale ones. It needs approval naming the effect and destination (a direct user
|
|
38
|
+
request already naming them counts); ask again only if the target or consequence expands.
|
|
39
|
+
Re-render checklist: `cratis-stage-rendering-and-sandbox` `references/rendered-application.md`.
|
|
40
|
+
|
|
41
|
+
## 3. Build breaks in `Customizations/` after a re-render
|
|
42
|
+
A generated contract changed. Read the error line and the generated type it names, fix the
|
|
43
|
+
adapter, rebuild. Never edit the generated file.
|
|
44
|
+
|
|
45
|
+
## 4. Fallback ledger
|
|
46
|
+
One file per model: `.ai-work/screenplay/<model-slug>/fallback-ledger.md`, untracked. A durable
|
|
47
|
+
record belongs in repository documentation or an issue, not in the ledger file. One entry per
|
|
48
|
+
non-renderable scope:
|
|
49
|
+
|
|
50
|
+
| Field | Content |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| id | `F<n>` |
|
|
53
|
+
| scope | slice addresses (`Module/Feature/Slice`) and their specifications |
|
|
54
|
+
| blocking codes | from the probe, grouped (`PLAY0268` list query x2, `STAGE-ESM-016`) |
|
|
55
|
+
| class | capability gap / tool skew / model fix pending |
|
|
56
|
+
| decision | stay design / renderable-mode change (user, date) / implementer |
|
|
57
|
+
| fallback location | project and folder of the hand-written code |
|
|
58
|
+
| spec mapping | `.play` specification to test name, one line each; missing tests listed |
|
|
59
|
+
| field inventory | `n/n` command, event and read-model properties mapped; extras: none, or listed with reason |
|
|
60
|
+
| hints used | realization notes from slice descriptions applied, one line each |
|
|
61
|
+
| spec delta | at re-delivery: specifications added, changed or removed since `last verified`, each with test status |
|
|
62
|
+
| divergences | where the code deliberately differs from the model, with reason and approver |
|
|
63
|
+
| revisit trigger | issue and condition (for example "Stage#58 ships list queries") |
|
|
64
|
+
| last verified | source identity and date the mapping was checked |
|
|
65
|
+
|
|
66
|
+
When a revisit trigger fires, probe again; if the scope now renders, plan the migration from
|
|
67
|
+
hand-written code to managed output with the user.
|