@cratis/pi 7.189.1 → 7.189.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.
@@ -24,6 +24,35 @@ arc: [application: MyApp.Arc, output: "assets/src/arc"]
24
24
 
25
25
  ## Vertical slices
26
26
 
27
+ ### Group slices into sub-features, and keep an integration beside what it serves
28
+
29
+ A feature that holds more than about six slices is usually several features. Look for these seams
30
+ before adding the next slice, and review them whenever a feature grows:
31
+
32
+ - **One noun, many verbs.** The slices that act on one thing (`rotating_secrets`, `revoking_previous_secrets`,
33
+ `expiring_previous_secrets`, `retiring_secrets`) belong together in a sub-feature named for the
34
+ thing (`secrets/`), not spread across a flat feature.
35
+ - **A reactor belongs with the facts it reacts to.** An automation that retires a secret after it was
36
+ revoked lives in `secrets/`, not in a folder named for the third party it calls (`ory/`). A third
37
+ party is an integration detail of the sub-feature, not a feature of its own; put its
38
+ behaviour, adapter and stand-in in the sub-feature (or a shared folder when several use it).
39
+ - **Mirror the lifecycle.** Slices that detect, adopt and revert one kind of drift sit together.
40
+ - **A reactor and a view are slices too.** A reactor that records nothing is invisible in the event model.
41
+ Have it record the fact that its effect happened (`SecretRetiredInOry`), so the automation shows
42
+ what it produced.
43
+
44
+ The folder is the namespace: `Prism.Access.ApiCredentials.Secrets.RotatingSecrets` is the slice
45
+ `RotatingSecrets` of the sub-feature `Secrets`. Arc's structure and event model show each
46
+ sub-feature as a feature of its own, so the grouping is what readers and tools see. Keep
47
+ `segments_to_skip` equal to the segments above the module.
48
+
49
+ ### Name things by their ids
50
+
51
+ A command is `use Cratis.Arc.Command, id: "rotate-secret"`, an event type has an `id:`, a reactor has an
52
+ `id:` and a read model may have one. That id is the name: Arc shows `RotateSecret` in the structure and
53
+ the event model (`display_names:` on the Arc application picks `:pascal_case`, `:kebab_case`, `:as_declared`
54
+ or a function), so never rely on the last module segment as the name.
55
+
27
56
  Organize by feature, not by layer: the Elixir, the generated proxies and the React page of
28
57
  one feature share a folder. This matches the .NET guidance.
29
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.189.1",
3
+ "version": "7.189.2",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [