@wowok/skills 1.1.5 → 1.1.7

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.
@@ -1,12 +1,8 @@
1
1
  ---
2
2
  name: wowok-order
3
3
  description: |
4
- WoWok Customer Guide — complete order lifecycle for buyers: service evaluation,
5
- consensus building, order creation, progress tracking, and dispute resolution.
6
-
7
- Covers the full buyer journey: pre-purchase due diligence based on on-chain objects, consensus establishment with Messenger as off-chain
8
- but self-verifiable evidence supplement, order operations, progress advancement
9
- with game theory, and arbitration when needed.
4
+ WoWok Customer Guide — complete buyer order lifecycle: pre-purchase due diligence
5
+ (E1-E10), consensus building, order creation, progress advancement, and arbitration.
10
6
  when_to_use:
11
7
  - User is a customer/buyer placing or managing orders
12
8
  - User wants to evaluate services before purchasing
@@ -18,428 +14,306 @@ when_to_use:
18
14
 
19
15
  # WoWok Customer Guide
20
16
 
21
- Complete guide for buyers on WoWok — from service discovery to order completion.
22
-
23
17
  > **Role**: Customer (Buyer/Order Holder)
24
- > **Provider Guide**: See [wowok-provider](../wowok-provider/SKILL.md)
25
- > **Arbitration Guide**: See [wowok-arbitrator](../wowok-arbitrator/SKILL.md)
26
- > **Messenger**: See [wowok-messenger](../wowok-messenger/SKILL.md) for encrypted communication
27
- > **Tools**: See [wowok-tools](../wowok-tools/SKILL.md)
18
+ > **Provider Guide**: [wowok-provider](../wowok-provider/SKILL.md) | **Arbitration Guide**: [wowok-arbitrator](../wowok-arbitrator/SKILL.md) | **Guard Design**: [wowok-guard](../wowok-guard/SKILL.md) | **Machine**: [wowok-machine](../wowok-machine/SKILL.md) | **Messenger**: [wowok-messenger](../wowok-messenger/SKILL.md) | **Safety**: [wowok-safety](../wowok-safety/SKILL.md) | **Tools**: [wowok-tools](../wowok-tools/SKILL.md)
28
19
 
29
20
  ---
30
21
 
31
- ## Core Concepts
22
+ ## Core Concepts (Design Invariants Not in Schema)
32
23
 
33
- ### Order Lifecycle Objects
24
+ ### Object Relationships
34
25
 
35
- When you purchase from a Service, three runtime objects are created:
26
+ Purchase creates three objects: **Order** (fund escrow, you are `builder`), **Progress** (Machine node tracker), **Allocation** (fund distribution engine). Only `builder` withdraws funds. Agents may operate but never access funds.
36
27
 
37
- | Object | Purpose | Key Points |
38
- |--------|---------|------------|
39
- | **Order** | Fund escrow & ownership | You are the `builder` (owner). Agents can help operate but **only you can withdraw funds**. |
40
- | **Progress** | Workflow state tracking | Tracks which Machine node you're at. Advanced via Order operations. |
41
- | **Allocation** | Fund distribution engine | Executes the winning allocator strategy when reaching exit nodes. |
28
+ ### The No-Bypass Rule
42
29
 
43
- ### Allocators vs Allocation
30
+ A forward with `namedOperator === ""` signals "user-operable". **However**: if that forward also binds a Guard, passport verification is mandatory and **cannot be bypassed**. `order.next` fails without validated passport. This is a protocol invariant.
44
31
 
45
- - **Allocators** (Service level): Multiple distribution strategies defined by seller, each with a Guard condition
46
- - **Allocation** (Order level): Auto-created execution engine that evaluates all allocator Guards and runs the strategy whose Guard returns `true`
32
+ ### Weight Accumulation
47
33
 
48
- **When Allocation Executes**:
49
- - Allocation evaluates **whenever the Progress reaches a node** that triggers fund distribution
50
- - **Any node** (not just exit nodes) can be configured to trigger Allocation evaluation
51
- - The winning allocator is the one whose Guard validates `true` for the current state
52
- - Guards can check: Progress node, time elapsed, signatures, or any on-chain data
34
+ Each forward contributes `weight` toward a node's `threshold`. `weight ≥ threshold` → one operation suffices. Multi-forward nodes may require cumulative multi-party contributions. Parse the `machineNode2file` JSON output; never query node-by-node.
53
35
 
54
- **Consensus Principle**: Allocators and their Guard conditions are immutable and transparent. Both parties see the same rules, but choose different paths based on their interests.
36
+ ### Allocation Triggers
55
37
 
56
- ---
38
+ Allocation evaluates when Progress reaches **any** configured node (not just exit nodes). The winning Allocator is the first whose Guard returns `true`. Rules are immutable after Service publish — both parties see identical conditions.
57
39
 
58
- ## Phase 1: Service Evaluation (Pre-Purchase)
40
+ ---
59
41
 
60
- Thoroughly investigate before committing funds.
42
+ ## Phase 1: Pre-Purchase Due Diligence (MANDATORY GATE)
61
43
 
62
- ### 1.1 Query Service Configuration
44
+ > **⛔ Complete E1-E10 in order. User must explicitly confirm every item.**
45
+ > **⚠️ = explain risk, wait for decision. 🔴 = strongly advise against purchase.**
63
46
 
64
- **Tool**: Use `query_toolkit` with `onchain_objects` query type to retrieve Service configuration.
47
+ ---
65
48
 
66
- **Schema Reference**: `schema_query({ action: "get", name: "query_toolkit" })`
49
+ ### E1 Service Basic Status
67
50
 
68
- **Key Fields to Analyze**:
51
+ Query `query_toolkit` → `onchain_objects` for `<service_name_or_id>`. Fields in schema. Save: `bPublished`, `bPaused`, `sales`, `machine`, `buy_guard`, `customer_required`, `arbitrations`, `compensation_fund`, `compensation_lock_duration`, `order_allocators`, `um`.
69
52
 
70
- | Field | What to Check | Risk Signals |
71
- |-------|---------------|--------------|
72
- | `sales` | Pricing, stock, WIP files | No `wip_hash` = unverified product claims |
73
- | `machine` | Workflow complexity | Overly complex = higher dispute risk |
74
- | `allocators` | Fund distribution rules | Unfair splits = reconsider purchase |
75
- | `arbitrations` | Available dispute resolution | None available = higher risk |
76
- | `compensation_fund` | Arbitration payout capacity | Low balance = limited recourse |
53
+ - `bPublished === false` 🔴 **ABORT**
54
+ - `bPaused === true` → 🔴 **ABORT**
55
+ - OK E2
77
56
 
78
- **WIP File Verification**:
79
- - `wip`: URL to product description/images
80
- - `wip_hash`: Integrity hash (if empty, auto-verified; if provided, must match)
81
- - **This is the seller's immutable commitment on-chain** — serves as arbitration evidence
57
+ ---
82
58
 
83
- ### 1.2 Evaluate Service Reputation
59
+ ### E2 Product & WIP Verification
84
60
 
85
- Query the Service's EntityLinker for community endorsement data.
61
+ From E1 `sales[]`. Skip `suspension === true` items.
86
62
 
87
- **Tool**: `query_toolkit` with `onchain_table_item_entity_linker` query type.
63
+ **WIP Verification** (mandatory when `wip_hash` non-empty):
88
64
 
89
- **Key Metrics to Calculate**:
65
+ Use `wip_file` `op: "verify"`, `wipFilePath: "<wip_url>"`, `hash_equal: "<wip_hash>"`.
90
66
 
91
- | Metric | How to Calculate | Good Sign |
92
- |--------|------------------|-----------|
93
- | **Completion Rate** | % orders reaching terminal nodes | >90% |
94
- | **Arbitration Rate** | % orders with non-empty `dispute` | <5% |
95
- | **Avg Resolution Time** | Time from creation to completion | Short |
96
- | **Repeat Customer Rate** | % builders appearing multiple times | High |
97
- | **Community Sentiment** | likes vs dislikes in EntityLinker | Positive |
67
+ - `wip_hash` empty no on-chain commitment (auto-verified, weaker evidence)
68
+ - Verification fails → 🔴 **WIP tampered after publish**
69
+ - No `wip` URL ⚠️ No product evidence
70
+ - Verified E3
98
71
 
99
72
  ---
100
73
 
101
- ## Phase 2: Consensus Building (CRITICAL)
102
-
103
- Establish mutual understanding with seller BEFORE purchasing. Consensus is built on **immutable on-chain data** (Guard, Machine, Allocators), with Messenger serving as **off-chain but self-verifiable evidence supplement**.
74
+ ### E3 Machine Workflow Analysis (CORE)
104
75
 
105
- ### Consensus Layers
76
+ **Step 1**: `query_toolkit` → `onchain_objects` for `<machine_id>`. Fail if `bPublished === false` or `bPaused === true`.
106
77
 
