@cratis/pi 7.76.0 → 7.78.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.
@@ -30,6 +30,8 @@ Use portable fields: `name`, `description`, `license`, `compatibility`, `metadat
30
30
 
31
31
  An explicit trigger clause (`Use when`, `Load when`, `Read when` or an equivalent) and neutral voice are required even with `SKILL_AUTHORING_MODE=warn`. Negative routing and meta-language findings follow that switch; the 700-character target is guidance, not a gate.
32
32
 
33
+ The overlap lint warns when positive trigger token sets have Jaccard similarity (intersection / union) **>= 0.4**, compared before rounding. It lowercases ASCII word tokens, deduplicates them and removes routing boilerplate and common function words. Only the explicit `Use when` (or equivalent) clause counts, stopping at negative routing; empty triggers never match. The warning stays advisory even in strict mode: shared vocabulary is a review signal, not proof of competing scope. Sharpen the trigger and add a sibling pointer rather than padding it with unrelated words.
34
+
33
35
  ## 3. Budget and progressive disclosure
34
36
 
35
37
  Target at most 400 body lines and 16,000 characters; the hard limits remain 500 lines and 20,000 characters. A warning starts above the 16,000-character target, so a body that outgrows it is split before it nears the hard limit; characters only approximate tokens.
@@ -41,5 +41,9 @@ Levels of Authority in [`general.md`](../../../rules/general.md).
41
41
  - **[contract] Absent authority for a consequential effect, stop and ask about that
42
42
  effect in plain language.** State the exact target, action, consequence, and recovery;
43
43
  a missing answer is a blocker for that effect, not for unrelated in-scope work.
44
+ - **[contract] Never copy secrets or personal values into models, notes, state,
45
+ packets or briefs.** Never use real credentials or personal data in examples.
46
+ - **[contract] Legacy extraction uses Git read-only:** never checkout, reset or stash
47
+ the legacy repository; do not touch a live checkout the brief excludes.
44
48
  - **[convention] Prefer the narrowest capability that does the job.** Reaching for the
45
49
  broadest available grant makes the next reader assume it was authorized.
@@ -68,6 +68,8 @@ Migrations are created and applied with the **standard EF Core tooling** (`dotne
68
68
  | `table.JsonColumn<TProperty>(migrationBuilder, …)` | a `[Json]`-mapped property |
69
69
  | `migrationBuilder.Add{String,Guid,Number,Bool,DateTimeOffset,AutoIncrement,Json,Point,LineString,Polygon}Column(…)` | adding a column to an existing table |
70
70
 
71
+ A migration that is committed or applied to any database is append-only: never edit or delete it. Correct mistakes with a new migration. Only an unapplied, uncommitted migration may be removed with `dotnet ef migrations remove` and regenerated.
72
+
71
73
  Where a repository organizes its migrations (a dedicated project, a versioned file naming scheme, a table-name constants class) is its own convention: follow what the repository already does, and do not introduce one as if Arc required it.
72
74
 
73
75
  ## Concepts and JSON **[contract]**
