@wowok/skills 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wowok/skills",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "WoWok AI Skills for Claude and other AI assistants - Helping AI use WoWok MCP tools correctly",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -207,7 +207,7 @@
207
207
  - **Iterable**: Yes (not bound to any object, can create new tests anytime)
208
208
 
209
209
  **Use Cases**:
210
- - Test Guard logic via `onchain_operations(gen_passport)` without binding to any Host Object
210
+ - Test Guard logic via `wowok({ tool: "onchain_operations", data: { operation_type: "gen_passport", ... } })` without binding to any Host Object
211
211
  - Verify Guard behavior under mock submission
212
212
  - Verify expected-pass and expected-fail boundary scenarios
213
213
  - Protected by `guard_gen_passport_test` confirmation rule (standard level)
@@ -319,7 +319,7 @@ For iterable scenes (buy_guard, Reward.guard, Repository.write_guard, Arbitratio
319
319
 
320
320
  1. **Export old Guard**: `guard2file` exports JSON backup
321
321
  2. **Edit JSON**: Modify based on old JSON (preserve identifier order, update table/root)
322
- 3. **Create new Guard**: `onchain_operations(guard) CREATE`
322
+ 3. **Create new Guard**: `wowok({ tool: "onchain_operations", data: { operation_type: "guard", ... } })` CREATE
323
323
  4. **Rebind**: MODIFY Host Object's binding_field to point to new Guard
324
324
  5. **gen_passport test**: Run `gen_passport` on the new Guard
325
325
  6. **Post-verification**: Verify new Guard is active
@@ -48,7 +48,7 @@ A **Machine** is a **directed graph** (allows cycles): Node set + NodePair migra
48
48
  | Step | Phase | Description |
49
49
  |------|-------|-------------|
50
50
  | **M1** | Flow & Node Design | Extract business process, design nodes (entry/normal/terminal/branch), Pair + threshold, Forward + permissions |
51
- | **M2** | Machine Creation (unpublished) | `onchain_operations(machine) CREATE publish:false`, verify node/forward completeness |
51
+ | **M2** | Machine Creation (unpublished) | `wowok({ tool: "onchain_operations", data: { operation_type: "machine", publish: false } })` CREATE, verify node/forward completeness |
52
52
  | **M3** | Guard Creation & Binding | Guard design (table + root tree), CREATE Guard, `gen_passport` static test, MODIFY Machine to bind Guards to Forwards |
53
53
  | **M4** | Pre-Publish Audit | 8D puzzle completeness, 5D risk assessment, topology analysis, on-chain limit checks, machineNode2file backup, independent Progress test |
54
54
  | **M5** | Publish & Bind Service | User explicit confirmation, `publish:true` (nodes frozen), bind Machine to Service, publish Service |
@@ -244,9 +244,9 @@ See [Core Architecture > Key Flows](#arb-state-machine) above.
244
244
  ### Schema Access
245
245
 
246
246
  ```javascript
247
- schema_query({ action: "get", name: "onchain_operations_arbitration" })
248
- schema_query({ action: "get", name: "onchain_operations_order" })
249
- schema_query({ action: "get", name: "messenger_operation" })
247
+ wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_arbitration" } })
248
+ wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_order" } })
249
+ wowok({ tool: "schema_query", data: { action: "get", name: "messenger_operation" } })
250
250
  ```
251
251
 
252
252
  ---
@@ -9,6 +9,8 @@
9
9
 
10
10
  A 10-round dialogue for the Guard authoring journey: from "I need a validation rule" through "tested, bound, and live". Guards are CREATE-only and immutable — this dialogue is deliberately heavy on design (R1-R6) before any on-chain write (R7), because there is no edit phase after creation. The sequence covers the four canonical Guard contexts (buy_guard, machine Forward guard, Allocator guard, Arbitration voting_guard) but the same shape applies to reward, repository, and demand Guards.
11
11
 
12
+ > **Tool Call Convention**: All tool references in this document are sub-tools invoked via the single unified `wowok` tool. Translate every reference to `wowok({ tool: "<sub-tool-name>", data: {<params>} })`. See [wowok-tools](../wowok-tools/SKILL.md) for the full interface.
13
+
12
14
  ### R1: Validation Intent Capture
13
15
 
14
16
  **AI Goal**: Articulate the business requirement the Guard will enforce, in plain language, before any technical design. Identify which of the §Quick Decision patterns fits.
@@ -263,7 +265,7 @@ Guard needs to query object B, but caller submits object A's ID:
263
265
  ├── A = Order, B = Service? ──→ convert_witness: TypeOrderService
264
266
  ├── A = Progress, B = Machine? ──→ convert_witness: TypeProgressMachine
265
267
  ├── A = Reward, B = Service? ──→ convert_witness: TypeRewardService
266
- ├── Other source→target pairs? ──→ query wowok_buildin_info (info: "guard instructions") for the complete witness type catalog
268
+ ├── Other source→target pairs? ──→ query `wowok({ tool: "wowok_buildin_info", data: { info: "guard instructions" } })` for the complete witness type catalog
267
269
  └── No conversion needed (caller submits the exact object the Guard queries)? ──→ omit convert_witness
268
270
  ```
269
271
 
@@ -288,7 +290,7 @@ Guard logic needs to change:
288
290
  │ ├── Export current Guard? ──→ guard2file → JSON/Markdown
289
291
  │ ├── Edit file (table, root tree, rely)? ──→ offline edit
290
292
  │ ├── Review edited JSON with user? ──→ confirm
291
- │ ├── CREATE new Guard from file? ──→ onchain_operations(guard) with root.type="file"
293
+ │ ├── CREATE new Guard from file? ──→ `wowok({ tool: "onchain_operations", data: { operation_type: "guard", root: { type: "file", ... } } })`
292
294
  │ ├── Test new Guard? ──→ gen_passport with mock submissions
293
295
  │ ├── Rebind to host object? ──→ MODIFY host (if host is mutable)
294
296
  │ │ └── Host is immutable (published Machine/Service)? ──→ must create new host object too
@@ -320,7 +320,7 @@ The root tree is a computational expression whose terminal nodes read data and w
320
320
 
321
321
  Guard computational trees are built from typed nodes. Rather than listing all possible nodes (which evolves with the system), query the authoritative schema dynamically:
322
322
 
323
- **Tool**: `schema_query({ action: "get", name: "onchain_operations_guard" })`
323
+ **Tool**: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_guard" } })`
324
324
 
325
325
  This returns the complete `GuardNodeSchema` definition — every node type, its required fields, input/output types, and validation rules. Node categories include:
326
326
 
@@ -347,7 +347,7 @@ Use `onchain_operations` with `operation_type: "guard"`.
347
347
  - `root.type: "node"` — build the computation tree directly in the operation payload.
348
348
  - `root.type: "file"` — load the tree from a `guard2file`-exported JSON/Markdown file. Use this to iterate on existing Guards: export → edit file → create new Guard from file.
349
349
 
350
- **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_guard" })`
350
+ **Schema Reference**: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_guard" } })`
351
351
 
352
352
  ---
353
353
 
@@ -359,7 +359,7 @@ Before embedding a Guard into a live Machine, Service, or Arbitration, test it i
359
359
 
360
360
  **Tool**: `onchain_operations` with `operation_type: "gen_passport"`
361
361
 
362
- **Schema Reference**: `schema_query({ action: "get", name: "onchain_operations_gen_passport" })`
362
+ **Schema Reference**: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_gen_passport" } })`
363
363
 
364
364
  This tool verifies one or more Guards and, on success, generates an immutable Passport — a verified credential stored on-chain. Use it to:
365
365
 
@@ -390,7 +390,7 @@ Guards are immutable but iterable. The full cycle:
390
390
  1. guard2file <existing_guard> → JSON/Markdown file
391
391
  2. Edit file (table, root tree, rely)
392
392
  3. Review edited JSON with user → confirm
393
- 4. onchain_operations(guard) with root.type="file" → new Guard created
393
+ 4. wowok({ tool: "onchain_operations", data: { operation_type: "guard", root: { type: "file", ... } } }) → new Guard created
394
394
  5. Update all references (Machine forwards, Service buy_guard, Arbitration voting_guard, etc.)
395
395
  ```
396
396
 
@@ -122,7 +122,7 @@ Machine
122
122
  └── guard (optional): condition that must pass
123
123
  ```
124
124
 
125
- > **Schema**: `schema_query({ action: "get", name: "onchain_operations_machine" })` — all field types, limits, valid values. This document focuses on design decisions **not captured** by the schema.
125
+ > **Schema**: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_machine" } })` — all field types, limits, valid values. This document focuses on design decisions **not captured** by the schema.
126
126
 
127
127
  ### Forward Permission Model
128
128
 
@@ -188,7 +188,7 @@ Nine operations are available via the `node` field. Query schema for full parame
188
188
  - `exchange` swaps two node positions without delete/recreate. `rename` auto-updates all Pair references.
189
189
  - `add forward` supports the full `MachineForward` structure including `guard` with `retained_submission`.
190
190
 
191
- > **Schema**: `schema_query({ action: "get", name: "onchain_operations_machine" })` for full operation parameters.
191
+ > **Schema**: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_machine" } })` for full operation parameters.
192
192
 
193
193
  ### File-Based Workflow
194
194
 
@@ -220,7 +220,7 @@ Two paths: **Service Order** (automatic when Order created on Service with bound
220
220
 
221
221
  Two-phase operations (`hold`/`unhold`) allow locking resources during multi-step operations; `adminUnhold` force-releases stale locks.
222
222
 
223
- > **Querying**: Progress state via `onchain_objects`, history via `onchain_table` / `onchain_table_item_progress_history`. Schema: `schema_query({ action: "get", name: "onchain_table_data" })`.
223
+ > **Querying**: Progress state via `onchain_objects`, history via `onchain_table` / `onchain_table_item_progress_history`. Schema: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_table_data" } })`.
224
224
 
225
225
  ### Runtime: Advancing the Workflow
226
226
 
@@ -25,7 +25,7 @@ always: false
25
25
  End-to-end encrypted messaging with tamper-proof audit trails.
26
26
 
27
27
  > **Role**: Any WoWok participant
28
- > **Schema**: `schema_query({ action: "get", name: "messenger_operation" })` — all 16 operations with full parameter types and constraints. This document focuses on **design decisions and strategy** not captured by the schema.
28
+ > **Schema**: `wowok({ tool: "schema_query", data: { action: "get", name: "messenger_operation" } })` — all 16 operations with full parameter types and constraints. This document focuses on **design decisions and strategy** not captured by the schema.
29
29
  > **Related Skills**: [wowok-guard](../wowok-guard/SKILL.md) (guard design), [wowok-arbitrator](../wowok-arbitrator/SKILL.md) (WTS evidence in disputes), [wowok-order](../wowok-order/SKILL.md) (customer perspective), [wowok-provider](../wowok-provider/SKILL.md) (service provider perspective), [wowok-safety](../wowok-safety/SKILL.md) (safety)
30
30
 
31
31
  ---
@@ -9,6 +9,8 @@
9
9
 
10
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
11
 
12
+ > **Tool Call Convention**: All tool references in this document (e.g., `onchain_operations`, `query_toolkit`, `account_operation`) are sub-tools invoked via the single unified `wowok` tool. Translate every reference to `wowok({ tool: "<sub-tool-name>", data: {<params>} })`. See [wowok-tools](../wowok-tools/SKILL.md) for the full interface.
13
+
12
14
  ## Project-Based Deployment Integration
13
15
 
14
16
  The onboarding flow is integrated with the MCP project-based 5-stage deployment pipeline. Each stage gates progression to the next, with `project_operation` action calls providing deterministic validation:
@@ -245,7 +245,7 @@ Clarify via Messenger: deliverables (E2 WIP), timeline (E3 nodes), refund/cancel
245
245
 
246
246
  ## Phase 3: Order Creation
247
247
 
248
- Schema: `schema_query({ action: "get", name: "onchain_operations_service" })`. Safety: [wowok-safety](../wowok-safety/SKILL.md).
248
+ Schema: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_service" } })`. Safety: [wowok-safety](../wowok-safety/SKILL.md).
249
249
 
250
250
  **Not in schema**:
251
251
  - Excess `buy.total_pay` auto-refunded. Agents cannot withdraw.
@@ -257,7 +257,7 @@ Post-creation: notify via Messenger with order ID.
257
257
 
258
258
  ## Phase 4: Order Operations
259
259
 
260
- Schema: `schema_query({ action: "get", name: "onchain_operations_order" })`.
260
+ Schema: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_order" } })`.
261
261
 
262
262
  ### Progress Advancement
263
263
 
@@ -277,7 +277,7 @@ Present all three dimensions. Never just the operation name.
277
277
 
278
278
  ## Phase 5: Arbitration
279
279
 
280
- Schema: `schema_query({ action: "get", name: "onchain_operations_arbitration" })`. Process: [wowok-arbitrator](../wowok-arbitrator/SKILL.md).
280
+ Schema: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_arbitration" } })`. Process: [wowok-arbitrator](../wowok-arbitrator/SKILL.md).
281
281
 
282
282
  Flow: `arbitration.dispute` → WTS evidence → Messenger → `order.arb_confirm` → voting → (`order.arb_objection`) → `order.arb_claim_compensation`.
283
283
 
@@ -410,7 +410,7 @@ Toggle example: `config_operation` → `action: "toggle"`, `service: "order_moni
410
410
 
411
411
  ## Quick Reference
412
412
 
413
- 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`.
413
+ Schemas: `wowok({ tool: "schema_query", data: { action: "get", name: "<name>" } })` for `onchain_operations_service`, `onchain_operations_order`, `onchain_operations_arbitration`, `messenger_operation`, `query_toolkit`, `onchain_table_data`, `wip_file`.
414
414
 
415
415
  ### Phase Dependency
416
416
 
@@ -9,6 +9,8 @@
9
9
 
10
10
  Each round follows: state the goal, ask the minimum questions needed, gather inputs (LLM translation only when free text is ambiguous), update the ODG in memory, persist checkpoint, advance.
11
11
 
12
+ > **Tool Call Convention**: All tool references in this document (e.g., `project_operation`, `onchain_operations`) are sub-tools invoked via the single unified `wowok` tool. Translate every reference to `wowok({ tool: "<sub-tool-name>", data: {<params>} })`. See [wowok-tools](../wowok-tools/SKILL.md) for the full interface.
13
+
12
14
  ## Project-Based Deployment Integration
13
15
 
14
16
  The planner flow integrates with the MCP project-based deployment pipeline (5 stages). Each stage maps to specific R rounds:
@@ -9,6 +9,8 @@
9
9
 
10
10
  A 10-round dialogue for the merchant operations journey: from "I want to set up a service" through "published, live, and accepting orders". This dialogue assumes the merchant has an account (per [wowok-onboard](../wowok-onboard/SKILL.md) R1) and may have a partial configuration. Each round maps to one R-item in the §PRE-FLIGHT checklist or one STEP in the §Service Build Lifecycle. The §Anti-Fabrication Rules are non-negotiable throughout — the AI never invents products, prices, workflow, or fund splits.
11
11
 
12
+ > **Tool Call Convention**: All tool references in this document (e.g., `onchain_operations`, `query_toolkit`, `messenger_operation`) are sub-tools invoked via the single unified `wowok` tool. Translate every reference to `wowok({ tool: "<sub-tool-name>", data: {<params>} })`. See [wowok-tools](../wowok-tools/SKILL.md) for the full interface.
13
+
12
14
  ## Project-Based Deployment Integration
13
15
 
14
16
  The provider flow integrates with the MCP project-based deployment pipeline (5 stages). The relevant stages for the operations journey are:
@@ -320,7 +322,7 @@ Should I add a Compensation Fund?
320
322
 
321
323
  ```
322
324
  Merchant daily check-in:
323
- ├── New orders? ──→ query_toolkit.onchain_events (NewOrderEvent) → fulfill per Machine workflow
325
+ ├── New orders? ──→ `wowok({ tool: "query_toolkit", data: { query_type: "onchain_events", ... } })` (NewOrderEvent) → fulfill per Machine workflow
324
326
  ├── Orders stuck at a node? ──→ query Progress → check Forward operators / Guard submissions → advance or contact customer
325
327
  ├── Customer messages? ──→ messenger_operation.watch_conversations (unreadOnly: true) → respond
326
328
  ├── Funds to claim? ──→ allocation.alloc_by_guard (anyone can trigger; verify fund flow)
@@ -91,20 +91,22 @@ STEP 0: Present checklist R1-R7 to user
91
91
  Once R1-R7 confirmed, execute in strict order. All operations use R1 (Account) as `env.account`.
92
92
 
93
93
  ```
94
+ All Tool: references below are sub-tools invoked via wowok({ tool: "<name>", data: { operation_type: "<type>", ... } })
95
+
94
96
  STEP 1: Foundation
95
97
  ├── Permission — REUSE existing (strongly recommended)
96
- │ Tool: onchain_operations (permission) | Fields: name, type_parameter
98
+ │ Tool: "onchain_operations" (permission) | Fields: name, type_parameter
97
99
  ├── Service (unpublished) — CREATE new
98
- │ Tool: onchain_operations (service) | Fields: name, type_parameter, permission
100
+ │ Tool: "onchain_operations" (service) | Fields: name, type_parameter, permission
99
101
  └── Machine (unpublished) — CREATE new or REUSE template
100
- Tool: onchain_operations (machine) | Fields: nodes, pairs, forwards
101
- Discovery: query_toolkit (account_list, local_mark_list, onchain_objects)
102
- Template: machineNode2file (export existing for editing)
102
+ Tool: "onchain_operations" (machine) | Fields: nodes, pairs, forwards
103
+ Discovery: "query_toolkit" (account_list, local_mark_list, onchain_objects)
104
+ Template: "machineNode2file" (export existing for editing)
103
105
 
104
106
  STEP 2: Trust Layer
105
107
  └── Guards — CREATE new or REUSE existing
106
- Tool: onchain_operations (guard) | Fields: logic, instructions
107
- Template: guard2file (export existing for editing)
108
+ Tool: "onchain_operations" (guard) | Fields: logic, instructions
109
+ Template: "guard2file" (export existing for editing)
108
110
  ⚠️ Design your Guard tables based on how the target object reads data:
109
111
  - buy_guard → pass/fail only, no data extraction
110
112
  - Allocator guard → pass/fail only
@@ -114,22 +116,22 @@ STEP 2: Trust Layer
114
116
 
115
117
  STEP 3: Business Logic (MODIFY)
116
118
  ├── Machine — bind Guards to forwards
117
- │ Tool: onchain_operations (machine)
119
+ │ Tool: "onchain_operations" (machine)
118
120
  ├── Service — set Allocators
119
- │ Tool: onchain_operations (service) | Fields: order_allocators
121
+ │ Tool: "onchain_operations" (service) | Fields: order_allocators
120
122
  ├── Arbitrations (optional) — REUSE existing Arb services
121
- │ Tool: onchain_operations (service) | Fields: arbitrations.list
123
+ │ Tool: "onchain_operations" (service) | Fields: arbitrations.list
122
124
  ├── Compensation Fund (optional): compensation_fund_add + setting_locked_time_add (default 30 days, configurable)
123
- │ Tool: onchain_operations (service)
125
+ │ Tool: "onchain_operations" (service)
124
126
  └── Reward (optional) — incentive pools
125
127
 
126
128
  STEP 4: Publication
127
129
  ├── Publish Machine → IMMUTABLE
128
- │ Tool: onchain_operations (machine) | publish: true
130
+ │ Tool: "onchain_operations" (machine) | publish: true
129
131
  ├── Bind Machine to Service
130
- │ Tool: onchain_operations (service) | machine: "<machine_id>"
132
+ │ Tool: "onchain_operations" (service) | machine: "<machine_id>"
131
133
  └── Publish Service → machine/allocators LOCKED
132
- Tool: onchain_operations (service) | publish: true
134
+ Tool: "onchain_operations" (service) | publish: true
133
135
 
134
136
  ⚠️ Pre-Publish Verification:
135
137
  1. Re-check PRE-FLIGHT: all R1-R7 still confirmed?
@@ -233,7 +235,7 @@ Each `sharing[].who` field determines where funds go. Choose the correct type ba
233
235
  After the Progress reaches a terminal state, the fund allocation is NOT automatic — it must be triggered explicitly. **Anyone can call this operation**; the caller does not need to be the merchant or customer. The Guard verification determines which allocator's rules apply.
234
236
 
235
237
  ```
236
- Tool: onchain_operations (allocation)
238
+ Tool: wowok({ tool: "onchain_operations", data: { operation_type: "allocation", ... } })
237
239
  Operation: alloc_by_guard
238
240
  Required submission: Order ID (matching the Guard's b_submission identifier)
239
241
  ```
@@ -249,8 +251,8 @@ Required submission: Order ID (matching the Guard's b_submission identifier)
249
251
  Immutable product commitment for arbitration evidence.
250
252
 
251
253
  ```
252
- Create: wip_file generate → markdown_text + images → outputPath
253
- Attach: onchain_operations (service) → sales.sales[{
254
+ Create: wowok({ tool: "wip_file", data: { op: "generate", ... } }) → markdown_text + images → outputPath
255
+ Attach: wowok({ tool: "onchain_operations", data: { operation_type: "service", ... } }) → sales.sales[{
254
256
  name, price, stock, wip: "<URL>", wip_hash: "" (auto)
255
257
  }]
256
258
  ```
@@ -285,7 +287,7 @@ Attach: onchain_operations (service) → sales.sales[{
285
287
  | Messenger | `messenger_operation` |
286
288
  | Query | `query_toolkit` |
287
289
 
288
- **Export**: `machineNode2file`, `guard2file` | **Query Schema**: `schema_query({ action: "get", name: "<name>" })`
290
+ **Export**: `machineNode2file`, `guard2file` | **Query Schema**: `wowok({ tool: "schema_query", data: { action: "get", name: "<name>" } })`
289
291
 
290
292
  ---
291
293
 
@@ -9,6 +9,8 @@
9
9
 
10
10
  A guided 10-round dialogue for the safety verification journey — runs before ANY on-chain write operation. Each round has a specific AI Goal, Key Questions, Tool Calls, Success Criteria, Fallback, and Checkpoint. Checkpoints persist via `local_info_operation` so the verification can resume after interruption.
11
11
 
12
+ > **Tool Call Convention**: All tool references in this document are sub-tools invoked via the single unified `wowok` tool. Translate every reference to `wowok({ tool: "<sub-tool-name>", data: {<params>} })`. See [wowok-tools](../wowok-tools/SKILL.md) for the full interface.
13
+
12
14
  > **Trigger**: This dialogue is automatically invoked when the user requests an on-chain write operation (transfer, publish, create, modify, etc.). It is the safety gate that all writes must pass through.
13
15
 
14
16
  ### R1 — Operation Intent Capture
@@ -309,24 +311,26 @@ What level of confirmation does this operation need?
309
311
  ### D3: LOCAL vs ON-CHAIN vs QUERY
310
312
 
311
313
  ```
314
+ All sub-tools below are accessed via: wowok({ tool: "<sub-tool-name>", data: {<params>} })
315
+
312
316
  Classifying the operation:
313
317
  ├── LOCAL ONLY (no gas, no confirmation)
314
- │ ├── account_operation (gen, get, faucet, messenger, etc.)
315
- │ ├── local_mark_operation
316
- │ └── local_info_operation
318
+ │ ├── tool: "account_operation" (gen, get, faucet, messenger, etc.)
319
+ │ ├── tool: "local_mark_operation"
320
+ │ └── tool: "local_info_operation"
317
321
  ├── ON-CHAIN (gas required, confirmation required)
318
- │ ├── onchain_operations (all 16 operation_types)
319
- │ ├── messenger_operation (some ops — sign, proof_message)
320
- │ └── wip_file (sign)
322
+ │ ├── tool: "onchain_operations" (all 16 operation_types)
323
+ │ ├── tool: "messenger_operation" (some ops — sign, proof_message)
324
+ │ └── tool: "wip_file" (sign)
321
325
  ├── QUERY (read-only, no gas, no confirmation)
322
- │ ├── query_toolkit
323
- │ ├── onchain_table_data
324
- │ ├── onchain_events
325
- │ ├── guard2file
326
- │ ├── machineNode2file
327
- │ └── wowok_buildin_info
326
+ │ ├── tool: "query_toolkit"
327
+ │ ├── tool: "onchain_table_data"
328
+ │ ├── tool: "onchain_events"
329
+ │ ├── tool: "guard2file"
330
+ │ ├── tool: "machineNode2file"
331
+ │ └── tool: "wowok_buildin_info"
328
332
  └── ENCRYPTED (local encryption, no gas)
329
- └── messenger_operation (watch/send messages — local ops)
333
+ └── tool: "messenger_operation" (watch/send messages — local ops)
330
334
  ```
331
335
 
332
336
  ### D4: Publish Readiness Check
@@ -262,7 +262,7 @@ For complex objects with many fields (Service, Machine), use **incremental build
262
262
  | Guard instructions | `wowok_buildin_info` with `info: "guard instructions"` |
263
263
  | Value types | `wowok_buildin_info` with `info: "value types"` |
264
264
 
265
- **Query Schema**: `schema_query({ action: "get", name: "<schema_name>" })`
265
+ **Query Schema**: `wowok({ tool: "schema_query", data: { action: "get", name: "<schema_name>" } })`
266
266
 
267
267
  **Related Skills**: [wowok-tools](../wowok-tools/SKILL.md) | [wowok-guard](../wowok-guard/SKILL.md) | [wowok-machine](../wowok-machine/SKILL.md) | [wowok-order](../wowok-order/SKILL.md) | [wowok-provider](../wowok-provider/SKILL.md) | [wowok-arbitrator](../wowok-arbitrator/SKILL.md) | [wowok-messenger](../wowok-messenger/SKILL.md)
268
268
 
@@ -19,10 +19,10 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
19
19
  - Are you operating on-chain or only locally?
20
20
 
21
21
  **Tool Calls**:
22
- 1. `query_toolkit` `local_names` — list accounts and local marks so the AI can phrase follow-ups in terms the user already knows.
22
+ 1. `wowok({ tool: "query_toolkit", data: { query_type: "local_names", ... } })` — list accounts and local marks so the AI can phrase follow-ups in terms the user already knows.
23
23
  2. (No write call yet — R1 is classification only.)
24
24
 
25
- **Success Criteria**: AI articulates the classified intent back to the user in plain language ("You want to write on-chain state, so we'll use `onchain_operations`. Next we pick the operation_type.") and the user confirms.
25
+ **Success Criteria**: AI articulates the classified intent back to the user in plain language ("You want to write on-chain state, so we'll use `wowok({ tool: 'onchain_operations', data: {...} })`. Next we pick the operation_type.") and the user confirms.
26
26
 
27
27
  **Fallback**: User intent is genuinely ambiguous (e.g., "I want to set up a shop" could mean account creation OR service creation) → ask one disambiguating question, do not guess. If user invokes by raw tool name ("use `messenger_operation`"), skip R2-R3 and jump to the parameter-shape rounds.
28
28
 
@@ -38,8 +38,8 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
38
38
  - (Communicate) Plain message, file, or WTS evidence?
39
39
 
40
40
  **Tool Calls**:
41
- 1. `schema_query` `list` — confirm available schemas are generated (catches the "empty list → run `npm run generate:schemas`" trap from §13).
42
- 2. (For `onchain_operations`) `schema_query` `get` for the candidate operation_type schema (e.g., `onchain_operations_service`) to surface required fields early.
41
+ 1. `wowok({ tool: "schema_query", data: { action: "list" } })` — confirm available schemas are generated (catches the "empty list → run `npm run generate:schemas`" trap from §13).
42
+ 2. (For `onchain_operations`) `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_service" } })` for the candidate operation_type schema to surface required fields early.
43
43
 
44
44
  **Success Criteria**: One tool name and (for `onchain_operations`) one `operation_type` are committed. AI shows the user the high-level parameter shape and gets a "yes, that looks right".
45
45
 
@@ -56,7 +56,7 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
56
56
  - For everything else: do you have the `data` payload ready, or do you need to collect it across R4-R6?
57
57
 
58
58
  **Tool Calls**:
59
- 1. `schema_query` `get` for the specific branch (e.g., `onchain_operations_gen_passport`) to lock the exact field set.
59
+ 1. `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations_gen_passport" } })` for the specific branch to lock the exact field set.
60
60
  2. Cross-reference §Structural Wrapper Rules table to confirm `data` presence and `submission` presence.
61
61
 
62
62
  **Success Criteria**: The AI presents the exact JSON skeleton with field names (not values yet) and the user confirms the shape.
@@ -75,9 +75,9 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
75
75
  - (If building multiple interdependent objects) OK to set `no_cache: true` to avoid stale-read failures?
76
76
 
77
77
  **Tool Calls**:
78
- 1. `query_toolkit` `account_balance` for the chosen account — verify balance > 0 before any write.
79
- 2. If balance = 0: `account_operation` `faucet` (testnet) OR `account_operation` `transfer` from a funded account (mainnet).
80
- 3. (Optional) `query_toolkit` `token_list` to confirm token decimals if amounts are involved.
78
+ 1. `wowok({ tool: "query_toolkit", data: { query_type: "account_balance", ... } })` for the chosen account — verify balance > 0 before any write.
79
+ 2. If balance = 0: `wowok({ tool: "account_operation", data: { faucet: { ... } } })` (testnet) OR `wowok({ tool: "account_operation", data: { transfer: { ... } } })` from a funded account (mainnet).
80
+ 3. (Optional) `wowok({ tool: "query_toolkit", data: { query_type: "token_list", ... } })` to confirm token decimals if amounts are involved.
81
81
 
82
82
  **Success Criteria**: An account with non-zero balance is committed; `network` and `no_cache` are decided. AI shows the final `env` block.
83
83
 
@@ -95,8 +95,8 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
95
95
  - (If create) What are the new object's required fields?
96
96
 
97
97
  **Tool Calls**:
98
- 1. `query_toolkit` `onchain_objects` — verify any "reuse" string actually resolves (catches typos before the SDK's `GetObjectExisted()` hard-errors).
99
- 2. `local_mark_operation` → optional: tag a reused object with a friendly name for future reference.
98
+ 1. `wowok({ tool: "query_toolkit", data: { query_type: "onchain_objects", ... } })` — verify any "reuse" string actually resolves (catches typos before the SDK's `GetObjectExisted()` hard-errors).
99
+ 2. `wowok({ tool: "local_mark_operation", data: { ... } })` → optional: tag a reused object with a friendly name for future reference.
100
100
 
101
101
  **Success Criteria**: Every object-typed field is annotated as REUSE (with verified name/address) or CREATE (with field draft). The full `data` payload skeleton is now populated with placeholders.
102
102
 
@@ -114,8 +114,8 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
114
114
  - Custom indices must be ≥ 1000 (0–999 reserved). What indices does your Permission define?
115
115
 
116
116
  **Tool Calls**:
117
- 1. `query_toolkit` `onchain_objects` (filter type=Permission) — list candidates for reuse.
118
- 2. `wowok_buildin_info` `info: "built-in permissions"` — confirm which 0–999 indices are protocol-reserved so the user doesn't try to claim one.
117
+ 1. `wowok({ tool: "query_toolkit", data: { query_type: "onchain_objects", filter: { type: "Permission" } } })` — list candidates for reuse.
118
+ 2. `wowok({ tool: "wowok_buildin_info", data: { info: "built-in permissions" } })` — confirm which 0–999 indices are protocol-reserved so the user doesn't try to claim one.
119
119
 
120
120
  **Success Criteria**: Every `permissionIndex` value exists in the chosen Permission; every `namedOperator` is either `""` (order owner/agents) or a role name the user explicitly defined.
121
121
 
@@ -133,8 +133,8 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
133
133
  - Do you have that data ready, or do we collect it in R8?
134
134
 
135
135
  **Tool Calls**:
136
- 1. `guard2file` → export every Guard the operation will hit — inspect `table` entries with `b_submission: true` to know what the prompt will ask.
137
- 2. `wowok_buildin_info` `info: "guard instructions"` — confirm any `query` node's instruction ID and parameter count.
136
+ 1. `wowok({ tool: "guard2file", data: { ... } })` → export every Guard the operation will hit — inspect `table` entries with `b_submission: true` to know what the prompt will ask.
137
+ 2. `wowok({ tool: "wowok_buildin_info", data: { info: "guard instructions" } })` — confirm any `query` node's instruction ID and parameter count.
138
138
 
139
139
  **Success Criteria**: AI can enumerate the exact submission fields the user will be prompted for, and the user has confirmed they can provide each.
140
140
 
@@ -151,12 +151,12 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
151
151
  - (If the call has no Guard) Confirm the full execution, since this is the only shot.
152
152
 
153
153
  **Tool Calls**:
154
- 1. `onchain_operations` (or other write tool) with the full `data` and `env`, omitting `submission`.
154
+ 1. `wowok({ tool: "onchain_operations", data: { operation_type: "<type>", data: {<full payload>}, env: {<env block>}, /* omit submission */ } })` with the full payload, omitting `submission`.
155
155
  2. Capture the response: either success (no Guard) or a structured submission prompt.
156
156
 
157
157
  **Success Criteria**: Either the operation succeeds (no Guard involved) OR a structured submission prompt is returned and parsed.
158
158
 
159
- **Fallback**: Call reverts with a gas error → re-faucet (R4 fallback), retry. Call reverts with "object not found" despite just creating it → set `env.no_cache: true` and retry (stale-cache trap from §Error Patterns). Schema validation error → re-read the schema via `schema_query`, fix the field, retry.
159
+ **Fallback**: Call reverts with a gas error → re-faucet (R4 fallback), retry. Call reverts with "object not found" despite just creating it → set `env.no_cache: true` and retry (stale-cache trap from §Error Patterns). Schema validation error → the response includes `schema.input`; read it, fix the field, retry. Or use `wowok({ tool: "schema_query", data: { action: "get", name: "..." } })` to re-read the schema.
160
160
 
161
161
  **Checkpoint**: Persist `{ round: R8, phase: probe, response: success|prompt, prompt_fields?: [...] }`.
162
162
 
@@ -169,9 +169,9 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
169
169
  - (Verify) Want me to query the resulting object and show you the diff?
170
170
 
171
171
  **Tool Calls**:
172
- 1. (Phase 2) `onchain_operations` with the same `data` + `env` + `submission` populated.
173
- 2. (Verify) `query_toolkit` `onchain_objects` for the resulting object ID; `onchain_events` for the emitted event.
174
- 3. (Optional) `local_mark_operation` → tag the new object with a friendly name.
172
+ 1. (Phase 2) `wowok({ tool: "onchain_operations", data: { operation_type: "<type>", data: {<same payload>}, env: {<env>}, submission: {<collected answers>} } })` with `submission` populated.
173
+ 2. (Verify) `wowok({ tool: "query_toolkit", data: { query_type: "onchain_objects", ... } })` for the resulting object ID; `wowok({ tool: "onchain_events", data: { ... } })` for the emitted event.
174
+ 3. (Optional) `wowok({ tool: "local_mark_operation", data: { ... } })` → tag the new object with a friendly name.
175
175
 
176
176
  **Success Criteria**: Operation finalizes successfully; on-chain query confirms the expected state; local mark persisted for future reference.
177
177
 
@@ -204,28 +204,32 @@ A 10-round dialogue for the tool-selection journey: a user (or another Skill) ar
204
204
  ### D1: Tool Family by Operation Class
205
205
 
206
206
  ```
207
+ All calls via: wowok({ tool: "<sub-tool>", data: {<params>} })
208
+
207
209
  User intent
208
- ├── Write on-chain state? ──→ onchain_operations
210
+ ├── Write on-chain state? ──→ tool: "onchain_operations"
209
211
  │ ├── Generating a credential? ──→ operation_type: gen_passport (no data wrapper)
210
212
  │ ├── Transferring tokens? ──→ operation_type: payment (no submission)
211
213
  │ ├── Updating personal profile? ──→ operation_type: personal (no submission)
212
214
  │ └── Anything else? ──→ operation_type: service|machine|progress|guard|order|allocation|arbitration|treasury|reward|demand|contact|repository|permission (full wrapper)
213
- ├── Read on-chain state? ──→ query_toolkit OR onchain_table_data
214
- │ ├── Single object or simple list? ──→ query_toolkit
215
- │ ├── Dynamic table row? ──→ onchain_table_data (needs parent except entity_registrar / entity_linker)
216
- │ └── Historical events? ──→ onchain_events
217
- ├── Communicate? ──→ messenger_operation
218
- ├── Local-only? ──→ account_operation | local_mark_operation | local_info_operation
219
- ├── Export for review? ──→ guard2file | machineNode2file | wip_file (verify/wts2html)
220
- └── Discover schemas/instructions? ──→ schema_query | wowok_buildin_info
215
+ ├── Read on-chain state? ──→ tool: "query_toolkit" OR "onchain_table_data"
216
+ │ ├── Single object or simple list? ──→ tool: "query_toolkit"
217
+ │ ├── Dynamic table row? ──→ tool: "onchain_table_data" (needs parent except entity_registrar / entity_linker)
218
+ │ └── Historical events? ──→ tool: "onchain_events"
219
+ ├── Communicate? ──→ tool: "messenger_operation"
220
+ ├── Local-only? ──→ tool: "account_operation" | "local_mark_operation" | "local_info_operation"
221
+ ├── Export for review? ──→ tool: "guard2file" | "machineNode2file" | "wip_file" (verify/wts2html)
222
+ └── Discover schemas/instructions? ──→ tool: "schema_query" | "wowok_buildin_info"
221
223
  ```
222
224
 
223
225
  ### D2: CREATE vs MODIFY (per object-typed field)
224
226
 
225
227
  ```
228
+ All calls via: wowok({ tool: "<sub-tool>", data: {<params>} })
229
+
226
230
  For each field whose value could be a string OR an object:
227
231
  ├── User said "reuse <name>" or gave 0x address? ──→ REUSE
228
- │ ├── query_toolkit.onchain_objects verifies it resolves? ──→ use string value
232
+ │ ├── wowok({ tool: "query_toolkit", data: { query_type: "onchain_objects" } }) verifies it resolves? ──→ use string value
229
233
  │ └── Does not resolve? ──→ ask: typo, or did you mean CREATE?
230
234
  ├── User said "create new" with details? ──→ CREATE (object shape)
231
235
  ├── User unsure? ──→ query on-chain candidates, present list, let user pick or create
@@ -235,7 +239,7 @@ For each field whose value could be a string OR an object:
235
239
  ### D3: Submission Loop Branch
236
240
 
237
241
  ```
238
- About to call onchain_operations:
242
+ About to call wowok({ tool: "onchain_operations", data: { ... } }):
239
243
  ├── Branch is gen_passport, payment, or personal? ──→ ONE-SHOT (no submission field)
240
244
  ├── Branch has submission in schema?
241
245
  │ ├── Call WITHOUT submission first ──→ SDK returns prompt? ──→ collect answers, re-call WITH submission
@@ -246,11 +250,11 @@ About to call onchain_operations:
246
250
  ### D4: Error Recovery Routing
247
251
 
248
252
  ```
249
- Tool call returned error:
250
- ├── Gas / insufficient balance? ──→ query_toolkit.account_balance → faucet or transfer → retry
253
+ wowok() call returned error:
254
+ ├── Gas / insufficient balance? ──→ wowok({ tool: "query_toolkit", data: { query_type: "account_balance" } }) → faucet or transfer → retry
251
255
  ├── "Object not found" right after create? ──→ env.no_cache: true → retry (stale cache)
252
- ├── Guard validation failure? ──→ guard2file export → inspect logic tree → fix submission → retry
253
- ├── Schema validation error? ──→ schema_query.get for the branchdiff against payload fix retry
256
+ ├── Guard validation failure? ──→ wowok({ tool: "guard2file", data: { ... } }) export → inspect logic tree → fix submission → retry
257
+ ├── Schema validation error (result.status = "schema_mismatch")? ──→ read schema.input from response fix retry. Or wowok({ tool: "schema_query", data: { action: "get" } }) for full schema.
254
258
  ├── Permission denied? ──→ query Permission object → verify caller's index → add index or switch account
255
259
  ├── "machine not published" on service.publish? ──→ publish Machine first, then retry Service publish
256
260
  └── Network timeout? ──→ retry once; if persists, switch network or escalate
@@ -259,12 +263,14 @@ Tool call returned error:
259
263
  ### D5: Handoff Next-Action
260
264
 
261
265
  ```
266
+ All calls via: wowok({ tool: "<sub-tool>", data: {<params>} })
267
+
262
268
  Just-completed operation:
263
269
  ├── service CREATE ──→ next: machine CREATE (Service needs a Machine before publish)
264
270
  ├── machine CREATE ──→ next: guard CREATE × N (Guards must exist before binding)
265
271
  ├── guard CREATE ──→ next: gen_passport test (verify logic before binding)
266
- ├── service publish ──→ next: query_toolkit.onchain_objects verify bPublished=true
267
- ├── query Service ──→ next (if user wants contact): messenger_operation
272
+ ├── service publish ──→ next: wowok({ tool: "query_toolkit", data: { query_type: "onchain_objects" } }) verify bPublished=true
273
+ ├── query Service ──→ next (if user wants contact): wowok({ tool: "messenger_operation", data: { ... } })
268
274
  ├── messenger WTS send ──→ next: arbitration.dispute (evidence closed)
269
275
  ├── order.advance ──→ next: query allocation balance (verify fund flow)
270
276
  └── None of the above ──→ re-invoke R1 intent classification
@@ -276,17 +282,17 @@ Just-completed operation:
276
282
 
277
283
  ### F1: Schema List Returns Empty
278
284
 
279
- **Trigger**: `schema_query` `list` returns `[]` or throws "schemas not generated".
285
+ **Trigger**: `wowok({ tool: "schema_query", data: { action: "list" } })` returns `[]` or throws "schemas not generated".
280
286
 
281
287
  **Diagnosis**: The MCP server's schema files were not generated at deploy time. This is a deployment gap, not a usage error.
282
288
 
283
289
  **Recovery**:
284
290
  1. Surface the issue to the user plainly: "The schema files are missing on the server side."
285
- 2. Instruct running `npm run generate:schemas` on the MCP server host (per tool #13 in §The 13 Tools).
291
+ 2. Instruct running `npm run generate:schemas` on the MCP server host (per §The 17 Sub-Tools, sub-tool #13).
286
292
  3. While waiting, fall back to the field shapes documented in this Skill and in [wowok-safety](../wowok-safety/SKILL.md) — they are authoritative even without the generated schema.
287
- 4. After regeneration, re-run `schema_query.list` to confirm.
293
+ 4. After regeneration, re-run `wowok({ tool: "schema_query", data: { action: "list" } })` to confirm.
288
294
 
289
- **Prevention**: Add a `schema_query.list` health check at the start of every fresh session. If empty, fail fast and surface the deploy issue before any write attempt.
295
+ **Prevention**: Add a `wowok({ tool: "schema_query", data: { action: "list" } })` health check at the start of every fresh session. If empty, fail fast and surface the deploy issue before any write attempt.
290
296
 
291
297
  ### F2: Stale Cache After Sequential Creates
292
298
 
@@ -296,14 +302,14 @@ Just-completed operation:
296
302
 
297
303
  **Recovery**:
298
304
  1. Retry operation B with `env.no_cache: true`.
299
- 2. If still failing, query the object directly via `query_toolkit` `onchain_objects` with `no_cache: true` to confirm it actually exists on-chain.
305
+ 2. If still failing, query the object directly via `wowok({ tool: "query_toolkit", data: { query_type: "onchain_objects", no_cache: true, ... } })` to confirm it actually exists on-chain.
300
306
  3. If on-chain confirms existence, retry B once more with `no_cache: true`.
301
307
 
302
308
  **Prevention**: When building multiple interdependent objects in one session (the common case in onboarding), set `env.no_cache: true` on EVERY operation from the start. The minor latency cost is far cheaper than debugging stale-cache failures mid-flow.
303
309
 
304
310
  ### F3: Submission Loop Misuse
305
311
 
306
- **Trigger**: User (or AI) calls `onchain_operations` with `submission` populated on the first try, and the call either reverts or silently accepts wrong data.
312
+ **Trigger**: User (or AI) calls `wowok({ tool: "onchain_operations", data: { ..., submission: {...} } })` with `submission` populated on the first try, and the call either reverts or silently accepts wrong data.
307
313
 
308
314
  **Diagnosis**: The two-phase pattern was skipped. Either the AI guessed the submission fields, or the user pasted a submission from a previous unrelated call.
309
315
 
@@ -317,14 +323,14 @@ Just-completed operation:
317
323
 
318
324
  ### F4: Guard creation fails with type mismatch
319
325
 
320
- **Trigger**: `onchain_operations` `operation_type: "guard"` CREATE reverts with a type-validation error (e.g., `logic_equal` received String vs U64).
326
+ **Trigger**: `wowok({ tool: "onchain_operations", data: { operation_type: "guard", ... } })` CREATE reverts with a type-validation error (e.g., `logic_equal` received String vs U64).
321
327
 
322
328
  **Diagnosis**: The computational tree has a type incompatibility that the schema-layer validation caught. Common variants: comparing across numeric widths without `logic_as_u256_*`, missing `convert_witness` when querying Progress from an Order, or a `query` node with the wrong parameter count.
323
329
 
324
330
  **Recovery**:
325
331
  1. Inspect the error message — it usually names the offending node and the expected vs actual types.
326
- 2. Cross-reference `wowok_buildin_info` `info: "value types"` to confirm numeric codes.
327
- 3. Cross-reference `wowok_buildin_info` `info: "guard instructions"` to confirm the `query` node's instruction ID and parameter count.
332
+ 2. Cross-reference `wowok({ tool: "wowok_buildin_info", data: { info: "value types" } })` to confirm numeric codes.
333
+ 3. Cross-reference `wowok({ tool: "wowok_buildin_info", data: { info: "guard instructions" } })` to confirm the `query` node's instruction ID and parameter count.
328
334
  4. Fix the tree, re-attempt CREATE. Guards are CREATE-only — there is no MODIFY, so a failed CREATE simply retries.
329
335
 
330
336
  **Prevention**: Before any Guard CREATE, mentally (or via a scratch file) walk the tree: every `identifier` index exists in the table; every comparison node receives compatible operand types; every `query` node's parameter count matches the instruction. The §Guard Best Practices traps 1–4 catch 90% of pre-flight issues.
@@ -336,24 +342,24 @@ Just-completed operation:
336
342
  **Diagnosis**: The operating account lacks the required `permissionIndex` in the governing Permission object, OR the Forward's `namedOperator` doesn't match the caller's role.
337
343
 
338
344
  **Recovery**:
339
- 1. `query_toolkit` `onchain_objects` for the governing Permission — list its indices.
345
+ 1. `wowok({ tool: "query_toolkit", data: { query_type: "onchain_objects", filter: { type: "Permission" } } })` for the governing Permission — list its indices.
340
346
  2. Cross-reference the operation's required index (from the schema or the Machine Forward definition).
341
- 3. Either: switch to an account that holds the index, OR have the Permission owner add the index for the current account, OR (if Forward uses `namedOperator`) assign the role via `progress` MODIFY.
347
+ 3. Either: switch to an account that holds the index, OR have the Permission owner add the index for the current account, OR (if Forward uses `namedOperator`) assign the role via `wowok({ tool: "onchain_operations", data: { operation_type: "progress", ... } })` MODIFY.
342
348
 
343
349
  **Prevention**: During onboarding R6 (Permission resolution), record the full index→role map in the checkpoint. Before any operation, verify the caller's account holds the required index — this is a 1-query pre-flight that prevents 100% of permission-denied failures.
344
350
 
345
351
  ### F6: Faucet Exhausted on Testnet
346
352
 
347
- **Trigger**: `account_operation` `faucet` returns rate-limit or timeout.
353
+ **Trigger**: `wowok({ tool: "account_operation", data: { faucet: { ... } } })` returns rate-limit or timeout.
348
354
 
349
355
  **Diagnosis**: Testnet faucet has per-account and per-IP rate limits. Common during onboarding loops with many test orders.
350
356
 
351
357
  **Recovery**:
352
358
  1. Wait 60 seconds and retry once.
353
- 2. If still failing, `account_operation` `transfer` 1 WOW (10^9 base units) from another funded account the user owns.
359
+ 2. If still failing, `wowok({ tool: "account_operation", data: { transfer: { amount: 1000000000, ... } } })` 1 WOW (10^9 base units) from another funded account the user owns.
354
360
  3. If no other account exists, surface the issue and pause — do not silently reduce example amounts (per §Mainnet operations, this rule applies to mainnet too).
355
361
 
356
- **Prevention**: Pre-fund each new account with 5+ WOW at creation time via a single `transfer` from a treasury account, rather than relying on faucet per-operation. Track each account's balance in `local_info_operation` and proactively top up below 1 WOW threshold.
362
+ **Prevention**: Pre-fund each new account with 5+ WOW at creation time via a single `transfer` from a treasury account, rather than relying on faucet per-operation. Track each account's balance in `wowok({ tool: "local_info_operation", data: { ... } })` and proactively top up below 1 WOW threshold.
357
363
 
358
364
  ---
359
365
 
@@ -361,28 +367,28 @@ Just-completed operation:
361
367
 
362
368
  ### Novice Tier — Tool Discovery Path
363
369
 
364
- - Always start with `query_toolkit` `local_names` to ground the conversation in objects the user already knows.
365
- - Use the §Decision Tree D1 (Tool Family by Operation Class) as a rigid router — do not let the user invoke tools by raw name until they've classified their intent.
366
- - For every `onchain_operations` call, follow the full R1-R10 sequence: classify → select → wrap → env → CREATE/MODIFY → permission → submission prep → probe → submit → handoff.
370
+ - Always start with `wowok({ tool: "query_toolkit", data: { query_type: "local_names" } })` to ground the conversation in objects the user already knows.
371
+ - Use the §Decision Tree D1 (Tool Family by Operation Class) as a rigid router — do not let the user invoke sub-tools by raw name until they've classified their intent.
372
+ - For every `wowok({ tool: "onchain_operations", data: { ... } })` call, follow the full R1-R10 sequence: classify → select → wrap → env → CREATE/MODIFY → permission → submission prep → probe → submit → handoff.
367
373
  - The two-phase submission loop is non-negotiable: never pre-fill `submission`.
368
374
  - Always set `env.no_cache: true` when building multiple objects in one session.
369
- - After every write, verify via `query_toolkit` `onchain_objects` before declaring success.
370
- - Trigger: user is new, or any time the AI is unsure which tool fits.
375
+ - After every write, verify via `wowok({ tool: "query_toolkit", data: { query_type: "onchain_objects" } })` before declaring success.
376
+ - Trigger: user is new, or any time the AI is unsure which sub-tool fits.
371
377
 
372
378
  ### Advanced Tier — Direct Tool Invocation
373
379
 
374
- - User invokes tools by name (e.g., "call `onchain_operations` with `operation_type: machine`"); AI provides the parameter shape and verifies, but does not re-classify intent from scratch.
380
+ - User invokes sub-tools by name (e.g., "call `wowok({ tool: 'onchain_operations', data: { operation_type: 'machine' } })`"); AI provides the parameter shape and verifies, but does not re-classify intent from scratch.
375
381
  - The R1-R3 rounds can be collapsed into a single confirmation: "You want `<tool>` + `<operation_type>`. Confirm?"
376
382
  - `env.no_cache` is set selectively — only on operations known to depend on just-created objects.
377
- - Submission loop is still two-phase, but the AI pre-fetches the Guard's expected submissions via `guard2file` in parallel with R8's probe call, so R9 is faster.
383
+ - Submission loop is still two-phase, but the AI pre-fetches the Guard's expected submissions via `wowok({ tool: "guard2file", data: { ... } })` in parallel with R8's probe call, so R9 is faster.
378
384
  - Handoff next-actions are surfaced as suggestions, not enforced.
379
385
  - Trigger: user says "I know what I'm doing" or has completed prior sessions.
380
386
 
381
387
  ### Expert Tier — Raw Schema & Edge Cases
382
388
 
383
- - User reads schemas directly via `schema_query` and constructs payloads by hand; AI's role is to catch schema-inexpressible traps (the three wrapper exceptions, first-Guard-wins ordering, convert_witness type rules) rather than to route.
389
+ - User reads schemas directly via `wowok({ tool: "schema_query", data: { action: "get", name: "..." } })` and constructs payloads by hand; AI's role is to catch schema-inexpressible traps (the three wrapper exceptions, first-Guard-wins ordering, convert_witness type rules) rather than to route.
384
390
  - R1-R7 are skipped; AI engages at R8 (execute) and R10 (handoff).
385
391
  - The §Common Pitfalls table and §Structural Wrapper Rules become the primary reference, not the decision trees.
386
- - Expert users may compose multiple tool calls in a single transaction batch (where the SDK supports it) — AI verifies dependency ordering but does not serialize.
387
- - Expert users may use `gen_passport` as a standalone credential issuer (off-chain verification use case), not just as a Guard test — AI supports this path directly.
388
- - Trigger: user explicitly asks for "expert mode", references tools by raw name with parameters, or invokes `schema_query` themselves.
392
+ - Expert users may compose multiple `wowok` calls in a single transaction batch (where the SDK supports it) — AI verifies dependency ordering but does not serialize.
393
+ - Expert users may use `wowok({ tool: "onchain_operations", data: { operation_type: "gen_passport", ... } })` as a standalone credential issuer (off-chain verification use case), not just as a Guard test — AI supports this path directly.
394
+ - Trigger: user explicitly asks for "expert mode", references sub-tools by raw name with parameters, or invokes `wowok({ tool: "schema_query", data: { ... } })` themselves.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: wowok-tools
3
3
  description: |
4
- WoWok MCP tool reference — canonical documentation for all 13 MCP tools.
5
- Covers schema-inexpressible constraints, business rules, interaction patterns,
6
- and design decisions not captured by JSON Schema.
4
+ WoWok MCP tool reference — canonical documentation for the single unified
5
+ `wowok` tool and its 17 sub-tools. Covers schema-inexpressible constraints,
6
+ business rules, interaction patterns, and design decisions not captured by
7
+ JSON Schema.
7
8
 
8
9
  Core value: prevent common AI failures (wrong tool selection, incorrect
9
10
  parameter formats, missing structural wrappers, wrong discriminated unions).
@@ -17,13 +18,36 @@ always: true
17
18
 
18
19
  # WoWok MCP Tool Reference
19
20
 
20
- Canonical reference for all 13 MCP tools. Covers patterns, constraints, and design decisions that **JSON Schema cannot express**. For detailed business workflows, see the Domain and Business Skills below.
21
+ Canonical reference for the single unified `wowok` tool and its 17 sub-tools. Covers patterns, constraints, and design decisions that **JSON Schema cannot express**. For detailed business workflows, see the Domain and Business Skills below.
21
22
 
22
23
  > **Domain Skills**: [wowok-guard](../wowok-guard/SKILL.md) (validation logic), [wowok-messenger](../wowok-messenger/SKILL.md) (encrypted messaging), [wowok-machine](../wowok-machine/SKILL.md) (workflows), [wowok-safety](../wowok-safety/SKILL.md) (safety & naming)
23
24
  > **Business Skills**: [wowok-order](../wowok-order/SKILL.md) (customer), [wowok-provider](../wowok-provider/SKILL.md) (merchant), [wowok-arbitrator](../wowok-arbitrator/SKILL.md) (dispute resolution)
24
25
 
25
26
  ---
26
27
 
28
+ ## Single-Tool Interface (Schema-Gated Execution)
29
+
30
+ MCP `tools/list` returns **only one tool**: `wowok`. All operations go through it.
31
+
32
+ **Call pattern**: `wowok({ tool: "<sub-tool-name>", data: {<sub-tool params>} })`
33
+
34
+ When any skill (including this one) says "Call `onchain_operations`" or "Use `schema_query`", translate it to:
35
+ ```
36
+ wowok({ tool: "onchain_operations", data: { operation_type: "service", ... } })
37
+ wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations" } })
38
+ ```
39
+
40
+ **Schema-gated execution**: If `data` doesn't match the sub-tool's schema, the response includes:
41
+ - `result.status = "schema_mismatch"` — validation failed
42
+ - `result.errors` — specific field errors
43
+ - `result.hint` — instructions to fix and retry
44
+ - `schema.input` — the correct JSON schema for the sub-tool
45
+ - `schema.tool` — which sub-tool this schema belongs to
46
+
47
+ **Schema caching**: Each sub-tool has a different schema. When you receive a schema in a mismatch response, cache it in your context for future calls to the same sub-tool. You should only need to see each sub-tool's schema once per conversation.
48
+
49
+ ---
50
+
27
51
  ## 🔴 Gas and Faucet
28
52
 
29
53
  On-chain operations require gas. Transactions will fail if the account has insufficient balance.
@@ -32,15 +56,15 @@ On-chain operations require gas. Transactions will fail if the account has insuf
32
56
 
33
57
  When assisting users with WoWok operations:
34
58
 
35
- - After a user creates a new account, proactively call `account_operation` `faucet` to claim test tokens on their behalf
36
- - Before starting any on-chain workflow, check balance via `query_toolkit` `account_balance`
59
+ - After a user creates a new account, proactively call `wowok({ tool: "account_operation", data: { faucet: { ... } } })` to claim test tokens
60
+ - Before starting any on-chain workflow, check balance via `wowok({ tool: "query_toolkit", data: { query_type: "account_balance", ... } })`
37
61
  - If balance is below 1 WOW, automatically request faucet without asking the user
38
62
  - If a transaction fails due to gas, retry after claiming more tokens
39
63
 
40
64
  ### Tool Reference
41
65
 
42
- - **Claim tokens**: `account_operation` `faucet` (not `onchain_operations`)
43
- - **Check balance**: `query_toolkit` `account_balance`
66
+ - **Claim tokens**: `wowok({ tool: "account_operation", data: { faucet: { ... } } })` (not `onchain_operations`)
67
+ - **Check balance**: `wowok({ tool: "query_toolkit", data: { query_type: "account_balance", ... } })`
44
68
 
45
69
  Each faucet claim provides approximately 5 WOW, sufficient for dozens of transactions.
46
70
 
@@ -118,11 +142,11 @@ Step 3: MODIFY reward { object: "reward_v1", guard_add: [...] } // bind guard
118
142
 
119
143
  ---
120
144
 
121
- ## The 13 Tools
145
+ ## The 17 Sub-Tools (all via `wowok({ tool, data })`)
122
146
 
123
147
  ### 1. `onchain_operations` — 16 Sub-Types
124
148
 
125
- > **Schema**: `schema_query({ name: "onchain_operations" })` for the full discriminated union. Per-type schemas: `onchain_operations_service`, `onchain_operations_machine`, etc.
149
+ > **Schema**: `wowok({ tool: "schema_query", data: { action: "get", name: "onchain_operations" } })` for the full discriminated union. Per-type schemas: `onchain_operations_service`, `onchain_operations_machine`, etc.
126
150
 
127
151
  | `operation_type` | Schema-Inexpressible Constraints |
128
152
  |-----------------|----------------------------------|
@@ -208,16 +232,18 @@ Max 50 contents/entry, 300 chars each.
208
232
  ## Decision Tree
209
233
 
210
234
  ```
211
- Write state? onchain_operations (choose operation_type)
235
+ All calls via: wowok({ tool: "<sub-tool>", data: {<params>} })
236
+
237
+ Write state? → tool: "onchain_operations" (choose operation_type in data)
212
238
  ├── No data wrapper? → only gen_passport
213
239
  ├── No submission? → only payment, personal
214
240
  └── String (MODIFY) vs Object (CREATE)? → safety §1.1
215
241
 
216
- Read state? → query_toolkit / onchain_table_data
217
- Communicate? → messenger_operation (encrypted)
218
- Local only? → account_operation / local_mark_operation / local_info_operation
219
- Export? → guard2file / machineNode2file
220
- Discover? → schema_query / wowok_buildin_info / onchain_events
242
+ Read state? → tool: "query_toolkit" / "onchain_table_data"
243
+ Communicate? → tool: "messenger_operation" (encrypted)
244
+ Local only? → tool: "account_operation" / "local_mark_operation" / "local_info_operation"
245
+ Export? → tool: "guard2file" / "machineNode2file"
246
+ Discover? → tool: "schema_query" / "wowok_buildin_info" / "onchain_events"
221
247
  ```
222
248
 
223
249
  ---
@@ -266,9 +292,11 @@ When explaining a specific technique to users, reference where it appears:
266
292
 
267
293
  | Trap | Fix |
268
294
  |------|-----|
295
+ | **Calling sub-tool name directly** | MCP only exposes `wowok`. Use `wowok({ tool: "onchain_operations", data: {...} })`, not `onchain_operations({...})` |
296
+ | **Schema validation error** | The response includes `schema.input` — read it, fix params, retry. Cache the schema for future calls to the same sub-tool. |
269
297
  | **Transaction fails, gas error** | → [Pre-Flight: Gas & Faucet](#pre-flight-gas--faucet). AI should auto-check balance + faucet. |
270
298
  | **Don't know how to build a service** | → [Examples Reference](#examples-reference). Match user intent → example, extract JSON templates. |
271
- | `gen_passport` called as standalone tool | It's not — use `onchain_operations` with `operation_type: "gen_passport"` |
299
+ | `gen_passport` called as standalone tool | It's not — use `wowok({ tool: "onchain_operations", data: { operation_type: "gen_passport", ... } })` |
272
300
  | Missing `data` wrapper | Only `gen_passport` omits it; `payment`/`personal` omit `submission` |
273
301
  | String `object` passed expecting CREATE | String = existing (MODIFY), Object = new (CREATE) → [safety §1.1](../wowok-safety/SKILL.md) |
274
302
  | Missing `submission` on Guard call | See [Submission Loop](#submission-loop-two-phase) — two-phase pattern: call without `submission` first, collect data, re-call with it |