107
- | Layer | Source | Immutability | Purpose |
108
- |-------|--------|--------------|---------|
109
- | **On-Chain Foundation** | Service.machine, order_allocators, Guards | Immutable after publish | Transparent rules both parties agree to |
110
- | **Off-Chain Supplement** | Messenger WTS files | Self-verifiable via signatures | Clarification, negotiation, evidence |
78
+ **Step 2**: `machineNode2file` export the complete Machine JSON. Contains all nodes and forwards — parse locally, never node-by-node. Machine structure: see [wowok-machine](../wowok-machine/SKILL.md).
111
79
 
112
- > **Core Principle**: On-chain data (Machine workflow, Allocator rules, Guard conditions) forms the **immutable consensus foundation**. Messenger communication provides **clarification and evidence** but cannot override on-chain rules.
80
+ **Step 3: Classify every forward**:
113
81
 
114
- > **Full Messenger Guide**: See [wowok-messenger](../wowok-messenger/SKILL.md) for complete messaging operations, WTS evidence generation, and list management.
82
+ | `namedOperator` | `guard` | User Can Execute? |
83
+ |-----------------|---------|-------------------|
84
+ | `Some("")` | `None` | ✅ Independently via `order.progress` |
85
+ | `Some("")` | `Some({...})` | ⚠️ Need Guard passport — **no bypass** |
86
+ | `None` | Any | ❌ Provider/permission-holder only |
87
+ | `Some("<other>")` | Any | ❌ Named operator required |
115
88
 
116
- ### 2.1 Verify On-Chain Consensus First
89
+ **Step 4: Detect paths**:
90
+ - Terminal nodes (no outgoing forwards) → order ends
91
+ - Refund paths → lead to 100%→Order Allocator (cross-check E5)
92
+ - Arbitration paths → lead to arbitration nodes
93
+ - User-blocked paths → all forwards require `namedOperator ≠ ""`
117
94
 
118
- Before contacting seller, thoroughly understand the immutable rules:
95
+ **Risk Rules**:
119
96
 
120
- **Tool**: `query_toolkit` with `onchain_objects` query type to retrieve Service data.
97
+ | Signal | Level |
98
+ |--------|-------|
99
+ | No user-operable path from critical node | 🔴 Stuck unless provider acts |
100
+ | No refund path | 🔴 No fund recovery |
101
+ | No arbitration path | 🔴 No recourse |
102
+ | All exits favor provider | ⚠️ Provider paid regardless |
103
+ | Forward requires Guard user can't pass | ⚠️ Cooperation needed |
121
104
 
122
- **Key On-Chain Consensus Elements**:
123
- - **Machine**: Workflow nodes and transitions — defines how order progresses
124
- - **Allocators**: Fund distribution strategies — defines who gets what under which conditions
125
- - **Guards**: Validation logic — determines which allocator executes
126
- - **Arbitrations**: Available dispute resolution services
105
+ > **🔴 "No refund" + "No arbitration" → strongly advise against purchase.**
127
106
 
128
- ### 2.2 Get Service Contact
129
-
130
- **Steps**:
131
- 1. Query Service object to extract `um` field (Contact object ID)
132
- 2. Query Contact object to retrieve `ims[]` array (Messenger addresses)
133
-
134
- **Tool**: `query_toolkit` with `onchain_objects` query type.
107
+ ---
135
108
 
136
- ### 2.3 Send Encrypted Messages
109
+ ### E4 Guards Analysis
137
110
 
138
- Use Messenger to clarify on-chain rules and negotiate specifics.
111
+ Guard structure and instruction reference: [wowok-guard](../wowok-guard/SKILL.md).
139
112
 
140
- **Tool**: `messenger_operation` with `send_message` operation.
113
+ **Step 1**: Collect unique Guard IDs from E3 Machine JSON (`forward.guard.guard`), E1 `order_allocators`, E1 `buy_guard`. Deduplicate.
141
114
 
142
- **Schema Reference**: `schema_query({ action: "get", name: "messenger_operation" })`
115
+ **Step 2**: `guard2file` → export each unique Guard as JSON. Skip duplicates (same address = same Guard).
143
116
 
144
- **Evidence Closure Principle**: Messages only become valid evidence when the recipient **explicitly confirms** (ARK signature). One-sided claims are not evidence.
117
+ **Step 3**: `wowok_buildin_info` `info: "guard instructions"` for instruction reference.
145
118
 
146
- **Why Messenger Matters** (as consensus supplement):
147
- - ✅ End-to-end encrypted (NOT on-chain) — privacy for negotiations
148
- - ✅ Creates tamper-proof audit trail (WTS files) — see [wowok-messenger](../wowok-messenger/SKILL.md) for WTS generation
149
- - ✅ Clarifies on-chain rules without modifying them
150
- - ✅ Generates arbitration evidence for off-chain commitments
119
+ **Step 4**: For each exported Guard file, classify:
151
120
 
