@cratis/pi 7.51.0 → 7.51.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/harnesses/copilot/instructions/application-profile.instructions.md +15 -1
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/cratis-folder-is-configuration.instructions.md +3 -1
- package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +7 -1
- package/package/corpus/harnesses/copilot/instructions/guards-and-fuses.instructions.md +7 -1
- package/package/corpus/harnesses/pi/extensions/shared/rules.ts +9 -1
- package/package/corpus/rules/application-profile.md +15 -1
- package/package/corpus/rules/authoring-skills.md +1 -1
- package/package/corpus/rules/cratis-folder-is-configuration.md +3 -1
- package/package/corpus/rules/exit-codes-and-wrappers.md +7 -1
- package/package/corpus/rules/general.md +8 -6
- package/package/corpus/rules/guards-and-fuses.md +7 -1
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +8 -7
- package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +1 -1
- package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +2 -2
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +15 -19
- package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +8 -6
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +10 -14
- package/package/corpus/skills/cratis-arc-react-page/references/dialogs.md +4 -2
- package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +7 -7
- package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +2 -2
- package/package/corpus/skills/cratis-arc-react-page/references/queries-and-commands.md +1 -1
- package/package/corpus/skills/cratis-arc-react-page/verification.json +0 -2
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +15 -19
- package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +10 -8
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +7 -7
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/provenance.md +3 -3
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +30 -28
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +8 -8
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +4 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +3 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +1 -14
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/public-events-and-direction.md +6 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +5 -6
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +11 -12
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +3 -3
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +2 -2
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +22 -20
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +1 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +9 -10
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/refusals-and-redelivery.md +1 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +3 -4
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +0 -4
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +16 -15
- package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +17 -17
- package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +8 -8
- package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +8 -12
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +31 -29
- package/package/corpus/skills/cratis-screenplay-command-surface/references/inline-events.md +5 -5
- package/package/corpus/skills/cratis-screenplay-command-surface/references/operations.md +2 -2
- package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +3 -3
- package/package/corpus/skills/cratis-screenplay-command-surface/references/shop-generation.md +10 -10
- package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +9 -7
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -5
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +14 -15
- package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +2 -2
- package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +3 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +13 -17
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/naming-primitives.md +2 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +2 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +11 -12
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +2 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +0 -4
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +4 -4
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +34 -21
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generated-recovery.md +18 -12
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +7 -7
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +4 -4
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +24 -29
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/choosing-generation.md +1 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +44 -51
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +31 -36
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +56 -63
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/model-notes.md +11 -10
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/property-links.md +15 -15
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/release-baseline.md +25 -21
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/screen-authoring-workflow.md +16 -31
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +5 -4
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +3 -3
- package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +3 -4
- package/package/corpus/skills/cratis-screenplay-model-review/references/public-keys-and-routes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +7 -5
- package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +2 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +11 -12
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/code-reading-and-tokens.md +2 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +8 -10
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +6 -6
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +2 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +3 -3
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +11 -22
- package/package/corpus/skills/cratis-screenplay-projections/references/pdl-grammar.md +1 -1
- package/package/corpus/skills/cratis-screenplay-projections/verification.json +0 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +16 -29
- package/package/corpus/skills/cratis-screenplay-read-surface/references/equality-filters.md +14 -18
- package/package/corpus/skills/cratis-screenplay-read-surface/references/guarded-actions.md +5 -7
- package/package/corpus/skills/cratis-screenplay-read-surface/references/named-keys.md +6 -6
- package/package/corpus/skills/cratis-screenplay-read-surface/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +1 -2
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +18 -19
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +2 -2
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +6 -6
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +4 -4
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +5 -6
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +2 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +13 -15
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +1 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +2 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +4 -6
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +4 -4
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +3 -3
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +11 -9
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +5 -5
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +0 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +11 -13
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +4 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +6 -4
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +4 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +37 -40
- package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +10 -15
- package/package/corpus/skills/cratis-screenplay-specifications/references/child-ordering.md +14 -12
- package/package/corpus/skills/cratis-screenplay-specifications/references/concept-rules.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +9 -10
- package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +5 -6
- package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +8 -9
- package/package/corpus/skills/cratis-screenplay-specifications/references/source-notes.md +13 -16
- package/package/corpus/skills/cratis-screenplay-specifications/references/whitespace-rules.md +15 -13
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +4 -9
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +29 -29
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +18 -15
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +16 -15
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +19 -17
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +3 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +2 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +2 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +2 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +0 -28
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +21 -26
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/guarded-interactions.md +3 -3
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/provenance.md +1 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/response-continuations.md +10 -10
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +23 -30
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +4 -5
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +1 -5
- package/package.json +1 -1
- package/src/index.ts +9 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/product-sources.md +0 -15
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/provenance.md +0 -13
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
applyTo: "
|
|
2
|
+
applyTo: "**/*.cs,**/*.csproj,**/*.ts,**/*.tsx,**/*.go,**/go.mod,**/go.sum,**/*.kt,**/*.kts,**/*.java,**/*.ex,**/*.exs,**/*.play"
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.cs"
|
|
5
|
+
- "**/*.csproj"
|
|
6
|
+
- "**/*.ts"
|
|
7
|
+
- "**/*.tsx"
|
|
8
|
+
- "**/*.go"
|
|
9
|
+
- "**/go.mod"
|
|
10
|
+
- "**/go.sum"
|
|
11
|
+
- "**/*.kt"
|
|
12
|
+
- "**/*.kts"
|
|
13
|
+
- "**/*.java"
|
|
14
|
+
- "**/*.ex"
|
|
15
|
+
- "**/*.exs"
|
|
16
|
+
- "**/*.play"
|
|
3
17
|
profile: application
|
|
4
18
|
---
|
|
5
19
|
<!-- cratis-ai: generated Copilot instructions. Do not edit; rules/ is the source. -->
|
|
@@ -77,7 +77,7 @@ When changing a description, run trigger evaluations before and after when autho
|
|
|
77
77
|
|
|
78
78
|
## 11. Always-on content
|
|
79
79
|
|
|
80
|
-
Keep `general.md` to facts needed in every session, at most 200 lines. Warn above 24,000 bytes and above
|
|
80
|
+
Keep `general.md` to facts needed in every session, at most 200 lines. Warn above 24,000 bytes and above 91,000 combined bytes for rules without `paths`; line length alone can hide context bloat. Review globally applied Copilot instructions above 4,000 characters. These budgets leave room for source and task context, rather than promising a token count.
|
|
81
81
|
|
|
82
82
|
Use path-scoped rules for file-specific invariants and skills for particular operations. Hooks and CI enforce mechanical constraints; natural-language rules do not replace permission controls.
|
|
83
83
|
|
package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
applyTo: "
|
|
2
|
+
applyTo: "**/*.sh,**/*.ps1,**/scripts/**,**/.github/workflows/**,**/.cratis/ai/hooks/**"
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.sh"
|
|
5
|
+
- "**/*.ps1"
|
|
6
|
+
- "**/scripts/**"
|
|
7
|
+
- "**/.github/workflows/**"
|
|
8
|
+
- "**/.cratis/ai/hooks/**"
|
|
3
9
|
---
|
|
4
10
|
<!-- cratis-ai: generated Copilot instructions. Do not edit; rules/ is the source. -->
|
|
5
11
|
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
applyTo: "
|
|
2
|
+
applyTo: "**/*.sh,**/*.ps1,**/scripts/**,**/.github/workflows/**,**/.cratis/ai/hooks/**"
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.sh"
|
|
5
|
+
- "**/*.ps1"
|
|
6
|
+
- "**/scripts/**"
|
|
7
|
+
- "**/.github/workflows/**"
|
|
8
|
+
- "**/.cratis/ai/hooks/**"
|
|
3
9
|
---
|
|
4
10
|
<!-- cratis-ai: generated Copilot instructions. Do not edit; rules/ is the source. -->
|
|
5
11
|
|
|
@@ -49,11 +49,19 @@ function matchesSelection(name: string, applyTo: string[], selected: AiConfigura
|
|
|
49
49
|
const needsCSharp = scope.includes('.cs');
|
|
50
50
|
const needsTypeScript = scope.includes('.ts') || name === 'rtk.md' || name.endsWith('/rtk.md');
|
|
51
51
|
const needsGo = scope.includes('.go') || scope.includes('go.mod') || scope.includes('go.sum');
|
|
52
|
+
const needsKotlin = scope.includes('.kt');
|
|
53
|
+
const needsJava = scope.includes('.java');
|
|
54
|
+
const needsElixir = scope.includes('.ex');
|
|
52
55
|
const needsDocumentation = scope.includes('md');
|
|
53
|
-
|
|
56
|
+
// A scope that also names model files (`.play`) is not tied to one language, so it is always kept.
|
|
57
|
+
if (scope.includes('.play')) return true;
|
|
58
|
+
if (!needsCSharp && !needsTypeScript && !needsGo && !needsKotlin && !needsJava && !needsElixir && !needsDocumentation) return true;
|
|
54
59
|
return (needsCSharp && languages.includes('csharp')) ||
|
|
55
60
|
(needsTypeScript && languages.includes('typescript')) ||
|
|
56
61
|
(needsGo && languages.includes('go')) ||
|
|
62
|
+
(needsKotlin && languages.includes('kotlin')) ||
|
|
63
|
+
(needsJava && languages.includes('java')) ||
|
|
64
|
+
(needsElixir && languages.includes('elixir')) ||
|
|
57
65
|
(needsDocumentation && (selected.profiles ?? []).includes('cratis/documentation'));
|
|
58
66
|
}
|
|
59
67
|
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
applyTo: "
|
|
2
|
+
applyTo: "**/*.cs,**/*.csproj,**/*.ts,**/*.tsx,**/*.go,**/go.mod,**/go.sum,**/*.kt,**/*.kts,**/*.java,**/*.ex,**/*.exs,**/*.play"
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.cs"
|
|
5
|
+
- "**/*.csproj"
|
|
6
|
+
- "**/*.ts"
|
|
7
|
+
- "**/*.tsx"
|
|
8
|
+
- "**/*.go"
|
|
9
|
+
- "**/go.mod"
|
|
10
|
+
- "**/go.sum"
|
|
11
|
+
- "**/*.kt"
|
|
12
|
+
- "**/*.kts"
|
|
13
|
+
- "**/*.java"
|
|
14
|
+
- "**/*.ex"
|
|
15
|
+
- "**/*.exs"
|
|
16
|
+
- "**/*.play"
|
|
3
17
|
profile: application
|
|
4
18
|
---
|
|
5
19
|
|
|
@@ -76,7 +76,7 @@ When changing a description, run trigger evaluations before and after when autho
|
|
|
76
76
|
|
|
77
77
|
## 11. Always-on content
|
|
78
78
|
|
|
79
|
-
Keep `general.md` to facts needed in every session, at most 200 lines. Warn above 24,000 bytes and above
|
|
79
|
+
Keep `general.md` to facts needed in every session, at most 200 lines. Warn above 24,000 bytes and above 91,000 combined bytes for rules without `paths`; line length alone can hide context bloat. Review globally applied Copilot instructions above 4,000 characters. These budgets leave room for source and task context, rather than promising a token count.
|
|
80
80
|
|
|
81
81
|
Use path-scoped rules for file-specific invariants and skills for particular operations. Hooks and CI enforce mechanical constraints; natural-language rules do not replace permission controls.
|
|
82
82
|
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
applyTo: "
|
|
2
|
+
applyTo: "**/*.sh,**/*.ps1,**/scripts/**,**/.github/workflows/**,**/.cratis/ai/hooks/**"
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.sh"
|
|
5
|
+
- "**/*.ps1"
|
|
6
|
+
- "**/scripts/**"
|
|
7
|
+
- "**/.github/workflows/**"
|
|
8
|
+
- "**/.cratis/ai/hooks/**"
|
|
3
9
|
---
|
|
4
10
|
|
|
5
11
|
# Exit codes and wrappers
|
|
@@ -102,7 +102,7 @@ A claim is only as good as the signal behind it — a build result, a test run,
|
|
|
102
102
|
|
|
103
103
|
# Application profile
|
|
104
104
|
|
|
105
|
-
> **Building an application on Cratis?** Project layout, slice types, slice naming, the seventeen slice rules, the implementation workflow and the application quality gates are in [application-profile.md](./application-profile.md), which
|
|
105
|
+
> **Building an application on Cratis?** Project layout, slice types, slice naming, the seventeen slice rules, the implementation workflow and the application quality gates are in [application-profile.md](./application-profile.md), which is scoped to source files in every supported language and to `.play` models and is installed only for repositories that select an application profile; read it before starting application work. If you are contributing to a Cratis framework repo, see **Framework profile** below.
|
|
106
106
|
|
|
107
107
|
**Model first.** When an accepted `.play` model covers the scope, or the repository has opted in, the `.play` model is the source of truth for behavior: change the model first, verify it, then render it or gap-fill from it, and never edit Stage-managed output, take code as a shortcut around the model, or weaken protection (authorization, `@pii`, rules) to make a model compile or render. Opted in means the model root (the folder holding the project's `.play` files) holds a committed `.play` file (`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured), or the project explicitly set `mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an installed profile or skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in, and a behavior is a contract only when an accepted model under the root covers it (accepted means committed: staged or untracked files under the root are drafts; a committed file with uncommitted working-tree edits is a model change in progress, and its HEAD version is the contract until the change is committed; committing a model under the root is the team's act of acceptance and opts the repository in; an explicitly configured but empty root also counts as opted in). Otherwise stay code-first; the entry-point session may propose a model at most once per session (never for trivial, bug-fix, infrastructure, client, framework or brownfield-maintenance work), and infrastructure, client and adapter work stays in code at any level. Trivial changes keep the proportional-delegation policy. The master decision rule is in **cratis-screenplay-modeling-lifecycle** (router: **cratis-screenplay-event-modeling**); if the Screenplay skills are not installed, say so and do not author `.play` from memory.
|
|
108
108
|
|
|
@@ -129,7 +129,9 @@ A claim is only as good as the signal behind it — a build result, a test run,
|
|
|
129
129
|
| **AI Corpus Profiles** — what profiles exist and how to configure them | `profiles.md` |
|
|
130
130
|
| **Contributing to a Cratis framework repo** (framework profile) | `framework.md`; creating a repository in the Cratis organization: `new-repository-intake.md` |
|
|
131
131
|
| Slice anatomy (commands, `Provide()`, validators, events, projections, read models, reactors, constraints, compliance, cross-slice) | `vertical-slices.md` |
|
|
132
|
-
| C# / TypeScript style | `csharp.md`, `typescript.md` |
|
|
132
|
+
| C# / TypeScript style and code-quality principles | `csharp.md`, `typescript.md`, `code-quality.md`, `code-quality.csharp.md`, `code-quality.typescript.md` |
|
|
133
|
+
| Kotlin / Java / Elixir style; Orleans grains; reactors; GitHub Actions workflows | `kotlin.md`, `java.md`, `elixir.md`, `orleans.md`, `reactors.md`, `github-actions.md` |
|
|
134
|
+
| Documentation pages (`Documentation/`): structure, voice, examples, editing | `documentation.md`, `documentation-structure-and-formatting.md`, `writing-cratis-docs.md`, `editing-cratis-docs.md`, `writing-correct-examples.md` |
|
|
133
135
|
| Go style, source and module files | `go.md`; framework contributors also read `go-engineering.md`; product APIs use `cratis-chronicle-client-go`, `cratis-arc-go` and `cratis-fundamentals-concept-go` |
|
|
134
136
|
| Service lifetimes — why anything taking a scoped dependency is scoped or transient, never a singleton | `csharp.md` |
|
|
135
137
|
| React + Arc + Cratis Components + MVVM + dialogs | `react.md`, `components.md`, `dialogs.md` |
|
|
@@ -141,15 +143,15 @@ A claim is only as good as the signal behind it — a build result, a test run,
|
|
|
141
143
|
| Diagnosing a misbehaving slice | read model stale or startup crash: **cratis-chronicle-projection** (*Startup-crash traps*); reactor paused or quarantined: **cratis-chronicle-reactor** (*Failure behavior*); proxy missing: **cratis-arc-command** (*Generate the TypeScript proxy*) |
|
|
142
144
|
| Inspecting or operating a **running** Chronicle store (failed partitions, replays, browsing events) with the `cratis` CLI | the **cratis-chronicle-cli-operations** and **cratis-cli-terminal-workbench** skills |
|
|
143
145
|
| EF Core read models / migrations | `efcore.md`, `efcore.specs.md` |
|
|
144
|
-
|
|
|
146
|
+
| Before writing a commit message, committing, pushing or opening/editing a PR: read both | `git-commits.md`, `pull-requests.md` |
|
|
145
147
|
| Reading, citing and superseding a decision record | the **cratis-engineering-decision-record** skill |
|
|
146
148
|
| Whether you are allowed to do the thing you are able to do | `capability-is-not-authority.md` |
|
|
147
149
|
| What must stop and ask a human | `capability-is-not-authority.md` (absent authority for a consequential effect: stop and ask) |
|
|
148
150
|
| What counts as evidence that something works | `verification-discipline.md` |
|
|
149
|
-
|
|
|
151
|
+
| Before writing a session note, plan or handover: where they may live (`.ai-work/` only) | `local-work-artifacts.md` |
|
|
150
152
|
| What may be written into the `.cratis/` folder (configuration and the corpus only, never deliverables) | `cratis-folder-is-configuration.md` |
|
|
151
|
-
| Exit-code meaning and wrappers that lose a verdict | `exit-codes-and-wrappers.md` |
|
|
152
|
-
| Writing a scan, allowlist or destructive pass that cannot pass vacuously | `guards-and-fuses.md` |
|
|
153
|
+
| Exit-code meaning, scripts and wrappers that lose a verdict | `exit-codes-and-wrappers.md` |
|
|
154
|
+
| Writing a scan, allowlist, script or CI check, or a destructive pass, that cannot pass vacuously | `guards-and-fuses.md` |
|
|
153
155
|
| How the shared corpus is installed, updated and rolled back | `ai-distribution.md` |
|
|
154
156
|
| Code-level event modeling / schema migration / calling commands from code / paging / cross-cutting metadata / multi-tenancy | the matching skills |
|
|
155
157
|
| Building or changing behavior in an opted-in repository (see Model first above), or designing an information system, business process or information flow: **model first** | the **cratis-screenplay-event-modeling** skill (decision rule), then **cratis-screenplay-modeling-lifecycle** and one phase skill; per-surface `cratis-screenplay-*` skills for syntax |
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
applyTo: "
|
|
2
|
+
applyTo: "**/*.sh,**/*.ps1,**/scripts/**,**/.github/workflows/**,**/.cratis/ai/hooks/**"
|
|
3
|
+
paths:
|
|
4
|
+
- "**/*.sh"
|
|
5
|
+
- "**/*.ps1"
|
|
6
|
+
- "**/scripts/**"
|
|
7
|
+
- "**/.github/workflows/**"
|
|
8
|
+
- "**/.cratis/ai/hooks/**"
|
|
3
9
|
---
|
|
4
10
|
|
|
5
11
|
# Guards, scans and fuses
|
|
@@ -35,17 +35,16 @@ other infrastructure. Change behaviour in the model first, never in managed outp
|
|
|
35
35
|
the intended event store and event sequence, and that a trigger event delivered there reaches
|
|
36
36
|
it. Report this apart from the in-process specifications.
|
|
37
37
|
|
|
38
|
-
##
|
|
38
|
+
## Product facts
|
|
39
39
|
|
|
40
|
-
This skill is a method: it names no API of its own.
|
|
41
|
-
to these tags; when the Screenplay skills are installed their `SKILL.md`
|
|
40
|
+
This skill is a method: it names no API of its own. When the Screenplay skills are installed their `SKILL.md`
|
|
42
41
|
(in `cratis-screenplay-toolchain`) explains how to read the installed tool versions.
|
|
43
42
|
|
|
44
43
|
| Fact used here | Source |
|
|
45
44
|
| --- | --- |
|
|
46
|
-
| Where each rule lives (validator, `Provide()`, handler result, constraint, exception) | `rules/vertical-slices.md` "The decision matrix"
|
|
47
|
-
| A customization never makes a rejected model renderable; managed output is never hand-edited | Stage
|
|
48
|
-
| A command `handler` never binds (PLAY0268), so that slice is gap-fill with the model as contract | Screenplay
|
|
45
|
+
| Where each rule lives (validator, `Provide()`, handler result, constraint, exception) | `rules/vertical-slices.md` "The decision matrix" |
|
|
46
|
+
| A customization never makes a rejected model renderable; managed output is never hand-edited | Stage (`Customizations/` is the unmanaged seam; managed output is regenerated) |
|
|
47
|
+
| A command `handler` never binds (PLAY0268), so that slice is gap-fill with the model as contract | Screenplay (diagnostic PLAY0268) |
|
|
49
48
|
|
|
50
49
|
## Procedure
|
|
51
50
|
|
|
@@ -116,10 +115,12 @@ Change the code, or return an edit request. Do not touch test files outside the
|
|
|
116
115
|
told to.
|
|
117
116
|
|
|
118
117
|
Where the model is a `.play` and the code is Arc, Marten or Critter Stack, `cratis screenplay
|
|
119
|
-
conform <model-root> --project <path>` (
|
|
118
|
+
conform <model-root> --project <path>` (exit 0/1/2) adds structural drift
|
|
120
119
|
evidence: exact-address comparison of recovered declarations, never behavior or equivalence. It
|
|
121
120
|
runs MSBuild on the project (trusted clone only). It supplements, and never replaces, steps 2 to 4.
|
|
122
121
|
|
|
122
|
+
Requires cratis CLI 3.42.0 or later (`cratis --version`) for `cratis screenplay conform`.
|
|
123
|
+
|
|
123
124
|
### 5. Delta delivery
|
|
124
125
|
After a model or outline change, the work list is every element and specification that
|
|
125
126
|
changed since the last delivery, including a delivery of only added specifications. Then run
|
|
@@ -123,4 +123,4 @@ the form a closing review uses; every item must hold, and the one that does not
|
|
|
123
123
|
- [ ] Every contracted specification maps to an executed specification or specification family
|
|
124
124
|
- [ ] No business rule, default, filter or constraint exists in code that the contract (its documentation or specifications) does not state
|
|
125
125
|
- [ ] No field name was assumed or guessed: a name that is not in the contract is not in the code
|
|
126
|
-
- [ ] Where the contract has a specification family for the lifecycle of one view or one command, each step maps to a specification (no storyline syntax
|
|
126
|
+
- [ ] Where the contract has a specification family for the lifecycle of one view or one command, each step maps to a specification (no storyline syntax)
|
|
@@ -15,9 +15,9 @@ by Martin Dilger and Nebulit GmbH (https://nebulit.de), used with the explicit c
|
|
|
15
15
|
| `.claude/skills/build-state-change/SKILL.md`: final verification checklist (commands, events, specifications, nothing invented) | `references/checklists.md` "State Change"; `SKILL.md` steps 2-3 and "Gate" | Adapted closely; slice.json becomes the `.play` slice or agreed outline, emmett types become Arc commands and Chronicle events; the six checks are kept as the closing "Final verification" tick-list in `references/checklists.md`. Not adopted: the Emmett decide/evolve structure, `routes.ts` and the state complexity guide |
|
|
16
16
|
| `.claude/skills/build-state-view/SKILL.md`: final checklist (every field has a source, subscribed events equal modeled events, no extra columns, one test per specification) | `references/checklists.md` "State View" | Adapted closely; migration, `canHandle` and Knex items translated to read-model properties, projection sources and storage mapping; Knex connection items not adopted (Emmett specific) |
|
|
17
17
|
| `.claude/skills/build-automation/SKILL.md`: checklist (every processor implemented, command fields map only from the trigger, no invented conditions, idempotency specified, no routes, processor registered in startup and event store bootstrap verified) | `references/checklists.md` "Automation and Translation" including "Real startup participation" | Adapted closely; processor/DLQ items translated to the Chronicle reactor and its failure behavior; startup registration translated to discovery, event store and event sequence checks; `start()`/`stop()`, processor-id and `schema.migrate()` not adopted (Emmett specific) |
|
|
18
|
-
| `.build-kit/lib/backend-prompt.md`: one slice per iteration, planned can be only added specifications, the slice is always true, done criteria, escalating ambiguity, progress report, consolidated patterns, learnings filter | `references/build-prompts.md` sections 3-5; `SKILL.md` steps 4-6 and "Gate" |
|
|
18
|
+
| `.build-kit/lib/backend-prompt.md`: one slice per iteration, planned can be only added specifications, the slice is always true, done criteria, escalating ambiguity, progress report, consolidated patterns, learnings filter | `references/build-prompts.md` sections 3-5; `SKILL.md` steps 4-6 and "Gate" | Adapted closely; `index.json`, `progress.txt`, board status, `<promise>` sentinels, per-step progress appends, commit and merge steps, and the slice-only done gate not adopted (replaced by the result packet, the completion gate and separate git authorization) |
|
|
19
19
|
| `.build-kit/lib/prompt.md` and `.build-kit/lib/AGENT.md`: task loop, claim conflict as a concurrency guard, progress format, learnings file | `references/build-prompts.md` sections 3-5 | Adapted closely; the claim becomes coordinator-assigned ownership (a record is not a lock), task queue and board events not adopted |
|
|
20
|
-
| `.build-kit/CLAUDE.md`: strict path limitation, slice type determination, mandatory build flow, verify against the slice, no edits to test files, ignore case in names, session-start learnings | `references/build-prompts.md` sections 1-2; `SKILL.md` step 4 |
|
|
20
|
+
| `.build-kit/CLAUDE.md`: strict path limitation, slice type determination, mandatory build flow, verify against the slice, no edits to test files, ignore case in names, session-start learnings | `references/build-prompts.md` sections 1-2; `SKILL.md` step 4 | Adapted closely; the path limitation became owned paths with bounded reads of referenced contracts; TypeScript and `npm` specifics replaced by the repository's runner |
|
|
21
21
|
| `.build-kit/AGENTS.md`: learnings that the repository pattern beats the template; a mapping-versus-notes conflict resolved in favor of notes | `references/contract-and-precedence.md`; `references/build-prompts.md` section 5 | Repository-pattern idea adapted; the notes-over-mapping rule is not adopted because executable parts beat prose here |
|
|
22
22
|
|
|
23
23
|
No TrogonStack/agentskills text is used in this skill.
|
|
@@ -19,22 +19,19 @@ This skill decides **when to add a scenario** and **what to cover**. The C# mech
|
|
|
19
19
|
(`Establish`/`Because`, substitutes, contexts) live in
|
|
20
20
|
`cratis-specifications-csharp`.
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## Product packages
|
|
23
23
|
|
|
24
|
-
| Package |
|
|
25
|
-
| --- | --- |
|
|
26
|
-
| `Cratis.Arc.Testing` | `
|
|
27
|
-
| `Cratis.Arc.Chronicle.Testing` | `
|
|
28
|
-
| `Cratis.Chronicle.Testing` | `
|
|
29
|
-
| `Cratis.Specifications.XUnit` |
|
|
24
|
+
| Package | Purpose |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `Cratis.Arc.Testing` | `CommandScenario<TCommand>` and the `CommandResult` assertions |
|
|
27
|
+
| `Cratis.Arc.Chronicle.Testing` | `Given`, `EventLog`, `AppendedEvents` and the appended-event assertions on a command scenario |
|
|
28
|
+
| `Cratis.Chronicle.Testing` | `EventScenario`, `ReadModelScenario<T>`, `ReactorScenario<T>` |
|
|
29
|
+
| `Cratis.Specifications.XUnit` | The `Specification` base and the `ShouldXxx` assertions |
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
> version and is not downgraded by this Arc verification.
|
|
31
|
+
Reactor read-model setup and the `EventContext.From` UTC default below need a newer Chronicle than
|
|
32
|
+
the Arc scenario surface itself; see `cratis-chronicle-reactor/references/specifications.md` for sources.
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
verified separately at **Chronicle 19.46.0**, the minimum version for that
|
|
37
|
-
guidance; see `cratis-chronicle-reactor/references/specifications.md` for sources.
|
|
34
|
+
Requires Chronicle 19.46.0 or later for class-based reactor read-model seeding and the `EventContext.From` UTC default.
|
|
38
35
|
|
|
39
36
|
`Cratis.Testing` is the meta-package that brings `Cratis.Arc.Testing` and
|
|
40
37
|
`Cratis.Arc.Chronicle.Testing` together. Reverify against the owning product
|
|
@@ -146,7 +143,7 @@ keep a scenario for that wiring and for appended-event behavior.
|
|
|
146
143
|
| Automation or Translation — a reactor | `ReactorScenario<TReactor>` | `cratis-specifications-csharp` |
|
|
147
144
|
| A host, transport, or real-infrastructure boundary | Out-of-process integration | `cratis-specifications-csharp` |
|
|
148
145
|
|
|
149
|
-
For a class-based reactor scenario
|
|
146
|
+
For a class-based reactor scenario, explicitly seed
|
|
150
147
|
handler read-model parameters with `Given.ForEventSourceId(id).ReadModel(instance)`
|
|
151
148
|
or declare intentional absence with `.NoReadModel<T>()`. An unseeded model throws
|
|
152
149
|
`ReadModelNotSeededForReactorScenario` even if nullable; `Given` events do not
|
|
@@ -333,11 +330,10 @@ ideas recorded in `references/provenance.md`. Read `references/provenance.md` wh
|
|
|
333
330
|
- **The command scenario reports success but nothing was appended.** The
|
|
334
331
|
assertion is on `CommandResult` only; add a
|
|
335
332
|
`ShouldHaveAppendedEvent<TCommand, TEvent>` fact.
|
|
336
|
-
- **Injected-validator branches flip with test ordering.**
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
workaround; no current reproduction was verified here.
|
|
333
|
+
- **Injected-validator branches flip with test ordering.** An older harness replaced the process-wide provider; current
|
|
334
|
+
releases isolate stores and event-source services per scenario. Reproduce
|
|
335
|
+
before applying the old direct-validator/small `[Collection]`
|
|
336
|
+
workaround.
|
|
341
337
|
|
|
342
338
|
## How it is proven
|
|
343
339
|
|
package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Provenance
|
|
2
2
|
|
|
3
|
-
Lineage of the
|
|
3
|
+
Lineage of the additions to `cratis-application-slice-specifications`. No TrogonStack material was adapted. Nebulit material is credited below.
|
|
4
4
|
|
|
5
5
|
## Adapted closely (Martin Dilger and Nebulit GmbH)
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
4
4
|
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Use the plain `Specification` base for pure decisions;
|
|
7
7
|
these helpers add proof of framework composition, not HTTP transport.
|
|
8
8
|
|
|
9
9
|
## Query pipeline
|
|
@@ -16,10 +16,12 @@ conversion, validation, authorization and rendering. Use `QueryArguments` from
|
|
|
16
16
|
under test with `ICurrentPrincipalAccessor` in `Services`. Scheme-selected queries
|
|
17
17
|
fail closed in-process: HTTP authentication needs a hosted integration spec.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Both query and command scenarios preserve
|
|
20
20
|
explicit `ICurrentPrincipalAccessor`, `ICurrentPrincipalOverride` and
|
|
21
21
|
`IAuthorizationPolicyRuntime` registrations rather than replacing them with defaults.
|
|
22
22
|
Configure them before first execution and specify both authorized and denied callers.
|
|
23
|
+
|
|
24
|
+
Requires Arc 22.75.1 or later for query and command scenarios to preserve explicit principal and authorization services.
|
|
23
25
|
Source: `Source/DotNET/Testing/ScenarioServices.cs`, `Queries/QueryScenario.cs`,
|
|
24
26
|
`Commands/CommandScenario.cs`.
|
|
25
27
|
|
|
@@ -67,7 +69,7 @@ boundaries explicit in either mode; decision mode is not a MongoDB substitute.
|
|
|
67
69
|
|
|
68
70
|
## Sources
|
|
69
71
|
|
|
70
|
-
- [Query scenarios](https://github.com/Cratis/Arc/blob/
|
|
71
|
-
- [Stream decisions and routed specs](https://github.com/Cratis/Arc/blob/
|
|
72
|
-
- [Decision-mode extension](https://github.com/Cratis/Arc/blob/
|
|
73
|
-
- [Admission assertion](https://github.com/Cratis/Arc/blob/
|
|
72
|
+
- [Query scenarios](https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/testing/query-scenario.md)
|
|
73
|
+
- [Stream decisions and routed specs](https://github.com/Cratis/Arc/blob/main/Documentation/backend/csharp/chronicle/commands/stream-decisions.md)
|
|
74
|
+
- [Decision-mode extension](https://github.com/Cratis/Arc/blob/main/Source/DotNET/Chronicle.Testing/Commands/CommandScenarioChronicleExtensions.cs)
|
|
75
|
+
- [Admission assertion](https://github.com/Cratis/Arc/blob/main/Source/DotNET/Chronicle.Testing/Commands/DecisionReadAdmissions.cs)
|
|
@@ -22,19 +22,16 @@ wrappers. Do not hand-roll a table, a dialog, or a fetch.
|
|
|
22
22
|
scope (`cratis-screenplay-render-and-gap-fill`); never edit Stage-managed
|
|
23
23
|
output.
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Product sources
|
|
26
26
|
|
|
27
|
-
This skill
|
|
27
|
+
This skill follows the `@cratis/components` package manifest (`exports`, peers), `Source/DataPage/*`,
|
|
28
|
+
`Source/DataTables/*`, `Source/Dialogs/*`, `Source/CommandDialog/*` and `Source/MIGRATION.md`.
|
|
29
|
+
Peers declared by `@cratis/components`: `@cratis/arc` and `@cratis/arc.react` and `react`.
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
| --- | --- | --- |
|
|
31
|
-
| `@cratis/components` | `4.26.4` | its package manifest (`exports`, peers), `Source/DataPage/*`, `Source/DataTables/*`, `Source/Dialogs/*`, `Source/CommandDialog/*`, `Source/MIGRATION.md` |
|
|
32
|
-
| `@cratis/arc` | `>=20.3.1 <23` | peer range declared by `@cratis/components@4.26.4` |
|
|
33
|
-
| `@cratis/arc.react` | `>=20.3.1 <23` | peer range declared by `@cratis/components@4.26.4` |
|
|
34
|
-
| `react` | `^19.0.0` | peer of `@cratis/components@4.26.4` |
|
|
31
|
+
Requires `@cratis/arc` and `@cratis/arc.react` 20.3.1 or later (below 23) and `react` 19 or later, as `@cratis/components` declares them peers.
|
|
35
32
|
|
|
36
33
|
`@cratis/arc.react.mvvm` ships with `@cratis/arc.react` and is an explicit
|
|
37
|
-
application dependency.
|
|
34
|
+
application dependency.
|
|
38
35
|
|
|
39
36
|
## Import from subpaths, never the root barrel
|
|
40
37
|
|
|
@@ -71,11 +68,10 @@ must move focus into itself.
|
|
|
71
68
|
`@cratis/components`) above every Cratis component — it carries the locale,
|
|
72
69
|
the Components-owned labels. Enable `toaster` (or mount one `<Toaster />`)
|
|
73
70
|
for notifications; without it even `toastCommandResult` displays nothing.
|
|
74
|
-
Mount exactly one toaster, not both. The `cratis` template
|
|
75
|
-
`<CratisComponentsProvider toaster>` **inside** `<Arc>`
|
|
76
|
-
(`Templates/Cratis/.frontend/main.tsx
|
|
77
|
-
|
|
78
|
-
older application's entry point rather than adding a second toaster.
|
|
71
|
+
Mount exactly one toaster, not both. The `cratis` template mounts
|
|
72
|
+
`<CratisComponentsProvider toaster>` **inside** `<Arc>`
|
|
73
|
+
(`Templates/Cratis/.frontend/main.tsx`; Requires Templates 1.7.3 or later, earlier ones mount it outside `<Arc>` without a toaster),
|
|
74
|
+
so check its entry point rather than adding a second toaster.
|
|
79
75
|
- The app must import the stylesheets explicitly; components do not import
|
|
80
76
|
their own CSS:
|
|
81
77
|
|
|
@@ -103,8 +103,10 @@ The most-used props:
|
|
|
103
103
|
| `pt` | `DialogParts` — per-part attributes (`backdrop`, `positioner`, `root`, `header`, `title`, `close`, `content`, `footer`, `confirm`, `cancel`); `ptOptions`/`unstyled` are accepted no-ops |
|
|
104
104
|
|
|
105
105
|
Dialog presentation props, including `subtitle`, `placement` and `closeIcon`,
|
|
106
|
-
are forwarded to the dialog
|
|
107
|
-
render function receiving the command form context
|
|
106
|
+
are forwarded to the dialog, not the form. `children` may also be a
|
|
107
|
+
render function receiving the command form context.
|
|
108
|
+
|
|
109
|
+
Requires Cratis Components 4.14.1 or later for dialog presentation props forwarded to the dialog, and 4.25.1 or later for a `children` render function.
|
|
108
110
|
|
|
109
111
|
`CommandDialog.Column` exists for multi-column layouts:
|
|
110
112
|
|
|
@@ -23,9 +23,9 @@ Three different claims are mixed in any "screen to page" mapping. Keep them apar
|
|
|
23
23
|
|
|
24
24
|
| Claim | Status | Evidence |
|
|
25
25
|
| --- | --- | --- |
|
|
26
|
-
| What each `screen`, `form` and interaction construct means | Verified | Screenplay `
|
|
27
|
-
| What Stage does with a screen | Verified: it draws it through Scene, it does not write a React page | Stage `
|
|
28
|
-
| Which Components and Arc API gives a page the same behavior | Verified API; the pairing is this skill's convention | `@cratis/components`
|
|
26
|
+
| What each `screen`, `form` and interaction construct means | Verified | Screenplay `Documentation/screenplay/{screens,forms,interactions}.md` |
|
|
27
|
+
| What Stage does with a screen | Verified: it draws it through Scene, it does not write a React page | Stage `Documentation/reference/stage-rendering.md` ("It does not generate screens for it"), `Documentation/reference/default-scene-composition.md` ("does not ... generate per-screen TypeScript components"), `Source/Contracts/Scene/ScreenDirectiveConverter.cs` (`data`, `action`, `section`, `title`, `table`, `summary` become Scene elements) |
|
|
28
|
+
| Which Components and Arc API gives a page the same behavior | Verified API; the pairing is this skill's convention | `@cratis/components` (`DataPage`, `DataTables`, `CommandDialog`, `CommandForm`) and the sibling references |
|
|
29
29
|
|
|
30
30
|
A hand-written Arc React page and a Scene-rendered screen are different surfaces;
|
|
31
31
|
they share Components, not ownership or runtime APIs. Scene is the experimental
|
|
@@ -123,9 +123,9 @@ field because `berthId` is the identifier, not something the user types.
|
|
|
123
123
|
| `action CancelBerth` on a list with a table | `MenuItem` with `disableOnUnselected`; the selected row supplies the identifier | Verified prop |
|
|
124
124
|
| `action` with no `label` | The model gives no text. Use the command name, spaced, and report it | Gap |
|
|
125
125
|
| `action X` with `navigate to S [by p]` | Navigate to the page for `S` after the command succeeds, in `onSuccess`; pass `p` from the response or the row | Assumption: `screens.md` does not say when it navigates. The form's `on submit` is defined as "after a successful submit"; confirm with the model owner |
|
|
126
|
-
| `on row-click navigate to S by p` | `DataPage` and `DataTableForQuery` forward no row-click prop
|
|
126
|
+
| `on row-click navigate to S by p` | `DataPage` and `DataTableForQuery` forward no row-click prop (only `DataTableCore` has `onRowClick`, and it takes rows, not a query). Use controlled `selection` and `onSelectionChange` to navigate, or a link in a `Column` `body` | Gap: selection is not a click; report which you chose |
|
|
127
127
|
| `section`, `sidebar`, `main`, `template MasterDetail` | Page layout. Keep the section names as component names so the page can be compared to the model. `MasterDetail` over a list is `detailsComponent` | Convention: Components has no screen-template concept |
|
|
128
|
-
| `title`, `label`, `message` written as `$strings.key` | The text of that key in the `.strings` file for the locale, never retyped from memory | Verified token ([internationalization.md](https://github.com/Cratis/Screenplay/blob/
|
|
128
|
+
| `title`, `label`, `message` written as `$strings.key` | The text of that key in the `.strings` file for the locale, never retyped from memory | Verified token ([internationalization.md](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/internationalization.md)); the runtime mechanism is application-owned |
|
|
129
129
|
| `ui profile`, `theme`, `layout`, `arrangement` | Not page code. Theming is `cratis-components-styling`; the shell is the application's | Design-only |
|
|
130
130
|
| A Level 3 `react` block | The block is already the implementation, with typed `Props`. Port it into a component that honors those `Props` | Convention |
|
|
131
131
|
| `file Screens/X.tsx` | That file is the page. The model keeps the contract; the file must still show the declared data and actions | Stage's handling of the file reference is not verified |
|
|
@@ -159,14 +159,14 @@ restate a rule ([queries-and-commands.md](queries-and-commands.md)).
|
|
|
159
159
|
|
|
160
160
|
## Interactions: `on`, `uses`, `behavior`
|
|
161
161
|
|
|
162
|
-
The action set is closed ([interactions.md](https://github.com/Cratis/Screenplay/blob/
|
|
162
|
+
The action set is closed ([interactions.md](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/interactions.md)).
|
|
163
163
|
|
|
164
164
|
| Model action | Page |
|
|
165
165
|
| --- | --- |
|
|
166
166
|
| `execute <Command>` | `CommandDialog`, or `Command.use()` then `execute()` for a command with no user input ([queries-and-commands.md](queries-and-commands.md)) |
|
|
167
167
|
| `confirm "text"` | `useConfirmationDialog`; declining stops what follows |
|
|
168
168
|
| `notify info\|warning\|error "text"` | `toast.info/warn/error({ title, description })`, or `toastCommandResult` for a command result |
|
|
169
|
-
| `refresh <Query>` | For a query you read with the hook, call the `perform` function from `[result, perform, setSorting]` ([queries-and-commands.md](queries-and-commands.md)). An observable query updates by itself and has no `perform`. Gap: `DataPage` only forwards `onRefresh` to your own callback
|
|
169
|
+
| `refresh <Query>` | For a query you read with the hook, call the `perform` function from `[result, perform, setSorting]` ([queries-and-commands.md](queries-and-commands.md)). An observable query updates by itself and has no `perform`. Gap: `DataPage` only forwards `onRefresh` to your own callback; it does not re-run its internal snapshot query, so an explicit refresh of a `DataPage` list has no verified mechanism. Use an observable query, or read the query yourself and render with `DataTableCore`-level components, and report the choice |
|
|
170
170
|
| `open dialog <Template>` / `close dialog` | `useDialog` / `closeDialog(DialogResult.Ok)` |
|
|
171
171
|
| `navigate to <Screen>` / `navigate back` | The application's router |
|
|
172
172
|
| `set <target> to <value>` | View-model state |
|
|
@@ -4,8 +4,8 @@ No TrogonStack text is adapted in this skill. Nebulit material is credited in th
|
|
|
4
4
|
|
|
5
5
|
| Item | Source | Licence | Treatment | Where in this skill |
|
|
6
6
|
|---|---|---|---|---|
|
|
7
|
-
| Component APIs, props and hooks | Cratis Components
|
|
8
|
-
| Screenplay and Stage facts in the screen mapping | Cratis/Screenplay
|
|
7
|
+
| Component APIs, props and hooks | Cratis Components and Arc, see *Product sources* | MIT | original | SKILL.md, references/ |
|
|
8
|
+
| Screenplay and Stage facts in the screen mapping | Cratis/Screenplay and Cratis/Stage documentation and source | MIT | original | references/from-screenplay.md |
|
|
9
9
|
|
|
10
10
|
## Eventmodelers Build-Kits
|
|
11
11
|
|
|
@@ -226,7 +226,7 @@ or `exceptionDisplayComponent` (`ExceptionDisplayProps`); `showErrors={false}`
|
|
|
226
226
|
hides built-in display. Dynamic accessors need `fieldName`; custom field validation
|
|
227
227
|
failures block submit. `useIdentity(type)` deserializes typed details.
|
|
228
228
|
Sources: `Source/JavaScript/Arc.React/Arc.tsx` and
|
|
229
|
-
`commands/CommandForm/CommandForm.tsx
|
|
229
|
+
`commands/CommandForm/CommandForm.tsx`.
|
|
230
230
|
|
|
231
231
|
## `<Arc>` configuration
|
|
232
232
|
|
|
@@ -13,9 +13,7 @@
|
|
|
13
13
|
{ "kind": "skill-contains", "value": "DataPage has no snapshot refresh handle" },
|
|
14
14
|
{ "kind": "skill-contains", "value": "Mount exactly one toaster" },
|
|
15
15
|
{ "kind": "skill-contains", "value": "<CratisComponentsProvider toaster>" },
|
|
16
|
-
{ "kind": "skill-contains", "value": "Templates `v1.7.4`" },
|
|
17
16
|
{ "kind": "skill-contains", "value": "rather than adding a second toaster" },
|
|
18
|
-
{ "kind": "skill-contains", "value": "4.26.4" },
|
|
19
17
|
{ "kind": "skill-contains", "value": "checkbox multi-selection", "file": "references/data-tables.md" },
|
|
20
18
|
{ "kind": "skill-contains", "value": "DataPage never invokes it or refetches", "file": "references/data-page.md" }
|
|
21
19
|
]
|
|
@@ -25,26 +25,21 @@ effects. If the answer is "populate a queryable model", it is not a reactor.
|
|
|
25
25
|
> `.cratis/ai.json`; master definition in `cratis-screenplay-modeling-lifecycle`), the automation is
|
|
26
26
|
> a modeled slice: find it (`Automation` or `Translate`), treat its `produces` /
|
|
27
27
|
> `invokes`, conditions and fields as the contract, and write the reactor only as
|
|
28
|
-
> gap-fill for what the model leaves to code (Stage
|
|
28
|
+
> gap-fill for what the model leaves to code (Stage renders supported event-triggered Automation;
|
|
29
29
|
> Translate/captures and refused reactions remain gap-fill; Stage skill `references/admission.md`). Use `cratis-screenplay-automations-and-translations` to
|
|
30
30
|
> change the model; never change the model to fit the reactor, and never leave a
|
|
31
31
|
> modeled rule living only in the reactor. If the repository is not opted in
|
|
32
32
|
> (an empty directory, install output, a `.play` file outside the root or an untracked or uncommitted draft is not consent), stay code-first here
|
|
33
33
|
> (`cratis-chronicle-event-modeling` for a new, unsettled flow); if the Screenplay skills are not installed, say so and do not author `.play` from memory.
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## Product sources
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
| `Cratis.Chronicle` | `19.50.1` | `Cratis.Chronicle.Reactors`, `Cratis.Chronicle.Reactors.SideEffects`, `Cratis.Chronicle.EventSequences`, `Cratis.Chronicle.Events` |
|
|
42
|
-
| `Cratis.Chronicle.CodeAnalysis` | `19.50.1` | handler, side-effect and filter diagnostics, including CHR0054–CHR0056 |
|
|
43
|
-
|
|
44
|
-
Scenario guards began in **19.46.0**, reverified at **19.50.0**;
|
|
45
|
-
see [specifications](references/specifications.md).
|
|
37
|
+
| Package | Purpose |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `Cratis.Chronicle` | `Cratis.Chronicle.Reactors`, `Cratis.Chronicle.Reactors.SideEffects`, `Cratis.Chronicle.EventSequences`, `Cratis.Chronicle.Events` |
|
|
40
|
+
| `Cratis.Chronicle.CodeAnalysis` | handler, side-effect and filter diagnostics, including CHR0054–CHR0056 |
|
|
46
41
|
|
|
47
|
-
|
|
42
|
+
Scenario guards: see [specifications](references/specifications.md).
|
|
48
43
|
|
|
49
44
|
> **There is no `ReactorSideEffect` type.** Use the supported return types below;
|
|
50
45
|
> `EventForEventSourceId` supplies per-event metadata.
|
|
@@ -136,7 +131,7 @@ synchronous returns. Custom `IReactorSideEffectHandler` implementations can
|
|
|
136
131
|
claim synchronous types through `CanHandleReturnType(Type)`; they are not
|
|
137
132
|
restricted to `Task<T>`. An unclaimed return value **fails the partition** with
|
|
138
133
|
`UnhandledReactorReturnValue`, naming its type. CHR0054 flags an unsupported
|
|
139
|
-
return type at build time. Source
|
|
134
|
+
return type at build time. Source: `Reactors/EventHandlerMethods.cs`,
|
|
140
135
|
`Reactors/SideEffects/IReactorSideEffectHandler.cs`, `Reactors/UnhandledReactorReturnValue.cs`.
|
|
141
136
|
|
|
142
137
|
### Returning events instead of injecting `IEventLog`
|
|
@@ -160,8 +155,7 @@ public Task<IEnumerable<object>> <MethodName>(<EventName> @event, EventContext c
|
|
|
160
155
|
causation)` is the cross-stream wrapper. Its init members include `Subject`,
|
|
161
156
|
`Occurred`, `Tags`, `EventSource` (`Type?`) and `EventStream` (`string?`). Routing
|
|
162
157
|
defaults are `EventStreamType.All`, `EventStreamId.Default` and
|
|
163
|
-
`EventSourceType.Default`. Source: `EventSequences/EventForEventSourceId.cs
|
|
164
|
-
at v19.50.0.
|
|
158
|
+
`EventSourceType.Default`. Source: `EventSequences/EventForEventSourceId.cs`.
|
|
165
159
|
|
|
166
160
|
```csharp
|
|
167
161
|
public Task<IEnumerable<EventForEventSourceId>> <MethodName>(<EventName> @event, EventContext context) =>
|
|
@@ -200,7 +194,7 @@ a method** and means **replay exclusion**:
|
|
|
200
194
|
starts;
|
|
201
195
|
- on a method, that handler is skipped while the delivery is a replay.
|
|
202
196
|
|
|
203
|
-
**`[OnceOnly]` is not per-event-source deduplication.** There is no
|
|
197
|
+
**`[OnceOnly]` is not per-event-source deduplication.** There is no record of
|
|
204
198
|
which events a handler has already seen. Recovering a failed partition
|
|
205
199
|
re-delivers the event as an ordinary observation, and a `[OnceOnly]` handler runs
|
|
206
200
|
again. Catch-up and crash redelivery are not replay either; every ordinary
|
|
@@ -235,12 +229,14 @@ public sealed class ReactorAttribute(string id = "", string? eventSequence = def
|
|
|
235
229
|
**There is no `isActive` argument** — that belongs to `[Reducer]`. Without an
|
|
236
230
|
explicit `id`, the reactor's identity is its full type name.
|
|
237
231
|
|
|
238
|
-
Give side-effecting reactors a **stable explicit id**.
|
|
232
|
+
Give side-effecting reactors a **stable explicit id**. Discovery
|
|
239
233
|
warns on likely renames/moves: a new id catches up from the start and repeats
|
|
240
234
|
side effects; `[OnceOnly]` does not prevent that. `ArtifactIdentityDrift = Fail`
|
|
241
235
|
rejects Warning-level reactor/event-type findings with
|
|
242
236
|
`ArtifactIdentityDriftDetected`; projection/reducer drift is Information.
|
|
243
|
-
Inspect `RegistrationOutcome.IdentityDrift`.
|
|
237
|
+
Inspect `RegistrationOutcome.IdentityDrift`.
|
|
238
|
+
|
|
239
|
+
Requires Chronicle 19.47.0 or later for identity-drift warnings and `ArtifactIdentityDrift`. After stopping all subscriptions,
|
|
244
240
|
`IEventStore.Observers.Remove` can remove an orphaned observer; it refuses while
|
|
245
241
|
running or subscribed anywhere. This is an authorized operator action, not a
|
|
246
242
|
rename cleanup to perform automatically.
|
|
@@ -320,7 +316,7 @@ application observer that is when the client connects again, for example after a
|
|
|
320
316
|
redeploy; Kernel-owned reactors subscribe again at startup; automatic event-store
|
|
321
317
|
subscription reconciliation does not end quarantine. Read
|
|
322
318
|
[recovery](../cratis-chronicle-hosting/references/operations.md) for the
|
|
323
|
-
|
|
319
|
+
fail-closed lookup and observer-kind-specific quarantine rules.
|
|
324
320
|
|
|
325
321
|
Do not throw to reject a malformed inbound event. A reactor is not a data-quality
|
|
326
322
|
gate; invalid payloads belong at the command or append site. When a malformed
|