@wowok/skills 1.1.11 → 1.1.12

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