@wowok/skills 2.2.1 → 2.2.3

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.
@@ -18,7 +18,7 @@ This example sets `env.confirmed: true` on irreversible operations (e.g., `publi
18
18
  1. **Phase 1 — Preview**: Call the tool **without** `env.confirmed`. The server returns `{ status: "pending_confirmation", confirmation_text: "..." }` containing the full operation summary, risk assessment, and irreversible-action warnings.
19
19
  2. **Phase 2 — Confirm**: Review `confirmation_text` with the user. Only after explicit user approval, call the tool again **with** `env.confirmed: true` to actually execute the on-chain transaction.
20
20
 
21
- > Skipping Phase 1 means the user never sees the risk summary before gas is spent. Always preview first, then confirm. This is especially critical for the two `publish: true` steps in this doc: the Machine publish (**Step 3**), which irreversibly locks the workflow definition (`nodes`/`pairs`/`forwards`), and the Service publish (**Step 10**), which irreversibly locks the `machine` and `order_allocators` fields.
21
+ > Skipping Phase 1 means the user never sees the risk summary before gas is spent. Always preview first, then confirm. This is especially critical for the two `publish: true` steps in this doc: the Machine publish (**Step 3**), which irreversibly locks the workflow definition (`nodes`/`pairs`/`forwards`), and the Service publish (**Step 11**), which irreversibly locks the `machine` and `order_allocators` fields.
22
22
 
23
23
  > **💡 Call Format**: All WoWok operations go through a single unified `wowok` tool. The AI calls `wowok({ tool: "<sub-tool>", data: {<params>} })`. If parameters don't match the schema, the response includes the correct schema for self-correction. See [Response Format](../../docs/response-format.md) for details.
24
24
  >
@@ -719,7 +719,70 @@ Create a Treasury object to aggregate signature service revenue (public funds fo
719
719
 
720
720
  ---
721
721
 
722
- ## Step 8: Create Allocator Guard
722
+ ## Step 8: Create Contact Object (Customer-Service Channel)
723
+
724
+ Create a Contact object to serve as the Service's encrypted customer-service channel. **Whenever `customer_required` is set (e.g. phone/email/shipping address), a Contact MUST be bound via the `um` field** — the customer's private information is delivered exclusively through end-to-end encrypted Messenger, which routes messages to the Contact bound as `um`. Without `um`, there is no channel to receive the customer's privacy-sensitive input and the SDK blocks the call with an invalid parameter error. The Contact uses the same Permission as the Service (`three_body_permission`) for unified governance.
725
+
726
+ **Request**:
727
+ ```json
728
+ {
729
+ "tool": "onchain_operations",
730
+ "data": {
731
+ "operation_type": "contact",
732
+ "data": {
733
+ "object": {
734
+ "name": "three_body_contact",
735
+ "permission": "three_body_permission",
736
+ "replaceExistName": true
737
+ },
738
+ "description": "Contact for Three-Body signature service customer info — end-to-end encrypted Messenger channel for delivery of phone/email/shipping_address collected via customer_required."
739
+ },
740
+ "env": {
741
+ "account": "three_body_author",
742
+ "network": "testnet",
743
+ "confirmed": true
744
+ }
745
+ }
746
+ }
747
+ ```
748
+
749
+ > **Why a Contact is required with customer_required (SDK-enforced hard linkage)**:
750
+ > - `customer_required` tells the order flow which private-info labels to collect from the buyer (phone, email, shipping_address, etc.)
751
+ > - Those labels are delivered to the merchant ONLY through the end-to-end encrypted Messenger protocol
752
+ > - Messenger routes messages to the Service's bound Contact object (the `um` field)
753
+ > - Without `um`, the collected private information would be silently dropped — there is no other delivery path
754
+ > - The SDK's `checkCustomerRequiredNeedsUm()` validator in `service.ts` (L1226) runs on EVERY service operation that touches `customer_required` AND on `publish: true`, so the constraint cannot be bypassed by splitting into two calls
755
+
756
+ > **Important**: `env.confirmed: true` is required because `replaceExistName: true` triggers a confirmation prompt.
757
+
758
+ **Expected Result**:
759
+ ```json
760
+ {
761
+ "result": {
762
+ "status": "success",
763
+ "data": {
764
+ "result": {
765
+ "type": "transaction",
766
+ "objectChanges": [
767
+ {
768
+ "type": "Contact",
769
+ "type_raw": "0x2::contact::Contact",
770
+ "object": "0x...",
771
+ "version": "...",
772
+ "owner": {"Shared": {"initial_shared_version": "..."}},
773
+ "change": "created"
774
+ }
775
+ ]
776
+ }
777
+ }
778
+ },
779
+ "schema": null
780
+ }
781
+ ```
782
+
783
+ ---
784
+
785
+ ## Step 9: Create Allocator Guard
723
786
 
724
787
  Create a dedicated Guard for the order allocator that verifies the order belongs to this service. This is a **Level 3 scene-combined** Guard: no Signer binding is needed because the allocator uses `sharing.who=Entity(three_body_treasury)` — funds always flow to the fixed Treasury regardless of who triggers the allocation.
725
788
 
@@ -819,9 +882,9 @@ order.service == three_body_signature_service
819
882
 
820
883
  ---
821
884
 
822
- ## Step 9: Configure Order Allocators
885
+ ## Step 10: Configure Order Allocators
823
886
 
824
- Set up fund allocation: 100% to the author's Treasury upon order completion.
887
+ Set up fund allocation: 100% to the author's Treasury upon order completion. Also bind the Contact (Step 8) as `um` to enable the `customer_required` private-info delivery channel — the SDK blocks `customer_required` without a matching `um` (see Step 8 for the rationale).
825
888
 
826
889
  **Request**:
827
890
  ```json
@@ -849,7 +912,8 @@ Set up fund allocation: 100% to the author's Treasury upon order completion.
849
912
  }
