@cratis/pi 7.191.0 → 7.191.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.
@@ -85,7 +85,7 @@ For an explicitly requested large application scope, adapt this optional numbere
85
85
  1. Create `<AppSourceRoot>/<Module?>/<Feature>/<Slice>/<Slice>.cs` with all backend artifacts. Omit `<Module?>` when no natural domain grouping exists; never introduce a top-level `Features/` wrapper.
86
86
 
87
87
  ### Phase 2 — Specs [delegate to: spec-writer]
88
- 2. Write specs in `<AppSourceRoot>/<Module?>/<Feature>/<Slice>/when_<behavior>/` for every slice type: `Specification` plus a direct call by default for pure decisions; add in-process scenarios only where the pipeline, validation, constraints, projections or wiring contribute proof.
88
+ 2. Start with one Given/When/Then boundary spec per command outcome and per view from the event model in `<AppSourceRoot>/<Module?>/<Feature>/<Slice>/when_<behavior>/`. Use `Specification` plus a direct call by default for pure decisions; add in-process scenarios only where the pipeline, validation, constraints, projections or wiring contribute proof.
89
89
 
90
90
  ### Phase 3 — Build [run: Debug, then Release]
91
91
  3. Run `dotnet build -c Debug` to validate spec code and generate TypeScript proxies.
@@ -3,7 +3,7 @@ name: Spec Writer
3
3
  description: >
4
4
  Specialist for writing C# specs (plain calls and focused in-process scenarios) and
5
5
  TypeScript/React specs for vertical slices. Ensures every slice has
6
- comprehensive behavior coverage following the project's BDD conventions.
6
+ the coverage the criticality tier requires, following the project's BDD conventions.
7
7
  tools:
8
8
  - Read
9
9
  - Grep
@@ -10,30 +10,36 @@ paths:
10
10
 
11
11
  # Criticality tiers
12
12
 
13
- Judgment-shaped: classify by failure consequences, not repository name.
13
+ Classify by failure consequences, not repository name.
14
14
 
15
15
  - **Tier A — Critical:** product runtime, auth/credentials, data integrity/migrations,
16
- production deployment or automation able to disrupt all CI. Require focused
17
- behavior/rejection specs, independent review and security/product CI. Full local gates
18
- run only for changed inputs/dependency closure; reuse valid unchanged-input results.
19
- - **Tier B — Operational but bounded:** internal tooling with limited, recoverable
20
- impact (e.g. ordinary runner management). Require bounded smoke/regression checks
21
- for meaningful behavior; review elevated permissions, broad impact or the escalation
22
- below. No unrelated product gate; Code Health only for maintained, non-disposable code.
16
+ production deployment or automation that can disrupt all CI. Require focused
17
+ behavior/rejection specs, independent review and security/product CI. Run full local
18
+ gates for changed inputs and their dependencies; reuse valid unchanged-input results.
19
+ - **Tier B — Operational but bounded:** internal tools with limited, recoverable impact
20
+ (e.g. runner management). Smoke/regression-test meaningful behavior; review elevated
21
+ permissions, broad impact or escalation below. No unrelated product gate; Code Health
22
+ only for maintained, non-disposable code.
23
23
  - **Tier C — Disposable or advisory:** noncritical dashboards, reports, local helpers,
