@cratis/pi 7.189.0 → 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.
- package/package/corpus/harnesses/copilot/instructions/operational-safety.instructions.md +1 -1
- package/package/corpus/rules/operational-safety.md +1 -1
- package/package/corpus/skills/cratis-arc-elixir/references/proxies-and-vertical-slices.md +29 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +1 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/publication-and-recovery.md +5 -2
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ All are **[contract]** ([general.md](../../../rules/general.md)): policy, not en
|
|
|
17
17
|
never authorizes a regex or text-edit bypass.
|
|
18
18
|
- **[contract] `render --force` needs approval for that effect and resolved destination.** Approval for one
|
|
19
19
|
target is not approval for another. Never force past changed or unreadable stored event identities.
|
|
20
|
-
- **[contract] Never stage `.cratis-render/`.**
|
|
20
|
+
- **[contract] Never stage `.cratis-render/`.** CLI v3.149.1+ self-ignores it; `git add -f` overrides, `git rm -r --cached .cratis-render` undoes. Recover by re-running render, not editing.
|
|
21
21
|
- **[contract] Unattended `prologue interpret` uses `--no-llm`** unless the brief records approved disclosure.
|
|
22
22
|
Missing or unknown context is not approval.
|
|
23
23
|
|
|
@@ -16,7 +16,7 @@ All are **[contract]** ([general.md](./general.md)): policy, not enforcement or
|
|
|
16
16
|
never authorizes a regex or text-edit bypass.
|
|
17
17
|
- **[contract] `render --force` needs approval for that effect and resolved destination.** Approval for one
|
|
18
18
|
target is not approval for another. Never force past changed or unreadable stored event identities.
|
|
19
|
-
- **[contract] Never stage `.cratis-render/`.**
|
|
19
|
+
- **[contract] Never stage `.cratis-render/`.** CLI v3.149.1+ self-ignores it; `git add -f` overrides, `git rm -r --cached .cratis-render` undoes. Recover by re-running render, not editing.
|
|
20
20
|
- **[contract] Unattended `prologue interpret` uses `--no-llm`** unless the brief records approved disclosure.
|
|
21
21
|
Missing or unknown context is not approval.
|
|
22
22
|
|
|
@@ -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
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| `.play` text edits in the model root that leave catalog addresses and document mappings unchanged (or any text edit when no `identities.json` exists) | allowed within the brief | policy |
|
|
6
6
|
| the `screenplay` server's `apply` tool, recovery; catalog-changing and identity-affecting edits | the identity owner applies; approval naming the target | policy (the harness may also gate the tool) |
|
|
7
7
|
| `cratis screenplay generate` | output only under `.ai-work/screenplay/<model-slug>/legacy/` | policy |
|
|
8
|
-
| `cratis render` | probe renders under `.ai-work/screenplay/<model-slug>/render-probe/` unless the user names a destination; `--force` needs approval naming it; pass `--name`; never stage `.cratis-render/` | policy |
|
|
8
|
+
| `cratis render` | probe renders under `.ai-work/screenplay/<model-slug>/render-probe/` unless the user names a destination; `--force` needs approval naming it; pass `--name`; never stage `.cratis-render/` (the CLI makes it ignore itself; `git add -f` is the deliberate override, `git rm -r --cached .cratis-render` fixes a mistake; recover a leftover folder by re-running render, not editing it) | policy |
|
|
9
9
|
| Prologue capture start, Extractor containers, traffic re-routing, load, cleanup DDL | approval naming the target; production needs the data owner's sign-off; plan cleanup first | policy |
|
|
10
10
|
| Prologue interpret | approval; it may fall back to a globally configured LLM, so check the effective configuration first | policy |
|
|
11
11
|
| Sending captures, code, production data, personal data or secrets to any hosted model | ask first; prefer redacted or local | policy |
|
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Ownership is the destination's `.cratis-render.json` manifest: semantic revision,
|
|
7
7
|
identity, path and SHA-256 per artifact, not in-file markers. Interrupted commits
|
|
8
|
-
are journaled in `.cratis-render/` (journal, staging, backups).
|
|
9
|
-
control directory
|
|
8
|
+
are journaled in `.cratis-render/` (journal, staging, backups). The CLI writes a `*` `.gitignore` inside it, so `git add .` and
|
|
9
|
+
`git add -A` skip it. Still never stage that control directory (`git add -f` is the
|
|
10
|
+
deliberate override; `git rm -r --cached .cratis-render` removes files tracked by
|
|
11
|
+
mistake); commit the manifest with generated output. Recover a leftover folder from an
|
|
12
|
+
interrupted publish by re-running render, not by editing it.
|
|
10
13
|
|
|
11
14
|
- An unmanaged file at a planned path is refused, even with `--force`.
|
|
12
15
|
- A modified managed file is refused unless still active and `--force` is given.
|