152
- **AI Should Proactively Suggest Clarifying**:
153
- - Exact deliverables and acceptance criteria
154
- - Timeline and milestones
155
- - Edge case handling
156
- - Refund/cancellation terms
157
- - Delivery logistics (address, phone)
158
- - Custom requirements
121
+ | Level | Criteria | Action |
122
+ |-------|----------|--------|
123
+ | 🟢 Simple | Clear purpose, few conditions | Explain |
124
+ | 🟡 Complex | Multi-layer, intent clear | Explain step-by-step |
125
+ | 🔴 Ambiguous | Unclear logic or dependencies | **Warn. Never speculate. User must review file.** |
159
126
 
160
- **Request Explicit Confirmation**: Ensure the seller responds and confirms understanding before proceeding. Unconfirmed messages have limited evidentiary value.
127
+ > **⛔ Never invent Guard logic. Prioritize Guards gating user-operable forwards and refund allocators.**
161
128
 
162
129
  ---
163
130
 
164
- ## Phase 3: Order Creation
165
-
166
- Once consensus is reached, create the order through Service operation.
131
+ ### E5 Fund Allocation Rules
167
132
 
168
- ### 3.1 Key Parameters
133
+ From E1 `order_allocators.allocators[]`. Fields in schema. For each Allocator: cross-reference Guard (E4) → trigger condition; map to Machine node (E3) → when it fires; present distribution outcome.
169
134
 
170
- **Operation**: `onchain_operations` with `operation_type: "service"`
135
+ **Risk Rules**:
171
136
 
172
- **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_service" })`
137
+ | Check | Risk |
138
+ |-------|------|
139
+ | No 100%→Order Allocator | 🔴 No refund mechanism |
140
+ | Surplus receiver = provider | ⚠️ Remainder to provider |
141
+ | Triggers only on provider-only paths | ⚠️ Unilateral collection |
142
+ | No allocators on user-operable paths | ⚠️ No financial control |
173
143
 
174
- **Key Parameters**:
144
+ > **Key safeguard**: 100%→Order Allocator on a user-operable forward.
175
145
 
176
- | Parameter | Purpose | Notes |
177
- |-----------|---------|-------|
178
- | `buy.items` | Products to purchase | Reference `Service.sales` |
179
- | `buy.total_pay` | Payment budget | **Excess automatically refunded** |
180
- | `buy.discount` | Coupon object ID | Optional — see 3.1.1 below |
181
- | `agents` | Delegated operators | Can operate order but **CANNOT withdraw funds** |
182
-
183
- #### 3.1.1 Using Discount Coupons
184
-
185
- When creating an order via the `buy` operation, you can apply a discount coupon by including the `discount` field with the coupon name/ID.
186
-
187
- **Finding Available Discounts**:
146
+ ---
188
147
 
189
- Discount coupons are separate objects that you receive (usually transferred from Service marketing campaigns or other users). To find discounts applicable to the current Service:
148
+ ### E6 Arbitration Availability
190
149
 
191
- **Step 1: Query all Discount objects you own**
150
+ Batch query E1 `arbitrations[]` via `onchain_objects`. Fields in schema. Arb process: [wowok-arbitrator](../wowok-arbitrator/SKILL.md).
192
151
 
193
- Use `query_toolkit` with `onchain_received` query type to get all Discount objects:
152
+ Also: `onchain_events` `type: "ArbEvent"`, `limit: 20`, filter for these Arb IDs.
194
153
 
195
- ```json
196
- {
197
- "query_type": "onchain_received",
198
- "name_or_address": "your_account_name",
199
- "type": "0x2::service::Discount", // Discount type on-chain
200
- "cursor": null,
201
- "limit": 50
202
- }
203
- ```
154
+ - `arbitrations[]` empty → 🔴 no recourse
155
+ - Any Arb `bPaused === true` → 🔴 unavailable
156
+ - High `fee` / closed `voting_guard` / no history → ⚠️
204
157
 
