howone 0.1.23 → 0.1.25
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-sdk/01-architect/01-app-generation.md +180 -91
- package/templates/vite/.howone/skills/howone-sdk/01-architect/02-manifest-codegen.md +67 -4
- package/templates/vite/.howone/skills/howone-sdk/02-database/01-schema-design.md +463 -69
- package/templates/vite/.howone/skills/howone-sdk/02-database/02-schema-operations.md +366 -64
- package/templates/vite/.howone/skills/howone-sdk/02-database/03-data-access-patterns.md +204 -67
- package/templates/vite/.howone/skills/howone-sdk/02-database/04-query-dsl-and-responses.md +237 -0
- package/templates/vite/.howone/skills/howone-sdk/02-database/05-ai-persistence-patterns.md +372 -0
- package/templates/vite/.howone/skills/howone-sdk/03-sdk/01-client-setup.md +58 -36
- package/templates/vite/.howone/skills/howone-sdk/03-sdk/02-entity-operations.md +67 -0
- package/templates/vite/.howone/skills/howone-sdk/03-sdk/03-auth.md +267 -469
- package/templates/vite/.howone/skills/howone-sdk/03-sdk/04-react-integration.md +113 -320
- package/templates/vite/.howone/skills/howone-sdk/03-sdk/07-ai-action-calls.md +66 -16
- package/templates/vite/.howone/skills/howone-sdk/03-sdk/08-extension-boundaries.md +226 -0
- package/templates/vite/.howone/skills/howone-sdk/04-ai/01-ai-capability-architecture.md +159 -96
- package/templates/vite/.howone/skills/howone-sdk/04-ai/02-workflow-contract-rules.md +353 -96
- package/templates/vite/.howone/skills/howone-sdk/04-ai/03-ai-sdk-handoff.md +181 -42
- package/templates/vite/.howone/skills/howone-sdk/04-ai/04-service-capability-catalog.md +281 -0
- package/templates/vite/.howone/skills/howone-sdk/04-ai/05-workflow-operations.md +256 -0
- package/templates/vite/.howone/skills/howone-sdk/04-ai/06-ai-feature-playbooks.md +296 -0
- package/templates/vite/.howone/skills/howone-sdk/SKILL.md +29 -12
- package/templates/vite/.howone/skills/howone-sdk/agents/openai.yaml +2 -2
- package/templates/vite/package.json +1 -1
- package/templates/vite/.howone/skills/howone-sdk/04-ai/.gitkeep +0 -1
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Workflow Operations
|
|
2
|
+
|
|
3
|
+
Use this reference when submitting or checking external workflow create/update operations.
|
|
4
|
+
|
|
5
|
+
Source: `docs/ai-worlfow-guide-schema.md`.
|
|
6
|
+
|
|
7
|
+
## Endpoints
|
|
8
|
+
|
|
9
|
+
| Purpose | Method | Path |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Submit create/update operations | `POST` | `/workflow/{project_short_id}/operate` |
|
|
12
|
+
| Check operation status | `GET` | `/workflow/status_check/{request_id}` |
|
|
13
|
+
|
|
14
|
+
All requests require `Authorization: Bearer <token>`.
|
|
15
|
+
|
|
16
|
+
## Operation Object
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"appId": "proj_docs",
|
|
21
|
+
"workflowId": "550e8400-e29b-41d4-a716-446655440000",
|
|
22
|
+
"mode": "create",
|
|
23
|
+
"capability": {
|
|
24
|
+
"name": "summarizeDocument",
|
|
25
|
+
"description": "Reads an uploaded document and produces a concise summary highlighting the key points.",
|
|
26
|
+
"inputSchema": {},
|
|
27
|
+
"outputSchema": {},
|
|
28
|
+
"outputEntityName": "DocumentSummary"
|
|
29
|
+
},
|
|
30
|
+
"requestMeta": {}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Field rules:
|
|
35
|
+
|
|
36
|
+
| Field | Required | Notes |
|
|
37
|
+
|---|---:|---|
|
|
38
|
+
| `appId` | yes | Must match path project short ID. |
|
|
39
|
+
| `workflowId` | yes | UUID v4 from manifest/capability contract. |
|
|
40
|
+
| `mode` | yes | `"create"` or `"update"`. |
|
|
41
|
+
| `capability` | yes | Synced capability contract. |
|
|
42
|
+
| `workflowConfigID` | update only | Comes from completed status result. |
|
|
43
|
+
| `updatePrompt` | update only | Natural language behavior change request. |
|
|
44
|
+
| `requestMeta` | no | Optional execution metadata. |
|
|
45
|
+
|
|
46
|
+
Do not hand-copy stale schemas. Submit from synced `.howone/ai/manifest.json` whenever possible.
|
|
47
|
+
|
|
48
|
+
## Create Request
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"operations": [
|
|
53
|
+
{
|
|
54
|
+
"appId": "proj_docs",
|
|
55
|
+
"workflowId": "550e8400-e29b-41d4-a716-446655440000",
|
|
56
|
+
"mode": "create",
|
|
57
|
+
"capability": {
|
|
58
|
+
"name": "summarizeDocument",
|
|
59
|
+
"description": "Reads an uploaded document and produces a concise summary highlighting the key points.",
|
|
60
|
+
"inputSchema": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"document_url": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"format": "uri",
|
|
66
|
+
"description": "Supabase Storage URL of the uploaded document."
|
|
67
|
+
},
|
|
68
|
+
"summary_length": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "Desired summary length, e.g. short, medium, long, or a specific sentence count."
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": ["document_url"]
|
|
74
|
+
},
|
|
75
|
+
"outputSchema": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"properties": {
|
|
78
|
+
"summary": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "The generated summary in the same language as the source document."
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": ["summary"]
|
|
84
|
+
},
|
|
85
|
+
"outputEntityName": "DocumentSummary"
|
|
86
|
+
},
|
|
87
|
+
"requestMeta": {}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Create response:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"request_ids": [
|
|
98
|
+
{
|
|
99
|
+
"request_id": "req_abc123",
|
|
100
|
+
"workflow_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
101
|
+
"workflow_config_id": null,
|
|
102
|
+
"operation_type": "generate"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Store every `request_id`.
|
|
109
|
+
|
|
110
|
+
## Update Request
|
|
111
|
+
|
|
112
|
+
Use update when the external workflow implementation already exists.
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"operations": [
|
|
117
|
+
{
|
|
118
|
+
"appId": "proj_docs",
|
|
119
|
+
"workflowId": "550e8400-e29b-41d4-a716-446655440000",
|
|
120
|
+
"workflowConfigID": "cfg_xyz789",
|
|
121
|
+
"mode": "update",
|
|
122
|
+
"capability": {
|
|
123
|
+
"name": "summarizeDocument",
|
|
124
|
+
"description": "Reads an uploaded document and produces a concise summary. Supports paragraph or bullet-point format.",
|
|
125
|
+
"inputSchema": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"properties": {
|
|
128
|
+
"document_url": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"format": "uri",
|
|
131
|
+
"description": "Supabase Storage URL of the uploaded document."
|
|
132
|
+
},
|
|
133
|
+
"output_format": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"description": "Format of the summary output: paragraphs or bullet_points."
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": ["document_url"]
|
|
139
|
+
},
|
|
140
|
+
"outputSchema": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"properties": {
|
|
143
|
+
"summary": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"description": "The generated summary in the requested format and same language as the source document."
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"required": ["summary"]
|
|
149
|
+
},
|
|
150
|
+
"outputEntityName": "DocumentSummary"
|
|
151
|
+
},
|
|
152
|
+
"updatePrompt": "Add support for optional bullet-point summary output through output_format.",
|
|
153
|
+
"requestMeta": {}
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Update response has `operation_type: "edit"`.
|
|
160
|
+
|
|
161
|
+
## Status Polling
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
POST /workflow/{project_short_id}/operate
|
|
165
|
+
-> request_ids[]
|
|
166
|
+
|
|
167
|
+
GET /workflow/status_check/{request_id}
|
|
168
|
+
-> queued/running/completed/failed
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Poll every 2-5 seconds until terminal.
|
|
172
|
+
|
|
173
|
+
Status values:
|
|
174
|
+
|
|
175
|
+
| Status | Meaning | Action |
|
|
176
|
+
|---|---|---|
|
|
177
|
+
| `queued` | waiting | continue polling |
|
|
178
|
+
| `running` | being generated/edited | continue polling |
|
|
179
|
+
| `completed` | operation finished | inspect `payload.success` |
|
|
180
|
+
| `failed` | system failure | report/display error |
|
|
181
|
+
|
|
182
|
+
Completed success:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"success": true,
|
|
187
|
+
"jobId": "req_abc123",
|
|
188
|
+
"status": "completed",
|
|
189
|
+
"payload": {
|
|
190
|
+
"success": true,
|
|
191
|
+
"workflow_details": {
|
|
192
|
+
"workflow_graph": {},
|
|
193
|
+
"new_workflow_config_id": "cfg_xyz789"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Completed business failure:
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"success": true,
|
|
204
|
+
"status": "completed",
|
|
205
|
+
"payload": {
|
|
206
|
+
"success": false,
|
|
207
|
+
"display_error_message": "Unable to generate workflow: the requested capability is not supported.",
|
|
208
|
+
"full_error_message": "Detailed internal error..."
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
System failure:
|
|
214
|
+
|
|
215
|
+
```json
|
|
216
|
+
{
|
|
217
|
+
"success": true,
|
|
218
|
+
"status": "failed",
|
|
219
|
+
"payload": {
|
|
220
|
+
"success": false,
|
|
221
|
+
"display_error_message": "Service temporarily unavailable.",
|
|
222
|
+
"full_error_message": "Timeout after 120s waiting for LLM response."
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
On success, persist:
|
|
228
|
+
|
|
229
|
+
- `request_id`;
|
|
230
|
+
- `workflowId`;
|
|
231
|
+
- `new_workflow_config_id`;
|
|
232
|
+
- capability name;
|
|
233
|
+
- mode;
|
|
234
|
+
- any status/error useful for future update.
|
|
235
|
+
|
|
236
|
+
## Agent Handoff Notes
|
|
237
|
+
|
|
238
|
+
When another tool/layer owns submission:
|
|
239
|
+
|
|
240
|
+
- provide the synced capability name and manifest path;
|
|
241
|
+
- do not rewrite raw schemas if the tool can load manifest;
|
|
242
|
+
- preserve returned request IDs;
|
|
243
|
+
- after status success, preserve `workflowConfigID` for future edits;
|
|
244
|
+
- regenerate SDK only after manifest changes, not after behavior-only workflow edits.
|
|
245
|
+
|
|
246
|
+
## Operation Checklist
|
|
247
|
+
|
|
248
|
+
- Manifest is synced before submit.
|
|
249
|
+
- `appId` matches path project ID.
|
|
250
|
+
- `workflowId` is a UUID.
|
|
251
|
+
- `mode=create` omits `workflowConfigID`.
|
|
252
|
+
- `mode=update` includes confirmed `workflowConfigID`.
|
|
253
|
+
- `updatePrompt` says what to change, not a whole new fake schema.
|
|
254
|
+
- Request IDs are stored.
|
|
255
|
+
- Status is polled to terminal.
|
|
256
|
+
- Business failure and system failure are handled differently.
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# AI Feature Playbooks
|
|
2
|
+
|
|
3
|
+
Use this reference when turning a user request into concrete HowOne AI capabilities, database
|
|
4
|
+
entities, and SDK calls.
|
|
5
|
+
|
|
6
|
+
## Playbook: Document Summary
|
|
7
|
+
|
|
8
|
+
Use when user uploads or links a document and wants a summary.
|
|
9
|
+
|
|
10
|
+
Capability:
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"name": "summarizeDocument",
|
|
15
|
+
"description": "Reads an uploaded document and produces a concise summary highlighting the key points.",
|
|
16
|
+
"inputSchema": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"document_url": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "uri",
|
|
22
|
+
"description": "Supabase Storage URL of the uploaded document."
|
|
23
|
+
},
|
|
24
|
+
"summary_length": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Desired summary length, e.g. short, medium, long, or a specific sentence count."
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required": ["document_url"]
|
|
30
|
+
},
|
|
31
|
+
"outputSchema": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"summary": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Summary in the same language as the source document."
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": ["summary"]
|
|
40
|
+
},
|
|
41
|
+
"outputEntityName": "DocumentSummary"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Persistence:
|
|
46
|
+
|
|
47
|
+
- private `DocumentSummary` if user history is needed;
|
|
48
|
+
- fields: `documentUrl`, `summary`, `status`, `errorMessage`, `requestedAt`, `completedAt`.
|
|
49
|
+
|
|
50
|
+
SDK:
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
const output = await howone.ai.summarizeDocument.run({ document_url: fileUrl })
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Playbook: Image Generator
|
|
57
|
+
|
|
58
|
+
Use for prompt-to-image products.
|
|
59
|
+
|
|
60
|
+
Capability:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"name": "generateImage",
|
|
65
|
+
"description": "Generates an image based on a natural language description provided by the user.",
|
|
66
|
+
"inputSchema": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"image_description": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "Detailed description of the image to generate, including subject, style, mood, and composition."
|
|
72
|
+
},
|
|
73
|
+
"style_preference": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "Optional style preference such as watercolor, photorealistic, anime, or flat design."
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": ["image_description"]
|
|
79
|
+
},
|
|
80
|
+
"outputSchema": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"properties": {
|
|
83
|
+
"generated_image_url": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"format": "uri",
|
|
86
|
+
"description": "Public URL of the generated image."
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": ["generated_image_url"]
|
|
90
|
+
},
|
|
91
|
+
"outputEntityName": "GeneratedImage"
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Persistence:
|
|
96
|
+
|
|
97
|
+
- use `Generation` for private history;
|
|
98
|
+
- public share requires separate `SharedGeneration`.
|
|
99
|
+
|
|
100
|
+
SDK:
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
await runAiActionAndPersist({
|
|
104
|
+
entity: howone.entities.Generation,
|
|
105
|
+
input: { image_description, style_preference },
|
|
106
|
+
createPending: (input) => ({
|
|
107
|
+
prompt: input.image_description,
|
|
108
|
+
style: input.style_preference ?? null,
|
|
109
|
+
status: 'pending',
|
|
110
|
+
requestedAt: new Date().toISOString(),
|
|
111
|
+
}),
|
|
112
|
+
run: (input) => howone.ai.generateImage.run(input),
|
|
113
|
+
mapCompleted: ({ output }) => ({
|
|
114
|
+
status: 'completed',
|
|
115
|
+
resultUrl: output.generated_image_url,
|
|
116
|
+
completedAt: new Date().toISOString(),
|
|
117
|
+
}),
|
|
118
|
+
})
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Playbook: Image Editor
|
|
122
|
+
|
|
123
|
+
Use when user uploads/selects an image and describes edits.
|
|
124
|
+
|
|
125
|
+
Inputs:
|
|
126
|
+
|
|
127
|
+
- `source_image_url`;
|
|
128
|
+
- `edit_instruction`.
|
|
129
|
+
|
|
130
|
+
Output:
|
|
131
|
+
|
|
132
|
+
- `edited_image_url`.
|
|
133
|
+
|
|
134
|
+
Rules:
|
|
135
|
+
|
|
136
|
+
- app uploads source file first;
|
|
137
|
+
- workflow receives URL only;
|
|
138
|
+
- keep edit instruction focused;
|
|
139
|
+
- persist both original and edited URLs if history matters.
|
|
140
|
+
|
|
141
|
+
## Playbook: News/Research Briefing
|
|
142
|
+
|
|
143
|
+
Use for latest info or source-backed research.
|
|
144
|
+
|
|
145
|
+
Inputs:
|
|
146
|
+
|
|
147
|
+
- `topic`;
|
|
148
|
+
- optional `language`;
|
|
149
|
+
- optional `depth` as loose string, not strict enum unless UI really has fixed modes.
|
|
150
|
+
|
|
151
|
+
Output:
|
|
152
|
+
|
|
153
|
+
- structured `briefing` object with `summary` and `sources`.
|
|
154
|
+
|
|
155
|
+
Rules:
|
|
156
|
+
|
|
157
|
+
- use web search/crawling capability;
|
|
158
|
+
- include source URLs;
|
|
159
|
+
- output descriptions must specify language;
|
|
160
|
+
- if user asks for latest/current, this workflow must retrieve data internally.
|
|
161
|
+
|
|
162
|
+
## Playbook: Stock Analysis
|
|
163
|
+
|
|
164
|
+
Use for historical price analysis.
|
|
165
|
+
|
|
166
|
+
Inputs:
|
|
167
|
+
|
|
168
|
+
- `trading_symbol`;
|
|
169
|
+
- `start`;
|
|
170
|
+
- `end`;
|
|
171
|
+
- `unit`: daily/minute when UI exposes it.
|
|
172
|
+
|
|
173
|
+
Output:
|
|
174
|
+
|
|
175
|
+
- `analysis`;
|
|
176
|
+
- optional `price_history` only if app renders chart from workflow output.
|
|
177
|
+
|
|
178
|
+
Rules:
|
|
179
|
+
|
|
180
|
+
- do not ask user for CSV unless they explicitly have data;
|
|
181
|
+
- historical only, no real-time streaming;
|
|
182
|
+
- combine with web search only if user asks for news/context.
|
|
183
|
+
|
|
184
|
+
## Playbook: Academic Literature Review
|
|
185
|
+
|
|
186
|
+
Use for paper search and bibliography.
|
|
187
|
+
|
|
188
|
+
Inputs:
|
|
189
|
+
|
|
190
|
+
- `query`;
|
|
191
|
+
- optional `language` for synthesized review;
|
|
192
|
+
- optional `citation_style`.
|
|
193
|
+
|
|
194
|
+
Outputs:
|
|
195
|
+
|
|
196
|
+
- `papers`;
|
|
197
|
+
- `review_summary`;
|
|
198
|
+
- `bibtex` if citations are needed.
|
|
199
|
+
|
|
200
|
+
Rules:
|
|
201
|
+
|
|
202
|
+
- do not promise full PDF availability;
|
|
203
|
+
- keep paper metadata fields useful and minimal;
|
|
204
|
+
- use source URLs/DOIs when returned.
|
|
205
|
+
|
|
206
|
+
## Playbook: Audio Transcription
|
|
207
|
+
|
|
208
|
+
Use for speech-to-text.
|
|
209
|
+
|
|
210
|
+
Inputs:
|
|
211
|
+
|
|
212
|
+
- `source_audio_url`;
|
|
213
|
+
- optional `language`;
|
|
214
|
+
- optional `with_speaker_info`.
|
|
215
|
+
|
|
216
|
+
Outputs:
|
|
217
|
+
|
|
218
|
+
- `transcript_text`;
|
|
219
|
+
- optional `utterances`.
|
|
220
|
+
|
|
221
|
+
Rules:
|
|
222
|
+
|
|
223
|
+
- app uploads audio first;
|
|
224
|
+
- workflow receives URL;
|
|
225
|
+
- if speaker diarization is not required, do not add utterances.
|
|
226
|
+
|
|
227
|
+
## Playbook: Text To Speech
|
|
228
|
+
|
|
229
|
+
Use for generating spoken audio from text.
|
|
230
|
+
|
|
231
|
+
Inputs:
|
|
232
|
+
|
|
233
|
+
- `text_to_generate`;
|
|
234
|
+
- `language`;
|
|
235
|
+
- optional `gender`;
|
|
236
|
+
- optional `audio_hint`.
|
|
237
|
+
|
|
238
|
+
Output:
|
|
239
|
+
|
|
240
|
+
- `audio_url`.
|
|
241
|
+
|
|
242
|
+
Rules:
|
|
243
|
+
|
|
244
|
+
- single speaker per call;
|
|
245
|
+
- dialogue should generate multiple clips and merge;
|
|
246
|
+
- persist audio URL through entity if user needs library/history.
|
|
247
|
+
|
|
248
|
+
## Playbook: Video Generator
|
|
249
|
+
|
|
250
|
+
Use for short video creation.
|
|
251
|
+
|
|
252
|
+
Inputs:
|
|
253
|
+
|
|
254
|
+
- `video_prompt`;
|
|
255
|
+
- optional `first_frame_url`;
|
|
256
|
+
- optional `aspect_ratio`;
|
|
257
|
+
- optional `duration`.
|
|
258
|
+
|
|
259
|
+
Output:
|
|
260
|
+
|
|
261
|
+
- `video_url`.
|
|
262
|
+
|
|
263
|
+
Rules:
|
|
264
|
+
|
|
265
|
+
- keep one clip short;
|
|
266
|
+
- for longer output, compose multiple clips and concatenate;
|
|
267
|
+
- first-frame image helps consistency.
|
|
268
|
+
|
|
269
|
+
## RAG Playbook
|
|
270
|
+
|
|
271
|
+
Use only when app needs question answering over user/project documents.
|
|
272
|
+
|
|
273
|
+
Workflows:
|
|
274
|
+
|
|
275
|
+
1. `indexDocuments`
|
|
276
|
+
- input: document URLs or collection reference;
|
|
277
|
+
- output: indexing result/status.
|
|
278
|
+
2. `queryKnowledgeBase`
|
|
279
|
+
- input: question + knowledge base reference;
|
|
280
|
+
- output: answer + sources.
|
|
281
|
+
|
|
282
|
+
Rules:
|
|
283
|
+
|
|
284
|
+
- RAG is the only standard two-workflow exception.
|
|
285
|
+
- Do not re-index on every question.
|
|
286
|
+
- Persist document/index status in entities if app needs history or dashboard.
|
|
287
|
+
|
|
288
|
+
## Feature Design Checklist
|
|
289
|
+
|
|
290
|
+
- Choose one playbook or clearly combine compatible playbooks.
|
|
291
|
+
- Verify capability exists in `04-service-capability-catalog.md`.
|
|
292
|
+
- Use URL inputs for files/media.
|
|
293
|
+
- Keep outputs minimal and product-facing.
|
|
294
|
+
- Decide persistence separately.
|
|
295
|
+
- Generate SDK bindings only after manifest sync.
|
|
296
|
+
- Use app-owned UI for progress/errors.
|
|
@@ -18,9 +18,9 @@ that app code must follow.
|
|
|
18
18
|
| Track | Folder | Use For |
|
|
19
19
|
|---|---|---|
|
|
20
20
|
| `01-architect/` | App generation + manifest flow | End-to-end HowOne app generation flow: when to design backend, when to sync manifests, when to update SDK bindings, and how to choose auth/data posture. |
|
|
21
|
-
| `02-database/` | Backend schema + data access design | Entity schema contract, schema operations, access modes, owner/public data posture, indexes, versions, and guardrails. |
|
|
21
|
+
| `02-database/` | Backend schema + data access design | Entity schema contract, schema operations, access modes, owner/public data posture, indexes, query DSL, AI output persistence, versions, and guardrails. |
|
|
22
22
|
| `03-sdk/` | Frontend SDK usage | `src/lib/sdk.ts`, auth, React provider, entity calls, public data, uploads, raw HTTP, AI action calls. |
|
|
23
|
-
| `04-ai/` | AI capability + workflow design | HowOne AI capability contracts,
|
|
23
|
+
| `04-ai/` | AI capability + workflow design | HowOne AI capability contracts, service capability selection, workflow create/update/status, schema rules, playbooks, persistence boundaries, and SDK handoff. |
|
|
24
24
|
|
|
25
25
|
## Routing
|
|
26
26
|
|
|
@@ -32,14 +32,17 @@ Read references by task shape. Prefer exact references over generic examples.
|
|
|
32
32
|
- Any feature touching AI generation, AI workflow behavior, or AI outputs: read the AI references
|
|
33
33
|
first, then the SDK handoff/action-call references.
|
|
34
34
|
- AI capability, AI workflow generation/editing, or full-stack AI feature planning: read
|
|
35
|
-
`04-ai/01-ai-capability-architecture.md
|
|
35
|
+
`04-ai/01-ai-capability-architecture.md`, `04-ai/04-service-capability-catalog.md`, and
|
|
36
|
+
`04-ai/02-workflow-contract-rules.md`.
|
|
36
37
|
- Backend database/schema creation or change: read `02-database/01-schema-design.md` and
|
|
37
38
|
`02-database/02-schema-operations.md`.
|
|
38
|
-
- AI output persistence: read the `04-ai/`
|
|
39
|
+
- AI output persistence, generation history, retry/resume, or saved AI results: read the `04-ai/`
|
|
40
|
+
files first, then `02-database/05-ai-persistence-patterns.md` and
|
|
41
|
+
`02-database/01-schema-design.md`.
|
|
39
42
|
- After schema sync, when app code must call the entity: read
|
|
40
43
|
`01-architect/02-manifest-codegen.md` and `03-sdk/02-entity-operations.md`.
|
|
41
|
-
- Custom login page
|
|
42
|
-
|
|
44
|
+
- Custom login page (your UI, HowOne APIs): `auth: 'custom'` in `createClient` (see `03-sdk/03-auth.md`),
|
|
45
|
+
`HowOneProvider auth="none"` and keep the default bottom-right HowOne logo unless explicitly hidden. Default without `auth` = hosted HowOne login.
|
|
43
46
|
- `src/lib/sdk.ts`, `createClient`, env vars, or generated bindings: read
|
|
44
47
|
`03-sdk/01-client-setup.md` and `01-architect/02-manifest-codegen.md`.
|
|
45
48
|
- Public landing pages or share URLs: read `02-database/03-data-access-patterns.md`,
|
|
@@ -48,6 +51,8 @@ Read references by task shape. Prefer exact references over generic examples.
|
|
|
48
51
|
- Raw HTTP escape hatch: read `03-sdk/06-raw-http.md`.
|
|
49
52
|
- App-side AI action calls after `.howone/ai/manifest.json` exists: read
|
|
50
53
|
`03-sdk/07-ai-action-calls.md`.
|
|
54
|
+
- External workflow create/update/status: read `04-ai/05-workflow-operations.md`.
|
|
55
|
+
- Common AI feature templates: read `04-ai/06-ai-feature-playbooks.md`.
|
|
51
56
|
|
|
52
57
|
## Reference Selection Protocol
|
|
53
58
|
|
|
@@ -60,11 +65,16 @@ Before writing code, classify the touched surfaces:
|
|
|
60
65
|
| Existing synced manifest to TypeScript bindings | `01-architect/02-manifest-codegen.md` |
|
|
61
66
|
| UI reads/writes entities | `03-sdk/01-client-setup.md`, `03-sdk/02-entity-operations.md` |
|
|
62
67
|
| Public read/share flow | `02-database/03-data-access-patterns.md`, `03-sdk/02-entity-operations.md` |
|
|
68
|
+
| Query filters/sort/pagination/response mapping | `02-database/04-query-dsl-and-responses.md` |
|
|
69
|
+
| AI output persistence / generation history | `02-database/05-ai-persistence-patterns.md`, `04-ai/01-ai-capability-architecture.md` |
|
|
63
70
|
| Auth/session/login behavior | `03-sdk/03-auth.md`, `03-sdk/04-react-integration.md` |
|
|
64
|
-
| AI capability or workflow design | `04-ai/01-ai-capability-architecture.md`, `04-ai/02-workflow-contract-rules.md` |
|
|
71
|
+
| AI capability or workflow design | `04-ai/01-ai-capability-architecture.md`, `04-ai/04-service-capability-catalog.md`, `04-ai/02-workflow-contract-rules.md` |
|
|
72
|
+
| External workflow create/update/status | `04-ai/05-workflow-operations.md` |
|
|
73
|
+
| Common AI feature examples | `04-ai/06-ai-feature-playbooks.md` |
|
|
65
74
|
| AI manifest handoff to app code | `04-ai/03-ai-sdk-handoff.md`, `03-sdk/07-ai-action-calls.md` |
|
|
66
75
|
| File upload | `03-sdk/05-file-upload.md` |
|
|
67
76
|
| Raw HTTP escape hatch | `03-sdk/06-raw-http.md` |
|
|
77
|
+
| SDK extensibility / adapter boundaries | `03-sdk/08-extension-boundaries.md` |
|
|
68
78
|
|
|
69
79
|
If a task spans multiple surfaces, read one reference from each surface before editing. Do not
|
|
70
80
|
invent API parameters, response shapes, owner fields, workflow IDs, or output paths from memory.
|
|
@@ -93,8 +103,8 @@ For app features that touch AI:
|
|
|
93
103
|
6. Read `.howone/ai/manifest.json`.
|
|
94
104
|
7. Generate or update app SDK bindings from the manifest.
|
|
95
105
|
8. Implement frontend calls using `howone.ai.*`.
|
|
96
|
-
9. If outputs are saved,
|
|
97
|
-
workflow.
|
|
106
|
+
9. If outputs are saved, map only durable product fields from the AI result into an entity schema,
|
|
107
|
+
then follow the database workflow.
|
|
98
108
|
|
|
99
109
|
For frontend-only SDK work:
|
|
100
110
|
|
|
@@ -107,7 +117,8 @@ For frontend-only SDK work:
|
|
|
107
117
|
|
|
108
118
|
- Generate SDK bindings from synced manifests, not from memory.
|
|
109
119
|
- Keep `.howone/` as manifest storage only; do not write generated source files there.
|
|
110
|
-
- Configure `projectId` and `env` only in `createClient`.
|
|
120
|
+
- Configure `projectId` and `env` only in `createClient`. Auth APIs follow the same `env` (dev → `api.howone.dev`, not `api.howone.ai`).
|
|
121
|
+
- Import `src/lib/sdk.ts` before any `@howone/sdk` auth call so environment is pinned.
|
|
111
122
|
- Use `import.meta.env.VITE_HOWONE_PROJECT_ID` and `import.meta.env.VITE_HOWONE_ENV`; do not
|
|
112
123
|
hardcode project IDs or add fallback env values.
|
|
113
124
|
- For private user-owned data, authenticated APIs derive owner from JWT. Do not pass
|
|
@@ -115,8 +126,14 @@ For frontend-only SDK work:
|
|
|
115
126
|
- For `access.authenticated.read = "own"`, prefer `howone.entities.Entity.query.mine(...)`.
|
|
116
127
|
- Public pages use `howone.public.entities.*` only when manifest access explicitly allows public
|
|
117
128
|
reads or writes.
|
|
118
|
-
-
|
|
119
|
-
|
|
129
|
+
- Default `createClient({ projectId, env })` uses **HowOne hosted login**. For a custom `/login` UI
|
|
130
|
+
that still calls HowOne OTP/OAuth APIs, add `auth: 'custom'` and `HowOneProvider auth="none"`.
|
|
131
|
+
- `HowOneProvider` may render the bottom-right HowOne `FloatingButton` logo by default. Do not remove
|
|
132
|
+
it unless the user explicitly asks for `brand="hidden"` or `showBrandButton={false}`.
|
|
133
|
+
- Do not add SDK-owned toast APIs, redirect overlays, or app-specific UI. Expose data, state, events,
|
|
134
|
+
and callbacks; implement visible feedback in the generated frontend app.
|
|
135
|
+
- SDK extensibility rule: default behavior must work without configuration, and custom behavior must
|
|
136
|
+
enter through typed adapters/callbacks instead of hardcoded app UI or provider-specific branches.
|
|
120
137
|
- AI workflows are implementation, not persistence. Never put CRUD, auth, upload handling, or app
|
|
121
138
|
state management into the workflow capability contract.
|
|
122
139
|
- For external workflow edits, pass `workflowConfigID` from a confirmed workflow status result; do
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "HowOne App Architecture"
|
|
3
|
-
short_description: "Design HowOne
|
|
4
|
-
default_prompt: "Use this skill to choose the HowOne
|
|
3
|
+
short_description: "Design HowOne database schemas, AI workflows, SDK bindings, auth, and app integration."
|
|
4
|
+
default_prompt: "Use this skill to choose the right HowOne architecture track, then implement database schema, AI capability/workflow, SDK bindings, auth, or frontend SDK calls from synced manifests."
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@base-ui/react": "^1.4.1",
|
|
16
16
|
"@fontsource-variable/inter": "^5.2.8",
|
|
17
|
-
"@howone/sdk": "2.0.0-beta.
|
|
17
|
+
"@howone/sdk": "2.0.0-beta.18",
|
|
18
18
|
"@tailwindcss/vite": "^4.2.1",
|
|
19
19
|
"class-variance-authority": "^0.7.1",
|
|
20
20
|
"clsx": "^2.1.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|