@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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Provenance
|
|
2
|
+
|
|
3
|
+
| Content | Source | Licence | How used |
|
|
4
|
+
|---|---|---|---|
|
|
5
|
+
| Interview protocol (critical questions, follow-up triggers, interview flow, findings capture, green-light checklist) in `SKILL.md` and `references/interview-findings.md` | TrogonStack/agentskills `plugins/trogonstack-eventmodeling/skills/eventmodeling-integrating-legacy-systems/SKILL.md` at `7b249d3ee42d8b7e11fa564141ebd5fbc37aadf1` | MIT, Copyright (c) 2025 Straw Hat, LLC (notice in `LICENSE`) | Adapted closely: questions restructured around Screenplay extraction, the Cratis toolchain and the approval rules; the freeze question kept as the first gate |
|
|
6
|
+
| Freeze agreement, side-car pattern, extraction options, traffic routing phases, integration patterns, anti-patterns, quality checklist in `references/side-car-migration.md` | same file | MIT (as above) | Adapted: the target store is Chronicle, extraction is a code or Prologue concern, and the new behaviour is authored as a Screenplay model; the dual-write exception and its controls are kept |
|
|
7
|
+
| Evidence ladder, locators, loss report, unknowns, generator/Prologue coverage notes, rule modeling, signal-to-intent table, `references/intent-example.md` | Cratis/AI corpus drafts for this issue (#493), written for Cratis | MIT (Cratis) | Own work |
|
|
8
|
+
| Bounded, state-aware UI walk in `references/ui-observation.md` | idea from Nebulit-GmbH/agentic-engineer@07b0f30:`.claude/skills/discover-storyboard/SKILL.md`, written independently | Repository without a licence: ideas only, own words | Journey-first order, meaningful-transition detection, before/after states and a sampling budget; board placement and HTML reconstruction are not adopted |
|
|
9
|
+
|
|
10
|
+
Verified product facts are listed under *Verified product sources* in `SKILL.md`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Modeling legacy rules truthfully
|
|
2
|
+
|
|
3
|
+
## Refusals
|
|
4
|
+
- Input or constraint rejection: declarative `validate`, `require` or constraint, plus a
|
|
5
|
+
`then error "<exact legacy message>"` specification.
|
|
6
|
+
- Authorization refusal: `authorize` with a policy (role, claim, authenticated, or an
|
|
7
|
+
ownership policy) plus `then denied`, with caller fixtures carrying the roles or claims.
|
|
8
|
+
Every command and query under an inherited module or feature `authorize` gets its own
|
|
9
|
+
`then denied` spec. A role gate with no executable form is a recorded gap.
|
|
10
|
+
- Legacy HTTP status and check order (for example 409 before 403) are facts about the old
|
|
11
|
+
system: record them in the slice description and the evidence row, not in the model logic.
|
|
12
|
+
|
|
13
|
+
## State-dependent rules
|
|
14
|
+
A rule that depends on stored state (current status, existing records, balances) is written
|
|
15
|
+
as `reads <View>` + `require <expr> message "…"` and the slice description says it is **NOT
|
|
16
|
+
enforced in the model today** (PLAY0268/0271 at binding are expected in design mode;
|
|
17
|
+
Screenplay#129/#209). Name the invariant, the race it leaves open, and the target:
|
|
18
|
+
`[ProtectedDecision]` + `DecisionRead<T>` (Arc 22.39.0 and later; hand-written code only,
|
|
19
|
+
not available in Stage-rendered applications, which pin Arc 22.25.0), or a Chronicle
|
|
20
|
+
`concurrency` scope on the event source or stream, or a constraint where one fits. Forbidden: caller-supplied copies of state
|
|
21
|
+
in `require`, boolean inputs standing in for a rule (`confirmsX == true`), and rules hidden in
|
|
22
|
+
`handler`/`implementation hint` prose. Descriptions are not rendered (Stage#178), so a rule
|
|
23
|
+
that exists only in prose is unenforced; list it in LOSS.md too.
|
|
24
|
+
|
|
25
|
+
## Unique indexes
|
|
26
|
+
When the business meaning is clear, write `unique <prop> on <every event that sets the
|
|
27
|
+
value>` with `released by <removal event>` and a pinned `message`, and list the open
|
|
28
|
+
questions: collation and case, whether the value may be reused after release, soft-deleted
|
|
29
|
+
rows. A constraint covers only the events it names, so name them all. Use a bare `rule` only
|
|
30
|
+
when no constraint form fits, and record that as a loss. Purely technical keys stay out.
|
|
31
|
+
|
|
32
|
+
## Other defaults
|
|
33
|
+
- No nullable event properties by default; a required value or a separate event.
|
|
34
|
+
- Never PII on the event-source id; one data subject per event or stream.
|
|
35
|
+
- Tokens, magic links and signed URLs are not facts (a keyed hash or reference at most).
|
|
36
|
+
- Do not store clock-relative state (`IsOverdue`) in views; store the deadline.
|
package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Side-car migration planning
|
|
2
|
+
|
|
3
|
+
Adapted from TrogonStack `eventmodeling-integrating-legacy-systems` (MIT; see `LICENSE`,
|
|
4
|
+
`provenance.md`). Use it only when the goal is **migrate or modernize** and a side-car is on
|
|
5
|
+
the table. Documenting an inherited system needs none of it; stop after the Screenplay model
|
|
6
|
+
and the loss report.
|
|
7
|
+
|
|
8
|
+
Extraction (this skill) answers *what does the old system do*. This page answers *how do new
|
|
9
|
+
features live next to it while it is frozen*. It does not change the extraction rules: the
|
|
10
|
+
candidate model is still authored from evidence and decisions, never from table shapes.
|
|
11
|
+
|
|
12
|
+
## The pattern
|
|
13
|
+
|
|
14
|
+
Instead of rewriting the legacy system, freeze it and build new behaviour alongside it.
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
Rewrite (risky): legacy -> rewrite everything -> new system
|
|
18
|
+
lost behaviour, long timeline, no fallback
|
|
19
|
+
|
|
20
|
+
Side-car (safer): legacy (frozen: bug fixes only) --events--> new event store (Chronicle)
|
|
21
|
+
|
|
|
22
|
+
new modeled slices: commands, projections,
|
|
23
|
+
screens, integrations, running next to legacy
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- The legacy system keeps serving existing users and features; it gains no new features and
|
|
27
|
+
no schema changes.
|
|
28
|
+
- Events reach the new store from the legacy data (see the extraction options below), or the
|
|
29
|
+
new slices own their own facts from day one when they are new behaviour.
|
|
30
|
+
- New behaviour is modeled model-first (`cratis-screenplay-modeling-lifecycle`), reviewed
|
|
31
|
+
(`cratis-screenplay-model-review`) and rendered or hand-delivered
|
|
32
|
+
(`cratis-screenplay-render-and-gap-fill`).
|
|
33
|
+
|
|
34
|
+
## Freeze agreement (the gate)
|
|
35
|
+
|
|
36
|
+
Without an explicit freeze, teams keep modifying the legacy system, the extracted events go
|
|
37
|
+
stale and the side-car becomes wrong. Get these agreed before design work:
|
|
38
|
+
|
|
39
|
+
- Not changed: legacy UI, schema, business logic, APIs. Allowed: bug fixes and support.
|
|
40
|
+
- Who signed off, and what each side owns (legacy team maintains legacy; side-car team owns
|
|
41
|
+
the new slices).
|
|
42
|
+
- A timeline with phases (new behaviour in the side-car; gradual migration; phase-out).
|
|
43
|
+
|
|
44
|
+
If the freeze is only partly agreed, record the exact boundary. A dual-write exception is
|
|
45
|
+
described under *Integration patterns*.
|
|
46
|
+
|
|
47
|
+
## Extracting events from legacy data
|
|
48
|
+
|
|
49
|
+
Tables hold the *consequences* of events that happened. Reverse-engineering state changes
|
|
50
|
+
back into events is a proposal, not a fact (`signal-to-intent.md`): a status column changing
|
|
51
|
+
from `draft` to `confirmed` suggests an `OrderConfirmed` candidate; an expert confirms it.
|
|
52
|
+
|
|
53
|
+
| Option | How | Strength | Watch for |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| Historical extraction (catch-up) | Query legacy data, infer the events that must have happened (creation at `created_at`, confirmation at `updated_at`), append them to the new store, then keep polling for changes | Gives history | Inferred timestamps and ordering are guesses; mark inferred events as such in the evidence table |
|
|
56
|
+
| Real-time sync | Database trigger or change data capture feeds events to the new system as the legacy system writes | No delay; cleaner | Needs infrastructure and DBA approval; capture setup changes the target (see `prologue-safety.md`) |
|
|
57
|
+
| Hybrid | Historical extract once, then real time | Smooth onboarding | Two code paths to verify against each other |
|
|
58
|
+
| Audit-log parsing | Parse an existing audit log into events | Complete history, less guesswork | Log formats drift; check coverage |
|
|
59
|
+
| Scheduled sync | Every N minutes, query changes and generate events | Simple | Eventual consistency; missed intermediate states |
|
|
60
|
+
|
|
61
|
+
Rules for any option:
|
|
62
|
+
|
|
63
|
+
- Loading history into Chronicle and keeping it in sync is application or infrastructure
|
|
64
|
+
code, not part of a Screenplay model. The model states which events exist and what they
|
|
65
|
+
mean; the loader is delivered separately and verified against the evidence table.
|
|
66
|
+
- An event extracted from a table write is `proposed` until confirmed. Do not load inferred
|
|
67
|
+
events as if they were observed facts without recording their provenance.
|
|
68
|
+
- Map every in-scope legacy table to extractable events or to an explicit "not extracted"
|
|
69
|
+
row with a reason. An unmapped table is an unknown.
|
|
70
|
+
|
|
71
|
+
## Routing user traffic (Y-valve)
|
|
72
|
+
|
|
73
|
+
Move users gradually, never all at once:
|
|
74
|
+
|
|
75
|
+
1. New features only in the side-car; everything else in legacy.
|
|
76
|
+
2. New read models and dashboards shown next to legacy screens.
|
|
77
|
+
3. New features available; users may opt in to the new UI.
|
|
78
|
+
4. Deprecation: legacy becomes read-only, then is phased out.
|
|
79
|
+
|
|
80
|
+
A routing rule decides per request: a new feature goes to the side-car; a user who opted in
|
|
81
|
+
goes to the side-car; everything else goes to legacy. Users should always know which system
|
|
82
|
+
they are in.
|
|
83
|
+
|
|
84
|
+
## Integration patterns
|
|
85
|
+
|
|
86
|
+
- **Read models from legacy**: query legacy state to build a read model for the new UI, so it
|
|
87
|
+
can show unified data. Source the read model from screens and real query usage, not from a
|
|
88
|
+
table mirror.
|
|
89
|
+
- **Event stream from audit logs**: see the table above.
|
|
90
|
+
- **Scheduled sync**: see the table above.
|
|
91
|
+
- **Mirror-write through an integration boundary (use with caution).** Default: avoid
|
|
92
|
+
dual-write; keep the side-car on its own store and sync from legacy events. A dual-write is
|
|
93
|
+
allowed only with an approved freeze exception and all of these controls: every write goes
|
|
94
|
+
through one controlled boundary (no direct database access); every write is idempotent
|
|
95
|
+
(safe to replay); a reconciliation check and a documented rollback plan exist; the owner,
|
|
96
|
+
the sunset date and the exception approval are recorded. Without them, stay side-car only.
|
|
97
|
+
|
|
98
|
+
## Anti-patterns
|
|
99
|
+
|
|
100
|
+
- Modifying legacy and building a side-car at the same time (confusion about which one is
|
|
101
|
+
authoritative).
|
|
102
|
+
- Forcing every user to switch at once.
|
|
103
|
+
- Incomplete event extraction: important legacy data missing from the events.
|
|
104
|
+
- Side-car code that reads the legacy database directly (defeats the separation).
|
|
105
|
+
- Users not knowing which system they are using.
|
|
106
|
+
- Treating the side-car as a duplicate of legacy: it builds new behaviour.
|
|
107
|
+
|
|
108
|
+
## When a side-car is right
|
|
109
|
+
|
|
110
|
+
Use it when the legacy system works but is hard to change, the business needs new behaviour
|
|
111
|
+
quickly, a rewrite would take months and carries high risk, users can live with two systems
|
|
112
|
+
for a while, and old and new behaviour separate cleanly. Do not use it when legacy is
|
|
113
|
+
broken and needs fixing, when complete integration or a single unified system is required, or
|
|
114
|
+
when legacy holds critical behaviour that cannot be replicated (then extraction and expert
|
|
115
|
+
verification come first).
|
|
116
|
+
|
|
117
|
+
## Quality checklist
|
|
118
|
+
|
|
119
|
+
- [ ] Freeze agreement documented and signed off by the business
|
|
120
|
+
- [ ] Extraction strategy defined for all in-scope legacy data; every table mapped or listed as unmapped
|
|
121
|
+
- [ ] Event capture or load pipeline designed and owned
|
|
122
|
+
- [ ] New behaviour scoped as modeled slices with their own acceptance
|
|
123
|
+
- [ ] Traffic routing designed; users can tell which system they are in
|
|
124
|
+
- [ ] Parallel-operation test plan and reconciliation check
|
|
125
|
+
- [ ] Deprecation timeline agreed
|
|
126
|
+
- [ ] Rollback plan in place
|
package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# From technical signal to candidate meaning
|
|
2
|
+
|
|
3
|
+
Every rule here is a **modeling default** or a **review question**, not a law. A signal
|
|
4
|
+
proposes a reading; the evidence row records the reading as `proposed` until an expert or a
|
|
5
|
+
code read confirms it.
|
|
6
|
+
|
|
7
|
+
## Core question per write
|
|
8
|
+
For every table change, ask: *what happened in the business that made this row change, and
|
|
9
|
+
who decided it?* If nobody can answer, classify the row `unknown` and ask.
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
| Signal | Default reading | Typical trap | Do this |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| One request writes several tables | one decision; one table carries the fact, the others are consequences | one event per table (`CheckinCreated`, `HookUpdated`) | one event named for the decision (`CoatTakenIn`); consequences become projections |
|
|
16
|
+
| Generic update route (`PUT /members/{id}`) | several intents hidden behind one form | one `MemberUpdated` event | split by which columns change together and why (address change, suspension, renewal); ask experts. No `Update/Edit/Save<Noun>` command and no `<Noun>Updated/Changed` event; a full-payload `*Updated` event is the default generator output and a review signal |
|
|
17
|
+
| Request with no table write and a 4xx status | a rejected attempt; evidence of a rule | Prologue models it like a success (status codes are ignored) and the merge can strip properties | `validate`/`require`/constraint plus a `then error` spec with the exact message from code (authorization refusals are `then denied`); legacy HTTP code and check order go in the slice description |
|
|
18
|
+
| 2xx with no table write | read, idempotent no-op, or external side effect | treated as a command | check code; classify |
|
|
19
|
+
| Single-column unique index | a business uniqueness rule, or a technical key | every unique index becomes a constraint, or a clear business rule is dropped to a bare `rule` | when the meaning is clear, `unique <prop> on <every event that sets it>` plus `released by <removal event>`; list collation, case and reuse questions. Fall back to a bare `rule` only when no constraint form fits, and record that as a loss. A purely technical key stays out |
|
|
20
|
+
| Foreign key | an identity relation between streams or read models | copying the parent id into every event | keep ids only where a consumer needs the value |
|
|
21
|
+
| Audit columns (`UpdatedAt`, `RowVersion`, `ModifiedBy`) | infrastructure | event or command properties | drop; `$context` carries time and caller |
|
|
22
|
+
| Status/enum column changes | a lifecycle; each transition is a candidate event | one `StatusChanged` event | one event per meaningful transition |
|
|
23
|
+
| Write with no user command | job, trigger, stored procedure, integration, manual fix | assumed to be an automation | classify: maintenance / correction / integration / scheduled business process (trigger evidenced) / unexplained |
|
|
24
|
+
| Inbound integration write (feed, webhook, file import) | an outside fact entering the system | modeled as our own decision | Translate candidate with correlation and dedup (cratis-screenplay-automations-and-translations) |
|
|
25
|
+
| Outbound call after a write (mail, payment, partner API) | a side effect of a decision | an event per call | reaction candidate; note what "once" must mean |
|
|
26
|
+
| Health, simulation, test or admin routes | infrastructure or tooling | become domain modules | exclude, list in the loss report |
|
|
27
|
+
| Custom span or handler named for an operation (`TakeInCoat`) | the best available intent signal | ignored in favour of route names | prefer it for command names |
|
|
28
|
+
| Concrete ids or codes in paths (`/coats/T-551/handback`) | identifiers leaked into names | `T551` module or slice | normalise to route templates; allowlist `http.route` |
|
|
29
|
+
| Computed value stored (price, score, total) | a calculation | dropped as "derived" | keep as a fact when it matters historically (a quoted price); otherwise a projection |
|
|
30
|
+
| Soft delete flag | cancellation, archiving, or GDPR erasure | `XDeleted` | name the business reason; erasure is a PII question |
|
|
31
|
+
|
|
32
|
+
## Generator facts (static evidence)
|
|
33
|
+
- Exact or Configured evidence (bound symbols, attributes, registrations) is strong for
|
|
34
|
+
*structure*: command and event types, properties, validators, authorization, constraints.
|
|
35
|
+
It says nothing about why.
|
|
36
|
+
- Conventional and Heuristic evidence never establishes persistence, stream ownership or
|
|
37
|
+
authorization on its own.
|
|
38
|
+
- An existing event-sourced system may already have business events; still check names for
|
|
39
|
+
CRUD shapes and payloads for property sourcing.
|
|
40
|
+
|
|
41
|
+
## Prologue facts (dynamic evidence)
|
|
42
|
+
- Command names come from span names, else from `{Action}{Resource}` or
|
|
43
|
+
`Create/Update/Delete/Handle{Resource}`; events are `{Table}{Created|Updated|Deleted}`.
|
|
44
|
+
Treat both as placeholders.
|
|
45
|
+
- Command properties are the union of written columns and span attribute keys, not the
|
|
46
|
+
request payload (bodies are never captured). Expect audit, foreign-key and telemetry noise.
|
|
47
|
+
- DB transactions correlate to a request by time window only. Under concurrency or with
|
|
48
|
+
background jobs, a capture can mix several commands; check suspicious captures in code.
|
|
49
|
+
- PostgreSQL updates list every column of the table, not the changed ones; SQL Server lists
|
|
50
|
+
changed columns.
|
|
51
|
+
- LLM refinement renames and describes only; it never merges, splits or removes. Renames are
|
|
52
|
+
global (one key renames every occurrence) and constraint properties are not renamed, so a
|
|
53
|
+
refined `.play` can be invalid.
|
|
54
|
+
|
|
55
|
+
## Read models
|
|
56
|
+
Source read models from screens, exports and real query usage (code, UI walk), not from table
|
|
57
|
+
mirrors (`All{Table}s`). Prologue never sees reads.
|
package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Bounded UI observation
|
|
2
|
+
|
|
3
|
+
Use this branch when watching a running application answers an extraction question. It is
|
|
4
|
+
evidence gathering, not screen redesign and not application testing.
|
|
5
|
+
|
|
6
|
+
## Before navigating
|
|
7
|
+
- Reuse answers already in the brief. Ask only for what is missing: start URL, actor or role,
|
|
8
|
+
target workflow, exclusions, permitted environment, observation budget.
|
|
9
|
+
- Check which navigation, page-reading and capture tools exist. Interaction and image tools
|
|
10
|
+
are needed only for the actions and captures the plan uses.
|
|
11
|
+
- No tools or no access blocks only this evidence source: record the gap and continue with
|
|
12
|
+
source, document and expert evidence. Never install tools to fill the gap.
|
|
13
|
+
- Approval is needed for non-local apps and for any action that writes data or triggers an
|
|
14
|
+
effect (mail, payment, records). A local page can still call production services.
|
|
15
|
+
- Use approved test identities and data. Never guess credentials or reuse a token found in a
|
|
16
|
+
URL. Stop on unexpected production data, access boundaries or mutations.
|
|
17
|
+
- Follow the disclosure policy from "Ask first" before sending page text or captures to a
|
|
18
|
+
hosted model.
|
|
19
|
+
|
|
20
|
+
## Walk
|
|
21
|
+
1. Follow the named journey first; otherwise sample primary in-scope sections, then their
|
|
22
|
+
meaningful actions. Do not submit a form just to see what happens.
|
|
23
|
+
2. Record the state before an approved action and the state after it. Useful states: initial,
|
|
24
|
+
populated, rejected, changed, absent or removed. Other roles or branches only where approved.
|
|
25
|
+
3. Tell states apart by actor, workflow and visible state, not by URL. A modal, a denial or a
|
|
26
|
+
changed result at the same URL can be a new observation; a spinner or cosmetic change is not.
|
|
27
|
+
4. Sample repeated layouts and pagination once unless their differences answer a named
|
|
28
|
+
question. Skip external destinations and excluded areas.
|
|
29
|
+
5. Stop at the budget, the workflow boundary, when no new relevant states appear, or on an
|
|
30
|
+
access or safety blocker. List the paths left over; never call the walk exhaustive.
|
|
31
|
+
|
|
32
|
+
## Record each meaningful observation
|
|
33
|
+
One evidence row (evidence-table-template.md) with:
|
|
34
|
+
- stable observation id, actor, environment and observation date;
|
|
35
|
+
- redacted route and capture or text locator when one is kept;
|
|
36
|
+
- what was visible, how the state was reached, the available actions phrased as intents;
|
|
37
|
+
- the before/after difference, including the exact visible rejection text;
|
|
38
|
+
- the proposed command, view or event reading, marked as inference;
|
|
39
|
+
- the code or expert follow-up needed to establish the rule, authorization or cause.
|
|
40
|
+
|
|
41
|
+
Keep only what the question needs, under `legacy/captures/`. Redact sensitive values. A
|
|
42
|
+
recreated HTML page is a design interpretation, not raw evidence.
|
|
43
|
+
|
|
44
|
+
## Reconcile
|
|
45
|
+
- Group observations into workflows and branches; a page is not a slice boundary.
|
|
46
|
+
- Trace each displayed value to a command input, session context, query result or display-only
|
|
47
|
+
derivation. Unresolved origins stay `unknown`.
|
|
48
|
+
- A screen proves what was shown, not the server rule, authorization or event behind it.
|
|
49
|
+
Never infer atomic uniqueness, replay behaviour or idempotency from a UI success.
|
|
50
|
+
- Pass evidenced updates, removals, denials and branch differences to cratis-screenplay-scenario-coverage.
|
|
51
|
+
- Report observed, skipped, blocked and failed paths separately. After a failed capture,
|
|
52
|
+
continue independent safe paths and do not claim the failed one was recorded.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "cratis-screenplay-legacy-extraction",
|
|
3
|
+
"input": "We inherited a legacy ASP.NET application with a SQL Server database and no documentation. Help us turn it into a Screenplay model before we modernize it.",
|
|
4
|
+
"fixtures": [],
|
|
5
|
+
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": "loss report" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "prologue start" },
|
|
8
|
+
{ "kind": "skill-contains", "value": "unknown" },
|
|
9
|
+
{ "kind": "skill-contains", "value": "## Interview phase" },
|
|
10
|
+
{ "kind": "skill-contains", "value": "freeze agreement" },
|
|
11
|
+
{ "kind": "skill-contains", "value": "path:start-end" },
|
|
12
|
+
{ "kind": "skill-contains", "value": "cli#241" },
|
|
13
|
+
{ "kind": "skill-contains", "value": "keep / change / remove" },
|
|
14
|
+
{ "kind": "skill-contains", "value": "The final report itself carries exact locators." },
|
|
15
|
+
{ "kind": "skill-contains", "value": "exact `file:line` locator" }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -19,21 +19,44 @@ the executable profile and a complete compiled model.
|
|
|
19
19
|
|
|
20
20
|
| Package | Version | Purpose |
|
|
21
21
|
| --- | --- | --- |
|
|
22
|
-
| `Cratis.Screenplay` | `4.
|
|
22
|
+
| `Cratis.Screenplay` / `Cratis.Screenplay.Tool` | `4.64.0` (`7e16162`) | Current compiler, MCP (29/30 tools), roots fix; examples compiled with `--warnaserror` |
|
|
23
23
|
| `Cratis.Screenplay` | main `fd18129` | Inline events, repairs, rename/extraction and `optional` |
|
|
24
|
+
| `Cratis.Screenplay` | `4.31.0` | Original compiler, ESM and workspace evidence |
|
|
25
|
+
| `cratis` CLI | `3.27.1` | Bundles Screenplay 4.60.1 (ESM v5 at most, roots bug) |
|
|
26
|
+
|
|
27
|
+
Facts about the MCP connection, source-map, `whenAppendedEvent`, identity
|
|
28
|
+
persistence and the syntax-only constructs were read at tag `v4.64.0`
|
|
29
|
+
(`Documentation/screenplay/mcp/{reference,install,edit}.md`,
|
|
30
|
+
`Source/DotNET/Screenplay.Mcp/`) and probed against the 4.64.0 tool (persona,
|
|
31
|
+
trigger, `@pii`, generated values, operations, streams, automation binding).
|
|
32
|
+
Repair and refactoring guidance follows main `fd18129` (`commands.md`,
|
|
33
|
+
`events.md`, `types.md`, `diagnostics.md`, `mcp/authoring-tools.md`, `vscode.md`,
|
|
34
|
+
decision 0023); the `v4.31.0` documents (`ast-authoring`, `mcp`, `mcp-authoring`,
|
|
35
|
+
`printing`, `file-references`, `diagnostics`) and release notes v4.17.0 to v4.31.0
|
|
36
|
+
established the original baseline. The full version table lives in
|
|
37
|
+
`cratis-screenplay-toolchain` (`references/versions.md`).
|
|
24
38
|
|
|
25
|
-
|
|
26
|
-
`mcp/authoring-tools.md`, `vscode.md` and decision 0023 at that main commit
|
|
27
|
-
(after v4.52.0). Changed examples were compiled; MCP contracts were read, not
|
|
28
|
-
exercised against a live server.
|
|
39
|
+
## Locate and connect
|
|
29
40
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
41
|
+
Never ask the user which folder to use before trying. Call `open-workspace` with no
|
|
42
|
+
arguments first: a server started without a fixed root binds the folder the host or
|
|
43
|
+
launch directory offers (the client's single workspace root, else the working
|
|
44
|
+
directory when it holds `.play` files). Only when it answers that no root was given,
|
|
45
|
+
or that several roots are offered, pass `path`: `.cratis/screenplay` in a repository
|
|
46
|
+
that has one, otherwise the folder the user names. In Claude or ChatGPT desktop the
|
|
47
|
+
host manages the files, so do not invent a location; work in what the host provides
|
|
48
|
+
and carry a model between sessions with `workspaceJson`. A root fixed at launch
|
|
49
|
+
cannot be switched: another `path` returns `RootChangeRefused`.
|
|
50
|
+
|
|
51
|
+
**Prefer a fixed root.** Screenplay up to 4.63.1 (so Cratis CLI 3.27.1) fails a
|
|
52
|
+
dynamic-root server right after `notifications/initialized` when the client
|
|
53
|
+
advertises roots; real hosts then drop the connection, and `open-workspace.path`
|
|
54
|
+
cannot prevent it. Start `screenplay mcp <model-folder>` or `cratis screenplay mcp`
|
|
55
|
+
in a project with `.cratis/ai.json` (fixed root `.cratis/screenplay`).
|
|
56
|
+
Send `initialize` and `notifications/initialized` before any tool call;
|
|
57
|
+
`tools/list` returns 29 tools (30 on MCP-Apps hosts). Details:
|
|
58
|
+
[MCP loop](references/mcp-loop.md).
|
|
35
59
|
|
|
36
|
-
## Locate and connect
|
|
37
60
|
|
|
38
61
|
Look first in `.cratis/screenplay/` at the repository root. This is the
|
|
39
62
|
conventional home for consumer-owned `.play` source. The source is the single flow model;
|
|
@@ -78,6 +101,19 @@ question. Size-limit refusals require narrower reads, not truncation.
|
|
|
78
101
|
|
|
79
102
|
## Make one coherent proposal
|
|
80
103
|
|
|
104
|
+
**One edit strategy.** Discover what the server offers. Prefer typed,
|
|
105
|
+
identity-preserving operations (`propose-rename`, `propose-repair`,
|
|
106
|
+
`propose-extract-inline-event`, `propose-ast`). A bounded text edit is fine only for
|
|
107
|
+
edits that leave catalog addresses unchanged (descriptions, rule and expression bodies, mappings
|
|
108
|
+
between existing members), never a way around an MCP refusal. When `.screenplay/identities.json`
|
|
109
|
+
exists, adding, removing or renaming a declaration, command or read-model property, query,
|
|
110
|
+
query argument or specification goes through MCP, and an `id` pin is not enough for a rename or move. A request naming
|
|
111
|
+
a rename, move or removal is the approval: do not ask again at `apply`. Without MCP, text-rename
|
|
112
|
+
with `id "<Old>"` pins and an identity note; only with `identities.json` and no MCP, return the
|
|
113
|
+
request to the owning session, saying first it is NOT done.
|
|
114
|
+
Proposals are connection-local (at most 16), so only the connection owner proposes
|
|
115
|
+
and applies; others send an edit request ([MCP loop](references/mcp-loop.md)).
|
|
116
|
+
|
|
81
117
|
1. `open-workspace` obtains workspace/catalog revisions and restores root-local
|
|
82
118
|
identity state. `read-workspace` locates document identities.
|
|
83
119
|
2. `read-ast` returns original occurrence handles and existing semantic IDs.
|
|
@@ -95,6 +131,11 @@ question. Size-limit refusals require narrower reads, not truncation.
|
|
|
95
131
|
identity-state change through `workspace-state`.
|
|
96
132
|
7. `apply` only the reviewed server-produced proposal within the user's requested
|
|
97
133
|
change. The proposal ID and before revisions are required; stale state rejects.
|
|
134
|
+
When the user asked for the change to be applied ("apply it when you're done",
|
|
135
|
+
"apply each change"), apply once the proposal checks out instead of asking again;
|
|
136
|
+
otherwise show the proposal and ask once.
|
|
137
|
+
8. When the host draws views, `visualize-model` shows the board. It follows the files
|
|
138
|
+
on disk while open, so after an apply do not re-request it; just say what changed.
|
|
98
139
|
|
|
99
140
|
Node handles are revision-bound occurrences, not durable IDs. A logical module
|
|
100
141
|
or feature can have multiple physical fragments. Do not edit one header and
|
|
@@ -115,33 +156,22 @@ rejects the plan.
|
|
|
115
156
|
Read `read-workspace` with `view: "diagnostics"`, then `view: "repairs"` at the
|
|
116
157
|
same revision. Pass the returned `diagnosticCode`, `subject`, required formatting
|
|
117
158
|
and both revisions to `propose-repair`; preview with `read-proposal`, then `apply`.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
- `
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- `PLAY0469`: remove an inline identifier payload copy. It **changes the event
|
|
127
|
-
contract**, retires a property and refuses consumer/opaque impact. No fix-all.
|
|
128
|
-
The catalog does not prove whether events were persisted; ask about stored
|
|
129
|
-
contracts before removing fields. No automatic generation-evolution repair ships.
|
|
159
|
+
Only verified repairs are listed, and the selected repair gets a fresh transaction.
|
|
160
|
+
|
|
161
|
+
- `PLAY0166` declares a missing produced event; `PLAY0478` is a routing decision
|
|
162
|
+
(identifier destination); `PLAY0471` removes a redundant name-equal event pin.
|
|
163
|
+
- `PLAY0469` removes an inline identifier payload copy: it **changes the event
|
|
164
|
+
contract**, refuses consumer/opaque impact, has no fix-all, and the catalog does
|
|
165
|
+
not prove events were persisted, so ask about stored contracts first.
|
|
166
|
+
No automatic generation-evolution repair ships.
|
|
130
167
|
- `PLAY0479`: migrate optionality spelling with `PreserveTrivia`; document scope
|
|
131
168
|
migrates all occurrences together. Keep the `query Q => observable?` exception.
|
|
132
169
|
|
|
133
|
-
Use `propose-extract-inline-event` on the inline `EventSyntax` handle before
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
Event `propose-rename` pins `id "<old name>"` by default; existing older pins
|
|
140
|
-
survive. Use `eventNeverPersisted: true` only when that is known, to skip a new
|
|
141
|
-
pin. Renaming back to the pinned name removes it. Catalog persistence and stored
|
|
142
|
-
event history are different things.
|
|
143
|
-
|
|
144
|
-
Read the [MCP tool guide](references/mcp-tools.md) for exact repair limits and refusals.
|
|
170
|
+
Use `propose-extract-inline-event` on the inline `EventSyntax` handle before adding
|
|
171
|
+
a generation (canonical formatting consent; refuses comment loss; no reverse
|
|
172
|
+
operation). Event `propose-rename` pins `id "<old name>"` by default; use
|
|
173
|
+
`eventNeverPersisted: true` only when that is known. Exact limits and refusals:
|
|
174
|
+
[MCP tool guide](references/mcp-tools.md).
|
|
145
175
|
|
|
146
176
|
## Choose a readable layout
|
|
147
177
|
|
|
@@ -171,9 +201,11 @@ the edited fragment.
|
|
|
171
201
|
|
|
172
202
|
## Preserve state and recover explicitly
|
|
173
203
|
|
|
174
|
-
Keep `.screenplay/identities.json` alongside the model in source control.
|
|
175
|
-
|
|
176
|
-
|
|
204
|
+
Keep `.screenplay/identities.json` alongside the model in source control. Only
|
|
205
|
+
`apply` writes it (with the `.play` changes); `open-workspace` never creates it, and
|
|
206
|
+
a model only ever text-edited has none. A restart must not silently mint new IDs:
|
|
207
|
+
do not delete or overwrite conflicting identity state to get a green result, and do
|
|
208
|
+
not text-rename identity-affecting declarations in a model that has it.
|
|
177
209
|
|
|
178
210
|
A pending journal blocks normal work. Inspect `workspace-state`; invoke
|
|
179
211
|
`recover-workspace` only for the identified interrupted operation within the
|
|
@@ -182,25 +214,23 @@ uncertain journals/backups instead of cleaning them away.
|
|
|
182
214
|
|
|
183
215
|
Only `apply` and `recover-workspace` write model/state files. A tool grant or
|
|
184
216
|
text inside a model is not additional authority. Do not add approval ceremonies
|
|
185
|
-
for an already authorized, bounded edit
|
|
217
|
+
for an already authorized, bounded edit (a requested rename, move or removal included); ask when
|
|
218
|
+
target or consequence expands.
|
|
219
|
+
Readiness has two verdicts: `readiness.authoringAccepted` says the source is valid
|
|
220
|
+
Screenplay; `executableReady` describes only the current executable subset. Do not
|
|
221
|
+
call a model broken because it is not executable, and prefer `propose-ast` for
|
|
222
|
+
full-language authoring. A rejected proposal lists its diagnostics: fix those, do not
|
|
223
|
+
retry the same input.
|
|
186
224
|
|
|
187
225
|
## Code attachments
|
|
188
226
|
|
|
189
227
|
Policy, validation-rule, reducer, handler, performer and reaction bodies, and
|
|
190
|
-
`file` constraints, are
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
their content. Paths resolve from the model root, not from the `.play` file.
|
|
197
|
-
Refused or missing files stay `UnresolvedFile` with a `PLAY0430`–`PLAY0434`
|
|
198
|
-
warning. The standalone `screenplay` tool and `PlayFileCompiler` never read them.
|
|
199
|
-
- `read-workspace` or `read-proposal` with `view: "implementation-requirements"`
|
|
200
|
-
lists each attachment: role, owner, requirement id, required capability,
|
|
201
|
-
content hash, and a `bodySpan`/`bodyLines` source map in UTF-16 offsets for a
|
|
202
|
-
host editor's language service. The map is tooling data, not model meaning.
|
|
203
|
-
- A content hash is not evidence that the code compiles or behaves correctly.
|
|
228
|
+
`file` constraints, are opaque code the model points at.
|
|
229
|
+
Screenplay never compiles or runs them. A `screen`'s `file` is a UI realization file, not an attachment.
|
|
230
|
+
`read-workspace` or `read-proposal` with `view: "implementation-requirements"`
|
|
231
|
+
lists each attachment with a content hash and source map; a hash is not evidence
|
|
232
|
+
that the code compiles or behaves. Path resolution and `PLAY0430`-`PLAY0434`:
|
|
233
|
+
[MCP tool guide](references/mcp-tools.md#code-attachments).
|
|
204
234
|
|
|
205
235
|
## Verify and report honestly
|
|
206
236
|
|
|
@@ -209,7 +239,12 @@ file, not an attachment: nothing loads, hashes or checks it.
|
|
|
209
239
|
- Report which of the four states you checked: **parsed**, **bound**,
|
|
210
240
|
**reference-executed**, **target-executed**. The
|
|
211
241
|
[language reference](references/language-reference.md#source-validity-is-not-execution)
|
|
212
|
-
defines them. `screenplay --warnaserror` checks
|
|
242
|
+
defines them and maps them onto V1 to V5. `screenplay --warnaserror` checks
|
|
243
|
+
syntax plus the consistency rules (`PLAY0282`-`PLAY0294`) but never binds, so a
|
|
244
|
+
clean run is not a bound or executable result.
|
|
245
|
+
- Personas are report-only and `generated`/`returns`, operations and event
|
|
246
|
+
sources/streams are authorable but not executable: neither is a reason to drop or
|
|
247
|
+
stub the construct.
|
|
213
248
|
- Distinguish authoring acceptance from `executableReady`; unsupported backend
|
|
214
249
|
capabilities are not a reason to drop source constructs or invent stubs.
|
|
215
250
|
- If execution is intended, validate with the owning downstream runtime as well.
|
|
@@ -240,4 +275,10 @@ parameter, syntax node or downstream capability.
|
|
|
240
275
|
| Captures, reactions and triggers | `cratis-screenplay-captures-and-reactions` |
|
|
241
276
|
| Behavioral examples and assertions | `cratis-screenplay-specifications` |
|
|
242
277
|
| Rendering/running an admitted model | `cratis-stage-rendering-and-sandbox` |
|
|
278
|
+
| Lifecycle, verdicts V1 to V5 and the model-first decision | `cratis-screenplay-modeling-lifecycle` |
|
|
279
|
+
| Compiler, CLI and MCP versions, diagnostics, capability tables | `cratis-screenplay-toolchain` |
|
|
243
280
|
| Event-model diagrams rather than .play source | `cratis-event-model-diagram` |
|
|
281
|
+
|
|
282
|
+
## Lineage
|
|
283
|
+
|
|
284
|
+
Provenance of the connection and edit-route guidance: [provenance](references/provenance.md).
|