@wowok/skills 2.0.1 → 2.1.0
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/README.md +1 -1
- package/dist/cli.js +66 -5
- package/dist/cli.js.map +1 -1
- package/dist/skills.js +1 -1
- package/dist/skills.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install.js +52 -0
- package/wowok-arbitrator/SKILL.md +18 -27
- package/wowok-auditor/SKILL.md +6 -6
- package/wowok-machine/SKILL.md +10 -10
- package/wowok-onboard/SKILL.md +192 -100
- package/wowok-order/SKILL.md +72 -217
- package/wowok-output/SKILL.md +46 -26
- package/wowok-planner/SKILL.md +24 -9
- package/wowok-provider/SKILL.md +42 -190
package/wowok-onboard/SKILL.md
CHANGED
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
name: wowok-onboard
|
|
3
3
|
description: |
|
|
4
4
|
WoWok First-Touch Onboarding — guides a new user from zero to their first
|
|
5
|
-
published Service
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
published Service through a user-driven, dependency-aware build sequence
|
|
6
|
+
(Review opening + 12 rounds). Bridges the operation_type wall and the
|
|
7
|
+
object_type wall by sequencing every MCP call into a dependency-correct
|
|
8
|
+
build order, while giving the user a reuse/customize/discover choice for
|
|
9
|
+
every component.
|
|
8
10
|
|
|
9
11
|
Use when a new user says "I want to open a shop", "I want to sell something",
|
|
10
12
|
"how do I start", or has no published Service yet. Produces a complete merchant
|
|
11
13
|
capability stack: Permission + Service (published) + Machine (published) +
|
|
12
|
-
Progress (bound) + Guards + Allocation
|
|
14
|
+
Progress (bound) + Guards + Allocation + Contact (customer-service) +
|
|
15
|
+
Arbitration (third-party), verified by a user-driven test order.
|
|
13
16
|
|
|
14
17
|
Not for existing merchants tuning operations — hand off to wowok-provider.
|
|
15
18
|
when_to_use:
|
|
@@ -22,9 +25,9 @@ when_to_use:
|
|
|
22
25
|
|
|
23
26
|
# WoWok First-Touch Onboarding
|
|
24
27
|
|
|
25
|
-
Guides a new merchant from zero to first published Service in
|
|
28
|
+
Guides a new merchant from zero to first published Service in a **Review opening + 12 user-driven rounds**. Every round collects explicit user decisions (never fabricated), offers a **reuse / customize / discover** choice per component, and verifies success before advancing.
|
|
26
29
|
|
|
27
|
-
> **Related Skills**: [wowok-provider](../wowok-provider/SKILL.md) (post-onboard operations), [wowok-machine](../wowok-machine/SKILL.md) (workflow design)
|
|
30
|
+
> **Related Skills**: [wowok-provider](../wowok-provider/SKILL.md) (post-onboard operations), [wowok-machine](../wowok-machine/SKILL.md) (workflow design), [wowok-messenger](../wowok-messenger/SKILL.md) (customer-service Contact), [wowok-arbitrator](../wowok-arbitrator/SKILL.md) (third-party Arbitration)
|
|
28
31
|
|
|
29
32
|
---
|
|
30
33
|
|
|
@@ -32,134 +35,223 @@ Guides a new merchant from zero to first published Service in 10 rounds. Each ro
|
|
|
32
35
|
|
|
33
36
|
The following content has been pushed down to the MCP knowledge layer and is applied automatically — this Skill no longer duplicates it:
|
|
34
37
|
|
|
35
|
-
| Content | MCP
|
|
36
|
-
|
|
37
|
-
| Scenario mode
|
|
38
|
-
| Safety rules (immutability, confirmation, object reuse) | `
|
|
39
|
-
| Guard / Machine design rules | `
|
|
38
|
+
| Content | Access via (MCP action) | Applied Via |
|
|
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` |
|
|
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 |
|
|
40
45
|
|
|
41
|
-
This Skill keeps the **overall onboarding flow
|
|
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.
|
|
42
47
|
|
|
43
48
|
---
|
|
44
49
|
|
|
45
|
-
##
|
|
50
|
+
## Core Interaction Principles
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
These four principles govern EVERY round. They are non-negotiable and replace the old "linear script" model.
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
1. **Review-first**: Before the first user choice, the AI MUST output a review that states (a) its understanding of the user's task, (b) the dependency-chain overview, and (c) the interaction contract. Only AFTER this review is the first choice presented.
|
|
55
|
+
2. **User-driven**: Every round is driven by an explicit user decision. The AI provides a `recommend` option but NEVER auto-advances. The user may pause at any important round to ask questions.
|
|
56
|
+
3. **Reuse / Customize / Discover (三选一)**: For every component (Permission, Machine, Guard, Contact, Treasury, Arbitration, etc.), the AI MUST present three avenues — **reuse an existing object** (with its benefit), **customize a new object** (with its sub-task ability), or **discover an object** from other projects / the system. All three are mandatory to surface.
|
|
57
|
+
4. **Default-config disclosure**: Before creating any new object, the AI MUST disclose the default configuration and important information (purpose, key settings, caveats), then let the user decide. No silent defaults.
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
- Industry defaults auto-applied via `project_operation.create_project` (pass `project_industry` parameter; defaults sourced from MCP `knowledge/scenario-modes.ts`)
|
|
53
|
-
- Enforces dependency order: Permission → Machine (create) → Guards → Machine (bind guards+publish) → Service Phase 1 (configure) → Service Phase 2 (publish) → Test Order → Mainnet
|
|
54
|
-
- Persists checkpoints after each round via `local_info_operation` so users can resume
|
|
55
|
-
- Hands off to [wowok-provider](../wowok-provider/SKILL.md) once the Service is published
|
|
59
|
+
---
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
## Dependency Chain (Authoritative ODG)
|
|
58
62
|
|
|
59
|
-
|
|
60
|
-
- User explicitly asks to set up / open / start a shop
|
|
61
|
-
- User resumes a previously interrupted onboarding (read checkpoint first)
|
|
62
|
-
- Do NOT invoke for: tuning an existing Service, handling live orders, dispute resolution
|
|
63
|
+
The build order is driven by the object dependency graph verified from on-chain constraints. This is the single narrative used across all rounds:
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
```
|
|
66
|
+
Account (account + network)
|
|
67
|
+
└─ Permission (centralized access control — referenced by ALL objects)
|
|
68
|
+
├─ Service DRAFT (skeleton first → Guards reference it by LocalMark NAME, breaks Guard↔Service cycle)
|
|
69
|
+
├─ Machine nodes/forwards (business workflow)
|
|
70
|
+
│ └─ Guards (depend on node names + service name) → bind to forwards (unpublished) → PUBLISH Machine (immutable)
|
|
71
|
+
└─ Service Phase 1: bind machine + buy_guard + sales + order_allocators
|
|
72
|
+
├─ Sales (WIP URL + hash) · order_allocators (split → owner/Treasury) · Contact (Service.um → ims[])
|
|
73
|
+
├─ Arbitration (third-party; permission ≠ Service)
|
|
74
|
+
└─ optional + audit → PUBLISH Service (L1-locked) → TEST ORDER
|
|
75
|
+
```
|
|
65
76
|
|
|
66
|
-
|
|
77
|
+
**Irreversibility constraints (Move/SDK-verified):**
|
|
78
|
+
- `service.machine` must reference a **published** Machine; `order_allocators` + `arbitrations` are **L1-locked** (set before publish); Machine nodes/forwards and Guard logic are **immutable after publish** — bind everything while unpublished.
|
|
79
|
+
- `compensation_fund > 0` REQUIRES non-empty `arbitrations` (`E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND` 25); Arbitration MUST NOT share the Service's Permission (`E_ARBITRATION_PERMISSION_CONFLICT` 33 — owner would control dispute resolution).
|
|
80
|
+
- Guard references Service/Machine by **LocalMark NAME** (not address) to break the Guard↔Service cycle.
|
|
67
81
|
|
|
68
82
|
---
|
|
69
83
|
|
|
70
|
-
##
|
|
71
|
-
|
|
72
|
-
The onboarding flow is backed by the MCP SQLite-based project pipeline. Each step produces verifiable state — the AI MUST honor risk/blocking findings by stopping and fixing reported issues:
|
|
73
|
-
|
|
74
|
-
| Step | Rounds | MCP Action | Gate |
|
|
75
|
-
|------|--------|------------|------|
|
|
76
|
-
| 1. Create Project | R1-R2 | `create_project` (pass `project_industry`) → project record + scenario defaults | — |
|
|
77
|
-
| 2. Add Objects | R2-R7 | `add_object` for each on-chain object (Permission, Machine, Guards, Service) | — |
|
|
78
|
-
| 3. Build Graph | After R7 | `build_graph` → object dependency graph from added objects | — |
|
|
79
|
-
| 4. Evaluate | After graph built | `evaluate_project` (evaluation_type='risk') → risk assessment | CRITICAL risks block R9 |
|
|
84
|
+
## Review Opening Protocol (before R1)
|
|
80
85
|
|
|
81
|
-
|
|
86
|
+
When a new user expresses intent ("open a shop", "sell something"), the AI MUST output this review FIRST, then ask the first question:
|
|
82
87
|
|
|
83
|
-
|
|
88
|
+
1. **Understanding framework** — restate what the AI understood: what the user sells, the rough industry, the business model.
|
|
89
|
+
2. **Dependency-chain overview** — show the chain above (abridged), so the user sees the whole journey and where they can intervene.
|
|
90
|
+
3. **Interaction contract** — state clearly:
|
|
91
|
+
- Every round is driven by the user; the AI provides a `recommend` but waits for confirmation.
|
|
92
|
+
- The user may pause at any round to ask questions or revisit an earlier decision.
|
|
93
|
+
- Every component offers **reuse / customize / discover**.
|
|
94
|
+
- Any default configuration is disclosed BEFORE the user decides.
|
|
95
|
+
4. **First question** — confirm the understanding is correct, then proceed to R1.
|
|
84
96
|
|
|
85
|
-
|
|
86
|
-
- `service.machine` must reference a **published** Machine (Service cannot bind unpublished Machine)
|
|
87
|
-
- `service.order_allocators` is L1-locked — MUST be set BEFORE `service.publish` (per service.move:503)
|
|
88
|
-
- Guard uses **LocalMark NAME** in table to break circular dependency (Guard→Service→Guard)
|
|
89
|
-
- `order_new` (test order) only works when `service.bPublished=true` (else E_NOT_PUBLISHED)
|
|
90
|
-
- **Recommended order**: Permission → Machine (create nodes/forwards) → Guards → Machine (bind guards to forwards) → Machine (publish) → Service Phase 1 (configure) → Service Phase 2 (publish) → Test Order
|
|
97
|
+
> ⚠️ The first user-choice interaction MUST NOT happen before this review is complete.
|
|
91
98
|
|
|
92
|
-
|
|
93
|
-
|-------|-------|--------|---------------|--------------|
|
|
94
|
-
| R1 | Foundation | Project + Account | `project_operation.create_project` (pass `project_industry`) + `account_operation.gen` + `faucet` | Industry mode + new/reuse account |
|
|
95
|
-
| R2 | Foundation | Permission | `onchain_operations.permission` CREATE/REUSE | Index 1000 = provider |
|
|
96
|
-
| R3 | Foundation | Machine | `onchain_operations.machine` CREATE (nodes/forwards, guards optional inline) | Nodes, forwards, optional inline guards |
|
|
97
|
-
| R4 | Foundation | Guards | `onchain_operations.guard` CREATE (multiple) | Buy guard, accept guard, refund guard — use LocalMark NAME for Service references |
|
|
98
|
-
| R5 | Foundation | Machine guard binding | `onchain_operations.machine` MODIFY (bind guards to forwards) | `op: "add forward"` or `op: "set"` to update forward guard fields; Machine must still be unpublished |
|
|
99
|
-
| R6 | Foundation | Machine publish | `onchain_operations.machine` publish | Machine must be published before Service can reference it |
|
|
100
|
-
| R7 | Revenue | Service Phase 1 | `onchain_operations.service` CREATE (no publish) + set `machine` + `order_allocators` + `buy_guard` + `sales` + `arbitrations` (if compensation) | All L1-locked fields (machine, order_allocators) MUST be set here |
|
|
101
|
-
| R8 | Audit | Pre-publish audit | `machineNode2file` export + `guard2file` export + `project_operation.evaluate_project` | All CRITICAL risks must be fixed before R9 |
|
|
102
|
-
| R9 | Publish | Service Phase 2 | `onchain_operations.service` publish=true | Only flips publish flag; L1 fields already locked |
|
|
103
|
-
| R10 | Test + Mainnet | Test order + Mainnet | `onchain_operations.service` `order_new` → `onchain_operations.progress` advance → `onchain_operations.allocation` `alloc_by_guard` → Re-run R2-R9 on mainnet | Full flow dry run: order → progress → allocation; Recommend testnet first, then mainnet |
|
|
99
|
+
---
|
|
104
100
|
|
|
105
|
-
|
|
106
|
-
1. **Inline (R3)**: Set guards directly in `MachineForwardSchema.guard` during Machine CREATE — guards must already exist
|
|
107
|
-
2. **Deferred (R5)**: Create Machine first without guards (R3), create Guards (R4), then bind guards to forwards via `op: "add forward"` or `op: "set"` — allows Guards to reference Machine by LocalMark name
|
|
101
|
+
## R1-R12 Build Order
|
|
108
102
|
|
|
109
|
-
|
|
103
|
+
Each round below lists: **Semantic meaning**, **Core elements to confirm**, **Default config** (disclosed before the user decides), **Reuse / Customize / Discover**, and **Dependencies**. (Order: R1 Account → R2 Permission → R3 Service draft → R4 Machine+Guards → R5 publish Machine → R6 Sales → R7 order_allocators → R8 Contact → R9 Arbitration → R10 optional+audit → R11 publish Service → R12 test order.)
|
|
110
104
|
|
|
111
|
-
|
|
105
|
+
---
|
|
112
106
|
|
|
113
|
-
|
|
107
|
+
### R1 — Account & Network
|
|
108
|
+
|
|
109
|
+
- **Semantic meaning**: Decide WHO operates on-chain (fund ownership + signing identity) and WHERE (testnet vs mainnet). This identity owns all subsequent objects and receives settlement.
|
|
110
|
+
- **Core elements to confirm**:
|
|
111
|
+
- Account: **reuse an existing account** (name/address) or **create new** (default name).
|
|
112
|
+
- Network: **testnet first** (recommended) or **mainnet directly**.
|
|
113
|
+
- Industry mode: pass to `create_project` as `project_industry` — see the Industry Selection Guide below.
|
|
114
|
+
- **Default config**: new account with a default name; testnet network; industry mode auto-fills scenario defaults (Machine shape, Guards, Allocator).
|
|
115
|
+
- **Reuse / Customize / Discover**: Reuse an existing account (benefit: keeps objects under one identity) — or create new.
|
|
116
|
+
- **Dependencies**: none (foundation).
|
|
117
|
+
|
|
118
|
+
### R2 — Permission (access control)
|
|
119
|
+
|
|
120
|
+
- **Semantic meaning**: Permission is the **central control point** answering "who can operate this service's objects". Index 1000+ are user-defined roles (indexes 0–999 are built-in). Reusing one Permission across services keeps a single, auditable control surface.
|
|
121
|
+
- **Core elements to confirm**:
|
|
122
|
+
- **Reuse an existing Permission** (strongly recommended) OR **create new**.
|
|
123
|
+
- If new: `name`, `type_parameter`, and indexes (e.g. `1000 = provider`).
|
|
124
|
+
- **Default config**: a new Permission with index `1000 = provider`.
|
|
125
|
+
- **Reuse / Customize / Discover**: Reuse is strongly recommended (benefit: centralized control, no orphan Permission). Discover: check `local_mark_list` / `account_list` for existing Permissions.
|
|
126
|
+
- **Dependencies**: Account (R1).
|
|
127
|
+
|
|
128
|
+
### R3 — Service DRAFT (skeleton first)
|
|
129
|
+
|
|
130
|
+
- **Semantic meaning**: The Service is your brand's on-chain identity. Creating a **draft first** (unpublished) lets later Guards reference it by **LocalMark NAME**, breaking the Guard↔Service circular dependency (Guard needs Service name; Service needs Guard address). The draft is fully editable until publish.
|
|
131
|
+
- **Core elements to confirm**:
|
|
132
|
+
- Service `name` and `type_parameter` (what kind of service).
|
|
133
|
+
- **Default config**: unpublished draft; only name + type_parameter set now; machine/order_allocators/sales filled in R5–R7.
|
|
134
|
+
- **Reuse / Customize / Discover**: New Service (you have none). Name is the brand identity — confirm it carefully.
|
|
135
|
+
- **Dependencies**: Permission (R2).
|
|
136
|
+
|
|
137
|
+
### R4 — Business Flow + Permissions + Acceptance (Machine + Guards, INTEGRATED)
|
|
138
|
+
|
|
139
|
+
- **Semantic meaning**: The **core round** — design the order's state transitions (Machine nodes/forwards), WHO can advance each transition (forward permissions), and WHAT must be verified at each step (Guard acceptance). These three are designed together because a forward's Guard depends on the Machine's node names, and the Allocator's Guard depends on both Machine and Service.
|
|
140
|
+
- **Internal sub-order** (disclosed to the user):
|
|
141
|
+
1. Define Machine **nodes + forwards** (business states + transitions) — permissions resolved from R2's Permission indexes.
|
|
142
|
+
2. Define **Guards** (acceptance logic) — reference machine node names + service name via LocalMark NAME.
|
|
143
|
+
3. **Bind** Guards to forwards (still unpublished, reversible).
|
|
144
|
+
- **Core elements to confirm** (all three, explicitly):
|
|
145
|
+
- Business flow: node list + forward paths.
|
|
146
|
+
- Permissions: per-forward `namedOperator` (`""`=OrderHolder / role name) or `permissionIndex`.
|
|
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.
|
|
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
|
+
- **Dependencies**: Service draft (R3) + Permission (R2).
|
|
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.
|
|
152
|
+
|
|
153
|
+
### R5 — Publish Machine
|
|
154
|
+
|
|
155
|
+
- **Semantic meaning**: Freeze the business workflow on-chain. After this, nodes/forwards are **immutable**.
|
|
156
|
+
- **Core elements to confirm**: confirm the Machine topology is final (export `machineNode2file` for backup/verification first).
|
|
157
|
+
- **Default config**: n/a — confirmation gate.
|
|
158
|
+
- **Reuse / Customize / Discover**: n/a (publication, not creation).
|
|
159
|
+
- **Dependencies**: R4.
|
|
160
|
+
|
|
161
|
+
### R6 — Sales (products with WIP)
|
|
162
|
+
|
|
163
|
+
- **Semantic meaning**: Define the sellable products — name, price, stock, and the **WIP file** (work-in-progress / product description). The WIP is a **public URL + hash** (`Sale.wip` = URL, `Sale.wip_hash` = hash), which customers fetch to understand the deliverable.
|
|
164
|
+
- **Core elements to confirm** (per product):
|
|
165
|
+
- `name`, `price` (u64, min unit), `stock`.
|
|
166
|
+
- `wip` (URL) + `wip_hash` — **the WIP MUST be deployed to a public endpoint** (on-chain only stores the URL + hash, not the file).
|
|
167
|
+
- **WIP public deployment (strongly recommended sub-task)**: user provides web/doc material → AI generates the WIP file + deploys to a public URL (recommend GitHub Pages / free static hosting).
|
|
168
|
+
- **Default config**: n/a — products are user business decisions (never fabricated).
|
|
169
|
+
- **Reuse / Customize / Discover**: Reuse an existing `sales` item (rare). Customize: define your own products. Discover: n/a.
|
|
170
|
+
- **Dependencies**: Service draft (R3).
|
|
171
|
+
|
|
172
|
+
### R7 — order_allocators (fund distribution + Treasury)
|
|
173
|
+
|
|
174
|
+
- **Semantic meaning**: Define how order funds are distributed — your revenue model. This is written to `service.order_allocators` and is **L1-locked after publish**, so it must be correct now.
|
|
175
|
+
- **Core elements to confirm**:
|
|
176
|
+
- Allocation mode per terminal outcome: **amount** (fixed) / **rate** (basis points, sum = 10000) / **surplus** (remainder, at most one).
|
|
177
|
+
- Recipient (`who`): `{Entity: name_or_address}` / `{GuardIdentifier: N}` / `{Signer: "signer"}`.
|
|
178
|
+
- **Merchant-type guidance (disclosed to the user)**:
|
|
179
|
+
- **Personal merchant** → route funds to the **Permission owner** (`Entity` referencing the owner's account) — simple, single-owner revenue.
|
|
180
|
+
- **Organization / multi-party** → route funds to a **Treasury** object (referenced as an `Entity` recipient; `Treasury.receive` index 253 intakes CoinWrapper). The AI MUST offer to **new or select a Treasury** via a sub-task, and surface a list of existing Treasury objects (query `onchain_objects` type=treasury) for convenience.
|
|
181
|
+
- **Default config**: industry mode's `allocator` strategy (e.g. `retail_d2c` = Merchant 97% + Processor 3% rate split). Disclose, then let the user confirm or change.
|
|
182
|
+
- **Reuse / Customize / Discover**: Reuse an existing Allocator pattern / Treasury. Customize the split. Discover other projects' allocator/Treasury setups.
|
|
183
|
+
- **Dependencies**: Machine published (R5); Guards (R4); Service draft (R3).
|
|
184
|
+
- **⚠️ L1-LOCKED**: `order_allocators` MUST be set here — after `service.publish` it is permanently frozen.
|
|
185
|
+
|
|
186
|
+
### R8 — Contact (customer-service channel)
|
|
187
|
+
|
|
188
|
+
- **Semantic meaning**: Contact is the bridge between the Service and Messenger: `Service.um → Contact → ims[]` (messenger endpoint addresses). Customers query the Contact's `ims[]` to find where to send messages. Without it, your service has no customer-service inbox.
|
|
189
|
+
- **Core elements to confirm**:
|
|
190
|
+
- **Reuse an existing Contact** OR **create new**.
|
|
191
|
+
- If new: configure the **local account as messenger** (`account_operation` → messenger, `enabled: true`) and set **anti-spam** policy.
|
|
192
|
+
- **Default config** (disclosed before creation):
|
|
193
|
+
- Contact is **mutable**; `im_add`/`im_remove` require permission index `453` (CONTACT_IM).
|
|
194
|
+
- Messenger must be `enabled: true` or the account has no endpoint.
|
|
195
|
+
- **Anti-spam four-layer model** (Blacklist → Friends → Guard → Stranger one-message limit): **Open** (public storefront) / **Guarded** (verified strangers) / **Closed** (friends-only) / **Defensive** (open + blacklist).
|
|
196
|
+
- **Reuse / Customize / Discover**: Reuse an existing Contact (one inbox for multiple services). Customize: new Contact + own messenger/anti-spam. Discover: `local_mark_list` for existing Contacts.
|
|
197
|
+
- **Dependencies**: Permission (R2) + Account (R1). Must happen BEFORE R11 (Service publish) if `customer_required` is set.
|
|
198
|
+
|
|
199
|
+
### R9 — Arbitration (third-party dispute resolution)
|
|
200
|
+
|
|
201
|
+
- **Semantic meaning**: Route disputes to an independent third party so neither you nor the customer controls the verdict — this builds trust. **Optional but strongly recommended.**
|
|
202
|
+
- **Core elements to confirm**:
|
|
203
|
+
- **Skip** arbitration, OR **REUSE an existing third-party Arbitration** (recommended).
|
|
204
|
+
- ⚠️ **Do NOT create your own Arbitration for your own Service** — `service.arbitration_add` asserts `arbitration.permission != service.permission` (`E_ARBITRATION_PERMISSION_CONFLICT`, 33): if the Arbitration shares your Service's Permission, you (the owner) would control dispute resolution, breaking fairness.
|
|
205
|
+
- If adding arbitration: also configure the **compensation fund** (see below).
|
|
206
|
+
- **Compensation fund**: internal `Balance<T>` on the Service (NOT a Treasury object), consumed by `arbitration::compensation_claim`. If `compensation_fund > 0`, `arbitrations` MUST be non-empty (else publish aborts `E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND` 25). Deposit via `compensation_fund_add`; withdraw via `compensation_fund_withdraw` requires `bPaused=true` + lock elapsed. Amount = user decision (cover realistic payouts).
|
|
207
|
+
- **Reuse / Customize / Discover**: Reuse an existing Arbitration (safety rules mark arbitration as `always_reuse` — query `schema_query` action='get_safety_rules'; customers choose from established arbiters). Discover: query `onchain_objects` type=arbitration for existing Arb services.
|
|
208
|
+
- **Dependencies**: Service draft (R3) + Permission (R2). Must happen BEFORE R11 (Service publish) if compensation_fund is configured.
|
|
209
|
+
|
|
210
|
+
### R10 — Optional Components + Pre-Publish Audit
|
|
211
|
+
|
|
212
|
+
- **Semantic meaning**: Add optional trust/attraction components (Reward for loyalty, supply-chain promises, Repository), then run a **final risk audit** before publishing.
|
|
213
|
+
- **Core elements to confirm** (each optional, each with default disclosure + reuse/customize/discover):
|
|
214
|
+
- Reward (discounts/loyalty).
|
|
215
|
+
- Supply-chain promises / Repository.
|
|
216
|
+
- Audit: `evaluate_project` (risk) — fix ALL CRITICAL findings.
|
|
217
|
+
- **Default config**: none required — these are opt-in. The audit itself is mandatory.
|
|
218
|
+
- **Reuse / Customize / Discover**: each optional component can be created or discovered.
|
|
219
|
+
- **Dependencies**: R1–R9.
|
|
220
|
+
|
|
221
|
+
### R11 — Publish Service
|
|
222
|
+
|
|
223
|
+
- **Semantic meaning**: Make the service live. Irreversible — `machine`, `order_allocators`, and `arbitrations` become permanently frozen.
|
|
224
|
+
- **Core elements to confirm**: confirm publish (Phase 2: only flips `publish: true`; all L1 fields were set in R5–R9).
|
|
225
|
+
- **Default config**: n/a — confirmation gate.
|
|
226
|
+
- **Reuse / Customize / Discover**: n/a.
|
|
227
|
+
- **Dependencies**: R10 audit passed.
|
|
228
|
+
|
|
229
|
+
### R12 — Test Order (user-driven, next-node disclosure)
|
|
230
|
+
|
|
231
|
+
- **Semantic meaning**: Run a real order end-to-end to verify the flow. Unlike other rounds, this one advances through the Machine step by step, with the AI disclosing every reachable next node before each move.
|
|
232
|
+
- **Core elements to confirm**:
|
|
233
|
+
- **Test account**: which account places the order — default is the **service-creation account**, but the user may choose another account to simulate a buyer.
|
|
234
|
+
- **Advance path**: at each node, the user chooses which next node to advance to.
|
|
235
|
+
- **Per-node disclosure (before each advance)**: state current node + all reachable next nodes; for each, the operation (`order.progress` for `namedOperator=""` / `progress.operate` otherwise), required permission, Guard acceptance (`retained_submission`), and business meaning.
|
|
236
|
+
- **Default config**: test account = service-creation account.
|
|
237
|
+
- **Reuse / Customize / Discover**: n/a (verification).
|
|
238
|
+
- **Dependencies**: Service published (R11) — `order_new` requires `bPublished=true`.
|
|
239
|
+
- **Sequence**: `order_new` → query current node's forwards → user picks a next node → advance (`order.progress` / `progress.operate`) → repeat until terminal → `allocation.alloc_by_guard` → verify fund distribution.
|
|
114
240
|
|
|
115
241
|
---
|
|
116
242
|
|
|
117
243
|
## Industry Selection Guide
|
|
118
244
|
|
|
119
|
-
When the user describes their business (
|
|
120
|
-
|
|
121
|
-
| Industry | Mode | One-line Description |
|
|
122
|
-
|----------|------|----------------------|
|
|
123
|
-
| `general` | `general` | Free-form / hybrid — no presets, full manual control |
|
|
124
|
-
| `retail` | `general` (retail profile) | Physical goods sales with stock + WIP product listings |
|
|
125
|
-
| `service` | `general` (service profile) | Intangible services (consulting, design) — milestone delivery |
|
|
126
|
-
| `rental` | `rental` | Equipment / vehicle / property rental with deposit escrow + return inspection (R-M1-11 compliant — uses `return_approved`/`damage_confirmed`/`arbiter_rule` routing nodes, NO `deposit_refunded`/`deposit_deducted`/`refunded` terminal nodes; topology auto-applied by `project_operation.create_project` with `project_industry='rental'` from MCP `knowledge/scenario-modes.ts`) |
|
|
127
|
-
| `freelance` | `freelance` | Design / dev / consulting — milestone allocation + acceptance gate |
|
|
128
|
-
| `education` | `education` | Courses / training / tutoring — periodic release per session attendance |
|
|
129
|
-
| `travel` | `travel` | Custom tours / multi-segment trips — multi-tier allocation per segment |
|
|
130
|
-
| `subscription` | `subscription` | SaaS / content membership / periodic service — periodic charge + cancel guard |
|
|
131
|
-
|
|
132
|
-
> If unsure which fits, call `project_operation` action='recommend_industry' with the user's business description — it returns top-3 industry matches with reference examples. To iterate a mode mid-onboarding, use action='derive_user_mode' / 'evolve_user_mode' (user mode registry in MCP).
|
|
245
|
+
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`.
|
|
133
246
|
|
|
134
247
|
---
|
|
135
248
|
|
|
136
249
|
## Deployment Checklist
|
|
137
250
|
|
|
138
|
-
Before declaring onboarding complete,
|
|
139
|
-
|
|
140
|
-
| # | Item | How to Verify |
|
|
141
|
-
|---|------|---------------|
|
|
142
|
-
| 1 | Permission created | `query_toolkit` (onchain_objects, type=permission) returns object |
|
|
143
|
-
| 2 | Machine published | `query_toolkit` (onchain_objects, type=machine) → `bPublished: true` |
|
|
144
|
-
| 2b | **R-M1-11 compliance** (rental / deposit / refund scenarios only) | `machineNode2file` export → grep node names; MUST NOT contain `deposit_refunded`/`deposit_deducted`/`refunded`; MUST contain routing nodes (`return_approved`/`damage_confirmed`/`arbiter_rule`) with bound Allocators (item 4) |
|
|
145
|
-
| 3 | Guards created | `query_toolkit` (onchain_objects, type=guard) returns all expected guards |
|
|
146
|
-
| 4 | Allocators configured | Each Allocator `sharing[].sharing` Rate entries sum to **10000** (Rate mode); or `Amount` mode values set. For rental/refund scenarios, verify Allocators' `trigger_node` references the routing nodes (e.g., `return_approved`) — NOT missing (else R-M1-11 refund path is broken) |
|
|
147
|
-
| 5 | Service created with all bindings | `query_toolkit` (onchain_objects, type=service) → machine, order_allocators, buy_guard all non-empty |
|
|
148
|
-
| 6 | Service published | `query_toolkit` (onchain_objects, type=service) → `bPublished: true` |
|
|
149
|
-
| 7 | Test order placed | R9 test order created via `service.order_new` + Progress advanced + Allocator triggered successfully |
|
|
150
|
-
|
|
151
|
-
> If any item fails, do NOT proceed to handoff. Fix the underlying issue, then re-verify. Use `project_operation.evaluate_project` (risk) to auto-detect missing bindings.
|
|
251
|
+
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.
|
|
152
252
|
|
|
153
253
|
---
|
|
154
254
|
|
|
155
255
|
## Common Errors
|
|
156
256
|
|
|
157
|
-
|
|
158
|
-
|-------|-------|-----|
|
|
159
|
-
| `dynamicFieldNotFound` | SDK cannot resolve a dynamic field reference | Set `env.account` (account not configured) — pass account in the tool call wrapper |
|
|
160
|
-
| `Circular dependency` (Guard ↔ Service creation) | Guard needs Service address; Service needs Guard address | Use **LocalMark NAME** (not address) in Guard query table — pattern documented in MCP `schema_query` action='get_guard_design_patterns' |
|
|
161
|
-
| `order.balance invalid` | Used wrong field for order amount | Use `order.amount` (not `order.balance` — `balance` is residual escrow, `amount` is original payment) |
|
|
162
|
-
| Allocator `rate sum != 10000` | Rate-mode Allocator sharing percentages don't sum to 100% | Ensure all `sharing[].sharing` values in Rate mode sum to exactly **10000** basis points (e.g., 80% = 8000) |
|
|
163
|
-
| `IMPACK_GUARD_NOT_FOUND` (gen_passport) | Repository query with `quote_guard = Some(addr)` | `impack_list` is empty during verify phase — only `quote_guard = None` passes; see MCP `schema_query` action='get_guard_design_patterns' |
|
|
164
|
-
| `Permission denied` (Progress advance, abort code 5) | Wrong operation path for forward's `namedOperator` | Empty `namedOperator` → use `order.progress`; non-empty → use `progress.operate`; `permissionIndex` → use `progress.operate` |
|
|
165
|
-
| Allocator never fires (refund stuck) — R-M1-11 violation | Machine has a node like `deposit_refunded` instead of routing node `return_approved`; or Allocator's `trigger_node` is missing/mispelled | Rename node to `return_approved` / `damage_confirmed`; bind Allocator to that node; R-M1-11 is auto-enforced by MCP pre-publish checks and `project_operation.evaluate_project` |
|
|
257
|
+
Known field-name / unit / workflow pitfalls are served by `wowok_buildin_info` action='common mistakes' (filter by `operation` or `category`). Error-code guidance (`E_ARBITRATION_PERMISSION_CONFLICT` 33, `E_ARBITRATION_NOT_SET_WITH_COMPENSATION_FUND` 25, R-M1-11 refund routing) already appears in the R-rounds above plus MCP `schema_query` action='get_safety_rules' / 'get_guard_design_patterns'. Consult those instead of a duplicated table.
|