cabloy 5.1.59 → 5.1.61
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/.claude/hooks/contract-loop-gate.ts +296 -0
- package/.claude/settings.json +16 -0
- package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
- package/.claude/skills/cabloy-contract-loop/SKILL.md +103 -14
- package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +126 -12
- package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +148 -0
- package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +49 -13
- package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +11 -0
- package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
- package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
- package/.claude/skills/cabloy-resource-field-update/SKILL.md +274 -0
- package/.claude/skills/cabloy-resource-field-update/evals/evals.json +53 -0
- package/.claude/skills/cabloy-resource-field-update/references/custom-renderer-demo-checklist.md +102 -0
- package/.claude/skills/cabloy-resource-field-update/references/field-update-decision-tree.md +120 -0
- package/.claude/skills/cabloy-resource-field-update/references/follow-up-checklist.md +80 -0
- package/.claude/skills/cabloy-resource-field-update/references/verification-checklist.md +97 -0
- package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
- package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
- package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
- package/.github/workflows/docs-pages.yml +2 -0
- package/.github/workflows/vona-cov-pg.yml +2 -0
- package/.github/workflows/vona-test-crud.yml +4 -2
- package/.github/workflows/vona-test-mysql.yml +2 -0
- package/.github/workflows/vona-test-pg.yml +2 -0
- package/.github/workflows/vona-test-sqlite3.yml +2 -0
- package/.github/workflows/vona-tsc.yml +2 -0
- package/.github/workflows/zova-ui.yml +2 -0
- package/.gitignore +0 -4
- package/CHANGELOG.md +52 -0
- package/CLAUDE.md +12 -0
- package/README.md +15 -0
- package/cabloy-docs/.vitepress/config.mjs +89 -0
- package/cabloy-docs/ai/class-placement-rule.md +2 -0
- package/cabloy-docs/ai/cli-to-skill-map.md +14 -0
- package/cabloy-docs/ai/docs-skills-rules-mapping.md +14 -0
- package/cabloy-docs/ai/future-skill-roadmap.md +27 -9
- package/cabloy-docs/ai/introduction.md +1 -0
- package/cabloy-docs/ai/playbook-backend-module.md +6 -0
- package/cabloy-docs/ai/playbook-module-removal.md +164 -0
- package/cabloy-docs/ai/skills.md +11 -0
- package/cabloy-docs/backend/bean-scene-authoring.md +350 -0
- package/cabloy-docs/backend/cli.md +26 -1
- package/cabloy-docs/backend/dto-guide.md +6 -0
- package/cabloy-docs/backend/entity-guide.md +18 -0
- package/cabloy-docs/backend/foundation.md +28 -3
- package/cabloy-docs/backend/introduction.md +10 -0
- package/cabloy-docs/backend/serialization-guide.md +10 -0
- package/cabloy-docs/backend/service-guide.md +2 -0
- package/cabloy-docs/backend/status-guide.md +271 -0
- package/cabloy-docs/backend/websocket-call-flow.md +435 -0
- package/cabloy-docs/backend/websocket-guide.md +455 -0
- package/cabloy-docs/backend/websocket-protocol-guide.md +381 -0
- package/cabloy-docs/backend/websocket-usage-guide.md +356 -0
- package/cabloy-docs/frontend/api-guide.md +2 -0
- package/cabloy-docs/frontend/bean-scene-authoring.md +374 -0
- package/cabloy-docs/frontend/behavior-guide.md +449 -0
- package/cabloy-docs/frontend/cli.md +24 -0
- package/cabloy-docs/frontend/command-scene-authoring.md +495 -0
- package/cabloy-docs/frontend/design-principles.md +6 -0
- package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
- package/cabloy-docs/frontend/form-guide.md +795 -0
- package/cabloy-docs/frontend/foundation.md +29 -0
- package/cabloy-docs/frontend/introduction.md +17 -1
- package/cabloy-docs/frontend/ioc-and-beans.md +16 -9
- package/cabloy-docs/frontend/mock-guide.md +1 -0
- package/cabloy-docs/frontend/model-architecture.md +252 -39
- package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
- package/cabloy-docs/frontend/model-resource-cookbook.md +505 -0
- package/cabloy-docs/frontend/model-resource-owner-pattern.md +382 -0
- package/cabloy-docs/frontend/model-resource-usage-guide.md +318 -0
- package/cabloy-docs/frontend/model-state-guide.md +366 -13
- package/cabloy-docs/frontend/openapi-sdk-guide.md +5 -2
- package/cabloy-docs/frontend/page-guide.md +6 -0
- package/cabloy-docs/frontend/quickstart.md +4 -0
- package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
- package/cabloy-docs/frontend/router-tabs-admin-web-comparison.md +206 -0
- package/cabloy-docs/frontend/router-tabs-introduction.md +106 -0
- package/cabloy-docs/frontend/router-tabs-mechanism.md +469 -0
- package/cabloy-docs/frontend/router-tabs-overview.md +227 -0
- package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +343 -0
- package/cabloy-docs/frontend/server-data.md +2 -0
- package/cabloy-docs/frontend/ssr-architecture-overview.md +211 -0
- package/cabloy-docs/frontend/ssr-build-deploy-guide.md +308 -0
- package/cabloy-docs/frontend/ssr-review-checklist.md +184 -0
- package/cabloy-docs/frontend/ssr-troubleshooting-guide.md +301 -0
- package/cabloy-docs/frontend/zova-form-source-reading-map.md +295 -0
- package/cabloy-docs/frontend/zova-form-under-the-hood.md +556 -0
- package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
- package/cabloy-docs/frontend/zova-source-reading-map.md +327 -0
- package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
- package/cabloy-docs/fullstack/contract-loop-playbook.md +350 -0
- package/cabloy-docs/fullstack/framework-performance.md +3 -3
- package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +44 -1
- package/cabloy-docs/fullstack/introduction.md +40 -0
- package/cabloy-docs/fullstack/openapi-to-sdk.md +19 -9
- package/cabloy-docs/fullstack/quickstart.md +7 -1
- package/cabloy-docs/fullstack/tutorial-1-first-module.md +111 -0
- package/cabloy-docs/fullstack/tutorial-2-first-crud.md +122 -0
- package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +131 -0
- package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +144 -0
- package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +146 -0
- package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +170 -0
- package/cabloy-docs/fullstack/tutorials-overview.md +192 -0
- package/cabloy-docs/index.md +4 -3
- package/cabloy-docs/reference/bean-scene-boilerplates.md +75 -0
- package/cabloy-docs/reference/cli-reference.md +2 -0
- package/package.json +7 -2
- package/scripts/initTestData.ts +25 -0
- package/scripts/upgrade.ts +17 -2
- package/vona/packages-cli/cabloy-cli/package.json +2 -2
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/package.json +1 -1
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.create.module.ts +4 -0
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/pnpm-lock.yaml +226 -1091
- package/vona/pnpm-workspace.yaml +0 -1
- package/vona/src/suite-vendor/a-vona/modules/a-core/assets/static/img/vona.svg +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/src/bean/bean.permission.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-upload/package.json +2 -2
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/zova/package.original.json +1 -1
- package/zova/packages-cli/cli/package.json +3 -3
- package/zova/packages-cli/cli-set-front/cli/templates/init/icon/boilerplate/icons/default/zova.svg +1 -1
- package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
- package/zova/packages-cli/cli-set-front/package.json +3 -3
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.create.module.ts +4 -0
- package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
- package/zova/packages-cli/cli-set-front/src/lib/command/create.bean.ts +5 -1
- package/zova/packages-utils/zova-vite/package.json +2 -2
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +282 -1311
- package/zova/pnpm-workspace.yaml +0 -1
- package/zova/src/suite/a-home/modules/home-icon/icons/social/cabloy.svg +1 -1
- package/zova/src/suite/a-home/modules/home-icon/icons/social/vona.svg +1 -1
- package/zova/src/suite/a-home/modules/home-icon/icons/social/zova.svg +1 -1
- package/zova/src/suite/a-home/modules/home-icon/src/.metadata/icons/groups/social.svg +3 -3
- package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +9 -0
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/package.json +1 -1
- package/zova/src/suite-vendor/a-cabloy/modules/rest-resource/src/model/resource.ts +66 -16
- package/zova/src/suite-vendor/a-cabloy/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/modules/a-routertabs/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-routertabs/src/model/tabs.ts +60 -18
- package/zova/src/suite-vendor/a-zova/modules/a-table/cli/tableActionRow/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +6 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/cli/tableCell/boilerplate/{{sceneName}}.{{beanName}}.tsx_ +6 -1
- package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +4 -4
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill_name": "cabloy-resource-field-update",
|
|
3
|
+
"evals": [
|
|
4
|
+
{
|
|
5
|
+
"id": 1,
|
|
6
|
+
"prompt": "Please add a new persisted level field to the existing student resource in Cabloy Basic. Before doing anything else, tell me whether fileVersion needs a decision and what layers must be updated.",
|
|
7
|
+
"expected_output": "Must classify the task as a new persisted field on an existing resource, must require a fileVersion decision before migration edits, and must mention entity, meta.version, package.json, locale, and tests as relevant follow-up layers.",
|
|
8
|
+
"files": []
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": 2,
|
|
12
|
+
"prompt": "I want to add a new persisted field to an existing Cabloy resource, but do not bump fileVersion — fold it into the current version path. What workflow should Claude follow?",
|
|
13
|
+
"expected_output": "Must recognize the no-bump branch, keep the current fileVersion, avoid creating a new migration version branch, and still mention schema-path, entity, locale, and tests as required follow-up surfaces.",
|
|
14
|
+
"files": []
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": 3,
|
|
18
|
+
"prompt": "The level field already exists in storage. I only want to tighten it to an enum-like 1/2/3 field and attach select-style render metadata. Keep this as a field refinement workflow, not a migration plan.",
|
|
19
|
+
"expected_output": "Must classify the task as metadata-only or validation/render-only refinement, must avoid unnecessary fileVersion escalation, and must mention explicit validation, renderer metadata, locale, and invalid-value testing.",
|
|
20
|
+
"files": []
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": 4,
|
|
24
|
+
"prompt": "In Cabloy Basic, please update the existing student resource field so it uses the best existing shared renderer first. I want the Cabloy way, not a custom component unless it is really needed.",
|
|
25
|
+
"expected_output": "Must prefer shared renderer reuse first, should mention basic-select as the default Cabloy Basic select-style baseline for enum-like fields, and should not jump straight into custom renderer creation.",
|
|
26
|
+
"files": []
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": 5,
|
|
30
|
+
"prompt": "I know the shared renderer would work, but I explicitly want a custom renderer demo for this existing backend field so future AI can learn the workflow. What should Claude do?",
|
|
31
|
+
"expected_output": "Must branch into the custom renderer demo workflow, must mention a module-local FormField component plus a module-local @TableCell bean, and must include metadata generation, frontend build, deps:vona, and Vona verification steps.",
|
|
32
|
+
"files": []
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": 6,
|
|
36
|
+
"prompt": "Create a brand new CRUD resource for courses in Cabloy and tell me the best generation path.",
|
|
37
|
+
"expected_output": "Must not treat this as an existing-resource field-update workflow. It should indicate that initial CRUD/resource creation belongs to the backend scaffold or a broader workflow, not this skill.",
|
|
38
|
+
"files": []
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": 7,
|
|
42
|
+
"prompt": "In Cabloy Basic, the level field already exists and I want select-style field rendering for it. Claude should use the shared renderer path, and unless the UX truly requires a preselected value, I want the field to start unchosen with a visible hint. What guidance should Claude follow?",
|
|
43
|
+
"expected_output": "Must classify this as an existing-field refinement, prefer the shared Cabloy Basic select renderer path, default to providing a user-visible placeholder for the field-rendering select component unless the UX clearly requires a preselected value, and prefer placeholder over artificial empty-item injection for Cabloy Basic rather than assuming the same behavior in Cabloy Start.",
|
|
44
|
+
"files": []
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": 8,
|
|
48
|
+
"prompt": "In Cabloy Start, the level field already exists and now needs select-style field rendering. I want Claude to reuse the right shared renderer path if possible, and I also care about how an initially unchosen state should work. What guidance should Claude follow?",
|
|
49
|
+
"expected_output": "Must classify this as an existing-field refinement, must detect that this is Cabloy Start, must still prefer shared renderer reuse first rather than jumping straight to a custom renderer, must not jump straight to Cabloy Basic renderer keys such as basic-select, and must say to inspect the Start-side select wrapper and underlying component semantics before deciding renderer keys or copying Cabloy Basic placeholder or empty-item behavior.",
|
|
50
|
+
"files": []
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
package/.claude/skills/cabloy-resource-field-update/references/custom-renderer-demo-checklist.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Custom Renderer Demo Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist when the user explicitly wants to demonstrate how a backend resource field can switch from a shared renderer to a custom module-local renderer.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Preserve the field’s backend business semantics while deliberately exercising the full frontend renderer registration path.
|
|
8
|
+
|
|
9
|
+
## 1. Confirm the task is really instructional
|
|
10
|
+
|
|
11
|
+
Use this branch when the user wants to show:
|
|
12
|
+
|
|
13
|
+
- how to build a custom FormField component
|
|
14
|
+
- how to build a custom backend-usable TableCell renderer
|
|
15
|
+
- how to connect them back to `ZovaRender.field(...)` / `ZovaRender.cell(...)`
|
|
16
|
+
|
|
17
|
+
If the user only wants the simplest production implementation, prefer shared renderer reuse instead.
|
|
18
|
+
|
|
19
|
+
## 2. Keep business semantics unchanged if possible
|
|
20
|
+
|
|
21
|
+
Do not rework field meaning unless the request also asks for it.
|
|
22
|
+
|
|
23
|
+
Preserve existing semantics such as:
|
|
24
|
+
|
|
25
|
+
- allowed values
|
|
26
|
+
- locale labels
|
|
27
|
+
- `items`, `itemValue`, `itemTitle`
|
|
28
|
+
- backend field name and DTO flow
|
|
29
|
+
|
|
30
|
+
## 3. Build the correct frontend pair
|
|
31
|
+
|
|
32
|
+
### FormField
|
|
33
|
+
|
|
34
|
+
Add a module-local FormField component such as:
|
|
35
|
+
|
|
36
|
+
- `src/component/formFieldX/controller.tsx`
|
|
37
|
+
|
|
38
|
+
Best practice:
|
|
39
|
+
|
|
40
|
+
- reuse the option shape of the closest shared renderer
|
|
41
|
+
- copy the data flow from the shared baseline first
|
|
42
|
+
- default to providing a user-visible `placeholder` for field-rendering select components unless the UX clearly requires an always-preselected value
|
|
43
|
+
- in Cabloy Basic, keep placeholder handling aligned with `basic-select` semantics instead of adding artificial empty items by default
|
|
44
|
+
- in Cabloy Start, verify the `start-select` wrapper behavior before copying Basic-specific placeholder or empty-item logic
|
|
45
|
+
- keep customizations minimal and clearly demo-oriented
|
|
46
|
+
|
|
47
|
+
### TableCell
|
|
48
|
+
|
|
49
|
+
Add a module-local `@TableCell(...)` bean such as:
|
|
50
|
+
|
|
51
|
+
- `src/bean/tableCell.x.tsx`
|
|
52
|
+
|
|
53
|
+
Important:
|
|
54
|
+
|
|
55
|
+
- backend `ZovaRender.cell(...)` should point to a registered table-cell key
|
|
56
|
+
- a plain frontend component is not enough for this role
|
|
57
|
+
|
|
58
|
+
## 4. Use the best existing baseline
|
|
59
|
+
|
|
60
|
+
For select-like enum fields, start from an edition-correct baseline.
|
|
61
|
+
|
|
62
|
+
In Cabloy Basic, start from:
|
|
63
|
+
|
|
64
|
+
- `basic-select` FormField behavior
|
|
65
|
+
- `basic-select` table-cell bean behavior
|
|
66
|
+
|
|
67
|
+
In Cabloy Start:
|
|
68
|
+
|
|
69
|
+
- identify the Start-side select baseline first rather than reusing Basic components by name
|
|
70
|
+
- verify placeholder and empty-state behavior before copying Basic-specific logic
|
|
71
|
+
|
|
72
|
+
The goal is to demonstrate module-local customization, not to reinvent field-state handling.
|
|
73
|
+
|
|
74
|
+
## 5. Regenerate and synchronize in the right order
|
|
75
|
+
|
|
76
|
+
Recommended order:
|
|
77
|
+
|
|
78
|
+
1. create or update renderer source files
|
|
79
|
+
2. regenerate frontend metadata
|
|
80
|
+
3. run the relevant frontend build so both bundle output and type surface update
|
|
81
|
+
4. run `deps:vona`
|
|
82
|
+
5. run Vona typecheck
|
|
83
|
+
6. run the narrow backend resource test
|
|
84
|
+
|
|
85
|
+
For Cabloy Basic admin, the representative flow is:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm run zova :tools:metadata <module-name>
|
|
89
|
+
npm run build:zova:admin
|
|
90
|
+
npm run deps:vona
|
|
91
|
+
cd vona && npm run tsc
|
|
92
|
+
cd vona && npm test -- <resource-test>.test.ts
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 6. Recovery rule when generated keys still look stale
|
|
96
|
+
|
|
97
|
+
If the generated `.zova-rest` files already contain the new renderer keys but Vona still behaves as if old types are installed:
|
|
98
|
+
|
|
99
|
+
- suspect a stale or unhealthy `vona/node_modules` installation state
|
|
100
|
+
- after normal `deps:vona`, rebuild `vona/node_modules` and reinstall dependencies if needed
|
|
101
|
+
|
|
102
|
+
This is an installation-state recovery step, not the normal first move.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Field Update Decision Tree
|
|
2
|
+
|
|
3
|
+
Use this reference with `cabloy-resource-field-update` when a request is about an existing backend resource field.
|
|
4
|
+
|
|
5
|
+
## 1. Is this an existing-resource update?
|
|
6
|
+
|
|
7
|
+
Use the skill when the task is about:
|
|
8
|
+
|
|
9
|
+
- adding a field to an existing resource
|
|
10
|
+
- refining validation for an existing field
|
|
11
|
+
- adding enum-like constraints
|
|
12
|
+
- changing `ZovaRender.field(...)` or `ZovaRender.cell(...)`
|
|
13
|
+
- deciding whether an existing resource field change needs a `fileVersion` bump
|
|
14
|
+
|
|
15
|
+
Do not use it when the request is really about:
|
|
16
|
+
|
|
17
|
+
- creating a new CRUD/resource thread
|
|
18
|
+
- generic frontend page/component scaffolding
|
|
19
|
+
- stale contract diagnosis
|
|
20
|
+
|
|
21
|
+
## 2. Persisted field or metadata-only change?
|
|
22
|
+
|
|
23
|
+
### Persisted field
|
|
24
|
+
|
|
25
|
+
Examples:
|
|
26
|
+
|
|
27
|
+
- add `level: number`
|
|
28
|
+
- add `status: string`
|
|
29
|
+
- add a stored relation key
|
|
30
|
+
|
|
31
|
+
Actions:
|
|
32
|
+
|
|
33
|
+
- ask whether `vonaModule.fileVersion` should be incremented
|
|
34
|
+
- inspect `meta.version.ts`
|
|
35
|
+
- inspect module `package.json`
|
|
36
|
+
- plan fresh install and upgrade behavior
|
|
37
|
+
|
|
38
|
+
### Metadata-only change
|
|
39
|
+
|
|
40
|
+
Examples:
|
|
41
|
+
|
|
42
|
+
- add enum validation to an existing field
|
|
43
|
+
- add `ZovaRender.field(...)`
|
|
44
|
+
- add `ZovaRender.cell(...)`
|
|
45
|
+
- refine locale labels
|
|
46
|
+
- tighten validation without changing storage
|
|
47
|
+
|
|
48
|
+
Actions:
|
|
49
|
+
|
|
50
|
+
- usually keep `fileVersion` unchanged
|
|
51
|
+
- focus on entity metadata, locale, tests, and optional renderer follow-up
|
|
52
|
+
|
|
53
|
+
## 3. What is the source of truth?
|
|
54
|
+
|
|
55
|
+
Check these surfaces first:
|
|
56
|
+
|
|
57
|
+
- entity
|
|
58
|
+
- model
|
|
59
|
+
- DTOs
|
|
60
|
+
- controller
|
|
61
|
+
- service
|
|
62
|
+
- `meta.version.ts`
|
|
63
|
+
- module `package.json`
|
|
64
|
+
- locale files
|
|
65
|
+
- tests
|
|
66
|
+
|
|
67
|
+
Prefer:
|
|
68
|
+
|
|
69
|
+
- entity-first field definition
|
|
70
|
+
- inferred DTO flow if the source already uses `$Dto.create(...)`, `$Dto.update(...)`, or `$Dto.get(...)`
|
|
71
|
+
|
|
72
|
+
## 4. Renderer branch
|
|
73
|
+
|
|
74
|
+
### Shared renderer reuse
|
|
75
|
+
|
|
76
|
+
Default to shared reuse first, especially for enum-like fields.
|
|
77
|
+
|
|
78
|
+
Typical Cabloy Basic select-style pair:
|
|
79
|
+
|
|
80
|
+
- `basic-select:formFieldSelect`
|
|
81
|
+
- `basic-select:select`
|
|
82
|
+
|
|
83
|
+
Default AI behavior:
|
|
84
|
+
|
|
85
|
+
- provide a user-visible `placeholder` for field-rendering select components unless the UX clearly requires an always-preselected value
|
|
86
|
+
- in Cabloy Basic, prefer `placeholder` over artificial empty-item injection when the goal is to keep the field initially unchosen
|
|
87
|
+
- in Cabloy Start, do not assume the same placeholder or empty-item behavior from `start-select`; verify the wrapper and underlying component semantics before reusing the Basic pattern
|
|
88
|
+
|
|
89
|
+
### Custom renderer demo
|
|
90
|
+
|
|
91
|
+
Use only when the task explicitly wants to demonstrate the full custom-renderer workflow.
|
|
92
|
+
|
|
93
|
+
Required pieces:
|
|
94
|
+
|
|
95
|
+
- module-local FormField component
|
|
96
|
+
- module-local `@TableCell(...)` bean
|
|
97
|
+
- metadata regeneration
|
|
98
|
+
- frontend build
|
|
99
|
+
- `deps:vona`
|
|
100
|
+
- Vona typecheck and targeted backend test
|
|
101
|
+
|
|
102
|
+
Important:
|
|
103
|
+
|
|
104
|
+
- a plain component alone is not enough for backend `ZovaRender.cell(...)`
|
|
105
|
+
- backend table-cell rendering should point to a registered table-cell key backed by `@TableCell(...)`
|
|
106
|
+
|
|
107
|
+
## 5. Must-close follow-up layers
|
|
108
|
+
|
|
109
|
+
- locale labels
|
|
110
|
+
- invalid-value test for constrained enum-like fields
|
|
111
|
+
- migration safety if persistence changed
|
|
112
|
+
- narrow verification first, then broader checks if needed
|
|
113
|
+
|
|
114
|
+
## 6. Migration warning
|
|
115
|
+
|
|
116
|
+
If you add a new persisted field in a version-bump workflow:
|
|
117
|
+
|
|
118
|
+
- do not add the same new column in both an older create path and a new migration branch
|
|
119
|
+
- fresh install may run version branches sequentially
|
|
120
|
+
- duplicate introduction paths can cause duplicate-column failures
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Follow-up Checklist
|
|
2
|
+
|
|
3
|
+
After updating or refining a field on an existing backend resource, check which follow-up layers apply.
|
|
4
|
+
|
|
5
|
+
## Classification follow-up
|
|
6
|
+
|
|
7
|
+
- is this a new persisted field or a metadata-only refinement?
|
|
8
|
+
- does the task require a `fileVersion` decision before persistence edits?
|
|
9
|
+
- is the request purely backend-first, or does it explicitly branch into renderer-aware frontend follow-up?
|
|
10
|
+
|
|
11
|
+
## Backend thread follow-up
|
|
12
|
+
|
|
13
|
+
- entity field definition
|
|
14
|
+
- model/entity alignment
|
|
15
|
+
- inferred DTO flow vs manual DTO edits
|
|
16
|
+
- controller/service still match the resource contract
|
|
17
|
+
- locale updates for visible field text
|
|
18
|
+
|
|
19
|
+
## Persistence follow-up
|
|
20
|
+
|
|
21
|
+
Apply when storage shape changes:
|
|
22
|
+
|
|
23
|
+
- `meta.version.ts`
|
|
24
|
+
- module `package.json` `fileVersion`
|
|
25
|
+
- fresh install vs upgrade behavior
|
|
26
|
+
- duplicate-column risk across historical and new migration branches
|
|
27
|
+
|
|
28
|
+
## Validation and contract follow-up
|
|
29
|
+
|
|
30
|
+
- required vs optional behavior
|
|
31
|
+
- explicit enum-like allowed-value schema when needed
|
|
32
|
+
- `ZovaRender.order(...)`
|
|
33
|
+
- `ZovaRender.field(...)`
|
|
34
|
+
- `ZovaRender.cell(...)`
|
|
35
|
+
- invalid-value test coverage
|
|
36
|
+
|
|
37
|
+
## Renderer follow-up
|
|
38
|
+
|
|
39
|
+
### Shared renderer path
|
|
40
|
+
|
|
41
|
+
- confirm an existing shared renderer already fits
|
|
42
|
+
- keep option shapes aligned with the shared renderer baseline
|
|
43
|
+
- avoid custom frontend code when reuse is sufficient
|
|
44
|
+
|
|
45
|
+
### Custom renderer demo path
|
|
46
|
+
|
|
47
|
+
Apply when the user explicitly wants to demonstrate custom renderer development:
|
|
48
|
+
|
|
49
|
+
- module-local FormField component exists
|
|
50
|
+
- module-local `@TableCell(...)` bean exists
|
|
51
|
+
- backend `ZovaRender.cell(...)` points to the registered table-cell key, not just a plain component
|
|
52
|
+
- metadata regeneration is included
|
|
53
|
+
- frontend build is included
|
|
54
|
+
- `deps:vona` is included
|
|
55
|
+
|
|
56
|
+
## Verification follow-up
|
|
57
|
+
|
|
58
|
+
### If persistence changed
|
|
59
|
+
|
|
60
|
+
- `npm run test`
|
|
61
|
+
|
|
62
|
+
### If the change is narrower
|
|
63
|
+
|
|
64
|
+
- `cd vona && npm run tsc`
|
|
65
|
+
- `cd vona && npm test -- <resource-test>.test.ts`
|
|
66
|
+
|
|
67
|
+
### If custom frontend renderers were introduced
|
|
68
|
+
|
|
69
|
+
- `npm run zova :tools:metadata <module-name>`
|
|
70
|
+
- `npm run build:zova:admin`
|
|
71
|
+
- `npm run deps:vona`
|
|
72
|
+
- `cd vona && npm run tsc`
|
|
73
|
+
- `cd vona && npm test -- <resource-test>.test.ts`
|
|
74
|
+
|
|
75
|
+
## Common recovery rule
|
|
76
|
+
|
|
77
|
+
If generated `.zova-rest` output already contains the new renderer keys but Vona still behaves as if old types are installed:
|
|
78
|
+
|
|
79
|
+
- suspect a stale `vona/node_modules` installation state
|
|
80
|
+
- rebuild `vona/node_modules` and reinstall dependencies if normal `deps:vona` sync did not recover the local file-package installation state
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Verification Checklist
|
|
2
|
+
|
|
3
|
+
Use this reference with `cabloy-resource-field-update` to choose the right verification path for an existing resource field change.
|
|
4
|
+
|
|
5
|
+
## 1. If persistence changed
|
|
6
|
+
|
|
7
|
+
This means the task changed storage shape, such as:
|
|
8
|
+
|
|
9
|
+
- a new persisted field
|
|
10
|
+
- a schema migration path
|
|
11
|
+
- `meta.version.ts`
|
|
12
|
+
- module `fileVersion`
|
|
13
|
+
|
|
14
|
+
Run:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm run test
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Reason:
|
|
21
|
+
|
|
22
|
+
- the test database should be reinitialized so schema/version mismatches surface early
|
|
23
|
+
|
|
24
|
+
## 2. If the change is narrower
|
|
25
|
+
|
|
26
|
+
Start with the narrowest meaningful checks first.
|
|
27
|
+
|
|
28
|
+
Typical sequence:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cd vona && npm run tsc
|
|
32
|
+
cd vona && npm test -- <resource-test>.test.ts
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use this for:
|
|
36
|
+
|
|
37
|
+
- validation-only refinement
|
|
38
|
+
- locale updates for a field
|
|
39
|
+
- renderer metadata changes on an existing persisted field
|
|
40
|
+
|
|
41
|
+
## 3. If custom frontend renderers were introduced
|
|
42
|
+
|
|
43
|
+
Run the synchronization chain in order:
|
|
44
|
+
|
|
45
|
+
1. regenerate frontend metadata
|
|
46
|
+
2. build the relevant frontend SSR/rest target
|
|
47
|
+
3. run `deps:vona`
|
|
48
|
+
4. run Vona typecheck
|
|
49
|
+
5. run the narrow backend resource test
|
|
50
|
+
|
|
51
|
+
Representative Cabloy Basic admin flow:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm run zova :tools:metadata <module-name>
|
|
55
|
+
npm run build:zova:admin
|
|
56
|
+
npm run deps:vona
|
|
57
|
+
cd vona && npm run tsc
|
|
58
|
+
cd vona && npm test -- <resource-test>.test.ts
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If web SSR also matters, add the web build and then repeat dependency sync as needed.
|
|
62
|
+
|
|
63
|
+
## 4. What to verify in the result
|
|
64
|
+
|
|
65
|
+
### Backend contract
|
|
66
|
+
|
|
67
|
+
Confirm:
|
|
68
|
+
|
|
69
|
+
- field create/update/view/select behavior still works
|
|
70
|
+
- invalid enum-like values are rejected when applicable
|
|
71
|
+
- inferred DTO surfaces still line up with the entity/model chain
|
|
72
|
+
|
|
73
|
+
### Renderer integration
|
|
74
|
+
|
|
75
|
+
Confirm:
|
|
76
|
+
|
|
77
|
+
- generated metadata contains the new component or table-cell registrations
|
|
78
|
+
- generated `.zova-rest` or related type surfaces contain the new renderer keys
|
|
79
|
+
- backend `ZovaRender.field(...)` / `ZovaRender.cell(...)` references pass typecheck
|
|
80
|
+
|
|
81
|
+
## 5. Common recovery rule for stale local file dependencies
|
|
82
|
+
|
|
83
|
+
If all of these are true:
|
|
84
|
+
|
|
85
|
+
- generated `.zova-rest` files already contain the new renderer keys
|
|
86
|
+
- `deps:vona` was run
|
|
87
|
+
- Vona still behaves as if old renderer types are installed
|
|
88
|
+
|
|
89
|
+
Then suspect a stale or unhealthy local installation state in `vona/node_modules`.
|
|
90
|
+
|
|
91
|
+
Recovery action:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
cd vona && rm -rf node_modules && pnpm install
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Use this as a recovery path when the normal sync steps did not restore the local file-package installation state cleanly.
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cabloy-zova-source-reading
|
|
3
|
+
description: Use this skill when the user wants to read, trace, or explain Zova frontend source code rather than scaffold new code: where a page/component/model/behavior/SSR flow is implemented, how a runtime path works internally, why a plain controller field is reactive, how Zova differs from generic Vue 3 habits, or which files to read first. Trigger for requests about Zova source reading, runtime tracing, Vue-vs-Zova explanation, controller/bean/IoC mental models, or the Zova-native way to understand frontend behavior. Do not use it for normal frontend scaffolding or backend/frontend contract regeneration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cabloy Zova Source Reading
|
|
7
|
+
|
|
8
|
+
Use this skill when the task is to understand, explain, or trace Zova frontend behavior in source code.
|
|
9
|
+
|
|
10
|
+
## Goals
|
|
11
|
+
|
|
12
|
+
1. detect whether the active repository is Cabloy Basic or Cabloy Start
|
|
13
|
+
2. classify whether the user needs a source-entry map, a runtime-flow trace, or a Vue-vs-Zova explanation
|
|
14
|
+
3. start from Zova-native public docs before diving into framework source
|
|
15
|
+
4. explain Zova architecture in its own terms before translating it into Vue analogies
|
|
16
|
+
5. separate source-confirmed runtime behavior from interpretive comparison
|
|
17
|
+
6. finish with verification guidance that matches the analysis scope
|
|
18
|
+
|
|
19
|
+
## Step 1: Detect the active edition
|
|
20
|
+
|
|
21
|
+
Check the repository root for these marker files:
|
|
22
|
+
|
|
23
|
+
- `__CABLOY_BASIC__`
|
|
24
|
+
- `__CABLOY_START__`
|
|
25
|
+
|
|
26
|
+
Interpretation:
|
|
27
|
+
|
|
28
|
+
- `__CABLOY_BASIC__` present → this is Cabloy Basic
|
|
29
|
+
- `__CABLOY_START__` present → this is Cabloy Start
|
|
30
|
+
- neither present → inspect the repo scripts and ask before making edition-specific frontend assumptions
|
|
31
|
+
|
|
32
|
+
This matters most when the analysis becomes UI-sensitive, SSR-site-sensitive, flavor-sensitive, or module-set-sensitive.
|
|
33
|
+
|
|
34
|
+
## Step 2: Classify the analysis mode
|
|
35
|
+
|
|
36
|
+
Before reading files deeply, decide which kind of question the user is really asking.
|
|
37
|
+
|
|
38
|
+
### Mode A: source-location mode
|
|
39
|
+
|
|
40
|
+
Use this mode when the user is asking questions like:
|
|
41
|
+
|
|
42
|
+
- where should I start reading?
|
|
43
|
+
- which files are relevant?
|
|
44
|
+
- what order should I read the source in?
|
|
45
|
+
- where is this implemented in Zova?
|
|
46
|
+
|
|
47
|
+
### Mode B: runtime-flow mode
|
|
48
|
+
|
|
49
|
+
Use this mode when the user is asking questions like:
|
|
50
|
+
|
|
51
|
+
- how does this work internally?
|
|
52
|
+
- why is this field reactive?
|
|
53
|
+
- where does `$computed` / `$params` / `$query` come from?
|
|
54
|
+
- how does page/controller/component render enter the runtime?
|
|
55
|
+
|
|
56
|
+
### Mode C: Vue-vs-Zova comparison mode
|
|
57
|
+
|
|
58
|
+
Use this mode when the user is asking questions like:
|
|
59
|
+
|
|
60
|
+
- how should I understand this relative to Vue 3?
|
|
61
|
+
- is this just Vue with classes?
|
|
62
|
+
- what is the Zova way instead of the generic Vue way?
|
|
63
|
+
- how do controller / bean / model / render roles map to Vue concepts?
|
|
64
|
+
|
|
65
|
+
If a request spans more than one mode, answer in this order:
|
|
66
|
+
|
|
67
|
+
1. source-location mode
|
|
68
|
+
2. runtime-flow mode
|
|
69
|
+
3. Vue-vs-Zova comparison mode
|
|
70
|
+
|
|
71
|
+
That order reduces the risk of drifting into premature analogy before the source path is understood.
|
|
72
|
+
|
|
73
|
+
## Step 3: Start from public Zova docs first
|
|
74
|
+
|
|
75
|
+
Do not begin by forcing the problem into generic Vue terminology.
|
|
76
|
+
|
|
77
|
+
Start from the public frontend reading docs in `cabloy-docs/frontend/`.
|
|
78
|
+
|
|
79
|
+
### Primary reading surfaces
|
|
80
|
+
|
|
81
|
+
- `cabloy-docs/frontend/reading-zova-for-vue-developers.md`
|
|
82
|
+
- `cabloy-docs/frontend/zova-vs-vue3-comparison.md`
|
|
83
|
+
- `cabloy-docs/frontend/zova-reactivity-under-the-hood.md`
|
|
84
|
+
- `cabloy-docs/frontend/zova-source-reading-map.md`
|
|
85
|
+
|
|
86
|
+
For compact procedural summaries inside the skill bundle, also use:
|
|
87
|
+
|
|
88
|
+
- `references/analysis-modes.md`
|
|
89
|
+
- `references/core-reading-paths.md`
|
|
90
|
+
|
|
91
|
+
### Core architecture surfaces
|
|
92
|
+
|
|
93
|
+
Use these when the question needs broader architectural context:
|
|
94
|
+
|
|
95
|
+
- `cabloy-docs/frontend/introduction.md`
|
|
96
|
+
- `cabloy-docs/frontend/foundation.md`
|
|
97
|
+
- `cabloy-docs/frontend/design-principles.md`
|
|
98
|
+
- `cabloy-docs/frontend/ioc-and-beans.md`
|
|
99
|
+
- `cabloy-docs/frontend/page-guide.md`
|
|
100
|
+
- `cabloy-docs/frontend/component-guide.md`
|
|
101
|
+
- `cabloy-docs/frontend/model-architecture.md`
|
|
102
|
+
- `cabloy-docs/frontend/page-route-guide.md`
|
|
103
|
+
- `cabloy-docs/frontend/behavior-guide.md`
|
|
104
|
+
- `cabloy-docs/frontend/ssr-architecture-overview.md`
|
|
105
|
+
|
|
106
|
+
## Step 4: Choose the shortest correct source-reading path
|
|
107
|
+
|
|
108
|
+
After reading the public docs, choose the smallest source path that answers the question.
|
|
109
|
+
|
|
110
|
+
Use these bundled references to keep the workflow compact:
|
|
111
|
+
|
|
112
|
+
- `references/analysis-modes.md`
|
|
113
|
+
- `references/core-reading-paths.md`
|
|
114
|
+
|
|
115
|
+
Use the public `cabloy-docs/frontend/zova-source-reading-map.md` as the fuller explanation layer, but use the bundled references first when they are enough for the current task.
|
|
116
|
+
|
|
117
|
+
## Step 5: Explain Zova-native meaning first
|
|
118
|
+
|
|
119
|
+
When answering, explain the Zova role first, then add Vue analogies only if they help.
|
|
120
|
+
|
|
121
|
+
### Required answer posture
|
|
122
|
+
|
|
123
|
+
1. identify the Zova-native role first
|
|
124
|
+
- page controller
|
|
125
|
+
- component controller
|
|
126
|
+
- render bean
|
|
127
|
+
- style bean
|
|
128
|
+
- model bean
|
|
129
|
+
- service bean
|
|
130
|
+
- behavior bean
|
|
131
|
+
- route/SSR integration layer
|
|
132
|
+
|
|
133
|
+
2. explain the source-confirmed runtime path second
|
|
134
|
+
|
|
135
|
+
3. only then offer Vue analogies as approximate translations
|
|
136
|
+
|
|
137
|
+
Do **not** lead with statements like:
|
|
138
|
+
|
|
139
|
+
- "this is basically just Vue setup with classes"
|
|
140
|
+
- "this should really be a normal Vue composable"
|
|
141
|
+
- "the right end state is probably `ref.value`"
|
|
142
|
+
|
|
143
|
+
Those translations can erase the actual Zova architecture.
|
|
144
|
+
|
|
145
|
+
For component-wrapper questions specifically, remember that `controllerRef` exposes the controller instance, not a generic DOM ref, and should not be treated as a generic Vue component-ref substitute without checking the current wrapper/controller source path.
|
|
146
|
+
|
|
147
|
+
## Step 6: Distinguish source-confirmed behavior from interpretive comparison
|
|
148
|
+
|
|
149
|
+
Always make the boundary explicit.
|
|
150
|
+
|
|
151
|
+
### Source-confirmed behavior
|
|
152
|
+
|
|
153
|
+
This includes claims you can support directly from current source files, such as:
|
|
154
|
+
|
|
155
|
+
- where a controller is created
|
|
156
|
+
- where a bean becomes reactive
|
|
157
|
+
- where route state is refreshed
|
|
158
|
+
- where render is redirected
|
|
159
|
+
- which helper wraps which Vue API
|
|
160
|
+
|
|
161
|
+
### Interpretive comparison
|
|
162
|
+
|
|
163
|
+
This includes claims such as:
|
|
164
|
+
|
|
165
|
+
- why Zova feels more object-oriented than Vue
|
|
166
|
+
- how Zova growth paths differ from typical Vue growth paths
|
|
167
|
+
- which analogy is the closest Vue mental model
|
|
168
|
+
|
|
169
|
+
These can be useful, but they should be labeled as interpretation rather than current-source fact.
|
|
170
|
+
|
|
171
|
+
## Step 7: Stay inside the right workflow boundary
|
|
172
|
+
|
|
173
|
+
Use this skill for explanation and source reading.
|
|
174
|
+
|
|
175
|
+
Do **not** use it as the primary workflow when the real task is:
|
|
176
|
+
|
|
177
|
+
- creating or refactoring frontend structures → prefer `cabloy-frontend-scaffold`
|
|
178
|
+
- diagnosing backend/frontend contract drift → prefer `cabloy-contract-loop`
|
|
179
|
+
- choosing whether the work belongs to backend, frontend, fullstack, docs, or AI guidance → prefer `cabloy-workflow`
|
|
180
|
+
|
|
181
|
+
## Step 8: Verification guidance
|
|
182
|
+
|
|
183
|
+
Always finish with a verification path that matches the analysis task.
|
|
184
|
+
|
|
185
|
+
### For source-reading answers
|
|
186
|
+
|
|
187
|
+
Verify:
|
|
188
|
+
|
|
189
|
+
- the cited file paths exist
|
|
190
|
+
- the described runtime path is actually visible in current source
|
|
191
|
+
- the answer does not contradict the public frontend docs
|
|
192
|
+
|
|
193
|
+
### For Vue-vs-Zova explanation answers
|
|
194
|
+
|
|
195
|
+
Verify:
|
|
196
|
+
|
|
197
|
+
- the Zova-native explanation comes first
|
|
198
|
+
- Vue analogies are marked as approximate, not authoritative
|
|
199
|
+
- no claim quietly rewrites Zova back into generic Vue habits
|
|
200
|
+
|
|
201
|
+
### For edition-sensitive frontend analysis
|
|
202
|
+
|
|
203
|
+
Verify:
|
|
204
|
+
|
|
205
|
+
- the active edition marker was considered
|
|
206
|
+
- Basic-only or Start-only UI assumptions were not silently generalized
|
|
207
|
+
- SSR, theme, and flavor-sensitive statements match the active edition context
|
|
208
|
+
|
|
209
|
+
## Response pattern
|
|
210
|
+
|
|
211
|
+
When helpful, structure the response around these points:
|
|
212
|
+
|
|
213
|
+
1. detected edition
|
|
214
|
+
2. analysis mode
|
|
215
|
+
3. public docs to read first
|
|
216
|
+
4. source path to inspect next
|
|
217
|
+
5. Zova-native explanation
|
|
218
|
+
6. optional Vue analogy
|
|
219
|
+
7. verification notes or caveats
|
|
220
|
+
|
|
221
|
+
Keep the response practical. The value of this skill is to help AI and users read Zova source accurately and in the right architectural order, not to flatten Zova into generic Vue prose.
|