@cratis/pi 8.7.0 → 8.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-chronicle.md +1 -1
  2. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +2 -2
  3. package/package/corpus/skills/cratis-arc-host-application/references/csharp-availability.md +1 -0
  4. package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +2 -0
  5. package/package/corpus/skills/cratis-arc-migrate-relational-schema/references/provenance.md +11 -0
  6. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-navigation.md +4 -0
  7. package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +1 -1
  8. package/package/corpus/skills/cratis-arc-testing-typescript/references/typescript.md +17 -0
  9. package/package/corpus/skills/cratis-authproxy-configure/SKILL.md +8 -5
  10. package/package/corpus/skills/cratis-authproxy-configure/references/admission.md +42 -0
  11. package/package/corpus/skills/cratis-authproxy-configure/references/services-and-routing.md +66 -2
  12. package/package/corpus/skills/cratis-authproxy-configure/references/tenant-resolution.md +62 -5
  13. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +1 -1
  14. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +52 -3
  15. package/package/corpus/skills/cratis-chronicle-connect-application/references/go.md +1 -1
  16. package/package/corpus/skills/cratis-chronicle-connect-application/references/typescript.md +1 -1
  17. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +1 -1
  18. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -1
  19. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +4 -0
  20. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/provenance.md +15 -0
  21. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/typescript.md +1 -1
  22. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -0
  23. package/package/corpus/skills/cratis-code-review/SKILL.md +1 -0
  24. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +1 -1
  25. package/package/corpus/skills/cratis-components-choose-control/references/typescript-common.md +1 -1
  26. package/package/corpus/skills/cratis-components-submit-form/SKILL.md +2 -2
  27. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commanddialog.md +2 -2
  28. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commandform.md +11 -1
  29. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +1 -1
  30. package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +2 -0
  31. package/package/corpus/skills/cratis-event-model-diagram/references/provenance.md +16 -0
  32. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp-serialization.md +3 -1
  33. package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-serialization.md +2 -0
  34. package/package/corpus/skills/cratis-modeling-design-event-model/LICENSE +18 -0
  35. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +9 -4
  36. package/package/corpus/skills/cratis-modeling-design-event-model/references/modeling-discipline.md +71 -0
  37. package/package/corpus/skills/cratis-modeling-design-event-model/references/provenance.md +39 -0
  38. package/package/corpus/skills/cratis-modeling-discover-timeline/LICENSE +14 -0
  39. package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +8 -2
  40. package/package/corpus/skills/cratis-modeling-discover-timeline/references/discovery-questions.md +28 -0
  41. package/package/corpus/skills/cratis-modeling-discover-timeline/references/provenance.md +22 -0
  42. package/package/corpus/skills/cratis-modeling-discover-timeline/references/story-retelling.md +66 -0
  43. package/package/corpus/skills/cratis-modeling-review-event-model/LICENSE +17 -0
  44. package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +11 -0
  45. package/package/corpus/skills/cratis-modeling-review-event-model/references/business-review.md +58 -0
  46. package/package/corpus/skills/cratis-modeling-review-event-model/references/event-log-hygiene.md +1 -1
  47. package/package/corpus/skills/cratis-modeling-review-event-model/references/provenance.md +15 -0
  48. package/package/corpus/skills/cratis-modeling-review-event-model/references/resilience-review.md +27 -2
  49. package/package/corpus/skills/cratis-modeling-review-event-model/references/structural-shapes.md +33 -0
  50. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/LICENSE +11 -0
  51. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +19 -15
  52. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/provenance.md +18 -0
  53. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/reading-lenses.md +76 -0
  54. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/resuming-a-trace.md +12 -0
  55. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +2 -0
  56. package/package/corpus/skills/cratis-platform-deliver-slice/references/provenance.md +16 -0
  57. package/package/corpus/skills/cratis-platform-upgrade-application/SKILL.md +1 -1
  58. package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +2 -0
  59. package/package/corpus/skills/cratis-screenplay-handoff-slice/references/provenance.md +18 -0
  60. package/package/corpus/skills/cratis-screenplay-model-automation/LICENSE +14 -0
  61. package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +8 -4
  62. package/package/corpus/skills/cratis-screenplay-model-automation/references/provenance.md +25 -0
  63. package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +2 -2
  64. package/package/corpus/skills/cratis-screenplay-model-automation/references/statemachines-and-workflows.md +3 -1
  65. package/package/corpus/skills/cratis-screenplay-model-automation/references/to-do-lists.md +186 -0
  66. package/package/corpus/skills/cratis-screenplay-model-interaction/LICENSE +14 -0
  67. package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +16 -12
  68. package/package/corpus/skills/cratis-screenplay-model-interaction/references/provenance.md +42 -0
  69. package/package/corpus/skills/cratis-screenplay-model-interaction/references/screen-design.md +212 -0
  70. package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +3 -1
  71. package/package/corpus/skills/cratis-screenplay-model-translation/references/provenance.md +14 -0
  72. package/package/corpus/skills/cratis-screenplay-model-translation/references/webhook-contract.md +22 -0
  73. package/package/corpus/skills/cratis-screenplay-recover-intent/LICENSE +11 -0
  74. package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +3 -0
  75. package/package/corpus/skills/cratis-screenplay-recover-intent/references/provenance.md +16 -0
  76. package/package/corpus/skills/cratis-screenplay-recover-intent/references/running-system.md +5 -2
  77. package/package/corpus/skills/cratis-screenplay-specify-outcome/LICENSE +13 -0
  78. package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +10 -5
  79. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/case-questions.md +1 -1
  80. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/coverage-worksheet.md +23 -0
  81. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/provenance.md +15 -0
  82. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/scenario-discipline.md +126 -0
  83. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/scenario-narrative.md +61 -0
  84. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +2 -0
  85. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +18 -0
  86. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +2 -0
  87. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-events.md +9 -1
  88. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +31 -0
  89. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +15 -0
  90. package/package/corpus/skills/cratis-specifications-exercise-backend/references/provenance.md +15 -0
  91. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -1
  92. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/references/typescript.md +38 -0
  93. package/package.json +1 -1
@@ -34,6 +34,7 @@ Catch-up, retry and replay must compute the same result from the same history. U
34
34
  - **Separate reducer:** keep transitions on a separate artifact for shared model contracts or when an instance is needed.
35
35
  - **Registration:** use normal SDK discovery or typed registration; explicitly nominate artifacts in discovery-free hosts.
36
36
  - **Observer ID:** specify a durable ID to preserve progress across a rename or move.
37
+ - **Changing between projection and reducer:** not a migration. Events, the model's shape and its queries can stay, but reusing the model's identity under the other kind neither converts nor reliably rebuilds the stored instances. Remove the previous producer so the model has one, stop the old writer before starting the new one, then request an explicit replay and verify it: the job completed, and stored state, query results and personal-data protection match the same history.
37
38
  - **Sequence:** select a named event sequence when the input is not the event log.
38
39
  - **Source store:** route a foreign store's subscribed events through its inbox; do not also select an unrelated sequence.
39
40
  - **Active flag:** disable continuous maintenance when the client should register the definition but not keep a sink current.
@@ -44,6 +44,7 @@ in the findings that matter:
44
44
  | A focused Chronicle, database, backend or frontend scalability analysis | `cratis-performance-review`; the performance items here are only those visible in passing, so do not duplicate its findings when both ran |
45
45
  | Scheduling review passes, rounds and re-reviews | `cratis-engineering-review-rounds` |
46
46
  | Reviewing the model itself | `cratis-modeling-review-event-model` |
47
+ | The change raises or pins Cratis packages, tools or images | Also read `cratis-platform-upgrade-application` for version pairing, pinning and upgrade order, and `cratis-components-theme-application` (`references/upgrade-from-previous-major.md`) when it crosses the Components major that left PrimeReact |
47
48
 
48
49
  ## How gates and review divide the work
49
50
 
@@ -96,7 +96,7 @@ Neutral guidance:
96
96
  - **Tooltip** — wraps exactly one focusable element; shows non-interactive `content` on hover and keyboard focus. `position` (`top`, `right`, `bottom`, `left`), `disabled` (suppresses it), `className` (on the trigger element). Empty, `null` or boolean content also disables it.
