howone 0.1.31 → 0.1.32
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/package.json +1 -1
- package/templates/vite/.howone/skills/howone/01-architect/01-app-generation.md +33 -27
- package/templates/vite/.howone/skills/howone/01-architect/02-manifest-codegen.md +2 -2
- package/templates/vite/.howone/skills/howone/02-entity-schema/01-schema-design.md +9 -29
- package/templates/vite/.howone/skills/howone/02-entity-schema/02-schema-operations.md +166 -235
- package/templates/vite/.howone/skills/howone/02-entity-schema/03-access-models.md +151 -0
- package/templates/vite/.howone/skills/howone/02-entity-schema/04-query-contracts.md +123 -0
- package/templates/vite/.howone/skills/howone/02-entity-schema/05-ai-persistence-patterns.md +84 -201
- package/templates/vite/.howone/skills/howone/03-ai-capabilities/01-ai-capability-architecture.md +37 -32
- package/templates/vite/.howone/skills/howone/03-ai-capabilities/02-workflow-contract-rules.md +5 -4
- package/templates/vite/.howone/skills/howone/03-ai-capabilities/04-workflow-operations.md +89 -204
- package/templates/vite/.howone/skills/howone/03-ai-capabilities/05-ai-feature-playbooks.md +8 -29
- package/templates/vite/.howone/skills/howone/04-app-sdk/01-client-setup.md +1 -2
- package/templates/vite/.howone/skills/howone/04-app-sdk/07-ai-action-calls.md +2 -2
- package/templates/vite/.howone/skills/howone/04-app-sdk/08-ai-manifest-handoff.md +6 -5
- package/templates/vite/.howone/skills/howone/04-app-sdk/09-extension-boundaries.md +1 -1
- package/templates/vite/.howone/skills/howone/{02-entity-schema/03-data-access-patterns.md → 04-app-sdk/11-entity-data-access-patterns.md} +4 -4
- package/templates/vite/.howone/skills/howone/{02-entity-schema/04-query-dsl-and-responses.md → 04-app-sdk/12-query-dsl-and-responses.md} +1 -1
- package/templates/vite/.howone/skills/howone/SKILL.md +112 -75
package/package.json
CHANGED
|
@@ -4,8 +4,9 @@ Read immediately after `skill(name="howone")` and before platform design tools,
|
|
|
4
4
|
edits, or implementation guesses.
|
|
5
5
|
|
|
6
6
|
HowOne is a generated app platform. This file classifies **user scope**, separates **platform
|
|
7
|
-
contracts** from **app-owned integrations**, routes to
|
|
8
|
-
|
|
7
|
+
contracts** from **app-owned integrations**, and routes to backend, AI, or SDK tracks. Keep design
|
|
8
|
+
tracks separate: backend design does not require SDK references; AI design does not require SDK
|
|
9
|
+
references until the synced AI manifest is ready for code.
|
|
9
10
|
|
|
10
11
|
## Scope classification
|
|
11
12
|
|
|
@@ -14,9 +15,9 @@ Map the user request to surfaces. Include only what they need.
|
|
|
14
15
|
| Need | Tracks | Notes |
|
|
15
16
|
|---|---|---|
|
|
16
17
|
| Unclear or full product scope | `01-architect/` (+ others as discovered) | Finish this file before other tracks |
|
|
17
|
-
| Persisted app data on HowOne | `02-entity-schema/` → sync
|
|
18
|
-
| HowOne AI features | `03-ai-capabilities/` → sync →
|
|
19
|
-
| SDK wiring, auth, UI calls | `04-app-sdk/` |
|
|
18
|
+
| Persisted app data on HowOne | `02-entity-schema/` → sync | Skip SDK until app code needs calls |
|
|
19
|
+
| HowOne AI features | `03-ai-capabilities/` → sync → external workflow | Verify catalog before design |
|
|
20
|
+
| SDK wiring, auth, UI calls | `04-app-sdk/` | Only after manifests exist when contracts apply |
|
|
20
21
|
| UI only, no HowOne data/AI | App code under `{appRoot}` | No schema/AI design tools |
|
|
21
22
|
| External systems the user provides | App code + config | Not platform contracts unless combined with rows above |
|
|
22
23
|
|
|
@@ -76,9 +77,9 @@ Inspect-only platform reads do not replace this file before the first **design w
|
|
|
76
77
|
|
|
77
78
|
| Layer | Source of truth | App responsibility |
|
|
78
79
|
|---|---|---|
|
|
79
|
-
| Database | `{appRoot}/.howone/database/manifest.json` |
|
|
80
|
-
| AI | `{appRoot}/.howone/ai/manifest.json` + workflow status | AI
|
|
81
|
-
| SDK | `@howone/sdk` + `{appRoot}/src/lib/sdk.ts` |
|
|
80
|
+
| Database | `{appRoot}/.howone/database/manifest.json` | Entity binding handoff |
|
|
81
|
+
| AI | `{appRoot}/.howone/ai/manifest.json` + workflow status | AI binding handoff |
|
|
82
|
+
| SDK | `@howone/sdk` + `{appRoot}/src/lib/sdk.ts` | App runtime calls |
|
|
82
83
|
| Frontend | App code | UI, state, feedback |
|
|
83
84
|
|
|
84
85
|
Validated/synced manifests drive code—not prompts or memory.
|
|
@@ -87,7 +88,8 @@ Validated/synced manifests drive code—not prompts or memory.
|
|
|
87
88
|
user request → scope → platform contracts → sync → sdk binding → UI
|
|
88
89
|
```
|
|
89
90
|
|
|
90
|
-
|
|
91
|
+
When SDK work is in scope, import the app runtime from `src/lib/sdk.ts`; do not guess entity/action
|
|
92
|
+
names or platform URLs.
|
|
91
93
|
|
|
92
94
|
## Minimum track reads (after this file)
|
|
93
95
|
|
|
@@ -95,9 +97,10 @@ Use `SKILL.md` for the full file index. Typical minimums:
|
|
|
95
97
|
|
|
96
98
|
| Surface in scope | Read at least |
|
|
97
99
|
|---|---|
|
|
98
|
-
| Entity/schema design | `02-entity-schema/01-schema-design.md`, `02-schema-operations.md` |
|
|
99
|
-
|
|
|
100
|
-
|
|
|
100
|
+
| Entity/schema design | `02-entity-schema/01-schema-design.md`, `02-entity-schema/02-schema-operations.md` |
|
|
101
|
+
| Backend query/public contracts | add `02-entity-schema/03-access-models.md`, `02-entity-schema/04-query-contracts.md` |
|
|
102
|
+
| App entity query code | add `04-app-sdk/11-entity-data-access-patterns.md`, `04-app-sdk/12-query-dsl-and-responses.md` after manifest sync |
|
|
103
|
+
| AI design | `03-ai-capabilities/01-ai-capability-architecture.md`, `03-ai-capabilities/03-service-capability-catalog.md`, `03-ai-capabilities/02-workflow-contract-rules.md` |
|
|
101
104
|
| AI + saved outputs | add `02-entity-schema/05-ai-persistence-patterns.md` after AI contract is known |
|
|
102
105
|
| Bindings after sync | `02-manifest-codegen.md` + relevant `04-app-sdk/` files |
|
|
103
106
|
|
|
@@ -105,14 +108,14 @@ Use `SKILL.md` for the full file index. Typical minimums:
|
|
|
105
108
|
|
|
106
109
|
Choose before schema and UI.
|
|
107
110
|
|
|
108
|
-
| Product need | Access |
|
|
111
|
+
| Product need | Access posture | Runtime handoff |
|
|
109
112
|
|---|---|---|
|
|
110
|
-
| Per-user private data | authenticated own |
|
|
111
|
-
| Shared authenticated data | authenticated all |
|
|
112
|
-
| Public catalog | public list where safe |
|
|
113
|
-
| Public share/detail | public scoped |
|
|
114
|
-
| Anonymous create | public create scoped/any |
|
|
115
|
-
| AI run history | authenticated own |
|
|
113
|
+
| Per-user private data | authenticated own | SDK entity track later |
|
|
114
|
+
| Shared authenticated data | authenticated all | SDK entity track later |
|
|
115
|
+
| Public catalog | public list where safe | SDK public entity track later |
|
|
116
|
+
| Public share/detail | public scoped | SDK public entity track later |
|
|
117
|
+
| Anonymous create | public create scoped/any | SDK public entity track later |
|
|
118
|
+
| AI run history | authenticated own | private history entity |
|
|
116
119
|
| AI public share | private + public scoped entities | two entities |
|
|
117
120
|
|
|
118
121
|
Defaults: "my/private" → own; public catalog only when fields are safe; share links → scoped + limits.
|
|
@@ -126,30 +129,33 @@ Defaults: "my/private" → own; public catalog only when fields are safe; share
|
|
|
126
129
|
| External IdP | headless + adapter | adapter owns token |
|
|
127
130
|
| No auth | `auth: 'none'` | — |
|
|
128
131
|
|
|
129
|
-
Keep default HowOne brand control unless user asks to hide.
|
|
132
|
+
Keep default HowOne brand control unless user asks to hide. Resolve identity through the SDK track
|
|
133
|
+
when app code depends on the current user.
|
|
130
134
|
|
|
131
135
|
## Entity workflow (when `02-entity-schema/` in scope)
|
|
132
136
|
|
|
133
137
|
1. Read schema design + operations references.
|
|
134
138
|
2. Inspect current schema/manifest.
|
|
135
139
|
3. Design full entity contract (fields, access, indexes).
|
|
136
|
-
4.
|
|
140
|
+
4. Apply one complete patch → `sync_schema_artifacts`.
|
|
137
141
|
5. Read `{appRoot}/.howone/database/manifest.json`.
|
|
138
|
-
6.
|
|
139
|
-
7. UI via `howone.entities.*` / public namespace; validate.
|
|
142
|
+
6. Stop backend design. Read SDK references only if implementing app calls.
|
|
140
143
|
|
|
141
|
-
High-risk changes (delete entity/field, broaden public write, required
|
|
144
|
+
No schema dry-run step. High-risk changes (delete entity/field, broaden public write, required
|
|
145
|
+
without default) need explicit user alignment before applying the final patch.
|
|
142
146
|
|
|
143
147
|
## AI workflow (when `03-ai-capabilities/` in scope)
|
|
144
148
|
|
|
145
149
|
1. Read architecture + **catalog** (feasibility) + contract rules; use playbooks when they match.
|
|
146
|
-
2.
|
|
147
|
-
3. External workflow create/update per workflow-operations reference; keep
|
|
150
|
+
2. Apply one complete capability patch → `sync_ai_artifacts`.
|
|
151
|
+
3. External workflow create/update per workflow-operations reference; keep job/request IDs from tool results.
|
|
148
152
|
4. Read `{appRoot}/.howone/ai/manifest.json`.
|
|
149
|
-
5.
|
|
153
|
+
5. Stop AI design. Read SDK references only if implementing app calls.
|
|
150
154
|
6. If persistence required: entity workflow after output contract is fixed.
|
|
151
155
|
|
|
152
156
|
Do not fake catalog-backed AI. Platform gap → stop AI design path, explain generically.
|
|
157
|
+
No AI capability dry-run step. Design the contract from the skill references, then apply the final
|
|
158
|
+
capability patch.
|
|
153
159
|
|
|
154
160
|
## Scope patterns (not a product catalog)
|
|
155
161
|
|
|
@@ -15,8 +15,8 @@ Sync tools (`sync_schema_artifacts`, `sync_ai_artifacts`) write the manifests. T
|
|
|
15
15
|
|
|
16
16
|
For AI capabilities, external workflow create/update is submitted by `external-ai-capability` from
|
|
17
17
|
the synced manifest. Do not duplicate AI schemas in app code beyond generated zod/type bindings.
|
|
18
|
-
For workflow edits, `
|
|
19
|
-
|
|
18
|
+
For workflow edits, `external-ai-capability` may rotate the manifest `workflowId`; always re-read
|
|
19
|
+
`.howone/ai/manifest.json` after the tool returns before updating `src/lib/sdk.ts`.
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
@@ -7,7 +7,8 @@ runtime contract from `docs/dynamic-entity-architecture.zh.md` into instructions
|
|
|
7
7
|
actually apply.
|
|
8
8
|
|
|
9
9
|
This file answers: **what should the schema be?** For how to apply changes, read
|
|
10
|
-
`02-schema-operations.md`. For
|
|
10
|
+
`02-schema-operations.md`. For access/query contract details, read `03-access-models.md` and
|
|
11
|
+
`04-query-contracts.md`. For frontend calls, wait for manifest sync, then read
|
|
11
12
|
`04-app-sdk/02-entity-operations.md`.
|
|
12
13
|
|
|
13
14
|
## Mental Model
|
|
@@ -49,7 +50,7 @@ Each section has a different job:
|
|
|
49
50
|
| `relations` | Valid include names | What can be joined/expanded? |
|
|
50
51
|
| `presentation` | Admin/generator hints | What fields identify the record in UI? |
|
|
51
52
|
| `lifecycle` | Audit/delete policy hints | Is this append-only, soft-deletable, audited? |
|
|
52
|
-
| `performance` |
|
|
53
|
+
| `performance` | Runtime/admin pagination/sort hints | What limits and sorts are safe? |
|
|
53
54
|
|
|
54
55
|
## Storage Reality
|
|
55
56
|
|
|
@@ -229,7 +230,7 @@ Rules:
|
|
|
229
230
|
- For private user data, use all `own`.
|
|
230
231
|
- For authenticated shared dashboards/CMS, use `read: "all"` and be conservative on update/delete.
|
|
231
232
|
- Do not pass owner fields in authenticated payloads or filters. Backend derives owner from auth.
|
|
232
|
-
-
|
|
233
|
+
- Authenticated own lists must use the authenticated channel so the backend can derive ownership.
|
|
233
234
|
|
|
234
235
|
### Public Access
|
|
235
236
|
|
|
@@ -312,14 +313,7 @@ Use for todos, notes, journals, saved generations, personal settings.
|
|
|
312
313
|
}
|
|
313
314
|
```
|
|
314
315
|
|
|
315
|
-
SDK
|
|
316
|
-
|
|
317
|
-
```ts
|
|
318
|
-
await howone.entities.Todo.query.mine({
|
|
319
|
-
page: { number: 1, size: 50 },
|
|
320
|
-
orderBy: { updatedDate: 'desc' },
|
|
321
|
-
})
|
|
322
|
-
```
|
|
316
|
+
App implementation handoff: use the SDK entity operations reference after manifest sync.
|
|
323
317
|
|
|
324
318
|
### B. Public Read-Only Catalog
|
|
325
319
|
|
|
@@ -362,15 +356,8 @@ Use for articles, templates, listings, published galleries.
|
|
|
362
356
|
}
|
|
363
357
|
```
|
|
364
358
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
```ts
|
|
368
|
-
await howone.public.entities.Article.query({
|
|
369
|
-
where: { status: 'published' },
|
|
370
|
-
orderBy: { publishedAt: 'desc' },
|
|
371
|
-
page: { number: 1, size: 20 },
|
|
372
|
-
})
|
|
373
|
-
```
|
|
359
|
+
App implementation handoff: public list calls are generated from `access.public.allowedFilters`,
|
|
360
|
+
`allowedSorts`, and pagination limits after manifest sync.
|
|
374
361
|
|
|
375
362
|
### C. Public Scoped Share Page
|
|
376
363
|
|
|
@@ -408,14 +395,7 @@ Use for QR profile, public invoice, public resume, shared report.
|
|
|
408
395
|
}
|
|
409
396
|
```
|
|
410
397
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
```ts
|
|
414
|
-
await howone.public.entities.QrProfile.queryScoped({
|
|
415
|
-
where: { ownerId, slug, active: true },
|
|
416
|
-
page: { number: 1, size: 1 },
|
|
417
|
-
})
|
|
418
|
-
```
|
|
398
|
+
App implementation handoff: scoped public reads must include every `requiredScopes` value.
|
|
419
399
|
|
|
420
400
|
### D. Workflow Output History
|
|
421
401
|
|
|
@@ -493,7 +473,7 @@ Use `relations` only when frontend/admin needs `include`.
|
|
|
493
473
|
|
|
494
474
|
Rules:
|
|
495
475
|
|
|
496
|
-
- Keep relation names stable;
|
|
476
|
+
- Keep relation names stable; app code may use them in `include`.
|
|
497
477
|
- Do not use relations to hide missing denormalized fields required by list pages.
|
|
498
478
|
- Public include should be conservative; ensure related data is safe to expose.
|
|
499
479
|
|