205
- This returns `ReceivedNormal[]` where each item's `content_raw` contains Discount fields:
206
- - `name`: Discount name
207
- - `discount_type`: "rate" (percentage) or "fixed" (absolute amount)
208
- - `benchmark`: Minimum order amount required
209
- - `off`: Discount value (e.g., 1000 for 10% if rate, or 100 for 100 units if fixed)
210
- - `time_start` / `time_end`: Validity period
211
- - `service`: Parent Service object ID (which Service this discount belongs to)
212
- - `transferable`: Whether it can be transferred to others
213
-
214
- **Step 2: Filter discounts for the current Service**
215
-
216
- Each Discount has a `service` field indicating which Service it can be used with. Filter the received Discount objects by comparing each Discount's `service` field with the target Service object ID you're purchasing from. Only Discounts where `service` matches the target Service can be applied to that Service.
217
-
218
- **Step 3: Validate discount applicability**
219
-
220
- Before using a discount, verify:
221
- 1. **Time validity**: `time_start` ≤ current_time ≤ `time_end`
222
- 2. **Minimum amount**: Order total ≥ `benchmark`
223
- 3. **Service match**: Discount's `service` field matches the Service being purchased
224
-
225
- **Step 4: Apply discount in order creation**
226
-
227
- Include the selected Discount object ID in the `buy.discount` field:
228
-
229
- ```json
230
- {
231
- "operation_type": "service",
232
- "data": {
233
- "buy": {
234
- "items": [...],
235
- "total_pay": "10000",
236
- "discount": "discount_object_id_here"
237
- }
238
- }
239
- }
240
- ```
158
+ ---
241
159
 
242
- **Discount Calculation**:
243
- - If `discount_type` is "rate": Discount = `total_pay` × (`off` / 10000)
244
- - If `discount_type` is "fixed": Discount = min(`off`, `total_pay`)
245
- - Final payment = `total_pay` - Discount
160
+ ### E7 — Compensation Fund
246
161
 
247
- | `namedNewOrder` | Local name for Order | Recommended for easy reference |
248
- | `namedNewProgress` | Local name for Progress | Recommended |
249
- | `namedNewAllocation` | Local name for Allocation | Recommended |
162
+ From E1: `compensation_fund`, `compensation_lock_duration`. Balance type in schema.
250
163
 
251
- ### 3.2 Private Information Handling
164
+ - Balance < planned order amount → ⚠️ may not cover award
165
+ - Lock near expiry → ⚠️ provider may withdraw
252
166
 
253
- After order creation, the AI must check the Service's `customer_required` field to see what information the provider needs (e.g., phone, email, delivery address).
167
+ ---
254
168
 
255
- 1. **Retrieve from local storage**: Use `query_toolkit` → `local_info_list` to retrieve your saved private information matching the `customer_required` fields. These are sensitive records stored only on your device.
256
- 2. **AI should prompt**: If the required info is not in `local_info`, ask if the user wants to save it there for future use. If it exists, present it for user confirmation before sending.
257
- 3. **Send via Messenger**: Use `messenger_operation` with `send_message` — **NEVER put private information on-chain**.
258
- 4. **Include order ID** in the message for traceability.
259
- 5. **Request explicit confirmation**: Unconfirmed delivery may stall order progress.
169
+ ### E8 Contact Channel
260
170
 
261
- ### 3.3 Post-Creation Notification
171
+ Query `onchain_objects` for E1 `um` ID. Contact fields in schema.
262
172
 
263
- **Mandatory**: Notify Service customer service via Messenger with order ID and submitted info reference.
173
+ - `um === null` 🔴 **ABORT**
174
+ - `ims[]` empty → 🔴 **No Messenger**
175
+ - Has active `ims[]` → E9
264
176
 
265
177
  ---
266
178
 
267
- ## Phase 4: Order Operations
179
+ ### E9 Chain Reputation
268
180
 
269
- All operations use `operation_type: "order"`.
181
+ **Sentiment**: `query_toolkit` `onchain_table_item_entity_linker` for provider address. Compute likes/dislikes ratio from `votes[]` (fields in schema).
270
182
 
271
- **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_order" })`
183
+ **Orders**: Batch query `votes[].address` via `onchain_objects` (50/batch, max 200). Filter Order-type objects where `service` matches. Aggregate dispute rate (`dispute ≠ []` / total) and repeat buyer ratio.
272
184
 
273
- ### 4.1 Permission Hierarchy
185
+ - Dispute rate >10% → ⚠️
274
186
 
275
- | Role | Can Do | Cannot Do |
276
- |------|--------|-----------|
277
- | **Builder** (You) | Everything + withdraw funds | — |
278
- | **Agents** | Operate progress, arbitration, cancel | **Withdraw funds** |
187
+ ---
279
188
 
280
- > **Critical**: You maintain ultimate financial control. Agents assist but cannot access funds.
189
+ ### E10 Privacy Information Matching
281
190
 
282
- ### 4.2 Progress Advancement
191
+ From E1 `customer_required[]`. Check locally via `query_toolkit` → `local_info_list`. Match against local `name` fields.
283
192
 
284
- **Key Rule**: As the order holder (builder), you advance progress **through the Order object**.
193
+ > **⛔ Never send private info without explicit user confirmation per item.**
285
194
 
286
- The Machine workflow defines who can operate each forward transition:
287
- - **Order-operable forwards**: `namedOperator === ""` — you can execute via `order.progress`
288
- - **Permission-operable forwards**: Require specific namespace permission — typically for Service Provider or collaborators
195
+ For matched: present value, ask "correct?" and "OK to send?". For missing: ask user to provide. Transmission: **Messenger only** (Phase 2), never on-chain.
289
196
 
290
- **Steps**:
291
- 1. Query Order object to get `progress` (Progress ID) and `machine` (Machine ID)
292
- 2. Query Progress object to get `current_node`
293
- 3. Query Machine table to find valid transitions from current node
197
+ ---
294
198
 
295
- **Tools**:
296
- - `query_toolkit` with `onchain_objects` query type
297
- - `query_toolkit` with `onchain_table` query type
199
+ ### Pre-Purchase GATE
298
200
 
299
- > **Note**: Service Providers or their collaborators may operate other forwards directly via Progress if the Machine design grants them permission. The Machine consensus is immutable — both parties operate within the same transparent rules.
201
+ ```
202
+ ┌──────────────────────────────────────────────────────┐
203
+ │ PRE-PURCHASE GATE │
204
+ ├──────────┬───────────────────────────────────────────┤
205
+ │ E1 │ Service Status [ ] OK [ ] ⚠️ │
206
+ │ E2 │ Product & WIP [ ] OK [ ] ⚠️ │
207
+ │ E3 │ Machine Workflow [ ] OK [ ] ⚠️ │
208
+ │ E4 │ Guards Logic [ ] OK [ ] 🔴 │
209
+ │ E5 │ Fund Allocation [ ] OK [ ] ⚠️ │
210
+ │ E6 │ Arbitration [ ] OK [ ] ⚠️ │
211
+ │ E7 │ Compensation Fund [ ] OK [ ] ⚠️ │
212
+ │ E8 │ Contact Channel [ ] OK [ ] ⚠️ │
213
+ │ E9 │ Chain Reputation [ ] OK [ ] ⚠️ │
214
+ │ E10 │ Privacy Info Match [ ] OK [ ] ⚠️ │
215
+ ├──────────┴───────────────────────────────────────────┤
216
+ │ ⛔ E1 bPublished=false / E8 um=null → ABORT │
217
+ │ ⛔ E3 no-refund + E6 no-arb → strongly advise ABORT │
218
+ │ ⛔ E4 ambiguous Guards → user MUST manually review │
219
+ │ ⛔ Any ⚠️ → explain risk, wait for user decision │
220
+ │ ✅ All OK → Phase 2 │
221
+ └──────────────────────────────────────────────────────┘
222
+ ```
223
+
224
+ ---
300
225
 
301
- ### 4.3 Path Selection & Game Theory
226
+ ## Phase 2: Consensus Building
302
227
 
303
- **Core Principle**: Same transparent rules, different optimal paths based on interests.
228
+ Consensus foundation: immutable on-chain rules (Phase 1). Messenger: encrypted, self-verifiable supplement clarifies, cannot override on-chain. Full operations: [wowok-messenger](../wowok-messenger/SKILL.md).
304
229
 
305
- **Example Scenario**:
230
+ ### 2.1 Send Privacy Info
306
231
 
307
- ```
308
- Current Node: "delivery_pending"
309
- ├── Path A → "delivery_confirmed"
310
- │ ├── Guard: buyer signs receipt
311
- │ └── Allocation: 95% seller, 5% platform
312
-
313
- ├── Path B → "dispute_filed"
314
- │ ├── Guard: arbitration requested
315
- │ └── Allocation: funds frozen
316
-
317
- └── Path C → "return_initiated"
318
- ├── Guard: within return window
319
- └── Allocation: 90% refund, 10% fee
320
- ```
232
+ Contact `ims[]` from E8. Send E10 info via `messenger_operation` → `send_message`. **Messenger only — never on-chain.** Get explicit user confirmation per item.
321
233
 
322
- **AI Decision Framework**:
234
+ ### 2.2 Negotiate
323
235
 
