@cratis/pi 7.76.0 → 7.77.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.
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +2 -0
- package/package/corpus/harnesses/copilot/instructions/capability-is-not-authority.instructions.md +4 -0
- package/package/corpus/harnesses/copilot/instructions/efcore.instructions.md +2 -0
- package/package/corpus/rules/authoring-skills.md +2 -0
- package/package/corpus/rules/capability-is-not-authority.md +4 -0
- package/package/corpus/rules/efcore.md +2 -0
- package/package/corpus/rules/general.md +1 -0
- package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +4 -4
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-query-kotlin/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-query-typescript/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +1 -1
- package/package/corpus/skills/guiding-refactoring-with-code-health/SKILL.md +1 -1
- package/package/corpus/skills/safeguarding-ai-generated-code/SKILL.md +1 -1
- package/package.json +1 -1
|
@@ -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.
|
package/package/corpus/harnesses/copilot/instructions/capability-is-not-authority.instructions.md
CHANGED
|
@@ -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
|
|
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
|
|
16
|
-
|
|
17
|
-
repository's
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|