24
- demos/samples, experiments, prose and corpus style checks. No mandatory new specs,
25
- review/artifacts, Code Health scoring/uplift or full local gate. Smoke checks are
26
- optional absent specific failure risk; cheap checks may remain, cosmetics are advisory.
27
-
28
- A change in any tier that touches credentials or secrets, authentication or authorization,
29
- workflow permissions or untrusted-PR triggers (`pull_request_target`, `workflow_run`,
30
- forked-PR inputs), data exposure, a trust boundary, or a destructive or irreversible action
31
- is Tier A for that part and needs independent review, whatever the tool's tier.
32
- Critical subcomponents inherit Tier A; unknown critical dependencies fail closed to
33
- the higher tier. Narrow fixes need no unrelated legacy uplift. No artifacts needed
34
- to claim a tier.
35
-
36
- Security, secrets, authorization, destructive-action safeguards and required CI
37
- status-check contracts remain binding. Irrelevant CI execution must report explicit
38
- success/not-applicable rather than leave a required check pending; preserve required
24
+ samples, experiments, prose and style checks. No mandatory new specs, review/artifacts,
25
+ Code Health scoring/uplift or full local gate. Smoke checks are optional absent a
26
+ specific failure risk; cheap checks may stay. Cosmetics are advisory.
27
+
28
+ Credentials, secrets, authentication, authorization, workflow permissions, untrusted PRs
29
+ (`pull_request_target`, `workflow_run`, forked-PR inputs), data exposure, trust boundaries,
30
+ and destructive or irreversible actions escalate the affected part to Tier A with
31
+ independent review. Critical subcomponents inherit Tier A; unknown critical dependencies
32
+ fail closed to the higher tier. No unrelated legacy uplift or tier artifacts.
33
+
34
+ Security, secrets, authorization, destructive-action and required CI contracts remain
35
+ binding. Irrelevant CI checks report success/not-applicable, not pending. Keep required
39
36
  product/integration coverage until a validated narrower replacement exists.
37
+
38
+ ## Always kept, at every tier
39
+
40
+ - Security and authorization checks
41
+ - Secret redaction checks
42
+ - Data integrity and migration checks
43
+ - Event schema compatibility, upcasting, replay, and projection idempotency checks
44
+ - Published contract tests (public APIs, wire formats, generated proxies)
45
+ - Runner cost guards
@@ -17,10 +17,21 @@ This philosophy comes from Specification by Example and BDD (Behavior Driven Dev
17
17
 
18
18
  ## Core Philosophy
19
19
 
20
- - **Specify behaviors, not implementations.** A spec should verify what a method *promises from its signature* — its contract with callers. If the implementation changes but the contract holds, specs should still pass. When they don't, the spec was testing the wrong thing.
21
- - **One behavior, one spec.** Every public method that performs an action gets its own `when_` folder or file. Never bundle multiple behaviors into one spec — it obscures what broke and why.
20
+ - **Specify behaviors, not implementations.** Verify the contract with callers. If the implementation changes but the contract holds, specs should still pass. When they don't, the spec was testing the wrong thing.
21
+ - **Specify distinct caller-visible promises and consequential failures, not methods.** Extend or parameterize a spec when setup and contract are shared. A new method, adapter, or input value alone does not require a spec file.
22
22
  - **Specs are documentation first.** The folder tree, class names, and `should_` assertions form a specification anyone can read. Optimize for readability over DRY. A little repetition in setup is fine if it makes the spec self-contained and clear.
23
- - **Do not test logging** — it is too fragile and provides no value. Don't test simple delegation or trivial getters either. The cost of maintaining these specs exceeds the value they provide.
23
+ - **Do not test logging** — ordinary diagnostic messages are too fragile. This never overrides audit or redaction checks. Don't test simple delegation or trivial getters either. The cost of maintaining these specs exceeds the value they provide.
24
+
25
+ ## Design for removal
26
+
27
+ A vertical slice is the unit of deletion. From the event model, start with one
28
+ Given/When/Then boundary spec per command outcome and per view. This is a starting
29
+ point, not a cap. Do not assert prose, file layout, or third-party markup. Mock only
30
+ costly, dangerous, or nondeterministic boundaries.
31
+
32
+ Before deleting a slice, check dependencies. Delete its private implementation
33
+ and specs with it only after that check. Keep event types, upcasters and historical
34
+ readers, replay fixtures, audit and redaction checks, and durable contract tests.
24
35
 
25
36
  ## Folder & File Structure
26
37
 
@@ -88,9 +99,9 @@ A sub-folder under `when_` is only needed when that condition has its **own** mu
88
99
  The goal is to cover *decisions and transformations* — code where bugs hide. Simple plumbing that the compiler already validates is noise.
89
100
 
90
101
  **Write specs for:**
91
- - Public methods that perform actions (behaviors)
92
- - Methods with branching logic or business rules
93
- - Methods that coordinate between dependencies
102
+ - Caller-visible outcomes and consequential failures
103
+ - Decisions and transformations that enforce business rules
104
+ - Observable behavior that depends on wiring or coordination
94
105
 
95
106
  **Do NOT write specs for:**
96
107
  - Simple auto-properties (`public string Name { get; set; }`)
@@ -81,7 +81,7 @@ For an explicitly requested large application scope, adapt this optional numbere
81
81
  1. Create `<AppSourceRoot>/<Module?>/<Feature>/<Slice>/<Slice>.cs` with all backend artifacts. Omit `<Module?>` when no natural domain grouping exists; never introduce a top-level `Features/` wrapper.
82
82
 
83
83
  ### Phase 2 — Specs [delegate to: spec-writer]
84
- 2. Write specs in `<AppSourceRoot>/<Module?>/<Feature>/<Slice>/when_<behavior>/` for every slice type: `Specification` plus a direct call by default for pure decisions; add in-process scenarios only where the pipeline, validation, constraints, projections or wiring contribute proof.
84
+ 2. Start with one Given/When/Then boundary spec per command outcome and per view from the event model in `<AppSourceRoot>/<Module?>/<Feature>/<Slice>/when_<behavior>/`. Use `Specification` plus a direct call by default for pure decisions; add in-process scenarios only where the pipeline, validation, constraints, projections or wiring contribute proof.
85
85
 
86
86
  ### Phase 3 — Build [run: Debug, then Release]
87
87
  3. Run `dotnet build -c Debug` to validate spec code and generate TypeScript proxies.
@@ -3,7 +3,7 @@ name: Spec Writer
3
3
  description: >
4
4
  Specialist for writing C# specs (plain calls and focused in-process scenarios) and
5
5
  TypeScript/React specs for vertical slices. Ensures every slice has
6
- comprehensive behavior coverage following the project's BDD conventions.
6
+ the coverage the criticality tier requires, following the project's BDD conventions.
7
7
  tools: read, grep, find, bash, edit, write
8
8
  modelTier: scoped
9
9
  ---
@@ -9,30 +9,36 @@ paths:
9
9
 
10
10
  # Criticality tiers
11
11
 
12
- Judgment-shaped: classify by failure consequences, not repository name.
12
+ Classify by failure consequences, not repository name.
13
13
 
14
14
  - **Tier A — Critical:** product runtime, auth/credentials, data integrity/migrations,
15
- production deployment or automation able to disrupt all CI. Require focused
16
- behavior/rejection specs, independent review and security/product CI. Full local gates
17
- run only for changed inputs/dependency closure; reuse valid unchanged-input results.
18
- - **Tier B — Operational but bounded:** internal tooling with limited, recoverable
19
- impact (e.g. ordinary runner management). Require bounded smoke/regression checks
20
- for meaningful behavior; review elevated permissions, broad impact or the escalation
21
- below. No unrelated product gate; Code Health only for maintained, non-disposable code.
15
+ production deployment or automation that can disrupt all CI. Require focused
16
+ behavior/rejection specs, independent review and security/product CI. Run full local
17
+ gates for changed inputs and their dependencies; reuse valid unchanged-input results.
18
+ - **Tier B — Operational but bounded:** internal tools with limited, recoverable impact
19
+ (e.g. runner management). Smoke/regression-test meaningful behavior; review elevated
20
+ permissions, broad impact or escalation below. No unrelated product gate; Code Health
21
+ only for maintained, non-disposable code.
22
22
  - **Tier C — Disposable or advisory:** noncritical dashboards, reports, local helpers,
23
- demos/samples, experiments, prose and corpus style checks. No mandatory new specs,
24
- review/artifacts, Code Health scoring/uplift or full local gate. Smoke checks are
25
- optional absent specific failure risk; cheap checks may remain, cosmetics are advisory.
26
-
27
- A change in any tier that touches credentials or secrets, authentication or authorization,
28
- workflow permissions or untrusted-PR triggers (`pull_request_target`, `workflow_run`,
29
- forked-PR inputs), data exposure, a trust boundary, or a destructive or irreversible action
30
- is Tier A for that part and needs independent review, whatever the tool's tier.
31
- Critical subcomponents inherit Tier A; unknown critical dependencies fail closed to
32
- the higher tier. Narrow fixes need no unrelated legacy uplift. No artifacts needed
33
- to claim a tier.
34
-
35
- Security, secrets, authorization, destructive-action safeguards and required CI
36
- status-check contracts remain binding. Irrelevant CI execution must report explicit
37
- success/not-applicable rather than leave a required check pending; preserve required
23
+ samples, experiments, prose and style checks. No mandatory new specs, review/artifacts,
24
+ Code Health scoring/uplift or full local gate. Smoke checks are optional absent a
25
+ specific failure risk; cheap checks may stay. Cosmetics are advisory.
26
+
27
+ Credentials, secrets, authentication, authorization, workflow permissions, untrusted PRs
28
+ (`pull_request_target`, `workflow_run`, forked-PR inputs), data exposure, trust boundaries,
29
+ and destructive or irreversible actions escalate the affected part to Tier A with
30
+ independent review. Critical subcomponents inherit Tier A; unknown critical dependencies
31
+ fail closed to the higher tier. No unrelated legacy uplift or tier artifacts.
32
+
33
+ Security, secrets, authorization, destructive-action and required CI contracts remain
34
+ binding. Irrelevant CI checks report success/not-applicable, not pending. Keep required
38
35
  product/integration coverage until a validated narrower replacement exists.
36
+
37
+ ## Always kept, at every tier
38
+
39
+ - Security and authorization checks
40
+ - Secret redaction checks
41
+ - Data integrity and migration checks
42
+ - Event schema compatibility, upcasting, replay, and projection idempotency checks
43
+ - Published contract tests (public APIs, wire formats, generated proxies)
44
+ - Runner cost guards
@@ -16,10 +16,21 @@ This philosophy comes from Specification by Example and BDD (Behavior Driven Dev
16
16
 
17
17
  ## Core Philosophy
18
18
 
19
- - **Specify behaviors, not implementations.** A spec should verify what a method *promises from its signature* — its contract with callers. If the implementation changes but the contract holds, specs should still pass. When they don't, the spec was testing the wrong thing.
20
- - **One behavior, one spec.** Every public method that performs an action gets its own `when_` folder or file. Never bundle multiple behaviors into one spec — it obscures what broke and why.
19
+ - **Specify behaviors, not implementations.** Verify the contract with callers. If the implementation changes but the contract holds, specs should still pass. When they don't, the spec was testing the wrong thing.
20
+ - **Specify distinct caller-visible promises and consequential failures, not methods.** Extend or parameterize a spec when setup and contract are shared. A new method, adapter, or input value alone does not require a spec file.
21
21
  - **Specs are documentation first.** The folder tree, class names, and `should_` assertions form a specification anyone can read. Optimize for readability over DRY. A little repetition in setup is fine if it makes the spec self-contained and clear.
22
- - **Do not test logging** — it is too fragile and provides no value. Don't test simple delegation or trivial getters either. The cost of maintaining these specs exceeds the value they provide.
22
+ - **Do not test logging** — ordinary diagnostic messages are too fragile. This never overrides audit or redaction checks. Don't test simple delegation or trivial getters either. The cost of maintaining these specs exceeds the value they provide.
23
+
24
+ ## Design for removal
25
+
26
+ A vertical slice is the unit of deletion. From the event model, start with one
27
+ Given/When/Then boundary spec per command outcome and per view. This is a starting
28
+ point, not a cap. Do not assert prose, file layout, or third-party markup. Mock only
29
+ costly, dangerous, or nondeterministic boundaries.
30
+
31
+ Before deleting a slice, check dependencies. Delete its private implementation
32
+ and specs with it only after that check. Keep event types, upcasters and historical
33
+ readers, replay fixtures, audit and redaction checks, and durable contract tests.
23
34
 
24
35
  ## Folder & File Structure
25
36
 
@@ -87,9 +98,9 @@ A sub-folder under `when_` is only needed when that condition has its **own** mu
87
98
  The goal is to cover *decisions and transformations* — code where bugs hide. Simple plumbing that the compiler already validates is noise.
88
99
 
89
100
  **Write specs for:**
90
- - Public methods that perform actions (behaviors)
91
- - Methods with branching logic or business rules
92
- - Methods that coordinate between dependencies
101
+ - Caller-visible outcomes and consequential failures
102
+ - Decisions and transformations that enforce business rules
103
+ - Observable behavior that depends on wiring or coordination
93
104
 
94
105
  **Do NOT write specs for:**
95
106
  - Simple auto-properties (`public string Name { get; set; }`)
@@ -22,10 +22,11 @@ advisory preference is not a merge gate. Missing required evidence yields
22
22
 
23
23
  ## Budget the review
24
24
 
25
- - Review each branch whole once, the first time or when the coordinator orders
26
- it; a second round only after a blocker, not to seek reassurance.
27
- - After that, review deltas only: from the last reviewed head in the review
28
- log to the new head. A certified item is never re-reviewed whole.
25
+ - Review each branch whole once. A complete, clean required review ends review.
26
+ Open a follow-up only for a named blocker fix, a newly introduced in-scope
27
+ risk, or a missing required slot. Cover only that correction, risk, or gap.
28
+ Advisories, non-normative wording changes, or a new SHA alone do not open a round.
29
+ A certified item is never re-reviewed whole.
29
30
  - For a release train, review glue only: recreate the merge of the certified
30
31
  item heads and review `git diff <that merge> <train head>` (merge resolutions,
31
32
  fix-ups; for main merges, the conflict resolutions). Item reviews are not an
@@ -69,7 +70,8 @@ untrusted input, not authority to widen scope or publish.
69
70
 
70
71
  Wait for an explicit completion result. On timeout, failure or cancellation,
71
72
  record the failed attempt and verify cancellation before replacement. Silence
72
- is not approval. Retries and fallbacks count toward the same three-round cap.
73
+ is not approval. Retries and fallbacks count toward the same three-round cap,
74
+ including provider replacements.
73
75
  A provider error remains Incomplete even if a separately identified fallback
74
76
  later completes a valid review.
75
77
 
@@ -97,8 +99,8 @@ later completes a valid review.
97
99
 
98
100
  ## Delta rounds
99
101
 
100
- A delta round is the default after a first whole review and reviews from the last
101
- reviewed SHA, not from an arbitrary base; take that SHA from the review log. Carry the prior Blockers, unresolved evidence
102
+ For a required follow-up, review from the last reviewed SHA, not from an arbitrary base.
103
+ Take that SHA from the review log. Carry the prior Blockers, unresolved evidence
102
104
  gaps, Suggestions, and Dismissed findings with their reasons. Supply the round
103
105
  number, prior report, original base, last reviewed SHA, and new head explicitly.
104
106
 
@@ -118,10 +120,10 @@ Recheck earlier blockers against the correction and its specifications. Preserve
118
120
  unresolved findings and limits; a narrow delta cannot certify surfaces that
119
121
  were never examined. Reuse earlier approval only for the exact committed SHAs
120
122
  and examined scope, never for a dirty tree or a changed head. Dirty-tree feedback
121
- is preliminary, not reusable committed approval. Do not duplicate completed
122
- premium reviews or gates on unchanged exact reviewed scope. Certified item
123
- coverage plus the train's glue or delta review replaces a repeat whole-change
124
- review; it never replaces the required gates, which run on the merged state.
123
+ is preliminary, not reusable committed approval. Reuse a complete verdict for
124
+ identical scope and unchanged inputs; do not duplicate completed reviews or gates.
125
+ Certified item coverage plus the train's glue or delta review replaces a repeat
126
+ whole-change review; it never replaces the required gates, which run on the merged state.
125
127
 
126
128
  Do not start a follow-up round for advisory findings alone. Fix them only when
127
129
  cheap in an existing correction pass; otherwise leave them as Suggestions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.191.0",
3
+ "version": "7.191.2",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [