howone 0.1.23 → 0.1.26

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 (36) hide show
  1. package/package.json +1 -1
  2. package/templates/vite/.howone/skills/howone/01-architect/01-app-generation.md +215 -0
  3. package/templates/vite/.howone/skills/{howone-sdk → howone}/01-architect/02-manifest-codegen.md +67 -4
  4. package/templates/vite/.howone/skills/howone/02-database/01-schema-design.md +541 -0
  5. package/templates/vite/.howone/skills/howone/02-database/02-schema-operations.md +398 -0
  6. package/templates/vite/.howone/skills/howone/02-database/03-data-access-patterns.md +309 -0
  7. package/templates/vite/.howone/skills/howone/02-database/04-query-dsl-and-responses.md +237 -0
  8. package/templates/vite/.howone/skills/howone/02-database/05-ai-persistence-patterns.md +372 -0
  9. package/templates/vite/.howone/skills/{howone-sdk → howone}/03-sdk/01-client-setup.md +58 -36
  10. package/templates/vite/.howone/skills/{howone-sdk → howone}/03-sdk/02-entity-operations.md +67 -0
  11. package/templates/vite/.howone/skills/howone/03-sdk/03-auth.md +414 -0
  12. package/templates/vite/.howone/skills/howone/03-sdk/04-react-integration.md +191 -0
  13. package/templates/vite/.howone/skills/{howone-sdk → howone}/03-sdk/07-ai-action-calls.md +168 -64
  14. package/templates/vite/.howone/skills/howone/03-sdk/08-extension-boundaries.md +226 -0
  15. package/templates/vite/.howone/skills/howone/04-ai/01-ai-capability-architecture.md +205 -0
  16. package/templates/vite/.howone/skills/howone/04-ai/02-workflow-contract-rules.md +426 -0
  17. package/templates/vite/.howone/skills/howone/04-ai/03-ai-sdk-handoff.md +234 -0
  18. package/templates/vite/.howone/skills/howone/04-ai/04-service-capability-catalog.md +281 -0
  19. package/templates/vite/.howone/skills/howone/04-ai/05-workflow-operations.md +256 -0
  20. package/templates/vite/.howone/skills/howone/04-ai/06-ai-feature-playbooks.md +296 -0
  21. package/templates/vite/.howone/skills/{howone-sdk → howone}/SKILL.md +29 -12
  22. package/templates/vite/.howone/skills/howone/agents/openai.yaml +4 -0
  23. package/templates/vite/package.json +1 -1
  24. package/templates/vite/.howone/skills/howone-sdk/01-architect/01-app-generation.md +0 -126
  25. package/templates/vite/.howone/skills/howone-sdk/02-database/01-schema-design.md +0 -147
  26. package/templates/vite/.howone/skills/howone-sdk/02-database/02-schema-operations.md +0 -96
  27. package/templates/vite/.howone/skills/howone-sdk/02-database/03-data-access-patterns.md +0 -172
  28. package/templates/vite/.howone/skills/howone-sdk/03-sdk/03-auth.md +0 -616
  29. package/templates/vite/.howone/skills/howone-sdk/03-sdk/04-react-integration.md +0 -398
  30. package/templates/vite/.howone/skills/howone-sdk/04-ai/.gitkeep +0 -1
  31. package/templates/vite/.howone/skills/howone-sdk/04-ai/01-ai-capability-architecture.md +0 -142
  32. package/templates/vite/.howone/skills/howone-sdk/04-ai/02-workflow-contract-rules.md +0 -169
  33. package/templates/vite/.howone/skills/howone-sdk/04-ai/03-ai-sdk-handoff.md +0 -80
  34. package/templates/vite/.howone/skills/howone-sdk/agents/openai.yaml +0 -4
  35. /package/templates/vite/.howone/skills/{howone-sdk → howone}/03-sdk/05-file-upload.md +0 -0
  36. /package/templates/vite/.howone/skills/{howone-sdk → howone}/03-sdk/06-raw-http.md +0 -0
@@ -1,96 +0,0 @@
1
- # Schema Operations
2
-
3
- Use this reference when applying backend entity schema changes through HowOne runtime tools.
4
-
5
- ## Source Of Truth
6
-
7
- ```text
8
- agent proposal != source of truth
9
- validated backend manifest = source of truth
10
- synced .howone/database files = local copy of a backend version
11
- src/lib/sdk.ts = app binding generated from synced manifest
12
- ```
13
-
14
- Do not hand-write `.howone/database` files. Sync them from a concrete backend schema version.
15
-
16
- ## Preferred Patch Flow
17
-
18
- For feature-level schema work:
19
-
20
- 1. Inspect current schema definitions or schema state.
21
- 2. Design one complete patch containing all related operations.
22
- 3. Preview the patch.
23
- 4. Apply the exact same operations if risk is acceptable.
24
- 5. Sync schema artifacts using the returned `next.versionId`.
25
- 6. Read `.howone/database/manifest.json`.
26
- 7. Update `src/lib/sdk.ts` from the manifest.
27
- 8. Update frontend calls according to access.
28
- 9. Validate.
29
-
30
- Do not preview a patch and then apply a different set of single operations.
31
-
32
- ## Operation Types
33
-
34
- Supported schema operations:
35
-
36
- | Type | Purpose |
37
- |---|---|
38
- | `list_entities` | List current entity definitions. |
39
- | `get_entity` | Read one entity definition before modifying it. |
40
- | `create_entity` | Create a new entity contract. |
41
- | `update_entity` | Update entity metadata such as description, visibility, access, indexes, relations, presentation, lifecycle, performance. |
42
- | `delete_entity` | Soft or hard delete an entity definition. |
43
- | `add_field` | Add a new field. |
44
- | `update_field` | Patch an existing field definition. |
45
- | `delete_field` | Remove a field from schema, optionally from historical data. |
46
- | `set_field_required` | Add a field to top-level `required`. |
47
- | `unset_field_required` | Remove a field from top-level `required`. |
48
-
49
- ## Payload Rules
50
-
51
- - `entityName` is required for every operation except `list_entities`.
52
- - `payload.properties` is required for `create_entity`.
53
- - `payload.required` must only contain fields that exist in `properties`.
54
- - `add_field` should use `{ fieldName, field, required }`.
55
- - `update_field` should use `{ fieldName, patch, required? }`.
56
- - `delete_field` should use `{ fieldName, removeFromData: false }` by default.
57
- - `required` belongs to the entity top level, not inside individual field definitions.
58
-
59
- ## Risk Guardrails
60
-
61
- - Default entity deletion to soft delete.
62
- - Use hard delete only when the user explicitly asks.
63
- - Use `deleteData: true` only when the user explicitly asks to delete all records too.
64
- - Use `removeFromData: true` only after explicit confirmation.
65
- - Adding a required field to an existing entity should include a default when possible.
66
- - Changing a field type is high risk; inspect current schema and confirm intent before applying.
67
- - Schema restore creates a new restore version; it does not roll business data back.
68
-
69
- ## Version Rules
70
-
71
- Schema versions manage entity definitions only. They do not roll back `entitydatashares`.
72
-
73
- After apply, use the returned version context:
74
-
75
- ```json
76
- {
77
- "next": {
78
- "recommendedAction": "sync_schema_artifacts",
79
- "versionId": "dbv_next"
80
- }
81
- }
82
- ```
83
-
84
- The synced manifest must be read before updating SDK bindings.
85
-
86
- ## Narrow Edit Flow
87
-
88
- Single operations are acceptable for small explicit edits, such as "add priority to Todo":
89
-
90
- 1. `get_entity`
91
- 2. Check whether field already exists.
92
- 3. Preview/apply one `add_field` patch or use the schema operation fallback.
93
- 4. Sync artifacts.
94
- 5. Update SDK/UI.
95
-
96
- For broader features, batch operations into one patch.
@@ -1,172 +0,0 @@
1
- # Data Access Patterns
2
-
3
- Use this reference to connect backend `access` design to frontend SDK calls.
4
-
5
- ## Private Per-User Data
6
-
7
- Use for todos, notes, journals, saved generations, personal files, dashboards, and user-owned
8
- settings.
9
-
10
- Schema posture:
11
-
12
- ```json
13
- {
14
- "visibility": "private",
15
- "access": {
16
- "authenticated": {
17
- "read": "own",
18
- "create": "own",
19
- "update": "own",
20
- "delete": "own"
21
- },
22
- "public": {
23
- "read": "none",
24
- "create": "none",
25
- "update": "none",
26
- "delete": "none"
27
- }
28
- }
29
- }
30
- ```
31
-
32
- Frontend calls:
33
-
34
- ```ts
35
- const result = await howone.entities.Todo.query.mine({
36
- page: { number: 1, size: 50 },
37
- orderBy: { updatedDate: 'desc' },
38
- })
39
- ```
40
-
41
- Rules:
42
-
43
- - Use `query.mine(...)` for list pages.
44
- - Use authenticated `create/update/delete`.
45
- - Do not pass owner fields such as `ownerId`, `created_by_id`, `createdById`,
46
- `created_by_user_id`, or `puid`.
47
-
48
- ## Authenticated Shared Data
49
-
50
- Use when logged-in users in the app should see shared records.
51
-
52
- Schema posture:
53
-
54
- ```json
55
- {
56
- "visibility": "private",
57
- "access": {
58
- "authenticated": {
59
- "read": "all",
60
- "create": "all",
61
- "update": "all",
62
- "delete": "all"
63
- },
64
- "public": {
65
- "read": "none",
66
- "create": "none",
67
- "update": "none",
68
- "delete": "none"
69
- }
70
- }
71
- }
72
- ```
73
-
74
- Frontend calls:
75
-
76
- ```ts
77
- const result = await howone.entities.Project.query({
78
- page: { number: 1, size: 20 },
79
- orderBy: { updatedDate: 'desc' },
80
- })
81
- ```
82
-
83
- Use `query(...)`, not `query.mine(...)`.
84
-
85
- ## Public Read-Only Content
86
-
87
- Use for public articles, templates, catalogs, profiles, or landing-page content.
88
-
89
- Schema posture:
90
-
91
- ```json
92
- {
93
- "visibility": "public",
94
- "access": {
95
- "authenticated": {
96
- "read": "all",
97
- "create": "all",
98
- "update": "all",
99
- "delete": "all"
100
- },
101
- "public": {
102
- "read": "list",
103
- "create": "none",
104
- "update": "none",
105
- "delete": "none",
106
- "allowedFilters": ["slug", "status", "category"],
107
- "allowedSorts": ["publishedAt", "updatedDate"],
108
- "defaultLimit": 20,
109
- "maxLimit": 100
110
- }
111
- }
112
- }
113
- ```
114
-
115
- Frontend calls:
116
-
117
- ```ts
118
- const result = await howone.public.entities.Article.query({
119
- where: { status: 'published' },
120
- page: { number: 1, size: 20 },
121
- orderBy: { publishedAt: 'desc' },
122
- })
123
- ```
124
-
125
- Public query types should expose only allowed filters and allowed sorts.
126
-
127
- ## Public Scoped Share Pages
128
-
129
- Use for public URLs that expose one owner-scoped record, such as QR pages or profile pages.
130
-
131
- Schema posture:
132
-
133
- ```json
134
- {
135
- "visibility": "public",
136
- "access": {
137
- "authenticated": {
138
- "read": "own",
139
- "create": "own",
140
- "update": "own",
141
- "delete": "own"
142
- },
143
- "public": {
144
- "read": "scoped",
145
- "create": "none",
146
- "update": "none",
147
- "delete": "none",
148
- "requiredScopes": ["ownerId", "slug"],
149
- "allowedFilters": ["slug", "active"],
150
- "allowedSorts": ["updatedDate"],
151
- "defaultLimit": 1,
152
- "maxLimit": 10
153
- }
154
- }
155
- }
156
- ```
157
-
158
- Frontend calls:
159
-
160
- ```ts
161
- const result = await howone.public.entities.QrProfile.queryScoped({
162
- where: { ownerId, slug, active: true },
163
- page: { number: 1, size: 1 },
164
- })
165
- ```
166
-
167
- Rules:
168
-
169
- - Pass every `requiredScopes` field.
170
- - Do not use current user's `puid` as public owner scope unless schema explicitly stores that
171
- value as the public scope.
172
- - Public scoped reads must stay inside `howone.public.entities.*`.