@@ -29,6 +29,8 @@ Use portable fields: `name`, `description`, `license`, `compatibility`, `metadat
29
29
 
30
30
  An explicit trigger clause (`Use when`, `Load when`, `Read when` or an equivalent) and neutral voice are required even with `SKILL_AUTHORING_MODE=warn`. Negative routing and meta-language findings follow that switch; the 700-character target is guidance, not a gate.
31
31
 
32
+ The overlap lint warns when positive trigger token sets have Jaccard similarity (intersection / union) **>= 0.4**, compared before rounding. It lowercases ASCII word tokens, deduplicates them and removes routing boilerplate and common function words. Only the explicit `Use when` (or equivalent) clause counts, stopping at negative routing; empty triggers never match. The warning stays advisory even in strict mode: shared vocabulary is a review signal, not proof of competing scope. Sharpen the trigger and add a sibling pointer rather than padding it with unrelated words.
33
+
32
34
  ## 3. Budget and progressive disclosure
33
35
 
34
36
  Target at most 400 body lines and 16,000 characters; the hard limits remain 500 lines and 20,000 characters. A warning starts above the 16,000-character target, so a body that outgrows it is split before it nears the hard limit; characters only approximate tokens.
@@ -40,5 +40,9 @@ Levels of Authority in [`general.md`](./general.md).
40
40
  - **[contract] Absent authority for a consequential effect, stop and ask about that
41
41
  effect in plain language.** State the exact target, action, consequence, and recovery;
42
42
  a missing answer is a blocker for that effect, not for unrelated in-scope work.
43
+ - **[contract] Never copy secrets or personal values into models, notes, state,
44
+ packets or briefs.** Never use real credentials or personal data in examples.
45
+ - **[contract] Legacy extraction uses Git read-only:** never checkout, reset or stash
46
+ the legacy repository; do not touch a live checkout the brief excludes.
43
47
  - **[convention] Prefer the narrowest capability that does the job.** Reaching for the
44
48
  broadest available grant makes the next reader assume it was authorized.
@@ -67,6 +67,8 @@ Migrations are created and applied with the **standard EF Core tooling** (`dotne
67
67
  | `table.JsonColumn<TProperty>(migrationBuilder, …)` | a `[Json]`-mapped property |
68
68
  | `migrationBuilder.Add{String,Guid,Number,Bool,DateTimeOffset,AutoIncrement,Json,Point,LineString,Polygon}Column(…)` | adding a column to an existing table |
69
69
 
70
+ A migration that is committed or applied to any database is append-only: never edit or delete it. Correct mistakes with a new migration. Only an unapplied, uncommitted migration may be removed with `dotnet ef migrations remove` and regenerated.
71
+
70
72
  Where a repository organizes its migrations (a dedicated project, a versioned file naming scheme, a table-name constants class) is its own convention: follow what the repository already does, and do not introduce one as if Arc required it.
71
73
 
72
74
  ## Concepts and JSON **[contract]**
@@ -167,6 +167,7 @@ A claim is only as good as the signal behind it — a build result, a test run,
167
167
  ## Source-of-Truth Discipline
168
168
 
169
169
  - **Rules define invariants; skills define workflows.** A skill may refine how to apply a rule but must not contradict it. On conflict, follow the stricter invariant and fix the stale artifact.
170
+ - The user's instructions take precedence over guidelines provided in a skill. This does not override safety rules or hooks; skills must still follow rules.
170
171
  - **Skills and rules are the authoritative answer.** If not answered there, ask. Don't infer Cratis behavior from package internals.
171
172
  - Only make high-confidence suggestions.