324
- 1. **Query all valid paths** from current node
325
- 2. **Evaluate Guard conditions** for each path
326
- 3. **Assess Allocation impact** (query `service.order_allocators`)
327
- 4. **Present options** with consequences:
236
+ Clarify via Messenger: deliverables (E2 WIP), timeline (E3 nodes), refund/cancellation (E3/E5), privacy info received (E10). Evidence value requires recipient **explicit confirmation** (ARK signature). WTS evidence: [wowok-messenger](../wowok-messenger/SKILL.md).
328
237
 
329
- | Path | Guard Required | Financial Outcome | Best For |
330
- |------|----------------|-------------------|----------|
331
- | A | Sign receipt | Pay seller 95% | Satisfied customer |
332
- | B | Request arbitration | Frozen | Disputed order |
333
- | C | Return in window | 90% refund | Unsatisfied customer |
238
+ ### 2.3 Consensus GATE
334
239
 
335
- **AI Guidance**:
336
- - Always present ALL available paths
337
- - Explain Guard requirements
338
- - Map to Allocation consequences
339
- - Recommend based on user's goals and evidence
240
+ - [ ] E10 info sent and acknowledged
241
+ - [ ] Seller confirmed deliverables and edge cases
242
+ - [ ] WTS evidence generated
340
243
 
341
244
  ---
342
245
 
343
- ## Phase 5: Arbitration (When Needed)
246
+ ## Phase 3: Order Creation
344
247
 
345
- When disputes cannot be resolved directly, use third-party Arbitration.
248
+ Schema: `schema_query({ action: "get", name: "onchain_operations_service" })`. Safety: [wowok-safety](../wowok-safety/SKILL.md).
346
249
 
347
- ### 5.1 Arbitration Process
250
+ **Not in schema**:
251
+ - Excess `buy.total_pay` auto-refunded. Agents cannot withdraw.
252
+ - Discounts: query `onchain_received` (type `0x2::service::Discount`), filter by `service`, validate time/benchmark. Rate: `total_pay × (off / 10000)`. Fixed: `min(off, total_pay)`.
348
253
 
349
- | Step | Operation | Key Points |
350
- |------|-----------|------------|
351
- | 1 | `arbitration.dispute` | Create Arb object, **pay fee separately** (NOT from Order) |
352
- | 2 | Generate WTS | Export Messenger history as tamper-proof evidence |
353
- | 3 | Send evidence | Via Messenger to Arbitration's contact (encrypted) |
354
- | 4 | `order.arb_confirm` | Signal "all evidence submitted" |
355
- | 5 | Wait for voting | Arbitration organizes voters |
356
- | 6 | `order.arb_objection` | (Optional) Object to unfavorable result |
357
- | 7 | `order.arb_claim_compensation` | Claim payout from `service.compensation_fund` |
254
+ Post-creation: notify via Messenger with order ID.
358
255
 
359
- **Schema References**:
360
- - `schema_query({ action: "get", name: "onchain_operations_arbitration" })`
361
- - `schema_query({ action: "get", name: "onchain_operations_order" })`
362
- - `schema_query({ action: "get", name: "messenger_operation" })`
256
+ ---
363
257
 
364
- ### 5.2 Key Rules
258
+ ## Phase 4: Order Operations
365
259
 
366
- - **Multiple Arb Objects**: Can arbitrate on multiple services simultaneously
367
- - **One Compensation**: Only ONE claim per Order (choose best result)
368
- - **Time Sensitivity**: Long arbitration may exceed order deadlines — discuss timelines pre-purchase
369
- - **Evidence Privacy**: WTS files verify authenticity via `messenger_operation` with `verify_wts` operation
260
+ Schema: `schema_query({ action: "get", name: "onchain_operations_order" })`.
370
261
 
371
- ### 5.3 Arb Object Lifecycle
262
+ ### Progress Advancement
372
263
 
373
- ```
374
- Principal_confirming → Arbitrator_confirming → Voting → Arbitrated → Objectionable → Finished/Withdrawn
375
- ```
264
+ When user reaches a node, AI MUST cross-reference Phase 1:
376
265
 
377
- ---
266
+ 1. **E3 Machine JSON**: user-operable forwards from current node?
267
+ 2. **E4 Guard files**: Guard requirements? Can user satisfy?
268
+ 3. **E5 Allocation**: financial outcome of each path?
378
269
 
379
- ## Fund Management
270
+ Present all three dimensions. Never just the operation name.
380
271
 
381
- ### Receiving Funds (`order.receive`)
272
+ - `namedOperator === ""` + no Guard → `order.progress` directly
273
+ - `namedOperator === ""` + Guard → passport required, no bypass
274
+ - `namedOperator !== ""` → not user-operable
382
275
 
383
- Extract funds sent to Order (compensation, penalties, rewards) to your wallet.
276
+ ---
384
277
 
