@jskit-ai/agent-docs 0.1.131 → 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 (170) 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 +34 -29
  149. package/skills/jskit/references/app-operations.md +68 -53
  150. package/skills/jskit/references/crud-operations.md +58 -106
  151. package/skills/jskit/references/material-3.md +1 -1
  152. package/skills/jskit/references/ui-operations.md +41 -44
  153. package/templates/app/AGENTS.md +7 -3
  154. package/guide/agent/app-setup/upgrade-beta-1-to-final.md +0 -252
  155. package/guide/agent/app-setup/working-with-the-jskit-cli.md +0 -325
  156. package/guide/agent/generators/advanced-cruds.md +0 -1935
  157. package/guide/agent/generators/crud-generators.md +0 -948
  158. package/guide/agent/generators/intro.md +0 -65
  159. package/guide/agent/generators/row-policies.md +0 -537
  160. package/guide/agent/generators/ui-generators.md +0 -690
  161. package/patterns/crud-scaffolding.md +0 -198
  162. package/patterns/generated-ui-contract-tracking.md +0 -66
  163. package/reference/autogen/packages/assistant.md +0 -68
  164. package/reference/autogen/packages/crud-server-generator.md +0 -215
  165. package/reference/autogen/packages/crud-ui-generator.md +0 -192
  166. package/reference/autogen/packages/feature-server-generator.md +0 -65
  167. package/reference/autogen/packages/ui-generator.md +0 -127
  168. package/reference/autogen/tooling/create-app.md +0 -317
  169. package/reference/autogen/tooling/jskit-cli.md +0 -933
  170. package/reference/autogen/tooling/test-support.md +0 -27
@@ -1,198 +0,0 @@
1
- # CRUD Scaffolding Patterns
2
-
3
- Use when:
4
-
5
- - creating a new CRUD-backed entity
6
- - deciding how to create a CRUD table
7
- - deciding whether to scaffold server first or UI first
8
- - deciding whether a CRUD needs a migration, a generator, or both
9
-
10
- Check first:
11
-
12
- - the intended ownership model
13
- - the real database table shape
14
- - `jskit show crud-server-generator --details`
15
- - whether the request is server-only CRUD or server-plus-UI CRUD
16
-
17
- ## Fresh minimal-app order
18
-
19
- After `create-app`, run `npm install` before invoking the local CLI, and then
20
- use `npx --no-install jskit` so a missing local CLI fails clearly. For a fresh
21
- minimal CRUD app, the complete order is:
22
-
23
- 1. create the app
24
- 2. `npm install`
25
- 3. add the database runtime
26
- 4. `npm install`
27
- 5. create the live table in a fresh disposable development database
28
- 6. run `crud-server-generator scaffold`
29
- 7. `npm install`
30
- 8. run `crud-ui-generator crud`
31
-
32
- The server generator resolves its complete package dependency closure. In
33
- particular, `shell-web` owns and establishes `src/placement.js` before
34
- `realtime` appends its placement. Do not pre-install `shell-web` as a
35
- workaround.
36
-
37
- ## Non-negotiable database contract
38
-
39
- Before database, schema, CRUD, repository, or persistence work, read this
40
- pattern completely. Use the database selected for this app's development
41
- runtime; never alter a production or other valuable database to develop or
42
- verify schema changes. Prove the complete migration
43
- chain against a fresh disposable database before reporting completion.
44
-
45
- For normal app-owned CRUD tables:
46
-
47
- - use exactly one non-null integer primary-key column, normally
48
- `id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY`
49
- - make every foreign key single-column and point it directly to the referenced
50
- table's single-column primary key
51
- - use multi-column unique indexes only for business uniqueness, never as
52
- relationship targets
53
- - use only direct `workspace_id` and/or `user_id` columns for generated JSKIT
54
- ownership, and select the ownership filter that matches those columns exactly
55
- - express tenant-safe relationships as direct ownership plus a normal
56
- `parent_id -> parent.id` relationship; resolve related IDs through the
57
- workspace-scoped service and test both allowed and cross-workspace cases
58
-
59
- Do not use composite primary keys or composite foreign keys to encode tenant
60
- ownership, target a business key from a foreign key, or duplicate parent
61
- identity when the related row ID already identifies it. Stop before generation
62
- if the proposed table violates these constraints.
63
-
64
- Rules:
65
-
66
- - For a CRUD-backed entity, create the validated table in the managed
67
- development database first. Then make
68
- `jskit generate crud-server-generator scaffold ...` the first JSKIT scaffold.
69
- - Unless the table is already owned by a JSKIT baseline package or is an explicit narrow exception recorded in `.jskit/table-ownership.json`, every persisted app-owned table must go through that server CRUD step first.
70
- - That server scaffold is the crucial first step even if no CRUD UI will be created yet.
71
- - If the table should already be CRUD-owned but should not expose public CRUD HTTP routes yet, scaffold it with `jskit generate crud-server-generator scaffold ... --internal` instead of dropping to direct knex or a hand-built pseudo-repository.
72
- - Create the real table directly in the database before scaffolding. `crud-server-generator` reads the live table shape.
73
- - If `crud-server-generator` is going to own the CRUD, do not hand-write a separate CRUD migration for that table. The generator installs and manages the CRUD migration scaffold itself.
74
- - Never modify or replace a generator-owned baseline migration after it has
75
- been installed. Later schema evolution must use a new immutable,
76
- package-owned additive migration declared through `install-migration`.
77
- - Keep generated table creation in `migrations/` and generated foreign keys in
78
- `migrations/constraints/`. The database runtime deliberately runs those
79
- phases in that order so valid mutual foreign keys rebuild cleanly without
80
- disabling constraint checks.
81
- - Do not scaffold CRUD UI, hand-build CRUD routes, or hand-build CRUD endpoints before the server CRUD package and shared resource file exist.
82
- - Treat the generated shared resource file as the canonical CRUD contract for later UI scaffolding and CRUD behavior changes.
83
- - Treat the exact columns `workspace_id` and `user_id` as reserved JSKIT ownership columns. They are the only standard columns used for generated ownership filtering and create-time owner stamping.
84
- - Treat other foreign keys such as `recipient_user_id`, `created_by_user_id`, `assignee_user_id`, and similarly specific names as domain relationships, not ownership aliases. Do not rename a relationship to `user_id` or `workspace_id` merely to satisfy tooling.
85
- - Require the resolved ownership filter to match the reserved columns exactly: neither the filter nor the schema may silently add or omit `workspace_id` or `user_id` ownership.
86
- - `feature-server-generator` is not the default lane for ordinary persisted entities. Use it for workflows or orchestration that sit on top of CRUD-owned tables, or for rare explicit non-CRUD exceptions.
87
- - Generated CRUD UI must be compact-first. Lists need searchable cards on compact widths and tables only for medium/expanded layouts.
88
- - Generated CRUD list screens need real loading, empty, and error states. Empty copy should name the resource, such as "No customers yet", and offer the create action when available.
89
- - Generated CRUD view/new/edit screens should use page headers plus direct sheet panels. Do not use generic card shells as the page architecture.
90
- - Keep generated reusable Vue helpers outside `src/pages/`; the file router inventories every Vue file below that root as a browser route. CRUD form helpers mirror the validated target root under `src/components/`.
91
- - Permission-gated generated CRUD lists should pass `readEnabled` into `useCrudListScreen(...)` instead of replacing the shared list wrapper.
92
- - Compact CRUD actions should be reachable without a drawer. Use a mobile-visible primary action or FAB for create flows.
93
- - Row actions should be declared with `defineCrudListRowActions(...)` in a page-local `listRowActions.js` and passed into `useCrudListScreen(...)`; the shared list screen owns the compact/wide action rendering.
94
- - Use `syntheticRows` for display-only owner/master rows that should appear inside the shared list layout without becoming CRUD records.
95
- - Bulk actions should be declared in the generated page-local `listBulkActions.js`. The generated list owns selection state, keeps selection controls hidden until actions exist, and exposes selected ids/records to action handlers.
96
- - Structured filters should use shared filter definitions and collapse to compact filter controls/sheets when they outgrow simple search. Do not stack dense desktop filter bars on phone widths.
97
- - Use `--navigation-role` for CRUD list placement intent. Main resources can stay `primary`; nested/detail/workflow CRUD routes should usually be `secondary`, `workflow`, or `none`.
98
- - Add `--delete-confirmation` when the generated view needs the standard
99
- destructive record action. The flag requires list and view pages and a
100
- resource with a `DELETE` operation; it uses `CrudDeleteAction` in the public
101
- view-screen action slot and the standard command composable rather than
102
- generating page-local dialog or request code.
103
-
104
- ## Temporal values at resource boundaries
105
-
106
- Resource validators accept strict string temporal values and reject JavaScript
107
- `Date` objects:
108
-
109
- - `date` is `YYYY-MM-DD`
110
- - `time` is offset-free `HH:MM[:SS[.fraction]]`
111
- - `dateTime` is RFC 3339 with seconds and `Z` or a numeric offset
112
-
113
- Use `epochMilliseconds` or `epochSeconds` for numeric epoch values after
114
- checking the stored unit. Preserve the field's
115
- `temporalPrecision`; do not truncate meaningful fractional seconds.
116
-
117
- Generated generic CRUD repositories serialize database temporal outputs
118
- before resource validation. App-owned/custom repositories must return strict
119
- strings and must write ISO/RFC 3339 strings rather than passing `Date` objects.
120
-
121
- ## Baseline generation versus later schema evolution
122
-
123
- The initial CRUD scaffold and a later schema change are different operations:
124
-
125
- - The server generator owns the baseline migration that recreates the table
126
- from zero. Do not edit, replace, or regenerate that installed baseline to
127
- express a later change.
128
- - The table's app-local package owns later schema evolution. Create each change
129
- as a new immutable additive migration:
130
-
131
- ```bash
132
- npx jskit create migration \
133
- --package @local/workflow-record-report-values \
134
- --id extend-report-value-field-types
135
- ```
136
-
137
- - The authoring command creates an editable migration template and adds its
138
- `install-migration` mutation to the owning package's `package.json.jskit` in
139
- one operation. Implement and test the template before synchronizing it.
140
- - Synchronize the completed source with
141
- `npx jskit migrations sync`, then apply it with
142
- `npm run db:migrate`.
143
- - SQL or Knex schema operations inside that source-controlled migration are
144
- supported. Ad-hoc SQL applied only to one database is not: it creates schema
145
- drift and leaves fresh installations incorrect.
146
- - Installed migration ids and content are immutable. A correction to an
147
- installed migration is another additive migration with a new id.
148
-
149
- A package-owned additive migration is not the prohibited "separate CRUD
150
- migration." The prohibition applies to competing with or modifying the
151
- generator-owned baseline.
152
-
153
- Meaning of `--internal`:
154
-
155
- - it keeps the generated repository, service, actions, provider, resource, and CRUD migration ownership chain
156
- - it only suppresses public HTTP CRUD route registration
157
- - it is not a substitute for ownership columns or action/route permissions
158
- - it does not suppress generated action permission ids or decide which role receives them
159
-
160
- Workspace role grants:
161
-
162
- - every workspace-required CRUD generation must explicitly choose `--grant-role <role-id>` or `--no-role-grant`
163
- - applications that assign generated CRUD permissions to `member` must say `--grant-role member`; fixed-role applications must name one of their real roles or choose no automatic grant
164
- - `--grant-role` and `--no-role-grant` are permission-design choices independent of `--internal`
165
- - never invent a `member` role only to satisfy the generator
166
-
167
- When a weird-custom persistence lane is proposed:
168
-
169
- - Treat hand-written repositories for persisted app-owned entity tables as an exception path, not a normal choice.
170
- - That includes things like:
171
- - direct knex instead of generated CRUD ownership
172
- - a custom repository/service/provider stack for a normal persisted entity table
173
- - inherited-ownership or mixed-visibility workarounds that dodge the standard CRUD ownership model
174
- - Before taking that path, stop and ask the developer for explicit approval.
175
- - Record the exact approval and the approved exception in `.jskit/WORKBOARD.md` before coding.
176
- - If that exception changes the durable architecture rather than only the current chunk, record it in `.jskit/APP_BLUEPRINT.md` too.
177
- - Without that explicit approval record, do not take the weird-custom persistence path.
178
- - Record durable, approved schema exceptions in `.jskit/APP_BLUEPRINT.md` as
179
- well as the table-ownership exception; an exception must not silently weaken
180
- the normal generated CRUD contract.
181
-
182
- Before reporting completion:
183
-
184
- - verify there are no composite primary or foreign keys in the generated CRUD
185
- tables
186
- - verify every generated CRUD foreign key targets a single-column primary key
187
- - apply the generated migrations from zero to a fresh disposable database
188
- - compare the recreated schema with the intended development schema
189
- - run positive and negative cross-workspace relationship tests where ownership
190
- applies, then run JSKIT Doctor and the project's normal verifier
191
-
192
- Avoid:
193
-
194
- - writing a hand migration for a CRUD table that JSKIT CRUD scaffolding is supposed to own
195
- - starting with `crud-ui-generator` before the server scaffold exists
196
- - hand-building CRUD routes or validators that duplicate the generated server resource contract
197
- - letting a new app-owned table exist in the live database without either generated CRUD ownership or a documented `.jskit/table-ownership.json` exception
198
- - accepting table-only CRUD UI as "done" when the route is visible on phone widths
@@ -1,66 +0,0 @@
1
- # Generated UI Contract Tracking
2
-
3
- Use this file to track the generator-level UI contract work. Keep entries concrete and update the checklist as each slice lands.
4
-
5
- ## Goal
6
-
7
- Generated JSKIT apps should feel like real adaptive apps by default, not framework demos. The contract must be enforced in generators, package metadata, docs, and tests so it does not drift.
8
-
9
- ## Current Scope
10
-
11
- - [x] Centralize navigation role behavior beyond per-generator helpers.
12
- - [x] Improve product-aware navigation inference and CLI prompting.
13
- - [x] Audit generated/package UI templates for placeholder or instructional live-page copy.
14
- - [x] Formalize surface density rules for app, admin, console, and settings screens.
15
- - [x] Add shared typography/density primitives or generator support helpers where they reduce duplication.
16
- - [x] Enforce "no cards inside cards" for generated page architecture while preserving intentional tool/dialog cards.
17
- - [x] Expand UI verification from shell smoke coverage to generator-pattern smoke coverage for current page, CRUD, and shell outputs.
18
- - [x] Centralize the JSKIT design contract and make tests consume it.
19
-
20
- ## Work Slices
21
-
22
- - [x] Slice 1: create the central contract/support seam and move navigation-role constants into it.
23
- - [x] Slice 2: wire `ui-generator` and `crud-ui-generator` to the shared contract.
24
- - [x] Slice 3: add template/content contract scans for placeholder copy, card-shell misuse, and missing responsive hooks.
25
- - [x] Slice 4: audit package templates that ship live UI and classify intentional cards.
26
- - [x] Slice 5a: extend generated app Playwright smoke coverage to assert the generated screen contract.
27
- - [x] Slice 5b: enforce page, CRUD, and shell generator-pattern verification through shared source contracts plus responsive smoke checks.
28
- - [x] Slice 6: update distributed agent docs and regenerated references/catalog outputs.
29
-
30
- ## Verification Checklist
31
-
32
- - [x] `npm run lint`
33
- - [x] `npm run check:runtime-deps`
34
- - [x] `npx jskit lint-packages`
35
- - [x] `npm run catalog:build`
36
- - [x] `npm run agent-docs:build`
37
- - [x] `npm test --workspace @jskit-ai/kernel`
38
- - [x] `npm test --workspace @jskit-ai/ui-generator`
39
- - [x] `npm test --workspace @jskit-ai/crud-ui-generator`
40
- - [x] `npm test --workspace @jskit-ai/shell-web`
41
- - [x] `npm test --workspace @jskit-ai/http-web`
42
- - [x] `npm test --workspace @jskit-ai/workspaces-web`
43
- - [x] `npm test --workspace @jskit-ai/jskit-cli`
44
- - [x] `npm test --workspace @jskit-ai/create-app`
45
- - [x] `npm test --workspace @jskit-ai/agent-docs`
46
- - [x] `git diff --check`
47
-
48
- ## Notes
49
-
50
- - Do not weaken semantic placement defaults while adding navigation inference.
51
- - Do not turn the contract into runtime business logic; it is generator and template policy.
52
- - Do not remove intentional cards from specialist UI components just to satisfy a broad scan.
53
- - Keep generated files deterministic and update catalog/agent-doc outputs when package metadata or exported symbols change.
54
- - Kernel shared UI contract must stay surface-id agnostic. Concrete mappings like admin/console to operator profile belong in generators or package templates.
55
- - Item 3 is complete for current generated surfaces: page, CRUD, shell, and starter outputs require compact/medium/expanded coverage, horizontal overflow checks, generated screen checks, and compact generated-screen 48px tap target checks. Calendar/grid/bottom-sheet specialist generators remain future scope until those generators exist.
56
- - Item 5 is complete for current generators: `primary`, `secondary`, `utility`, `detail`, `workflow`, and `none` are centralized in the generated UI contract, generators consume that contract, and `utility` resolves to seeded `shell.global-actions` topology.
57
- - Item 6 is complete for the default shell: compact app bars use compact density and bounded top-left/top-right regions, while primary navigation remains in semantic bottom navigation instead of app-bar chrome.
58
- - CRUD filters are client-side by default: generated list pages create a page-local `listFilters.js` and pass it into `useCrudListScreen(...)`; the shared list screen wires `filterRuntime.queryParams` into the list request and renders `CrudListFilterSurface`. When server filtering is needed, promote the definitions into a shared package module and use `createCrudListFilterContract(...)` so route/action validators, JSON REST search schema, and repository query normalization stay derived from the same definition.
59
- - CRUD bulk actions are client-side by default: generated list pages create a page-local `listBulkActions.js` and pass it into `useCrudListScreen(...)`; the shared list screen wires `useCrudListBulkActions(...)` and keeps selection controls hidden until actions are declared.
60
- - CRUD row actions are client-side by default: generated list pages can create a page-local `listRowActions.js` with `defineCrudListRowActions(...)` and pass it into `useCrudListScreen(...)`; the shared list screen renders per-row actions in card and table layouts while action handlers stay explicit and page-owned.
61
- - CRUD synthetic rows are display-only: pass `syntheticRows` into `useCrudListScreen(...)` for owner/master rows that are not repository records. Synthetic rows render through the shared list screen, skip standard Open/Edit links, and are excluded from bulk selection unless explicitly marked selectable.
62
- - Generated CRUD page templates delegate their screen chrome to shared `http-web` screen components (`CrudListScreen`, `CrudViewScreen`, and `CrudAddEditScreen`) so list/view/form load states, retry actions, responsive shell layout, filters, bulk actions, row actions, and detail slots do not drift across generated pages.
63
- - Generated CRUD list pages should use `useCrudListScreen({ requestQueryParams, readEnabled })` for list read pass-throughs instead of replacing the shared list chrome for includes or permission-gated reads.
64
- - Generated CRUD detail pages should use `useCrudViewScreen({ requestQueryParams, readEnabled, queryKeyFactory })` for read pass-throughs and `CrudViewScreen` slots (`before-fields`, `fields`, `after-fields`, `supporting-content`) for domain sections instead of replacing the shared detail chrome.
65
- - Routine resource-load errors stay local to the generated screen and retry affordance. Action feedback uses the shell error policy through `action-feedback`.
66
- - `page.supporting-content` is a semantic supporting region in the default shell. Compact layout renders it as a closed bottom sheet; medium/expanded layouts render it as a closed side panel.
@@ -1,68 +0,0 @@
1
- # packages/assistant
2
-
3
- Generated by `npm run agent-docs:build`.
4
- Do not edit manually.
5
-
6
- Generated inventory for `packages/assistant`.
7
- Use this on demand; do not load the full index at startup.
8
-
9
- ## Scope
10
- - Source: `packages/assistant/**/*{.js,.mjs,.cjs,.vue}`
11
- - Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `.vitepress/cache/`, `.vitepress/dist/`
12
-
13
- ## Sections
14
-
15
- ### src
16
-
17
- ### `src/server/buildTemplateContext.js`
18
- Exports
19
- - `buildTemplateContext({ appRoot, options } = {})`
20
-
21
- ### `src/server/pageSupport.js`
22
- Exports
23
- - `readAssistantPageTemplateSource(kind = "page")`
24
- - `renderAssistantPageSource(templateSource = "", surfaceId = "")`
25
- - `resolveAssistantPageGenerationContext({ appRoot, targetFile = "", options = {}, context = "assistant page" } = {})`
26
- - `renderAssistantPageLinkPlacementBlock({ marker = "", pageTarget = {}, generationContext = {} } = {})`
27
- - `renderAssistantPageSummary(pageTarget = {}, { pageAlreadyExisted = false, pageOverwritten = false } = {})`
28
- Local functions
29
- - `resolveLinkToPropLine(linkTo = "")`
30
- - `resolveOwnerLine(owner = "")`
31
- - `resolveTemplateFilePath(relativePath = "")`
32
-
33
- ### `src/server/subcommands/page.js`
34
- Exports
35
- - `runGeneratorSubcommand({ appRoot, subcommand = "", args = [], options = {}, dryRun = false } = {})`
36
-
37
- ### `src/server/subcommands/settingsPage.js`
38
- Exports
39
- - `runGeneratorSubcommand({ appRoot, subcommand = "", args = [], options = {}, dryRun = false } = {})`
40
-
41
- ### `src/server/subcommands/support.js`
42
- Exports
43
- - `PLACEMENT_FILE`
44
- - `requireSinglePositionalTargetFile(args = [], { context = "assistant" } = {})`
45
- - `rejectUnexpectedOptions(options = {}, allowedOptionNames = [], { context = "assistant" } = {})`
46
- - `resolvePathWithinApp(appRoot, targetPath, { context = "assistant" } = {})`
47
- - `appendBlockIfMarkerMissing(source = "", marker = "", block = "")`
48
- - `requireEmptyPageSource(existingSource = "", targetRelativePath = "", { context = "assistant", forceOverwrite = false } = {})`
49
- Local functions
50
- - `ensureTrailingNewline(value = "")`
51
-
52
- ### `src/server/support.js`
53
- Exports
54
- - `normalizeConfigScope(value = "")`
55
- - `loadAppConfig(appRoot = "")`
56
- - `resolveSurfaceDefinition(appConfig = {}, surfaceId = "", optionName = "surface")`
57
- - `assertAssistantSurfaceIsAvailable(appConfig = {}, surfaceId = "", expected = {})`
58
- - `resolveAiConfigPrefix(surfaceId = "", explicitPrefix = "")`
59
-
60
- ### templates
61
-
62
- ### `templates/src/pages/assistant/index.vue`
63
- Exports
64
- - None
65
-
66
- ### `templates/src/pages/settings/assistant/index.vue`
67
- Exports
68
- - None
@@ -1,215 +0,0 @@
1
- # packages/crud-server-generator
2
-
3
- Generated by `npm run agent-docs:build`.
4
- Do not edit manually.
5
-
6
- Generated inventory for `packages/crud-server-generator`.
7
- Use this on demand; do not load the full index at startup.
8
-
9
- ## Scope
10
- - Source: `packages/crud-server-generator/**/*{.js,.mjs,.cjs,.vue}`
11
- - Excludes: `test/`, `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, `*.vitest.*`, `node_modules/`, `dist/`, `coverage/`, `docs/`, `.vitepress/cache/`, `.vitepress/dist/`
12
-
13
- ## Sections
14
-
15
- ### src
16
-
17
- ### `src/server/buildTemplateContext.js`
18
- Exports
19
- - `buildTemplateContext(input = {})`
20
- - `resolveScaffoldColumns(snapshot)`
21
- - `resolveGenerationSnapshot({ appRoot, tableName, idColumnOption } = {})`
22
- - `renderCanonicalResourceFieldSchema(column, { fieldContractEntry = null } = {})`
23
- - `buildFieldContractEntries({ outputColumns = [], writableColumns = [], snapshot = {} } = {})`
24
- - `resolveCrudGenerationSurfaceId({ appRoot, options, appConfig = null } = {})`
25
- - `prepareInstallHook({ appRoot, packageOptions = {} } = {})`
26
- - `__testables`
27
- Local functions
28
- - `resolveAllowedValues(schema = {}, fallbackValues = [])`
29
- - `resolveGlobalScaffoldCache()`
30
- - `asRecord(value)`
31
- - `resolveBooleanFlagOption(options = {}, optionName = "")`
32
- - `resolveInternalRouteOption(options = {})`
33
- - `resolveNoRoleGrantOption(options = {})`
34
- - `normalizeCrudAccess(value, { strict = false } = {})`
35
- - `assertCrudAccessCompatibility(access, { surfaceRequiresWorkspace = false, ownershipFilter = "" } = {})`
36
- - `normalizeRequestedOwnershipFilter(value, { strict = false } = {})`
37
- - `inferOwnershipFilterFromSnapshot(snapshot)`
38
- - `assertOwnershipColumnsForFilter(snapshot, filter)`
39
- - `resolveOwnershipFilterForGeneration(snapshot, requestedOwnershipFilter, { enforceTableColumns = false } = {})`
40
- - `parseDotEnvLine(line = "")`
41
- - `loadEnvFromApp(appRoot)`
42
- - `createAppRequire(appRoot)`
43
- - `importModuleFromApp(appRequire, moduleId, contextLabel)`
44
- - `resolveCrudSurfaceRequiresWorkspace({ appRoot, options, surface = "", appConfig = null } = {})`
45
- - `loadCrudAppConfig(appRoot = "")`
46
- - `resolveSurfaceDefinitions(appConfig = {})`
47
- - `resolveDefaultCrudSurfaceIdFromAppConfig(appConfig = {})`
48
- - `resolveKnexFactory(moduleNamespace)`
49
- - `resolveMysqlSnapshotFromDatabase({ appRoot, tableName, idColumn } = {})`
50
- - `resolveColumnKey(column, idColumn)`
51
- - `normalizeNumericBoundValue(value, scale = null)`
52
- - `resolveNumericExclusiveStep(column)`
53
- - `applyLowerBound(current = null, candidate = null)`
54
- - `applyUpperBound(current = null, candidate = null)`
55
- - `applyNumericConstraintBound(target = {}, column = null, operator = "", rawValue = null)`
56
- - `resolveColumnNumericBounds(snapshot = {})`
57
- - `isIdentifier(value)`
58
- - `renderObjectPropertyKey(value)`
59
- - `renderBoundedNumberEntries(column)`
60
- - `resolveCanonicalResourceFieldRequired(column = {})`
61
- - `renderCanonicalResourceOperations(column = {})`
62
- - `renderCanonicalResourceSchemaPropertyLines(columns = [], { fieldContractEntries = [] } = {})`
63
- - `resolveJsonRestRelationshipScopeName(fieldContractEntry = null)`
64
- - `resolveJsonRestRelationshipAlias(column = null)`
65
- - `resolveJsonRestFieldType(column = {})`
66
- - `shouldRenderJsonRestSearch(column = {})`
67
- - `shouldRenderJsonRestStorage(column = {})`
68
- - `renderJsonRestFieldSchema(column, { fieldContractEntry = null } = {})`
69
- - `renderJsonRestSchemaPropertyLines(columns = [], { fieldContractEntries = [] } = {})`
70
- - `renderJsonRestSearchSchemaLines(columns = [])`
71
- - `renderJsonRestDefaultSortLine(columns = [])`
72
- - `renderResourceDefaultSortLiteral(columns = [])`
73
- - `renderCurrentTimestampExpression(expression, column)`
74
- - `renderMigrationDefaultClause(column)`
75
- - `renderMigrationSpecificStringType(column, { tableCollation = "" } = {})`
76
- - `renderTemporalColumnBuilder(column, methodName)`
77
- - `renderMigrationColumnLine(column, { idColumn = DEFAULT_ID_COLUMN, primaryKeyColumns = [], foreignKeyColumnNames = new Set(), tableCollation = "" } = {})`
78
- - `renderMigrationColumnLines(snapshot)`
79
- - `renderMigrationIndexLine(index)`
80
- - `renderMigrationIndexLines(snapshot)`
81
- - `renderMigrationForeignKeyLine(foreignKey = {})`
82
- - `renderMigrationForeignKeyLines(snapshot)`
83
- - `renderMigrationDropForeignKeyLine(foreignKey = {})`
84
- - `renderMigrationDropForeignKeyLines(snapshot)`
85
- - `renderMigrationForeignKeyBlock(snapshot, { drop = false } = {})`
86
- - `renderMigrationCheckConstraintLines(snapshot)`
87
- - `mergeFieldMetaEntries(...entryGroups)`
88
- - `resolveLookupNamespaceFromTableName(tableName = "")`
89
- - `toFieldLabel(key = "")`
90
- - `isSupportedSelectOptionValue(value)`
91
- - `toSelectOptionIdentity(value)`
92
- - `toSelectOptionLabel(value)`
93
- - `normalizeFieldMetaUiOptions(rawOptions = [])`
94
- - `resolveEnumFieldMetaUiOptions(enumValues = [])`
95
- - `buildCrudPermissionIds(namespace = "")`
96
- - `resolveConfiguredRoleEntries(appConfig = {})`
97
- - `formatAvailableRoleIds(roleEntries = [])`
98
- - `resolveCrudPermissionGrantRole(appConfig = {}, options = {}, { requiresNamedPermissions = true } = {})`
99
- - `normalizeCrudOperation(operation = "", context = "CRUD operation")`
100
- - `renderRoleCatalogPermissionGrants(namespace = "", { requiresNamedPermissions = true, grantRoleId = "" } = {})`
101
- - `renderActionPermissionSupport(namespace = "", { requiresNamedPermissions = true, access = ACCESS_DEFAULT } = {})`
102
- - `renderActionPermissionExpression(operation = "", { requiresNamedPermissions = true, access = ACCESS_DEFAULT } = {})`
103
- - `renderRouteWorkspaceSupportImports({ surfaceRequiresWorkspace = true } = {})`
104
- - `renderActionWorkspaceValidatorImport({ surfaceRequiresWorkspace = true } = {})`
105
- - `renderRouteParamsValidatorLine(operation = "", { surfaceRequiresWorkspace = true } = {})`
106
- - `renderOptionalTemplateLine(line = "")`
107
- - `renderRouteInputLines(operation = "", { surfaceRequiresWorkspace = true } = {})`
108
- - `renderActionInputSchemaDefinition(lines = [], { mode = "patch" } = {})`
109
- - `renderActionInputExpressions({ surfaceRequiresWorkspace = true } = {})`
110
- - `renderRouteValidatorConstants({ surfaceRequiresWorkspace = true } = {})`
111
- - `buildReplacementsFromSnapshot({ namespace = "", snapshot, resolvedOwnershipFilter, surfaceRequiresWorkspace = true, surfaceId = "", access = ACCESS_DEFAULT, routeInternal = false, permissionGrantRoleId = "" })`
112
- - `resolveCrudGenerationTableName(options = {})`
113
- - `createCacheKey({ appRoot, options })`
114
- - `buildCrudTemplateContext(input = {})`
115
-
116
- ### `src/server/crudModuleConfig.js`
117
- Exports
118
- - None
119
-
120
- ### `src/server/CrudProvider.js`
121
- Exports
122
- - `CrudProvider`
123
-
124
- ### `src/server/subcommands/addField.js`
125
- Exports
126
- - `runGeneratorSubcommand({ appRoot, subcommand = "", args = [], options = {}, dryRun = false, resolveSnapshot = resolveGenerationSnapshot } = {})`
127
- Local functions
128
- - `toPosixPath(value = "")`
129
- - `resolveTargetFilePath(appRoot, targetFile)`
130
- - `parseSubcommandArgs(args = [])`
131
- - `resolveRequestedTableConfig(source = "", options = {}, context = "crud-server-generator scaffold-field")`
132
- - `resolveColumnForField(snapshot = {}, fieldKey = "", { idColumn = "id" } = {})`
133
- - `buildFieldContractEntry(snapshot = {}, column = {})`
134
-
135
- ### `src/server/subcommands/resourceAst.js`
136
- Exports
137
- - `resolveCrudResourceDefaults(source = "", context = "crud-server-generator scaffold-field")`
138
- - `applyCrudResourceFieldPatch(source = "", { fieldKey = "", resourceSchemaExpression = "", context = "crud-server-generator scaffold-field" } = {})`
139
- Local functions
140
- - `isIdentifierName(value = "")`
141
- - `parseModule(source = "", context = "crud-server-generator scaffold-field")`
142
- - `parseExpression(source = "", context = "crud-server-generator scaffold-field")`
143
- - `resolveNodeKeyName(keyNode, { computed = false } = {})`
144
- - `createObjectPropertyKeyNode(key = "")`
145
- - `findVariableDeclarator(programNode, variableName = "")`
146
- - `requireVariableDeclarator(programNode, variableName = "", context = "crud-server-generator scaffold-field")`
147
- - `requireCrudResourceConfigObject(programNode, context = "crud-server-generator scaffold-field")`
148
- - `requireResourceSchemaObject(programNode, context = "crud-server-generator scaffold-field")`
149
- - `assertNoExplicitCrudSchemaOverrides(resourceObject, context = "crud-server-generator scaffold-field")`
150
- - `findObjectPropertyByName(objectNode, propertyName = "")`
151
- - `hasObjectProperty(objectNode, propertyName = "")`
152
- - `insertObjectProperty(objectNode, propertyName = "", valueExpressionSource = "", { context = "crud-server-generator scaffold-field", insertBeforeComputed = false } = {})`
153
- - `resolveObjectPropertyStringValue(objectNode, propertyName = "")`
154
-
155
- ### `src/shared/crud/crudResource.js`
156
- Exports
157
- - `crudResource`
158
-
159
- ### `src/shared/index.js`
160
- Exports
161
- - `crudResource`
162
-
163
- ### templates
164
-
165
- ### `templates/migrations/crud_foreign_keys.cjs`
166
- Exports
167
- - None
168
-
169
- ### `templates/migrations/crud_initial.cjs`
170
- Exports
171
- - None
172
-
173
- ### `templates/src/local-package/server/actions.js`
174
- Exports
175
- - `createActions({ surface } = {})`
176
-
177
- ### `templates/src/local-package/server/CrudProvider.js`
178
- Exports
179
- - `${option:namespace|pascal`
180
- Local functions
181
- - `resolveCrudPolicyFromApp(app)`
182
-
183
- ### `templates/src/local-package/server/registerRoutes.js`
184
- Exports
185
- - `registerRoutes(app, { routeOwnershipFilter = "public", routeSurface = "", routeRelativePath = "" } = {})`
186
-
187
- ### `templates/src/local-package/server/repository.js`
188
- Exports
189
- - `createRepository({ api, knex } = {})`
190
-
191
- ### `templates/src/local-package/server/service.js`
192
- Exports
193
- - `createService({ ${option:namespace|camel}Repository } = {})`
194
- Local functions
195
- - `return404IfNotFound(document = null)`
196
-
197
- ### `templates/src/local-package/shared/crudResource.js`
198
- Exports
199
- - `resource`
200
-
201
- ### `templates/src/local-package/shared/index.js`
202
- Exports
203
- - `resource`
204
-
205
- ### test-support
206
-
207
- ### `test-support/templateServerFixture.js`
208
- Exports
209
- - `resource`
210
- - `createTemplateServerFixture(options = {})`
211
- Local functions
212
- - `buildTemplateReplacements({ surfaceRequiresWorkspace = true, requiresNamedPermissions = surfaceRequiresWorkspace === true, surfaceId = surfaceRequiresWorkspace ? "admin" : "home", access = "authenticated", routeInternal = false } = {})`
213
- - `applyTemplateReplacements(sourceText = "", options = {})`
214
- - `buildResourceStubSource()`
215
- - `renderServerTemplateFile(targetServerDirectory, fileName, options)`