850
913
  ]
851
914
  },
852
- "customer_required": ["phone", "email", "shipping_address"]
915
+ "customer_required": ["phone", "email", "shipping_address"],
916
+ "um": "three_body_contact"
853
917
  },
854
918
  "env": {
855
919
  "account": "three_body_author",
@@ -860,9 +924,10 @@ Set up fund allocation: 100% to the author's Treasury upon order completion.
860
924
  ```
861
925
 
862
926
  > **⚠️ Risk Elimination — Why this configuration is safe**:
863
- > - **R-C3-05 (Cross-service theft)**: Eliminated by `three_body_allocator_guard` (Step 8), which verifies `order.service == three_body_signature_service` before allocation proceeds.
927
+ > - **R-C3-05 (Cross-service theft)**: Eliminated by `three_body_allocator_guard` (Step 9), which verifies `order.service == three_body_signature_service` before allocation proceeds.
864
928
  > - **R-C3-06 (Fund theft via Signer)**: Eliminated by `sharing.who = {"Entity": {"name_or_address": "three_body_treasury"}}` — funds always flow to the fixed Treasury address regardless of who triggers the allocation. An attacker cannot redirect funds to themselves even if they somehow bypass the Guard.
865
929
  > - **Previous unsafe pattern (DO NOT USE)**: The original design used `guard: "three_body_buy_guard"` (no `order.service` check) with `sharing.who = {"Signer": "signer"}` — this allowed anyone to trigger allocation of any order's funds to themselves.
930
+ > - **SDK-enforced constraint (customer_required ⟶ um)**: `"customer_required"` is set alongside `"um": "three_body_contact"` in the SAME call. The SDK validator `checkCustomerRequiredNeedsUm()` in `service.ts` L1226 also runs on publish (L314), so splitting into two calls (e.g. `customer_required` now, `um` later) would still fail at publish time — they are both required before the Service goes live.
866
931
 
867
932
  **Expected Result**:
868
933
  ```json
@@ -891,7 +956,7 @@ Set up fund allocation: 100% to the author's Treasury upon order completion.
891
956
 
892
957
  ---
893
958
 
894
- ## Step 10: Add Sales and Publish Service
959
+ ## Step 11: Add Sales and Publish Service
895
960
 
896
961
  Add sales items and publish the service to make it available for orders.
897
962
 
@@ -956,7 +1021,7 @@ Add sales items and publish the service to make it available for orders.
956
1021
 
957
1022
  ---
958
1023
 
959
- ## Step 11: Unpause Service
1024
+ ## Step 12: Unpause Service
960
1025
 
961
1026
  Unpause the service to allow order creation.
962
1027
 
@@ -1005,7 +1070,7 @@ Unpause the service to allow order creation.
1005
1070
 
1006
1071
  ---
1007
1072
 
1008
- ## Step 12: Verify Service Configuration
1073
+ ## Step 13: Verify Service Configuration
1009
1074
 
1010
1075
  Query the service to verify all configurations.
1011
1076
 
@@ -1080,7 +1145,7 @@ Query the service to verify all configurations.
1080
1145
  ]
1081
1146
  },
1082
1147
  "rewards": [],
1083
- "um": null,
1148
+ "um": "0x...",
1084
1149
  "permission": "0x...",
1085
1150
  "cache_expire": 1234567890,
1086
1151
  "query_name": "three_body_signature_service"
@@ -1095,9 +1160,10 @@ Query the service to verify all configurations.
1095
1160
  ```
1096
1161
 
1097
1162
  > **Field Reference**:
1098
- > - **`buy_guard`**, **`machine`**, **`permission`**: Return **on-chain object IDs** (not names). The on-chain data stores raw object IDs; resolving them back to local mark names requires a separate reverse lookup that is not performed by `onchain_objects` queries.
1163
+ > - **`buy_guard`**, **`machine`**, **`permission`**, **`um`**: Return **on-chain object IDs** (not names). The on-chain data stores raw object IDs; resolving them back to local mark names requires a separate reverse lookup that is not performed by `onchain_objects` queries.
1099
1164
  > - **`query_name`**: The original name string passed in the query request (here, `"three_body_signature_service"`). This is automatically populated by the SDK from the input `objects` array, so you can identify which queried name corresponds to which returned object.
1100
- > - **`order_allocators.allocators[].guard`**: Returns the on-chain object ID of `three_body_allocator_guard` (created in Step 8). This Guard verifies `order.service == three_body_signature_service` (R-C3-05 protection).
1165
+ > - **`um`**: The on-chain object ID of `three_body_contact` (created in Step 8). The SDK validator `checkCustomerRequiredNeedsUm()` requires this whenever `customer_required` is non-empty — without a Contact the Service has no encrypted channel to receive customer private info.
1166
+ > - **`order_allocators.allocators[].guard`**: Returns the on-chain object ID of `three_body_allocator_guard` (created in Step 9). This Guard verifies `order.service == three_body_signature_service` (R-C3-05 protection).
1101
1167
  > - **`order_allocators.allocators[].sharing[].who`**: `{"Entity": "0x..."}` indicates funds flow to the fixed Treasury object (`three_body_treasury` from Step 7). The address is the Treasury's on-chain object ID. This eliminates R-C3-06 (fund theft via Signer) because the recipient is fixed regardless of caller.
1102
1168
  > - **`order_allocators.allocators[].sharing[].mode`**: `1` is the numeric enum for `Rate` mode (input accepts the string `"Rate"`, output returns the numeric `1`).
1103
1169
  > - **`order_allocators.allocators[].fix`** and **`max`**: Additional fields returned on-chain (default `"0"` and `null` respectively) that are not part of the input schema but are present in the on-chain data structure.
@@ -1154,7 +1220,7 @@ The author (`three_body_author`) should be able to purchase the service.
1154
1220
  }
1155
1221
  ```
