@jskit-ai/agent-docs 0.1.130 → 0.1.132

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 (171) hide show
  1. package/guide/agent/app-extras/assistant.md +29 -605
  2. package/guide/agent/app-extras/mobile-capacitor.md +29 -362
  3. package/guide/agent/app-extras/realtime.md +29 -277
  4. package/guide/agent/app-setup/a-more-interesting-shell.md +44 -815
  5. package/guide/agent/app-setup/authentication.md +43 -1073
  6. package/guide/agent/app-setup/console.md +26 -298
  7. package/guide/agent/app-setup/database-layer.md +110 -790
  8. package/guide/agent/app-setup/initial-scaffolding.md +50 -784
  9. package/guide/agent/app-setup/multi-homing.md +39 -712
  10. package/guide/agent/app-setup/quickstart.md +43 -179
  11. package/guide/agent/app-setup/users.md +34 -353
  12. package/guide/agent/index.md +16 -23
  13. package/package.json +2 -2
  14. package/patterns/INDEX.md +7 -7
  15. package/patterns/child-cruds.md +3 -3
  16. package/patterns/client-requests.md +6 -6
  17. package/patterns/crud-authoring.md +94 -0
  18. package/patterns/crud-links.md +1 -1
  19. package/patterns/feature-package/PATTERN.md +108 -0
  20. package/patterns/feature-package/example/booking-engine/package.json +48 -0
  21. package/patterns/feature-package/example/booking-engine/src/server/BookingEngineProvider.js +33 -0
  22. package/patterns/feature-package/example/booking-engine/src/server/actions.js +26 -0
  23. package/patterns/feature-package/example/booking-engine/src/server/inputSchemas.js +19 -0
  24. package/patterns/feature-package/example/variations/AvailabilityEngineProvider.js +31 -0
  25. package/patterns/feature-package/example/variations/InvoiceRollupProvider.js +36 -0
  26. package/patterns/feature-package/example/variations/customKnexRepository.js +34 -0
  27. package/patterns/feature-package/example/variations/orchestratorService.js +23 -0
  28. package/patterns/filters.md +8 -8
  29. package/patterns/live-actions.md +5 -18
  30. package/patterns/minimal-foundation/PATTERN.md +98 -0
  31. package/patterns/minimal-foundation/example/.nvmrc +1 -0
  32. package/patterns/minimal-foundation/example/AGENTS.md +17 -0
  33. package/patterns/minimal-foundation/example/Procfile +2 -0
  34. package/patterns/minimal-foundation/example/app.json +14 -0
  35. package/patterns/minimal-foundation/example/bin/develop.js +71 -0
  36. package/patterns/minimal-foundation/example/bin/server.js +8 -0
  37. package/patterns/minimal-foundation/example/config/public.js +40 -0
  38. package/patterns/minimal-foundation/example/config/server.js +1 -0
  39. package/patterns/minimal-foundation/example/config/surfaceAccessPolicies.js +3 -0
  40. package/patterns/minimal-foundation/example/eslint.config.mjs +19 -0
  41. package/patterns/minimal-foundation/example/favicon.svg +7 -0
  42. package/patterns/minimal-foundation/example/gitignore +9 -0
  43. package/patterns/minimal-foundation/example/index.html +13 -0
  44. package/patterns/minimal-foundation/example/jsconfig.json +8 -0
  45. package/patterns/minimal-foundation/example/package.json +57 -0
  46. package/patterns/minimal-foundation/example/packages/main/package.json +42 -0
  47. package/patterns/minimal-foundation/example/packages/main/src/shared/index.js +10 -0
  48. package/patterns/minimal-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
  49. package/patterns/minimal-foundation/example/playwright.config.mjs +31 -0
  50. package/patterns/minimal-foundation/example/server/lib/runtimeEnv.js +45 -0
  51. package/patterns/minimal-foundation/example/server/lib/surfaceRuntime.js +10 -0
  52. package/patterns/minimal-foundation/example/server.js +195 -0
  53. package/patterns/minimal-foundation/example/src/App.vue +13 -0
  54. package/patterns/minimal-foundation/example/src/main.js +85 -0
  55. package/patterns/minimal-foundation/example/src/pages/home/index.vue +48 -0
  56. package/patterns/minimal-foundation/example/src/pages/home.vue +13 -0
  57. package/patterns/minimal-foundation/example/src/views/NotFound.vue +13 -0
  58. package/patterns/minimal-foundation/example/tests/client/smoke.vitest.js +7 -0
  59. package/patterns/minimal-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
  60. package/patterns/minimal-foundation/example/tests/server/smoke.test.js +16 -0
  61. package/patterns/minimal-foundation/example/vite.config.mjs +81 -0
  62. package/patterns/page-scaffolding.md +20 -17
  63. package/patterns/placements.md +17 -15
  64. package/patterns/row-policies.md +4 -5
  65. package/patterns/server-search.md +3 -3
  66. package/patterns/shell-foundation/PATTERN.md +104 -0
  67. package/patterns/shell-foundation/example/.nvmrc +1 -0
  68. package/patterns/shell-foundation/example/AGENTS.md +17 -0
  69. package/patterns/shell-foundation/example/Procfile +2 -0
  70. package/patterns/shell-foundation/example/app.json +14 -0
  71. package/patterns/shell-foundation/example/bin/develop.js +71 -0
  72. package/patterns/shell-foundation/example/bin/server.js +8 -0
  73. package/patterns/shell-foundation/example/config/public.js +40 -0
  74. package/patterns/shell-foundation/example/config/server.js +1 -0
  75. package/patterns/shell-foundation/example/config/surfaceAccessPolicies.js +3 -0
  76. package/patterns/shell-foundation/example/eslint.config.mjs +19 -0
  77. package/patterns/shell-foundation/example/favicon.svg +7 -0
  78. package/patterns/shell-foundation/example/gitignore +9 -0
  79. package/patterns/shell-foundation/example/index.html +13 -0
  80. package/patterns/shell-foundation/example/jsconfig.json +8 -0
  81. package/patterns/shell-foundation/example/package.json +59 -0
  82. package/patterns/shell-foundation/example/packages/main/package.json +56 -0
  83. package/patterns/shell-foundation/example/packages/main/src/client/index.js +9 -0
  84. package/patterns/shell-foundation/example/packages/main/src/client/providers/MainClientProvider.js +18 -0
  85. package/patterns/shell-foundation/example/packages/main/src/shared/index.js +10 -0
  86. package/patterns/shell-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
  87. package/patterns/shell-foundation/example/playwright.config.mjs +31 -0
  88. package/patterns/shell-foundation/example/server/lib/runtimeEnv.js +45 -0
  89. package/patterns/shell-foundation/example/server/lib/surfaceRuntime.js +10 -0
  90. package/patterns/shell-foundation/example/server.js +195 -0
  91. package/patterns/shell-foundation/example/src/App.vue +11 -0
  92. package/patterns/shell-foundation/example/src/components/ShellLayout.vue +12 -0
  93. package/patterns/shell-foundation/example/src/components/menus/MenuLinkItem.vue +30 -0
  94. package/patterns/shell-foundation/example/src/components/menus/SurfaceAwareMenuLinkItem.vue +42 -0
  95. package/patterns/shell-foundation/example/src/components/menus/TabLinkItem.vue +42 -0
  96. package/patterns/shell-foundation/example/src/error.js +19 -0
  97. package/patterns/shell-foundation/example/src/main.js +85 -0
  98. package/patterns/shell-foundation/example/src/pages/home/index.vue +116 -0
  99. package/patterns/shell-foundation/example/src/pages/home/settings/general/index.vue +40 -0
  100. package/patterns/shell-foundation/example/src/pages/home/settings/index.vue +7 -0
  101. package/patterns/shell-foundation/example/src/pages/home/settings.vue +109 -0
  102. package/patterns/shell-foundation/example/src/pages/home.vue +20 -0
  103. package/patterns/shell-foundation/example/src/placement.js +56 -0
  104. package/patterns/shell-foundation/example/src/placementTopology.js +149 -0
  105. package/patterns/shell-foundation/example/src/views/NotFound.vue +13 -0
  106. package/patterns/shell-foundation/example/tests/client/smoke.vitest.js +7 -0
  107. package/patterns/shell-foundation/example/tests/e2e/adaptive-shell.spec.ts +10 -0
  108. package/patterns/shell-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
  109. package/patterns/shell-foundation/example/tests/server/smoke.test.js +16 -0
  110. package/patterns/shell-foundation/example/vite.config.mjs +81 -0
  111. package/patterns/ui-contract.md +56 -0
  112. package/patterns/ui-testing.md +10 -12
  113. package/reference/autogen/KERNEL_MAP.md +29 -107
  114. package/reference/autogen/PATTERN_INDEX.md +230 -0
  115. package/reference/autogen/README.md +4 -8
  116. package/reference/autogen/packages/agent-docs.md +259 -0
  117. package/reference/autogen/packages/assistant-core.md +3 -3
  118. package/reference/autogen/packages/assistant-runtime.md +32 -17
  119. package/reference/autogen/packages/auth-core.md +31 -33
  120. package/reference/autogen/packages/auth-provider-local-core.md +4 -12
  121. package/reference/autogen/packages/auth-provider-local-db-core.md +4 -4
  122. package/reference/autogen/packages/auth-provider-supabase-core.md +14 -18
  123. package/reference/autogen/packages/auth-web.md +42 -22
  124. package/reference/autogen/packages/console-core.md +8 -25
  125. package/reference/autogen/packages/console-web.md +5 -5
  126. package/reference/autogen/packages/crud-core.md +61 -17
  127. package/reference/autogen/packages/database-runtime-mysql.md +12 -2
  128. package/reference/autogen/packages/database-runtime-postgres.md +12 -2
  129. package/reference/autogen/packages/database-runtime.md +26 -25
  130. package/reference/autogen/packages/google-rewarded-core.md +19 -104
  131. package/reference/autogen/packages/http-runtime.md +4 -8
  132. package/reference/autogen/packages/http-web.md +32 -0
  133. package/reference/autogen/packages/json-rest-api-core.md +4 -6
  134. package/reference/autogen/packages/kernel.md +109 -390
  135. package/reference/autogen/packages/mobile-capacitor.md +2 -13
  136. package/reference/autogen/packages/realtime.md +29 -26
  137. package/reference/autogen/packages/resource-crud-core.md +6 -0
  138. package/reference/autogen/packages/shell-web.md +69 -54
  139. package/reference/autogen/packages/storage-runtime.md +3 -3
  140. package/reference/autogen/packages/uploads-image-web.md +0 -1
  141. package/reference/autogen/packages/uploads-runtime.md +3 -3
  142. package/reference/autogen/packages/users-core.md +45 -90
  143. package/reference/autogen/packages/users-web.md +5 -7
  144. package/reference/autogen/packages/workspaces-core.md +53 -74
  145. package/reference/autogen/packages/workspaces-web.md +15 -16
  146. package/reference/autogen/tooling/jskit-catalog.md +34 -0
  147. package/reference/autogen/tooling/testUtils.md +4 -4
  148. package/skills/jskit/SKILL.md +36 -28
  149. package/skills/jskit/agents/openai.yaml +2 -2
  150. package/skills/jskit/references/app-operations.md +68 -53
  151. package/skills/jskit/references/crud-operations.md +58 -106
  152. package/skills/jskit/references/material-3.md +105 -0
  153. package/skills/jskit/references/ui-operations.md +41 -44
  154. package/templates/app/AGENTS.md +7 -3
  155. package/guide/agent/app-setup/upgrade-beta-1-to-final.md +0 -252
  156. package/guide/agent/app-setup/working-with-the-jskit-cli.md +0 -325
  157. package/guide/agent/generators/advanced-cruds.md +0 -1935
  158. package/guide/agent/generators/crud-generators.md +0 -948
  159. package/guide/agent/generators/intro.md +0 -65
  160. package/guide/agent/generators/row-policies.md +0 -537
  161. package/guide/agent/generators/ui-generators.md +0 -690
  162. package/patterns/crud-scaffolding.md +0 -198
  163. package/patterns/generated-ui-contract-tracking.md +0 -66
  164. package/reference/autogen/packages/assistant.md +0 -68
  165. package/reference/autogen/packages/crud-server-generator.md +0 -215
  166. package/reference/autogen/packages/crud-ui-generator.md +0 -192
  167. package/reference/autogen/packages/feature-server-generator.md +0 -65
  168. package/reference/autogen/packages/ui-generator.md +0 -127
  169. package/reference/autogen/tooling/create-app.md +0 -317
  170. package/reference/autogen/tooling/jskit-cli.md +0 -933
  171. package/reference/autogen/tooling/test-support.md +0 -27
@@ -1,67 +1,82 @@
1
1
  # Application operations
2
2
 
3
- Read this for app creation, CLI discovery, packages, and generators.
3
+ Read this for establishing an application foundation, selecting package
4
+ capabilities, and realizing product features from JSKIT patterns.
4
5
 
5
- ## Create an application
6
+ ## Establish a new application
6
7
 
7
- Confirm the name and tenancy mode:
8
+ Start with an initialized Git repository and a clear product request. Use the
9
+ request, current source, and ordinary project documentation. Ask the user for
10
+ any material missing product decision before writing application source. Do
11
+ not run a JSKIT questionnaire and do not create a temporary scaffold app.
8
12
 
9
- ```bash
10
- npx @jskit-ai/create-app <app-name> --tenancy-mode <tenancy-mode>
11
- cd <app-name>
12
- npm install
13
+ Read the generated pattern index:
14
+
15
+ ```text
16
+ node_modules/@jskit-ai/agent-docs/reference/autogen/PATTERN_INDEX.md
13
17
  ```
14
18
 
15
- Generated apps require Node.js 26. Use `--target . --force` only to promote a
16
- known JSKIT `ai-seed`, never to overwrite an arbitrary app. `--minimal` is for
17
- deliberately bare package-development or unusual integrations. Follow the
18
- generated `AGENTS.md`.
19
+ For a browser product, inspect one foundation:
20
+
21
+ - `app/shell-foundation` for the normal adaptive application shell
22
+ - `app/minimal-foundation` when the product deliberately does not need that
23
+ shell yet
24
+
25
+ Inspect the complete pattern before copying. Copy or author the useful files
26
+ directly into the existing project. Preserve `.git` plus all unrelated project
27
+ and agent context. Resolve every real destination collision explicitly.
28
+ Rename the concrete example application in ordinary source and metadata.
19
29
 
20
- After the first install, use `npx --no-install jskit ...`; a missing local CLI
21
- must fail instead of silently fetching another version. Do not add auth, users,
22
- workspaces, console, sample data, or another database adapter unless requested.
30
+ The copied files immediately belong to the application. Do not add pattern
31
+ receipts, generator provenance, completion ledgers, or hidden operation state.
23
32
 
24
- ## Fresh minimal database CRUD order
33
+ ## Install and compose capabilities
25
34
 
26
- Use this order exactly: create-app, install, add the database runtime, install,
27
- create the live table in a fresh disposable development database, generate the
28
- server CRUD, install, then generate the UI.
35
+ Plan the complete capability set before changing dependencies. Use the package
36
+ catalogue and package-owned patterns to identify the required runtime packages,
37
+ configuration, resources, and public APIs. Add one coherent package closure,
38
+ then run `npm install` once for that planned change.
39
+
40
+ Install the explicitly selected top-level packages through npm. Use one
41
+ installation for the planned closure so npm can resolve their ordinary package
42
+ dependencies together:
29
43
 
30
44
  ```bash
