@jskit-ai/agent-docs 0.1.131 → 0.1.133
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/guide/agent/app-extras/assistant.md +29 -605
- package/guide/agent/app-extras/mobile-capacitor.md +29 -362
- package/guide/agent/app-extras/realtime.md +29 -277
- package/guide/agent/app-setup/a-more-interesting-shell.md +44 -815
- package/guide/agent/app-setup/authentication.md +43 -1073
- package/guide/agent/app-setup/console.md +26 -298
- package/guide/agent/app-setup/database-layer.md +110 -790
- package/guide/agent/app-setup/existing-application-migration.md +273 -0
- package/guide/agent/app-setup/initial-scaffolding.md +50 -784
- package/guide/agent/app-setup/multi-homing.md +39 -712
- package/guide/agent/app-setup/quickstart.md +43 -179
- package/guide/agent/app-setup/users.md +34 -353
- package/guide/agent/index.md +17 -23
- package/package.json +2 -2
- package/patterns/INDEX.md +7 -7
- package/patterns/child-cruds.md +3 -3
- package/patterns/client-requests.md +6 -6
- package/patterns/crud-authoring.md +94 -0
- package/patterns/crud-links.md +1 -1
- package/patterns/feature-package/PATTERN.md +108 -0
- package/patterns/feature-package/example/booking-engine/package.json +48 -0
- package/patterns/feature-package/example/booking-engine/src/server/BookingEngineProvider.js +33 -0
- package/patterns/feature-package/example/booking-engine/src/server/actions.js +26 -0
- package/patterns/feature-package/example/booking-engine/src/server/inputSchemas.js +19 -0
- package/patterns/feature-package/example/variations/AvailabilityEngineProvider.js +31 -0
- package/patterns/feature-package/example/variations/InvoiceRollupProvider.js +36 -0
- package/patterns/feature-package/example/variations/customKnexRepository.js +34 -0
- package/patterns/feature-package/example/variations/orchestratorService.js +23 -0
- package/patterns/filters.md +8 -8
- package/patterns/live-actions.md +5 -18
- package/patterns/minimal-foundation/PATTERN.md +98 -0
- package/patterns/minimal-foundation/example/.nvmrc +1 -0
- package/patterns/minimal-foundation/example/AGENTS.md +17 -0
- package/patterns/minimal-foundation/example/Procfile +2 -0
- package/patterns/minimal-foundation/example/app.json +14 -0
- package/patterns/minimal-foundation/example/bin/develop.js +71 -0
- package/patterns/minimal-foundation/example/bin/server.js +8 -0
- package/patterns/minimal-foundation/example/config/public.js +40 -0
- package/patterns/minimal-foundation/example/config/server.js +1 -0
- package/patterns/minimal-foundation/example/config/surfaceAccessPolicies.js +3 -0
- package/patterns/minimal-foundation/example/eslint.config.mjs +19 -0
- package/patterns/minimal-foundation/example/favicon.svg +7 -0
- package/patterns/minimal-foundation/example/gitignore +9 -0
- package/patterns/minimal-foundation/example/index.html +13 -0
- package/patterns/minimal-foundation/example/jsconfig.json +8 -0
- package/patterns/minimal-foundation/example/package.json +57 -0
- package/patterns/minimal-foundation/example/packages/main/package.json +42 -0
- package/patterns/minimal-foundation/example/packages/main/src/shared/index.js +10 -0
- package/patterns/minimal-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
- package/patterns/minimal-foundation/example/playwright.config.mjs +31 -0
- package/patterns/minimal-foundation/example/server/lib/runtimeEnv.js +45 -0
- package/patterns/minimal-foundation/example/server/lib/surfaceRuntime.js +10 -0
- package/patterns/minimal-foundation/example/server.js +195 -0
- package/patterns/minimal-foundation/example/src/App.vue +13 -0
- package/patterns/minimal-foundation/example/src/main.js +85 -0
- package/patterns/minimal-foundation/example/src/pages/home/index.vue +48 -0
- package/patterns/minimal-foundation/example/src/pages/home.vue +13 -0
- package/patterns/minimal-foundation/example/src/views/NotFound.vue +13 -0
- package/patterns/minimal-foundation/example/tests/client/smoke.vitest.js +7 -0
- package/patterns/minimal-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
- package/patterns/minimal-foundation/example/tests/server/smoke.test.js +16 -0
- package/patterns/minimal-foundation/example/vite.config.mjs +81 -0
- package/patterns/page-scaffolding.md +20 -17
- package/patterns/placements.md +17 -15
- package/patterns/row-policies.md +4 -5
- package/patterns/server-search.md +3 -3
- package/patterns/shell-foundation/PATTERN.md +104 -0
- package/patterns/shell-foundation/example/.nvmrc +1 -0
- package/patterns/shell-foundation/example/AGENTS.md +17 -0
- package/patterns/shell-foundation/example/Procfile +2 -0
- package/patterns/shell-foundation/example/app.json +14 -0
- package/patterns/shell-foundation/example/bin/develop.js +71 -0
- package/patterns/shell-foundation/example/bin/server.js +8 -0
- package/patterns/shell-foundation/example/config/public.js +40 -0
- package/patterns/shell-foundation/example/config/server.js +1 -0
- package/patterns/shell-foundation/example/config/surfaceAccessPolicies.js +3 -0
- package/patterns/shell-foundation/example/eslint.config.mjs +19 -0
- package/patterns/shell-foundation/example/favicon.svg +7 -0
- package/patterns/shell-foundation/example/gitignore +9 -0
- package/patterns/shell-foundation/example/index.html +13 -0
- package/patterns/shell-foundation/example/jsconfig.json +8 -0
- package/patterns/shell-foundation/example/package.json +59 -0
- package/patterns/shell-foundation/example/packages/main/package.json +56 -0
- package/patterns/shell-foundation/example/packages/main/src/client/index.js +9 -0
- package/patterns/shell-foundation/example/packages/main/src/client/providers/MainClientProvider.js +18 -0
- package/patterns/shell-foundation/example/packages/main/src/shared/index.js +10 -0
- package/patterns/shell-foundation/example/packages/main/src/shared/schemas/index.js +22 -0
- package/patterns/shell-foundation/example/playwright.config.mjs +31 -0
- package/patterns/shell-foundation/example/server/lib/runtimeEnv.js +45 -0
- package/patterns/shell-foundation/example/server/lib/surfaceRuntime.js +10 -0
- package/patterns/shell-foundation/example/server.js +195 -0
- package/patterns/shell-foundation/example/src/App.vue +11 -0
- package/patterns/shell-foundation/example/src/components/ShellLayout.vue +12 -0
- package/patterns/shell-foundation/example/src/components/menus/MenuLinkItem.vue +30 -0
- package/patterns/shell-foundation/example/src/components/menus/SurfaceAwareMenuLinkItem.vue +42 -0
- package/patterns/shell-foundation/example/src/components/menus/TabLinkItem.vue +42 -0
- package/patterns/shell-foundation/example/src/error.js +19 -0
- package/patterns/shell-foundation/example/src/main.js +85 -0
- package/patterns/shell-foundation/example/src/pages/home/index.vue +116 -0
- package/patterns/shell-foundation/example/src/pages/home/settings/general/index.vue +40 -0
- package/patterns/shell-foundation/example/src/pages/home/settings/index.vue +7 -0
- package/patterns/shell-foundation/example/src/pages/home/settings.vue +109 -0
- package/patterns/shell-foundation/example/src/pages/home.vue +20 -0
- package/patterns/shell-foundation/example/src/placement.js +56 -0
- package/patterns/shell-foundation/example/src/placementTopology.js +149 -0
- package/patterns/shell-foundation/example/src/views/NotFound.vue +13 -0
- package/patterns/shell-foundation/example/tests/client/smoke.vitest.js +7 -0
- package/patterns/shell-foundation/example/tests/e2e/adaptive-shell.spec.ts +10 -0
- package/patterns/shell-foundation/example/tests/e2e/base-shell.spec.ts +23 -0
- package/patterns/shell-foundation/example/tests/server/smoke.test.js +16 -0
- package/patterns/shell-foundation/example/vite.config.mjs +81 -0
- package/patterns/ui-contract.md +56 -0
- package/patterns/ui-testing.md +10 -12
- package/reference/autogen/KERNEL_MAP.md +29 -107
- package/reference/autogen/PATTERN_INDEX.md +230 -0
- package/reference/autogen/README.md +4 -8
- package/reference/autogen/packages/agent-docs.md +259 -0
- package/reference/autogen/packages/assistant-core.md +3 -3
- package/reference/autogen/packages/assistant-runtime.md +32 -17
- package/reference/autogen/packages/auth-core.md +31 -33
- package/reference/autogen/packages/auth-provider-local-core.md +4 -12
- package/reference/autogen/packages/auth-provider-local-db-core.md +4 -4
- package/reference/autogen/packages/auth-provider-supabase-core.md +14 -18
- package/reference/autogen/packages/auth-web.md +42 -22
- package/reference/autogen/packages/console-core.md +8 -25
- package/reference/autogen/packages/console-web.md +5 -5
- package/reference/autogen/packages/crud-core.md +61 -17
- package/reference/autogen/packages/database-runtime-mysql.md +12 -2
- package/reference/autogen/packages/database-runtime-postgres.md +12 -2
- package/reference/autogen/packages/database-runtime.md +26 -25
- package/reference/autogen/packages/google-rewarded-core.md +19 -104
- package/reference/autogen/packages/http-runtime.md +4 -8
- package/reference/autogen/packages/http-web.md +32 -0
- package/reference/autogen/packages/json-rest-api-core.md +4 -6
- package/reference/autogen/packages/kernel.md +109 -390
- package/reference/autogen/packages/mobile-capacitor.md +2 -13
- package/reference/autogen/packages/realtime.md +29 -26
- package/reference/autogen/packages/resource-crud-core.md +6 -0
- package/reference/autogen/packages/shell-web.md +69 -54
- package/reference/autogen/packages/storage-runtime.md +3 -3
- package/reference/autogen/packages/uploads-image-web.md +0 -1
- package/reference/autogen/packages/uploads-runtime.md +3 -3
- package/reference/autogen/packages/users-core.md +45 -90
- package/reference/autogen/packages/users-web.md +5 -7
- package/reference/autogen/packages/workspaces-core.md +53 -74
- package/reference/autogen/packages/workspaces-web.md +15 -16
- package/reference/autogen/tooling/jskit-catalog.md +34 -0
- package/reference/autogen/tooling/testUtils.md +4 -4
- package/skills/jskit/SKILL.md +38 -31
- package/skills/jskit/references/app-operations.md +68 -53
- package/skills/jskit/references/crud-operations.md +58 -106
- package/skills/jskit/references/material-3.md +1 -1
- package/skills/jskit/references/ui-operations.md +41 -44
- package/templates/app/AGENTS.md +7 -3
- package/guide/agent/app-setup/upgrade-beta-1-to-final.md +0 -252
- package/guide/agent/app-setup/working-with-the-jskit-cli.md +0 -325
- package/guide/agent/generators/advanced-cruds.md +0 -1935
- package/guide/agent/generators/crud-generators.md +0 -948
- package/guide/agent/generators/intro.md +0 -65
- package/guide/agent/generators/row-policies.md +0 -537
- package/guide/agent/generators/ui-generators.md +0 -690
- package/patterns/crud-scaffolding.md +0 -198
- package/patterns/generated-ui-contract-tracking.md +0 -66
- package/reference/autogen/packages/assistant.md +0 -68
- package/reference/autogen/packages/crud-server-generator.md +0 -215
- package/reference/autogen/packages/crud-ui-generator.md +0 -192
- package/reference/autogen/packages/feature-server-generator.md +0 -65
- package/reference/autogen/packages/ui-generator.md +0 -127
- package/reference/autogen/tooling/create-app.md +0 -317
- package/reference/autogen/tooling/jskit-cli.md +0 -933
- package/reference/autogen/tooling/test-support.md +0 -27
|
@@ -1,67 +1,82 @@
|
|
|
1
1
|
# Application operations
|
|
2
2
|
|
|
3
|
-
Read this for
|
|
3
|
+
Read this for establishing an application foundation, selecting package
|
|
4
|
+
capabilities, and realizing product features from JSKIT patterns.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Establish a new application
|
|
6
7
|
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
21
|
-
|
|
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
|
-
##
|
|
33
|
+
## Install and compose capabilities
|
|
25
34
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
`
|
|
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
|
-
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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.
|
|
@@ -18,7 +18,7 @@ An established JSKIT prop or component wins over generic Material advice.
|
|
|
18
18
|
|
|
19
19
|
Use this order:
|
|
20
20
|
|
|
21
|
-
1. Reuse the JSKIT package,
|
|
21
|
+
1. Reuse the JSKIT package, source pattern, shared screen, shell, placement, or
|
|
22
22
|
high-level composable that owns the behavior.
|
|
23
23
|
2. Use the matching Vuetify component and its public props, variants, slots,
|
|
24
24
|
density, responsive, theme, and accessibility behavior.
|
|
@@ -5,69 +5,66 @@ verification.
|
|
|
5
5
|
|
|
6
6
|
## Pages, surfaces, and placements
|
|
7
7
|
|
|
8
|
-
Take the surface from the request
|
|
9
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
##
|
|
19
|
+
## Application-owned files
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
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`
|
|
52
|
-
|
|
53
|
-
`railWidth`
|
|
54
|
-
|
|
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
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
For explicitly enabled direct-local auth, use
|
|
69
|
-
`@jskit-ai/auth-web/test/playwright`; never expose
|
|
70
|
-
URLs, or client
|
|
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>"
|
package/templates/app/AGENTS.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# App Agent Instructions
|
|
2
2
|
|
|
3
|
-
Use
|
|
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
|
-
|
|
12
|
+
the relevant package-owned pattern listed in
|
|
13
|
+
`node_modules/@jskit-ai/agent-docs/reference/autogen/PATTERN_INDEX.md`.
|
|
12
14
|
|
|
13
|
-
|
|
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.
|