1156
1222
 
1157
- > **Amount Format**: `"888WOW"` is the display format — the Fund Processing Layer converts it to `888000000000` smallest units (WOW has 9 decimals) before submission. The raw integer `888000000000` is equally valid. The order pays exactly the sale price set in Step 10.
1223
+ > **Amount Format**: `"888WOW"` is the display format — the Fund Processing Layer converts it to `888000000000` smallest units (WOW has 9 decimals) before submission. The raw integer `888000000000` is equally valid. The order pays exactly the sale price set in Step 11.
1158
1224
 
1159
1225
  **Expected Result**:
1160
1226
  ```json
@@ -1435,7 +1501,7 @@ The author completes the signature.
1435
1501
 
1436
1502
  ### Fund Allocation: Release the 888 WOW Payment to the Treasury
1437
1503
 
1438
- Once the Progress reaches the final node (`Signature Completed`), the order is fulfilled and the 888 WOW payment held by `three_body_allocation` can be distributed. The Service's `order_allocators` (Step 9) routes 100% to `three_body_treasury` when `three_body_allocator_guard` (Step 8) verifies `order.service == three_body_signature_service`.
1504
+ Once the Progress reaches the final node (`Signature Completed`), the order is fulfilled and the 888 WOW payment held by `three_body_allocation` can be distributed. The Service's `order_allocators` (Step 10) routes 100% to `three_body_treasury` when `three_body_allocator_guard` (Step 9) verifies `order.service == three_body_signature_service`.
1439
1505
 
1440
1506
  #### (a) Trigger the Allocation (`alloc_by_guard`)
1441
1507
 
@@ -1690,6 +1756,7 @@ This example demonstrates:
1690
1756
  | Machine | three_body_machine |
1691
1757
  | Service | three_body_signature_service |
1692
1758
  | Treasury | three_body_treasury |
1759
+ | Contact (um) | three_body_contact (required for customer_required — SDK-enforced customer_required ⟶ um linkage) |
1693
1760
  | Allocator Guard | three_body_allocator_guard (Level 3 scene-combined, R-C3-05/R-C3-06 safe) |
1694
1761
  | Order | three_body_order |
1695
1762
  | Allocation | three_body_allocation |
@@ -1739,7 +1806,8 @@ Each node transition requires the author's confirmation, ensuring accountability
1739
1806
  - Service (unpublished)
1740
1807
  - Guards (Buy Guard for purchase control; Allocator Guard needs Service address for `order.service` verification)
1741
1808
  - Treasury (uses same Permission as Service for unified governance)
1742
- - Configure Service (add machine, buy_guard, order_allocators with allocator guard + Entity(Treasury))
1809
+ - Contact (um) — REQUIRED before setting customer_required (SDK-enforced: customer_required ⟶ um hard linkage; validator also re-runs at publish time)
1810
+ - Configure Service (add machine, buy_guard, order_allocators with allocator guard + Entity(Treasury); set customer_required **together with** um in the same or prior call)
1743
1811
  - Publish Service (LAST - once published, many changes are blocked)
1744
1812
 
1745
1813
  3. **Treasury-First Fund Flow**: Always route merchant revenue through a Treasury object using `sharing.who = {"Entity": {"name_or_address": "treasury_name"}}` instead of `{"Signer": "signer"}`. This eliminates R-C3-06 (critical fund theft via Signer) because funds flow to a fixed recipient regardless of who triggers the allocation. Combined with an allocator Guard that verifies `order.service == this_service` (R-C3-05 protection), the fund allocation becomes inherently safe.
@@ -1751,8 +1819,13 @@ Each node transition requires the author's confirmation, ensuring accountability
1751
1819
 
1752
1820
  5. **Use `no_cache: true` for Sequential Operations**: When performing multiple operations on the same object in sequence (especially Progress workflow advancement), always set `no_cache: true` in the `env` to ensure the SDK reads the latest on-chain state.
1753
1821
 
1754
- 6. **Query Toolkit is Your Best Friend**: Use queries constantly to verify objects exist, check configurations, debug issues, and confirm state changes.
1822
+ 6. **customer_required ⟶ um (Contact) Hard Linkage (SDK-enforced)**: Whenever you set `customer_required` (e.g. `["phone", "email", "shipping_address"]`), you MUST also bind a Contact object via `um` in the SAME or a prior Service call. The SDK's `checkCustomerRequiredNeedsUm()` validator in `ts-sdk/packages/wowok/src/w/call/service.ts` (L1226) runs at TWO points:
1823
+ - When `customer_required` is present in the current operation `data` (immediate block, L307)
1824
+ - When `publish: true` is set (re-verifies against the accumulated Service state, L314)
1825
+ This means splitting the two calls (set `customer_required` first, add `um` later) is NOT safe — the publish-time re-check would still block. Always create the Contact first, then set both `customer_required` and `um` together.
1826
+
1827
+ 7. **Query Toolkit is Your Best Friend**: Use queries constantly to verify objects exist, check configurations, debug issues, and confirm state changes.
1755
1828
 
1756
- 7. **Object IDs vs Names in Responses**: On-chain query responses return **object IDs** (e.g., `0x8202...`) for cross-object references like `buy_guard`, `machine`, `permission`. The `query_name` field in the response echoes back the original query input name. To resolve object IDs back to local mark names, use `query_toolkit` with `query_type: "local_names"`.
1829
+ 8. **Object IDs vs Names in Responses**: On-chain query responses return **object IDs** (e.g., `0x8202...`) for cross-object references like `buy_guard`, `machine`, `permission`, `um`. The `query_name` field in the response echoes back the original query input name. To resolve object IDs back to local mark names, use `query_toolkit` with `query_type: "local_names"`.
1757
1830
 
1758
- 8. **Information Injection in Transaction Responses**: Mutation/creation operations return ALL objects affected by the transaction (including side effects like `TableItem_EntityLinker` and `TableItem_ProgressHistory`), not just the primary target. This is a deliberate design for transparency. The return order reflects the transaction's execution order.
1831
+ 9. **Information Injection in Transaction Responses**: Mutation/creation operations return ALL objects affected by the transaction (including side effects like `TableItem_EntityLinker` and `TableItem_ProgressHistory`), not just the primary target. This is a deliberate design for transparency. The return order reflects the transaction's execution order.
@@ -225,7 +225,7 @@ Day 5: 1783900800000 (2026-07-13T00:00:00.000Z)
225
225
  {
226
226
  "name": "Condition",
227
227
  "description": "Weather condition policy for activity dates",
228
- "write_guard": [],
228
+ "write_guard": [{ "guard": "weather_write_guard" }],
229
229
  "id_from": "None",
230
230
  "value_type": "String"
231
231
  }
@@ -243,6 +243,8 @@ Day 5: 1783900800000 (2026-07-13T00:00:00.000Z)
243
243
  ```
