@wowok/skills 1.2.4 → 1.2.6
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 +34 -16
- package/dist/cli.js +6 -2
- package/dist/cli.js.map +1 -1
- package/dist/skills.d.ts +32 -1
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +63 -0
- package/dist/skills.js.map +1 -1
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/examples/Insurance/Insurance.md +543 -475
- package/examples/MyShop/MyShop.md +865 -746
- package/examples/MyShop_Advanced/MyShop_Advanced.md +1520 -1376
- package/examples/ThreeBody_Signature/ThreeBody_Signature.md +891 -651
- package/examples/Travel/Travel.md +952 -848
- package/package.json +2 -2
- package/scripts/install.js +3 -17
- package/wowok-arbitrator/SKILL.md +18 -57
- package/wowok-auditor/SKILL.md +16 -12
- package/wowok-distill/SKILL.md +237 -0
- package/wowok-guard/SKILL.md +40 -354
- package/wowok-machine/SKILL.md +21 -127
- package/wowok-messenger/SKILL.md +14 -59
- package/wowok-onboard/SKILL.md +42 -12
- package/wowok-order/SKILL.md +20 -169
- package/wowok-output/SKILL.md +0 -10
- package/wowok-planner/SKILL.md +29 -9
- package/wowok-provider/SKILL.md +72 -32
- package/wowok-safety/SKILL.md +8 -80
- package/wowok-scenario/SKILL.md +70 -102
- package/wowok-tools/SKILL.md +68 -107
- package/references/glossary.ts +0 -297
- package/references/guard-scenario-ledger.md +0 -353
- package/references/guard-template-library.md +0 -481
- package/references/machine-design-reference.md +0 -398
- package/references/machine-scenario-ledger.md +0 -227
- package/references/machine-template-library.md +0 -522
- package/references/merchant-scenario-coordination.md +0 -383
- package/references/object-collaboration.md +0 -362
- package/references/onchain-constants.md +0 -81
- package/wowok-arbitrator/APPENDIX.md +0 -545
- package/wowok-auditor/APPENDIX.md +0 -487
- package/wowok-guard/APPENDIX.md +0 -430
- package/wowok-machine/APPENDIX.md +0 -407
- package/wowok-messenger/APPENDIX.md +0 -550
- package/wowok-onboard/APPENDIX.md +0 -502
- package/wowok-order/APPENDIX.md +0 -777
- package/wowok-output/APPENDIX.md +0 -575
- package/wowok-planner/APPENDIX.md +0 -726
- package/wowok-provider/APPENDIX.md +0 -455
- package/wowok-safety/APPENDIX.md +0 -565
- package/wowok-scenario/APPENDIX.md +0 -97
- package/wowok-scenario/MODE-DETAILS.md +0 -275
- package/wowok-tools/APPENDIX.md +0 -394
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wowok/skills",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
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",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/",
|
|
12
|
-
"references/",
|
|
13
12
|
"wowok-provider/",
|
|
14
13
|
"wowok-arbitrator/",
|
|
15
14
|
"wowok-guard/",
|
|
@@ -23,6 +22,7 @@
|
|
|
23
22
|
"wowok-scenario/",
|
|
24
23
|
"wowok-planner/",
|
|
25
24
|
"wowok-auditor/",
|
|
25
|
+
"wowok-distill/",
|
|
26
26
|
"examples/",
|
|
27
27
|
"scripts/install.js",
|
|
28
28
|
"README.md",
|
package/scripts/install.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* preuninstall → remove SKILL.md folders from all installed client dirs
|
|
7
7
|
*
|
|
8
8
|
* Environment variables:
|
|
9
|
-
* WOWOK_SKILLS_TARGETS Comma-separated client targets (claude,agents,codebuddy)
|
|
10
|
-
* Defaults to "claude". Example: "claude,agents"
|
|
9
|
+
* WOWOK_SKILLS_TARGETS Comma-separated client targets (claude,codex,agents,codebuddy,cursor,copilot)
|
|
10
|
+
* Defaults to "claude". Example: "claude,agents,cursor"
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
const fs = require('fs');
|
|
@@ -28,6 +28,7 @@ const SKILL_DIRS = [
|
|
|
28
28
|
'wowok-scenario',
|
|
29
29
|
'wowok-planner',
|
|
30
30
|
'wowok-auditor',
|
|
31
|
+
'wowok-distill',
|
|
31
32
|
];
|
|
32
33
|
|
|
33
34
|
const CLIENT_DIRS = {
|
|
@@ -160,14 +161,6 @@ function installSkills(targetDir, target) {
|
|
|
160
161
|
console.log(`[wowok-skills] installed: ${dir} → ${dest}`);
|
|
161
162
|
}
|
|
162
163
|
|
|
163
|
-
// Copy references/ directory (shared reference docs linked by SKILL.md files)
|
|
164
|
-
const refsSrc = path.join(pkgRoot, 'references');
|
|
165
|
-
if (fs.existsSync(refsSrc)) {
|
|
166
|
-
const refsDest = path.join(targetDir, 'references');
|
|
167
|
-
copyDir(refsSrc, refsDest);
|
|
168
|
-
console.log(`[wowok-skills] installed: references/ → ${refsDest}`);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
164
|
return count;
|
|
172
165
|
}
|
|
173
166
|
|
|
@@ -183,13 +176,6 @@ function uninstallSkills(targetDir) {
|
|
|
183
176
|
}
|
|
184
177
|
}
|
|
185
178
|
|
|
186
|
-
// Remove references/ directory
|
|
187
|
-
const refsPath = path.join(targetDir, 'references');
|
|
188
|
-
if (fs.existsSync(refsPath)) {
|
|
189
|
-
removeDir(refsPath);
|
|
190
|
-
console.log(`[wowok-skills] removed: ${refsPath}`);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
179
|
return count;
|
|
194
180
|
}
|
|
195
181
|
|
|
@@ -18,7 +18,21 @@ when_to_use:
|
|
|
18
18
|
|
|
19
19
|
Build trust through fair dispute resolution. Arbitration services enable neutral third parties to resolve conflicts between customers and merchants, earning fees while establishing on-chain reputation.
|
|
20
20
|
|
|
21
|
-
> **Related Skills**: [wowok-order](../wowok-order/SKILL.md) (customer disputes), [wowok-provider](../wowok-provider/SKILL.md) (service arbitration config), [wowok-
|
|
21
|
+
> **Related Skills**: [wowok-order](../wowok-order/SKILL.md) (customer disputes), [wowok-provider](../wowok-provider/SKILL.md) (service arbitration config), [wowok-machine](../wowok-machine/SKILL.md) (workflow analysis), [wowok-messenger](../wowok-messenger/SKILL.md) (evidence exchange)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## MCP Knowledge Layer
|
|
26
|
+
|
|
27
|
+
The following content has been pushed down to the MCP knowledge layer and is applied automatically — this Skill no longer duplicates it:
|
|
28
|
+
|
|
29
|
+
| Content | MCP Knowledge Module | Applied Via |
|
|
30
|
+
|---------|---------------------|-------------|
|
|
31
|
+
| Guard design rules (structural layers, data source classification, voting_guard table design) | `knowledge/guard-design-patterns.ts` (`GUARD_DESIGN_PATTERNS`) | `project_operation.aggregate_risks` (via `assessGuardRisks`) |
|
|
32
|
+
| Safety rules (confirmation levels, immutability, object reuse) | `knowledge/safety-rules.ts` (`CONFIRMATION_RULES`) | Pre-publish checks + `project_operation.aggregate_risks` |
|
|
33
|
+
| Arbitration-specific risks | `knowledge/arb-risk.ts` (`assessArbitrationRisks`) | `project_operation.aggregate_risks` |
|
|
34
|
+
|
|
35
|
+
This Skill keeps the arbitration **conversation flow**, **evidence collection** scripts, and **dispute resolution** guidance — the MCP layer handles the rule evaluation.
|
|
22
36
|
|
|
23
37
|
---
|
|
24
38
|
|
|
@@ -50,13 +64,7 @@ User says "just make something up" → REFUSE and explain why each item matters.
|
|
|
50
64
|
|
|
51
65
|
### Information Collection Protocol
|
|
52
66
|
|
|
53
|
-
|
|
54
|
-
STEP 0: Present checklist R1-R6 to user
|
|
55
|
-
├── Each item: "Reuse or create new? Provide details."
|
|
56
|
-
├── Track status: [pending] / [confirmed: reuse <id>] / [confirmed: create]
|
|
57
|
-
└── ⛔ GATE: ALL R1-R6 must be [confirmed] before any on-chain action
|
|
58
|
-
└── NOT confirmed → STOP. Ask. Do NOT suggest creating arbitration.
|
|
59
|
-
```
|
|
67
|
+
Present checklist R1-R6 to user. Each item: "Reuse or create new? Provide details." Track status: [pending] / [confirmed: reuse <id>] / [confirmed: create]. ⛔ GATE: ALL R1-R6 must be [confirmed] before any on-chain action — NOT confirmed → STOP. Ask. Do NOT suggest creating arbitration.
|
|
60
68
|
|
|
61
69
|
All subsequent on-chain operations use R1 (Account) as `env.account`.
|
|
62
70
|
|
|
@@ -133,11 +141,10 @@ Customer dispute creates Arb directly at (1). State (0) entered only via `reset`
|
|
|
133
141
|
- `FixedValue(u32)`: Equal weight for all qualified voters
|
|
134
142
|
- `GuardIdentifier(u8)`: Dynamic weight from credential (e.g., reputation score, token balance)
|
|
135
143
|
- Max 50 guards — enables tiered voting (experts + community, token-holders + NFT-holders)
|
|
136
|
-
- **Guard table design**: When using `GuardIdentifier`, the referenced index must be a `b_submission: true` entry of **numeric type** (U8–U256). Its value is cast to u32 as the voter's weight. The `name` field of that entry should explain its purpose to Passport applicants.
|
|
137
144
|
|
|
138
145
|
**Voting Flow**: Voter selects a voting guard → System verifies voter's Passport against that guard → Calculates weight based on guard's rule → Applies weight to selected propositions. One vote per voter per case.
|
|
139
146
|
|
|
140
|
-
> **Guard Design Reference**: Voting
|
|
147
|
+
> **Guard Design Reference**: Voting guard construction rules (table design, computation trees, `GuardIdentifier` submission-type requirements) now live in the MCP knowledge layer — see `knowledge/guard-design-patterns.ts` (`GUARD_DESIGN_PATTERNS`), auto-applied via `project_operation.aggregate_risks`. Test voting logic with `gen_passport` before finalizing.
|
|
141
148
|
|
|
142
149
|
---
|
|
143
150
|
|
|
@@ -168,19 +175,7 @@ Customer dispute creates Arb directly at (1). State (0) entered only via `reset`
|
|
|
168
175
|
|
|
169
176
|
### Revenue Flow
|
|
170
177
|
|
|
171
|
-
|
|
172
|
-
Customer pays fee
|
|
173
|
-
│
|
|
174
|
-
▼
|
|
175
|
-
Arb.fee (locked per case)
|
|
176
|
-
│
|
|
177
|
-
│ arb_withdraw()
|
|
178
|
-
▼
|
|
179
|
-
Arbitration.balance
|
|
180
|
-
│
|
|
181
|
-
├──→ Allocation (revenue sharing)
|
|
182
|
-
└──→ Treasury (controlled withdrawal)
|
|
183
|
-
```
|
|
178
|
+
Customer pays fee → locked in `Arb.fee` per case → `arb_withdraw()` transfers to `Arbitration.balance` → distributed via Allocation (revenue sharing) or Treasury (controlled withdrawal).
|
|
184
179
|
|
|
185
180
|
### Compensation System
|
|
186
181
|
|
|
@@ -217,20 +212,6 @@ Providers list approved Arbitrations in their Service. Customers choose from thi
|
|
|
217
212
|
|
|
218
213
|
## Quick Reference
|
|
219
214
|
|
|
220
|
-
### Essential Operations
|
|
221
|
-
|
|
222
|
-
| Operation | State | Purpose |
|
|
223
|
-
|-----------|-------|---------|
|
|
224
|
-
| `confirm` | (1)→(2) | Start voting, set deadline |
|
|
225
|
-
| `reset` | (1)→(0), (4)→(0) | Request revision (requires feedback) |
|
|
226
|
-
| `vote` | (2) | Cast weighted votes |
|
|
227
|
-
| `arbitration` | (2)→(3) | Finalize verdict (**irreversible**) |
|
|
228
|
-
| `arb_withdraw` | (5), (3), (4) | Extract fee (30-day wait if not finished) |
|
|
229
|
-
|
|
230
|
-
### Common Workflows
|
|
231
|
-
|
|
232
|
-
See [Core Architecture > Key Flows](#arb-state-machine) above.
|
|
233
|
-
|
|
234
215
|
### Critical Constraints
|
|
235
216
|
|
|
236
217
|
- Max 20 propositions per case
|
|
@@ -241,14 +222,6 @@ See [Core Architecture > Key Flows](#arb-state-machine) above.
|
|
|
241
222
|
- ⛔ `arbitration` verdict is **irreversible** by arbitrator — only customer can object
|
|
242
223
|
- ⛔ `feedback` is **permanently public on-chain** — use Messenger for privacy-sensitive communication
|
|
243
224
|
|
|
244
|
-
### Schema Access
|
|
245
|
-
|
|
246
|
-
```javascript
|
|
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
|
-
```
|
|
251
|
-
|
|
252
225
|
---
|
|
253
226
|
|
|
254
227
|
## Best Practices
|
|
@@ -273,15 +246,3 @@ wowok({ tool: "schema_query", data: { action: "get", name: "messenger_operation"
|
|
|
273
246
|
| **Unverified evidence** | Ruling based on invalid claims | Always verify WTS first |
|
|
274
247
|
|
|
275
248
|
---
|
|
276
|
-
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
## Appendices (Progressive Disclosure)
|
|
280
|
-
|
|
281
|
-
> The following sections have been extracted to [APPENDIX.md](./APPENDIX.md) for on-demand loading:
|
|
282
|
-
> - Dialogue Scripts (R1-R10) — guided conversation scripts
|
|
283
|
-
> - Decision Trees — branching logic reference
|
|
284
|
-
> - Failure Playbooks — recovery scenarios
|
|
285
|
-
> - Tier Layering — expertise-tier based guidance
|
|
286
|
-
>
|
|
287
|
-
> Load APPENDIX.md when the user needs guided dialogue, recovery help, or tier-specific guidance.
|
package/wowok-auditor/SKILL.md
CHANGED
|
@@ -26,9 +26,23 @@ writes on-chain; it queries (`query_toolkit`, `onchain_events`), exports
|
|
|
26
26
|
(`guard2file`, `machineNode2file`), evaluates rule tables, and emits a
|
|
27
27
|
pass / warn / fail report. A FAIL blocks the publish in R10.
|
|
28
28
|
|
|
29
|
-
> **Role**: Auditor (read-only).
|
|
29
|
+
> **Role**: Auditor (read-only). The pre-write safety gate now lives in the MCP knowledge layer (`knowledge/safety-rules.ts`), applied on every write; this auditor runs only on publish.
|
|
30
30
|
> **Layer**: L3 Skill, knowledge base for L4 Verify Loop.
|
|
31
|
-
> **Related Skills**: [wowok-
|
|
31
|
+
> **Related Skills**: [wowok-machine](../wowok-machine/SKILL.md) (Machine design), [wowok-onboard](../wowok-onboard/SKILL.md) (publish flow).
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## MCP Knowledge Layer
|
|
36
|
+
|
|
37
|
+
The following content has been pushed down to the MCP knowledge layer and is applied automatically — this Skill no longer duplicates it:
|
|
38
|
+
|
|
39
|
+
| Content | MCP Knowledge Module | Applied Via |
|
|
40
|
+
|---------|---------------------|-------------|
|
|
41
|
+
| Safety rules (confirmation levels, immutability rules, object reuse rules) | `knowledge/safety-rules.ts` (`CONFIRMATION_RULES`, `ConfirmLevel`) | Pre-publish checks + `project_operation.aggregate_risks` |
|
|
42
|
+
| Machine-executable audit rules | `knowledge/audit-rules.ts` (`AUDIT_RULES`, `auditService`) | `project_operation.aggregate_risks` |
|
|
43
|
+
| Guard completeness / Machine soundness / fund-flow risks | `knowledge/guard-risk.ts`, `machine-risk.ts`, per-object risk modules | `project_operation.aggregate_risks` (via per-object assessors) |
|
|
44
|
+
|
|
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.
|
|
32
46
|
|
|
33
47
|
---
|
|
34
48
|
|
|
@@ -98,13 +112,3 @@ pass / warn / fail report. A FAIL blocks the publish in R10.
|
|
|
98
112
|
| Backup export | `machineNode2file` + `guard2file` backups persisted | WARN: no backup |
|
|
99
113
|
|
|
100
114
|
---
|
|
101
|
-
|
|
102
|
-
## Appendices (Progressive Disclosure)
|
|
103
|
-
|
|
104
|
-
> The following sections have been extracted to [APPENDIX.md](./APPENDIX.md) for on-demand loading:
|
|
105
|
-
> - Dialogue Scripts (R1-R10) — guided conversation scripts
|
|
106
|
-
> - Decision Trees — branching logic reference
|
|
107
|
-
> - Failure Playbooks — recovery scenarios
|
|
108
|
-
> - Tier Layering — expertise-tier based guidance
|
|
109
|
-
>
|
|
110
|
-
> Load APPENDIX.md when the user needs guided dialogue, recovery help, or tier-specific guidance.
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wowok-distill
|
|
3
|
+
description: |
|
|
4
|
+
WoWok Distillation Review Orchestrator — guides merchants through reviewing and applying
|
|
5
|
+
AI-generated improvement proposals from the Loop Engineering flywheel.
|
|
6
|
+
|
|
7
|
+
This skill is a STATELESS CONVERSATION ORCHESTRATOR (per GLM5 §6.3): it does not hold
|
|
8
|
+
persistent state. All data comes from MCP project_operation actions:
|
|
9
|
+
- get_improvement_queue: list pending/approved proposals
|
|
10
|
+
- apply_improvement: review + apply a proposal (config_override or source_patch)
|
|
11
|
+
- get_flywheel_config: query reflow loop status
|
|
12
|
+
|
|
13
|
+
Use when: user asks "what improvements are suggested?", "show me optimization proposals",
|
|
14
|
+
"what did the system learn from my operations?", or wants to review/apply/reject
|
|
15
|
+
improvement proposals generated by the offline flywheel.
|
|
16
|
+
when_to_use:
|
|
17
|
+
- User asks about improvement suggestions or optimization proposals
|
|
18
|
+
- User wants to review what the flywheel has learned from their operations
|
|
19
|
+
- User wants to apply or reject a distillation proposal
|
|
20
|
+
- User mentions "improvement", "optimization", "flywheel", "distillation", "proposal", "override"
|
|
21
|
+
- User wants to see how their operational patterns have evolved
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# WoWok Distillation Review Orchestrator
|
|
25
|
+
|
|
26
|
+
> **Role**: Distillation Review Orchestrator (Stateless)
|
|
27
|
+
> **Design**: GLM5 §6.3-§6.4 — zero persistent state, all data from MCP actions
|
|
28
|
+
> **Related Skills**: [wowok-provider](../wowok-provider/SKILL.md) (merchant context), [wowok-tools](../wowok-tools/SKILL.md) (MCP tool usage)
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Core Concept
|
|
33
|
+
|
|
34
|
+
The WoWok MCP server runs an offline flywheel (Loop Engineering pipeline) that:
|
|
35
|
+
1. Collects operational signals from your project deployments
|
|
36
|
+
2. Updates industry cognition (trait drift, health scores)
|
|
37
|
+
3. Generates improvement proposals (risk threshold tweaks, description refinements, scenario defaults)
|
|
38
|
+
4. Persists proposals to `~/.wowok/improvement-queue.jsonl`
|
|
39
|
+
|
|
40
|
+
**This skill helps you review and act on those proposals.** It is a conversation orchestrator —
|
|
41
|
+
it asks questions, presents proposals in human-readable form, and calls MCP actions to apply
|
|
42
|
+
your decisions. It does NOT hold state between conversations.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Orchestration Flow (6 Steps)
|
|
47
|
+
|
|
48
|
+
### Step 1: Retrieve the Improvement Queue
|
|
49
|
+
|
|
50
|
+
Call the MCP `project_operation` action with:
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"action": "get_improvement_queue",
|
|
54
|
+
"queue_filter_status": "pending"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This returns a list of pending proposals. Each proposal has:
|
|
59
|
+
- `proposal_id`: unique identifier
|
|
60
|
+
- `type`: proposal category (risk-threshold / descriptions / industry-profiles / scenario-defaults / recovery-priorities)
|
|
61
|
+
- `priority`: P0 (critical) / P1 (high) / P2 (medium) / P3 (low)
|
|
62
|
+
- `title`: short description
|
|
63
|
+
- `description`: detailed explanation
|
|
64
|
+
- `confidence`: 0.0-1.0 (how confident the flywheel is)
|
|
65
|
+
- `apply_mode`: "config_override" (writes to ~/.wowok/overrides/) or "source_patch" (produces patches/)
|
|
66
|
+
- `proposed_change`: the specific change being proposed
|
|
67
|
+
|
|
68
|
+
### Step 2: Present Proposals with Narrative
|
|
69
|
+
|
|
70
|
+
For each proposal, present to the user:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
📋 Proposal [P1] proposal-001: "Lower retry threshold for rental deposits"
|
|
74
|
+
|
|
75
|
+
Type: risk-thresholds
|
|
76
|
+
Confidence: 0.82 (high)
|
|
77
|
+
Apply Mode: config_override (safe — writes to ~/.wowok/overrides/risk-thresholds.json)
|
|
78
|
+
|
|
79
|
+
Current: max_deposit_retries = 5
|
|
80
|
+
Proposed: max_deposit_retries = 3
|
|
81
|
+
|
|
82
|
+
Rationale: Based on 23 rental operations analyzed, 92% of successful deposits
|
|
83
|
+
complete within 3 retries. Reducing the threshold saves gas on failed retries
|
|
84
|
+
without impacting success rate.
|
|
85
|
+
|
|
86
|
+
Impact: Affects rental industry profile only. No effect on other industries.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Step 3: Explain the "Why" (Narrative)
|
|
90
|
+
|
|
91
|
+
Use the proposal's `description` and `evidence` fields to explain:
|
|
92
|
+
- **What pattern was detected** in the user's operational history
|
|
93
|
+
- **Why the flywheel recommends this change** (data-driven, not opinion)
|
|
94
|
+
- **What happens if applied** (immediate effect on future operations)
|
|
95
|
+
- **What happens if rejected** (no change — proposal stays in queue as "rejected")
|
|
96
|
+
|
|
97
|
+
### Step 4: Guide User Decision
|
|
98
|
+
|
|
99
|
+
Present three options for each proposal:
|
|
100
|
+
|
|
101
|
+
| Option | Action | MCP Call |
|
|
102
|
+
|--------|--------|----------|
|
|
103
|
+
| **Apply** | Approve + apply immediately | `apply_improvement` with `review_status: "approved"` |
|
|
104
|
+
| **Reject** | Mark as not wanted | `apply_improvement` with `review_status: "rejected"` |
|
|
105
|
+
| **Later** | Skip for now (stays pending) | No call — move to next proposal |
|
|
106
|
+
|
|
107
|
+
### Step 5: Execute the Decision
|
|
108
|
+
|
|
109
|
+
When the user chooses "Apply", call:
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"action": "apply_improvement",
|
|
113
|
+
"proposal_id": "proposal-001",
|
|
114
|
+
"review_status": "approved"
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The MCP server will:
|
|
119
|
+
- For `config_override`: write the override to `~/.wowok/overrides/<category>.json`
|
|
120
|
+
- For `source_patch`: produce a patch file in `~/.wowok/patches/`
|
|
121
|
+
- Update the proposal status to "applied"
|
|
122
|
+
- Refresh the knowledge layer cache (so future actions use the new config)
|
|
123
|
+
|
|
124
|
+
### Step 6: Confirm the Result
|
|
125
|
+
|
|
126
|
+
After applying, present:
|
|
127
|
+
```
|
|
128
|
+
✅ Proposal proposal-001 applied successfully!
|
|
129
|
+
|
|
130
|
+
Override written to: ~/.wowok/overrides/risk-thresholds.json
|
|
131
|
+
Effect: Future rental operations will use max_deposit_retries=3
|
|
132
|
+
|
|
133
|
+
The knowledge layer has been refreshed. New operations will use the updated
|
|
134
|
+
threshold immediately. No restart needed.
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Flywheel Status Query
|
|
140
|
+
|
|
141
|
+
If the user asks about the overall flywheel status (not specific proposals), call:
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"action": "get_flywheel_config"
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
This returns:
|
|
149
|
+
- `queue_path`: where proposals are stored
|
|
150
|
+
- `overrides_dir`: where overrides live
|
|
151
|
+
- `patches_dir`: where patches are produced
|
|
152
|
+
- `total_proposals` / `pending_count` / `approved_count` / `applied_count` / `rejected_count`
|
|
153
|
+
- `override_files`: list of existing override files
|
|
154
|
+
- `recent_proposals`: recent 10 proposals (all statuses)
|
|
155
|
+
- `reflow_status`: "active" (pending proposals exist) / "idle" (no proposals) / "blocked" (approved but not applied)
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Override Categories (§4.4 Whitelist)
|
|
160
|
+
|
|
161
|
+
Only these 5 categories can be overridden via `config_override`:
|
|
162
|
+
|
|
163
|
+
| Category | Description | Example |
|
|
164
|
+
|----------|-------------|---------|
|
|
165
|
+
| `risk-thresholds` | Risk assessment thresholds | max_retries, min_deposit, severity_cutoffs |
|
|
166
|
+
| `descriptions` | Text descriptions for AI guidance | industry descriptions, role advice |
|
|
167
|
+
| `industry-profiles` | Industry trait profiles | rental traits, freelance traits |
|
|
168
|
+
| `scenario-defaults` | Default parameters per scenario | default allocators, default machine nodes |
|
|
169
|
+
| `recovery-priorities` | Error recovery priority orders | which failures to fix first |
|
|
170
|
+
|
|
171
|
+
**Source patches** (`source_patch` mode) are for changes that can't be expressed as config
|
|
172
|
+
overrides — they produce `.patch` files that the user can manually review and apply to the
|
|
173
|
+
MCP source code.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Conversation Patterns
|
|
178
|
+
|
|
179
|
+
### Pattern A: "What improvements do you have?"
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
User: What improvements do you have for me?
|
|
183
|
+
AI: Let me check your improvement queue...
|
|
184
|
+
[calls get_improvement_queue with queue_filter_status="pending"]
|
|
185
|
+
AI: You have 3 pending proposals:
|
|
186
|
+
1. [P1] Lower retry threshold for rental deposits (confidence: 82%)
|
|
187
|
+
2. [P2] Update freelance industry description (confidence: 71%)
|
|
188
|
+
3. [P3] Adjust default allocator for travel scenarios (confidence: 65%)
|
|
189
|
+
Would you like to review them one by one?
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Pattern B: "Tell me more about proposal 1"
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
User: Tell me more about proposal 1
|
|
196
|
+
AI: 📋 Proposal proposal-001: "Lower retry threshold for rental deposits"
|
|
197
|
+
...
|
|
198
|
+
[presents full details per Step 2-3]
|
|
199
|
+
Would you like to Apply, Reject, or review later?
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Pattern C: "Apply proposal 1"
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
User: Apply proposal 1
|
|
206
|
+
AI: Applying proposal-001...
|
|
207
|
+
[calls apply_improvement with proposal_id="proposal-001", review_status="approved"]
|
|
208
|
+
AI: ✅ Applied! The override is now active.
|
|
209
|
+
Next rental operations will use the new threshold.
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Version Negotiation
|
|
215
|
+
|
|
216
|
+
When the MCP server is upgraded, this skill automatically negotiates compatibility:
|
|
217
|
+
|
|
218
|
+
| Version Difference | Skill Behavior | User Impact |
|
|
219
|
+
|-------------------|----------------|-------------|
|
|
220
|
+
| MCP major > skill major | **Passthrough** — skill only forwards MCP responses, no orchestration | Reduced narrative, MCP actions still work |
|
|
221
|
+
| MCP minor > skill minor | **Full** — skill works normally, new MCP actions may not be orchestrated | Some new features need client AI to handle |
|
|
222
|
+
| Versions match | **Full** — best experience | Optimal |
|
|
223
|
+
|
|
224
|
+
The user does not need to manage this — the skill detects the MCP version from the
|
|
225
|
+
`get_flywheel_config` response and adapts automatically.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Anti-Patterns
|
|
230
|
+
|
|
231
|
+
| Never... | Because... |
|
|
232
|
+
|----------|------------|
|
|
233
|
+
| Fabricate proposal content | Proposals come from data-driven flywheel analysis — always use MCP data |
|
|
234
|
+
| Apply proposals without user confirmation | Overrides affect future operations — user must explicitly approve |
|
|
235
|
+
| Skip the narrative explanation | User needs to understand WHY before deciding |
|
|
236
|
+
| Hold conversation state between sessions | This skill is stateless — re-fetch from MCP each time |
|
|
237
|
+
| Modify the improvement-queue.jsonl directly | Always use `apply_improvement` action for audit trail |
|