@wowok/skills 1.1.9 → 1.1.11
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/LICENSE +36 -0
- package/README.md +1 -8
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +33 -0
- package/dist/skills.js.map +1 -1
- package/examples/Insurance/Insurance.md +218 -90
- package/examples/MyShop/MyShop.md +513 -245
- package/examples/MyShop/myshop_machine_nodes.json +87 -0
- package/examples/MyShop_Advanced/MyShop_Advanced.md +633 -228
- package/examples/ThreeBody_Signature/ThreeBody_Signature.md +195 -202
- package/examples/Travel/Travel.md +775 -487
- package/examples/Travel/calc-weather-timestamps.js +9 -5
- package/package.json +8 -3
- package/scripts/install.js +4 -0
- package/wowok-arbitrator/SKILL.md +542 -1
- package/wowok-auditor/SKILL.md +581 -0
- package/wowok-guard/SKILL.md +425 -1
- package/wowok-machine/SKILL.md +404 -1
- package/wowok-messenger/SKILL.md +551 -1
- package/wowok-onboard/SKILL.md +520 -0
- package/wowok-order/SKILL.md +528 -1
- package/wowok-output/SKILL.md +571 -0
- package/wowok-planner/SKILL.md +757 -0
- package/wowok-provider/SKILL.md +455 -1
- package/wowok-safety/SKILL.md +557 -0
- package/wowok-scenario/SKILL.md +585 -0
- package/wowok-tools/SKILL.md +423 -1
- package/examples/Insurance/Insurance_TestResults.md +0 -481
- package/examples/Insurance/insurance_complete_guard_v1.json +0 -50
- package/examples/MyShop/MyShop_TestResults.md +0 -1003
- package/examples/MyShop_Advanced/MyShop_Advanced_MerchantSystem_TestResults.md +0 -1297
- package/examples/MyShop_Advanced/MyShop_Advanced_OrderFlow_TestResults.md +0 -743
- package/examples/MyShop_Advanced/machine_nodes.json +0 -222
- package/examples/MyShop_Advanced/three_body_signature.wip +0 -30
- package/examples/ThreeBody_Signature/ThreeBody_Signature_TestResults.md +0 -599
- package/examples/Travel/Travel_TestResults.md +0 -743
- package/examples/Travel/travel_machine_v2_export.json +0 -104
- package/examples/Travel/weather_check_guard_v1.json +0 -51
package/wowok-order/SKILL.md
CHANGED
|
@@ -316,4 +316,531 @@ E1 (Service) ──→ E2 (Products/WIP)
|
|
|
316
316
|
2. **E3 no-refund + E6 no-arb** — no mechanism to recover funds. Single most important decision factor.
|
|
317
317
|
3. **E3 Forward with Guard** — "user-operable" is misleading if Guard blocks you. Verify requirements.
|
|
318
318
|
4. **E2 WIP hash mismatch** — seller altered claims post-publish. Red flag regardless of other factors.
|
|
319
|
-
5. **E9 High dispute rate** — >10% quantitative warning independent of structural analysis.
|
|
319
|
+
5. **E9 High dispute rate** — >10% quantitative warning independent of structural analysis.
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Dialogue Scripts (R1-R10)
|
|
324
|
+
|
|
325
|
+
A guided 10-round dialogue for the customer journey — from initial intent to post-purchase operations. Each round has a specific AI Goal, Key Questions, Tool Calls, Success Criteria, Fallback, and Checkpoint. Checkpoints persist via `local_info_operation` so the journey can resume after interruption.
|
|
326
|
+
|
|
327
|
+
### R1 — Intent Capture & Service Identification
|
|
328
|
+
|
|
329
|
+
**AI Goal**: Understand what the user wants to buy and identify candidate Services on-chain. Establish the buyer role and surface options without committing to a purchase.
|
|
330
|
+
|
|
331
|
+
**Key Questions**:
|
|
332
|
+
- What are you trying to purchase (product, service, subscription, rental)?
|
|
333
|
+
- Do you have a specific Service name or ID, or should I search?
|
|
334
|
+
- What is your budget and preferred token?
|
|
335
|
+
- Do you have a WoWok account set up? If not, hand off to [wowok-onboard](../wowok-onboard/SKILL.md).
|
|
336
|
+
|
|
337
|
+
**Tool Calls**:
|
|
338
|
+
1. `query_toolkit` → `onchain_objects` with name filter (if user provides a Service name).
|
|
339
|
+
2. `query_toolkit` → `onchain_table_data` on the Service registry table (if user wants to browse by category/tags).
|
|
340
|
+
3. `account_operation` → `get` to confirm the active account exists and has a balance.
|
|
341
|
+
4. `local_info_operation` → create a session checkpoint `{ round: R1, intent, candidates[] }`.
|
|
342
|
+
|
|
343
|
+
**Success Criteria**: User has identified at least one candidate Service. Account confirmed. Intent packet persisted.
|
|
344
|
+
|
|
345
|
+
**Fallback**: No matching Service found → suggest broader search terms or hand off to [wowok-scenario](../wowok-scenario/SKILL.md) for industry-specific discovery. User has no account → hand off to [wowok-onboard](../wowok-onboard/SKILL.md).
|
|
346
|
+
|
|
347
|
+
**Checkpoint**: Persist `{ round: R1, service_candidates: [...], account, intent_summary }`. Mark R1 COMPLETE.
|
|
348
|
+
|
|
349
|
+
### R2 — E1-E2 Service Status & Product Verification
|
|
350
|
+
|
|
351
|
+
**AI Goal**: Run the first two due-diligence checks (E1 service status, E2 product/WIP verification) on the candidate Service. Surface hard ABORT conditions before deeper analysis.
|
|
352
|
+
|
|
353
|
+
**Key Questions**:
|
|
354
|
+
- Confirm we are evaluating `<service_name>` — correct?
|
|
355
|
+
- Are you interested in a specific `sales[]` item, or all of them?
|
|
356
|
+
- Have you reviewed the WIP file (product evidence)? If not, I will verify the hash.
|
|
357
|
+
|
|
358
|
+
**Tool Calls**:
|
|
359
|
+
1. `query_toolkit` → `onchain_objects` for the Service. Capture `bPublished`, `bPaused`, `sales`, `machine`, `buy_guard`, `customer_required`, `arbitrations`, `compensation_fund`, `compensation_lock_duration`, `order_allocators`, `um`.
|
|
360
|
+
2. For each non-suspended `sales[]` item with `wip_hash`: `wip_file` → `op: "verify"`, `wipFilePath: <wip_url>`, `hash_equal: <wip_hash>`.
|
|
361
|
+
3. `local_info_operation` → update checkpoint with E1/E2 results.
|
|
362
|
+
|
|
363
|
+
**Success Criteria**: `bPublished === true` AND `bPaused === false` AND all WIP hashes verified. If any ABORT condition triggers, user has been informed and decided to stop or continue with risk acknowledgment.
|
|
364
|
+
|
|
365
|
+
**Fallback**: `bPublished === false` or `bPaused === true` → 🔴 ABORT, return to R1 for alternative candidates. WIP hash mismatch → 🔴 ABORT, warn user the seller altered claims post-publish. No WIP URL → ⚠️ continue but flag weaker evidence.
|
|
366
|
+
|
|
367
|
+
**Checkpoint**: Persist `{ round: R2, e1_status, e2_wip_results, abort_conditions: [...] }`. Mark R2 COMPLETE.
|
|
368
|
+
|
|
369
|
+
### R3 — E3 Machine Workflow Analysis (CORE)
|
|
370
|
+
|
|
371
|
+
**AI Goal**: Perform the most critical due-diligence step — analyze the Machine workflow to determine if the user can actually operate the order, reach refund paths, and access arbitration. This is the single most important round.
|
|
372
|
+
|
|
373
|
+
**Key Questions**:
|
|
374
|
+
- Do you understand the workflow the seller has designed? I will explain it step-by-step.
|
|
375
|
+
- Are there nodes you cannot reach yourself (require provider action)? Is that acceptable?
|
|
376
|
+
- Is there a refund path? If not, are you comfortable with no fund recovery mechanism?
|
|
377
|
+
|
|
378
|
+
**Tool Calls**:
|
|
379
|
+
1. `query_toolkit` → `onchain_objects` for the Machine (from E1 `machine` field). Confirm `bPublished === true` and `bPaused === false`.
|
|
380
|
+
2. `machineNode2file` → export the complete Machine JSON. Parse locally — never node-by-node.
|
|
381
|
+
3. Classify every forward per the E3 table: `namedOperator` × `guard` → user-operable / provider-only / guard-gated.
|
|
382
|
+
4. Detect terminal nodes, refund paths (lead to 100%→Order Allocator), arbitration paths, user-blocked paths.
|
|
383
|
+
5. `local_info_operation` → persist the full machine analysis (forward classification, paths, risk signals).
|
|
384
|
+
|
|
385
|
+
**Success Criteria**: User understands the workflow. All risk signals surfaced (no-refund, no-arb, user-blocked paths, guard-gated forwards). The combination "no refund + no arbitration" is flagged as 🔴 if present.
|
|
386
|
+
|
|
387
|
+
**Fallback**: No user-operable path from a critical node → 🔴 advise against purchase unless provider cooperation is guaranteed in writing via Messenger. No refund path → 🔴 strongly advise against. No arbitration path → 🔴 strongly advise against. User wants to negotiate workflow changes → hand off to [wowok-messenger](../wowok-messenger/SKILL.md) for pre-order negotiation.
|
|
388
|
+
|
|
389
|
+
**Checkpoint**: Persist `{ round: R3, machine_id, forward_classification, paths: {terminal, refund, arb, blocked}, risk_signals: [...] }`. Mark R3 COMPLETE.
|
|
390
|
+
|
|
391
|
+
### R4 — E4 Guards Analysis
|
|
392
|
+
|
|
393
|
+
**AI Goal**: Export and classify every Guard referenced by the Machine, allocators, and buy_guard. Identify any ambiguous Guards that the user must review manually — never speculate on Guard logic.
|
|
394
|
+
|
|
395
|
+
**Key Questions**:
|
|
396
|
+
- Have you reviewed the exported Guard files? I will explain each one's purpose and conditions.
|
|
397
|
+
- Are there Guards gating refund or user-operable forwards? These are the highest priority.
|
|
398
|
+
- Do you meet the Guard conditions (e.g., token holdings, reputation thresholds)?
|
|
399
|
+
|
|
400
|
+
**Tool Calls**:
|
|
401
|
+
1. Collect unique Guard IDs from E3 Machine JSON (`forward.guard.guard`), E1 `order_allocators`, E1 `buy_guard`. Deduplicate.
|
|
402
|
+
2. `guard2file` → export each unique Guard as JSON.
|
|
403
|
+
3. `wowok_buildin_info` → `info: "guard instructions"` for instruction reference.
|
|
404
|
+
4. Classify each Guard: 🟢 Simple / 🟡 Complex / 🔴 Ambiguous.
|
|
405
|
+
5. `local_info_operation` → persist Guard classifications and exported file paths.
|
|
406
|
+
|
|
407
|
+
**Success Criteria**: All Guards classified. Ambiguous Guards flagged for manual review. User has explicitly confirmed they understand Guards gating refund paths and user-operable forwards. User can satisfy all conditions OR has acknowledged which ones they cannot.
|
|
408
|
+
|
|
409
|
+
**Fallback**: 🔴 Ambiguous Guard → user MUST review the file directly. AI refuses to speculate. If user cannot meet a Guard condition gating a refund path → 🔴 advise against purchase. Guard logic seems to contradict seller's claims → flag discrepancy, hand off to [wowok-messenger](../wowok-messenger/SKILL.md) for clarification.
|
|
410
|
+
|
|
411
|
+
**Checkpoint**: Persist `{ round: R4, guards: [{id, level, gates_refund, user_can_satisfy}], ambiguous: [...] }`. Mark R4 COMPLETE.
|
|
412
|
+
|
|
413
|
+
### R5 — E5 Fund Allocation Rules
|
|
414
|
+
|
|
415
|
+
**AI Goal**: Map out exactly where funds go under each possible order outcome. Verify a refund mechanism exists and identify any paths where the provider can unilaterally collect.
|
|
416
|
+
|
|
417
|
+
**Key Questions**:
|
|
418
|
+
- Do you understand where your payment goes if the order completes successfully?
|
|
419
|
+
- Is there a 100%→Order Allocator (refund mechanism)? If not, are you comfortable with no refund?
|
|
420
|
+
- Are there allocators that fire only on provider-operated paths? That means unilateral collection.
|
|
421
|
+
|
|
422
|
+
**Tool Calls**:
|
|
423
|
+
1. From E1 `order_allocators.allocators[]`, cross-reference each Allocator's Guard (E4) → trigger condition.
|
|
424
|
+
2. Map each Allocator to the Machine node (E3) where it fires.
|
|
425
|
+
3. Present the distribution outcome for each path: who receives what percentage.
|
|
426
|
+
4. `local_info_operation` → persist the allocation map.
|
|
427
|
+
|
|
428
|
+
**Success Criteria**: User understands the financial outcome of every path. The key safeguard (100%→Order Allocator on a user-operable forward) is present OR user has acknowledged its absence. Surplus receiver and unilateral collection paths identified.
|
|
429
|
+
|
|
430
|
+
**Fallback**: No 100%→Order Allocator → 🔴 no refund mechanism, strongly advise against. Surplus receiver = provider → ⚠️ explain remainder goes to provider. Allocators only on provider-only paths → ⚠️ explain unilateral collection risk.
|
|
431
|
+
|
|
432
|
+
**Checkpoint**: Persist `{ round: R5, allocators: [{id, trigger_node, distribution, unilateral}], refund_mechanism: bool }`. Mark R5 COMPLETE.
|
|
433
|
+
|
|
434
|
+
### R6 — E6-E8 Arbitration, Compensation, Contact
|
|
435
|
+
|
|
436
|
+
**AI Goal**: Verify the three recourse-related items in parallel: arbitration availability (E6), compensation fund adequacy (E7), and contact channel existence (E8). These determine whether the user has any recourse if something goes wrong.
|
|
437
|
+
|
|
438
|
+
**Key Questions**:
|
|
439
|
+
- Are you comfortable with the arbitration fee and voting structure?
|
|
440
|
+
- Is the compensation fund large enough to cover a potential award?
|
|
441
|
+
- Does the seller have a reachable Messenger contact?
|
|
442
|
+
|
|
443
|
+
**Tool Calls**:
|
|
444
|
+
1. Batch query E1 `arbitrations[]` via `query_toolkit` → `onchain_objects`. Check `bPaused`, `fee`, `voting_guard`.
|
|
445
|
+
2. `onchain_events` → `type: "ArbEvent"`, `limit: 20`, filter for these Arb IDs — check dispute history.
|
|
446
|
+
3. From E1: check `compensation_fund` balance vs planned order amount. Check `compensation_lock_duration` expiry.
|
|
447
|
+
4. `query_toolkit` → `onchain_objects` for E1 `um` ID. Check `ims[]` is non-empty.
|
|
448
|
+
5. `local_info_operation` → persist E6/E7/E8 results.
|
|
449
|
+
|
|
450
|
+
**Success Criteria**: At least one non-paused Arbitration service exists. Compensation fund balance ≥ planned order amount (or user acknowledged shortfall). Contact has active `ims[]`. If `um === null` or `ims[]` empty → 🔴 ABORT.
|
|
451
|
+
|
|
452
|
+
**Fallback**: `arbitrations[]` empty → 🔴 no recourse, strongly advise against. Arb `bPaused === true` → 🔴 unavailable. Compensation fund insufficient → ⚠️ may not cover award. `um === null` → 🔴 ABORT (no contact channel). `ims[]` empty → 🔴 ABORT (no Messenger).
|
|
453
|
+
|
|
454
|
+
**Checkpoint**: Persist `{ round: R6, e6_arb: [...], e7_comp_fund, e8_contact, abort_conditions: [...] }`. Mark R6 COMPLETE.
|
|
455
|
+
|
|
456
|
+
### R7 — E9-E10 Reputation & Privacy Matching
|
|
457
|
+
|
|
458
|
+
**AI Goal**: Complete the final two due-diligence items: chain reputation analysis (E9) and privacy information matching (E10). Surface quantitative warning signs and confirm the user consents to sharing required private info.
|
|
459
|
+
|
|
460
|
+
**Key Questions**:
|
|
461
|
+
- Are you comfortable with the seller's dispute rate and reputation?
|
|
462
|
+
- The Service requires these private fields: `<list>`. Do you consent to send each one via Messenger?
|
|
463
|
+
|
|
464
|
+
**Tool Calls**:
|
|
465
|
+
1. `query_toolkit` → `onchain_table_item_entity_linker` for provider address. Compute likes/dislikes ratio.
|
|
466
|
+
2. Batch query `votes[].address` via `query_toolkit` → `onchain_objects` (50/batch, max 200). Filter Order-type objects where `service` matches. Aggregate dispute rate.
|
|
467
|
+
3. From E1 `customer_required[]`, check locally via `query_toolkit` → `local_info_list`. Match against local `name` fields.
|
|
468
|
+
4. For each matched field: present value, ask "correct?" and "OK to send?". For missing: ask user to provide.
|
|
469
|
+
5. `local_info_operation` → persist E9/E10 results and user consent per field.
|
|
470
|
+
|
|
471
|
+
**Success Criteria**: Dispute rate ≤10% (or user acknowledged higher rate). User has explicitly consented per private field. All `customer_required` fields have values ready for Messenger transmission.
|
|
472
|
+
|
|
473
|
+
**Fallback**: Dispute rate >10% → ⚠️ quantitative warning. User declines to send a required field → cannot proceed with purchase, return to R1. Missing field the user cannot provide → 🔴 ABORT.
|
|
474
|
+
|
|
475
|
+
**Checkpoint**: Persist `{ round: R7, e9_dispute_rate, e10_consent: [{field, consented}], missing_fields: [...] }`. Mark R7 COMPLETE.
|
|
476
|
+
|
|
477
|
+
### R8 — Pre-Purchase GATE Decision & Consensus Building
|
|
478
|
+
|
|
479
|
+
**AI Goal**: Consolidate E1-E10 into the Pre-Purchase GATE decision. If all green, proceed to consensus building via Messenger. If any red, present the final risk summary and let the user decide.
|
|
480
|
+
|
|
481
|
+
**Key Questions**:
|
|
482
|
+
- Here is the consolidated GATE summary. Do you want to proceed?
|
|
483
|
+
- Are you ready to send the required private info via Messenger and negotiate final terms?
|
|
484
|
+
- Do you want to generate WTS evidence of our consensus conversation?
|
|
485
|
+
|
|
486
|
+
**Tool Calls**:
|
|
487
|
+
1. Render the Pre-Purchase GATE table from persisted checkpoints (R2-R7).
|
|
488
|
+
2. If all OK: `messenger_operation` → `send_message` to the seller's Contact (`um` ims address). Send E10 info per user consent.
|
|
489
|
+
3. Negotiate via Messenger: deliverables (E2 WIP), timeline (E3 nodes), refund/cancellation (E3/E5), privacy info received (E10).
|
|
490
|
+
4. `messenger_operation` → `generate_wts` + `sign_wts` for the consensus conversation.
|
|
491
|
+
5. `local_info_operation` → persist the GATE decision and consensus packet.
|
|
492
|
+
|
|
493
|
+
**Success Criteria**: GATE decision made. If proceeding: E10 info sent and acknowledged by seller. WTS evidence generated. Seller confirmed deliverables and edge cases.
|
|
494
|
+
|
|
495
|
+
**Fallback**: User decides not to proceed → archive the analysis, return to R1. Seller does not respond → wait, then consider alternative Services. Seller disputes on-chain rules → flag the discrepancy, on-chain rules are immutable and cannot be overridden by Messenger.
|
|
496
|
+
|
|
497
|
+
**Checkpoint**: Persist `{ round: R8, gate_decision, consensus_wts_path, seller_ack: bool }`. Mark R8 COMPLETE.
|
|
498
|
+
|
|
499
|
+
### R9 — Order Creation & First Progress
|
|
500
|
+
|
|
501
|
+
**AI Goal**: Execute the order creation transaction and advance to the first user-operable node. Confirm the order is on-chain and the user understands the next operations.
|
|
502
|
+
|
|
503
|
+
**Key Questions**:
|
|
504
|
+
- Confirm the final amount and token. Any discounts available?
|
|
505
|
+
- Ready to execute `service.buy`? This transfers funds into escrow.
|
|
506
|
+
- After creation, which node are you at? Can you advance, or does the provider need to act first?
|
|
507
|
+
|
|
508
|
+
**Tool Calls**:
|
|
509
|
+
1. `query_toolkit` → `onchain_received` (type `0x2::service::Discount`), filter by `service`, validate time/benchmark.
|
|
510
|
+
2. `schema_query` → `onchain_operations_service` to confirm the `buy` operation shape.
|
|
511
|
+
3. `onchain_operations` → `service.buy` with `submission` (after user confirmation per [wowok-safety](../wowok-safety/SKILL.md)).
|
|
512
|
+
4. `onchain_operations` → `order.progress` if the first node is user-operable (per E3 classification).
|
|
513
|
+
5. `messenger_operation` → `send_message` to notify the seller with the order ID.
|
|
514
|
+
6. `local_info_operation` → persist the order ID, current node, and next actions.
|
|
515
|
+
|
|
516
|
+
**Success Criteria**: Order created on-chain. Order ID and Progress ID captured. User notified of current node and available forwards. Seller notified via Messenger.
|
|
517
|
+
|
|
518
|
+
**Fallback**: `service.buy` fails → check `buy_guard` (E4) — passport may be required. Generate via `onchain_operations` → `gen_passport`. Excess `total_pay` auto-refunded — confirm with user. First node not user-operable → explain the provider must act, set expectation for wait time.
|
|
519
|
+
|
|
520
|
+
**Checkpoint**: Persist `{ round: R9, order_id, progress_id, current_node, next_actions: [...] }`. Mark R9 COMPLETE.
|
|
521
|
+
|
|
522
|
+
### R10 — Operations Handoff
|
|
523
|
+
|
|
524
|
+
**AI Goal**: Hand off the user to daily order operations. Equip them with the progress advancement playbook, dispute escalation path, and fund management reference. The buyer journey transitions to ongoing operations.
|
|
525
|
+
|
|
526
|
+
**Key Questions**:
|
|
527
|
+
- Do you understand how to advance progress when you reach each node?
|
|
528
|
+
- Do you know how to escalate to arbitration if the provider fails to deliver?
|
|
529
|
+
- Do you know how to withdraw funds (only you, as `builder`, can do this)?
|
|
530
|
+
|
|
531
|
+
**Tool Calls**:
|
|
532
|
+
1. `local_info_operation` → write the handoff packet: order ID, progress ID, machine analysis (R3), allocation map (R5), guard requirements (R4), arbitration IDs (R6), contact (R8).
|
|
533
|
+
2. Cross-reference E3 Machine JSON for the current node's user-operable forwards. Present all three dimensions: E3 (operability), E4 (Guard), E5 (financial outcome).
|
|
534
|
+
3. Orient the user to Phase 4 (Order Operations) and Phase 5 (Arbitration) schemas.
|
|
535
|
+
4. Recommend next Skills: [wowok-messenger](../wowok-messenger/SKILL.md) for ongoing communication, [wowok-arbitrator](../wowok-arbitrator/SKILL.md) if dispute arises, [wowok-output](../wowok-output/SKILL.md) for event display.
|
|
536
|
+
|
|
537
|
+
**Success Criteria**: User has the handoff packet. User understands the daily ops loop (monitor Progress, advance nodes, trigger Allocation). User knows the dispute escalation path. User knows fund withdrawal is builder-only.
|
|
538
|
+
|
|
539
|
+
**Fallback**: User wants to modify the order → clarify which fields are mutable (none — order terms are immutable after creation; only Progress advances). User wants to cancel → check E3/E5 for refund path; if none, funds are escrowed until Allocation fires. User wants to transfer ownership → `order.transfer_to` (builder-only).
|
|
540
|
+
|
|
541
|
+
**Checkpoint**: Persist `{ round: R10, handoff_emitted: true, order_id, journey: complete }`. Mark buyer setup COMPLETE.
|
|
542
|
+
|
|
543
|
+
**Handoff Packet** (emitted to [wowok-messenger](../wowok-messenger/SKILL.md) for ongoing communication, and to [wowok-arbitrator](../wowok-arbitrator/SKILL.md) for dispute readiness):
|
|
544
|
+
- Order ID + Progress ID + Service ID
|
|
545
|
+
- Machine analysis (forward classification, paths)
|
|
546
|
+
- Guard requirements (which passport needed for which forward)
|
|
547
|
+
- Allocation map (financial outcome per path)
|
|
548
|
+
- Arbitration IDs + fee + voting structure
|
|
549
|
+
- Contact (`um`) ID + Messenger address
|
|
550
|
+
- WTS evidence path (from R8 consensus)
|
|
551
|
+
- Recommended next Skill: wowok-messenger (daily communication), wowok-arbitrator (dispute), wowok-output (event display)
|
|
552
|
+
|
|
553
|
+
---
|
|
554
|
+
|
|
555
|
+
## Decision Trees
|
|
556
|
+
|
|
557
|
+
### D1: Purchase Decision (Post-E1-E10 GATE)
|
|
558
|
+
|
|
559
|
+
```
|
|
560
|
+
After E1-E10 due diligence:
|
|
561
|
+
├── Any 🔴 ABORT condition?
|
|
562
|
+
│ ├── YES → STOP. Do not purchase.
|
|
563
|
+
│ │ (bPublished=false, bPaused=true, um=null, ims empty,
|
|
564
|
+
│ │ WIP hash mismatch, no-refund + no-arb)
|
|
565
|
+
│ └── NO → continue
|
|
566
|
+
├── Any ⚠️ WARNING condition?
|
|
567
|
+
│ ├── YES → Present risk, wait for explicit user decision
|
|
568
|
+
│ │ (high dispute rate, insufficient comp fund,
|
|
569
|
+
│ │ ambiguous guard, unilateral collection path)
|
|
570
|
+
│ │ ├── User accepts risk → PROCEED (document acknowledgment)
|
|
571
|
+
│ │ └── User declines → STOP. Return to R1.
|
|
572
|
+
│ └── NO → continue
|
|
573
|
+
├── All E1-E10 OK?
|
|
574
|
+
│ ├── YES → PROCEED to Consensus Building (R8)
|
|
575
|
+
│ └── NO → Identify which items incomplete, return to relevant R round
|
|
576
|
+
└── Final check: User has explicitly consented to send all
|
|
577
|
+
customer_required fields via Messenger?
|
|
578
|
+
├── YES → Execute `service.buy`
|
|
579
|
+
└── NO → Return to R7 for consent collection
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
### D2: Progress Advancement Path Selection
|
|
583
|
+
|
|
584
|
+
```
|
|
585
|
+
User has reached a node in the Machine workflow:
|
|
586
|
+
├── Query E3 Machine JSON for current node's forwards
|
|
587
|
+
├── For each outgoing forward:
|
|
588
|
+
│ ├── namedOperator === "" AND no Guard?
|
|
589
|
+
│ │ └── User-operable → `order.progress` directly
|
|
590
|
+
│ ├── namedOperator === "" AND Guard present?
|
|
591
|
+
│ │ ├── User can satisfy Guard (has passport)?
|
|
592
|
+
│ │ │ ├── YES → `order.progress` with passport
|
|
593
|
+
│ │ │ └── NO → Generate passport via `gen_passport`
|
|
594
|
+
│ │ │ ├── Passport generated → `order.progress`
|
|
595
|
+
│ │ │ └── Guard rejects → Stuck. Escalate to Messenger
|
|
596
|
+
│ │ └── (No-bypass rule: passport is mandatory)
|
|
597
|
+
│ ├── namedOperator !== ""?
|
|
598
|
+
│ │ └── Provider-only → Wait for provider action
|
|
599
|
+
│ │ ├── Provider acts → Node advances
|
|
600
|
+
│ │ └── Provider stalls → Consider dispute (D3)
|
|
601
|
+
│ └── No outgoing forwards (terminal)?
|
|
602
|
+
│ └── Order complete. Check Allocation outcome.
|
|
603
|
+
└── Multiple user-operable forwards?
|
|
604
|
+
├── Present all three dimensions (E3 operability, E4 Guard, E5 finance)
|
|
605
|
+
└── Let user choose which path to take
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
### D3: Dispute Escalation Path
|
|
609
|
+
|
|
610
|
+
```
|
|
611
|
+
Order is stuck or provider failed to deliver:
|
|
612
|
+
├── Is there a user-operable forward to a refund path? (E3/E5)
|
|
613
|
+
│ ├── YES → Advance to refund node. Allocation fires. Funds returned.
|
|
614
|
+
│ └── NO → continue
|
|
615
|
+
├── Is there an arbitration path in the Machine? (E3)
|
|
616
|
+
│ ├── YES → Follow Machine arbitration path (may need provider action)
|
|
617
|
+
│ └── NO → File dispute directly via `arbitration.dispute` (E6)
|
|
618
|
+
├── Filing dispute:
|
|
619
|
+
│ ├── Generate WTS evidence (`generate_wts` + `sign_wts`)
|
|
620
|
+
│ ├── Send WTS to arbitrator via Messenger
|
|
621
|
+
│ ├── Execute `order.arb_confirm`
|
|
622
|
+
│ ├── Voting occurs (Arb state machine)
|
|
623
|
+
│ ├── Result at state (3) Arbitrated:
|
|
624
|
+
│ │ ├── Accept → `order.arb_claim_compensation` → (5)
|
|
625
|
+
│ │ └── Object → `order.arb_objection` → (4) → reset → (0) → retry
|
|
626
|
+
│ └── One compensation claim per Order (source: compensation_fund)
|
|
627
|
+
└── No arbitration available? (E6 empty)
|
|
628
|
+
├── No refund + no arb → Funds escrowed indefinitely
|
|
629
|
+
└── Escalate to WoWok community / off-chain recourse
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
### D4: Refund vs Arbitration Decision
|
|
633
|
+
|
|
634
|
+
```
|
|
635
|
+
User wants to exit the order:
|
|
636
|
+
├── Why does the user want to exit?
|
|
637
|
+
│ ├── Provider agreed to cancel
|
|
638
|
+
│ │ ├── Refund path exists (E3/E5)? → Advance to refund node. Done.
|
|
639
|
+
│ │ └── No refund path → Negotiate via Messenger, may need arbitration
|
|
640
|
+
│ ├── Provider stalled / non-responsive
|
|
641
|
+
│ │ ├── Refund path user-operable? → Advance to refund node. Done.
|
|
642
|
+
│ │ ├── Refund path provider-operable? → Provider must act. Escalate.
|
|
643
|
+
│ │ └── No refund path → Must use arbitration (D3)
|
|
644
|
+
│ ├── Quality dispute (deliverable doesn't match WIP)
|
|
645
|
+
│ │ ├── Document discrepancy (Messenger evidence)
|
|
646
|
+
│ │ └── File arbitration dispute (D3)
|
|
647
|
+
│ └── Changed mind (no fault)
|
|
648
|
+
│ ├── Refund path exists? → Try to advance. Provider may block.
|
|
649
|
+
│ └── No refund path → No recourse. Funds escrowed.
|
|
650
|
+
└── Key: Always check E3 Machine JSON + E5 Allocation map first.
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
### D5: Information Sharing Decision
|
|
654
|
+
|
|
655
|
+
```
|
|
656
|
+
Service has customer_required[] fields (E10):
|
|
657
|
+
├── For each required field:
|
|
658
|
+
│ ├── Is it already in local_info? (query local_info_list)
|
|
659
|
+
│ │ ├── YES → Present value, ask user "correct?" and "OK to send?"
|
|
660
|
+
│ │ │ ├── Correct + consent → Queue for Messenger send
|
|
661
|
+
│ │ │ ├── Correct + decline → Cannot purchase. ABORT.
|
|
662
|
+
│ │ │ └── Incorrect → Ask user to provide new value
|
|
663
|
+
│ │ └── NO → Ask user to provide value
|
|
664
|
+
│ │ ├── User provides → Queue for Messenger send
|
|
665
|
+
│ │ └── User declines → Cannot purchase. ABORT.
|
|
666
|
+
│ └── After all fields resolved:
|
|
667
|
+
│ ├── Send via Messenger ONLY (never on-chain)
|
|
668
|
+
│ ├── Get explicit confirmation per item
|
|
669
|
+
│ └── Generate WTS evidence of the exchange
|
|
670
|
+
└── Transmission medium:
|
|
671
|
+
├── Messenger send_message (text fields)
|
|
672
|
+
└── Messenger send_file (large documents, WIP, ZIP)
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
---
|
|
676
|
+
|
|
677
|
+
## Failure Playbooks
|
|
678
|
+
|
|
679
|
+
### F1: Service Not Found / Not Published
|
|
680
|
+
|
|
681
|
+
**Trigger**: User provides a Service name or ID, but `query_toolkit` → `onchain_objects` returns empty OR `bPublished === false`.
|
|
682
|
+
|
|
683
|
+
**Diagnosis**:
|
|
684
|
+
- Empty result: name typo, wrong network, or Service never created.
|
|
685
|
+
- `bPublished === false`: Service exists but seller hasn't published it yet. Cannot be purchased.
|
|
686
|
+
- `bPaused === true`: Service is temporarily suspended by seller.
|
|
687
|
+
|
|
688
|
+
**Recovery**:
|
|
689
|
+
1. Confirm the name/ID with the user. Check for typos.
|
|
690
|
+
2. Verify `env.network` matches the Service's chain (testnet vs mainnet).
|
|
691
|
+
3. If `bPublished === false`: inform user the Service is not yet live. Suggest contacting the seller via Messenger if Contact exists.
|
|
692
|
+
4. If `bPaused === true`: inform user the Service is suspended. Check `onchain_events` for recent pause events to understand why.
|
|
693
|
+
5. Return to R1 for alternative candidates.
|
|
694
|
+
|
|
695
|
+
**Prevention**: Always confirm the Service name/ID with the user before starting due diligence. Verify `env.network` at R1.
|
|
696
|
+
|
|
697
|
+
### F2: Ambiguous Guard Blocks Purchase
|
|
698
|
+
|
|
699
|
+
**Trigger**: During E4, a Guard export (`guard2file`) produces logic the AI cannot confidently classify as 🟢 Simple or 🟡 Complex — it falls into 🔴 Ambiguous.
|
|
700
|
+
|
|
701
|
+
**Diagnosis**:
|
|
702
|
+
- Guard uses complex `rely` composition with cross-object references.
|
|
703
|
+
- Guard logic depends on dynamic on-chain state that's hard to evaluate offline.
|
|
704
|
+
- Guard instructions reference obscure or undocumented operations.
|
|
705
|
+
- The Guard gates a critical path (refund, user-operable forward).
|
|
706
|
+
|
|
707
|
+
**Recovery**:
|
|
708
|
+
1. **Never speculate.** Present the raw Guard file to the user.
|
|
709
|
+
2. Explain which parts are clear and which are ambiguous.
|
|
710
|
+
3. Identify the specific instructions or rely chains that are unclear.
|
|
711
|
+
4. Query `wowok_buildin_info` → `info: "guard instructions"` for reference.
|
|
712
|
+
5. If user can review and confirm understanding → proceed with documented acknowledgment.
|
|
713
|
+
6. If user cannot understand → recommend declining purchase. The risk of an unforeseen Guard failure during refund is too high.
|
|
714
|
+
7. If user wants to negotiate with seller → hand off to [wowok-messenger](../wowok-messenger/SKILL.md) to request clarification or Guard modification (seller would need to create a new Guard — immutable after creation).
|
|
715
|
+
|
|
716
|
+
**Prevention**: At R4, always prioritize Guards gating refund paths and user-operable forwards. If any such Guard is ambiguous, treat as a hard stop until resolved.
|
|
717
|
+
|
|
718
|
+
### F3: Order Stuck (No User-Operable Forward)
|
|
719
|
+
|
|
720
|
+
**Trigger**: User has created an order (R9 complete) but cannot advance Progress because all forwards from the current node have `namedOperator !== ""` (provider-only) or require a Guard the user cannot satisfy.
|
|
721
|
+
|
|
722
|
+
**Diagnosis**:
|
|
723
|
+
- This was likely identified at E3 (R3) but the user proceeded anyway, expecting provider cooperation.
|
|
724
|
+
- Provider is now non-responsive or refusing to act.
|
|
725
|
+
- The node has no refund path — funds are escrowed.
|
|
726
|
+
|
|
727
|
+
**Recovery**:
|
|
728
|
+
1. Re-confirm the forward classification from the persisted R3 checkpoint.
|
|
729
|
+
2. Check if any forward was misclassified (e.g., Guard condition the user can now satisfy).
|
|
730
|
+
3. If a Guard-gated forward exists and user can generate a passport → try `gen_passport` then `order.progress`.
|
|
731
|
+
4. If truly no user-operable path:
|
|
732
|
+
- Contact provider via Messenger. Document the stall.
|
|
733
|
+
- If arbitration path exists in Machine (E3) → advance via that path (may require provider action — same problem).
|
|
734
|
+
- File dispute directly via `arbitration.dispute` (E6). WTS evidence of the stall strengthens the case.
|
|
735
|
+
5. If no arbitration available → funds are escrowed indefinitely. This is the worst-case scenario flagged at E3.
|
|
736
|
+
|
|
737
|
+
**Prevention**: At R3 (E3), the combination "no user-operable path from critical node" should be 🔴. Never proceed without explicit user acknowledgment AND a Messenger-negotiated commitment from the provider to act within a timeframe.
|
|
738
|
+
|
|
739
|
+
### F4: Refund Path Blocked
|
|
740
|
+
|
|
741
|
+
**Trigger**: User wants to exit the order, but the refund path (100%→Order Allocator) either doesn't exist (E5) or is gated by a Guard the user cannot satisfy (E4).
|
|
742
|
+
|
|
743
|
+
**Diagnosis**:
|
|
744
|
+
- E5 showed no 100%→Order Allocator → no refund mechanism was designed.
|
|
745
|
+
- Refund path exists but Guard requires conditions the user doesn't meet (e.g., provider-issued passport).
|
|
746
|
+
- Refund path is provider-operated (`namedOperator !== ""`) and provider refuses to advance.
|
|
747
|
+
|
|
748
|
+
**Recovery**:
|
|
749
|
+
1. Confirm from R5 checkpoint whether any refund mechanism exists.
|
|
750
|
+
2. If refund path exists but Guard blocks:
|
|
751
|
+
- Try `gen_passport` — if Guard is self-satisfiable (e.g., token holding), this works.
|
|
752
|
+
- If Guard requires provider action → provider is blocking refund. Document via Messenger.
|
|
753
|
+
3. If no refund mechanism:
|
|
754
|
+
- File arbitration dispute (D3). The absence of a refund path strengthens the case if the provider also failed to deliver.
|
|
755
|
+
- WTS evidence of provider non-delivery is critical.
|
|
756
|
+
4. If arbitration also unavailable (E6 empty) → funds are escrowed indefinitely. This is the 🔴 no-refund + no-arb scenario flagged at E3.
|
|
757
|
+
|
|
758
|
+
**Prevention**: At R3/R5, "no refund + no arb" is a hard 🔴. Never proceed without explicit user acknowledgment of the worst-case outcome.
|
|
759
|
+
|
|
760
|
+
### F5: Arbitration Rejected / Unavailable
|
|
761
|
+
|
|
762
|
+
**Trigger**: User files a dispute via `arbitration.dispute`, but the Arbitration service is paused, the fee is prohibitive, or the voting structure is closed.
|
|
763
|
+
|
|
764
|
+
**Diagnosis**:
|
|
765
|
+
- E6 showed `bPaused === true` → Arbitration service is suspended.
|
|
766
|
+
- `fee` is higher than the disputed amount → not economically viable.
|
|
767
|
+
- `voting_guard` is closed (specific voters only) and may be biased toward the provider.
|
|
768
|
+
|
|
769
|
+
**Recovery**:
|
|
770
|
+
1. Re-check E6 — are there other Arbitration services in `arbitrations[]`? Batch query them.
|
|
771
|
+
2. If all are paused or prohibitively expensive → inform user. No on-chain recourse.
|
|
772
|
+
3. If voting structure seems biased → document via WTS, consider off-chain escalation.
|
|
773
|
+
4. If user already paid the dispute fee and Arb is paused → fee may be lost. Check `onchain_events` for Arb state.
|
|
774
|
+
5. If Arb is active but voting is slow → check deadline settings. Arbitrator sets voting deadline.
|
|
775
|
+
|
|
776
|
+
**Prevention**: At R6 (E6), verify at least one non-paused Arbitration service with a reasonable fee BEFORE purchase. If all are paused or expensive, flag as ⚠️ or 🔴.
|
|
777
|
+
|
|
778
|
+
### F6: WIP Hash Mismatch Discovered Post-Purchase
|
|
779
|
+
|
|
780
|
+
**Trigger**: User verified WIP hash at E2 (R2) and it matched. After purchase, the seller altered the WIP file and the hash no longer matches.
|
|
781
|
+
|
|
782
|
+
**Diagnosis**:
|
|
783
|
+
- Seller updated the WIP file post-publish without updating the on-chain hash.
|
|
784
|
+
- Or: seller published a different WIP than what was verified (rare, but possible if verification was skipped).
|
|
785
|
+
- The on-chain `wip_hash` is immutable after Service publish — any change to the WIP file is detectable.
|
|
786
|
+
|
|
787
|
+
**Recovery**:
|
|
788
|
+
1. Re-run `wip_file` → `op: "verify"` with the current WIP file and the on-chain `wip_hash`.
|
|
789
|
+
2. If verification fails → the seller has altered the product evidence. This is a red flag for arbitration.
|
|
790
|
+
3. Generate WTS evidence of:
|
|
791
|
+
- The original verification result (if logged).
|
|
792
|
+
- The current WIP file and hash mismatch.
|
|
793
|
+
4. File arbitration dispute (D3). WIP hash mismatch is strong evidence of seller bad faith.
|
|
794
|
+
5. If the order is still in progress → try to advance to a refund path (D4) before the provider collects.
|
|
795
|
+
|
|
796
|
+
**Prevention**: Always verify WIP hash at E2 (R2) and re-verify immediately before purchase at R8/R9. Log the verification result in the checkpoint for future evidence.
|
|
797
|
+
|
|
798
|
+
---
|
|
799
|
+
|
|
800
|
+
## Tier Layering
|
|
801
|
+
|
|
802
|
+
### Novice — Guided E1-E10 Walkthrough
|
|
803
|
+
|
|
804
|
+
**Profile**: First-time buyer. Unfamiliar with WoWok concepts. Needs step-by-step guidance through due diligence.
|
|
805
|
+
|
|
806
|
+
**AI Behavior**:
|
|
807
|
+
- Execute E1-E10 in strict order. Explain each step's purpose before running it.
|
|
808
|
+
- Use simple language. Avoid jargon. Translate Machine forwards into plain-English workflow descriptions.
|
|
809
|
+
- Render the Pre-Purchase GATE table visually at R8.
|
|
810
|
+
- Confirm every decision explicitly. Default to conservative (any ⚠️ → ask user to acknowledge).
|
|
811
|
+
- For Guards: only present 🟢 Simple and 🟡 Complex. For 🔴 Ambiguous, recommend declining purchase.
|
|
812
|
+
- For Messenger: guide through `send_message` step-by-step. Do not assume familiarity.
|
|
813
|
+
- For order creation: show the confirmation template from [wowok-safety](../wowok-safety/SKILL.md). Wait for explicit "yes" before `service.buy`.
|
|
814
|
+
|
|
815
|
+
**Typical Journey**: R1 (browse) → R2-R7 (guided E1-E10) → R8 (GATE decision) → R9 (first order) → R10 (handoff with clear next steps).
|
|
816
|
+
|
|
817
|
+
### Advanced — Direct Phase Execution with Custom Evaluation
|
|
818
|
+
|
|
819
|
+
**Profile**: Experienced buyer. Understands WoWok concepts. Wants to run due diligence efficiently with custom risk thresholds.
|
|
820
|
+
|
|
821
|
+
**AI Behavior**:
|
|
822
|
+
- Execute E1-E10 but allow the user to skip items they've pre-evaluated.
|
|
823
|
+
- Present Machine JSON analysis concisely — forward classification table, no step-by-step explanation.
|
|
824
|
+
- For Guards: present all three levels (🟢🟡🔴). For 🔴 Ambiguous, export the file and let the user review independently.
|
|
825
|
+
- Allow custom risk thresholds (e.g., "I'm OK with 15% dispute rate" or "I don't need arbitration for orders under 10 WOW").
|
|
826
|
+
- For Messenger: assume familiarity. Only intervene for WTS evidence generation.
|
|
827
|
+
- For order creation: show the operation, confirm, execute. Minimal hand-holding.
|
|
828
|
+
- Support batch evaluation: if the user provides multiple Service candidates, run E1-E10 on all and present a comparison table.
|
|
829
|
+
|
|
830
|
+
**Typical Journey**: R1 (direct Service ID) → R2-R7 (batch E1-E10 with custom thresholds) → R8 (GATE decision with comparison) → R9 (order creation) → R10 (handoff to operations).
|
|
831
|
+
|
|
832
|
+
### Expert — Multi-Service Portfolio & Risk Modeling
|
|
833
|
+
|
|
834
|
+
**Profile**: Power user. Manages multiple orders across Services. Wants portfolio-level risk analysis and custom workflows.
|
|
835
|
+
|
|
836
|
+
**AI Behavior**:
|
|
837
|
+
- Support portfolio queries: "Show me all my active orders and their current node states."
|
|
838
|
+
- Cross-Service comparison: normalize E1-E10 results into a risk score. Rank candidates.
|
|
839
|
+
- Custom Guard analysis: for 🔴 Ambiguous Guards, attempt partial evaluation using `wowok_buildin_info` and `onchain_table_data` to resolve dynamic dependencies.
|
|
840
|
+
- Machine path optimization: for multi-forward nodes, compute the optimal path based on user's Guard satisfaction and financial outcome (E5).
|
|
841
|
+
- Arbitration strategy: evaluate multiple Arbitration services (E6) and recommend the best one based on fee, voting structure, and historical dispute resolution speed (from `onchain_events`).
|
|
842
|
+
- WTS evidence pipeline: automate `generate_wts` + `sign_wts` for all Messenger conversations related to an order. Maintain an evidence library.
|
|
843
|
+
- Discount hunting: proactively query `onchain_received` for active discounts before order creation.
|
|
844
|
+
- Fund management: track escrowed funds across all orders. Alert when compensation funds are near lock expiry.
|
|
845
|
+
|
|
846
|
+
**Typical Journey**: R1 (portfolio query) → R2-R7 (automated E1-E10 with risk scoring) → R8 (comparison table + recommendation) → R9 (batch order creation with discounts) → R10 (portfolio dashboard handoff).
|