244
244
 
245
245
  > **Note**: `onChain: true` is required here because `weather_repo` is created by the `weather_provider` account, but its name will be referenced in the Guard table (Step 3.1) by the `travel_provider` account. Without `onChain: true`, the name is stored locally only on `weather_provider`'s device and cannot be resolved by `travel_provider`. When `onChain: true` is set, the name is published on-chain and becomes publicly visible, allowing cross-account name resolution.
246
+ >
247
+ > The `write_guard` in the "Condition" policy points to `weather_write_guard` (created above). Because `id_from: "None"` lets the writer choose data ids, the contract mandates a Guard to authorize writes. `data_add` in Step 0.4 needs no Guard submission — the Guard is always-true with no submission fields.
246
248
 
247
249
  ### 0.4 Add Weather Data
248
250
 
@@ -1117,11 +1119,7 @@ Configure the travel service (created unpublished in Step 2.5) with all bindings
1117
1119
  "data": {
1118
1120
  "operation_type": "service",
1119
1121
  "data": {
1120
- "object": {
1121
- "name": "travel_service",
1122
- "permission": "travel_permission",
1123
- "replaceExistName": true
1124
- },
1122
+ "object": "travel_service",
1125
1123
  "description": "Iceland travel service: Blue Lagoon SPA + Glacier Ice Scooting.",
1126
1124
  "machine": "travel_machine",
1127
1125
  "sales": {
@@ -1200,6 +1198,8 @@ Configure the travel service (created unpublished in Step 2.5) with all bindings
1200
1198
  }
1201
1199
  ```
1202
1200
 
1201
+ > **Note**: `object` uses a plain string reference (`"travel_service"`) so this call **configures the draft Service created in Step 2.5**. Passing a full object definition block (`{name, permission, replaceExistName}`) here would create a brand-new Service object instead — orders and allocator Guard bindings pointing at the old draft would then fail validation.
1202
+
1203
1203
  **order_allocators Field Reference**:
1204
1204
 
1205
1205
  | Field | Type | Description |
@@ -1542,21 +1542,17 @@ The allocation Guard requires the Order ID as a submission (identifier: 0). Quer
1542
1542
 
1543
1543
  ```json
1544
1544
  {
1545
- "tool": "onchain_operations",
1545
+ "tool": "query_toolkit",
1546
1546
  "data": {
1547
- "operation_type": "progress",
1548
- "data": {
1549
- "object": "alice_travel_progress"
1550
- },
1551
- "env": {
1552
- "network": "testnet",
1553
- "no_cache": true
1554
- }
1547
+ "query_type": "onchain_objects",
1548
+ "objects": ["alice_travel_progress"],
1549
+ "network": "testnet",
1550
+ "no_cache": true
1555
1551
  }
1556
1552
  }
1557
1553
  ```
1558
1554
 
1559
- > **Note**: The response includes a `task` field containing the Order object ID. Copy this value for the allocation submission.
1555
+ > **Note**: Use `query_toolkit` (not `onchain_operations`) for read-only lookups — queries consume no gas and never mutate state. The response includes a `task` field containing the Order object ID. Copy this value for the allocation submission.
1560
1556
 
1561
1557
  ### 8.2 Execute Allocation (Merchant Victory Path)
1562
1558
 
@@ -1669,16 +1665,12 @@ After allocation, query the Allocation and Payment objects to verify the fund di
1669
1665
 
1670
1666
  ```json
1671
1667
  {
1672
- "tool": "onchain_operations",
1668
+ "tool": "query_toolkit",
1673
1669
  "data": {
1674
- "operation_type": "allocation",
1675
- "data": {
1676
- "object": "alice_travel_allocation"
1677
- },
1678
- "env": {
1679
- "network": "testnet",
1680
- "no_cache": true
1681
- }
1670
+ "query_type": "onchain_objects",
1671
+ "objects": ["alice_travel_allocation"],
1672
+ "network": "testnet",
1673
+ "no_cache": true
1682
1674
  }
1683
1675
  }
1684
1676
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wowok/skills",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "WoWok AI Skills for Claude and other AI assistants - Dialogue orchestration layer on top of the WoWok MCP server (rules/reference knowledge is served by MCP directly since v2.0.0)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,7 @@ const { execSync } = require('child_process');
25
25
  * into the MCP knowledge layer and are served by the MCP server directly:
26
26
  * - wowok-safety → schema_query action='get_safety_rules'
27
27
  * - wowok-tools → schema_query action='get_tool_reference'
28
- * - wowok-scenario → project_operation recommend_industry / create_project
28
+ * - wowok-scenario → industry_pack_operation recommend_industry / list_modes
29
29
  * - wowok-guard → schema_query action='get_guard_design_patterns'
30
30
  */
31
31
  const SKILL_DIRS = [
@@ -59,7 +59,7 @@ const LEGACY_SKILL_DIRS = [
59
59
  const SKILL_MIGRATION_MAP = {
60
60
  'wowok-safety': "MCP schema_query action='get_safety_rules'",
61
61
  'wowok-tools': "MCP schema_query action='get_tool_reference'",
62
- 'wowok-scenario': "MCP project_operation action='recommend_industry' / 'create_project'",
62
+ 'wowok-scenario': "MCP industry_pack_operation action='recommend_industry' / 'list_modes'",
63
63
  'wowok-guard': "MCP schema_query action='get_guard_design_patterns'",
64
64
  };
65
65
 
@@ -28,9 +28,9 @@ The following content has been pushed down to the MCP knowledge layer and is app
28
28
 
29
29
  | Content | Access via (MCP action) | Applied Via |
30
30
  |---------|--------------------------|-------------|
31
- | Guard design rules (structural layers, data source classification, voting_guard table design) | `schema_query` action='get_guard_design_patterns' | `project_operation.evaluate_project` |
32
- | Safety rules (confirmation levels, immutability, object reuse) | `schema_query` action='get_safety_rules' | Pre-publish checks + `project_operation.evaluate_project` |
33
- | Arbitration-specific risks | auto-applied | `project_operation.evaluate_project` |
31
+ | Guard design rules (structural layers, data source classification, voting_guard table design) | `schema_query` action='get_guard_design_patterns' | `goal_operation` action='aggregate_risks' |
32
+ | Safety rules (confirmation levels, immutability, object reuse) | `schema_query` action='get_safety_rules' | Pre-publish checks + `goal_operation` action='aggregate_risks' |
33
+ | Arbitration-specific risks | auto-applied | `goal_operation` action='aggregate_risks' |
34
34
 
35
35
  This Skill keeps the arbitration **conversation flow**, **evidence collection** scripts, and **dispute resolution** guidance — the MCP layer handles the rule evaluation.
36
36
 
@@ -38,9 +38,9 @@ The following content has been pushed down to the MCP knowledge layer and is app
38
38
 
39
39
  | Content | Access via (MCP action) | Applied Via |
40
40
  |---------|--------------------------|-------------|
41
- | Safety rules (confirmation levels, immutability rules, object reuse rules) | `schema_query` action='get_safety_rules' | Pre-publish checks + `project_operation.evaluate_project` |
42
- | Machine-executable audit rules | auto-applied (not queryable) | `project_operation.evaluate_project` |
43
- | Guard completeness / Machine soundness / fund-flow risks | auto-applied (not queryable) | `project_operation.evaluate_project` |
41
+ | Safety rules (confirmation levels, immutability rules, object reuse rules) | `schema_query` action='get_safety_rules' | Pre-publish checks + `goal_operation` action='aggregate_risks' |
42
+ | Machine-executable audit rules | auto-applied (not queryable) | `goal_operation` action='aggregate_risks' |
43
+ | Guard completeness / Machine soundness / fund-flow risks | auto-applied (not queryable) | `goal_operation` action='aggregate_risks' |
44
44
 
45
45
  This Skill keeps the **audit flow**, the **4 audit dimensions** (Guard completeness, Machine soundness, fund flow, publish readiness), and the **checklist structure** as the human-readable knowledge base for the L4 Harness Verify Loop. The MCP layer runs the machine-executable rule evaluation.
46
46
 
@@ -32,7 +32,7 @@ The following content has been pushed down to the MCP knowledge layer and is app
32
32
 
33
33
  | Content | Access via (MCP action) | Applied Via |
34
34
  |---------|--------------------------|-------------|
35
- | Collaborator interest analysis (fund_flow / responsibility / leverage / stakes) | `project_operation` action='participation_radar' | role derivation → `collaborator-interest` |
35
+ | Collaborator interest analysis (fund_flow / responsibility / leverage / stakes) | `query_toolkit` query_type='participation_radar' | role derivation → `collaborator-interest` |
36
36
  | Progress routing rule (namedOperator vs permissionIndex) | `schema_query` action='get_safety_rules' | `onchain_operations` progress/order |
37
37
  | Guard design + submission patterns | `schema_query` action='get_guard_design_patterns' | guard-gated forwards |
38
38
  | Node game (threshold cooperation) | `evaluation_operation` action='node_game' | multi-role forward evaluation |
@@ -62,7 +62,7 @@ Two sub-kinds (derived on-chain, never asserted):
62
62
 
63
63
  ## What You Can Execute Now
64
64
 
65
- Run `project_operation` action='participation_radar' with your account + the order's Progress. It returns:
65
+ Run `query_toolkit` query_type='participation_radar' with your account + the order's Progress. It returns:
66
66
 
67
67
  - `operable` — forwards YOU can execute right now (permission / named-operator path).
68
68
  - `waiting_on` — what the workflow waits on from other roles.
@@ -42,11 +42,11 @@ The following content has been pushed down to the MCP knowledge layer and is app
42
42
 
43
43
  | Content | Access via (MCP action) | Applied Via |
44
44
  |---------|--------------------------|-------------|
45
- | Node design rules (node type specs, forward guard patterns, topology limits) | auto-applied | `project_operation.create_project` (pass `project_industry`) + `project_operation.evaluate_project` |
46
- | Machine scene/template selection | auto-applied | `project_operation.create_project` (pass `project_industry`) |
47
- | Forward Guard design patterns | `schema_query` action='get_guard_design_patterns' | `project_operation.evaluate_project` |
48
- | Safety rules (immutability, confirmation) | `schema_query` action='get_safety_rules' | Pre-publish checks + `project_operation.evaluate_project` |
49
- | Publish gate (4-layer fail-closed: checklist → risk → user → environment) | auto-applied | `project_operation.evaluate_project` + pre-publish gate |
45
+ | Node design rules (node type specs, forward guard patterns, topology limits) | auto-applied | Industry mode defaults (`industry_pack_operation` action='list_modes') + `goal_operation` action='aggregate_risks' |
46
+ | Machine scene/template selection | auto-applied | Industry mode defaults (`industry_pack_operation` action='list_modes') |
47
+ | Forward Guard design patterns | `schema_query` action='get_guard_design_patterns' | `goal_operation` action='aggregate_risks' |
48
+ | Safety rules (immutability, confirmation) | `schema_query` action='get_safety_rules' | Pre-publish checks + `goal_operation` action='aggregate_risks' |
49
+ | Publish gate (4-layer fail-closed: checklist → risk → user → environment) | auto-applied | `goal_operation` action='aggregate_risks' + pre-publish gate |
50
50
 
51
51
  This Skill keeps the **workflow conversation guidance**, **business flow design patterns**, and **machine lifecycle scripts**. The MCP layer handles node-design rule evaluation, scene/template selection, and risk aggregation.
52
52
 
@@ -74,7 +74,7 @@ This Skill keeps the **workflow conversation guidance**, **business flow design
74
74
 
75
75
  A Guard validates the Forward's execution condition. **Retained submissions**: when `retained_submission` is set on a Guard, submitted values are stored in Progress history, uniquely located by `(current_node, next_node, forward_name)`. Later nodes query these values from history.
76
76
 
77
- > **Guard construction**: Forward Guard design patterns (table design, computation trees, query instructions) now live in the MCP knowledge layer — query via `schema_query` action='get_guard_design_patterns', auto-applied via `project_operation.evaluate_project`. Query available Guard instructions via `wowok_buildin_info`.
77
+ > **Guard construction**: Forward Guard design patterns (table design, computation trees, query instructions) now live in the MCP knowledge layer — query via `schema_query` action='get_guard_design_patterns', auto-applied via `goal_operation` action='aggregate_risks'. Query available Guard instructions via `wowok_buildin_info`.
78
78
 
79
79
  ### Threshold Mechanics
80
80
 
@@ -198,7 +198,7 @@ Decompose complex workflows into multiple Machines connected by Guard-based vali
198
198
  3. "Does any step depend on an external process completing first?"
199
199
  4. "Which party creates the sub-order, and which party verifies it?"
200
200
 
201
- > **Guard construction**: Cross-Machine Guards use `convert_witness` with Progress query instructions. Design rules now live in the MCP knowledge layer — query via `schema_query` action='get_guard_design_patterns', applied via `project_operation.evaluate_project`. Query available Guard instructions via `wowok_buildin_info`.
201
+ > **Guard construction**: Cross-Machine Guards use `convert_witness` with Progress query instructions. Design rules now live in the MCP knowledge layer — query via `schema_query` action='get_guard_design_patterns', applied via `goal_operation` action='aggregate_risks'. Query available Guard instructions via `wowok_buildin_info`.
202
202
 
203
203
  ### Dual-Signature Consensus
204
204
 
@@ -234,7 +234,7 @@ All stem from the same root: **every on-chain object has a publish/create freeze
234
234
  | `refunded` (terminal) | `refund_routing` (routing) → Allocator fires |
235
235
  | N/A (dispute) | `arbiter_rule` (routing) → Arbitration off-Machine (no Allocator) |
236
236
 
237
- A complete R-M1-11-compliant rental topology is auto-generated by `project_operation.create_project` with `project_industry='rental'`.
237
+ A complete R-M1-11-compliant rental topology ships as the `rental` industry mode's default Machine shape — query `industry_pack_operation` action='list_modes' for the per-industry defaults.
238
238
 
239
239
  ### Pre-Publish Validation Checklist
240
240
 
@@ -245,7 +245,7 @@ Before `publish: true`, verify:
245
245
  - [ ] **Every node has outgoing Forwards** (except terminals): no dead-end nodes
246
246
  - [ ] **Every node has incoming Pair** (except entry): no orphaned nodes
247
247
  - [ ] **All thresholds independently achievable**: no dead branches (competing Pair always wins first)
248
- - [ ] **⚠ R-M1-11 Compliance** (CRITICAL for deposit/refund scenarios): NO terminal nodes named `deposit_refunded`, `deposit_deducted`, `refunded`, or any name implying Machine-internal refund/deduction. Refund/deduction MUST flow through an **Allocator** triggered by a routing node (e.g., `return_approved`, `damage_confirmed`, `arbiter_rule`). Violating this causes funds to lock in the Machine with no Allocator path. Auto-enforced by MCP pre-publish checks and `project_operation.evaluate_project`.
248
+ - [ ] **⚠ R-M1-11 Compliance** (CRITICAL for deposit/refund scenarios): NO terminal nodes named `deposit_refunded`, `deposit_deducted`, `refunded`, or any name implying Machine-internal refund/deduction. Refund/deduction MUST flow through an **Allocator** triggered by a routing node (e.g., `return_approved`, `damage_confirmed`, `arbiter_rule`). Violating this causes funds to lock in the Machine with no Allocator path. Auto-enforced by MCP pre-publish checks and `goal_operation` action='aggregate_risks'.
249
249
  - [ ] All Guards exist on-chain and tested (use `gen_passport`)
250
250
  - [ ] `namedOperator` vs `permissionIndex` correct per Forward
251
251
  - [ ] Every Forward has at least one of `namedOperator` or `permissionIndex`
@@ -72,7 +72,7 @@ The on-chain **Contact** object (`operation_type: "contact"`) is the bridge betw
72
72
 
73
73
  **When to create**: Before Service publish, when `customer_required` is set (Service.um must point to a Contact). Reuse an existing Contact if you serve multiple Services with the same support channel.
74
74
 
75
- **Lifecycle**: Contact is mutable (unlike Proof/Guard). `im_add`/`im_remove` require permission index 453 (CONTACT_IM). No events emitted on IM mutations — poll `ims[]` field. If Contact is bound to `Permission.um` via `permission_um_set`, clear that binding BEFORE deleting the Contact (else dangling pointer). Full field constraints: MCP `schema_query` action='get' name='contact'.
75
+ **Lifecycle**: Contact is mutable (unlike Proof/Guard). IM mutations (`onchain_operations` contact with `ims: {op:'add'|'set'|'remove'|'clear', im:[...]}`) require permission index 453 (CONTACT_IM). No events emitted on IM mutations — poll `ims[]` field. If Contact is bound to `Permission.um`, clear that binding (permission op: `um: null`) BEFORE deleting the Contact (else dangling pointer). Full field constraints: MCP `schema_query` action='get' name='contact'.
76
76
 
77
77
  ---
78
78
 
@@ -37,13 +37,13 @@ The following content has been pushed down to the MCP knowledge layer and is app
37
37
 
38
38
  | Content | Access via (MCP action) | Applied Via |
39
39
  |---------|--------------------------|-------------|
40
- | Scenario mode defaults (per-industry Permission/Machine/Guard/Allocator) | `project_operation` action='list_modes' / 'create_project' | Auto-applied when `project_industry` is passed to `create_project` |
41
- | Safety rules (immutability, confirmation, object reuse) | `schema_query` action='get_safety_rules' | Pre-publish checks + `project_operation.evaluate_project` |
42
- | Guard / Machine / Arbitration / Treasury design rules | `schema_query` action='get_guard_design_patterns' | `project_operation.evaluate_project` |
40
+ | Scenario mode defaults (per-industry Permission/Machine/Guard/Allocator) | `industry_pack_operation` action='list_modes' / 'recommend_industry' | Referenced when recording the Goal (`goal_operation` action='create') and when building each object |
41
+ | Safety rules (immutability, confirmation, object reuse) | `schema_query` action='get_safety_rules' | Pre-publish checks + `goal_operation` action='aggregate_risks' |
42
+ | Guard / Machine / Arbitration / Treasury design rules | `schema_query` action='get_guard_design_patterns' | `goal_operation` action='aggregate_risks' |
43
43
  | Common mistakes (field/unit/workflow pitfalls) | `wowok_buildin_info` action='common mistakes' | Tool calls (proactive warnings) |
44
- | Deployment checklist (publish readiness) | `project_operation` action='evaluate_project' | deployment-scanner D-01..D-20 |
44
+ | Deployment checklist (publish readiness) | `goal_operation` action='aggregate_risks' (planned_objects / planned_operations) | deployment-scanner D-01..D-20 |
45
45
 
46
- This Skill keeps the **overall onboarding flow**, the **dependency-aware build order**, and the **user-driving interaction rhythm** (see below). Pass the user's industry to `create_project` (via `project_industry` parameter) and the MCP layer auto-fills the scenario defaults.
46
+ This Skill keeps the **overall onboarding flow**, the **dependency-aware build order**, and the **user-driving interaction rhythm** (see below). The user's intent is recorded as a **Goal** (`goal_operation` action='create'); industry/scenario defaults come from `industry_pack_operation` action='recommend_industry' / 'list_modes', and the plan pipeline is `goal_operation` action='analyze_intent' — actual on-chain objects are created via `onchain_operations` in dependency order.
47
47
 
48
48
  ---
49
49
 
@@ -110,7 +110,7 @@ Each round below lists: **Semantic meaning**, **Core elements to confirm**, **De
110
110
  - **Core elements to confirm**:
111
111
  - Account: **reuse an existing account** (name/address) or **create new** (default name).
112
112
  - Network: **testnet first** (recommended) or **mainnet directly**.
113
- - Industry mode: pass to `create_project` as `project_industry` — see the Industry Selection Guide below.
113
+ - Industry mode: resolved via `industry_pack_operation` action='recommend_industry' — see the Industry Selection Guide below.
114
114
  - **Default config**: new account with a default name; testnet network; industry mode auto-fills scenario defaults (Machine shape, Guards, Allocator).
115
115
  - **Reuse / Customize / Discover**: Reuse an existing account (benefit: keeps objects under one identity) — or create new.
116
116
  - **Dependencies**: none (foundation).
@@ -145,7 +145,7 @@ Each round below lists: **Semantic meaning**, **Core elements to confirm**, **De
145
145
  - Business flow: node list + forward paths.
146
146
  - Permissions: per-forward `namedOperator` (`""`=OrderHolder / role name) or `permissionIndex`.
147
147
  - Acceptance: per-forward Guard (or inline) — what must be verified before the transition executes.
148
- - **Default config**: the industry mode's `machine_shape` + `guards` (query `project_operation` action='list_modes'). Disclose these defaults FIRST, then let the user accept or customize.
148
+ - **Default config**: the industry mode's `machine_shape` + `guards` (query `industry_pack_operation` action='list_modes'). Disclose these defaults FIRST, then let the user accept or customize.
149
149
  - **Reuse / Customize / Discover**: Reuse an existing Machine template (`machineNode2file` export) or an existing Guard (`guard2file`). Customize: define your own nodes/forwards/guards. Discover: `machineNode2file` / `local_mark_list` for other projects' Machines/Guards.
150
150
  - **Dependencies**: Service draft (R3) + Permission (R2).
151
151
  - **R-M1-11 compliance**: Machine MUST use business-state nodes (e.g. `cancelled`, `returned`, `return_approved`), NOT dispute/refund terminal nodes (`refunded`, `deposit_refunded`, `disputed`, `arb`). Refund routes via Allocator; dispute routes via Arbitration.
@@ -214,7 +214,7 @@ Each round below lists: **Semantic meaning**, **Core elements to confirm**, **De
214
214
  - **Core elements to confirm** (each optional, each with default disclosure + reuse/customize/discover):
215
215
  - Reward (discounts/loyalty).
216
216
  - Supply-chain promises / Repository.
217
- - Audit: `evaluate_project` (risk) — fix ALL CRITICAL findings.
217
+ - Audit: `goal_operation` action='aggregate_risks' — fix ALL CRITICAL findings.
218
218
  - **Default config**: none required — these are opt-in. The audit itself is mandatory.
219
219
  - **Reuse / Customize / Discover**: each optional component can be created or discovered.
220
220
  - **Dependencies**: R1–R9.
@@ -241,13 +241,13 @@ Each round below lists: **Semantic meaning**, **Core elements to confirm**, **De
241
241
 
242
242
  ## Industry Selection Guide
243
243
 
244
- When the user describes their business (R1), query the authoritative industry list via `project_operation` action='list_modes' — 8 entries: `freelance` / `rental` / `education` / `travel` / `subscription` / `retail` / `retail_d2c` / `general`. If unsure which fits, call `project_operation` action='recommend_industry' with the business description. Pass the chosen `project_industry` to `create_project` — MCP auto-fills the scenario defaults (Machine shape, Guards, Allocator). Mid-onboarding iteration: `derive_user_mode` / `evolve_user_mode`.
244
+ When the user describes their business (R1), query the authoritative industry list via `industry_pack_operation` action='list_modes' — 8 entries: `freelance` / `rental` / `education` / `travel` / `subscription` / `retail` / `retail_d2c` / `general`. If unsure which fits, call `industry_pack_operation` action='recommend_industry' with the business description. Reference the chosen mode when recording the Goal (`goal_operation` action='create') and when building the Service — its defaults (Machine shape, Guards, Allocator) inform each round's config disclosure. Mid-onboarding iteration: `industry_pack_operation` action='derive_user_mode' / 'evolve_user_mode'.
245
245
 
246
246
  ---
247
247
 
248
248
  ## Deployment Checklist
249
249
 
250
- Before declaring onboarding complete, run `project_operation` action='evaluate_project' (risk) — MCP auto-checks machine binding, order_allocators, buy_guard, arbitration isolation, R-M1-11 compliance, and publish readiness (deployment-scanner D-01..D-20). Fix ALL CRITICAL findings, then verify the remaining hard gates via `query_toolkit` (onchain_objects). The authoritative checklist is served by MCP — do not re-derive it here.
250
+ Before declaring onboarding complete, run `goal_operation` action='aggregate_risks' — MCP auto-checks machine binding, order_allocators, buy_guard, arbitration isolation, R-M1-11 compliance, and publish readiness (deployment-scanner D-01..D-20) against your planned objects/operations. Fix ALL CRITICAL findings, then verify the remaining hard gates via `query_toolkit` (onchain_objects). The authoritative checklist is served by MCP — do not re-derive it here.
251
251
 
252
252
  ---
253
253
 
@@ -147,7 +147,7 @@ Query `onchain_objects` for E1 `um` ID.
147
147
 
148
148
  ### E9 — Chain Reputation
149
149
 
150
- Sentiment: `query_toolkit` → `onchain_table_item_entity_linker` for provider; compute likes/dislikes from `votes[]`. Orders: batch query `votes[].address` via `onchain_objects` (50/batch, max 200), filter `service` match; aggregate dispute rate (`dispute ≠ []` / total) + repeat-buyer ratio. Dispute rate >10% → ⚠️.
150
+ Sentiment: `query_toolkit` → `onchain_table_item_entity_linker` for the provider address; compute likes/dislikes/favor from `votes[]` (each vote: `{ who, like, dislike, favor, time }`). Orders: `query_toolkit` → `onchain_table_item_object_linker_tx` with the Service address → `items[].who` = recent Orders binding to it (tx reverse index 0xaaf, FIFO window); batch query those via `onchain_objects` (50/batch, max 200); aggregate dispute rate (`dispute ≠ []` / total) + repeat-buyer ratio. Dispute rate >10% → ⚠️.
151
151
 
152
152
  ### E10 — Privacy Information Matching (LocalInfo reuse)
153
153