@cratis/pi 7.152.0 → 7.152.1

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.
@@ -62,6 +62,7 @@ public class JsonReportFormatter : IReportFormatter { ... }
62
62
  - Prefer strategy interfaces over `switch`/`if-else` chains that grow over time.
63
63
  - Use `IInstancesOf<T>` to discover all implementations by convention — no manual registration needed.
64
64
  - Design public APIs as contracts (interfaces/records) rather than concrete implementations.
65
+ - For a closed set of outcomes, prefer a sealed record hierarchy consumed by an exhaustive `switch`. Use `closed` only on NEW types in net11 code, never on an existing public type.
65
66
 
66
67
  ## Separation of Concerns
67
68
 
@@ -58,6 +58,10 @@ Every rule here reduces noise. `var` avoids redundant type repetition. Expressio
58
58
  - The `Cratis.Architecture.CodeAnalysis` analyzer package (26 diagnostics, `CRARCH0001`–`CRARCH0026`; verified at `v1.0.2`) enforces these and others: `CRARCH0003` postfixes, `0004` `.Features.` namespaces, `0005` regions, `0006`/`0024` `LoggerMessage`, `0007` `IServiceProvider` injection, `0008` `is null`, `0017` namespace matches folder, `0019` `Async` suffix, `0022` explicit `private`, `0023` typed logger category; `0012` (`async void`) and `0014` (test types in production) are errors. When a repository has the package, a `CRARCH` warning is the house convention, not noise.
59
59
  - For types with no implementation body, omit the braces (e.g. `public interface IMyInterface;`).
60
60
  - Prefer `record` types for immutable data structures (events, commands, read models, concepts) — they give you value equality, immutability, and concise syntax for free.
61
+ - Set `LangVersion` to `latest` in every repository. Language-only features of newer C# versions are safe on every target of a multi-targeted library; a new runtime or library API needs `#if NET11_0_OR_GREATER` with a net10 fallback.
62
+ - Use collection expression arguments (`[with(capacity: n), .. items]`, `[with(comparer), ..]`) instead of constructor calls, and labeled `break`/`continue` instead of Boolean flags or `goto` in nested loops (IDE0410).
63
+ - Do not introduce `union` types, runtime-async, or the memory-safety preview features, and do not retrofit `closed` onto an existing public type — a public API change is a major version.
64
+ - Keep IDE style rule severities at `suggestion`, never `warning`: Release builds treat warnings as errors.
61
65
 
62
66
  ## Nullable Reference Types
63
67
 
@@ -61,6 +61,7 @@ public class JsonReportFormatter : IReportFormatter { ... }
61
61
  - Prefer strategy interfaces over `switch`/`if-else` chains that grow over time.
62
62
  - Use `IInstancesOf<T>` to discover all implementations by convention — no manual registration needed.
63
63
  - Design public APIs as contracts (interfaces/records) rather than concrete implementations.
64
+ - For a closed set of outcomes, prefer a sealed record hierarchy consumed by an exhaustive `switch`. Use `closed` only on NEW types in net11 code, never on an existing public type.
64
65
 
65
66
  ## Separation of Concerns
66
67
 
@@ -57,6 +57,10 @@ Every rule here reduces noise. `var` avoids redundant type repetition. Expressio
57
57
  - The `Cratis.Architecture.CodeAnalysis` analyzer package (26 diagnostics, `CRARCH0001`–`CRARCH0026`; verified at `v1.0.2`) enforces these and others: `CRARCH0003` postfixes, `0004` `.Features.` namespaces, `0005` regions, `0006`/`0024` `LoggerMessage`, `0007` `IServiceProvider` injection, `0008` `is null`, `0017` namespace matches folder, `0019` `Async` suffix, `0022` explicit `private`, `0023` typed logger category; `0012` (`async void`) and `0014` (test types in production) are errors. When a repository has the package, a `CRARCH` warning is the house convention, not noise.
58
58
  - For types with no implementation body, omit the braces (e.g. `public interface IMyInterface;`).
59
59
  - Prefer `record` types for immutable data structures (events, commands, read models, concepts) — they give you value equality, immutability, and concise syntax for free.
60
+ - Set `LangVersion` to `latest` in every repository. Language-only features of newer C# versions are safe on every target of a multi-targeted library; a new runtime or library API needs `#if NET11_0_OR_GREATER` with a net10 fallback.
61
+ - Use collection expression arguments (`[with(capacity: n), .. items]`, `[with(comparer), ..]`) instead of constructor calls, and labeled `break`/`continue` instead of Boolean flags or `goto` in nested loops (IDE0410).
62
+ - Do not introduce `union` types, runtime-async, or the memory-safety preview features, and do not retrofit `closed` onto an existing public type — a public API change is a major version.
63
+ - Keep IDE style rule severities at `suggestion`, never `warning`: Release builds treat warnings as errors.
60
64
 
61
65
  ## Nullable Reference Types
62
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.152.0",
3
+ "version": "7.152.1",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [