@protoyard/blueprint 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/README.md +28 -32
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -36,7 +36,7 @@ regeneration, drift checks) is in [docs/GENERATOR.md](../../docs/GENERATOR.md).
36
36
  | sqlite-schema | bounded SQLite `CREATE TABLE` DDL inference into reviewable entity drafts | `./import/sqlite-schema` (lazy authoring) |
37
37
  | generator | deterministic worlds (`ctx.rng`, `ctx.faker`, `ctx.ids`, `ctx.time`) | `./generator` (lazy) |
38
38
  | search | ranked, policy-filtered record search across `searchable` fields (the CRUD search palette) | `./search` |
39
- | identity | content sha256 and `bp-…` storage namespace (`blueprintIdentity`); every shipped blueprint's identity is frozen in `tests/fixtures/identity-golden.json` | `.` |
39
+ | identity | content sha256 and `bp-…` storage namespace (`blueprintIdentity`); `tests/migrations.test.ts` pins the identity of representative content | `.` |
40
40
  | deck authoring lint | structural diagnostics for slide ids, layout props, outline order, fragments and internal links | `.` |
41
41
 
42
42
  ## The schema
@@ -111,7 +111,7 @@ checks:
111
111
  - every `#fragment` link points at a block id in the doc.
112
112
 
113
113
  Fixtures: `tests/fixtures/kinds/landing.page.json` and `tests/fixtures/kinds/quarterly-report.doc.json`
114
- (`pnpm vitest run packages/blueprint/tests/kinds/page-doc.test.ts`).
114
+ (parsed by `tests/kinds/envelope.test.ts` and `tests/kinds/security.test.ts`).
115
115
 
116
116
  Deck bodies validate unique slide ids, outline references, known layout ids, catalog props and
117
117
  bounded step markers. The layout catalog validates props after temporarily removing animation
@@ -253,11 +253,11 @@ regeneration loop.
253
253
  }
254
254
  ```
255
255
 
256
- The integration contract is checked against each kit's public package export map in
257
- `tests/archetypes/kit-contract.test.ts`: AI archetypes target the AI engine and workspace,
258
- SaaS onboarding uses `saasRoutes`' lazy loader, and analytics selects only the grid and
259
- date-range UI subpaths it declares. The test also checks their callback and simulation
260
- contracts. The blueprint package keeps kit names as validated data and does not depend on
256
+ The integration contract: AI archetypes target the AI engine and workspace, SaaS onboarding
257
+ uses `saasRoutes`' lazy loader, and analytics selects only the grid and date-range UI subpaths
258
+ it declares. The test that checked it against each kit's export map (`kit-contract.test.ts`)
259
+ was removed in PLAN_009; `tests/archetypes/archetypes.test.ts` keeps the four archetypes and
260
+ their refusals. The blueprint package keeps kit names as validated data and does not depend on
261
261
  or import the kits. The player's route registry is responsible for loading the selected
262
262
  screen lazily. `@protoyard/ai-ui` currently exports an assistant workspace but no dedicated
263
263
  team-chat screen, so the player still needs an adapter or a future UI entry for that screen.
@@ -692,17 +692,16 @@ const committed = await services.ticket.importCsv(text, {
692
692
 
693
693
  ## Brief to blueprint
694
694
 
695
- Kind synthesis fixtures live in `tests/fixtures/briefs/kinds.json` and are exercised by
696
- `tests/brief-kinds.test.ts` (all four kinds, cue conflicts, explicit overrides, empty and
697
- maximum-length input, content-only requests). The historical app set in
698
- `tests/fixtures/briefs/briefs.json` stays the regression baseline
699
- (`pnpm vitest run packages/blueprint/tests/brief-kinds.test.ts packages/blueprint/tests/brief.test.ts`).
700
-
701
- Generated kind JSON Schema (from the live Zod unions via `z.toJSONSchema`) is checked against
702
- catalog fixtures in `tests/kind-json-schema.test.ts`. That suite also locks synthesizer drafts:
703
- every bench brief (`scripts/bench-brief-kinds.ts`) must detect the expected kind and pass
704
- `safeParseAnyBlueprint` (page/doc bodies include `id` + `title`; deck body is `style` + `slides`
705
- only). Cross-reference and lint rules still require the package validator — JSON Schema alone is
695
+ `tests/brief.test.ts` covers kind dispatch (deck, page and doc cues, an explicit kind, an
696
+ unknown kind), empty and very long briefs, and the historical app set in
697
+ `tests/fixtures/briefs/briefs.json`, which stays the regression baseline
698
+ (`pnpm vitest run packages/blueprint/tests/brief.test.ts`). The kind fixture sweep was removed
699
+ in PLAN_009.
700
+
701
+ The generated JSON Schema (from the live Zod unions via `z.toJSONSchema`) is checked to be up to
702
+ date with the zod schema in `tests/schema.test.ts`. The suite that also matched it against
703
+ catalog fixtures and locked the bench briefs' drafts (`kind-json-schema.test.ts`) was removed in
704
+ PLAN_009. Cross-reference and lint rules still require the package validator — JSON Schema alone is
706
705
  not enough.
707
706
 
708
707
  `blueprintFromBrief(brief, { archetype?, name?, kind? })` turns a short product brief into a
@@ -944,8 +943,8 @@ selection, authoring validation and the deck layout catalog (`deckLayouts`, `get
944
943
  and fetch authoring only when the author opens it. The functions are the same ones the root
945
944
  exports. Server tools (CLI, MCP) can simply import the named exports.
946
945
 
947
- Measured on 2026-10-22 with a real Vite build of the linked package (minified, gzip level 9; asserted in
948
- `tests/authoring-exports.test.ts`):
946
+ Measured on 2026-10-22 with a real Vite build of the linked package (minified, gzip level 9; asserted
947
+ by `authoring-exports.test.ts` until PLAN_009 removed it):
949
948
 
950
949
  | Entry imports | Initial JS |
951
950
  | --- | --- |
@@ -1067,7 +1066,7 @@ const revenue = liveQuery(
1067
1066
  - Soft-deleted rows are always skipped. Keys (`<bucket|*>|<group|*>`) are stable.
1068
1067
 
1069
1068
  Measured: 10,000 rows grouped by status and bucketed by day in 10.7 ms in Vitest while the
1070
- machine was under heavy load (`pnpm vitest run packages/blueprint/tests/aggregate.test.ts`).
1069
+ machine was under heavy load (in `aggregate.test.ts`, removed in PLAN_009).
1071
1070
 
1072
1071
  ## App model
1073
1072
 
@@ -1094,10 +1093,9 @@ A later route on the same path replaces an earlier one in place, so a screen can
1094
1093
  claim an entity's default list or detail route. `screenNavIcon`, `screenHasOwnView`
1095
1094
  and `entityLabel` expose the per-screen rules. Generated prototypes and the player
1096
1095
  both render this model through `BlueprintApp` (`@protoyard/crud/app`), so the
1097
- generator emits no route or layout files. `tests/app-model.test.ts` pins the model of
1098
- every catalog blueprint in `tests/__snapshots__/app-model.catalog.json`. The snapshot
1099
- was taken when the model was proven byte-identical to the generator's former
1100
- `routes.ts` and `layout.ts`, so a change is always a reviewed diff.
1096
+ generator emits no route or layout files. Since PLAN_009, `tests/runtime-parity.test.ts`
1097
+ checks routes, navigation and layout for one representative blueprint against a CLI-generated
1098
+ prototype; the per-blueprint model snapshot was removed.
1101
1099
 
1102
1100
  `blueprintGeneratorVersion(blueprint)` (synchronous, no Faker) is the world
1103
1101
  generator's version. Generated prototypes declare it as `generatorVersion`, and so
@@ -1126,9 +1124,9 @@ so the player can run a blueprint with no build. It returns
1126
1124
  Measured with Vite 8 (minified, gzip -9) on an entry that imports
1127
1125
  `definePrototypeFromBlueprint` from the package entry: about 20.0 KB entry plus a
1128
1126
  40.5 KB shared chunk at start, and the generator as a separate 5.5 KB lazy chunk.
1129
- `tests/runtime-definition.test.ts` boots the definition on the real runtime
1130
- (fake IndexedDB): it seeds every default scenario, keeps created rows across a
1131
- reload, and seeds the same world twice for the same seed.
1127
+ `tests/runtime-parity.test.ts` compares that definition with a CLI-generated
1128
+ prototype, worlds included (the separate `runtime-definition.test.ts` was
1129
+ removed in PLAN_009).
1132
1130
 
1133
1131
  ## Tests
1134
1132
 
@@ -1138,10 +1136,8 @@ all derived from its blueprint.
1138
1136
 
1139
1137
  ```bash
1140
1138
  pnpm vitest run packages/blueprint
1141
- pnpm vitest run packages/blueprint/tests/authoring-docs.test.ts
1142
- pnpm vitest run packages/blueprint/tests/brief-kinds.test.ts
1143
- pnpm vitest run packages/blueprint/tests/deck-lint.test.ts
1144
- pnpm vitest run packages/blueprint/tests/select-deck-layouts.test.ts
1139
+ pnpm vitest run packages/blueprint/tests/brief.test.ts
1140
+ pnpm vitest run packages/blueprint/tests/kinds
1145
1141
  pnpm --filter @protoyard/blueprint typecheck
1146
1142
  ```
1147
1143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protoyard/blueprint",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Data-only blueprints for Protoyard: schema validation and the derivations (stores, integrity, migrations, inputs, policy, generators, entity services) that turn a blueprint into a working prototype.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -69,17 +69,17 @@
69
69
  "./schema.json": "./dist/schema/blueprint.schema.json"
70
70
  },
71
71
  "dependencies": {
72
- "@protoyard/blocks": "1.1.0",
73
- "@protoyard/core": "1.1.0",
74
- "@protoyard/decks": "1.1.0",
75
- "@protoyard/pages": "1.1.0",
76
- "@protoyard/scenarios": "1.1.0",
77
- "@protoyard/themes": "1.1.0",
72
+ "@protoyard/blocks": "1.1.2",
73
+ "@protoyard/core": "1.1.2",
74
+ "@protoyard/decks": "1.1.2",
75
+ "@protoyard/pages": "1.1.2",
76
+ "@protoyard/scenarios": "1.1.2",
77
+ "@protoyard/themes": "1.1.2",
78
78
  "zod": "^4.6.7"
79
79
  },
80
80
  "devDependencies": {
81
- "@protoyard/database": "1.1.0",
82
- "@texuli/forms": "0.12.0"
81
+ "@protoyard/database": "1.1.2",
82
+ "@texuli/forms": "0.12.3"
83
83
  },
84
84
  "protoyard": {
85
85
  "build": {