97
97
  - **ActionMenubar** — flat toolbar of page actions. `model` items (`label`, also the name; `icon`, `command`, `disabled`, `className`, `severity` as tone, `template` replaces rendering), `focusMode` `ToolbarFocusMode.Arrows` (default), `SingleTabStop`, `None` (native focus only), `aria-label` (no default), `className`, `pt` (applied to every action button). Ignored: `ptOptions`, `unstyled`.
98
98
  - **Breadcrumbs** — route trail, outermost first. `items` (`label`, `href`; do not write the legacy `onNavigate`, which runs in addition to `href`), `separator` (decorative; slash by default), `aria-label` (name it when a page has several trails), `className`, `pt` (`root`, `item`, `link`, `separator`; class, style, title and data attributes only). The last item is the current page and never navigates; routing comes from the provider.
99
- - **Page** — root of a routed view: full-height column with a `main` region. `title` (required; an `h1` only with `showTitle`; set the browser tab title yourself), `showTitle`, `landmark` (on; off renders a `div`), `panel` (adds an unstyled `panel` class), `div` attributes.
99
+ - **Page** — root of a routed view: full-height column whose `main` clips overflow; scroll in a child. `title` (required; an `h1` only with `showTitle`; set the browser tab title yourself), `showTitle`, `landmark` (on; off renders a `div`), `panel` (adds an unstyled `panel` class), `div` attributes.
100
100
  - **Surface** — non-interactive semantic region. `as` (`div` default, `section`, `article`), HTML attributes, `pt`, element ref.
101
101
  - **FormElement** — leading icon beside an input you own. `icon` and children required; holds no value, names nothing.
102
102
  - **ErrorBoundary** — isolates render failures of a section. `fallback`: content, or a function of `reset` returning content (`null` renders nothing); `onError` (error and info; replaces console reporting), `onReset` (synchronous, before retry). Retry remounts the children, losing local state. Not caught: event handlers, async work, server rendering, its own fallback.
@@ -43,7 +43,7 @@ Import everything named here from `@cratis/components/Common` unless stated. "Na
43
43
 
44
44
  ## Structure and icons
45
45
 
46
- - `Page`: native `div` attributes plus required `title: string`, `showTitle?`, `landmark?`, `panel?`; no ref.
46
+ - `Page`: native `div` attributes plus required `title: string`, `showTitle?`, `landmark?`, `panel?`; no ref. The root and the content region are flex columns with `height: 100%` and `flex: 1`, and the content region (`main`) has `overflow: hidden`. Content taller than the view is clipped, not scrolled, and the page itself never scrolls. Put the scrolling element inside: a child with `flex: 1`, `min-height: 0` and `overflow: auto`. The ancestors need a definite height for `Page` to fill; without one the page grows with its content and nothing is clipped. `className` is added to the root after the layout classes; `style` and the other attributes also land on the root, not on `main`.
47
47
  - `Surface`: HTML attributes plus `as?: SurfaceElement` (`'div' | 'section' | 'article'`); ref `HTMLElement`.
48
48
  - `FormElement`: required `icon: ReactNode` and `children: ReactNode`.
49
49
  - `ErrorBoundary`: required `children`; `fallback?: ReactNode | ((reset: () => void) => ReactNode)`; `onError?: (error: unknown, errorInfo: ErrorInfo) => void`; `onReset?: () => void`.
@@ -116,7 +116,7 @@ Every form option, plus: `title` (required); `subtitle`; `okLabel`, `cancelLabel
116
116
 
117
117
  - **Shared step options:** `linear` (default on), `orientation` (`horizontal` default or `vertical`), `headerPosition` (`top` default or `bottom`), `start`, `end`, `onChangeStep` (zero-based `index`), `pt`; plus `onBeforeExecute` and `confirmBeforeExecute`.
118
118
  - **`StepperPanel`:** `header` and the step's fields.
119
- - **`CommandStepper`:** every form option, plus `showNavigation`, `showSubmit` (both default on), `nextLabel`, `previousLabel`, `okLabel`, `isBusy` (also disables Previous, for host work), `onStepErrorsChange` (per-step error flags).
119
+ - **`CommandStepper`:** every form option, plus `showNavigation`, `showSubmit` (both default on), `nextLabel`, `previousLabel`, `okLabel`, `isBusy` (host work: disables Previous, Next and Submit only, not headers or fields), `onStepErrorsChange` (per-step error flags).
120
120
  - **`StepperCommandDialog`:** every form option, plus `title` (required), `okLabel`, `nextLabel`, `previousLabel`, `showCancel`, `cancelLabel`, `onConfirm`, `onCancel`, `onClose`, `isValid`, `visible`, `width` (default 600px), `style`, `contentStyle`, `headerActions`, `hideGlobalHeaderActions`, `sliceLocation`, and `dialogClassName`, `dialogPt` to style the outer dialog.
121
121
 
122
122
  ### Fields
@@ -130,7 +130,7 @@ Seventeen fields, by bound type: text (`InputTextField`, `TextAreaField`, `Passw
130
130
  - **`AutoCommandForm`:** every form option plus `exclude` and `footer` (put the submit button there). Strings get `InputTextField`, numbers `NumberField`, booleans `CheckboxField`, dates `CalendarField`; other types (nested objects, arrays) get no field. Titles come from property names (`dueDate` → "Due Date"). `exclude` hides only the editor: seed an excluded or unprovided non-optional property through `initialValues`.
131
131
  - **`AutoCommandFields`:** generated fields inside an existing `CommandForm` or `CommandDialog`; `exclude`, `currentValues`. Not inside steppers.
132
132
  - **`registerFieldTypeProvider`:** add a provider (`canHandle` over the property descriptor, `component`); newest wins, so it overrides a default. `GuidField` is opt-in this way. `resolveFieldTypeProvider` looks one up; `clearFieldTypeProviders` is for specs only.
133
- - **`CommandForm.Column`:** groups fields into a column inside your own grid or flex container.
133
+ - **`CommandForm.Column`:** as direct children of the form, columns sit side by side only with PrimeFlex-style utility CSS loaded; anywhere else, place them in your own grid or flex container.
134
134
  - **`ValidationSummary`, `ValidationMessage`:** render results no field claims, or one property's message, where you place them.
135
135
  - **`useCommandInstance`, `useCommandFormContext`, `useIsCommandExecuting`, `useSetCommandResult`:** from a child, read the instance, state and busy flag, or publish a result. Context operations: `setCommandValues` writes the given keys without re-validating (drive `currentValues` when validity must follow); `setCustomFieldError` blocks submission until cleared with an empty value; `validation` reports per channel (client, server) whether a verdict is pending, `current`, `stale` or `unvalidated` and `valid`, `invalid` or `error`; trust `isValid` only from a current, non-pending verdict, and only as a preflight.
136
136
  - **`asCommandFormField`:** turn a controlled component into a bound field (`defaultValue`, `extractValue`, `groupRole` for multi-input groups). `withCommandFormFieldBinding` (already applied by `asCommandFormField`) lets a hand-marked field bind behind an opaque component; `markAsCommandFormField`, `markAsCommandFormColumn`, `isCommandFormField`, `isCommandFormColumn` mark or recognize hand-rolled fields and columns.
@@ -105,7 +105,7 @@ Step rules:
105
105
  - Next (or a header, with `linear` off) is refused while the current step shows field errors. These are displayed errors, not missing values: under blur validation an untouched blank field does not block it, unless `validateOnInit` is set.
106
106
  - Moving back is always allowed. With `linear` (the default) headers are not clickable. `onChangeStep` reports an accepted move.
107
107
  - `StepperCommandDialog` hides Submit until the last step and a valid form, and offers no footer Cancel unless `showCancel` is set.
108
- - `CommandStepper` shows Submit on the last step, disabled while the form is invalid or busy, or while any step shows field errors. On `CommandStepper`, `showNavigation={false}` hides the whole built-in footer, Submit included, and `showSubmit={false}` hides only Submit; labels fall back to the provider's stepper messages.
108
+ - `CommandStepper` shows Submit on the last step, disabled while the form is invalid or busy, or while any step shows field errors. While `onBeforeExecute`, confirmation or the command is pending, Next and Submit are disabled and Submit shows a spinner; Previous stays enabled. `isBusy` is for work the page owns: it disables Previous, Next and Submit and sets `data-busy` on the stepper parts. It does not disable step headers (clickable with `linear={false}`) or the fields, and shows no spinner. To lock the fields during host work, disable them yourself, for example with a `<fieldset disabled>` around the fields inside each panel. On `CommandStepper`, `showNavigation={false}` hides the whole built-in footer, Submit included, and `showSubmit={false}` hides only Submit; labels fall back to the provider's stepper messages.
109
109
 
110
110
  ## Stepper layout and styling
111
111
 
@@ -152,7 +152,7 @@ Conditional rendering gives a fresh form per opening; keeping it mounted and tog
152
152
 
153
153
  ## Layout, footer and announcements
154
154
 
155
- - **Columns:** wrap fields in `CommandDialog.Column` (the same as `CommandForm.Column`) inside your own grid or flex container; it does not position itself, and fields inside still bind.
155
+ - **Columns:** wrap fields in `CommandDialog.Column` inside your own grid or flex container. In a dialog a column is only a vertical stack of its fields; the form's automatic side-by-side row applies to direct children of `CommandForm` alone. Fields inside still bind.
156
156
  - **Footer:** `buttons={DialogButtons.YesNo}` relabels the predefined footer; custom footer content does not run the command, and `buttons={null}` removes it. Both custom and no footer turn off X, Escape and backdrop dismissal unless you set `dismissable`.
157
157
  - **Validation announcement (`CommandDialog` only; the steppers have no such option):** `validationAnnouncement={results => …}` receives the refused validation results and returns the text a screen reader announces when an execution is refused for validation; the built-in text is English.
158
158
  - **Values from the caller:** use `initialValues` for seeds and `currentValues` for a reactive overlay; `AutoCommandFields` inside a `CommandDialog` follows the dialog's own `currentValues`.
@@ -3,6 +3,7 @@
3
3
  ## Contents
4
4
 
5
5
  - Edit form on a page
6
+ - Columns
6
7
  - Submit from outside the form
7
8
  - The execute() result
8
9
  - Inside the form
@@ -28,7 +29,16 @@ Populate from a **single-item** query whose properties match the command by name
28
29
  </CommandForm>
29
30
  ```
30
31
 
31
- `CommandForm.Column` does not position itself; supply the grid or flex container. `onBeforeExecute` is synchronous here: mutate and return the instance, never a spread copy.
32
+ `onBeforeExecute` is synchronous here: mutate and return the instance, never a spread copy.
33
+
34
+ ## Columns
35
+
36
+ How `CommandForm.Column` is laid out depends on where it sits.
37
+
38
+ - **Direct child of the form.** As soon as one direct child is a column, the form wraps all its children in one row with the classes `flex flex-column md:flex-row gap-3`, gives each column `flex flex-column gap-3 flex-1`, and gives every other direct child a full-width row. Those are PrimeFlex utility classes. Neither Arc nor Components ships them and a PrimeReact theme does not include them, so load PrimeFlex or define equivalent rules in the application's CSS. Without them the columns stack and the gaps are missing; nothing fails. With them, columns stack below the `md` breakpoint and sit side by side above it.
39
+ - **Anywhere deeper**, for example inside your own `div` or inside `CommandDialog`: the column is only a full-width vertical stack of its fields. Position it with your own container. Fields in it still bind.
40
+
41
+ Without utility CSS, skip `CommandForm.Column` and put the fields in a CSS Grid container inside the form, for example `<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 16rem), 1fr))', gap: '1rem' }}>`. Fields bind at any depth, so the grid needs no column wrapper.
32
42
 
33
43
  ## Submit from outside the form
34
44
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-components-theme-application
3
- description: Use when wiring Cratis Components CSS (tokens, structural styles, baseline theme, per-area sheets, Designsystemet bridge), branding or replacing the palette through `--cratis-*` tokens, switching light/dark or theming a subtree, styling component parts, configuring `CratisComponentsProvider` (locale, messages, icons, router, dialog header actions, toaster, overlay container) selecting a renderer adapter, or authoring one for another design system. Not for keyboard and ARIA semantics (`cratis-components-accessibility`), raising toasts or busy feedback (`cratis-components-coordinate-feedback`), or choosing which control to render (`cratis-components-choose-control`).
3
+ description: Use when wiring Cratis Components CSS (tokens, structural styles, baseline theme, per-area sheets, Designsystemet bridge), branding or replacing the palette through `--cratis-*` tokens, switching light/dark or theming a subtree, styling component parts, configuring `CratisComponentsProvider` (locale, messages, icons, router, dialog header actions, toaster, overlay container) selecting a renderer adapter, authoring one for another design system, or upgrading an application from the PrimeReact-based Components major (which codemods to run and in what order). Not for keyboard and ARIA semantics (`cratis-components-accessibility`), raising toasts or busy feedback (`cratis-components-coordinate-feedback`), or choosing which control to render (`cratis-components-choose-control`).
4
4
  compatibility: Requires @cratis/components and a CSS bundler that resolves package imports.
5
5
  ---
6
6
 
@@ -182,3 +182,5 @@ Under Mermaid's `themeVariables`, override only the colors the site needs:
182
182
  - A cross-module flow appears in the system overview, in the source module's diagram and in the target module's diagram.
183
183
 
184
184
  Deciding what the model should be, rather than drawing it, belongs to `cratis-modeling-design-event-model`.
185
+
186
+ Read [provenance](references/provenance.md) when checking attribution.
@@ -0,0 +1,16 @@
1
+ # Provenance
2
+
3
+ This skill uses material from the Eventmodelers Build-Kits skills by Martin Dilger and Nebulit GmbH (https://nebulit.de), with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted material remains credited to them.
4
+
5
+ Source repository: https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits at commit `bfab031`. Skill paths are relative to `eventmodelers-cli/`.
6
+
7
+ Skill paths below are under `stacks/modeling-kit/templates/.claude/skills/`. The notice is in `LICENSE`.
8
+
9
+ | Source | Idea used | Where | Form |
10
+ |---|---|---|---|
11
+ | `eventmodeling-core-rules`, Connections Read Forward and Updating a Read Model That Already Feeds a Screen | Every connection points to a later position, never back. When a later event changes what an earlier read model shows, the read model is drawn again after that event instead of drawing an arrow back. Elements that belong together sit next to each other, and a frame is inserted beside a taken place rather than wired across a gap. | `references/frame-patterns.md`, Connections read forward | close adaptation |
12
+ | `detect-model-drift` | The last recorded state of the artifact is the baseline, and the commits since then are walked one by one, oldest first, rather than judged from the net difference. | `SKILL.md`, Default path step 6 | idea |
13
+
14
+ An earlier version of this corpus took the connection rules from the same authors' agentic-engineer repository (https://github.com/Nebulit-GmbH/agentic-engineer, commit `07b0f30648d663cb588d7e2c7aa031af9dfc21f2`), under the same consent.
15
+
16
+ Not adopted: board columns, cells, linked copies and `link_element`; the analysis-history note as the place the baseline is stored (here it is the last commit that touched the diagram).
@@ -27,11 +27,13 @@ var json = JsonSerializer.Serialize(order, Globals.JsonSerializerOptions);
27
27
  var roundTrippedOrder = JsonSerializer.Deserialize<Order>(json, Globals.JsonSerializerOptions)!;
28
28
  ```
29
29
 
30
+ A call without an options argument, `JsonSerializer.Serialize(order)`, uses the `System.Text.Json` defaults and nothing from Cratis or Arc, in any host: property names keep their C# casing, `null` properties are written, a concept becomes an object holding `Value`, and no `_derivedTypeId` is written. Nothing fails; the JSON is just a different shape from the application's HTTP surface. Pass options on every call.
31
+
30
32
  `Globals.JsonSerializerOptions` is built once, on first use, against the discovered application types. To build it against another type universe, call `Globals.Configure(derivedTypes)` before the first read; a later call changes nothing.
31
33
 
32
34
  Alternatives:
33
35
 
34
- 1. Inside an Arc host, use the options Arc itself serializes with (inject `IOptions<ArcOptions>` and read `Value.JsonSerializerOptions`), so hand-written JSON matches the HTTP surface.
36
+ 1. Inside an Arc host, when the JSON must match the HTTP surface, use the options Arc itself serializes with: inject `IOptions<ArcOptions>` and read `Value.JsonSerializerOptions`. `Globals.JsonSerializerOptions` is a separate instance and carries none of the converters or resolvers the application added to Arc's options.
35
37
  2. For options you own, add the converters you need from the table below, with the derived-type factory after the others, as the defaults do.
36
38
 
37
39
  ## Host without Arc or Chronicle
@@ -92,6 +92,7 @@ All travel as text. Each has a `toJSON()` that returns that text, so plain `JSON
92
92
 
93
93
  Never compare these with `===`: two instances with the same value are different objects. Use `equals` on `Guid`, `DateOnly` and `TimeOnly`, `getTime()` on `Date` and `ticks` on `TimeSpan`.
94
94
 
95
+ - **`DateOnly.parse` validates, `DateOnly.from` does not.** `parse` throws on text that is not `yyyy-MM-dd` and on a date that does not exist (month 13, 30 February, 29 February outside a leap year). `from(year, month, day)` and `fromDate` store what they are given, so `DateOnly.from(2025, 2, 30)` succeeds and serializes as `2025-02-30`, which the backend then rejects. Build a `DateOnly` from typed or picked text with `parse` inside a `try`, from a picker's `Date` with `fromDate`, and reserve `from` for parts already known to be a real date. Declare a calendar date on a contract as `@field(DateOnly)`; it needs no concept wrapper to travel correctly.
95
96
  - **`Guid.equals(other)`** compares canonical text: a `Guid` is used as-is, any other argument is converted with `toString()`, so GUID text matches and non-GUID text returns `false`. It throws on `null` or `undefined`, so guard nullable values first. The parameter is typed `object`, so turn text you hold into a `Guid` with `Guid.as(text)` (or declare a typed `@field(Guid)` member) before comparing. `Guid.as` and `Guid.parse` throw on non-GUID text, so check untrusted text with `Guid.isGuid` first.
96
97
  - **`TimeSpan` components and totals:** `days`, `hours`, `minutes`, `seconds` (and `milliseconds`, `microseconds`, `nanoseconds`) are components: `hours` is 0 to 23 and whole days sit in `days`. Components other than `days` are unsigned, so read the sign from `ticks` or a total. `ticks`, `totalDays`, `totalHours`, `totalMinutes`, `totalSeconds` and the other totals are signed aggregates, so compare and threshold on them. `parse` rejects hours above 23 and minutes or seconds above 59, so a duration of a day or more is written with a day part (`1.02:30:00`).
97
98
  - **`TimeSpan` fields are plain and writable:** assigning one recalculates nothing, and the text (`toString()`, `toJSON()`) is formatted from `ticks`. Build a changed duration by parsing new text, never by assigning a field.
@@ -238,5 +239,6 @@ pathOf<Invoice>(invoice => invoice.customer.name); // 'customer.name'
238
239
  | A polymorphic member comes back as the base type | The subclass module was not imported, the identifier differs from the backend's, or `derivatives` omits it | Import it, align the identifier, or list it |
239
240
  | `Derived type identifier '…' is already registered for '…'` | Two different classes use one identifier under the same base | Give each a unique identifier |
240
241
  | `Not a Guid.`, `Invalid DateOnly format`, `Invalid TimeOnly format`, `Invalid TimeSpan format` | The text is not the wire format in the Value types table | Fix the payload or the declared type |
242
+ | `Invalid DateOnly: … is out of range` | The text has the right format but names a date that does not exist | Fix the value; validate input before parsing |
241
243
  | A `ValueMap` lookup returns `undefined` for a key that exists, or another key's value | The lookup key's members are in a different order, a member differs from what reading gives it (`null` versus absent, or an array member unset instead of `[]`), a read `Date` key kept sub-millisecond digits, a stored key was changed after insertion, or the key class has no `@field` members | Decorate every key member with `@field`; create lookup keys with `new`, assign members in declared order, give each member the value the read key has (absent stays unassigned, an absent array is `[]`, `null` only where the stored key is `null`), or reuse a key from `entries()`; never change a stored key |
242
244
  | A console warning at load about more than one copy of the package | The package was loaded twice: two installs (even of the same release), or one install reached as both ESM and CommonJS. Converters registered on one copy do not reach the other | Deduplicate the dependency and load it through one module format |
@@ -0,0 +1,18 @@
1
+ Copyright (c) Cratis. All rights reserved.
2
+ Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ Third-party notices
5
+
6
+ This skill adapts material (the modeling discipline: single issuer, causality, trusted context as
7
+ input, narrative order, one view per screen component, applying feedback, deriving the next slice,
8
+ the impact walkthrough and "do not cut corners") from the Eventmodelers Build-Kits skills by Martin
9
+ Dilger and Nebulit GmbH (https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits;
10
+ https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted
11
+ material remains credited to Martin Dilger and Nebulit GmbH.
12
+
13
+ This skill also adapts material from agentic-engineer by Martin Dilger and Nebulit GmbH
14
+ (https://github.com/Nebulit-GmbH/agentic-engineer, commit 07b0f30648d663cb588d7e2c7aa031af9dfc21f2;
15
+ https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted
16
+ material remains credited to Martin Dilger and Nebulit GmbH.
17
+
18
+ See references/provenance.md for the list of adapted material.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: cratis-modeling-design-event-model
3
3
  description: Use when an agreed timeline must be cut into slices with traced values, named facts, consistency guards and owner-agreed examples before delivery, or when a changed rule needs its affected slices bounded. Not for discovering disputed intent (use cratis-modeling-discover-timeline).
4
+ license: LICENSE
4
5
  ---
5
6
 
6
7
  # Design an event model
@@ -14,7 +15,7 @@ description: Use when an agreed timeline must be cut into slices with traced val
14
15
  - Capability catalog
15
16
  - Choose delivery and hand over
16
17
 
17
- An event model describes a system as slices of behavior along a timeline: what is asked for, the facts that become true, and what anyone can then see. Each slice is one behavior, small enough to discuss with the business, specify and deliver on its own. The support-desk names below are illustrative.
18
+ An event model describes a system as slices of behavior along a timeline: what is asked for, the facts that become true, and what anyone can then see. Each slice is one behavior, small enough to discuss with the business, specify and deliver on its own. Support-desk names are illustrative.
18
19
 
19
20
  ## How an event model works
20
21
 
@@ -36,6 +37,8 @@ Use it once actors, facts and open decisions are agreed, or to trace a changed r
36
37
 
37
38
  ## Default path
38
39
 
40
+ Read [modeling discipline](references/modeling-discipline.md) before step 1 and on feedback, a "next slice" request or a feature change.
41
+
39
42
  1. **Pick one outcome and its start.** Name the actor or trigger, request, facts (if any) and visible result. Deliver the producer and its consuming view together. Done when one sentence states the outcome.
40
43
  2. **Choose one slice kind** per behavior from the catalog. Capturing outside data and reacting to it are two slices.
41
44
  3. **Trace every value.** Each input comes from the caller, prior state, generation or a stated rule; each fact names its history and consumers. Work each view backward from its query and key to the contributing facts and their producers. Read [review one slice](references/review-one-slice.md) when an origin, address or consumer is unclear. Done when every input has an origin and every fact a consumer or an agreed historical reason.
@@ -44,15 +47,15 @@ Use it once actors, facts and open decisions are agreed, or to trace a changed r
44
47
  6. **Inventory entries and refusals.** Give every command a reachable entry its caller is authorized for, list each refusal with where it is enforced and its exact message, and for a lifecycle fill a state-by-command table. Read [command inventory](references/command-inventory.md). Done when every command has an entry and refusals (or a reason for none), and no table cell is blank.
45
48
  7. **Agree examples with the owner:** the rule, a concrete setup, the action and the result, plus one contrasting example changing a single value; ask the requester or their named decision owner all open questions in one batch. Done when the owner agreed them; a draft or passing specification is not agreement. Proceed provisionally only if asked, marking unaccepted results.
46
49
  8. **Check for holes:** missing identifiers, specs, field origins or consumers; references to facts or histories nothing creates; screen fields its view lacks; unauthorized decision reads. Done when each is fixed or recorded as an open question.
47
- 9. **Choose delivery and hand over** (last section).
50
+ 9. **Choose delivery and hand over.**
48
51
 
49
52
  ## Worked example
50
53
 
51
- Given no history at ticket T, an agent submits `OpenTicket(T, "Printer offline")`. Accepted, it records `TicketOpened(Title: "Printer offline")` on history T, and the observable `OpenTickets` query shows a new row T with that title. Contrast: **if** the owner agrees a blank title is refused, expect the agreed message and no append. Inbound, the monitoring system's alert key addresses a local history: the first observation records `IncidentReported`, an identical repeat succeeds without a fact, and a separate automation slice invokes `OpenTicket` and handles its refusals. Outbound, private `TicketResolved` maps to public `TicketResolutionPublished`. [Review one slice](references/review-one-slice.md) traces this example value by value.
54
+ Given no history at ticket T, an agent submits `OpenTicket(T, "Printer offline")`. Accepted, it records `TicketOpened(Title: "Printer offline")` on history T, and the observable `OpenTickets` query shows a new row T with that title. Contrast: **if** the owner agrees a blank title is refused, expect the agreed message and no append. Inbound, the monitoring system's alert key addresses a local history: the first observation records `IncidentReported`, an identical repeat succeeds without a fact, and a separate automation slice invokes `OpenTicket` and handles its refusals. Outbound, private `TicketResolved` maps to public `TicketResolutionPublished`.
52
55
 
53
56
  ## Capability catalog
54
57
 
55
- Every building block, with when to reach for it. "Code:" names the skill that realizes it. Blocks work code-first unless marked model-first; **code-first only** marks what a Screenplay model cannot author or execute. [Model-first](references/model-first.md) lists the remaining Screenplay and Stage limits.
58
+ "Code:" names the skill that realizes it. Blocks work code-first unless marked model-first; **code-first only** marks what a Screenplay model cannot author or execute. [Model-first](references/model-first.md) lists the remaining Screenplay and Stage limits.
56
59
 
57
60
  ### Slice kinds
58
61
 
@@ -160,3 +163,5 @@ Every building block, with when to reach for it. "Code:" names the skill that re
160
163
  **Model-first** only when the Screenplay opt-in in the `general` rule applies (an explicit Screenplay or Stage request, existing `.play` source, or a configured Screenplay root) and the model is not frozen. Read [model-first](references/model-first.md).
161
164
 
162
165
  **Hand over:** slice name and kind, trigger or intent, entry and caller, addressed identity, field origins, facts and payloads, response, refusals and messages, read result or follow-up, agreed examples, dependent slices, owner and open assumptions. Acceptance records a domain decision, not permission to execute. On either path, verify the fact schema, identity and observable outcome on the authorized target, not only generated files or model results.
166
+
167
+ Read [provenance](references/provenance.md) when checking attribution.
@@ -0,0 +1,71 @@
1
+ # Modeling discipline
2
+
3
+ ## Contents
4
+
5
+ - Who asks, and in what order
6
+ - Where every value starts
7
+ - Views and derived conditions
8
+ - Changing a model that exists
9
+ - Do not cut corners
10
+
11
+ Twelve rules the default path assumes. Each gives one default; an exception applies only where it is named. The support-desk names are illustrative.
12
+
13
+ ## Who asks, and in what order
14
+
15
+ **1. One issuer per command.** Every command is issued from one named place: one screen action a person uses, or one automation. A command nothing issues is dead. When a second issuer appears, treat it as a second command with its own name, because a different caller usually means different inputs, a different authorization or a different refusal.
16
+
17
+ Exception: the second place asks for exactly the same thing, with the same inputs, rule and refusal messages (a row action on the open-tickets list and a button on the ticket's detail page; an automation that opens a ticket the same way an agent does). That stays one command, and each place gets its own row in the entry-path table with its caller and identity.
18
+
19
+ **2. Something to decide from comes before every command.** A flow starts where a person sees something (a screen showing a view, or a blank creation form) or where an automation is triggered. Between two commands in a flow there is always a view the actor reads to decide, or an automation that reacts to the first command's fact. Two commands back to back mean one of two things: the second outcome always follows the first decision, so it is a second fact of that one command; or a view or an automation is missing, so add its slice.
20
+
21
+ A screen that shows existing data before the person acts reads a view. Only a blank creation form needs none. A field a screen shows never comes from the command that screen submits.
22
+
23
+ **3. Story order, never type order.** Write the slice list, the timeline and the hand-over in the order the story happens: the screen, command and fact of one decision, then the view that fact feeds, then the next decision. Never list all facts, then all commands, then all views, and never collect the views at the end: a view belongs right after the fact that first feeds it. Group by type only to count or review what exists.
24
+
25
+ ## Where every value starts
26
+
27
+ **4. Trusted context is an input.** The current time, the acting caller and the tenant reach a decision from the command's trusted context: the time the command was received, the authenticated caller and the tenant the request runs for. List each one a rule uses in the value trace next to the typed inputs, with "context" as its origin. A decision never reads the wall clock, and the caller never types their own identity, tenant or the current time into a form. A specification sets the clock and the caller in its given.
28
+
29
+ Exception: a business date someone chooses (a due date, an appointment) is a typed input, not context.
30
+
31
+ **5. "Generated" means "starts here".** Mark a value as starting in a slice only where it really originates: typed by the caller, a fresh identifier, taken from trusted context, or computed by the view's projection or reducer (a count, a total). Everywhere else the value is carried from a named source: the view on the screen, a command input, a field of a contributing fact, or decision state. "Generated" never means "unknown". A value whose origin nobody can name is a hole for step 8 of the default path: record the open question, and never label it generated or give it a default to make the trace close.
32
+
33
+ **6. Concrete over generic.** Model the real case with the names the business uses: `TicketEscalated` with the reason the agent gave, not `TicketUpdated` or `RecordChanged` with a type field. Use real values in examples ("Printer offline", not "Title 1"). Generalize only when the owner names two real cases that share the rule.
34
+
35
+ Exception: when the product itself is the generic thing (a form builder, a rules engine), the generic concept is the real case.
36
+
37
+ ## Views and derived conditions
38
+
39
+ **7. One view per screen component.** A component is an area a person would point at and name as one thing: a list, a summary card, a count tile. Each component reads one view, and a screen with a list and a count tile reads two. Most screens have one component, so do not force a split. A homogeneous list is one component, however many kinds of fact change its rows.
40
+
41
+ Exception: when values in two components must agree with each other at every moment (a list and the total beneath it), project them into one view and read it once, because separate views advance independently.
42
+
43
+ Build a view from the fields its component shows, never from the screen's title: write the fields down, then name for each the fact that supplies it or the calculation the projection makes. When more than three kinds of fact feed one view, check it field by field. Remove a contributing fact no field uses. If the fields belong to two things a person would name separately (a ticket's details and the team's open-ticket count), make two views. If one field really needs the whole lifecycle (a row's status), keep the view and note which field needs it and why.
44
+
45
+ **8. A condition someone acts on gets its own fact.** For a derived condition ("the ticket is overdue", "the order is ready to ship"), ask who acts on it. When a person, an automation or another system reacts to it, record it as its own fact, named as the business names it, by an automation that works from a to-do list of candidates and a command that rechecks current state. When it is only displayed, derive it in the view and add no fact.
46
+
47
+ Fold several causes into one such fact only when they mean the same outcome to the business (released, returned and repaired all make a copy available again). Keep causes the business tells apart as separate facts (reserved, lost, withdrawn), even when the view then draws on more of them.
48
+
49
+ ## Changing a model that exists
50
+
51
+ **9. Feedback does not bend the rules.** Classify each comment before changing anything:
52
+
53
+ | The comment is about | Do |
54
+ | --- | --- |
55
+ | Wording, a label or a message | Edit it in place |
56
+ | One field added, removed or renamed | Edit in place, and follow the field through every command, fact, view and screen that carries it |
57
+ | A value or message of a rule the command already has | Edit the rule and its examples in place |
58
+ | A new step, page, decision or thing a person enters | Design a new slice by the full default path, placed in the story right after the slice it follows |
59
+ | No result named, or two comments that contradict | Ask the owner, offering the options; do not pick a winner |
60
+
61
+ Read the slice the comment names, then its neighbours: if a slice already does what the comment asks, point to it instead of adding a duplicate. When a comment asks for both an edit and a new step, the step is a new slice and the rest stays where it was. A total or status a new screen shows is a field of its view, never typed into or computed on the screen. Report which slices are new.
62
+
63
+ **10. "The next slice" is derived, not asked for.** When the user asks for the next slice without naming it, take the first unaddressed affordance in story order: a screen action that leads nowhere, a fact nothing consumes, a to-do item nothing closes, a state with no way out in the transition table. Choose it without stopping to ask which one; a wrong guess is cheap to correct. Design it by the default path, and report which slice was chosen and why. A new screen matches its sibling screens in layout, naming and field labels. Step 7 of the default path still applies: the choice needs no question, but the slice's examples need the owner's agreement.
64
+
65
+ **11. Walk the impact before changing a feature.** List every slice the feature needs, in the order it runs, and mark each one **existing** (used as it is), **changed** (say what changes) or **new** (a proposal, sketched with its screen, command, facts and view). Write each step as: what the actor sees and does → what is recorded → what becomes visible or is triggered.
66
+
67
+ Start at the slice where the change lands. Follow it downstream to every fact that would carry the new value and every view, automation and screen those facts feed; follow it upstream to where the value has to come from. Leave out unchanged slices nobody needs in order to follow the feature. State only rules the owner agreed; a gap the walk reveals is an open question, not a rule. More than about twenty slices means several features: say so and walk the first. The walk changes nothing. The owner agrees to it before any slice is edited.
68
+
69
+ ## Do not cut corners
70
+
71
+ **12. Complete every step for every slice.** A correct model is the point of this work, not optional scope. When a rule needs more slices, more views or more questions than expected, do the larger version. Cost and effort are never a reason to drop a view a screen needs, leave a refusal or a transition-table cell blank, merge a translation into the automation that reacts to it, or mark a missing origin as accepted. The thought "this needs three more slices, so simplify" is the signal to do the larger version. A real trade-off of scope belongs to the owner: name it and what it costs, and let them decide.
@@ -0,0 +1,39 @@
1
+ # Provenance
2
+
3
+ Parts of this skill adapt work by Martin Dilger and Nebulit GmbH (https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted material remains credited to them.
4
+
5
+ Source: https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits at commit `bfab0313e1f0d070c6f446b9b19c5890c7b5f423`, skills under `eventmodelers-cli/stacks/modeling-kit/templates/.claude/skills/`.
6
+
7
+ ## Modeling discipline
8
+
9
+ | Source skill | Idea used | Used in | Form |
10
+ | --- | --- | --- | --- |
11
+ | `eventmodeling-core-rules/SKILL.md` (structural constraints, causality) | A command has a single issuer; a flow starts with something seen or an automation; no command directly follows a command | `modeling-discipline.md` rules 1 and 2 | Close adaptation. Adapted: one command may keep several entries when they ask for exactly the same thing, because a screen here may offer the same command from more than one place |
12
+ | `eventmodeling-core-rules/SKILL.md` (commands are pure functions of their inputs) | Clock, acting user and tenant are inputs to the decision, never read inside it | `modeling-discipline.md` rule 4 | Idea. Adapted: the values come from the command's trusted context instead of being command fields |
13
+ | `eventmodeling-core-rules/SKILL.md` (Concrete Over Generic) | Model the real case with real names and values; generalize only for a product that is itself generic | `modeling-discipline.md` rule 6 | Close adaptation |
14
+ | `eventmodeling-orchestrating-event-modeling/SKILL.md` (place in narrative order, never type by type) | Facts, commands and views appear in story order; a view sits right after the fact that first feeds it | `modeling-discipline.md` rule 3 | Close adaptation. Board columns and lanes are not adopted |
15
+ | `eventmodeling-orchestrating-event-modeling/SKILL.md` (do not cut corners to save tokens or effort) | Correctness is not optional scope; the "simplify" thought is the signal to do the larger version; a real trade-off goes to the owner | `modeling-discipline.md` rule 12 | Close adaptation |
16
+ | `eventmodeling-identifying-outputs/SKILL.md` (screen components, field mappings) | One view per screen component; a homogeneous list is one component; a view is built from the fields shown, never from the screen title; a wide fan-in is checked field by field | `modeling-discipline.md` rule 7 | Close adaptation. Adapted: most screens stay one component and one view |
17
+ | `eventmodeling-identifying-outputs/SKILL.md` (dedicated outcome events) | A derived condition someone acts on becomes its own fact; causes are folded into one fact only when they mean the same outcome | `modeling-discipline.md` rule 8 | Close adaptation. Adapted: the fact is recorded by an automation whose command rechecks current state |
18
+ | `eventmodeling-information-completeness/SKILL.md` | "Generated" marks where a value starts, never an unknown origin; an unknown origin is a gap | `modeling-discipline.md` rule 5; `SKILL.md` steps 3 and 8 | Close adaptation |
19
+ | `apply-feedback/SKILL.md` (feedback never bends the modeling rules) | Classify a comment; a new step is a new slice; edit in place only for wording, one field or an existing rule; check neighbours before duplicating; ask on unclear or opposite comments | `modeling-discipline.md` rule 9 | Close adaptation. Comment handling, slice status and screen markup are not adopted |
20
+ | `add-next-slice/SKILL.md` | Derive the next slice from the first unaddressed affordance instead of asking; a wrong guess is cheap; a new screen matches its siblings; report what was chosen and why | `modeling-discipline.md` rule 10 | Close adaptation. Adapted: the owner still agrees the examples |
21
+ | `walkthrough/SKILL.md` | The impact walkthrough: every slice a feature needs in run order, marked existing, changed or new; the three-part step sentence; follow the change downstream and upstream; never invent rules; the size limit | `modeling-discipline.md` rule 11 | Close adaptation. The reply format and screen previews are not adopted |
22
+
23
+ ## Carried over from earlier skills
24
+
25
+ This skill succeeds `cratis-chronicle-event-modeling`, `cratis-screenplay-event-modeling`, `cratis-screenplay-slice-design` and `cratis-screenplay-modeling-lifecycle`. The credits those skills carried for material that lives on here:
26
+
27
+ | Source skill | Idea used | Used in | Form |
28
+ | --- | --- | --- | --- |
29
+ | `eventmodeling-information-completeness/SKILL.md`, `eventmodeling-identifying-inputs/SKILL.md` | Every value starts at one named place and is carried by name; a rule's values are input, state or context | `SKILL.md` step 3; `review-one-slice.md` | Idea |
30
+ | `eventmodeling-identifying-inputs/SKILL.md` | Per command: who issues it, its inputs, and every way it is refused; person-issued and automation-issued commands told apart | `command-inventory.md` | Idea |
31
+ | `eventmodeling-storyboarding-events/SKILL.md`, `eventmodeling-identifying-outputs/SKILL.md` | A field a screen shows names its view and never comes from the command the screen submits; a screen that shows data needs a view | `SKILL.md` step 8; `modeling-discipline.md` rule 2 | Idea |
32
+ | `eventmodeling-designing-automation-chains/SKILL.md` | An automation drains a to-do list that facts open and close | `SKILL.md` (Automation) | Idea |
33
+ | `eventmodeling-designing-event-models/SKILL.md`, `eventmodeling-slicing-event-models/SKILL.md` | Facts as past-tense business facts; one slice per command, view or automation; a slice depends only on facts produced earlier | `SKILL.md` (How an event model works, Slice kinds, Facts) | Idea |
34
+ | `eventmodeling-interview-protocol/SKILL.md` | Ask open questions together, and only what the step needs | `SKILL.md` step 7 | Idea |
35
+ | `eventmodeling-core-rules/SKILL.md` (open questions and decided failures) | An undecided point is an open question; a decided refusal is a rule with an example | `SKILL.md` steps 7 and 8; `command-inventory.md` | Idea |
36
+
37
+ Several of these ideas first entered this corpus from https://github.com/Nebulit-GmbH/agentic-engineer at commit `07b0f30648d663cb588d7e2c7aa031af9dfc21f2`, by the same authors and under the same consent.
38
+
39
+ Method lineage: Event Modeling by Adam Dymitruk (eventmodeling.org) and Martin Dilger, *Understanding Eventsourcing*, cited as practice.
@@ -0,0 +1,14 @@
1
+ Copyright (c) Cratis. All rights reserved.
2
+ Licensed under the MIT license. See LICENSE file in the canonical Cratis/AI repository for the full license text.
3
+
4
+ Third-party notices
5
+
6
+ This skill adapts material from the Eventmodelers Build-Kits skills by Martin Dilger and
7
+ Nebulit GmbH (https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits; https://nebulit.de), used
8
+ with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted material remains credited
9
+ to Martin Dilger and Nebulit GmbH.
10
+
11
+ This skill also draws on ideas from agentic-engineer by Martin Dilger and Nebulit GmbH
12
+ (https://github.com/Nebulit-GmbH/agentic-engineer, commit 07b0f30648d663cb588d7e2c7aa031af9dfc21f2;
13
+ https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted
14
+ material remains credited to Martin Dilger and Nebulit GmbH.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: cratis-modeling-discover-timeline
3
3
  description: Use when a business request, story, workshop or document package must become an agreed, ordered timeline of triggers, actors, facts, views and owned open questions before slices are designed, including capturing it on a Studio brainstorming board. Not for cutting an agreed timeline into slices (use cratis-modeling-design-event-model), for behaviour that already runs in code (use cratis-modeling-trace-existing-behavior) or for a screen recording (use cratis-screenplay-recover-intent).
4
+ license: LICENSE
4
5
  ---
5
6
 
6
7
  # Discover the business timeline
@@ -144,7 +145,9 @@ and the open branches. For example:
144
145
  > collection" on the repair status page, and the clerk records *bike collected* when she picks it up.
145
146
  > Open: what happens if Mia does not answer the quote within three days? (owner: shop manager)
146
147
 
147
- Ask the decision owner which parts they confirm. Batch the remaining questions. Use the discovery
148
+ When work passes between several roles, first retell it as numbered sentences
149
+ ([Retelling the story](references/story-retelling.md)). Ask the decision owner which parts they confirm.
150
+ Batch the remaining questions. Use the discovery
148
151
  questions reference when a missing decision would change the story. Leave disputed branches open. If you
149
152
  are asked to proceed provisionally, name the assumptions and what is still unaccepted. A draft, or your
150
153
  own judgement, is not agreement.
@@ -272,8 +275,11 @@ Off the default path; use them once a model exists.
272
275
  ## References
273
276
 
274
277
  - [Discovery questions](references/discovery-questions.md): the questions to ask for each kind of missing
275
- decision.
278
+ decision, which question fits which step, and how to pace a round. Read it before you send questions.
279
+ - [Retelling the story](references/story-retelling.md): read it when work passes between roles, when a
280
+ branch may be a separate story, or when an outside party hands something over.
276
281
  - [Group and document intake](references/group-and-document-intake.md): workshop roles and rounds, and
277
282
  the fact ledger for document packages.
278
283
  - [Discovery in Studio](references/studio.md): every brainstorming board operation with its MCP tool or
279
284
  command, region order, handover, chats and agents, guided and voice modeling, and import.
285
+ - Read [provenance](references/provenance.md) when checking attribution.
@@ -16,3 +16,31 @@ Choose the question whose answer would change the timeline. Use values from the
16
16
  | Correction | When a recorded value turns out to be wrong, how is it put right, and who must be told? |
17
17
 
18
18
  **What a contrasting answer changes.** Suppose the owner says, "If the customer declines the quote, we don't repair the bike; they collect it and pay the inspection fee." Keep Mia's approved repair as the main path. Add a branch for the same quote declined: record *quote declined*, then *bike collected*, with no *repair completed*. Copy the inspection fee exactly as stated and note its source. If the owner only remembers that customers sometimes left without a repair, report that observation. Whether a fee was charged stays an open question for the owner.
19
+
20
+ ## Which question fits which step
21
+
22
+ Before you ask, name what the answer could change on the timeline. If the honest answer is "nothing", drop the question. Ask about a consequence on the action that causes it, never on the screen that shows the outcome afterwards.
23
+
24
+ | The step in front of the owner | Ask | Never ask here |
25
+ |---|---|---|
26
+ | An action that changes something (take in a bike, approve a quote) | "Who does this, and who must not?" and "What happens next?" | The rule, example and data questions, unless a row below also applies. |
27
+ | An action that can be turned down or can end in more than one way | The rule: "When must this be turned down, and what does the person learn then?" An example: "Give me one real case that went through and one that did not." | Rule and example questions on an action that always succeeds, or on Back, Close or Print. |
28
+ | An input the person fills in | The data: "Which of these did you type in, which were known already, and which are needed later, and where?" | Data questions on a value the screen only shows, such as a repair number or a total. |
29
+ | A read-only screen, or a confirmation such as "Repair booked" | Only "Where does this come from?" and "What happens next?" | Who, rule, example and data questions. |
30
+ | A step with a date, a deadline, a wait or a repetition | The time and waiting questions in the table above | Time questions on a step that has none of these. |
31
+
32
+ "Who sees which rows of this list?" asks where a view comes from. It is not the "who must not" question, which belongs to actions.
33
+
34
+ Word each question in the business's own words for that step ("What happens when the mechanic sends the quote?"). Do not use modeling terms such as command, event or read model.
35
+
36
+ ## Pacing a round of questions
37
+
38
+ A round is one pass through the story from its first step to its last, in story order, sent to the owner as one batch. Do not jump back: a question about an earlier step waits for the next round.
39
+
40
+ - **At most two questions per step in a round**, the two whose answers would change the timeline most. When you are walking screens, the step is the screen. A third question waits for the next round.
41
+ - **Every action gets "What happens next?"**, directly after its own question: "What does the person see, what else starts, and who is told?" The answer names the next step, so the round always has somewhere to go.
42
+ - **First round: the main path.** Ask what happens, which data and what comes next. Keep rule, example and time questions for the second round, and ask them only on the steps where the first round showed a refusal, a branch or a wait.
43
+ - **Ask where the story ends, then ask again on the last step.** "What does the person do after this? What happens a day later? Who takes over from here?" Repeat the question on every new step an answer names. Stop when the owner says nothing follows, or puts what follows in another story; record that answer as the ending.
44
+ - **A later round starts at the first step that still has an open question.** Do not repeat a question the owner has answered.
45
+
46
+ **What an answer changes.** A "what happens next" answer becomes the next step. A data answer becomes the values on that step, each with its source. A rule or example answer becomes a refusal or a branch that carries the owner's example values. A "where does this come from" answer becomes a view and the facts behind it. When an answer contradicts the timeline, show the owner both statements and ask which holds. Do not change the timeline silently.
@@ -0,0 +1,22 @@
1
+ # Provenance
2
+
3
+ This skill uses material from the Eventmodelers Build-Kits skills by Martin Dilger and Nebulit GmbH (https://nebulit.de), with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted material remains credited to them.
4
+
5
+ Source repository: https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits at commit `bfab031`. Skill paths are relative to `eventmodelers-cli/stacks/modeling-kit/templates/.claude/skills/`.
6
+
7
+ | Source | Idea used | Form |
8
+ |---|---|---|
9
+ | `eventmodeling-workshop-questions` | Which question fits which kind of step: "who" only on an action that changes something, rule and example only on an action that can refuse or branch, data only on inputs, and only origin and "what happens next" on read-only and confirmation screens. A question must be able to change the model. Business wording, not modeling terms. | close adaptation |
10
+ | `eventmodeling-workshop-questions` | Pacing: at most two questions per screen, a "what happens next" question for every action, the main path before rules and examples, asking where the story ends and again on the last step, never repeating an answered question, and treating a contradicting answer as a question back. | close adaptation |
11
+ | `domain-story` | Retelling a flow as numbered sentences "actor does work object to actor"; actors are roles, work objects are business nouns and never command or event names; one sentence per thing that happens; the sentence for each kind of step; asking for one missing part at a time; never deleting on the strength of a retelling without confirmation. | close adaptation |
12
+ | `eventmodeling-brainstorming-events` | Divergent journey (its own timeline) against decision point (a branch in one timeline), with the test question. A story is a journey, not one operation. | close adaptation |
13
+ | `eventmodeling-brainstorming-events` | A hand-over from an outside party is a single moment, after which the story continues with the business's own steps; a long run of the outside party's steps is a story of its own. | idea |
14
+ | `eventmodeling-brainstorming-events` | A role catalog that records what each role does and what it cannot do, carried here as the actor's Does, Reads and Cannot lines. | idea |
15
+ | `eventmodeling-brainstorming-events`, `timeline` | A hotspot is a note beside the facts, never a fact. | idea |
16
+ | `eventmodeling-core-rules` | Thinking the work through without software, as the "Without software" sweep lens. Modeling one real case with real values instead of a generic structure. | idea |
17
+ | `eventmodeling-interview-protocol` | Not asking what is already answered, and stating assumptions visibly when proceeding without an answer. | idea |
18
+ | `summarize` | Document intake: marking each item stated, inferred or assumed, copying thresholds and deadlines word for word with their source, and showing contradictions instead of resolving them. | idea |
19
+
20
+ An earlier version of this corpus took the divergent-journey, hand-over, hotspot and interview ideas from the same authors' agentic-engineer repository (https://github.com/Nebulit-GmbH/agentic-engineer, commit `07b0f30648d663cb588d7e2c7aa031af9dfc21f2`), under the same consent.
21
+
22
+ Not adopted: board, chapter, lane, column and node mechanics; the story document format and its drawing; chat snippets and polls; question set-up states for a prototype; "take the most defensible reading and continue" when a retelling leaves something open (this skill records an open question with an owner instead).
@@ -0,0 +1,66 @@
1
+ # Retelling the story
2
+
3
+ A retelling reads the timeline back as numbered sentences about who hands what to whom. It leaves out facts, addresses and certainty labels, so the owner can check the flow of work without learning the ledger. It does not replace the readback: retell first, apply the corrections, then read the timeline back for confirmation. Names are illustrative (a bike repair shop).
4
+
5
+ ## Write the sentences
6
+
7
+ Each sentence has the form **actor does work object to actor**, with one verb in the present tense.
8
+
9
+ 1. The customer hands the bike to the counter clerk.
10
+ 2. The counter clerk passes the repair ticket to the mechanic.
11
+ 3. The mechanic sends the quote to the customer.
12
+ 4. The customer gives approval to the mechanic.
13
+ 5. The mechanic reports the finished repair to the counter clerk.
14
+ 6. The workshop system shows the repair status to the customer.
15
+ 7. The counter clerk returns the bike to the customer.
16
+
17
+ - **Actors are roles**, never named people and never screens: "counter clerk", "mechanic". A system or an outside party can be an actor ("workshop system", "payment provider"). Use the same name for the same role in every sentence.
18
+ - **Work objects are business nouns**: "quote", "repair ticket", "bike". Never use a command or fact name such as "approve quote" or "quote approved". Those belong to the ledger.
19
+ - **One sentence per thing that happens in the business**, in story order. Number them. Give two sentences the same number only when the two things happen in parallel.
20
+ - **The receiver or the work object can be missing, never both.** "The mechanic inspects the bike" is a sentence.
21
+ - **Tell only what the timeline holds.** A step nobody told you about is not a sentence: list it under the retelling as an open question with its owner.
22
+ - **Keep one story to between 3 and 15 sentences.** A longer story usually holds two stories; see One story or two below.
23
+
24
+ Each ledger row gives one sentence:
25
+
26
+ | Ledger row | Sentence |
27
+ |---|---|
28
+ | A person asks and a fact is recorded | the person does the work object to whoever receives it |
29
+ | Someone sees a result | the system shows the work object to that person |
30
+ | A trigger with no person (deadline, schedule) | the system does the work object to whoever it reaches |
31
+ | An outside party hands something over | the outside party reports the work object to the business |
32
+
33
+ ## Model what the retelling corrects
34
+
35
+ Ask the owner to correct the sentences, not the ledger. When a sentence is missing an actor, a work object or a receiver, ask for one thing at a time: who does it, what do they do, with which work object, to whom, and what happens next. Then change the timeline:
36
+
37
+ | The owner | Change the timeline |
38
+ |---|---|
39
+ | adds a sentence | Add a step. Ask what became true and in whose history. |
40
+ | renames an actor or a work object | Use that word in every step. The ledger keeps the owner's vocabulary. |
41
+ | reorders sentences | Reorder the steps, and ask again which earlier fact made each moved fact possible. |
42
+ | says a sentence is wrong | Ask what happened instead, and change that step. |
43
+ | says a step did not happen, or leaves it out when repeating the story | Do not delete the step yet. Name the step and its fact, and remove it only when the owner confirms, because an omission is not a decision and the fact may already be confirmed. |
44
+ | says something the timeline contradicts | Show both statements and ask which holds. |
45
+
46
+ The retelling is done when the owner has no further corrections and every correction is a changed step or an open question with an owner.
47
+
48
+ ## One story or two
49
+
50
+ A branch is one of two things. Decide which before you order the facts around it.
51
+
52
+ - **Decision point: one timeline.** One request or one trigger ends in one of several outcomes that exclude each other, and the rest of the story is otherwise the same. *Quote approved* or *quote declined* after the same quote is a decision point. Keep it as a branch on this timeline, with the condition that selects each outcome.
53
+ - **Divergent journey: its own timeline.** The actor makes a different choice before the work starts, and what follows differs from then on: other steps, other things to see, often another role. A walk-in repair and a repair booked online with a courier pickup are two journeys. Write each as its own timeline with its own retelling.
54
+
55
+ Test: "Does this branch start a different story, or does it decide how this story ends?" A different story gets a timeline. A different ending is a branch.
56
+
57
+ Do not split further than that: taking in a repair, looking it up and correcting its details are one story, not three.
58
+
59
+ ## A hand-over from an outside party
60
+
61
+ When an outside party, such as a payment provider, a courier or a supplier, acts in the story, its hand-over is one moment on the timeline: one fact in the business's own words, such as *payment confirmed* or *part delivered*. The story continues with the business's own next step straight after it.
62
+
63
+ - Record what the business learned at the hand-over. Do not record the outside party's internal steps, because the business does not own their meaning.
64
+ - In the retelling, the hand-over is one sentence: "The payment provider reports the payment to the workshop."
65
+ - Several steps of the outside party in a row belong to that party's own story. Leave them out of this timeline, or give them a timeline of their own when the business also has to understand that work.
66
+ - Ask the hand-over failure questions of the sweep (refusal, no answer, a late answer, two answers) at this one moment.
@@ -0,0 +1,17 @@
1
+ Copyright (c) Cratis. All rights reserved.
2
+ Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ Third-party notices
5
+
6
+ This skill adapts material (the structural shapes, the business-language review and the stressor
7
+ analysis) from the Eventmodelers Build-Kits skills by Martin Dilger and Nebulit GmbH
8
+ (https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits; https://nebulit.de), used with the
9
+ explicit consent of Martin Dilger and Nebulit GmbH. The adapted material remains credited to
10
+ Martin Dilger and Nebulit GmbH.
11
+
12
+ This skill also adapts material from agentic-engineer by Martin Dilger and Nebulit GmbH
13
+ (https://github.com/Nebulit-GmbH/agentic-engineer, commit 07b0f30648d663cb588d7e2c7aa031af9dfc21f2;
14
+ https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted
15
+ material remains credited to Martin Dilger and Nebulit GmbH.
16
+
17
+ See references/provenance.md for the list of adapted material.