31
- npx @jskit-ai/create-app notes \
32
- --target . --force --tenancy-mode none --minimal
33
- npm install
34
- npx --no-install jskit add package database-runtime-mysql
35
- npm install
36
- # Create/select a fresh disposable database and create its live `notes` table.
37
- npx --no-install jskit generate crud-server-generator scaffold \
38
- --namespace notes \
39
- --surface home \
40
- --ownership-filter public \
41
- --access public \
42
- --table-name notes
43
- npm install
44
- npx --no-install jskit generate crud-ui-generator crud notes \
45
- --resource-file packages/notes/src/shared/noteResource.js \
46
- --id-param noteId \
47
- --display-fields title,body \
48
- --parent-title contextual \
49
- --navigation-role primary \
50
- --delete-confirmation
45
+ npm install --save-exact @jskit-ai/<selected-package>@latest [...]
51
46
  ```
52
47
 
53
- The server generator owns its dependency closure. Do not pre-install
54
- `shell-web` as a placement workaround.
55
-
56
- ## Select and apply technology
57
-
58
- - Discover with `npx --no-install jskit list` and
59
- `npx --no-install jskit show <id> --details`.
60
- - Install runtime capability with `npx --no-install jskit add package <id>`;
61
- inspect a bundle before adding it.
62
- - Run tooling with `npx --no-install jskit generate <generator> <action> ...`;
63
- do not install generators as runtime packages.
64
- - JSKIT owns app mutations, npm owns dependency installation, and
65
- `npm run db:migrate` owns database migration execution.
66
- - Continue only at documented app-owned seams. Prefer the narrowest existing
67
- package or generator over a parallel local framework.
48
+ Review the resulting `package.json` and lockfile as ordinary source changes.
49
+ The installed package graph supplies runtime providers, migrations, patterns,
50
+ and public APIs directly; no JSKIT synchronization or mutation command follows
51
+ the npm installation.
52
+
53
+ Do not add auth, users, workspaces, console, sample data, databases, or AI
54
+ capabilities unless the product choice requires them.
55
+
56
+ ## Author database-backed CRUD
57
+
58
+ Use a chosen database pattern plus a package-owned CRUD resource pattern. The
59
+ normal order is:
60
+
61
+ 1. confirm the product resource, ownership, operations, and fields
62
+ 2. author a migration as normal application source
63
+ 3. author the shared resource contract through `resource-crud-core`
64
+ 4. use framework APIs for standard repository/service/action/route mechanics
65
+ 5. author product-specific screens from the relevant UI pattern
66
+ 6. run migrations and direct verification
67
+
68
+ The database connection and schema are runtime evidence, not a questionnaire
69
+ that owns source generation. Never patch fields into generated ASTs and never
70
+ mark a resource valid because a generator once wrote it.
71
+
72
+ ## Verify current state
73
+
74
+ Run verification against source, package graph, migrations, and
75
+ runtime behavior. Runtime startup owns the capability/provider graph,
76
+ loadability, ids, environment, and configuration. Builds own client imports;
77
+ migration status and disposable rebuilds own schema state. App lint, tests,
78
+ audit, browser checks, and CI own security, runtimes, and behavior.
79
+
80
+ There is no supported `jskit doctor` command. Old CLI authoring-history
81
+ warnings do not describe AI-first apps. Diagnose current contracts; never add
82
+ metadata to satisfy an old tool.
@@ -1,92 +1,55 @@
1
1
  # CRUD operations
2
2
 
3
- Read this completely before database, schema, CRUD, repository, or persistence
4
- work.
5
-
6
- ## Establish the contract
7
-
8
- Take the database adapter, surface, access, and ownership from the request and
9
- app authority. Inspect only a generator whose exact lane or option values are
10
- missing, or whose supplied command failed:
11
-
12
- ```bash
13
- npx --no-install jskit show crud-server-generator --details
14
- npx --no-install jskit show crud-ui-generator --details
15
- ```
16
-
17
- Never run these merely to reconfirm caller-supplied facts.
18
-
19
- Normal app-owned CRUD tables use one non-null integer primary key. Every
20
- foreign key is single-column and targets that key; multi-column unique indexes
21
- are business constraints, never relationship targets. Only direct
22
- `workspace_id` and `user_id` columns are generated ownership. Names such as
23
- `recipient_user_id` are domain relationships. Match the ownership filter to
24
- the reserved columns exactly, and test allowed plus cross-workspace cases.
25
- Stop before generation when these contracts disagree.
26
-
27
- ## Conventional one-table CRUD
28
-
29
- Create the validated table first in a fresh disposable development database;
30
- the server generator reads its live shape:
31
-
32
- ```bash
33
- npx --no-install jskit generate crud-server-generator scaffold \
34
- --namespace <resource> \
35
- --surface <surface> \
36
- --ownership-filter <public|user|workspace|workspace_user> \
37
- --access <public|authenticated> \
38
- --table-name <table>
39
- ```
40
-
41
- Use public access only on a non-workspace surface with public ownership. A
42
- workspace CRUD chooses exactly one of `--grant-role <role>` or
43
- `--no-role-grant`; never invent a role. `--internal` keeps the generated
44
- repository/service/resource ownership chain but suppresses public HTTP routes.
45
-
46
- Run `npm install`, then generate UI from the exact shared resource:
47
-
48
- ```bash
49
- npx --no-install jskit generate crud-ui-generator crud \
50
- <pages-root>/<plural-route> \
51
- --resource-file packages/<namespace>/src/shared/<singular>Resource.js \
52
- --parent-title contextual
53
- ```
54
-
55
- The target is relative to `src/pages/`, starts with the selected surface's
56
- nonempty configured `pagesRoot` (for example `home/books`), and has no leading
57
- slash. For a surface deliberately configured with an empty root, use
58
- only the plural route. Use the exact singular resource filename emitted by the server generator; do not guess it.
59
-
60
- That resource is canonical. Do not hand-build routes, validators, HTTP helpers,
61
- or UI before it exists. Prefer `useCrudListScreen()`, `useCrudViewScreen()`, and
62
- `useCrudAddEditScreen()` for routed screens; the corresponding `useCrud*()`
63
- composables for routed behavior; and `useList()`, `useView()`, `useAddEdit()`,
64
- `useCommand()`, or `useEndpointResource()` for non-standard contracts. Standard
65
- CRUD derives JSON:API transport from the resource—never use raw `fetch()`.
66
-
67
- ## Generated record deletion
68
-
69
- Request ordinary routed deletion explicitly:
70
-
71
- ```bash
72
- npx --no-install jskit generate crud-ui-generator crud notes \
73
- --resource-file packages/notes/src/shared/noteResource.js \
74
- --id-param noteId \
75
- --display-fields title,body \
76
- --parent-title contextual \
77
- --navigation-role primary \
78
- --delete-confirmation
79
- ```
80
-
81
- `--delete-confirmation` requires generated list and view pages and a shared
82
- resource with a `DELETE` operation. It supports a custom `--id-param` and fails
83
- clearly when the contract is unsupported. The view uses the public
84
- `CrudViewScreen` `actions` slot, `CrudDeleteAction`, and
85
- `useCrudDeleteAction()`. The shared component owns the Cancel/Delete dialog;
86
- `useCommand()` owns pending/error state and the resource request; success
87
- invalidates the CRUD list and navigates there. Import the public client runtime
88
- from `@jskit-ai/http-web`; do not inspect package-private code, add a page
89
- transport, or use raw `fetch()`.
3
+ Read this before database, schema, CRUD, repository, or persistence work.
4
+
5
+ ## Establish the product contract
6
+
7
+ Take database, surface, access, ownership, operations, and fields from product
8
+ intent and current source. Ask when a material choice is missing. Do not translate the work into generator options.
9
+
10
+ Read the narrow package-owned pattern from the generated index:
11
+ `crud/resource-contract` for the resource, `crud/json-api-resource-package` for
12
+ the server, and `crud/crud-screen-set` for routed UI. Child-resource and
13
+ row-policy patterns own those variations.
14
+
15
+ Normal CRUD tables use one non-null integer primary key. Foreign keys are
16
+ single-column; composite unique indexes are business constraints, not
17
+ identities. Only direct `workspace_id` and `user_id` columns imply ownership.
18
+ Match visibility to real ownership and test allowed plus cross-owner cases.
19
+
20
+ ## Author the resource normally
21
+
22
+ For a conventional resource:
23
+
24
+ 1. Write an immutable app-owned migration.
25
+ 2. Define the shared resource contract through `defineCrudResource()`.
26
+ 3. Use `defineCrudJsonApiFeature()` for standard repository, service, action,
27
+ permission, resource-host, and route mechanics.
28
+ 4. Customize through `decorateRepository`, `decorateService`,
29
+ `operationLifecycle`, and named `actions`; do not copy the standard CRUD
30
+ repository/action/route stack.
31
+ 5. Build routed screens from the matching `http-web`/CRUD UI pattern.
32
+
33
+ The resource is canonical for fields, operations, validation, transport,
34
+ messages, and route parameters. Do not duplicate its schema or serializers.
35
+ Prefer `useCrudListScreen()`, `useCrudViewScreen()`, and
36
+ `useCrudAddEditScreen()`; use `useCommand()` or `useEndpointResource()` for
37
+ non-standard operations.
38
+
39
+ Additional resource service methods are normal. Add them with
40
+ `decorateService`; expose commands such as `confirm`, `publish`, or `cancel`
41
+ through named `actions`. With `operationLifecycle`, mutation `before`,
42
+ `execute`, and `after` share one repository transaction, `execute` receives
43
+ `standard(nextInput)`, and `afterCommit` follows commit. Repositories persist;
44
+ services and hooks orchestrate them. Durable external work uses a transactional
45
+ outbox.
46
+
47
+ ## Record deletion
48
+
49
+ Deletion requires an explicit shared `DELETE` operation and confirmation
50
+ decision. Use `CrudDeleteAction` and `useCrudDeleteAction()` through the view
51
+ actions slot; do not rebuild their confirmation, request, invalidation, and
52
+ navigation flow.
90
53
 
91
54
  ## Strict temporal values
92
55
 
@@ -96,26 +59,15 @@ With `json-rest-schema` 1.0.17, temporal resource values are strings:
96
59
  - `time`: offset-free `HH:MM[:SS[.fraction]]`
97
60
  - `dateTime`: RFC 3339 with seconds and `Z` or a numeric offset
98
61
 
99
- Do not pass JavaScript `Date` objects through resource validation; convert at
100
- the boundary (normally `toISOString()` for `dateTime`). Numeric epochs use
101
- `epochMilliseconds` or `epochSeconds`. Honor `temporalPrecision` without
102
- silently truncating fractions. Generated CRUD
103
- serializes supported database temporal output; custom repositories must return
104
- strict strings and write ISO/RFC 3339 strings themselves.
62
+ Convert JavaScript `Date` objects at the boundary, normally with
63
+ `toISOString()`. Numeric epochs use `epochMilliseconds` or `epochSeconds`.
64
+ Honor `temporalPrecision`; repositories return strict strings.
105
65
 
106
66
  ## Migration ownership
107
67
 
108
- Never compete with or alter a generator-owned baseline migration. Later schema
109
- changes are immutable additive migrations owned by the app-local package:
110
-
111
- ```bash
112
- npx --no-install jskit create migration --package <package-id> --id <id>
113
- npx --no-install jskit migrations sync
114
- npm run db:migrate
115
- ```
68
+ Migrations are immutable application source owned with their resource. Never make a live table or a generator the sole source of truth. Schema inspection is for adoption and diagnosis, not compulsory authoring.
116
69
 
117
- An exceptional persistence lane requires explicit developer approval recorded
118
- in `.jskit/WORKBOARD.md` and `.jskit/table-ownership.json`, plus
119
- `.jskit/APP_BLUEPRINT.md` when architectural. Before sign-off, rebuild from
120
- zero in a fresh disposable database, compare schema, test ownership boundaries,
121
- run Doctor, and run the verifier.
70
+ Before sign-off, rebuild from zero in a fresh disposable database, compare the
71
+ schema, test ownership boundaries and failure cases, and run current-state
72
+ verification. Do not create a workboard entry, ownership receipt, generation
73
+ record, or historical proof that tooling ran.
@@ -0,0 +1,105 @@
1
+ # Material 3
2
+
3
+ Read completely before any JSKIT Vue/Vuetify UI task.
4
+
5
+ ## Authority
6
+
7
+ JSKIT uses Vue and the installed Vuetify 4 release. Material 3 is the UI
8
+ contract; packages, shared screens, placements, shell components, and
9
+ app-owned Vuetify configuration are its implementation seams.
10
+ Use the installed public APIs rather than adding `@material/web`, another UI
11
+ framework, or a parallel theme/component system.
12
+
13
+ The request and Blueprint own brand, content, routes, and behavior. Material 3
14
+ does not authorize a redesign.
15
+ An established JSKIT prop or component wins over generic Material advice.
16
+
17
+ ## Implement through owned seams
18
+
19
+ Use this order:
20
+
21
+ 1. Reuse the JSKIT package, source pattern, shared screen, shell, placement, or
22
+ high-level composable that owns the behavior.
23
+ 2. Use the matching Vuetify component and its public props, variants, slots,
24
+ density, responsive, theme, and accessibility behavior.
25
+ 3. Adapt app-owned wrappers or the central `createVuetify(...)` configuration.
26
+ 4. Add scoped CSS only for product layout or a documented gap. Never style
27
+ Vuetify internals or duplicate a component system in CSS.
28
+
29
+ Do not replace a shared screen to restyle it. Use its public seams.
30
+
31
+ ## Theme and visual hierarchy
32
+
33
+ - Define palettes and theme selection once through the established Vuetify
34
+ bootstrap. Preserve promised light, dark, or system behavior.
35
+ - Prefer semantic roles such as primary, secondary, surface, surface variant,
36
+ on-surface, outline, success, warning, and error. Use Vuetify theme props,
37
+ classes, and `--v-theme-*` variables instead of repeated visual literals.
38
+ - Keep contrast and meaning in every supported theme. Never communicate
39
+ status, selection, validation, or permission through color alone.
40
+ - Use Vuetify 4 Material 3 display, headline, title, body, and label roles. Do
41
+ not recreate the old Material 2 type scale or a page-local typography system.
42
+ - Use Vuetify spacing utilities and established JSKIT dimensions before raw
43
+ values. Preserve JSKIT shell widths, target sizes, and spacing props.
44
+ - Use elevation `0` through `5`, shape props, and component variants instead of
45
+ arbitrary shadows and radii. Prefer a page header and direct `v-sheet` work
46
+ region; add cards or dialogs only for genuinely grouped or elevated objects.
47
+
48
+ ## Components, state, and feedback
49
+
50
+ - Choose components by purpose. Prefer standard buttons, fields, lists,
51
+ tables, sheets, dialogs, menus, navigation, progress, alerts, snackbars, and
52
+ tooltips over custom imitations.
53
+ - Give one primary action emphasis. Distinguish destructive, secondary, and
54
+ icon-only actions without relying on color; give icon controls accessible
55
+ names and fields meaningful labels, errors, and autocomplete behavior.
56
+ - Preserve visible focus, logical tab order, keyboard operation, and at least
57
+ 48 CSS-pixel interactive targets unless a tested dense operator surface owns
58
+ another contract.
59
+ - Represent loading, empty, error, retry, disabled, selected, hover, focus,
60
+ pressed, and success states through shared JSKIT behavior. All user-visible
61
+ loading uses Material skeletons that reserve the final content geometry;
62
+ never use a generic spinner or circular progress indicator, and never let
63
+ content jump when data arrives. An action without a loading content region
64
+ uses a stable disabled/pending label and shared feedback, not a spinner.
65
+ - Keep failures at their semantic owner. A resource that cannot render uses a
66
+ stable in-page error and retry state; field validation stays beside the
67
+ field. A user-triggered command uses JSKIT's shared action
68
+ feedback/snackbar path. Never insert a transient command-error alert above
69
+ page content where it shifts the working layout.
70
+ - Use established transitions and honor reduced motion. Do not claim
71
+ unsupported Material 3 Expressive parity.
72
+
73
+ ## Adaptive layout
74
+
75
+ Start compact, then verify medium and expanded layouts. Use Vuetify display
76
+ APIs and the JSKIT adaptive shell rather than copying breakpoint numbers.
77
+ Keep primary tasks reachable without incidental chrome. Let navigation,
78
+ tables, filters, supporting content, and action groups change presentation;
79
+ do not merely shrink an expanded screen. Prevent overflow, clipped labels,
80
+ overlapping actions, duplicate navigation, and unreachable dialogs. Persist
81
+ screen context in the route when it must survive navigation.
82
+
83
+ ## Material 3 audit
84
+
85
+ Run this behavior-preserving audit over every affected screen:
86
+
87
+ 1. Identify the owning JSKIT surface, shared screen, shell, placement, theme,
88
+ and Vuetify components before judging local markup.
89
+ 2. Find parallel components, duplicated state chrome, page-local themes,
90
+ transient command errors that shift page content, content loaders using
91
+ generic spinners instead of geometry-preserving skeletons, raw visual
92
+ constants, CSS against Vuetify internals, nested generic cards, legacy
93
+ typography, elevation outside `0`-`5`, and desktop-only layout.
94
+ 3. Check hierarchy, token use, component purpose, responsive presentation,
95
+ interaction states, keyboard/focus behavior, labels, targets, contrast, and
96
+ reduced motion.
97
+ 4. Correct issues at the narrowest established owner. Consolidate only truly
98
+ repeated policy; avoid pass-through wrappers and speculative abstractions.
99
+ 5. Run focused tests and Playwright at compact, medium, and expanded widths.
100
+ Navigate away and back with warm query data when the screen persists state.
101
+
102
+ Do not declare Material 3 compliance from visual resemblance alone. Report any
103
+ unverified responsive, theme, accessibility, interaction, or browser behavior.
104
+ For a missing or version-sensitive API, verify the installed Vuetify major and
105
+ official docs; implement Material intent through supported JSKIT/Vuetify seams.
@@ -5,69 +5,66 @@ verification.
5
5
 
6
6
  ## Pages, surfaces, and placements
7
7
 
8
- Take the surface from the request/app authority; it controls routes, access,
9
- placement visibility, and often ownership. For a normal non-CRUD page:
8
+ Take the surface and navigation role from the request, product context, and
9
+ current app. They control routes, access, placement visibility, and often
10
+ ownership. Inspect `app/shell-foundation` plus the narrow UI pattern that
11
+ matches the requested outcome before authoring source.
10
12
 
11
- ```bash
12
- npx --no-install jskit show ui-generator --details
13
- npx --no-install jskit list-placements
14
- npx --no-install jskit generate ui-generator page <route-file> --name <name>
15
- ```
16
-
17
- Choose the truthful `--navigation-role`. Override with semantic
18
- `--link-placement <area.slot>` when needed; use concrete placements only for
19
- diagnosis. Let the generator create the route and placement before adapting
20
- app-owned output. State why before hand-writing a normal page.
13
+ Create route files and placement declarations as normal application code.
14
+ Use semantic placement ids and shell public helpers; use concrete outlet ids
15
+ only when defining or diagnosing topology. Resolve current dynamic parameters
16
+ to an absolute URL or route object for sibling/child links—never bind a route
17
+ template or relative string raw to Vue Router `to`.
21
18
 
22
- ## App-owned files
19
+ ## Application-owned files
23
20
 
24
- App-owned generated files are customizable. Adapt infrastructure tests in place.
25
- When replacing a starter route, update its smoke
26
- test to the new canonical route instead of deleting baseline browser coverage.
27
- Doctor must continue to report a missing managed test.
21
+ Pattern source is ordinary customizable application source. When replacing a
22
+ starter route, adapt its smoke test to the new canonical route instead of
23
+ discarding browser coverage. Do not retain a generated-file marker, template
24
+ hash, pattern receipt, or tool-owned source declaration.
28
25
 
29
26
  ## Screen behavior
30
27
 
31
28
  - Keep screens phone/task-first with drawer-independent primary actions and
32
- 48 px targets. Use a page header and direct `v-sheet`, not nested cards.
33
- - Provide named loading, empty, error, permission, and retry states. Generated
34
- lists use searchable compact cards and medium/expanded tables where suitable.
35
- - Extend shared CRUD screens through slots. For custom sibling/child links,
36
- resolve current dynamic params with their runtime to an absolute URL/route
37
- object; never bind its route-template/relative string raw to Vue Router `to`.
38
- - Use page-local row-action/filter definitions. Keep read failures local; use
39
- `useCommand()` or `useUiFeedback()` for user-triggered action feedback.
40
- - Import neutral request, operation, permission, and generated CRUD UI APIs from
41
- `@jskit-ai/http-web`. Do not install `users-web` unless the application uses
42
- account, profile, or user-specific shell UI.
29
+ at least 48 CSS-pixel targets.
30
+ - Use a page header and direct surfaces instead of needless nested cards.
31
+ - Render all meaningful loading, empty, error, permission, and retry states.
32
+ - Use structure-matching Material skeletons for visible loading; never use a
33
+ generic spinner or circular progress indicator.
34
+ - Keep read failures local when the screen cannot render. Present transient
35
+ command success/failure through shared toast/snackbar feedback so the page
36
+ does not jump.
37
+ - Extend shared CRUD screens through public slots and composables.
38
+ - Keep row actions and filters near the screen unless the framework owns them.
39
+ - Import neutral request and CRUD UI APIs from `@jskit-ai/http-web`. Install
40
+ `users-web` only for actual account/profile/user UI.
43
41
 
44
42
  ## Adaptive shell drawer
45
43
 
46
44
  Use Vuetify Material navigation. Compact close dismisses the temporary drawer;
47
45
  wide layouts default to `desktopDrawerClosedMode="rail"`. Use `hidden` only
48
- with another navigation affordance.
46
+ when another navigation affordance remains.
49
47
 
50
48
  The drawer omits the app bar's surface label. Open and rail icons share a
51
- centreline. It uses a 12px outer item inset; `navigationItemSpacing` (12px)
52
- controls icon/label and label/end gaps. The 80px rail centres 48px targets; set
53
- `railWidth` (for example, `64`) for a denser rail or `drawerWidth` for a fixed
54
- drawer. The wrapper forwards these props; never override its CSS.
55
-
56
- Existing apps: commit work and run `npm run jskit:update`. Keep and adapt
57
- the app-owned shell wrapper and smoke test; do not copy or delete them.
49
+ centreline. It uses a 12px outer item inset; `navigationItemSpacing` controls
50
+ icon/label and label/end gaps. The normal 80px rail centres 48px targets;
51
+ `railWidth` and `drawerWidth` are public density/width controls. Do not override
52
+ the shell's private implementation CSS.
58
53
 
59
54
  ## Browser verification
60
55
 
61
56
  Exercise user-facing changes with Playwright at compact, medium, and expanded
62
57
  widths. Check overflow, clipped text, duplicate navigation, route placement,
63
- actions, and target sizes. Use relative URLs; shared JSKIT config owns base URL,
64
- server, and storage state. With `PLAYWRIGHT_BASE_URL`, start no server. Never
65
- print/commit `VIBE64_PLAYWRIGHT_STORAGE_STATE`, use a local bypass with it, or
66
- install a browser when a managed runner supplies one.
67
-
68
- For explicitly enabled direct-local auth, use `loginAsExistingUser()` from
69
- `@jskit-ai/auth-web/test/playwright`; never expose its secret to browser code,
70
- URLs, or client env. Run the focused test directly:
58
+ actions, skeleton replacement, error feedback, and target sizes. Use relative
59
+ URLs. When `PLAYWRIGHT_BASE_URL` is provided, start no duplicate server.
60
+
61
+ Vibe64 owns its managed browser and may provide
62
+ `VIBE64_PLAYWRIGHT_STORAGE_STATE`; never print or commit that value, bypass it,
63
+ or install another browser. For explicitly enabled direct-local auth, use
64
+ `loginAsExistingUser()` from `@jskit-ai/auth-web/test/playwright`; never expose
65
+ the exchange secret to browser code, URLs, or client environment.
66
+
67
+ Run the narrow test directly:
71
68
 
72
69
  ```bash
73
70
  npx playwright test <test-file> -g "<changed behavior>"
@@ -1,6 +1,7 @@
1
1
  # App Agent Instructions
2
2
 
3
- Use the JSKIT agent docs and the local app scaffold as the source of truth for app work.
3
+ Use current project context, JSKIT public APIs, and the installed JSKIT pattern
4
+ index as the source of truth for application work.
4
5
 
5
6
  Recommended references:
6
7
 
@@ -8,6 +9,9 @@ Recommended references:
8
9
  - `node_modules/@jskit-ai/agent-docs/patterns/INDEX.md`
9
10
 
10
11
  Before database, schema, CRUD, repository, or persistence work, read and follow
11
- `node_modules/@jskit-ai/agent-docs/patterns/crud-scaffolding.md`.
12
+ the relevant package-owned pattern listed in
13
+ `node_modules/@jskit-ai/agent-docs/reference/autogen/PATTERN_INDEX.md`.
12
14
 
13
- Keep changes scoped to the user request and verify runtime behavior with tests or explicit checks.
15
+ Copied pattern source is ordinary application source. Do not add generator
16
+ provenance, receipts, completion ledgers, or tooling-operation history. Keep
17
+ changes scoped to the user request and verify runtime behavior directly.