@wowok/skills 1.1.11 → 1.1.12

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.
@@ -268,546 +268,12 @@ This section shows **how Messenger fits into each participant's workflow** — n
268
268
 
269
269
  ---
270
270
 
271
- ## Dialogue Scripts (R1-R10)
272
-
273
- A guided 10-round dialogue for the messenger journey — from initial setup to evidence pipeline operations. Each round has a specific AI Goal, Key Questions, Tool Calls, Success Criteria, Fallback, and Checkpoint. Checkpoints persist via `local_info_operation` so the journey can resume after interruption.
274
-
275
- ### R1Setup & Account Verification
276
-
277
- **AI Goal**: Verify the user's account is configured for Messenger. Ensure a messenger name is set (required for message delivery). Establish the communication role (customer, provider, or arbitrator).
278
-
279
- **Key Questions**:
280
- - What is your role? (customer contacting a seller, provider responding to inquiries, arbitrator receiving evidence)
281
- - Have you set a messenger name? Without it, your account has no endpoint.
282
- - Do you have the address of the person you want to contact?
283
-
284
- **Tool Calls**:
285
- 1. `account_operation` → `get` to confirm the active account exists and capture the address.
286
- 2. `account_operation` → `messenger` to verify a messenger name is set. If not, guide the user to set one.
287
- 3. `query_toolkit` → `onchain_objects` to check if the user has any existing Contact objects.
288
- 4. `local_info_operation` → create a session checkpoint `{ round: R1, role, account, messenger_name, address }`.
289
-
290
- **Success Criteria**: Account exists. Messenger name is set. User's address is captured for sharing with counterparties. Role identified.
291
-
292
- **Fallback**: User has no account → hand off to [wowok-onboard](../wowok-onboard/SKILL.md). User has no messenger name → guide through `account_operation` → `messenger` to set one. User doesn't have the counterparty's address → query the Service or Arbitration object to find the `um` Contact, then extract the Messenger address.
293
-
294
- **Checkpoint**: Persist `{ round: R1, role, account, messenger_name, address, counterparty_address }`. Mark R1 COMPLETE.
295
-
296
- ### R2 — Protection Profile Selection
297
-
298
- **AI Goal**: Help the user choose the right anti-spam protection profile (Open, Guarded, Closed, or Defensive) based on their role and communication needs.
299
-
300
- **Key Questions**:
301
- - Do you want strangers to be able to contact you at all?
302
- - If yes, should anyone be able to, or only those who meet certain criteria?
303
- - Are there specific addresses you want to block entirely?
304
-
305
- **Tool Calls**:
306
- 1. Present the four protection profiles (Open, Guarded, Closed, Defensive) with trade-offs.
307
- 2. Based on user's role, recommend a default:
308
- - Customer → Open (need to contact providers)
309
- - Provider → Guarded (filter legitimate customers from spam)
310
- - Arbitrator → Guarded or Closed (control who can submit evidence)
311
- 3. `messenger_operation` → `update_settings` to configure `allowStrangerMessages` and initial blacklist.
312
- 4. `local_info_operation` → persist the protection profile choice.
313
-
314
- **Success Criteria**: User has selected a protection profile. `allowStrangerMessages` is set. At least one inbound path exists (friends list, guard list, or stranger messages enabled).
315
-
316
- **Fallback**: User selects Closed profile with no friends and no guard list → warn that nobody can contact them. Recommend adding at least one inbound path. User is unsure → default to Open for customers, Guarded for providers/arbitrators.
317
-
318
- **Checkpoint**: Persist `{ round: R2, profile, allowStrangerMessages, blacklist_count, inbound_paths: [...] }`. Mark R2 COMPLETE.
319
-
320
- ### R3 — Guard List Design (Guarded Profile Only)
321
-
322
- **AI Goal**: If the user selected the Guarded profile, design the guard list — which Guards verify strangers before they can message. This is the programmable anti-spam layer.
323
-
324
- **Key Questions**:
325
- - What criteria should strangers meet to message you? (token holding, reputation, order status, passport from trusted issuer)
326
- - How many guards do you want? (1-3 recommended for manageability)
327
- - For each guard: what is the `passportValiditySeconds`? (short = higher security, long = better UX)
328
-
329
- **Tool Calls**:
330
- 1. `wowok_buildin_info` → `info: "guard instructions"` for Guard design reference.
331
- 2. For existing Guards: `guard2file` to export and review the logic.
332
- 3. For new Guards: design per [wowok-guard](../wowok-guard/SKILL.md) — typically token-gated, reputation-based, or order-based.
333
- 4. `messenger_operation` → `guardlist` → `add` to add each Guard with its `passportValiditySeconds`.
334
- 5. Test the Guard with `onchain_operations` → `gen_passport` to verify strangers can obtain passports.
335
- 6. `local_info_operation` → persist the guard list design.
336
-
337
- **Success Criteria**: Guard list configured with 1-3 Guards. Each Guard tested with `gen_passport`. `passportValiditySeconds` matched to the Guard's data volatility. User understands the trade-off between security and UX.
338
-
339
- **Fallback**: User selected Open or Closed profile → skip this round, mark as N/A. Guard is too restrictive (no strangers can pass) → redesign with looser criteria. Guard is too loose (anyone can pass) → add additional conditions or use a stricter Guard.
340
-
341
- **Checkpoint**: Persist `{ round: R3, guards: [{id, criteria, passportValiditySeconds, tested: true}], profile: guarded }`. Mark R3 COMPLETE.
342
-
343
- ### R4 — First Contact — Sending to a Stranger
344
-
345
- **AI Goal**: Compose and send the first message to a stranger. This is the one-message limit — make it count. Include who you are, why you're contacting them, and what you need.
346
-
347
- **Key Questions**:
348
- - Who are you, and why are you contacting this person?
349
- - What specific information do you need from them?
350
- - What is your call to action? (reply, provide info, review a document)
351
-
352
- **Tool Calls**:
353
- 1. Compose the first message: identity, purpose, specific request, call to action.
354
- 2. Check if the recipient has a guard list (message may be rejected with `guard_list` in response).
355
- 3. `messenger_operation` → `send_message` with the composed message.
356
- 4. If rejected with `guard_list`: obtain a passport via `onchain_operations` → `gen_passport`, then resend with `guardAddress` + `passportAddress`.
357
- 5. `local_info_operation` → persist the first contact attempt and result.
358
-
359
- **Success Criteria**: Message sent successfully. If rejected, passport obtained and message re-sent. User understands that if the recipient replies, they're auto-added to the friends list.
360
-
361
- **Fallback**: Message rejected with `guard_list` → obtain passport from one of the listed Guards, resend. Message rejected without `guard_list` → recipient has `allowStrangerMessages: false` and user is not a friend; no way to contact without being added to friends list. User wants to send a vague message → advise against it; the one-message limit means a vague message wastes the only chance.
362
-
363
- **Checkpoint**: Persist `{ round: R4, recipient, message_sent: bool, rejected: bool, passport_obtained: bool, resent: bool }`. Mark R4 COMPLETE.
364
-
365
- ### R5 — Inbox Management & Triage
366
-
367
- **AI Goal**: Set up the daily inbox monitoring routine. Use `watch_conversations` for a quick glance and `watch_messages` for deep dives. Apply list filters to segment the inbox.
368
-
369
- **Key Questions**:
370
- - Do you want a quick overview of unread messages, or a deep dive into a specific conversation?
371
- - Which filter mode do you want? (friends, guard, stranger, any)
372
- - Do you want messages auto-marked as viewed, or peek without marking?
373
-
374
- **Tool Calls**:
375
- 1. `messenger_operation` → `watch_conversations` with `unreadOnly: true` for a quick glance.
376
- 2. For a specific conversation: `messenger_operation` → `watch_messages` with `peerAddress`.
377
- 3. Apply `listFilterMode` (friends/guard/stranger/any) to segment the inbox.
378
- 4. Set `skipAutoMarkViewed: true` if peeking without marking read.
379
- 5. `messenger_operation` → `mark_conversation_as_viewed` or `mark_messages_as_viewed` after reviewing.
380
- 6. `local_info_operation` → persist the inbox triage routine.
381
-
382
- **Success Criteria**: User has a daily inbox monitoring routine. Understands the difference between quick glance and deep dive. Knows how to filter by relationship type. Knows how to control the auto-mark-viewed behavior.
383
-
384
- **Fallback**: No unread messages → inbox is clear, set up monitoring for future messages. Too many unread messages → recommend filtering by `listFilterMode: "stranger"` first (highest priority), then `friends`. User wants to search by keyword → use `watch_messages` with keyword search parameter.
385
-
386
- **Checkpoint**: Persist `{ round: R5, triage_routine: {quick_glance, deep_dive, filter_mode, auto_mark}, unread_count }`. Mark R5 COMPLETE.
387
-
388
- ### R6 — Conversation Deep Dive & Search
389
-
390
- **AI Goal**: Use `watch_messages` for full conversation history with a specific counterparty. Apply keyword search, time-range filtering, direction filter, and status filter for targeted retrieval.
391
-
392
- **Key Questions**:
393
- - Which conversation do you want to dive into?
394
- - Are you looking for specific information? (keyword search)
395
- - What time range? Direction (sent/received)? Status (viewed/unviewed)?
396
-
397
- **Tool Calls**:
398
- 1. `messenger_operation` → `watch_messages` with `peerAddress` for the full conversation.
399
- 2. Apply `keyword` for content search.
400
- 3. Apply `startTime` and `endTime` for time-range filtering.
401
- 4. Apply `direction` filter (sent/received).
402
- 5. Apply `status` filter (viewed/unviewed).
403
- 6. Use `customListFilter` for fine-grained include/exclude logic.
404
- 7. `local_info_operation` → persist the search query and results summary.
405
-
406
- **Success Criteria**: User can retrieve specific messages from a conversation using filters. Understands the difference between conversation-level and message-level queries.
407
-
408
- **Fallback**: Conversation not found → verify the `peerAddress` is correct. No messages match filters → broaden the search criteria. User wants to export the conversation → proceed to R7 (WTS generation).
409
-
410
- **Checkpoint**: Persist `{ round: R6, peerAddress, search_params: {keyword, time_range, direction, status}, results_count }`. Mark R6 COMPLETE.
411
-
412
- ### R7 — WTS Evidence Generation
413
-
414
- **AI Goal**: Generate a WTS (Witness Testimony Statement) file from a conversation. This is the tamper-proof, self-verifiable evidence export used for arbitration.
415
-
416
- **Key Questions**:
417
- - Which conversation do you want to export as WTS?
418
- - What range? (by time, messageId, or seqIndex)
419
- - Have you included the FULL conversation? Selective exports undermine credibility.
420
-
421
- **Tool Calls**:
422
- 1. `messenger_operation` → `generate_wts` with the conversation's `peerAddress` and range parameters.
423
- 2. Verify the WTS file includes the full conversation — not just favorable messages.
424
- 3. `messenger_operation` → `sign_wts` to add the user's Falcon512 signature.
425
- 4. (Optional) `messenger_operation` → `wts2html` to convert to human-readable HTML for review.
426
- 5. `local_info_operation` → persist the WTS file path and metadata.
427
-
428
- **Success Criteria**: WTS file generated covering the full conversation. User has signed the WTS. File is ready for verification by the counterparty or arbitrator.
429
-
430
- **Fallback**: WTS generation fails → check the range parameters (time, messageId, or seqIndex). User wants to export only favorable messages → advise against it; arbitrators need the full context. User wants both parties to sign → generate WTS, sign it, send to counterparty via `send_file`, counterparty signs and returns.
431
-
432
- **Checkpoint**: Persist `{ round: R7, wts_file_path, range, signed: true, html_generated: bool }`. Mark R7 COMPLETE.
433
-
434
- ### R8 — WTS Verification & Signing (Arbitrator/Counterparty)
435
-
436
- **AI Goal**: Verify a received WTS file's authenticity. Validate the hash chain, continuity, and all signatures. This is the arbitrator's evidence verification step.
437
-
438
- **Key Questions**:
439
- - Have you received a WTS file from a counterparty?
440
- - Ready to verify its authenticity? (hash chain, continuity, signatures)
441
- - After verification, do you want to add your signature (attestation)?
442
-
443
- **Tool Calls**:
444
- 1. `messenger_operation` → `verify_wts` on the received WTS file.
445
- 2. Check verification results: hash chain intact, continuity preserved, all signatures valid.
446
- 3. If verification passes: `messenger_operation` → `sign_wts` to add an attestation signature (optional, for arbitrators).
447
- 4. If verification fails: document the failure reason (broken hash chain, gap in messages, invalid signature).
448
- 5. `local_info_operation` → persist the verification result.
449
-
450
- **Success Criteria**: WTS file verified. Hash chain intact. All signatures valid. If arbitrator, attestation signature added. If verification fails, failure reason documented.
451
-
452
- **Fallback**: Hash chain broken → the WTS file was tampered with or messages were modified. Reject as evidence. Continuity gap → messages are missing from the export. Request a complete WTS. Invalid signature → the signer's key may be compromised or the file was altered after signing. Reject as evidence.
453
-
454
- **Checkpoint**: Persist `{ round: R8, wts_file, verified: bool, hash_chain: intact|broken, continuity: preserved|gap, signatures: valid|invalid, attestation_added: bool }`. Mark R8 COMPLETE.
455
-
456
- ### R9 — File Exchange (ZIP, WIP, Documents)
457
-
458
- **AI Goal**: Exchange files via Messenger. Use `send_file` for WTS, WIP, or ZIP attachments. Recipients extract via `extract_zip_messages`. Files are encrypted end-to-end.
459
-
460
- **Key Questions**:
461
- - What type of file are you sending? (WTS evidence, WIP product file, ZIP archive, document)
462
- - Who is the recipient?
463
- - Have you verified the recipient's address?
464
-
465
- **Tool Calls**:
466
- 1. `messenger_operation` → `send_file` with the file path, recipient address, and file type.
467
- 2. For ZIP files: `messenger_operation` → `extract_zip_messages` on the recipient side.
468
- 3. Track `zipMetadata` for download status (local tracking).
469
- 4. `messenger_operation` → `watch_messages` to confirm file delivery.
470
- 5. `local_info_operation` → persist the file exchange record.
471
-
472
- **Success Criteria**: File sent and delivered. Recipient confirmed receipt. For ZIP files, contents extracted successfully.
473
-
474
- **Fallback**: File delivery fails → verify the recipient's address and messenger name. File too large → consider splitting into multiple files or using a different format. Recipient cannot extract ZIP → guide them through `extract_zip_messages`. File type not supported → check the supported types (WTS, WIP, ZIP).
475
-
476
- **Checkpoint**: Persist `{ round: R9, file_type, recipient, sent: true, delivered: bool, extracted: bool }`. Mark R9 COMPLETE.
477
-
478
- ### R10 — Operations Handoff
479
-
480
- **AI Goal**: Hand off the user to daily Messenger operations. Equip them with the inbox monitoring routine, WTS evidence pipeline, contact list management, and anti-spam strategy.
481
-
482
- **Key Questions**:
483
- - Do you understand your daily inbox monitoring routine?
484
- - Do you know how to generate WTS evidence when a dispute arises?
485
- - Do you know how to manage your contact lists (friends, blacklist, guard list)?
486
-
487
- **Tool Calls**:
488
- 1. `local_info_operation` → write the handoff packet: messenger address, protection profile, guard list, inbox routine, WTS pipeline.
489
- 2. Orient the user to the role-specific touchpoints (Customer, Provider, Arbitrator) documented in §Messenger Across Roles.
490
- 3. Set up ongoing monitoring: `messenger_operation` → `watch_conversations` with `unreadOnly: true`.
491
- 4. Recommend next Skills: [wowok-order](../wowok-order/SKILL.md) for customer journey, [wowok-provider](../wowok-provider/SKILL.md) for provider journey, [wowok-arbitrator](../wowok-arbitrator/SKILL.md) for arbitrator journey.
492
-
493
- **Success Criteria**: User has the handoff packet. User understands the daily inbox routine. User knows how to generate and verify WTS evidence. User knows how to manage contact lists.
494
-
495
- **Fallback**: User wants to change protection profile → re-run R2 (Protection Profile Selection). User wants to add a new guard → re-run R3 (Guard List Design). User wants to archive old conversations → use `watch_messages` with time-range filter, then `mark_conversation_as_viewed`.
496
-
497
- **Checkpoint**: Persist `{ round: R10, handoff_emitted: true, messenger_address, journey: complete }`. Mark messenger setup COMPLETE.
498
-
499
- **Handoff Packet** (emitted to [wowok-order](../wowok-order/SKILL.md) for customer communication, [wowok-provider](../wowok-provider/SKILL.md) for provider communication, [wowok-arbitrator](../wowok-arbitrator/SKILL.md) for evidence exchange):
500
- - Messenger address + name
501
- - Protection profile + guard list
502
- - Inbox monitoring routine
503
- - WTS evidence pipeline (generate → sign → verify → send)
504
- - Contact list management operations
505
- - Recommended next Skill: role-specific (wowok-order, wowok-provider, or wowok-arbitrator)
506
-
507
- ---
508
-
509
- ## Decision Trees
510
-
511
- ### D1: Protection Profile Selection
512
-
513
- ```
514
- User needs to configure anti-spam:
515
- ├── What is the user's role?
516
- │ ├── Customer
517
- │ │ └── Open Profile (allowStrangerMessages: true, no guard list, empty blacklist)
518
- │ │ - Needs to contact providers freely
519
- │ │ - Low spam risk (customer-initiated contact)
520
- │ ├── Service Provider
521
- │ │ ├── High-volume public service → Open Profile + substantial blacklist (Defensive)
522
- │ │ └── Premium/verified service → Guarded Profile (guard list with 1-3 guards)
523
- │ ├── Arbitrator
524
- │ │ ├── Public arbitration → Guarded Profile (guard list for evidence submitters)
525
- │ │ └── Private/invitation-only → Closed Profile (friends-only)
526
- │ └── Private individual
527
- │ └── Closed Profile (friends-only, no stranger messages)
528
- ├── Verify: at least one inbound path exists?
529
- │ ├── Open: strangers can message → OK
530
- │ ├── Guarded: guard list non-empty → OK
531
- │ ├── Closed: friends list non-empty → OK (or user accepts no inbound)
532
- │ └── Defensive: strangers enabled + blacklist → OK
533
- └── Test: send a message to yourself (if possible) to verify the setup.
534
- ```
535
-
536
- ### D2: Stranger Message Handling
537
-
538
- ```
539
- A message arrives from an unknown address:
540
- ├── Is the sender in the blacklist?
541
- │ ├── YES → Reject. Do not deliver.
542
- │ └── NO → continue
543
- ├── Is the sender in the friends list?
544
- │ ├── YES → Accept. Deliver to inbox.
545
- │ └── NO → continue
546
- ├── Is the sender guard-verified?
547
- │ ├── YES (valid passport) → Accept. Deliver to inbox.
548
- │ ├── NO (expired/invalid passport) → Reject with guard_list in response
549
- │ └── No guard list configured → continue
550
- ├── Is allowStrangerMessages enabled?
551
- │ ├── YES → Apply one-message limit:
552
- │ │ ├── First message from this stranger → Accept. Deliver.
553
- │ │ ├── Already sent one, no reply → Reject (cool-down period)
554
- │ │ └── Already sent one, user replied → Stranger is now a friend. Accept.
555
- │ └── NO → Reject. No stranger messages allowed.
556
- └── After acceptance:
557
- ├── Auto-mark as viewed? (configurable)
558
- └── Add to inbox with "stranger" label for filtering
559
- ```
560
-
561
- ### D3: WTS Generation Decision
562
-
563
- ```
564
- User wants to create evidence from a conversation:
565
- ├── Is this for arbitration/dispute?
566
- │ ├── YES → Generate WTS. This is the standard evidence format.
567
- │ └── NO (archiving) → WTS is not for archiving. Normal conversations are preserved server-side.
568
- ├── Which conversation?
569
- │ └── Specify peerAddress
570
- ├── What range?
571
- │ ├── By time (startTime, endTime) → good for date-bounded disputes
572
- │ ├── By messageId → good for specific message inclusion
573
- │ └── By seqIndex → good for precise sequence exports
574
- ├── Include the FULL conversation?
575
- │ ├── YES → Strong evidence, credible
576
- │ └── NO (selective) → Undermines credibility. Arbitrator may reject.
577
- ├── After generation:
578
- │ ├── Sign the WTS (sign_wts) → adds non-repudiation
579
- │ ├── Convert to HTML (wts2html) → for human review
580
- │ └── Send to counterparty/arbitrator (send_file)
581
- └── Optional: On-chain proof (proof_message) → anchors a message to the blockchain
582
- - Creates immutable timestamp proving message existed before that point
583
- - Anyone can independently verify
584
- ```
585
-
586
- ### D4: Evidence Verification Flow
587
-
588
- ```
589
- Arbitrator/counterparty receives a WTS file:
590
- ├── Run verify_wts:
591
- │ ├── Hash chain intact?
592
- │ │ ├── YES → messages are cryptographically chained, no tampering
593
- │ │ └── NO → WTS was tampered with. REJECT as evidence.
594
- │ ├── Continuity preserved?
595
- │ │ ├── YES → no gaps in the message sequence
596
- │ │ └── NO → messages are missing. Request complete WTS.
597
- │ ├── All signatures valid?
598
- │ │ ├── YES → signers' keys are authentic, file unaltered after signing
599
- │ │ └── NO → signer's key compromised or file altered post-signing. REJECT.
600
- │ └── Participant signatures present?
601
- │ ├── Both parties signed → strongest evidence (mutual acknowledgment)
602
- │ ├── One party signed → valid but weaker (unilateral)
603
- │ └── No signatures → only hash chain integrity, no non-repudiation
604
- ├── After verification:
605
- │ ├── Accept as evidence → proceed with arbitration review
606
- │ ├── Add attestation signature (sign_wts) → arbitrator endorses authenticity
607
- │ └── Reject with documented reason → inform submitting party
608
- └── Key principle: Only verified evidence is valid evidence.
609
- Never evaluate unverified WTS content.
610
- ```
611
-
612
- ### D5: Contact List Management
613
-
614
- ```
615
- User wants to manage contacts:
616
- ├── Which list?
617
- │ ├── Friends List
618
- │ │ ├── Add: manual add, or auto-added when you reply to a stranger
619
- │ │ ├── Remove: friendslist → remove
620
- │ │ ├── Check: friendslist → exist (verify before assuming)
621
- │ │ └── Friends bypass all spam checks
622
- │ ├── Blacklist
623
- │ │ ├── Add: blacklist → add (permanent block, cannot message you)
624
- │ │ ├── Remove: blacklist → remove (careful — re-enables messaging)
625
- │ │ └── Use case: harassment, spam, bad actors
626
- │ └── Guard List
627
- │ ├── Add: guardlist → add (Guard ID + passportValiditySeconds)
628
- │ │ ├── Choose Guard: token-gated, reputation, order-based, passport-based
629
- │ │ ├── Set validity: 60s (high security) to 10 years (low maintenance)
630
- │ │ └── Test with gen_passport before adding
631
- │ ├── Remove: guardlist → remove (stops accepting new passports from this Guard)
632
- │ │ └── Note: existing valid passports still work until expiry
633
- │ └── Update: remove + re-add with new passportValiditySeconds
634
- └── Strategy: Multiple guards serve different purposes
635
- - Provider: order-based guard (existing customers) + token-gated guard (premium access)
636
- - Either guard passing = message accepted
637
- ```
638
-
639
- ---
640
-
641
- ## Failure Playbooks
642
-
643
- ### F1: One-Message Limit Wasted
644
-
645
- **Trigger**: User sends a vague or incomplete first message to a stranger. The message is delivered, but the recipient doesn't reply. The user cannot send another message until the cool-down period elapses.
646
-
647
- **Diagnosis**:
648
- - The first message lacked identity, purpose, or a clear call to action.
649
- - The recipient didn't understand what was being asked or why they should reply.
650
- - The one-message limit is a protocol invariant — no bypass.
651
-
652
- **Recovery**:
653
- 1. Wait for the cool-down period to elapse (protocol-defined).
654
- 2. Compose a new message that is complete and actionable:
655
- - Who you are (identity, role, context).
656
- - Why you're contacting them (specific purpose).
657
- - What you need (clear request).
658
- - Call to action (reply, provide info, review document).
659
- 3. Resend via `messenger_operation` → `send_message`.
660
- 4. If the recipient has a guard list, obtain a passport first and resend with `guardAddress` + `passportAddress`.
661
-
662
- **Prevention**: Always compose the first message carefully. Use the template: "I am [identity]. I'm contacting you because [purpose]. I need [specific request]. Please [call to action]." Never send a vague "hi" or "can we talk?" as a first message to a stranger.
663
-
664
- ### F2: Disabled Messenger (No Name Set)
665
-
666
- **Trigger**: The user tries to send or receive messages, but the operations fail. Counterparties cannot find the user's endpoint.
667
-
668
- **Diagnosis**:
669
- - The user's account has no messenger name set.
670
- - Without a messenger name, the account has no messenger endpoint.
671
- - `account_operation` → `get` returns an account, but the messenger name field is empty.
672
-
673
- **Recovery**:
674
- 1. `account_operation` → `messenger` to set a messenger name.
675
- 2. Verify the name is set via `account_operation` → `get`.
676
- 3. Share the address with counterparties.
677
- 4. Retry sending or receiving messages.
678
-
679
- **Prevention**: Always set a messenger name during onboarding (R1 of this dialogue). Verify the name is set before attempting any messenger operations. Hand off to [wowok-onboard](../wowok-onboard/SKILL.md) if the user hasn't completed onboarding.
680
-
681
- ### F3: Guard List Blocks Legitimate Contact
682
-
683
- **Trigger**: A legitimate customer or partner tries to message the user, but their message is rejected because they cannot obtain a valid passport from any Guard on the user's guard list.
684
-
685
- **Diagnosis**:
686
- - The Guard criteria are too restrictive (e.g., requires a token the customer doesn't hold).
687
- - The `passportValiditySeconds` is too short, causing passports to expire before the customer can message.
688
- - The Guard logic is buggy or references non-existent data.
689
- - The customer doesn't know how to obtain a passport.
690
-
691
- **Recovery**:
692
- 1. Review the guard list: `messenger_operation` → `guardlist` → `list`.
693
- 2. For each Guard: `guard2file` to export and review the logic.
694
- 3. Test with `onchain_operations` → `gen_passport` using the customer's data.
695
- 4. If the Guard is too restrictive:
696
- - Create a replacement Guard with looser criteria per [wowok-guard](../wowok-guard/SKILL.md).
697
- - `messenger_operation` → `guardlist` → `remove` the old Guard.
698
- - `messenger_operation` → `guardlist` → `add` the new Guard.
699
- 5. If `passportValiditySeconds` is too short: remove and re-add the Guard with a longer duration.
700
- 6. Manually add the customer to the friends list as a workaround: `messenger_operation` → `friendslist` → `add`.
701
-
702
- **Prevention**: Test Guards with `gen_passport` before adding them to the guard list. Set `passportValiditySeconds` based on the Guard's data volatility (order-based = short, token-based = long). Provide clear instructions to customers on how to obtain passports.
703
-
704
- ### F4: Stale Passport Rejection
705
-
706
- **Trigger**: A guard-verified sender's message is rejected because their passport has expired. The sender was previously able to message, but now cannot.
707
-
708
- **Diagnosis**:
709
- - `passportValiditySeconds` was set too short (e.g., 60 seconds).
710
- - The sender obtained a passport, but it expired before they could send the next message.
711
- - The Guard's data is volatile (e.g., order status changes), justifying a short duration, but the UX is poor.
712
-
713
- **Recovery**:
714
- 1. The sender must re-obtain a passport via `onchain_operations` → `gen_passport`.
715
- 2. Resend the message with the new `guardAddress` + `passportAddress`.
716
- 3. If this happens frequently: review the `passportValiditySeconds` setting.
717
- - For stable data (token holdings): extend to 7 days or longer.
718
- - For volatile data (order status): keep short, but inform senders they need to re-verify per message.
719
- 4. `messenger_operation` → `guardlist` → `remove` + `add` with updated `passportValiditySeconds`.
720
-
721
- **Prevention**: Match `passportValiditySeconds` to the Guard's data volatility. Token-based guards can use 7 days; order-based guards should use shorter durations (e.g., 1 hour) to ensure order status is current. Document the expected re-verification frequency for senders.
722
-
723
- ### F5: WTS Verification Fails
724
-
725
- **Trigger**: The arbitrator or counterparty runs `verify_wts` on a received WTS file, and verification fails. The hash chain is broken, continuity has gaps, or signatures are invalid.
726
-
727
- **Diagnosis**:
728
- - **Broken hash chain**: The WTS file was tampered with after generation, or messages were modified.
729
- - **Continuity gap**: Messages are missing from the export (selective export or generation error).
730
- - **Invalid signature**: The signer's key is compromised, or the file was altered after signing.
731
- - **Generation error**: The `generate_wts` range parameters were incorrect, excluding messages.
732
-
733
- **Recovery**:
734
- 1. Document the specific verification failure (hash chain, continuity, signatures).
735
- 2. If hash chain broken → REJECT as evidence. The file is tampered.
736
- 3. If continuity gap → request a complete WTS from the sender. Selective exports undermine credibility.
737
- 4. If signatures invalid → REJECT. The signer's key may be compromised.
738
- 5. If generation error → ask the sender to regenerate with correct range parameters (full conversation).
739
- 6. If the sender cannot produce a valid WTS → their evidence is not admissible.
740
-
741
- **Prevention**: Always generate WTS with the full conversation range. Sign the WTS immediately after generation. Verify WTS before evaluating content. Never accept unverified evidence in arbitration.
742
-
743
- ### F6: No Inbound Path (Closed Profile Mistake)
744
-
745
- **Trigger**: The user configures `allowStrangerMessages: false` with an empty friends list and no guard list. Nobody can contact them. Legitimate customers and partners are blocked.
746
-
747
- **Diagnosis**:
748
- - The user selected the Closed profile but didn't add any friends.
749
- - The user selected the Guarded profile but didn't add any Guards to the guard list.
750
- - The result: all inbound messages are rejected.
751
-
752
- **Recovery**:
753
- 1. `messenger_operation` → `watch_conversations` to check for any rejected messages (may not be visible).
754
- 2. Review the protection profile settings:
755
- - `allowStrangerMessages`: false
756
- - Friends list: empty
757
- - Guard list: empty
758
- 3. Fix by enabling at least one inbound path:
759
- - Add friends manually: `messenger_operation` → `friendslist` → `add`.
760
- - Add a guard: `messenger_operation` → `guardlist` → `add` (after designing/testing the Guard).
761
- - Enable stranger messages: `messenger_operation` → `update_settings` with `allowStrangerMessages: true`.
762
- 4. Notify affected counterparties to retry messaging.
763
-
764
- **Prevention**: At R2 (Protection Profile Selection), always verify at least one inbound path exists before finalizing the configuration. The Closed profile requires a non-empty friends list. The Guarded profile requires a non-empty guard list. The Open profile always has an inbound path (strangers).
765
-
766
- ---
767
-
768
- ## Tier Layering
769
-
770
- ### Novice — Basic Send/Receive, Open Profile
771
-
772
- **Profile**: First-time Messenger user. Needs simple send/receive capability. Not concerned about spam filtering or evidence generation yet.
773
-
774
- **AI Behavior**:
775
- - Recommend the Open profile (`allowStrangerMessages: true`, no guard list, empty blacklist).
776
- - Guide through `send_message` step-by-step. Help compose clear first messages to strangers.
777
- - For inbox: teach `watch_conversations` with `unreadOnly: true` for quick glance.
778
- - For contact management: explain the auto-friend behavior (replying to a stranger adds them to friends).
779
- - Skip WTS generation unless a dispute arises. If it does, guide through `generate_wts` + `sign_wts` step-by-step.
780
- - Skip guard list design entirely (Open profile doesn't need it).
781
-
782
- **Typical Journey**: R1 (setup) → R2 (Open profile) → R3 (skip — no guard list) → R4 (first contact guided) → R5 (basic inbox monitoring) → R10 (handoff with simple routine).
783
-
784
- ### Advanced — Guarded Profile, WTS Evidence, Contact Management
785
-
786
- **Profile**: Experienced user (provider or arbitrator). Needs spam filtering, evidence generation, and contact list management.
787
-
788
- **AI Behavior**:
789
- - Recommend the Guarded profile with 1-3 Guards.
790
- - Help design Guards based on the user's role (order-based for providers, reputation-based for arbitrators).
791
- - At R3: thoroughly test each Guard with `gen_passport`. Set `passportValiditySeconds` based on data volatility.
792
- - For inbox: teach `listFilterMode` to segment by relationship type (friends, guard, stranger).
793
- - For WTS: guide through the full pipeline — `generate_wts` (full conversation) → `sign_wts` → `verify_wts` → `send_file`.
794
- - For contact management: teach proactive blacklist management and guard list updates.
795
- - Support pre-order negotiation: help compose messages that clarify deliverables, timeline, refund terms.
796
-
797
- **Typical Journey**: R1 (setup) → R2 (Guarded profile) → R3 (guard list design + testing) → R4 (first contact with guard handling) → R5 (filtered inbox monitoring) → R6 (search and retrieval) → R7 (WTS generation) → R8 (WTS verification) → R10 (handoff with evidence pipeline).
798
-
799
- ### Expert — Multi-Guard Strategy, Automated WTS Pipeline, Evidence Library
800
-
801
- **Profile**: Power user (high-volume provider or professional arbitrator). Needs sophisticated anti-spam, automated evidence pipelines, and multi-conversation management.
802
-
803
- **AI Behavior**:
804
- - Support complex multi-Guard strategies: different Guards for different voter/customer segments.
805
- - Design dynamic Guards using `GuardIdentifier` for weight-based or score-based filtering.
806
- - At R5: support batch inbox processing with custom filters and prioritization.
807
- - At R6: support advanced search across multiple conversations with `customListFilter`.
808
- - At R7-R8: automate the WTS pipeline — generate, sign, verify, and archive WTS files for all dispute-related conversations. Maintain an evidence library indexed by order ID and counterparty.
809
- - Support on-chain proof anchoring (`proof_message`) for critical messages that need immutable timestamps.
810
- - Manage contact lists at scale: bulk import friends, systematic blacklist management, guard list A/B testing.
811
- - Integrate with role-specific workflows: for providers, monitor customer inquiries and route to appropriate response templates; for arbitrators, batch-process evidence submissions and verify WTS files in bulk.
812
-
813
- **Typical Journey**: R1 (setup) → R2 (Guarded profile) → R3 (multi-Guard strategy) → R4 (first contact with dynamic guard handling) → R5 (batch inbox processing) → R6 (advanced multi-conversation search) → R7 (automated WTS pipeline) → R8 (bulk WTS verification) → R9 (file exchange with ZIP) → R10 (full operations dashboard with evidence library).
271
+ ## Appendices (Progressive Disclosure)
272
+
273
+ > The following sections have been extracted to [APPENDIX.md](./APPENDIX.md) for on-demand loading:
274
+ > - Dialogue Scripts (R1-R10) — guided conversation scripts
275
+ > - Decision Trees branching logic reference
276
+ > - Failure Playbooks — recovery scenarios
277
+ > - Tier Layering expertise-tier based guidance
278
+ >
279
+ > Load APPENDIX.md when the user needs guided dialogue, recovery help, or tier-specific guidance.