385
- **Operation**: `onchain_operations` with `operation_type: "order"` and `receive` field.
278
+ ## Phase 5: Arbitration
386
279
 
387
- **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_order" })`
280
+ Schema: `schema_query({ action: "get", name: "onchain_operations_arbitration" })`. Process: [wowok-arbitrator](../wowok-arbitrator/SKILL.md).
388
281
 
389
- **Sources**:
390
- - Arbitration compensation (from `service.compensation_fund`)
391
- - Service penalties (late delivery, quality issues)
392
- - Collaboration payments
393
- - Direct transfers
282
+ Flow: `arbitration.dispute` → WTS evidence → Messenger → `order.arb_confirm` → voting → (`order.arb_objection`) → `order.arb_claim_compensation`.
394
283
 
395
- **Who Can Execute**: Builder and agents (but only builder receives).
284
+ **Not in schema**: fee paid separately, not from Order. One compensation claim per Order. Source: `compensation_fund` (E7).
396
285
 
397
- ### Ownership Transfer (`order.transfer_to`)
286
+ ---
398
287
 
399
- Transfer order ownership to new address. Requires builder permission.
288
+ ## Fund Management
400
289
 
401
- **Operation**: `onchain_operations` with `operation_type: "order"` and `transfer_to` field.
290
+ Schema: `onchain_operations_order`. Builder-only operations: `order.transfer_to` (ownership), `order.receive` (withdraw — agents can execute, only builder receives).
402
291
 
403
292
  ---
404
293
 
405
294
  ## Quick Reference
406
295
 
407
- ### Essential Schemas
296
+ Schemas: `schema_query({ action: "get", name: "<name>" })` for `onchain_operations_service`, `onchain_operations_order`, `onchain_operations_arbitration`, `messenger_operation`, `query_toolkit`, `onchain_table_data`, `wip_file`.
408
297
 
409
- | Purpose | Schema Name |
410
- |---------|-------------|
411
- | Service operations (purchase) | `onchain_operations_service` |
412
- | Order operations (progress, arbitration, receive) | `onchain_operations_order` |
413
- | Arbitration operations (dispute) | `onchain_operations_arbitration` |
414
- | Messenger (encrypted communication) | `messenger_operation` |
415
- | Query toolkit (object data, tables) | `query_toolkit` |
298
+ ### Phase Dependency
416
299
 
417
- **Query Schema**: `schema_query({ action: "get", name: "<schema_name>" })`
418
-
419
- ### Common Workflows
420
-
421
- **Evaluate Communicate Purchase → Track → Complete/Dispute**
300
+ ```
301
+ E1 (Service) ──→ E2 (Products/WIP)
302
+ │ │
303
+ │ ├──→ E8 (Contact) ├──→ E7 (Compensation)
304
+ │ ├──→ E10 (Privacy) └──→ E6 (Arbitrations)
305
+
306
+ └──→ E3 (Machine) ──→ E4 (Guards) ──→ E5 (Allocators)
307
+
308
+ └──→ E9 (Reputation)
309
+ ```
422
310
 
423
- 1. Query Service Check sales, machine, allocators, arbitrations
424
- 2. Messenger contact → Clarify terms, save WTS
425
- 3. Service operation → Create order with named objects
426
- 4. Order operations → Advance progress, choose paths
427
- 5. Receive funds or arbitration → Extract to wallet
311
+ > E3→E4→E5 is a strict chain. E6-E10 run in parallel after E1.
428
312
 
429
- ---
313
+ ### ⚠️ Critical Attention Items
430
314
 
431
- ## Safety Checklist
432
-
433
- Before purchasing:
434
- - [ ] Verified WIP file and product claims
435
- - [ ] Reviewed allocators (fair distribution?)
436
- - [ ] Checked available arbitrations
437
- - [ ] Established Messenger contact with seller
438
- - [ ] Clarified deliverables, timeline, refund policy
439
- - [ ] Saved conversation as WTS evidence
440
-
441
- Before advancing progress:
442
- - [ ] Understand ALL available paths
443
- - [ ] Know Guard requirements for chosen path
444
- - [ ] Aware of Allocation consequences
445
- - [ ] Have required evidence/proof ready
315
+ 1. **E4 Ambiguous Guards** — blind spot. User must review file directly. AI must not speculate.
316
+ 2. **E3 no-refund + E6 no-arb** — no mechanism to recover funds. Single most important decision factor.
317
+ 3. **E3 Forward with Guard** — "user-operable" is misleading if Guard blocks you. Verify requirements.
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.