172
173
  - When a user asks how to get help, has a question not answered by the docs, or wants to discuss design, point them to the [Cratis Discord](https://discord.gg/kt4AMpV8WV); direct confirmed bugs to GitHub issues.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-application-react-specifications
3
- description: Write specifications for the React and TypeScript surface of a Cratis application slice — view models, helpers, command orchestration, and narrow component behavior — using Vitest with Mocha-style describe/it, Sinon, and the Chai should interface. Use when adding or changing frontend behavior in an application that consumes Cratis. Do not use for backend scenarios or for specifications inside a Cratis framework package.
3
+ description: Write specifications for the React and TypeScript surface of a Cratis application slice — view models, helpers, command orchestration, and narrow component behavior — using Vitest with Mocha-style describe/it, Sinon, and the Chai should interface. Use when specifying React view-model decisions, frontend command orchestration or narrow component interactions with Vitest, Sinon and Chai. Do not use for backend pipeline scenarios (use cratis-application-slice-specifications) or framework package specs (use cratis-specifications-typescript).
4
4
  license: MIT
5
5
  metadata:
6
6
  cratis-hint-paths: "**/for_*/**/*.ts **/for_*/**/*.tsx"
@@ -12,9 +12,9 @@ Frontend specifications are specifications, not tests. The `for_ / when_ / and_`
12
12
  shape is deliberately the same BDD language as the backend, so one subject, one
13
13
  context, clear setup, and small assertions read as sentences.
14
14
 
15
- This is the **application** frontend peer of the backend slice specification
16
- skill. Specifications for a Cratis framework package (`@cratis/*`) follow that
17
- repository's own TypeScript specification conventions instead.
15
+ This is the **application** frontend peer of `cratis-application-slice-specifications`
16
+ for backend pipeline scenarios. Framework package (`@cratis/*`) specifications
17
+ use `cratis-specifications-typescript` and the repository's conventions instead.
18
18
 
19
19
  ## Stack
20
20
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-application-slice-specifications
3
- description: Specify the backend behavior of an event-sourced Cratis application slice — plain-call specs for pure decisions, plus CommandScenario, EventScenario, ReadModelScenario and ReactorScenario where the pipeline, validation, constraints or projections matter — including what to cover for each slice type and where the specification files live. Use when adding or changing backend behavior in an application built on Cratis. Do not use for framework library specifications and do not use for frontend behavior.
3
+ description: Specify the backend behavior of an event-sourced Cratis application slice — plain-call specs for pure decisions, plus CommandScenario, EventScenario, ReadModelScenario and ReactorScenario where the pipeline, validation, constraints or projections matter — including what to cover for each slice type and where the specification files live. Use when choosing backend plain-call coverage versus CommandScenario, EventScenario, ReadModelScenario or ReactorScenario for an event-sourced slice. Do not use for frontend interactions (use cratis-application-react-specifications) or framework unit-spec mechanics (use cratis-specifications-csharp).
4
4
  license: MIT
5
5
  metadata:
6
6
  cratis-hint-paths: "**/when_*/**/*.cs **/for_*/**/*.cs"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-arc-command-validation
3
- description: Add a rejection rule to an existing Arc command — choosing between ConceptValidator, CommandValidator, a short-circuiting Provide, and a read-model-injected Handle returning a Result of either the event or a ValidationResult. Use when a command must refuse work under some condition. Do not use to define a new command, and do not use for append-time Chronicle constraints.
3
+ description: Add a rejection rule to an existing Arc command — choosing between ConceptValidator, CommandValidator, a short-circuiting Provide, and a read-model-injected Handle returning a Result of either the event or a ValidationResult. Use when placing a C# business rejection in ConceptValidator, CommandValidator, Provide() or a Handle() result containing ValidationResult. Do not use for JVM validators (use cratis-arc-validation-kotlin), Node.js ruleFor (use cratis-arc-validation-typescript), new commands (use cratis-arc-command), or append-time uniqueness (use cratis-chronicle-event-constraints).
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-arc-query-kotlin
3
- description: Add a query to a Cratis Arc @ReadModel in Kotlin or Java — companion-object or static query methods, GET vs RFC QUERY, and observable queries returning Kotlin Flow, JDK Flow.Publisher, or RxJava 3 Observable over SSE and WebSocket. Use when exposing read-model data from a Kotlin or Java Arc application. Do not use for the .NET Arc query shape, for command definition, or for how events populate the read model (Chronicle projections/reducers).
3
+ description: Add a query to a Cratis Arc @ReadModel in Kotlin or Java — companion-object or static query methods, GET vs RFC QUERY, and observable queries returning Kotlin Flow, JDK Flow.Publisher, or RxJava 3 Observable over SSE and WebSocket. Use when exposing JVM @ReadModel companion/static methods through KSP, Kotlin Flow, JDK Publisher or RxJava transports. Do not use for Node.js @query() (use cratis-arc-query-typescript), C# query creation (use cratis-chronicle-read-model), or commands (use cratis-arc-command-kotlin); event materialization belongs to cratis-chronicle-client-kotlin.
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-arc-query-typescript
3
- description: Add a query to a Cratis Arc read model in a Node.js TypeScript server with Arc for TypeScript — the @readModel() class and its static @query() methods, argument/service/queryOptions binding with generated metadata or explicit descriptors, return shapes and absence, GET and the HTTP QUERY method, paging and sorting with queryPage, observable queries backed by RxJS BehaviorSubject/Subject/Observable over SSE and WebSocket, storage-backed queries through MongoDB, Drizzle or ChronicleReadModels, query authorization, and QueryScenario/ObservableQueryScenario specs. Use when exposing read-model data from an Arc for TypeScript server. Do not use for the .NET or Kotlin/Java Arc query shapes, for command definition, for consuming generated query proxies in React, or for how Chronicle events populate the read model.
3
+ description: Expose Arc for TypeScript server reads with argument binding, queryPage paging, storage adapters, authorization and query scenarios. Use when declaring Node.js @readModel()/@query() methods or RxJS observable endpoints over SSE/WebSocket. Do not use for JVM companion/static methods (use cratis-arc-query-kotlin), C# read models (use cratis-chronicle-read-model), server commands (use cratis-arc-command-typescript), React proxy consumption (use cratis-arc-react-page), or event materialization (use cratis-chronicle-client-typescript).
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-arc-validation-kotlin
3
- description: Add a rejection rule to a Cratis Arc command or query in Kotlin or Java — FluentModelValidator shared rules that also emit TypeScript, plus the server-only CommandValidator, QueryValidator, ConceptValidator, and ModelValidator. Use when a Kotlin or Java Arc command or query must refuse work under some condition. Do not use to define a new command or query, and do not use for append-time Chronicle constraints.
3
+ description: Add a rejection rule to a Cratis Arc command or query in Kotlin or Java — FluentModelValidator shared rules that also emit TypeScript, plus the server-only CommandValidator, QueryValidator, ConceptValidator, and ModelValidator. Use when expressing JVM rejection checks with FluentModelValidator or Kotlin/Java server validators for Arc commands and queries. Do not use for C# rejection placement (use cratis-arc-command-validation) or Node.js ruleFor (use cratis-arc-validation-typescript); new command shapes belong to cratis-arc-command-kotlin, append-time uniqueness to cratis-chronicle-event-constraints.
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-arc-validation-typescript
3
- description: Add a rejection rule to a Cratis Arc command or query in a Node.js TypeScript server with Arc for TypeScript — choosing between @field shape, authorization, ConceptValidator, CommandValidator, QueryValidator with an arguments model, ModelValidator, readModelForValidation, and rejected()/denied() from provide() or handle(); the ruleFor vocabulary, which rules are copied into generated proxies, the ValidationResult helpers and validation(), severity filtering and the X-Allowed-Severity cap, and asserting rule failures in @cratis/arc.testing specs. Use when an Arc for TypeScript command or query must refuse work under some condition. Do not use to define a new command or query, for the .NET or Kotlin/Java validation shapes, or for append-time Chronicle constraints and concurrency.
3
+ description: Add rejection checks to Arc for TypeScript servers, including proxy-safe rules and severity filtering. Use when authoring Node.js ruleFor chains, readModelForValidation checks or rejected()/denied() outcomes in provide()/handle(), and asserting them with @cratis/arc.testing. Do not use for C# validation (use cratis-arc-command-validation), JVM FluentModelValidator (use cratis-arc-validation-kotlin), new server commands (use cratis-arc-command-typescript), query definitions (use cratis-arc-query-typescript), or append-time uniqueness (use cratis-chronicle-event-constraints).
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-chronicle-client-elixir
3
- description: Talk to a Chronicle server from an Elixir application with the cratis_chronicle Hex package - Chronicle.Client supervision and connection lifecycle, EventType structs, append errors, event sources and streams, Chronicle.Concept, PII and encrypted secrets, reactors, read models/projections with composite keys, children, variants and GlobalHandler, decision reads, in-memory testing, captures, constraints, discovery drift and observer inspection. Use when an OTP application appends to or observes a Chronicle event store. Do not use for the .NET, TypeScript, or Kotlin clients.
3
+ description: Connect Elixir applications to Chronicle with the cratis_chronicle Hex client, including events, projections, reactors, concepts, protected values, decision reads, constraints, captures and testing. Use when wiring Chronicle.Client into an Elixir OTP supervision tree, defining EventType structs, or handling append outcomes with cratis_chronicle. Do not use for JVM clients (use cratis-chronicle-client-kotlin) or Node.js clients (use cratis-chronicle-client-typescript); .NET belongs to cratis-chronicle-client-dotnet.
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-chronicle-client-kotlin
3
- description: Talk to a Chronicle server from a Kotlin or Java application with the io.cratis:chronicle client - connection strings, ChronicleClient and the Spring Boot starter, @EventType classes, suspending append, reactors and reducers dispatched by first-parameter type, model-bound and declarative projections, variants (@VariantOf/@EntersOn/@GlobalFor or variantOf()/entersOn()) for an entity with mutually exclusive lifecycle shapes, classpath artifact discovery, and the blocking API Java uses. Use when building a JVM application that appends to or observes a Chronicle event store. Do not use for the .NET, TypeScript, or Elixir clients, and do not use for Chronicle kernel or Arc work.
3
+ description: Connect Kotlin and Java applications to Chronicle with the standalone client or Spring Boot starter, including events, reactors, reducers, projections and variants. Use when connecting standalone Kotlin coroutines or Java blocking calls to Chronicle through io.cratis:chronicle and classpath discovery. Do not use for Elixir OTP (use cratis-chronicle-client-elixir) or Node.js decorators (use cratis-chronicle-client-typescript); Arc commands belong to cratis-arc-command-kotlin, not this client skill.
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-chronicle-client-typescript
3
- description: Talk to a Chronicle server from a Node.js or TypeScript application with @cratis/chronicle - reflect-metadata and decorator compiler settings, ChronicleClient and connection strings, @eventType classes, eventLog.append, reactors and reducers dispatched by camelCase method name, model-bound and declarative projections, variants (@variantOf/@entersOn/@globalFor or .variantOf()/.entersOn()) for an entity with mutually exclusive lifecycle shapes, glob-based artifact discovery, and the lazy connect and keepalive lifecycle. Use when a Node application appends to or observes a Chronicle event store. Do not use for the .NET, Kotlin, or Elixir clients, and do not use for Arc React frontends or generated Arc proxies.
3
+ description: Connect Node.js applications to Chronicle with @cratis/chronicle, including reflect-metadata, compiler settings, camelCase reactor dispatch, projections, reducers, variants and the lazy-connect lifecycle. Use when configuring @cratis/chronicle decorators, glob discovery or eventLog.append in a standalone Node.js process. Do not use for JVM connections (use cratis-chronicle-client-kotlin), OTP supervision (use cratis-chronicle-client-elixir), or React generated proxies (use cratis-arc-react-page).
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: guiding-refactoring-with-code-health
3
- description: Use when refactoring unhealthy code and needing Code Health findings to choose small safe steps and verify improvement. Only in repositories that opted into the cratis/codescene profile and have CodeScene MCP tools available; otherwise do not use.
3
+ description: Improve unhealthy code incrementally using measured Code Health feedback. Use when planning structural refactoring steps for complexity, size, cohesion or nesting and comparing each step with a baseline. Requires an opted-in cratis/codescene profile and available CodeScene MCP tools; otherwise skip. Do not use for a pre-commit change gate (use safeguarding-ai-generated-code) or portfolio debt ranking (use prioritizing-technical-debt).
4
4
  license: Apache-2.0
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: safeguarding-ai-generated-code
3
- description: Use when AI-generated or AI-modified changes need a Code Health gate before commit, handoff, or pull request. Only in repositories that opted into the cratis/codescene profile and have CodeScene MCP tools available; otherwise do not use.
3
+ description: Gate AI-touched changes against Code Health regressions. Use when reviewing a staged diff or branch before commit, handoff or pull request with pre_commit_code_health_safeguard or analyze_change_set. Requires an opted-in cratis/codescene profile and available CodeScene MCP tools; otherwise skip. Do not use for a structural refactoring workflow (use guiding-refactoring-with-code-health) or risk-based test selection (use risk-based-testing-with-code-health).
4
4
  license: Apache-2.0
5
5
  ---
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.76.0",
3
+ "version": "7.78.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [