@wowok/skills 1.1.11 → 1.1.13
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/examples/Insurance/Insurance.md +142 -23
- package/examples/MyShop/MyShop.md +216 -218
- package/examples/MyShop/myshop_machine_nodes.json +14 -8
- package/examples/MyShop_Advanced/MyShop_Advanced.md +57 -56
- package/examples/ThreeBody_Signature/ThreeBody_Signature.md +431 -111
- package/examples/Travel/Travel.md +64 -18
- package/package.json +1 -1
- package/wowok-arbitrator/APPENDIX.md +545 -0
- package/wowok-arbitrator/SKILL.md +8 -535
- package/wowok-auditor/APPENDIX.md +487 -0
- package/wowok-auditor/SKILL.md +9 -480
- package/wowok-guard/APPENDIX.md +428 -0
- package/wowok-guard/SKILL.md +117 -421
- package/wowok-machine/APPENDIX.md +407 -0
- package/wowok-machine/SKILL.md +9 -400
- package/wowok-messenger/APPENDIX.md +550 -0
- package/wowok-messenger/SKILL.md +9 -543
- package/wowok-onboard/APPENDIX.md +472 -0
- package/wowok-onboard/SKILL.md +10 -465
- package/wowok-order/APPENDIX.md +777 -0
- package/wowok-order/SKILL.md +110 -506
- package/wowok-output/APPENDIX.md +575 -0
- package/wowok-output/SKILL.md +9 -568
- package/wowok-planner/APPENDIX.md +700 -0
- package/wowok-planner/SKILL.md +9 -693
- package/wowok-provider/APPENDIX.md +425 -0
- package/wowok-provider/SKILL.md +8 -415
- package/wowok-safety/APPENDIX.md +561 -0
- package/wowok-safety/SKILL.md +9 -554
- package/wowok-scenario/APPENDIX.md +97 -0
- package/wowok-scenario/MODE-DETAILS.md +275 -0
- package/wowok-scenario/SKILL.md +20 -353
- package/wowok-tools/APPENDIX.md +388 -0
- package/wowok-tools/SKILL.md +9 -381
package/wowok-onboard/SKILL.md
CHANGED
|
@@ -53,468 +53,13 @@ A published Service with: published Machine, bound Progress, validated Guards, c
|
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
|
-
##
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- If existing: which account name or address?
|
|
67
|
-
- (Resume path) Do you want to resume your last onboarding session?
|
|
68
|
-
|
|
69
|
-
**Tool Calls**:
|
|
70
|
-
1. `query_toolkit` → `local_names` — list existing accounts and local marks
|
|
71
|
-
2. If new: `account_operation` → `gen` (with `m: true` if Messenger is needed) → returns account name/address
|
|
72
|
-
3. `query_toolkit` → `account_balance` — verify balance > 0
|
|
73
|
-
4. If balance = 0: `account_operation` → `faucet` (testnet) OR `account_operation` → `transfer` from a funded account (mainnet)
|
|
74
|
-
|
|
75
|
-
**Success Criteria**: An account with non-zero balance is committed as the working account; its name is recorded for every subsequent `env.account`.
|
|
76
|
-
|
|
77
|
-
**Fallback**: Faucet fails → instruct user to wait 60s and retry, or fund via `transfer` from another account they own. Account name collision → append `_v1`, `_v2` per wowok-safety §1.1.
|
|
78
|
-
|
|
79
|
-
**Checkpoint**: Persist `{ round: R1, account: <name>, balance: <n> }` via `local_info_operation`.
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
### R2: Industry Mode Selection
|
|
84
|
-
|
|
85
|
-
**AI Goal**: Match the user's business to a wowok-scenario driving mode so subsequent rounds receive pre-filled defaults.
|
|
86
|
-
|
|
87
|
-
**Key Questions**:
|
|
88
|
-
- What are you selling? (services, rentals, courses, travel packages, subscriptions, or something else)
|
|
89
|
-
- Do you collect deposits, charge per hour, or charge per milestone?
|
|
90
|
-
- Will you need to ship physical goods?
|
|
91
|
-
|
|
92
|
-
**Tool Calls**:
|
|
93
|
-
1. Internally classify the user's answers into `traits` (`has_logistics`, `communication_heavy`, `pure_digital`, `long_cycle`, `deposit_required`, `multi_tier_allocation`).
|
|
94
|
-
2. Match to a mode via [wowok-scenario](../wowok-scenario/SKILL.md) §Mode Selection Logic:
|
|
95
|
-
- freelance (Phase 1) — pure digital, no deposit, milestone allocation
|
|
96
|
-
- rental (Phase 1) — deposit required, return inspection
|
|
97
|
-
- education (Phase 2) — long cycle, attendance Guard
|
|
98
|
-
- travel (Phase 2) — multi-segment, multi-tier allocation
|
|
99
|
-
- subscription (Phase 3) — periodic charge, cancel Guard
|
|
100
|
-
- general — escape hatch, manual configuration
|
|
101
|
-
3. (Optional) `query_toolkit` → `read_mark` to recall any previously saved industry template the user has used.
|
|
102
|
-
|
|
103
|
-
**Success Criteria**: A mode is selected and its `IndustryModeSchema` loaded into context for rounds R3-R8.
|
|
104
|
-
|
|
105
|
-
**Fallback**: User wants a hybrid → load two modes and surface conflicts for user decision (per wowok-scenario §Mode Composition). User wants full manual → switch to `general` mode and skip default pre-fills.
|
|
106
|
-
|
|
107
|
-
**Checkpoint**: Persist `{ round: R2, mode: <name>, traits: {...} }`.
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
### R3: Service Definition
|
|
112
|
-
|
|
113
|
-
**AI Goal**: Create the unpublished Service draft with name, type_parameter, and metadata fields. Pull defaults from the selected mode.
|
|
114
|
-
|
|
115
|
-
**Key Questions**:
|
|
116
|
-
- What is the service name? (Mode default: e.g., "Logo Design Service" for freelance)
|
|
117
|
-
- What is the type_parameter (token type for payments, e.g., `"0x2::wow::WOW"`)?
|
|
118
|
-
- What is the deliverable description and pricing? (Mode template fills placeholders)
|
|
119
|
-
|
|
120
|
-
**Tool Calls**:
|
|
121
|
-
1. `onchain_operations` → `operation_type: "service"` with:
|
|
122
|
-
- `data.name`, `data.type_parameter`, `data.description`
|
|
123
|
-
- `data.permission` left empty for now (Permission comes in R4) OR pass a Permission object shape that auto-creates (wowok-safety §1.1 — SDK auto-creates a Permission if object shape passed)
|
|
124
|
-
- `publish: false` (mandatory — Service stays draft)
|
|
125
|
-
- `env.account` = R1 account
|
|
126
|
-
2. (Optional, physical goods) `wip_file` → `generate` to produce WIP file URL + hash for product metadata
|
|
127
|
-
3. `local_mark_operation` → tag the new Service with a friendly name (e.g., `freelance_logo_v1`)
|
|
128
|
-
|
|
129
|
-
**Success Criteria**: Service draft created on-chain, returns `service_id`, `bPublished: false`. Local mark persisted.
|
|
130
|
-
|
|
131
|
-
**Fallback**: Name conflict on local mark → use versioned name. Type parameter unknown → default to `"0x2::wow::WOW"` and confirm with user. Missing description → use mode template's default description with user edits.
|
|
132
|
-
|
|
133
|
-
**Checkpoint**: Persist `{ round: R3, service_id, service_name, type_parameter }`.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
### R4: Permission Setup
|
|
138
|
-
|
|
139
|
-
**AI Goal**: Configure the merchant access control matrix — who can read, advance, allocate, arbitrate. Reuse existing Permission when possible (wowok-safety §1.1 strong recommendation).
|
|
140
|
-
|
|
141
|
-
**Key Questions**:
|
|
142
|
-
- Do you already have a Permission object to reuse? (recommended)
|
|
143
|
-
- If creating new: which roles do you need? Mode defaults apply (e.g., freelance: provider=1000, customer uses namedOperator:"", arbiter=1500; rental: owner=1000, renter uses namedOperator:"", arbiter=1500).
|
|
144
|
-
|
|
145
|
-
**Tool Calls**:
|
|
146
|
-
1. If reuse: `query_toolkit` → `onchain_objects` (filter type=Permission) to list candidates; confirm with user by name.
|
|
147
|
-
2. If create: `onchain_operations` → `operation_type: "permission"` with `data.name`, `data.type_parameter`, plus index assignments if needed.
|
|
148
|
-
3. `onchain_operations` → `operation_type: "service"` MODIFY the R3 Service draft to bind `data.permission = "<permission_name_or_id>"`.
|
|
149
|
-
|
|
150
|
-
**Success Criteria**: Permission exists (reused or created) and is bound to the Service. Permission indexes referenced by later Machine Forwards are recorded.
|
|
151
|
-
|
|
152
|
-
**Fallback**: User wants complex role split (beyond mode defaults) → flag as Advanced tier, switch to manual Permission design, hand off context to [wowok-safety](../wowok-safety/SKILL.md) for index rules. Custom index below 1000 → SDK rejects, instruct user to use 1000-65535 range.
|
|
153
|
-
|
|
154
|
-
**Checkpoint**: Persist `{ round: R4, permission_id, indexes_used: [...] }`.
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
### R5: Machine Configuration
|
|
159
|
-
|
|
160
|
-
**AI Goal**: Build the workflow state machine for the Service. Mode templates provide default node graph — user confirms or customizes.
|
|
161
|
-
|
|
162
|
-
**Key Questions**:
|
|
163
|
-
- Confirm the default nodes from your industry mode (e.g., freelance: ordered → in_progress → delivered → accepted → completed; rental: reserved → paid_deposit → in_use → returned → deposit_refunded → completed).
|
|
164
|
-
- Who advances each transition? (Mode default assigns permissionIndex)
|
|
165
|
-
- Any timeout/auto-advance rules? (e.g., customer auto-accept after 7 days)
|
|
166
|
-
|
|
167
|
-
**Tool Calls**:
|
|
168
|
-
1. `onchain_operations` → `operation_type: "machine"` CREATE with:
|
|
169
|
-
- `data.nodes` from mode template (names + node keys)
|
|
170
|
-
- `data.pairs` (prev_node, threshold)
|
|
171
|
-
- `data.forwards` (name, weight, permissionIndex, namedOperator if needed)
|
|
172
|
-
- Guards NOT bound yet (come in R7)
|
|
173
|
-
- `publish: false`
|
|
174
|
-
2. (Optional) `machineNode2file` → export the Machine for user review before publish
|
|
175
|
-
3. `local_mark_operation` → tag Machine (e.g., `freelance_machine_v1`)
|
|
176
|
-
|
|
177
|
-
**Success Criteria**: Machine created on-chain, returns `machine_id`, `bPublished: false`. All Forwards reference valid permission indexes (validated against R4 Permission).
|
|
178
|
-
|
|
179
|
-
**Fallback**: Node count < 2 → enforce minimum 2 (entry + terminal). Forward missing permissionIndex AND namedOperator → SDK error, fill with mode default. User wants a non-mode workflow → switch to `general` mode, hand off to [wowok-machine](../wowok-machine/SKILL.md) for full design guidance.
|
|
180
|
-
|
|
181
|
-
**Checkpoint**: Persist `{ round: R5, machine_id, node_count, forward_count }`.
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
### R6: Progress Binding
|
|
186
|
-
|
|
187
|
-
**AI Goal**: Create the Progress template that will track each customer's order through the Machine. Bind it to the Machine.
|
|
188
|
-
|
|
189
|
-
**Key Questions**:
|
|
190
|
-
- Confirm the Progress should mirror every Machine node (typical) or only customer-visible milestones (alternative).
|
|
191
|
-
- Do you want customer-facing labels for each state? (e.g., "In Progress" vs. internal "Node 3")
|
|
192
|
-
|
|
193
|
-
**Tool Calls**:
|
|
194
|
-
1. `onchain_operations` → `operation_type: "progress"` CREATE with:
|
|
195
|
-
- `data.machine = "<machine_name_or_id>"` (resolves via `GetObjectExisted()`)
|
|
196
|
-
- `data.belong_to` = the Service (so Progress instances spawn per Order)
|
|
197
|
-
- Optional metadata fields
|
|
198
|
-
2. `onchain_operations` → `operation_type: "machine"` MODIFY (if Machine needs Progress reference)
|
|
199
|
-
3. `onchain_operations` → `operation_type: "service"` MODIFY to bind `data.progress` if the Service schema requires it
|
|
200
|
-
|
|
201
|
-
**Success Criteria**: Progress template created and bound to Machine. Subsequent `order.create` will spawn a Progress instance per order.
|
|
202
|
-
|
|
203
|
-
**Fallback**: Binding fails because Machine is already published → unpublish is impossible (immutable); create a NEW Machine and rebind. Progress field missing → use mode default template.
|
|
204
|
-
|
|
205
|
-
**Checkpoint**: Persist `{ round: R6, progress_id }`.
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
### R7: Guard Configuration
|
|
210
|
-
|
|
211
|
-
**AI Goal**: Create the validation rules that gate order placement, advancement, and fund release. Use the circular reference pattern (wowok-tools §Object-Guard Circular Reference Pattern).
|
|
212
|
-
|
|
213
|
-
**Key Questions** (mode-specific defaults shown):
|
|
214
|
-
- Freelance: buy_guard (KYC + amount cap), deliver_guard (customer acceptance), withdraw_guard (acceptance triggers allocation), refund_guard (100% refund on dispute)
|
|
215
|
-
- Rental: deposit_guard (deposit frozen before pickup), return_guard (renter triggers return), inspect_guard (owner verifies condition), refund_guard (deposit release on inspection pass), damage_guard (deduct deposit)
|
|
216
|
-
- Which subset? Any custom conditions?
|
|
217
|
-
|
|
218
|
-
**Tool Calls** (per Guard, repeat):
|
|
219
|
-
1. `onchain_operations` → `operation_type: "guard"` CREATE — for Guards that reference the protected object, use the object's NAME in the table (SDK resolves at runtime)
|
|
220
|
-
2. `onchain_operations` → `operation_type: "gen_passport"` — static test each Guard with a mock submission to verify logic before binding
|
|
221
|
-
3. `onchain_operations` → `operation_type: "machine"` MODIFY to bind Guards to specific Forwards (for workflow Gates)
|
|
222
|
-
4. `onchain_operations` → `operation_type: "service"` MODIFY to bind Guards to `order_allocators` (for fund gates)
|
|
223
|
-
5. `guard2file` → export Guards for review
|
|
224
|
-
|
|
225
|
-
**Success Criteria**: All planned Guards created, `gen_passport` returned PASS for each with mock submissions, Guards bound to the correct Machine Forwards and Service Allocators.
|
|
226
|
-
|
|
227
|
-
**Fallback**: `gen_passport` fails → isolate the failing Guard via `guard2file` export, inspect logic, consult [wowok-guard](../wowok-guard/SKILL.md) §10 traps, fix and re-test. Type mismatch in `convert_witness` → re-create Guard with correct target type (Guard is immutable after creation).
|
|
228
|
-
|
|
229
|
-
**Checkpoint**: Persist `{ round: R7, guards: [{name, id, bound_to}], passport_tests: [...] }`.
|
|
230
|
-
|
|
231
|
-
---
|
|
232
|
-
|
|
233
|
-
### R8: Allocation Setup
|
|
234
|
-
|
|
235
|
-
**AI Goal**: Configure the fund distribution strategy. Bind Allocators to the Service's `order_allocators` and to Guards that trigger release.
|
|
236
|
-
|
|
237
|
-
**Key Questions** (mode defaults):
|
|
238
|
-
- Freelance: 100% to provider on acceptance, 100% refund on dispute, 0% platform
|
|
239
|
-
- Rental: rent → 100% owner at pickup, deposit → 100% renter on inspection pass, deposit → 100% owner on damage
|
|
240
|
-
- What are your split percentages? Confirm sharing sum = 10000 (basis points).
|
|
241
|
-
- Who is the recipient? (Entity for known addresses, GuardIdentifier for dynamic Order/customer)
|
|
242
|
-
|
|
243
|
-
**Tool Calls**:
|
|
244
|
-
1. `onchain_operations` → `operation_type: "allocation"` CREATE — one Allocation per terminal path, each with Guard-gated sharing array
|
|
245
|
-
2. `onchain_operations` → `operation_type: "service"` MODIFY to set `data.order_allocators = [{ allocators: [...] }]`
|
|
246
|
-
3. Verify each Allocator's Guard references R7 Guards and recipient types are correct (`Entity` for merchant, `GuardIdentifier` for customer/Order)
|
|
247
|
-
4. (Optional) `onchain_operations` → `operation_type: "reward"` CREATE if the mode includes incentive pools
|
|
248
|
-
|
|
249
|
-
**Success Criteria**: `order_allocators` configured on the Service. Sum of `sharing` per Allocator path = 10000. Each Allocator's trigger Guard exists and tested. Pre-publish Allocation audit returns PASS.
|
|
250
|
-
|
|
251
|
-
**Fallback**: Sharing sum ≠ 10000 → auto-correct to 10000 with user confirmation. Missing refund path → block and prompt (per wowok-safety — refund Allocator is required for dispute flow). Recipient uses `Signer` instead of `Entity` → fix per [wowok-provider](../wowok-provider/SKILL.md) §Recipient Types.
|
|
252
|
-
|
|
253
|
-
**Checkpoint**: Persist `{ round: R8, allocators: [{name, id, trigger_guard}], refund_path_covered: true }`.
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
### R9: Test Order (Dry Run)
|
|
258
|
-
|
|
259
|
-
**AI Goal**: Validate the full stack end-to-end before the irreversible publish step. Use a second account as the buyer.
|
|
260
|
-
|
|
261
|
-
**Key Questions**:
|
|
262
|
-
- Do you have a second account to play the customer, or should we create one?
|
|
263
|
-
- Confirm test parameters: test amount, test deliverable hash.
|
|
264
|
-
|
|
265
|
-
**Tool Calls**:
|
|
266
|
-
1. `account_operation` → `gen` (second account, the "buyer")
|
|
267
|
-
2. `account_operation` → `faucet` for the buyer
|
|
268
|
-
3. `onchain_operations` → `operation_type: "order"` CREATE — buyer places order on the Service draft
|
|
269
|
-
4. `onchain_operations` → `operation_type: "progress"` with `hold: true` then `hold: false` to advance through each Machine node
|
|
270
|
-
5. At each terminal node: `onchain_operations` → `operation_type: "allocation"` with `alloc_by_guard` to verify fund distribution
|
|
271
|
-
6. `onchain_operations` → `operation_type: "order"` to verify buyer can withdraw refund if applicable
|
|
272
|
-
7. `query_toolkit` → `onchain_events` to verify all expected events fired
|
|
273
|
-
|
|
274
|
-
**Success Criteria**: Test order traverses the full Machine, all Guards pass with mock submissions, Allocation distributes funds correctly to merchant and (if tested) refund path returns funds to buyer. Event log matches expected sequence.
|
|
275
|
-
|
|
276
|
-
**Fallback**: Guard blocks at a node → check `gen_passport` output, re-collect correct submission, retry. Allocation distributes wrong amount → halt, review Allocator sharing array. Order creation fails → check Service is in correct state and Permission allows buyer role.
|
|
277
|
-
|
|
278
|
-
**Checkpoint**: Persist `{ round: R9, test_order_id, test_passed: true, event_log_summary }`.
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
### R10: Publish + Post-Publish Verification
|
|
283
|
-
|
|
284
|
-
**AI Goal**: Execute the irreversible publish sequence with full pre-publish audit, then verify immutability locks are in place and hand off to operations.
|
|
285
|
-
|
|
286
|
-
**Key Questions**:
|
|
287
|
-
- Final confirmation: publish is irreversible. Machine nodes, Service `machine` and `order_allocators` will be locked forever. Proceed?
|
|
288
|
-
- Do you want to add a Compensation Fund before publish (recommended for trust)?
|
|
289
|
-
|
|
290
|
-
**Tool Calls**:
|
|
291
|
-
1. Pre-publish audit (mandatory, per wowok-safety):
|
|
292
|
-
- `machineNode2file` → export Machine, verify topology
|
|
293
|
-
- `guard2file` → export all Guards, verify logic
|
|
294
|
-
- `query_toolkit` → `onchain_objects` → re-check Permission, Service, Machine, Progress, Guards, Allocation all exist and are correctly bound
|
|
295
|
-
2. `onchain_operations` → `operation_type: "machine"` with `publish: true` — Machine locked
|
|
296
|
-
3. `onchain_operations` → `operation_type: "service"` MODIFY to bind `data.machine = "<published_machine_id>"`
|
|
297
|
-
4. `onchain_operations` → `operation_type: "service"` with `publish: true` — Service locked
|
|
298
|
-
5. (Optional) `onchain_operations` → `operation_type: "service"` MODIFY to add `compensation_fund_add` and `setting_locked_time_add`
|
|
299
|
-
6. Post-publish verification:
|
|
300
|
-
- `query_toolkit` → `onchain_objects` (Service) → confirm `bPublished: true`, `machine` field is locked, `order_allocators` is locked
|
|
301
|
-
- `onchain_events` → confirm Publish event fired
|
|
302
|
-
|
|
303
|
-
**Success Criteria**: Both Machine and Service `bPublished: true`. Service `machine` and `order_allocators` fields are immutable. Publish event recorded on-chain. Handoff packet produced.
|
|
304
|
-
|
|
305
|
-
**Fallback**: Pre-publish audit fails → return to the failing round (R5/R6/R7/R8) and fix; do NOT publish. Publish transaction fails (gas) → re-faucet, retry. Post-publish immutability check fails (rare) → escalate to manual intervention, this should not happen at the protocol level.
|
|
306
|
-
|
|
307
|
-
**Checkpoint**: Persist `{ round: R10, published: true, machine_immutable: true, service_immutable: true, publish_digest }`. Mark onboarding COMPLETE.
|
|
308
|
-
|
|
309
|
-
**Handoff Packet** (emitted to user and to [wowok-provider](../wowok-provider/SKILL.md)):
|
|
310
|
-
- Service ID + name + publish digest
|
|
311
|
-
- Machine ID + node topology summary
|
|
312
|
-
- Permission ID + role/index map
|
|
313
|
-
- Progress template ID
|
|
314
|
-
- Guard IDs + bindings
|
|
315
|
-
- Allocator IDs + trigger map
|
|
316
|
-
- Test order digest + result
|
|
317
|
-
- Recommended next Skill: wowok-provider (operations), wowok-analytics (post-30-day audit), wowok-arbitrator (dispute setup)
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
## Decision Trees
|
|
322
|
-
|
|
323
|
-
### D1: Account Path
|
|
324
|
-
|
|
325
|
-
```
|
|
326
|
-
User enters onboarding
|
|
327
|
-
├── Has account with balance > 0? ── YES ──→ use it, advance to R2
|
|
328
|
-
├── Has account but balance = 0? ── YES ──→ faucet/transfer, advance to R2
|
|
329
|
-
└── No account ──→ account.gen ──→ faucet ──→ advance to R2
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
### D2: Industry Mode Match
|
|
333
|
-
|
|
334
|
-
```
|
|
335
|
-
User's business description
|
|
336
|
-
├── deposit_required? ── YES ──→ rental mode
|
|
337
|
-
├── multi_tier_allocation? ── YES ──→ travel mode
|
|
338
|
-
├── long_cycle + attendance? ── YES ──→ education mode
|
|
339
|
-
├── periodic_charge + cancel_anytime? ── YES ──→ subscription mode
|
|
340
|
-
├── pure_digital + milestone? ── YES ──→ freelance mode
|
|
341
|
-
└── none of the above ──→ general mode (escape hatch)
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
### D3: Reuse vs Create (per object)
|
|
345
|
-
|
|
346
|
-
```
|
|
347
|
-
For each of Permission / Machine / Guard / Contact / Arbitration:
|
|
348
|
-
├── User provides existing name/ID? ──→ REUSE (string reference)
|
|
349
|
-
├── User says "create new"? ──→ CREATE (object shape)
|
|
350
|
-
└── User unsure? ──→ query on-chain, present candidates, let user pick
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
### D4: Resume from Checkpoint
|
|
354
|
-
|
|
355
|
-
```
|
|
356
|
-
Onboarding session starts
|
|
357
|
-
├── local_info_operation returns R{N} checkpoint? ── YES
|
|
358
|
-
│ ├── Query on-chain: are R{N} objects still valid? ── YES ──→ resume at R{N+1}
|
|
359
|
-
│ └── On-chain state changed (e.g., Service published by another path)? ──→ restart at R1 with warning
|
|
360
|
-
└── No checkpoint ──→ start fresh at R1
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
### D5: Pre-Publish Audit Outcome
|
|
364
|
-
|
|
365
|
-
```
|
|
366
|
-
R10 pre-publish audit
|
|
367
|
-
├── All checks PASS ──→ publish Machine, then Service ──→ post-publish verify ──→ COMPLETE
|
|
368
|
-
├── Warnings only (e.g., no Compensation Fund) ──→ ask user, then publish or fix
|
|
369
|
-
└── Blockers (e.g., Machine not bound to Service) ──→ return to specific round, fix, re-audit
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
---
|
|
373
|
-
|
|
374
|
-
## Failure Playbooks
|
|
375
|
-
|
|
376
|
-
### F1: Faucet Exhausted / Gas Unavailable
|
|
377
|
-
|
|
378
|
-
**Symptom**: `account_operation.faucet` returns rate-limit or mainnet has no faucet.
|
|
379
|
-
|
|
380
|
-
**Recovery**:
|
|
381
|
-
1. Check if user has another funded account → `account_operation.transfer` to the working account (1 WOW = 10^9 base units is enough for dozens of txns).
|
|
382
|
-
2. If no other account → instruct user to acquire WOW from an exchange or another wallet, then resume.
|
|
383
|
-
3. Do NOT reduce example prices/stock on mainnet without user confirmation (per wowok-tools §Mainnet operations).
|
|
384
|
-
|
|
385
|
-
### F2: Guard `gen_passport` Test Fails
|
|
386
|
-
|
|
387
|
-
**Symptom**: Static Guard test returns FAIL on a specific Guard.
|
|
388
|
-
|
|
389
|
-
**Recovery**:
|
|
390
|
-
1. `guard2file` export the failing Guard.
|
|
391
|
-
2. Inspect: table entry type, `convert_witness` target type, `rely` chain completeness.
|
|
392
|
-
3. Cross-reference [wowok-guard](../wowok-guard/SKILL.md) §10 traps.
|
|
393
|
-
4. Guard is immutable after creation → CREATE a new Guard with corrected logic, re-test.
|
|
394
|
-
5. Update all references (Machine Forwards, Service Allocators) to the new Guard via MODIFY.
|
|
395
|
-
|
|
396
|
-
### F3: Test Order Stuck at a Node
|
|
397
|
-
|
|
398
|
-
**Symptom**: `progress.hold` succeeds but advancing to next node fails.
|
|
399
|
-
|
|
400
|
-
**Recovery**:
|
|
401
|
-
1. `query_toolkit` → `onchain_objects` (Progress) → inspect `current_node`, `forward_history`.
|
|
402
|
-
2. Identify which Forward is missing — likely a `namedOperator` not assigned, or a Guard blocking.
|
|
403
|
-
3. If Guard blocking → re-collect submission, re-call `progress.hold: false` with correct submission.
|
|
404
|
-
4. If namedOperator missing → `progress` MODIFY to assign the role address.
|
|
405
|
-
5. If terminal node reached but Allocation didn't fire → call `allocation.alloc_by_guard` manually with Order ID submission.
|
|
406
|
-
|
|
407
|
-
### F4: Publish Fails
|
|
408
|
-
|
|
409
|
-
**Symptom**: `service.publish: true` transaction reverts.
|
|
410
|
-
|
|
411
|
-
**Recovery**:
|
|
412
|
-
1. Check Machine is published FIRST (Service publish requires published Machine).
|
|
413
|
-
2. Check `service.machine` field is bound to the published Machine ID.
|
|
414
|
-
3. Check `order_allocators` is configured and each Allocator's Guard exists.
|
|
415
|
-
4. Re-run pre-publish audit, fix any blockers, retry.
|
|
416
|
-
5. NEVER use `--no-verify` or skip checks — publish is irreversible, must be correct.
|
|
417
|
-
|
|
418
|
-
### F5: User Abandons Mid-Onboarding
|
|
419
|
-
|
|
420
|
-
**Symptom**: User stops responding or explicitly says "I'll come back later".
|
|
421
|
-
|
|
422
|
-
**Recovery**:
|
|
423
|
-
1. Persist final checkpoint via `local_info_operation` with current round, all object IDs, and user decisions.
|
|
424
|
-
2. Confirm to user: "Your progress is saved at round R{N}. Resume anytime by saying 'continue onboarding'."
|
|
425
|
-
3. Do NOT clean up draft objects — they remain on-chain unpublished and can be resumed.
|
|
426
|
-
4. On resume, re-validate all checkpoint objects via `query_toolkit` before continuing (on-chain state is source of truth).
|
|
427
|
-
|
|
428
|
-
### F6: Mode Mismatch Detected Late
|
|
429
|
-
|
|
430
|
-
**Symptom**: User picks freelance mode in R2 but in R5 describes a deposit requirement (rental trait).
|
|
431
|
-
|
|
432
|
-
**Recovery**:
|
|
433
|
-
1. Acknowledge the mismatch: "Your description sounds more like rental mode. Switch?"
|
|
434
|
-
2. If user confirms → load rental mode defaults, re-evaluate R3-R5 parameters with new defaults (do NOT discard user's Service name/description unless they conflict).
|
|
435
|
-
3. If user wants hybrid → load both modes, surface conflicting fields, let user decide per field.
|
|
436
|
-
4. Update checkpoint with the corrected mode.
|
|
437
|
-
|
|
438
|
-
---
|
|
439
|
-
|
|
440
|
-
## Tier Layering
|
|
441
|
-
|
|
442
|
-
### Novice Tier (default)
|
|
443
|
-
|
|
444
|
-
- Full guided R1-R10 sequence
|
|
445
|
-
- Mode defaults auto-applied, user only confirms
|
|
446
|
-
- Pre-publish audit is mandatory and blocking
|
|
447
|
-
- Every round shows a plain-language explanation before the MCP call
|
|
448
|
-
- Checkpoint persistence is automatic
|
|
449
|
-
|
|
450
|
-
### Advanced Tier
|
|
451
|
-
|
|
452
|
-
- User can skip non-essential rounds via "skip R6 Progress, I'll bind later"
|
|
453
|
-
- Mode defaults shown but user can override any field
|
|
454
|
-
- Pre-publish audit runs but warnings are non-blocking (blockers still block)
|
|
455
|
-
- User can call MCP tools directly with the Skill providing context, not commands
|
|
456
|
-
- Trigger: user says "I know what I'm doing" or has completed prior onboardings
|
|
457
|
-
|
|
458
|
-
### Expert Tier
|
|
459
|
-
|
|
460
|
-
- User invokes MCP tools directly; Skill provides only the dependency graph and audit checklist
|
|
461
|
-
- Mode selection optional — user can build fully custom configuration
|
|
462
|
-
- Pre-publish audit optional but strongly recommended
|
|
463
|
-
- Skill acts as a reference card, not a guide
|
|
464
|
-
- Trigger: user explicitly asks for "expert mode" or invokes MCP operations by name
|
|
465
|
-
|
|
466
|
-
---
|
|
467
|
-
|
|
468
|
-
## Handoff Protocol
|
|
469
|
-
|
|
470
|
-
### When to Hand Off
|
|
471
|
-
|
|
472
|
-
| Trigger | Target Skill | Reason |
|
|
473
|
-
|---------|-------------|--------|
|
|
474
|
-
| R10 publish succeeds | [wowok-provider](../wowok-provider/SKILL.md) | Merchant enters operations phase |
|
|
475
|
-
| User asks about a specific industry scenario | [wowok-scenario](../wowok-scenario/SKILL.md) | Industry mode lookup |
|
|
476
|
-
| R7 Guard design gets complex | [wowok-guard](../wowok-guard/SKILL.md) | Advanced Guard patterns |
|
|
477
|
-
| R5 Machine design goes beyond mode template | [wowok-machine](../wowok-machine/SKILL.md) | Custom workflow design |
|
|
478
|
-
| User mentions a customer-side flow | [wowok-order](../wowok-order/SKILL.md) | Buyer perspective |
|
|
479
|
-
| Test order reveals dispute scenario | [wowok-arbitrator](../wowok-arbitrator/SKILL.md) | Dispute resolution setup |
|
|
480
|
-
| Publish completed + 30 days elapsed | wowok-analytics (Phase 2) | Usage and business audit |
|
|
481
|
-
|
|
482
|
-
### Handoff Packet Format
|
|
483
|
-
|
|
484
|
-
When handing off, emit this context bundle so the receiving Skill does not need to re-query:
|
|
485
|
-
|
|
486
|
-
```yaml
|
|
487
|
-
handoff:
|
|
488
|
-
from: wowok-onboard
|
|
489
|
-
to: <target_skill>
|
|
490
|
-
state:
|
|
491
|
-
journey: onboarding
|
|
492
|
-
completed_rounds: R1-R10
|
|
493
|
-
mode: freelance # or rental / general / etc.
|
|
494
|
-
account: <name>
|
|
495
|
-
objects:
|
|
496
|
-
service_id: 0x...
|
|
497
|
-
machine_id: 0x...
|
|
498
|
-
permission_id: 0x...
|
|
499
|
-
progress_id: 0x...
|
|
500
|
-
guard_ids: [0x..., 0x...]
|
|
501
|
-
allocator_ids: [0x..., 0x...]
|
|
502
|
-
test_order_id: 0x...
|
|
503
|
-
publish_digest: <tx_digest>
|
|
504
|
-
carry_context:
|
|
505
|
-
- mode_defaults # so receiving Skill knows what was pre-filled
|
|
506
|
-
- user_decisions # any deviations from mode defaults
|
|
507
|
-
next_actions:
|
|
508
|
-
- tool: query_toolkit
|
|
509
|
-
action: onchain_objects
|
|
510
|
-
reason: "Verify published Service state"
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
### Resumption Protocol
|
|
514
|
-
|
|
515
|
-
When `wowok-onboard` is invoked and a checkpoint exists:
|
|
516
|
-
1. Read checkpoint via `local_info_operation`.
|
|
517
|
-
2. For each object ID in the checkpoint, `query_toolkit` → `onchain_objects` to verify it still exists and is in the expected state.
|
|
518
|
-
3. If all valid → resume at the next round.
|
|
519
|
-
4. If any object is missing or state changed → surface the discrepancy, ask user whether to restart or attempt recovery.
|
|
520
|
-
5. **Invariant**: on-chain state is the source of truth. Checkpoint is a hint, not a guarantee.
|
|
56
|
+
## Appendices (Progressive Disclosure)
|
|
57
|
+
|
|
58
|
+
> The following sections have been extracted to [APPENDIX.md](./APPENDIX.md) for on-demand loading:
|
|
59
|
+
> - Dialogue Scripts / Onboarding Flow (R1-R10) — guided conversation scripts
|
|
60
|
+
> - Decision Trees — branching logic reference
|
|
61
|
+
> - Failure Playbooks — recovery scenarios
|
|
62
|
+
> - Tier Layering — expertise-tier based guidance
|
|
63
|
+
> - Handoff Protocol — handoff triggers and packet format
|
|
64
|
+
>
|
|
65
|
+
> Load APPENDIX.md when the user needs guided dialogue, recovery help, tier-specific guidance, or handoff context.
|