@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.
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp-chronicle.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-host-application/references/csharp-availability.md +1 -0
- package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +2 -0
- package/package/corpus/skills/cratis-arc-migrate-relational-schema/references/provenance.md +11 -0
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-navigation.md +4 -0
- package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-testing-typescript/references/typescript.md +17 -0
- package/package/corpus/skills/cratis-authproxy-configure/SKILL.md +8 -5
- package/package/corpus/skills/cratis-authproxy-configure/references/admission.md +42 -0
- package/package/corpus/skills/cratis-authproxy-configure/references/services-and-routing.md +66 -2
- package/package/corpus/skills/cratis-authproxy-configure/references/tenant-resolution.md +62 -5
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +52 -3
- package/package/corpus/skills/cratis-chronicle-connect-application/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-connect-application/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +4 -0
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/provenance.md +15 -0
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -0
- package/package/corpus/skills/cratis-code-review/SKILL.md +1 -0
- package/package/corpus/skills/cratis-components-choose-control/SKILL.md +1 -1
- package/package/corpus/skills/cratis-components-choose-control/references/typescript-common.md +1 -1
- package/package/corpus/skills/cratis-components-submit-form/SKILL.md +2 -2
- package/package/corpus/skills/cratis-components-submit-form/references/typescript-commanddialog.md +2 -2
- package/package/corpus/skills/cratis-components-submit-form/references/typescript-commandform.md +11 -1
- package/package/corpus/skills/cratis-components-theme-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +2 -0
- package/package/corpus/skills/cratis-event-model-diagram/references/provenance.md +16 -0
- package/package/corpus/skills/cratis-fundamentals-concept/references/csharp-serialization.md +3 -1
- package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-serialization.md +2 -0
- package/package/corpus/skills/cratis-modeling-design-event-model/LICENSE +18 -0
- package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +9 -4
- package/package/corpus/skills/cratis-modeling-design-event-model/references/modeling-discipline.md +71 -0
- package/package/corpus/skills/cratis-modeling-design-event-model/references/provenance.md +39 -0
- package/package/corpus/skills/cratis-modeling-discover-timeline/LICENSE +14 -0
- package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +8 -2
- package/package/corpus/skills/cratis-modeling-discover-timeline/references/discovery-questions.md +28 -0
- package/package/corpus/skills/cratis-modeling-discover-timeline/references/provenance.md +22 -0
- package/package/corpus/skills/cratis-modeling-discover-timeline/references/story-retelling.md +66 -0
- package/package/corpus/skills/cratis-modeling-review-event-model/LICENSE +17 -0
- package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +11 -0
- package/package/corpus/skills/cratis-modeling-review-event-model/references/business-review.md +58 -0
- package/package/corpus/skills/cratis-modeling-review-event-model/references/event-log-hygiene.md +1 -1
- package/package/corpus/skills/cratis-modeling-review-event-model/references/provenance.md +15 -0
- package/package/corpus/skills/cratis-modeling-review-event-model/references/resilience-review.md +27 -2
- package/package/corpus/skills/cratis-modeling-review-event-model/references/structural-shapes.md +33 -0
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/LICENSE +11 -0
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +19 -15
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/provenance.md +18 -0
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/reading-lenses.md +76 -0
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/resuming-a-trace.md +12 -0
- package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +2 -0
- package/package/corpus/skills/cratis-platform-deliver-slice/references/provenance.md +16 -0
- package/package/corpus/skills/cratis-platform-upgrade-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +2 -0
- package/package/corpus/skills/cratis-screenplay-handoff-slice/references/provenance.md +18 -0
- package/package/corpus/skills/cratis-screenplay-model-automation/LICENSE +14 -0
- package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +8 -4
- package/package/corpus/skills/cratis-screenplay-model-automation/references/provenance.md +25 -0
- package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +2 -2
- package/package/corpus/skills/cratis-screenplay-model-automation/references/statemachines-and-workflows.md +3 -1
- package/package/corpus/skills/cratis-screenplay-model-automation/references/to-do-lists.md +186 -0
- package/package/corpus/skills/cratis-screenplay-model-interaction/LICENSE +14 -0
- package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +16 -12
- package/package/corpus/skills/cratis-screenplay-model-interaction/references/provenance.md +42 -0
- package/package/corpus/skills/cratis-screenplay-model-interaction/references/screen-design.md +212 -0
- package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +3 -1
- package/package/corpus/skills/cratis-screenplay-model-translation/references/provenance.md +14 -0
- package/package/corpus/skills/cratis-screenplay-model-translation/references/webhook-contract.md +22 -0
- package/package/corpus/skills/cratis-screenplay-recover-intent/LICENSE +11 -0
- package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +3 -0
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/provenance.md +16 -0
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/running-system.md +5 -2
- package/package/corpus/skills/cratis-screenplay-specify-outcome/LICENSE +13 -0
- package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +10 -5
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/case-questions.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/coverage-worksheet.md +23 -0
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/provenance.md +15 -0
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/scenario-discipline.md +126 -0
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/scenario-narrative.md +61 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +2 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +18 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +2 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-events.md +9 -1
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +31 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +15 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/provenance.md +15 -0
- package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -1
- package/package/corpus/skills/cratis-specifications-test-typescript-behavior/references/typescript.md +38 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-modeling-review-event-model
|
|
3
3
|
description: Use when critiquing an existing event model or its implementation (a sketch, code, a Screenplay model or a running Chronicle store) for event-modeling and event-sourcing mistakes, and reporting consequence-ranked findings without changing anything. Not for designing slices or tracing the impact of a changed rule (use cratis-modeling-design-event-model), reconstructing what existing code does (cratis-modeling-trace-existing-behavior) or deciding whether a Screenplay revision is accepted (cratis-screenplay-accept-model).
|
|
4
|
+
license: LICENSE
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Review an event model or its implementation
|
|
@@ -134,10 +135,20 @@ Read [event-log hygiene](references/event-log-hygiene.md) when the log is large,
|
|
|
134
135
|
| Change names that do not change | A `…Changed` event can be appended with nothing changed, or one broad event restates several facts |
|
|
135
136
|
| Volume above budget | Measured events per lifecycle or per day far exceed what the modeled facts explain |
|
|
136
137
|
|
|
138
|
+
### Structural shapes
|
|
139
|
+
|
|
140
|
+
Read [structural shapes](references/structural-shapes.md) after the model questions when the examined part spans several slices, to check counts: commands per submission, facts per command, facts per view, specifications per slice and facts two entities share.
|
|
141
|
+
|
|
142
|
+
### Business-language review
|
|
143
|
+
|
|
144
|
+
Read [business-language review](references/business-review.md) when the report's reader is a business owner: each finding becomes a question free of modeling terms.
|
|
145
|
+
|
|
137
146
|
### Resilience review
|
|
138
147
|
|
|
139
148
|
Use this off-path review only when the question is what still works when a dependency or business condition changes. Run the [read-only resilience review](references/resilience-review.md).
|
|
140
149
|
|
|
150
|
+
Read [provenance](references/provenance.md) when checking attribution.
|
|
151
|
+
|
|
141
152
|
### Screenplay evidence
|
|
142
153
|
|
|
143
154
|
All read-only. Read [Screenplay model evidence](references/screenplay-evidence.md) for each command and tool, its options and what its result cannot show.
|
package/package/corpus/skills/cratis-modeling-review-event-model/references/business-review.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Business-language review
|
|
2
|
+
|
|
3
|
+
Use this wording when the reader of the report is a business owner, product owner or domain expert rather than the team that builds the model. The review itself does not change: the same chain, the same evidence, the same confirmation of each candidate. Only the report changes. Each kept finding becomes one question the reader can answer without knowing how the system is built. Names are illustrative: a training provider registers attendees and enrolls them on courses.
|
|
4
|
+
|
|
5
|
+
## Posture
|
|
6
|
+
|
|
7
|
+
A review criticizes what exists; it does not model. Never add a missing step, rule or case to the model in the same pass as the review, even when the answer seems obvious: a gap that was quietly filled is a decision the owner never saw. Ask the question, record the answer in the report, and leave the change to the task that owns the element.
|
|
8
|
+
|
|
9
|
+
## Language rule
|
|
10
|
+
|
|
11
|
+
Write every question and every summary line so that a product owner who has never seen the model understands it at once.
|
|
12
|
+
|
|
13
|
+
| Never say | Say instead |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| Command | "this action", or the action's business name |
|
|
16
|
+
| Event, fact | "what is recorded", "what happened" |
|
|
17
|
+
| Read model, view, projection, query | "what the person sees", "this list", "this screen" |
|
|
18
|
+
| Slice | "this step" |
|
|
19
|
+
| Specification, scenario, case | "what do we expect when…?" |
|
|
20
|
+
| Persona, policy, gate | "who does this, and who must not?" |
|
|
21
|
+
| "No failure path", "no specification", "not modeled" | "What happens when this fails?", "What do we expect when…?" |
|
|
22
|
+
|
|
23
|
+
One sentence per question. Name the step or screen by its business name. Take the values in a question from the model's own inputs, for example "What happens when a coordinator registers an attendee without a name?", not "the name rule has no refusal case".
|
|
24
|
+
|
|
25
|
+
## Question categories
|
|
26
|
+
|
|
27
|
+
Go through the categories for each step in the examined path. Skip a category that does not apply, and skip a question the model already answers. No questions at all is a valid result.
|
|
28
|
+
|
|
29
|
+
| Category | Ask | Only when |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| Failure paths | "Can this fail? What happens then?" "What happens if the other system does not answer?" | No refusal or failure outcome is modeled for the action or the outside call |
|
|
32
|
+
| Repeated business actions | "Can someone do this twice? What should happen the second time?" | The model gives a concrete reason: a value that identifies the thing, a rule implying uniqueness, a submit without confirmation, or automation that can run again |
|
|
33
|
+
| Preconditions | "What must already be true before this is allowed?" "Can you still cancel after the course has started?" | A state exists in which the action looks wrong and nothing refuses it |
|
|
34
|
+
| What the person sees | "What does the person see after this?" | The examined step itself implies a screen or list and has none: an action nothing offers, or recorded information nobody is shown |
|
|
35
|
+
| Examples | "What do we expect when…?", with a concrete value | A step has no agreed example, or only the successful one; ask one question for the normal case and one or two for edge cases its inputs suggest |
|
|
36
|
+
| Permissions | "Who does this, and who must not?" "Can someone do this on another person's behalf?" | An action changes something |
|
|
37
|
+
| Time and ordering | "Does the order matter here?" "Is there a deadline? What happens when it passes?" | The flow implies a wait, an expiry or a recurring moment |
|
|
38
|
+
| Data completeness | "Where does this value come from?" | Something shown or decided on later in the examined path needs a value that nothing supplies |
|
|
39
|
+
| Shapes | The questions in `references/structural-shapes.md` | A shape holds up after reading the elements involved |
|
|
40
|
+
|
|
41
|
+
## What not to raise
|
|
42
|
+
|
|
43
|
+
- **Screens a later step may supply.** A missing confirmation, list or success screen is not a finding because this step lacks it; the model may not have reached that step yet. Ask only when the gap is visible inside the examined step.
|
|
44
|
+
- **Notifications that may live elsewhere.** A welcome email or a notice to another party may belong to another step or system. Ask only when the model says someone is told and nothing tells them.
|
|
45
|
+
- **Technical fields.** Identifiers, timestamps, correlation values and version numbers are implementation decisions, not business gaps.
|
|
46
|
+
- **Duplicate protection the model gives no reason for.** Do not invent a uniqueness rule.
|
|
47
|
+
- **Intentional design.** When a case is clearly handled, move on.
|
|
48
|
+
|
|
49
|
+
## Report
|
|
50
|
+
|
|
51
|
+
Keep the technical finding for the team as "Report findings" in the skill describes, and give the business reader:
|
|
52
|
+
|
|
53
|
+
1. The steps examined, by business name.
|
|
54
|
+
2. The questions, in timeline order, each naming the step or screen it concerns.
|
|
55
|
+
3. The top themes, worded as questions ("What happens when registration fails?"), never as modeling observations.
|
|
56
|
+
4. One next step, only when one gap clearly outweighs the rest.
|
|
57
|
+
|
|
58
|
+
An answer is evidence for the report, not an edit. An answer that contradicts the model becomes a finding against the pinned revision.
|
package/package/corpus/skills/cratis-modeling-review-event-model/references/event-log-hygiene.md
CHANGED
|
@@ -13,7 +13,7 @@ A fact is something that happened in the domain and that the domain would still
|
|
|
13
13
|
- **Non-answers:** `Pending`, "could not decide", "nothing was judged". The previous fact stands; a later attempt answers.
|
|
14
14
|
- **Retry policy:** how often something was tried and when to try again belongs to the retrying process.
|
|
15
15
|
|
|
16
|
-
Progress that is not a fact
|
|
16
|
+
Progress that is not a fact is never appended; it stays with what already owns it. Redelivery and retry of a failed reaction belong to the reaction's observer (`cratis-chronicle-react-to-fact`). Provider work before commit belongs inside the command (`cratis-arc-declare-operation`). Work that is still open is a view over the facts that opened and closed it, not an event per attempt. When the lifecycle itself is a sequence of domain facts, record those facts and nothing between them. Exception: a team that has deliberately chosen Orleans keeps long-running progress in a durable job (`cratis-orleans-jobs`).
|
|
17
17
|
|
|
18
18
|
## Repeats from observation commands
|
|
19
19
|
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
| Source skill | Idea used | Used in | Form |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| `eventmodeling-core-rules/SKILL.md` (Structural Shapes) | The four connection shapes (bed, left chair, right chair, shelf), their thresholds, which one is always a finding and which are leads, and the rule that the shape names never reach a business reader | `structural-shapes.md` | Close adaptation. The bed counts commands per submission, not per screen, because a screen here may offer several separate actions |
|
|
10
|
+
| `eventmodeling-core-rules/SKILL.md` (critic and modeling posture) | A review criticizes and a modeling step builds; the two are never mixed in one pass | `business-review.md` (Posture) | Idea |
|
|
11
|
+
| `eventmodeling-validating-event-models-checklist/SKILL.md` (phases 6 and 7) | A fact that seems to span two entities quietly couples them; the structural-shape checks as a separate review phase | `structural-shapes.md` (Shared fact) | Idea. Adapted: a fact that references another entity or feeds several views is not shared |
|
|
12
|
+
| `wdyt/SKILL.md` | The business-analyst review: the plain-language rule and its banned terms, the question categories (failure paths, repeats, preconditions, what the person sees, examples, permissions, time and ordering, data completeness, shapes), the plain-language wording of the shape questions, what not to raise, and the summary as business themes | `business-review.md`, the question column of `structural-shapes.md` | Close adaptation. Comments, arrows and chat questions on a board are not adopted; questions go in the review report |
|
|
13
|
+
| `stressor-analysis/SKILL.md` | Stressor analysis: wide stressors with at least five external ones, the residue of each as what is left (not the fix), the stressor incidence matrix that exposes hidden coupling, redesign of one cluster at a time as new slices, and validation with fresh stressors | `resilience-review.md` | Close adaptation. The chat loop and board writes are not adopted; proposals are recommendations to the owning skill |
|
|
14
|
+
|
|
15
|
+
The business-question categories, the critic posture and the stressor method first entered this corpus from https://github.com/Nebulit-GmbH/agentic-engineer at commit `07b0f30648d663cb588d7e2c7aa031af9dfc21f2`, by the same authors and under the same consent.
|
package/package/corpus/skills/cratis-modeling-review-event-model/references/resilience-review.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Review business resilience without editing
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A resilience review asks what is left of the model when its surroundings change, and which parts turn out to depend on the same thing. It predicts nothing and is not a risk list: the value comes from stressors that arrive from many directions. It is read-only; a proposal is not an edit. Names are illustrative: a training provider registers attendees, enrolls them on courses and sends a welcome email.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Method
|
|
6
|
+
|
|
7
|
+
1. **Pin the accepted model revision.** Done when the revision is written at the top of the report.
|
|
8
|
+
2. **List stressors with the owner.** A stressor is anything that can happen to the business or its environment: technical, legal, market, people, nature. Take at least five from outside the model, far-fetched ones included: a provider outage, a new law, the company is acquired, a key person leaves, the main customer fails. Add stressors from the business itself: a changed policy, a missing actor, a changed tenant entitlement or package. Word each as a business person would say it, with no field names or technical mechanics. Done when the list has at least five external stressors and no two share an obvious cause.
|
|
9
|
+
3. **Describe the residue of each stressor.** The residue is what is left after the stressor hits: which slices still work, which recorded facts survive, which views stop or go stale, who is not told. One plain sentence each, naming slices and views, not fields. A residue is observed, not designed: the fix is not the residue. "Enrollments still come in, but nobody is welcomed until the mail provider returns" is a residue; "queue the welcome" is a fix.
|
|
10
|
+
4. **Let the owner mark each residue** accept, investigate or propose a change. Whether a residue is acceptable is a business decision. Done when every residue has a disposition.
|
|
11
|
+
5. **Build the incidence matrix** for the residues not accepted: stressors as rows; affected slices, views and notified parties as columns; a mark at each intersection where the stressor hits. For each mark record what still works, what stops or goes stale and who misses notice. Take every hit from the pinned model, never from a guess.
|
|
12
|
+
6. **Name the clusters.** Columns hit by the same stressors are coupled in a way the model does not show. Name the shared cause of each cluster: one outside system, one role, one clock. Columns with the most hits are the hotspots. Similar symptoms do not establish a common cause: if both a directory outage and lost permission stop the lookup, check that both actually reach it. A cluster that crosses module boundaries is evidence for `cratis-screenplay-streams-and-consistency`.
|
|
13
|
+
7. **Propose a redesign for one cluster at a time,** the one the owner selects. Propose new slices beside the accepted ones; recorded facts and accepted slices stay as they are. State the new predicted residue for every stressor that hit the cluster, and check that the proposal does not depend on the cluster's shared cause: does the fallback still need the lookup that failed? Compare only the affected intersections against the baseline, and mark predicted recoveries and remaining losses as predictions.
|
|
14
|
+
8. **Check with fresh stressors.** Add stressors not used before and report how many residues are acceptable before and after the proposal. Stop when new stressors stop hitting columns that were not hit before, or when every residue is acceptable to the owner.
|
|
15
|
+
|
|
16
|
+
## Typical proposals
|
|
17
|
+
|
|
18
|
+
Each is a recommendation that names the owning skill; none is made here.
|
|
19
|
+
|
|
20
|
+
| Cluster cause | Proposal | Owning skill |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| An outside system is read live | Record what the outside system reports as the application's own facts, so slices work from the last known facts | `cratis-screenplay-model-translation` |
|
|
23
|
+
| Work cannot finish while something is down | A to-do list view of the open work, and a reaction that completes each item when it can | `cratis-screenplay-model-automation` |
|
|
24
|
+
| A reply or deadline may never come | A scheduled reaction that records the lapse as a fact, so the open item closes with a stated outcome | `cratis-screenplay-model-automation` |
|
|
25
|
+
| One role is the only way in | A second role or entry path for the same command | `cratis-modeling-design-event-model` |
|
|
26
|
+
| A part must be switched off for some tenants or during an incident | An availability gate on that part | `cratis-screenplay-availability` |
|
|
27
|
+
|
|
28
|
+
## Return
|
|
29
|
+
|
|
30
|
+
Return the stressor list with residues and dispositions, the matrix with its clusters and hotspots, and the proposals with their predicted residues, all against the pinned revision.
|
package/package/corpus/skills/cratis-modeling-review-event-model/references/structural-shapes.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Structural shapes
|
|
2
|
+
|
|
3
|
+
A shape is a count that crosses a rough threshold in how screens, commands, facts, views and specifications connect. Check the shapes once, after the model questions, when the whole examined part is visible: they compare elements with their neighbors, so one slice alone cannot show them. Names are illustrative: a training provider registers attendees and enrolls them on courses.
|
|
4
|
+
|
|
5
|
+
Only the first shape is a finding on the count alone. The others are leads: read the facts, properties and cases involved, and drop the lead silently when the domain explains the count. The shape names are reviewer shorthand. Never put them in a report; describe the concern in plain terms and ask the question given.
|
|
6
|
+
|
|
7
|
+
| Shape (shorthand) | Count | Standing | Question for the owner |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| Bed | One submission issues more than one command | Always a finding | "Sending this form does more than one thing. Is that one decision that succeeds or fails as a whole, or separate actions the person chooses between?" |
|
|
10
|
+
| Left chair | One command records more than two distinct facts | Lead | "When this succeeds, do all of these always happen together, or could some happen without the others?" |
|
|
11
|
+
| Right chair | One view is built from more than three distinct facts | Lead | "Does this answer one question for the person, or several bundled together?" |
|
|
12
|
+
| Shelf | One slice has far more specifications than its neighbors on the same timeline | Lead | "This step has many more cases than the ones around it. Is it really doing more, or covering something that should be its own step?" |
|
|
13
|
+
| Shared fact | Two entities each treat one fact as part of their own history | Finding when either entity decides on it | "Which of the two does this belong to, and what must the other one know about it?" |
|
|
14
|
+
|
|
15
|
+
## Bed: one submission, several commands
|
|
16
|
+
|
|
17
|
+
Count commands per submission, not per screen. A screen that offers several separate actions, or alternatives of which the person selects one, is sound: each action is one decision. A single submit that issues two commands hides a choice, or splits one decision across two commits, so the second can be refused after the first is recorded. Report it every time, as the model finding "One promise, independent requests". The correction is one command for one decision, or the partial outcomes stated as intended (`cratis-modeling-design-event-model`).
|
|
18
|
+
|
|
19
|
+
## Left chair: one command, many facts
|
|
20
|
+
|
|
21
|
+
More than two distinct facts from one command can be one outcome told in several facts, or two decisions sharing a button. Ask whether any of the facts could happen without the others. If one can, the command combines decisions and its refusals and rights combine with it. If they always occur together, the count is justified; say so and move on. In a Screenplay model, `find-modeling-smells` with `eventFanOutThreshold` set to 2 lists every such command as `SMELL004`.
|
|
22
|
+
|
|
23
|
+
## Right chair: one view, many facts
|
|
24
|
+
|
|
25
|
+
More than three distinct facts feeding one view can be one coherent picture or several questions on one screen. Ask whether every property shown belongs to the one thing the person is checking. If the view serves two readers or two decisions, a change made for one rebuilds the view for both. Count the distinct facts per view by hand: `SMELL005` counts facts per view property, not per view, so a view of many narrow properties passes it.
|
|
26
|
+
|
|
27
|
+
## Shelf: one slice, many more specifications
|
|
28
|
+
|
|
29
|
+
Compare a slice's specification count with the typical count on the same timeline; there is no fixed number. Read what the extra cases cover before asking. Cases that need a different actor or intent point at a second slice, which is the model finding "Whose decision do these cases test?". Cases that exercise one rule with more boundary values are a slice that is simply harder.
|
|
30
|
+
|
|
31
|
+
## Shared fact: one fact, two histories
|
|
32
|
+
|
|
33
|
+
A fact is appended to one history. Carrying another entity's identifier, or feeding several views, does not make it shared. The coupling is real when two entities each need the fact as part of their own history: both lifecycles read it, or a rule in each decides on it. Then one team's change to the fact changes the other entity's behavior, and a decision that reads only its own history misses a fact appended elsewhere. Report it as coupling, with the two decisions that read it. A fact that seems to belong to two entities is usually a naming or boundary mistake: ask which entity the fact is about, and whether the other needs a fact of its own or only a view. When a decision already relies on it, also report the model finding "Reference mistaken for a destination".
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
`references/reading-lenses.md` and the later-pass finding rules in `references/resuming-a-trace.md`
|
|
7
|
+
adapt material 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. The upstream skills and the ideas taken from each are listed in
|
|
11
|
+
`references/provenance.md`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-modeling-trace-existing-behavior
|
|
3
3
|
description: Use when an existing application's code, shipped artifacts, captured runtime signals or stored events must yield a candidate event model, or when its code or a running Chronicle namespace must be compared with an accepted model. Not for recovering intent from a recording or a bounded walk of a running system (use cratis-screenplay-recover-intent), settling a disputed business rule (use cratis-modeling-discover-timeline) or designing a change (use cratis-modeling-design-event-model).
|
|
4
|
+
license: LICENSE
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Trace existing behavior
|
|
@@ -16,9 +17,9 @@ description: Use when an existing application's code, shipped artifacts, capture
|
|
|
16
17
|
|
|
17
18
|
## What tracing produces
|
|
18
19
|
|
|
19
|
-
Tracing reads what an existing system
|
|
20
|
+
Tracing reads what an existing system does and reports it as labelled evidence: candidate slices and business facts, or a comparison with an accepted model. It never decides what the system should do. A recovered draft, a clean conformance check or a matching screenshot is evidence for the model owner, not acceptance.
|
|
20
21
|
|
|
21
|
-
Keep intake read-only: do not change legacy code, data or an authored model
|
|
22
|
+
Keep intake read-only: do not change legacy code, data or an authored model. Use synthetic values. No running target is required; do not inspect production by default.
|
|
22
23
|
|
|
23
24
|
Label every finding:
|
|
24
25
|
|
|
@@ -29,21 +30,22 @@ Label every finding:
|
|
|
29
30
|
| **proposed fact** | Candidate business meaning, kept separate from what the code stores. |
|
|
30
31
|
| **unknown** | Not settled; name the check or owner that would settle it. |
|
|
31
32
|
|
|
32
|
-
A screenshot of a row cannot identify its writer. Static inspection does not show that a request ran. A missing test is not a missing behavior.
|
|
33
|
+
A screenshot of a row cannot identify its writer. Static inspection does not show that a request ran. A missing test is not a missing behavior. Names here (a support agent, `OpenTicket`, `TicketOpened`, an Open tickets list) are illustrative.
|
|
33
34
|
|
|
34
35
|
## Choose the mode
|
|
35
36
|
|
|
36
|
-
- **Default: reconstruct current behavior.** No accepted baseline exists. Trace journeys as implemented and propose candidate slices separately from the implementation. Do not claim
|
|
37
|
+
- **Default: reconstruct current behavior.** No accepted baseline exists. Trace journeys as implemented and propose candidate slices separately from the implementation. Do not claim anything changed since an earlier revision.
|
|
37
38
|
- **Baseline comparison** when an accepted model or accepted examples exist. Identify the model revision and its acceptance status, the code revision inspected and any included uncommitted changes. Compare the same actor, inputs, address and outcome on each side. If the change range is known, use it to focus, then follow callers and consumers beyond the diff. A difference does not decide which side should change. For ambiguous signals, enforcement points and the comparison table, read [compare evidence](references/compare-evidence.md).
|
|
38
|
-
- **Black-box reconstruction** when only shipped artifacts or captured interface evidence
|
|
39
|
+
- **Black-box reconstruction** when only shipped artifacts or captured interface evidence exist: read [black-box intake](references/blackbox-intake.md).
|
|
39
40
|
- **Tool-assisted recovery** when static reading leaves a gap and the owner proposes a source generator or a runtime capture: read [recovery inputs](references/recovery-inputs.md) before running either.
|
|
40
|
-
- **
|
|
41
|
-
- **
|
|
41
|
+
- **Whole application, or no named journey**: start with [reading lenses](references/reading-lenses.md).
|
|
42
|
+
- **A later pass**, and which differences then count: read [resuming a trace](references/resuming-a-trace.md).
|
|
43
|
+
- **Incremental replacement**, one slice at a time: read [side-car migration](references/side-car-migration.md).
|
|
42
44
|
|
|
43
45
|
## How the recovery tools behave
|
|
44
46
|
|
|
45
|
-
- **Source generation** loads a .NET solution or project through MSBuild with the installed .NET SDK. Packages must already be restored. MSBuild evaluates the project and may write intermediate build files, so run it only on a trusted checkout. It does not start the application or connect to its database or Chronicle. One bundled provider interprets the whole application: Arc, Marten, or Marten with Wolverine (Critter Stack). Auto detection picks the most specific match and reports unrelated matches instead of guessing. It reads only the selection; spec and test projects (`.Specs`, `.Specifications`, `.Tests`, `.Test`, `.IntegrationTests`, `.Specs.AppHost`) are
|
|
46
|
-
- **Generation output** is `.play` text, reproducible from the same restored checkout, so a draft can be committed and diffed. Diagnostics carry a code,
|
|
47
|
+
- **Source generation** loads a .NET solution or project through MSBuild with the installed .NET SDK. Packages must already be restored. MSBuild evaluates the project and may write intermediate build files, so run it only on a trusted checkout. It does not start the application or connect to its database or Chronicle. One bundled provider interprets the whole application: Arc, Marten, or Marten with Wolverine (Critter Stack). Auto detection picks the most specific match and reports unrelated matches instead of guessing. It reads only the selection; spec and test projects (`.Specs`, `.Specifications`, `.Tests`, `.Test`, `.IntegrationTests`, `.Specs.AppHost`) are left out.
|
|
48
|
+
- **Generation output** is `.play` text, reproducible from the same restored checkout, so a draft can be committed and diffed. Diagnostics carry a code, location and message, and go to standard error. Codes starting `CLI` concern the run (target, restore, build, framework, provider, an ignored option); the provider's own diagnostics name a construct it left out or weakened. Warnings do not fail the run. On an error, standard output gets nothing; an explicit output file still gets the partial draft, unless no source was produced.
|
|
47
49
|
- **A draft is partial, and quiet diagnostics are not coverage.** It holds only the framework declarations the provider recognizes, not arbitrary handler logic, and says nothing about projects outside the selection. A construct missing from a draft is a model limit, not evidence that the system lacks it. Reconcile the draft against the code and tests you inspected.
|
|
48
50
|
- **Source conformance** runs the same extraction in memory. It compares the authored model (before) with the recovered one (after) by exact kind and address, so a rename or move reads as a removal plus an addition. It does not run specifications or read opaque code bodies, so a clean result is not behavioral equivalence.
|
|
49
51
|
- **Namespace conformance** reads one Chronicle event store, namespace and event sequence. It captures the tail first, reads the event type registry and the observers, then reads event metadata only, never payloads. Each event is attributed through its causation chain to the innermost command or reactor. Projections and reducers come back as Unknown. It never replays observers, appends events or changes the model.
|
|
@@ -55,7 +57,7 @@ Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Nod
|
|
|
55
57
|
|
|
56
58
|
## Default path: trace one journey through the code
|
|
57
59
|
|
|
58
|
-
Let the user choose one journey with a start and a visible result,
|
|
60
|
+
Let the user choose one journey with a start and a visible result, such as a support agent opening a ticket and finding it in the Open tickets list.
|
|
59
61
|
|
|
60
62
|
1. **Entry.** Start with the actor or trigger and the request contract. Follow the real entry point through validation and authorization to the deciding handler. Trace one success and one meaningful refusal. If no refusal is known, mark that branch unknown rather than inventing a rule.
|
|
61
63
|
2. **Decision and write.** Identify whose state changes and what the handler returns, writes or appends. For an event, separate the addressed event source from the payload. If the handler updates a row, say so: a proposed fact is not an event the system emitted.
|
|
@@ -63,7 +65,7 @@ Let the user choose one journey with a start and a visible result, for example a
|
|
|
63
65
|
4. **Record.** Write one row per finding with its label, its locator (symbol, request, frame or document section) and the candidate slice it supports, such as `OpenTicket` producing `TicketOpened`.
|
|
64
66
|
5. **Ask.** Take one batch of unresolved questions to the requester or their named decision owner. If asked to proceed provisionally, state which outcomes remain unaccepted.
|
|
65
67
|
|
|
66
|
-
For a whole-application candidate on a trusted, restored .NET checkout, generate a draft into its own folder beside the journey traces: `cratis screenplay generate <solution-or-project> --file <draft-folder>/<Name>.play`. Sort the diagnostics: fix `CLI` blockers and configuration warnings (`CLI0014` means an option was ignored) as run problems, and record each provider diagnostic as a **not expressible** loss. Only if a draft was written, run `cratis screenplay validate <draft-folder> --executable`. Then reconcile the draft with the journeys
|
|
68
|
+
For a whole-application candidate on a trusted, restored .NET checkout, generate a draft into its own folder beside the journey traces: `cratis screenplay generate <solution-or-project> --file <draft-folder>/<Name>.play`. Sort the diagnostics: fix `CLI` blockers and configuration warnings (`CLI0014` means an option was ignored) as run problems, and record each provider diagnostic as a **not expressible** loss. Only if a draft was written, run `cratis screenplay validate <draft-folder> --executable`. Then reconcile the draft with the traced journeys as [recovery inputs](references/recovery-inputs.md) describes. Never write a draft over a hand-authored model.
|
|
67
69
|
|
|
68
70
|
Stay within the authorized system and material. A reconstruction from public material is plausible, not proof of the private workflow. Inspect statically before proposing a run; a live write needs separate approval for the target and the action. Do not bypass access controls to fill an evidence gap.
|
|
69
71
|
|
|
@@ -73,8 +75,8 @@ Commands are in the Cratis CLI unless marked as the standalone Screenplay tool (
|
|
|
73
75
|
|
|
74
76
|
### Recover a draft from source: `cratis screenplay generate [PATH]`
|
|
75
77
|
|
|
76
|
-
- `PATH`: a solution (`.slnx`, `.sln`, `.slnf`), a project (`.csproj`) or a folder. When omitted or a folder, the CLI searches that folder and then each parent, preferring `.slnx`, `.sln`, `.slnf`, then `.csproj`. Use a `.slnf` to pick one application in a repository with several. A `.csproj` selects that project and its transitive project references
|
|
77
|
-
- `--file <FILE>`: write the draft to a file, even when generation reports errors; an existing file is overwritten. Without it,
|
|
78
|
+
- `PATH`: a solution (`.slnx`, `.sln`, `.slnf`), a project (`.csproj`) or a folder. When omitted or a folder, the CLI searches that folder and then each parent, preferring `.slnx`, `.sln`, `.slnf`, then `.csproj`. Use a `.slnf` to pick one application in a repository with several. A `.csproj` selects that project and its transitive project references.
|
|
79
|
+
- `--file <FILE>`: write the draft to a file, even when generation reports errors; an existing file is overwritten. Without it, the document goes to standard output.
|
|
78
80
|
- `--provider auto|arc|marten|critter-stack`: choose when unrelated providers match, or pin for reproducible CI. It selects a provider but does not isolate that provider's adapters.
|
|
79
81
|
- `--framework <TFM>`: required when any application project targets several frameworks.
|
|
80
82
|
- `--domain <NAME>`: name the domain when the assembly, root namespace or solution name would be wrong.
|
|
@@ -95,7 +97,7 @@ Commands are in the Cratis CLI unless marked as the standalone Screenplay tool (
|
|
|
95
97
|
- Shared generation options: `--provider`, `--framework`, `--feature-root`, `--module`, `--skip-segments`, `--modules-from-namespace-roots` and `--authoring-only-constructs`. Pass the ones that reproduce the authored module, feature and slice placement; otherwise declarations read as missing. Nothing is written, so there is no `--file`.
|
|
96
98
|
- Findings: `MissingFromModel` (in code only, blocking); `NotRealizedInCode` (in the model only, not blocking); `ShapeMismatch` (blocking for event property, generation contract and other member changes, but not for an authored member extraction did not recover); informational specification and metadata changes; a `sameNameCounterpart` hint for a likely rename.
|
|
97
99
|
- `-o json`: `verdict` (`clean`, `defects-found` or `incomplete`), counts, findings, `notCompared`, `gaps` and provenance.
|
|
98
|
-
- Exit codes: `0
|
|
100
|
+
- Exit codes: `0`: no blocking finding and no gap that prevented looking; `1`: a blocking finding; `2`: the model or project could not be resolved, extraction or comparison failed, or coverage gaps prevented looking.
|
|
99
101
|
|
|
100
102
|
### Check a running namespace against an accepted model: `cratis screenplay conform-namespace <MODEL_ROOT>`
|
|
101
103
|
|
|
@@ -137,7 +139,9 @@ Commands are in the Cratis CLI unless marked as the standalone Screenplay tool (
|
|
|
137
139
|
|
|
138
140
|
- Take disputed or unobserved intent to [timeline discovery](../cratis-modeling-discover-timeline/SKILL.md).
|
|
139
141
|
- Take confirmed changes to [slice design](../cratis-modeling-design-event-model/SKILL.md).
|
|
140
|
-
-
|
|
142
|
+
- A recording or a bounded walk of a running system: `cratis-screenplay-recover-intent`.
|
|
143
|
+
|
|
144
|
+
Read [provenance](references/provenance.md) when checking attribution.
|
|
141
145
|
- To accept a recovered or compared model, use `cratis-screenplay-accept-model`.
|
|
142
146
|
|
|
143
147
|
Neither passing examples nor your judgment grant acceptance, and an agreed example is not authorization to execute.
|
package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/provenance.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Provenance
|
|
2
|
+
|
|
3
|
+
The practices below come from the Eventmodelers Build-Kits skills by Martin Dilger and Nebulit GmbH (https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits at commit `bfab031`; https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. They are expressed here in Screenplay, Chronicle and Arc terms; the upstream board, chat and build-kit mechanics are not used. The notice is in `LICENSE`.
|
|
4
|
+
|
|
5
|
+
| Source (upstream skill path) | Idea used | Where | Form |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| `eventmodelers-cli/stacks/modeling-kit/templates/.claude/skills/analyze-code-base/SKILL.md` | The five lenses (entry points, persistence writes, tests, user interface, documents), with entry points and persistence writes read hardest, tests as vocabulary only and documents trusted least on current behavior | `reading-lenses.md`, The five lenses | close adaptation |
|
|
8
|
+
| same | Mapping from a code construct to a candidate slice, including read-only rows as reference data | `reading-lenses.md`, From code to candidate slices | close adaptation |
|
|
9
|
+
| same | Progressive passes: every area at a high level first, then one area per pass chosen by the person; the depth table; an area is a journey, not an operation; ask only what the code cannot tell, proposing first | `reading-lenses.md`, Progressive passes | close adaptation |
|
|
10
|
+
| same | The person outranks the code, with the code's behavior kept as a decision | `reading-lenses.md`, The person outranks the code | close adaptation |
|
|
11
|
+
| same | Decision records as table rows written in the same pass, the kinds to record and who settled each | `reading-lenses.md`, Decision records | close adaptation |
|
|
12
|
+
| same | Re-read only what changed since the recorded revision; an earlier answer still holds | `resuming-a-trace.md` | idea |
|
|
13
|
+
| `eventmodelers-cli/stacks/modeling-kit/templates/.claude/skills/detect-model-drift/SKILL.md` | Only changes since the baseline count; behavior files sorted from noise per file; one difference is one finding listing its chain; a change toward the model is no finding; a model change lists every screen that shows or submits the changed value; the baseline moves only when every finding is decided, a declined finding included | `resuming-a-trace.md`, Findings on a later pass against an accepted model | close adaptation |
|
|
14
|
+
| `eventmodelers-cli/extensions/vibe/skills/vibe-translate/SKILL.md` | The same baseline rules, for code written outside the model | `resuming-a-trace.md`, same section | idea |
|
|
15
|
+
|
|
16
|
+
Not taken from `detect-model-drift`: its default of updating the model to match the code. Here a difference does not decide which side changes; the model owner does.
|
|
17
|
+
|
|
18
|
+
This skill succeeds the earlier `cratis-screenplay-legacy-extraction` and `cratis-screenplay-reverse-engineering` skills, whose credits to Martin Dilger and Nebulit GmbH it carries forward.
|
package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/reading-lenses.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Read a whole application through five lenses
|
|
2
|
+
|
|
3
|
+
Use this when the whole application is in scope or nobody can yet name the journey to trace. The lenses find the journeys and their candidate slices; each chosen journey is then traced with the default path. Everything a lens finds is a hypothesis to put to the requester or their named decision owner, labelled as the skill's labels require, never a settled slice. The names below (a clinic, `BookVisit`, `VisitBooked`) are illustrative.
|
|
4
|
+
|
|
5
|
+
## The five lenses
|
|
6
|
+
|
|
7
|
+
Read every pass through the same five lenses, only as deep as the pass needs. Start with entry points and persistence writes: they carry the most signal. Tests, user interface and documents then name, order and corroborate what those two found.
|
|
8
|
+
|
|
9
|
+
| Lens | What to read | What it gives |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| **Entry points** (look hardest) | Routes, controllers, handlers, message listeners, scheduled jobs, outbound clients | Each entry point is a candidate slice. The request and response shapes hint at fields; the caller hints at who or what triggers it. |
|
|
12
|
+
| **Persistence writes** (look hardest) | Inserts, updates, deletes, saves, status changes, migrations | Each write is a candidate fact. The stored values are its candidate content; a status or enumeration column shows a lifecycle; a derived or joined query shows a candidate view. |
|
|
13
|
+
| **Tests** | Test names, fixtures, error cases | Vocabulary only: the business words, which refusals someone cared about, and realistic example values. |
|
|
14
|
+
| **User interface** | Templates, views, components, forms, navigation | Forms and buttons are where a person decides, list and detail pages are views, page order proposes the journey order, and visible labels are the business words. |
|
|
15
|
+
| **Documents** | Overviews, decision records, interface descriptions, diagrams, user stories, acceptance text, deployment and schedule configuration | Vocabulary, stated purpose, the order of steps, the systems around this one and the reason behind a decision. Configuration shows integrations and jobs the code alone hides. |
|
|
16
|
+
|
|
17
|
+
Rules that keep each lens honest:
|
|
18
|
+
|
|
19
|
+
- **Tests show vocabulary, not shape.** A test's arrange, act and assert do not decide what a slice's given, when and then hold, and a mock, repository or setup call is never history. Write examples with `cratis-screenplay-specify-outcome`.
|
|
20
|
+
- **This lens reads the user interface's source.** Walking a running instance is `cratis-screenplay-recover-intent`. Its click path proposes an order; confirm that order against entry points and persistence writes.
|
|
21
|
+
- **Trust documents least on what the system does today.** They state intent and go stale. A documented step still has to be found in the code; until it is, record it as **unknown** (documented only) with the document's section and date as locator.
|
|
22
|
+
- **In doubt, ask which documents describe the business.** List the candidates in one question, then continue with the code and the unambiguous documents. A committed document is not authoritative because it is committed.
|
|
23
|
+
- **A generic engine is not the model.** When the code is a configurable engine (templates, schemas, configurable entities), trace one real case it handles.
|
|
24
|
+
- **A disagreement between lenses is a question, not a slice.** A route nothing calls, a table nothing writes, a test for removed behavior, a screen without a backend, a document describing a flow the code lacks: record each as **unknown** with both locators and the owner who can settle it.
|
|
25
|
+
|
|
26
|
+
## From code to candidate slices
|
|
27
|
+
|
|
28
|
+
| In the code | Candidate |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| A write to storage | A **proposed fact**, past tense, in business words (`VisitBooked`, not "visit row inserted"). Several writes in one call are one decision with possibly several facts: ask. |
|
|
31
|
+
| An inbound call a person triggers from a form, button or page | A state change slice (a screen and its command) when it writes; a state view slice (a screen and the view it reads) when it only reads. The controller is evidence; the person's decision is the command. |
|
|
32
|
+
| An inbound call nobody types: a scheduled job, a listener for a fact of this system | An automation slice. |
|
|
33
|
+
| An inbound call from another system: a webhook, a message, a polled record | An inbound translation slice; behavior that follows it is its own automation slice. |
|
|
34
|
+
| An outbound call to another system: an HTTP client, mail, payment, a published message | An automation slice that reacts to a fact, makes the call and records the outcome as a fact. |
|
|
35
|
+
| A read endpoint, query or join | A view, fed by the facts behind the tables it reads. |
|
|
36
|
+
| A row that is only read and never written by this system | Reference data from outside: ask where it comes from; do not invent a fact for it. |
|
|
37
|
+
|
|
38
|
+
Class, table and route names are locators, never slice or fact names. Slice kinds and their rules belong to `cratis-modeling-design-event-model`; this table only says which kind a signal suggests.
|
|
39
|
+
|
|
40
|
+
## Progressive passes
|
|
41
|
+
|
|
42
|
+
Do not detail everything at once. Each pass ends with a report and a question, and the person chooses where to go next.
|
|
43
|
+
|
|
44
|
+
1. **First pass: every area, high level.** Read broadly through the five lenses and group what you find into areas. An area is a journey from trigger to outcome, never one route, controller or create, read, update or delete operation: registering, finding, viewing and updating an owner are one area although the code splits them. Name each area and its business milestones only: no fields, examples or rules. Report the areas and ask which one to detail. Never pick for the person.
|
|
45
|
+
2. **Each later pass: one area, the one the person chose.** Trace its whole journey from trigger to outcome with the default path, not only its first slice. Stay inside the depth the pass has:
|
|
46
|
+
|
|
47
|
+
| Pass depth | Slices | Fields | Outcomes |
|
|
48
|
+
| --- | --- | --- | --- |
|
|
49
|
+
| High level | One area per journey, milestones only | None | None |
|
|
50
|
+
| Flow | The real sequence of commands, facts and views in one journey | Identifying and business-critical only | One success and the one or two refusals that matter |
|
|
51
|
+
| Deeper | Sub-journeys, alternate paths, automations | The full business field set | Refusals and edge rules, each traced to the point that enforces it |
|
|
52
|
+
|
|
53
|
+
Deeper means more business (decisions, rules, ways to fail), never more technical detail.
|
|
54
|
+
3. **End every pass the same way.** Report what the pass added, what is still open, and the sub-journeys found inside the area. Then ask: which area next, deeper here, or stop. Stop when the person says stop; areas not chosen stay at high level.
|
|
55
|
+
|
|
56
|
+
Ask only what the code cannot tell you: usually the order of steps and unclear business requirements. Propose first ("the owner picks a pet and then books a visit: is that the real sequence?"). Never place a step at a guessed position; where neither code, a walk nor a person settles the order, leave it **unknown**.
|
|
57
|
+
|
|
58
|
+
## The person outranks the code
|
|
59
|
+
|
|
60
|
+
When the requester or their decision owner contradicts the code, the candidate follows the person, and what the code does stays in the trace as a decision row with its label and locator. For example: the code lets a booked visit be cancelled and the owner says that never happens, so the candidate has no cancellation, and the row records the cancel path as inferred from inspection and deliberately left out. This shapes the candidate only; it does not accept the model, and in a baseline comparison it does not decide which side changes.
|
|
61
|
+
|
|
62
|
+
## Decision records
|
|
63
|
+
|
|
64
|
+
Record every decision made while turning code into candidates, in the same pass as the candidate it explains, not in a write-up at the end. An answer from the person is a decision too. Use table rows, not prose:
|
|
65
|
+
|
|
66
|
+
| Decision | Why | Locator | Settled by |
|
|
67
|
+
| --- | --- | --- | --- |
|
|
68
|
+
| The visit form's handler and the visit insert become `BookVisit` and `VisitBooked` | One decision, one write | Handler symbol; table | code |
|
|
69
|
+
| `PetType` is called Species | The owner's word | Entity symbol | person |
|
|
70
|
+
| Cancelling a visit is left out | The code allows it; the owner says it never happens | Cancel route | person |
|
|
71
|
+
| The audit table is not a candidate | Technical; no business decision | Table | code |
|
|
72
|
+
| A failed booking is refused | No test covers the failure path | Handler symbol | assumed |
|
|
73
|
+
|
|
74
|
+
Record at least these kinds: a code construct mapped to a candidate, an order, a conflict between code and document, a code term mapped to a business term, the person overriding the code, a merge or split, something deliberately left out, reference data, and an assumption.
|
|
75
|
+
|
|
76
|
+
**Settled by** is one of `code` (derived from what was read), `document` (stated only; name the document), `person` (they said so) or `assumed` (neither; still open). An `assumed` row is also an **unknown** finding with the question that would settle it. Give every row a locator precise enough to find again: a symbol, route, table, test or document section, never "the visit code".
|
package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/resuming-a-trace.md
CHANGED
|
@@ -7,3 +7,15 @@ At each pass, record per feature or journey the code revision, whether uncommitt
|
|
|
7
7
|
- Preserve consequential name differences with their locator: legacy `Activated` might mean “registration accepted”; keep that mapping provisional until the owner confirms it.
|
|
8
8
|
- If history was rewritten, either input tree is dirty, or the watermark can't be recovered, fully retrace affected journeys. If their boundary is uncertain, retrace the whole scoped feature.
|
|
9
9
|
- Close the pass with a loss table: item and evidence, class, owner or next check. Distinguish **not examined**, **not observed**, **not expressible** (model limit or generator diagnostic), and **awaiting owner decision**. Record discarded or regenerated draft files and any generated-file cleanup still pending. Do not clean another owner's files.
|
|
10
|
+
|
|
11
|
+
## Findings on a later pass against an accepted model
|
|
12
|
+
|
|
13
|
+
When the later pass compares the code with an accepted model, the recorded revision is the baseline and these rules decide what is a finding:
|
|
14
|
+
|
|
15
|
+
- **Only changes since the baseline count.** A difference that already existed at the recorded revision belongs to the earlier pass's table; carry it forward from there. Report it again only if a change since then touched it.
|
|
16
|
+
- **Sort the changed files before comparing.** Entry points, handlers, stored shapes, projections, queries, validation, screens and tests can change behavior. So can a dependency update, a build or runtime configuration change and a regenerated file: follow each to the behavior it reaches before you set it aside. Exclude a change only when you verified it has no behavioral effect, such as formatting or a comment; list those once as not relevant, with the check you made, never as findings. One change can mix both; drop its noise and keep its behavior.
|
|
17
|
+
- **One difference is one finding.** A field renamed in the request contract, the handler, the stored shape, the projection and the screen is one finding that lists that chain, recorded at the element where it starts.
|
|
18
|
+
- **A change that moves the code toward the model is not a finding.** A fix that finally implements a modeled refusal makes that comparison **matched**; mention it in the summary at most.
|
|
19
|
+
- **A finding does not choose the fix.** State what the model says, what the code now does and the change that introduced it, then let the model owner decide which side changes. Say so when the change looks accidental (a misspelled name, a leftover debugging path, a disabled test), because that is evidence for restoring the code.
|
|
20
|
+
- **A proposed model change lists every screen it touches.** When the owner decides the model should change, follow the changed command, event or read-model property with `screenplay lineage` and name each screen that shows or submits it in the same finding. Those screens change in place; never propose a new screen beside an outdated one.
|
|
21
|
+
- **Move the baseline only when every finding is decided.** Record each finding as applied to the model, returned to the code or declined. A declined finding is accepted as it stands, so the next pass does not report it. While any finding is undecided, keep the old recorded revision so the same changes come up again.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Provenance
|
|
2
|
+
|
|
3
|
+
This skill uses ideas 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
|
+
| Source | Idea used | Where | Form |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| `stacks/classic` `build-state-change` and `build-state-view`, closing verification | The slice definition is the source of truth. Every contracted field is accounted for in the code, nothing is in the code that the contract does not state, and every specification has its own passing test. | `references/contract-reconciliation.md`, Reconcile in both directions | idea |
|
|
10
|
+
| `shared/skills/request-feedback` | An ambiguity that blocks the work is returned as one specific question that names the element, so the owner can answer without earlier context. | `references/contract-reconciliation.md`, When the evidence conflicts | idea |
|
|
11
|
+
| `stacks/classic` `build-automation`; `stacks/modeling-kit` `prototype` | An automation works off a to-do read model of pending work. The scenarios of that list decide how an item gets on and off it, and handling the same trigger again must not issue the command twice. | `references/csharp.md`, Draining a to-do list; `references/eventual-consistency.md`, A reactor | idea |
|
|
12
|
+
| `stacks/kurrent` `build-automation` | When an automation issues one command per item, an item that was already handled must not stop the others. | `references/csharp.md`, Reactions | idea |
|
|
13
|
+
|
|
14
|
+
An earlier version of this corpus took the closing-verification and automation ideas from the same authors' agentic-engineer repository (https://github.com/Nebulit-GmbH/agentic-engineer, commit `07b0f30648d663cb588d7e2c7aa031af9dfc21f2`), under the same consent.
|
|
15
|
+
|
|
16
|
+
Not adopted: `slice.json`, the board, the Slice map and evidence notes; isolating a slice so that it can be deleted; recording assumptions as code comments; swallowing an exception to treat a repeat as handled (here the command decides again and returns a refusal).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-platform-upgrade-application
|
|
3
|
-
description: Use when moving an existing Cratis application to newer Cratis packages, tools or images, or when a build or run breaks after such an update. Not for upgrading the Chronicle kernel itself (`cratis-chronicle-deploy-kernel`) or scaffolding a new application (`cratis-platform-start-application`).
|
|
3
|
+
description: Use when moving an existing Cratis application to newer Cratis packages, tools or images, pinning Cratis package and image versions before a first production deployment, planning or reviewing a Cratis dependency upgrade (which package versions pair, and the order of the steps), or when a build or run breaks after such an update. Not for the PrimeReact codemods and the renderer and CSS migration of a Components major (`cratis-components-theme-application`), upgrading the Chronicle kernel itself (`cratis-chronicle-deploy-kernel`) or scaffolding a new application (`cratis-platform-start-application`).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Move an application to newer Cratis packages, tools and images
|
|
@@ -137,3 +137,5 @@ Export `--format openapi` from the accepted full model when any selected operati
|
|
|
137
137
|
In-process export and direct Stage planning are C#-only; otherwise use the CLI or MCP. The library opens roots with identities, opens a read-only root for release-baseline checks, exports and narrows ESM, admits screens, emits API/UI/agent contracts, and reads ESM strictly or while preserving unknown fields.
|
|
138
138
|
|
|
139
139
|
Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Node server `package.json` → typescript, `*.kt` → kotlin, `*.java` → java, `go.mod` → go, `mix.exs` → elixir); only the project's languages are installed.
|
|
140
|
+
|
|
141
|
+
Read [provenance](references/provenance.md) when checking attribution.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Provenance
|
|
2
|
+
|
|
3
|
+
This skill uses ideas 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/`.
|
|
8
|
+
|
|
9
|
+
| Source | Idea used | Where | Form |
|
|
10
|
+
|---|---|---|---|
|
|
11
|
+
| `eventmodeling-orchestrating-event-modeling`, `references/project-planning-with-event-modeling.md` | Estimate by counting slices and measuring throughput from slices already completed, instead of estimating each feature. | `references/ordering.md`, Count and estimate | idea |
|
|
12
|
+
| same | Count only slice work, and budget other work separately. | `references/ordering.md`, Count and estimate | idea |
|
|
13
|
+
| same | Dependencies between slices decide what can run in parallel, and settled contracts are what let work proceed in parallel. | `references/ordering.md`, Build the waves | idea |
|
|
14
|
+
| same | Capacity is per team, so the plan follows the load on each owner and not the total divided by headcount. | `references/ordering.md`, Count and estimate | idea |
|
|
15
|
+
|
|
16
|
+
An earlier version of this corpus took the same ideas from the authors' agentic-engineer repository (https://github.com/Nebulit-GmbH/agentic-engineer, commit `07b0f30648d663cb588d7e2c7aa031af9dfc21f2`), under the same consent.
|
|
17
|
+
|
|
18
|
+
Not adopted: the flat cost curve claim, sprint velocity figures and the planning spreadsheet, weighting by complexity class, and the board status vocabulary.
|
|
@@ -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 adapts material 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-screenplay-model-automation
|
|
3
|
-
description: Use when a Screenplay model needs system-initiated work - a reaction to a local fact, a clock schedule or a host signal, a call to an external system's abilities,
|
|
3
|
+
description: Use when a Screenplay model needs system-initiated work - a reaction to a local fact, a clock schedule or a host signal, a call to an external system's abilities, a process over time with waits, approvals, deadlines or retries (facts, reactions and a to-do list by default), or a deliberately modeled state machine or workflow. Not for importing external records or another application's public events (use cratis-screenplay-model-translation), and not for the decision a user's command makes (use cratis-screenplay-declare-slice).
|
|
4
|
+
license: LICENSE
|
|
4
5
|
compatibility: Requires the Screenplay CLI.
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -26,8 +27,9 @@ A state machine tracks one entity per read-model key. Only a transition runs ent
|
|
|
26
27
|
## Choose the mechanism
|
|
27
28
|
|
|
28
29
|
- Follow up on a local fact with a reaction, not a second user action. Use a clock reaction for a schedule or a typed trigger for an application signal only where the target admits it; use the extension contract for a provider signal.
|
|
29
|
-
-
|
|
30
|
-
-
|
|
30
|
+
- **Process over time** (waits, approvals, deadlines, retries, per-item work): default to facts, reactions and a [to-do list](references/to-do-lists.md). A fact opens an item, a reaction invokes a command that rechecks state, a closing fact removes it.
|
|
31
|
+
- **State machine or workflow:** only when the owner deliberately models one or a construct requires it: an `answers later` ability (workflow action only), a Stage Host ability call (workflow action or state entry), or iterating a collection (workflow `foreach`).
|
|
32
|
+
- Ask an external system via an ability. An operation records intent only. For external records or another application's public events, use `cratis-screenplay-model-translation` instead.
|
|
31
33
|
|
|
32
34
|
## Default path: react to a fact by invoking a command
|
|
33
35
|
|
|
@@ -73,7 +75,7 @@ A reaction may have several triggers; each is handled separately, in authored or
|
|
|
73
75
|
### Under a trigger
|
|
74
76
|
|
|
75
77
|
- `<value>` lines: select event or trigger values by name (selection, not declaration). Escape a value named like a keyword with `@`, such as `@reads` or `@file`. Clock triggers carry no values.
|
|
76
|
-
- `invokes <Command>` + `<input> = <source>` lines: ask a command to decide. Map every required request input, never generated inputs. Authoring type-checks nested paths, but that does not guarantee target support. A list path never fans out;
|
|
78
|
+
- `invokes <Command>` + `<input> = <source>` lines: ask a command to decide. Map every required request input, never generated inputs. Authoring type-checks nested paths, but that does not guarantee target support. A list path never fans out; record a fact per item.
|
|
77
79
|
- `invokes <System>.<Ability>` + inputs + answer branches: model an external call with scripted reference answers; Stage refuses reaction ability calls (see Systems and abilities).
|
|
78
80
|
- `produces <Event>` + mappings: append a declared event. `for` takes a required scalar trigger value or nonblank text; omit only for an event trigger to reuse its source. `produces ... when` is the command form; a reaction narrows with `where`.
|
|
79
81
|
- Production `tag <tag>` lines: literal append metadata, before the payload mappings.
|
|
@@ -200,3 +202,5 @@ Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Nod
|
|
|
200
202
|
- [Reaction boundaries](references/reaction-boundaries.md): whose authority, whose decision and what commits together.
|
|
201
203
|
- [Systems, abilities and external effects](references/external-effects.md): choosing the effect class and handling lost replies.
|
|
202
204
|
- [State machines and workflows](references/statemachines-and-workflows.md): examples, node semantics and specifications.
|
|
205
|
+
|
|
206
|
+
Read [provenance](references/provenance.md) when checking attribution.
|