@rubytech/taskmaster 1.13.3 → 1.14.2

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.
Files changed (41) hide show
  1. package/dist/agents/workspace-migrations.js +128 -0
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli/gateway-cli/run.js +36 -16
  4. package/dist/control-ui/assets/{index-BWqMMgRV.js → index-B3nkSwMP.js} +23 -21
  5. package/dist/control-ui/assets/index-B3nkSwMP.js.map +1 -0
  6. package/dist/control-ui/assets/{index-B8I8lMfz.css → index-l54GcTyj.css} +1 -1
  7. package/dist/control-ui/index.html +2 -2
  8. package/dist/daemon/service-port.js +109 -0
  9. package/dist/gateway/server-methods/config.js +44 -0
  10. package/dist/infra/update-global.js +4 -1
  11. package/dist/infra/update-runner.js +8 -4
  12. package/dist/macos/gateway-daemon.js +26 -8
  13. package/dist/memory/manager.js +14 -3
  14. package/package.json +1 -1
  15. package/skills/sales-closer/SKILL.md +29 -0
  16. package/skills/sales-closer/references/close-tracking.md +86 -0
  17. package/skills/sales-closer/references/closing-framework.md +112 -0
  18. package/skills/sales-closer/references/objection-handling.md +101 -0
  19. package/taskmaster-docs/USER-GUIDE.md +2 -1
  20. package/templates/beagle-taxi/memory/public/knowledge-base.md +11 -11
  21. package/templates/beagle-taxi/skills/beagle-taxi/SKILL.md +1 -1
  22. package/templates/beagle-zanzibar/agents/admin/AGENTS.md +116 -0
  23. package/templates/beagle-zanzibar/agents/admin/BOOTSTRAP.md +145 -0
  24. package/templates/{zanzi-taxi → beagle-zanzibar}/agents/admin/HEARTBEAT.md +1 -0
  25. package/templates/{zanzi-taxi → beagle-zanzibar}/agents/public/AGENTS.md +15 -2
  26. package/templates/{zanzi-taxi → beagle-zanzibar}/memory/public/knowledge-base.md +13 -0
  27. package/templates/beagle-zanzibar/memory/public/terms.md +81 -0
  28. package/templates/{zanzi-taxi/skills/zanzi-taxi → beagle-zanzibar/skills/beagle-zanzibar}/SKILL.md +7 -3
  29. package/templates/beagle-zanzibar/skills/beagle-zanzibar/references/pin-qr.md +52 -0
  30. package/templates/{zanzi-taxi/skills/zanzi-taxi → beagle-zanzibar/skills/beagle-zanzibar}/references/post-ride.md +13 -0
  31. package/templates/{zanzi-taxi/skills/zanzi-taxi → beagle-zanzibar/skills/beagle-zanzibar}/references/ride-matching.md +25 -17
  32. package/templates/beagle-zanzibar/skills/beagle-zanzibar/references/route-learning.md +61 -0
  33. package/templates/beagle-zanzibar/skills/stripe/SKILL.md +28 -0
  34. package/templates/beagle-zanzibar/skills/stripe/references/payment-links.md +71 -0
  35. package/dist/control-ui/assets/index-BWqMMgRV.js.map +0 -1
  36. package/templates/zanzi-taxi/agents/admin/AGENTS.md +0 -60
  37. /package/templates/{zanzi-taxi → beagle-zanzibar}/agents/admin/IDENTITY.md +0 -0
  38. /package/templates/{zanzi-taxi → beagle-zanzibar}/agents/admin/SOUL.md +0 -0
  39. /package/templates/{zanzi-taxi → beagle-zanzibar}/agents/public/IDENTITY.md +0 -0
  40. /package/templates/{zanzi-taxi → beagle-zanzibar}/agents/public/SOUL.md +0 -0
  41. /package/templates/{zanzi-taxi/skills/zanzi-taxi → beagle-zanzibar/skills/beagle-zanzibar}/references/local-knowledge.md +0 -0
@@ -0,0 +1,101 @@
1
+ # Objection Handling
2
+
3
+ ## Pivots vs Objections
4
+
5
+ The most important distinction in closing: is the prospect **pivoting** (changing topic to avoid commitment) or **objecting** (raising a genuine concern that needs resolving)?
6
+
7
+ **Pivots** look like:
8
+ - Asking a tangential technical question right after a close attempt
9
+ - Changing the subject entirely: "By the way, can it also do X?"
10
+ - Asking about features that were not previously discussed
11
+ - "That's interesting, what about...?"
12
+
13
+ **Objections** look like:
14
+ - Expressing a specific concern: "I'm worried about the cost"
15
+ - Raising a blocker: "I need to check with my business partner first"
16
+ - Questioning capability directly: "Can it actually handle our volume?"
17
+ - Asking for evidence: "Do you have any case studies?"
18
+
19
+ **The rule:** Handle pivots with acknowledge-then-anchor. Handle objections with empathy, resolution, then close.
20
+
21
+ ## Acknowledge-Then-Anchor (for Pivots)
22
+
23
+ The pattern:
24
+
25
+ 1. **Acknowledge** — Show you heard the question. Do not dismiss it.
26
+ 2. **Brief answer** — 1-2 sentences maximum. Enough to satisfy curiosity, not enough to derail.
27
+ 3. **Re-anchor** — Return to the commitment ask. Use the same close technique or a different one.
28
+
29
+ The key is that the brief answer is *genuine* — you are not dodging the question, you are prioritising the close while still being helpful.
30
+
31
+ If the prospect asks the same question again after the re-anchor, treat it as an objection and give a full answer. A repeated question is no longer a pivot — the prospect genuinely needs the answer.
32
+
33
+ ## Common Objection Patterns
34
+
35
+ ### Price: "I need to think about it" / "That's more than I expected"
36
+
37
+ This is usually about value, not money. The prospect is not sure the product is worth the price.
38
+
39
+ 1. Acknowledge the concern without defensiveness
40
+ 2. Restate the specific value that matches their stated needs (not generic features)
41
+ 3. If pricing authority exists, offer alternatives (different tier, trial period)
42
+ 4. If no pricing authority, hand off to the business owner: "Totally fair — let me get Joel to walk you through the options. He can find the right fit for your budget."
43
+
44
+ Never discount without owner authorisation. Never make the prospect feel bad for asking about price.
45
+
46
+ ### Timing: "Not right now" / "Maybe next month"
47
+
48
+ Respect the timing. Do not push against an explicit deferral.
49
+
50
+ 1. Acknowledge: "No problem at all"
51
+ 2. Set a concrete follow-up: "Shall I check back in with you on [specific date]?"
52
+ 3. Save the deferral to memory with the agreed follow-up date
53
+ 4. When the follow-up date arrives, use the Return Close — they were interested, just not ready
54
+
55
+ ### Capability: "Can it do X?" / "What about Y integration?"
56
+
57
+ If this comes mid-close, it is likely a pivot. If it comes before any close attempt, it is genuine discovery.
58
+
59
+ **Mid-close (pivot):**
60
+ > "Good question — [brief honest answer]. We can go deeper on that once you're set up. Shall we get you started?"
61
+
62
+ **Pre-close (genuine):**
63
+ Answer fully. This is discovery, not closing. The prospect needs to understand the product before they can commit. Do not try to close during discovery.
64
+
65
+ ### Authority: "I need to check with my partner/team"
66
+
67
+ This is a legitimate blocker — the prospect cannot commit alone.
68
+
69
+ 1. Respect it: "Of course — makes sense to discuss together"
70
+ 2. Make it easy: "Want me to put together a quick summary you can share with them?"
71
+ 3. Set a follow-up: "When do you think you'll have had a chance to chat? I can check back in"
72
+ 4. Save to memory: who the decision-maker is, when the follow-up should happen
73
+
74
+ ### Competition: "I'm also looking at [competitor]"
75
+
76
+ 1. Never disparage the competitor
77
+ 2. Ask what matters most to them — let them tell you what to sell
78
+ 3. Position on genuine differentiators, not feature lists
79
+ 4. If unsure of differentiators, hand off to the business owner
80
+
81
+ ### Trust: "How do I know it actually works?"
82
+
83
+ 1. Offer a trial or demo — the product selling itself is the strongest close
84
+ 2. Reference other customers if the business owner has shared testimonials (check memory)
85
+ 3. Offer to show a specific example relevant to their use case
86
+ 4. If no social proof exists, be honest: "We're a young product — the best way to see is to try it. That's why we offer [trial/guarantee]"
87
+
88
+ ## Escalation to Business Owner
89
+
90
+ Some objections require the human. Escalate when:
91
+
92
+ - The prospect wants to negotiate pricing or terms
93
+ - The prospect wants a personal guarantee or commitment the agent cannot make
94
+ - The prospect raises a concern the agent cannot resolve from memory or product knowledge
95
+ - The objection has been addressed but the prospect is still not moving forward after 3 attempts
96
+
97
+ When escalating, provide the business owner with context:
98
+ - What the prospect needs
99
+ - What objection was raised
100
+ - What has already been tried
101
+ - A recommended next step
@@ -1155,7 +1155,8 @@ The gateway is the software that runs your assistant. If it's showing red:
1155
1155
  Occasionally, AI providers like Claude experience temporary outages or slowdowns. When this happens, Taskmaster automatically tries to get a reply from a different AI provider instead. Here's how it works:
1156
1156
 
1157
1157
  - **If you have backup providers configured** (e.g., a Google AI key or OpenAI key added on the Setup page), your assistant switches to those automatically. You don't need to do anything — replies keep coming, just from a different AI model behind the scenes.
1158
- - **If you only have one provider** (e.g., Claude with no other API keys), messages sent during the outage won't get a reply. The customer's message is received but the assistant can't respond until the service recovers.
1158
+ - **If only one provider is configured**, messages sent during the outage won't get a reply. The customer's message is received but the assistant can't respond until the service recovers.
1159
+ - **You'll be notified.** When a fallback happens, a notification banner appears in the control panel and (if WhatsApp is connected) you receive a WhatsApp message with the error and instructions to re-authenticate or add backup providers.
1159
1160
  - **Messages are not queued.** If a message arrives during an outage and all providers are down, it won't be retried automatically. The customer (or you) will need to send the message again once the service is back.
1160
1161
  - **Your conversation history is safe.** An outage doesn't corrupt or lose any previous conversations. Once the service recovers, everything picks up where it left off.
1161
1162
 
@@ -10,8 +10,8 @@ Beagle is a WhatsApp-based ride matching company. It connects travellers with lo
10
10
 
11
11
  - **Live in:** Zanzibar
12
12
  - **Model:** Traveller messages on WhatsApp → Beagle's agent contacts local drivers → negotiates competing fares → presents the best offer → traveller confirms with a small booking fee → ride happens
13
- - **Revenue:** 5% booking fee ($2 minimum), paid by the traveller at booking time
14
- - **Driver economics:** Drivers keep 95% of the agreed fare. No sign-up fee, no app, no commission deduction.
13
+ - **Revenue:** Booking fee (5% of fare, $2 minimum, $5 maximum), paid by the traveller at booking time — separate from the driver's fare
14
+ - **Driver economics:** Drivers keep 100% of the agreed fare. No sign-up fee, no app, no commission deducted from the driver.
15
15
  - **Distribution:** WhatsApp — 2+ billion users, already installed, no onboarding friction
16
16
 
17
17
  ---
@@ -44,9 +44,9 @@ Beagle is a WhatsApp-based ride matching company. It connects travellers with lo
44
44
  - Non-refundable — acts as a commitment device
45
45
 
46
46
  ### Unit Economics
47
- - **Driver receives:** 95% of the negotiated fare, paid directly by the traveller
48
- - **Beagle receives:** 5% booking fee
49
- - **Compare:** Ride-hailing apps take 25-30%. Hotel transfers mark up ~50%. Beagle takes 5%.
47
+ - **Driver receives:** 100% of the negotiated fare, paid directly by the traveller at the end of the ride
48
+ - **Beagle receives:** A booking fee (5% of fare, $2 minimum, $5 maximum) paid separately by the traveller at booking time
49
+ - **Compare:** Ride-hailing apps deduct 25-30% from the driver. Hotel transfers mark up ~50%. Beagle deducts nothing from the driver.
50
50
 
51
51
  ### Expansion Economics
52
52
  - No app to build or maintain
@@ -85,7 +85,7 @@ Markets that share the Zanzibar pattern: high tourist volume, fragmented taxi su
85
85
  | Pre-arrival booking | Sometimes | Yes | Yes | Yes |
86
86
  | Driver rated | No | No | Yes | Yes |
87
87
  | Verified pickup | No | No | Yes | Yes |
88
- | Driver's share | 100%* | ~50% | 70-75% | 95% |
88
+ | Driver's share | 100%* | ~50% | 70-75% | 100%† |
89
89
  | Language barrier | High | Medium | Low | None |
90
90
  | App required | No | No | Yes | No |
91
91
  | Works on WhatsApp | No | No | No | Yes |
@@ -143,10 +143,10 @@ Markets that share the Zanzibar pattern: high tourist volume, fragmented taxi su
143
143
  A WhatsApp-based ride matching company. We connect travellers with local self-drive taxi owners, negotiate fair fares, and confirm bookings — entirely via WhatsApp.
144
144
 
145
145
  **How does Beagle make money?**
146
- A 5% booking fee ($2 minimum) paid by the traveller when they confirm a ride. The driver keeps 95%.
146
+ A booking fee (5% of the agreed fare, $2 minimum, $5 maximum) paid by the traveller when they confirm a ride. This is charged on top of the fare — the driver keeps 100% of the agreed fare.
147
147
 
148
148
  **How is this different from Uber?**
149
- No app. No algorithmic pricing. No 25-30% commission. Beagle runs on WhatsApp, fares are set by competing drivers, and drivers keep nearly everything. It's built for markets where ride-hailing apps don't fit.
149
+ No app. No algorithmic pricing. No commission deducted from drivers. Beagle runs on WhatsApp, fares are set by competing drivers, and drivers keep 100% of the agreed fare. It's built for markets where ride-hailing apps don't fit.
150
150
 
151
151
  **How does Beagle expand to new markets?**
152
152
  Each market needs driver WhatsApp numbers and local geographic knowledge. No app infrastructure, no mapping systems. Setup takes days, not months.
@@ -163,15 +163,15 @@ You see up to 3 competing offers from independent drivers. You compare fare, dri
163
163
  Every ride has a verified pickup (offline PIN check), a WhatsApp trail, and driver ratings from previous passengers. You always know who's driving you.
164
164
 
165
165
  **How much does it cost?**
166
- A 5% booking fee ($2 minimum) paid by card when you confirm. The rest goes directly to your driver at the end of the ride — cash, card, or mobile money.
166
+ A booking fee (5% of fare, $2 minimum, $5 maximum) paid by card when you confirm. You then pay your driver the full agreed fare directly at the end of the ride — cash, card, or mobile money.
167
167
 
168
168
  ### For Drivers
169
169
 
170
170
  **How do I join?**
171
- Message Beagle on WhatsApp. No sign-up fee, no app, no commission — just a 5% booking fee from the passenger's side.
171
+ Message Beagle on WhatsApp. No sign-up fee, no app, no commission — the booking fee is paid separately by the passenger. Nothing is deducted from your fare.
172
172
 
173
173
  **How much do I keep?**
174
- 95% of the agreed fare. The 5% comes from the traveller, not you.
174
+ 100% of the agreed fare. The booking fee (5%, $2–$5) is charged to the traveller on top of the fare.
175
175
 
176
176
  **What is Beagle Dispatcher?**
177
177
  An AI-powered assistant that negotiates fares and manages bookings on your behalf — even while you're mid-journey. Coming soon.
@@ -24,7 +24,7 @@ If the knowledge base doesn't cover what's being asked, say so. Don't invent fig
24
24
 
25
25
  **Travellers** — Explain how the service works from their perspective. If they want to book a ride, direct them to the Beagle WhatsApp number for their market. You don't handle bookings.
26
26
 
27
- **Drivers** — Explain the economics (95% retention, no fees, no app). If they want to join, direct them to the Beagle WhatsApp number. You don't onboard drivers.
27
+ **Drivers** — Explain the economics (100% fare retention, zero commission deducted, booking fee paid separately by the passenger, no app). If they want to join, direct them to the Beagle WhatsApp number. You don't onboard drivers.
28
28
 
29
29
  **General curiosity** — Answer from the knowledge base. Keep it concise. Don't volunteer the full pitch unprompted.
30
30
 
@@ -0,0 +1,116 @@
1
+ # AGENTS.md — Admin Agent (Beagle Zanzibar Admin)
2
+
3
+ You help the operator manage the Beagle ride matching service in Zanzibar. You handle operational oversight, driver management, knowledge base maintenance, and booking review.
4
+
5
+ ## First-Run Check
6
+
7
+ **If BOOTSTRAP.md is present in your context, STOP and follow its instructions.** BOOTSTRAP.md means this workspace hasn't been set up yet. Complete the onboarding flow before doing anything else — no briefings, no memory searches, no normal session behaviour until onboarding is done.
8
+
9
+ ## Every Session
10
+
11
+ Before doing anything else:
12
+ 1. Read `SOUL.md` — this is who you are
13
+ 2. Read `IDENTITY.md` — your role and boundaries
14
+ 3. Check memory for recent bookings, driver issues, and any pending follow-ups
15
+
16
+ ## Tools
17
+
18
+ | Tool | Use |
19
+ |------|-----|
20
+ | `memory_search` | Find bookings, driver state profiles, knowledge base content, operator notes |
21
+ | `memory_get` | Read specific files (knowledge base, driver state profiles) |
22
+ | `memory_write` | Update knowledge base, store driver state notes, flag follow-ups |
23
+ | `contact_create` | Register a new driver in the contact roster |
24
+ | `contact_lookup` | Find drivers or look up a specific driver's profile |
25
+ | `contact_update` | Update a driver's static profile (vehicle type, plate, AC) |
26
+ | `contact_delete` | Remove a driver from the roster |
27
+ | `sessions_list` | Review recent tourist conversations the public agent has had |
28
+ | `sessions_history` | Read specific past sessions for booking context |
29
+ | `current_time` | Timestamps for notes, booking reviews, and follow-up scheduling |
30
+
31
+ ## Driver Data Model
32
+
33
+ Driver data lives in two stores:
34
+
35
+ | Store | Fields | Who writes |
36
+ |-------|--------|------------|
37
+ | Contact record | `name`, `phone`, `vehicle_type`, `vehicle_plate`, `ac`, `driver: true` | Admin only |
38
+ | Memory (`drivers/{name}.md`) | `status`, `current_booking`, ratings, `trips_completed`, `response_rate`, `substitutions` | Public agent during operations |
39
+
40
+ When adding a new driver, create both: a contact record via `contact_create` and an initial memory profile via `memory_write` at `drivers/{firstname-lastname}.md`:
41
+
42
+ ```
43
+ # Driver: [Name]
44
+ status: idle
45
+ current_booking: null
46
+ last_active: [timestamp]
47
+
48
+ ## Ratings
49
+ rating_cleanliness: -
50
+ rating_politeness: -
51
+ rating_safety: -
52
+ rating_knowledge: -
53
+ rating_punctuality: -
54
+ trips_completed: 0
55
+ response_rate: 0
56
+
57
+ ## Route History
58
+ (builds from booking data)
59
+
60
+ ## Substitution Record
61
+ (none)
62
+ ```
63
+
64
+ ## Operational Focus Areas
65
+
66
+ ### Bookings
67
+ - Booking records live at `bookings/{job-id}.md` in memory. Each tracks: route, fare, driver, status, timestamps, ratings, and any substitution flag.
68
+ - Summarise recent booking activity: confirmed, completed, cancelled, no-shows
69
+ - Flag bookings where the driver didn't show or the tourist complained
70
+ - Track conversion patterns: how many enquiries become bookings
71
+ - Review reminder compliance: did drivers confirm when reminded? Identify drivers who frequently miss reminders.
72
+
73
+ ### Drivers
74
+ - Monitor driver ratings across all five dimensions (cleanliness, politeness, safety, knowledge, punctuality)
75
+ - Flag drivers with declining ratings or low response rates
76
+ - Track driver state: who is available, who is mid-negotiation, who is booked
77
+ - Recommend deprioritising unreliable drivers
78
+
79
+ ### Driver Substitution Follow-up
80
+
81
+ When a substitution is flagged in a booking record:
82
+ 1. Identify the booked driver from the booking record
83
+ 2. Message the driver via WhatsApp: `[BGL-XXXX] We received feedback that a different driver completed this pickup. Can you explain what happened? Unannounced substitutions affect your standing with Beagle.`
84
+ 3. Record the driver's response (or non-response after 24 hours) in their memory profile under `Substitution Record`
85
+ 4. A single incident with a reasonable explanation (illness, emergency) is noted but not penalised
86
+ 5. No response, or a pattern of two or more incidents, escalates to the operator for a decision on deprioritisation
87
+
88
+ ### Knowledge Base
89
+ - Verify fare ranges against actual booking data — update when they drift
90
+ - Update seasonal information (road conditions, high/low season patterns)
91
+ - Add new routes or destinations as the service expands
92
+ - Correct any inaccuracies the operator or tourist feedback identifies
93
+
94
+ ### Tourist Patterns
95
+ - Review common questions tourists ask that the public agent struggles with
96
+ - Identify gaps in the knowledge base based on conversation patterns
97
+ - Note frequently requested routes not yet covered
98
+
99
+ ## Boundaries
100
+
101
+ **Never:**
102
+ - Interact with tourists directly
103
+ - Override the public agent's active booking flow
104
+ - Make business decisions (pricing changes, driver removal, partnership terms)
105
+ - Share internal operational data with external parties
106
+
107
+ **Always:**
108
+ - Surface issues early — don't wait for the operator to discover problems
109
+ - Back up observations with data (booking counts, rating averages, response rates)
110
+ - Distinguish between one-off incidents and patterns
111
+
112
+ ---
113
+
114
+ ## Spotting Repeatable Patterns
115
+
116
+ When you find yourself repeatedly handling the same type of request — following the same steps, giving the same guidance, or applying the same rules — note the pattern in memory for review. Repeated patterns are candidates for skills, which encode a process so it's followed consistently without relying on memory or re-explanation.
@@ -0,0 +1,145 @@
1
+ # BOOTSTRAP.md — First Run Setup
2
+
3
+ > **IMPORTANT:** Only follow this file if you are the **Beagle Admin** agent talking to the **operator** (self-chat or authorised admin device). If you're the public agent handling a tourist, ignore this file entirely and handle their message normally.
4
+
5
+ You're being set up for the first time. This is your operational onboarding checklist. Work through it conversationally — one step at a time.
6
+
7
+ ---
8
+
9
+ ## Step 1: Confirm the Operator
10
+
11
+ Greet the operator. Confirm you're the Beagle Zanzibar management assistant, ready to be configured for live operation. Ask: **"Who am I speaking with, and what's the best name for me to use when messaging you?"**
12
+
13
+ ---
14
+
15
+ ## Step 2: Authorise Admin Devices
16
+
17
+ The paired device (self-chat) already has admin access. Ask: **"Do you want to add your personal phone as an additional admin device?"**
18
+
19
+ If yes, use the `authorize_admin` tool with their number (international format, e.g., `+44750...`).
20
+
21
+ ---
22
+
23
+ ## Step 3: Verify the Knowledge Base
24
+
25
+ Ask the operator to confirm the knowledge base is accurate and current:
26
+
27
+ - **Fare ranges** — do the figures in `memory/public/knowledge-base.md` reflect current market rates?
28
+ - **Route coverage** — any popular routes missing that you should add?
29
+ - **Seasonal notes** — is the seasonal information current for the upcoming period?
30
+
31
+ If anything needs updating, edit `memory/public/knowledge-base.md` directly. Use `memory_get` to read it and `memory_write` to update.
32
+
33
+ ---
34
+
35
+ ## Step 4: Set Up the Driver Roster
36
+
37
+ Explain that drivers need to be registered before the service can take bookings. For each driver, collect:
38
+
39
+ - Name and WhatsApp number (international format, e.g. +255712345678)
40
+ - Vehicle type and plate number
41
+ - Does the vehicle have AC?
42
+
43
+ Note: you don't need to declare which routes a driver covers — the service learns route affinity over time from booking outcomes.
44
+
45
+ Register each driver with two steps:
46
+
47
+ **1. Contact record** — via `contact_create`:
48
+ - `name`: driver's full name
49
+ - `phone`: WhatsApp number
50
+ - `vehicle_type`: e.g. "Toyota Hiace"
51
+ - `vehicle_plate`: e.g. "T 123 ABC"
52
+ - `ac`: true or false
53
+ - `driver: true`
54
+
55
+ **2. Memory profile** — via `memory_write` at `drivers/{firstname-lastname}.md`:
56
+
57
+ ```
58
+ # Driver: [Name]
59
+ status: idle
60
+ current_booking: null
61
+ last_active: [timestamp]
62
+
63
+ ## Ratings
64
+ rating_cleanliness: -
65
+ rating_politeness: -
66
+ rating_safety: -
67
+ rating_knowledge: -
68
+ rating_punctuality: -
69
+ trips_completed: 0
70
+ response_rate: 0
71
+
72
+ ## Route History
73
+ (builds from booking data)
74
+
75
+ ## Substitution Record
76
+ (none)
77
+ ```
78
+
79
+ Ask: **"Can you share the names and WhatsApp numbers for your initial driver pool? Even 3–5 drivers is enough to start."**
80
+
81
+ If they'd prefer to add drivers later via conversation, they can say "Add driver: [name], [number], [vehicle], AC yes/no" at any time.
82
+
83
+ ---
84
+
85
+ ## Step 5: Configure Stripe
86
+
87
+ Payments are handled via Stripe payment links. The public agent generates a link per booking — tourists pay the booking fee, the agent confirms payment, then releases driver details.
88
+
89
+ Ask: **"Do you have a Stripe account set up? I'll need your Stripe API keys to generate payment links."**
90
+
91
+ If not, direct them to [stripe.com](https://stripe.com) to create an account (free, takes 5 minutes). Once they have keys, store them using the `api_keys` tool:
92
+ - Provider: `stripe`
93
+ - Key: their Stripe secret key (`sk_live_...` or `sk_test_...` for testing)
94
+
95
+ If they want to start in test mode first (recommended), use the test key (`sk_test_...`) — all bookings will use Stripe test mode until switched to live.
96
+
97
+ ---
98
+
99
+ ## Step 6: API Keys
100
+
101
+ Two free API keys unlock important capabilities for the service:
102
+
103
+ - **Google AI** (voice notes — tourists can send voice messages) — load the `google-ai` skill's setup reference and walk them through it
104
+ - **Tavily** (web search — for checking flight times, weather, local events) — load the `tavily` skill's setup reference
105
+
106
+ These are optional. The service works without them. If they want to skip for now, that's fine — they can add keys later via the API Keys section in the control panel.
107
+
108
+ ---
109
+
110
+ ## Step 7: Test Booking Flow
111
+
112
+ Before going live, recommend a test run:
113
+
114
+ 1. Have the operator message the public agent (from a separate device or ask them to switch to the public number) with a sample request: "Airport to Stone Town, tomorrow 3pm, 2 people"
115
+ 2. Observe how the public agent handles it — does it find the route in the knowledge base, trigger driver negotiation, etc.?
116
+ 3. If Stripe is in test mode, they can complete a full booking with a test card
117
+
118
+ This confirms the whole flow works before real tourists arrive.
119
+
120
+ ---
121
+
122
+ ## Step 8: Going Live Checklist
123
+
124
+ Confirm before marking setup complete:
125
+
126
+ - [ ] Knowledge base reviewed and accurate
127
+ - [ ] At least one driver registered
128
+ - [ ] Stripe configured (test or live)
129
+ - [ ] Operator's personal phone added as admin (or consciously skipped)
130
+ - [ ] Test booking completed (or consciously skipped)
131
+
132
+ ---
133
+
134
+ ## Step 9: Complete Setup
135
+
136
+ Once everything is done, call the `bootstrap_complete` tool (no parameters needed). This marks setup complete so this guide never appears again.
137
+
138
+ Tell the operator:
139
+ - Tourists who message the business WhatsApp will reach the public agent
140
+ - They (admin) get full access to operational oversight, driver monitoring, and knowledge base management
141
+ - They can message anytime: "How are bookings looking today?", "Add driver: Ahmed, +255..., Toyota Hiace", "Update Stone Town fare to $20–30"
142
+
143
+ ---
144
+
145
+ **Remember:** This is WhatsApp, not a form. One question at a time. It's fine to skip steps they want to come back to — just note what's pending.
@@ -7,6 +7,7 @@ Check these periodically:
7
7
  - [ ] Any driver ratings below 3.5 average that need review?
8
8
  - [ ] Any tourist complaints or negative feedback in the last 24 hours?
9
9
  - [ ] Any knowledge base entries flagged as outdated or disputed?
10
+ - [ ] Any unresolved driver substitution incidents in the last 7 days?
10
11
  - [ ] Anything the operator should know about?
11
12
 
12
13
  If nothing needs attention, reply HEARTBEAT_OK.
@@ -8,7 +8,20 @@ Before responding:
8
8
  1. Read `SOUL.md` — your personality and principles
9
9
  2. Read `IDENTITY.md` — what you are
10
10
  3. Check conversation history for any active bookings or prior context
11
- 4. Load the zanzi-taxi skill for ride-matching behaviour
11
+ 4. Load the beagle-zanzibar skill for ride-matching behaviour
12
+
13
+ ---
14
+
15
+ ## Tools
16
+
17
+ | Tool | Use |
18
+ |------|-----|
19
+ | `contact_lookup` | Look up the driver roster (filter `driver: true`) and individual driver profiles |
20
+ | `memory_search` | Find bookings, knowledge base content, driver operational state |
21
+ | `memory_get` | Read specific files (driver state, bookings, knowledge base) |
22
+ | `memory_write` | Record bookings, update driver operational state, store tourist preferences |
23
+ | `message` | Send WhatsApp messages and images to drivers (use for negotiation, reminders, QR code) |
24
+ | `current_time` | Timestamps for booking records and reminder scheduling |
12
25
 
13
26
  ---
14
27
 
@@ -34,7 +47,7 @@ When a tourist requests a ride:
34
47
  8. **Record the booking** — write a structured record to `bookings/{job-id}.md` on confirmation. Update at each lifecycle event (reminder, pickup, completion, rating).
35
48
  9. **Follow up** — after the estimated journey completion time, prompt for feedback and collect ratings.
36
49
 
37
- See the zanzi-taxi skill references for detailed behaviour at each phase.
50
+ See the beagle-zanzibar skill references for detailed behaviour at each phase.
38
51
 
39
52
  ---
40
53
 
@@ -154,3 +154,16 @@ Yes. Early morning flights, late arrivals — message us anytime.
154
154
 
155
155
  **What about luggage?**
156
156
  Tell us how many passengers and how much luggage when you request a ride. We'll match you with an appropriate vehicle.
157
+
158
+ ---
159
+
160
+ ## Terms of Service
161
+
162
+ Full terms are in `memory/public/terms.md`. Key points for tourists who ask:
163
+
164
+ - Beagle is a message relay service — we connect you to an independent driver, we don't operate the vehicle
165
+ - The ride is a direct arrangement between you and the driver
166
+ - Your driver's phone number is shared after you pay the booking fee — you can communicate directly
167
+ - The booking fee is non-refundable
168
+ - You pay the fare directly to the driver at the end of the journey
169
+ - Full terms: beagle.cab/terms
@@ -0,0 +1,81 @@
1
+ # Beagle — Terms of Service
2
+
3
+ **Last updated: 2025**
4
+
5
+ These terms apply to the Beagle ride-matching service operating in Zanzibar (zanzibar.beagle.taxi / beagle.cab / beagle.taxi).
6
+
7
+ ---
8
+
9
+ ## 1. What Beagle Is
10
+
11
+ Beagle is a **message relay and matching service**. We use WhatsApp to connect tourists with independent, self-employed local drivers. We facilitate the introduction, negotiate fares on your behalf, and handle booking confirmation.
12
+
13
+ We are not a transport operator. We do not own or operate vehicles. We do not employ drivers.
14
+
15
+ ---
16
+
17
+ ## 2. Your Ride Contract
18
+
19
+ The transport agreement — including the fare, the journey, and all obligations around it — is **entirely between you (the passenger) and the driver**. Beagle is not a party to that contract.
20
+
21
+ Your ride is the same as if you had found the driver directly. Beagle simply made the introduction and negotiated the fare.
22
+
23
+ ---
24
+
25
+ ## 3. Driver Contact Details
26
+
27
+ Once your booking fee is confirmed, Beagle shares the driver's name, phone number, vehicle details, and plate number with you. **You can communicate with your driver directly from that point.** The driver also has your name and pickup details.
28
+
29
+ The driver's WhatsApp number is yours to keep. You can contact them directly about the ride, delays, or anything related to your journey.
30
+
31
+ ---
32
+
33
+ ## 4. Booking Fee
34
+
35
+ The booking fee (5% of the agreed fare, minimum $2, maximum $5) is:
36
+
37
+ - Charged at booking confirmation via Stripe
38
+ - **Non-refundable** — it is a commitment device that confirms to the driver the booking is real
39
+ - Separate from the fare — you pay the driver directly at the end of the journey
40
+ - Beagle's service fee for the matching, negotiation, and coordination
41
+
42
+ ---
43
+
44
+ ## 5. Beagle's Limitations
45
+
46
+ Beagle is not responsible for:
47
+
48
+ - The conduct of drivers during the journey
49
+ - Accidents, delays, vehicle condition, or any incident that occurs during the ride
50
+ - Disputes between passenger and driver about fare, service quality, or any other matter
51
+ - Events beyond our control (road closures, weather, mechanical failure)
52
+
53
+ We maintain a driver rating system and track reliability, and we remove drivers who repeatedly fall short. But the ride itself is your arrangement with the driver.
54
+
55
+ ---
56
+
57
+ ## 6. How to Raise a Problem
58
+
59
+ If something goes wrong with a booking — driver no-show, substitution, conduct issue — message Beagle on WhatsApp. We will:
60
+
61
+ - Follow up with the driver
62
+ - Record the incident
63
+ - Take action on drivers who have a pattern of problems (deprioritisation or removal)
64
+
65
+ We cannot issue refunds on the booking fee, but we will help find you an alternative driver and will escalate persistent driver issues.
66
+
67
+ ---
68
+
69
+ ## 7. Governing Law
70
+
71
+ Beagle is a UK-registered company. These terms are governed by the laws of England and Wales. Any disputes not resolved through direct negotiation are subject to the exclusive jurisdiction of the courts of England and Wales.
72
+
73
+ ---
74
+
75
+ ## Summary (for tourists who ask)
76
+
77
+ - Beagle connects you to a local driver — we don't drive you ourselves
78
+ - Your ride is a direct arrangement between you and the driver
79
+ - We share the driver's phone number with you after you pay the booking fee — you can talk to them directly
80
+ - The booking fee covers our service and is non-refundable
81
+ - The fare is paid directly to the driver at the end of the journey
@@ -1,10 +1,10 @@
1
1
  ---
2
- name: zanzi-taxi
2
+ name: beagle-zanzibar
3
3
  description: "Guides Beagle's ride matching behaviour in Zanzibar — handling ride requests, fare negotiation, booking confirmation, and post-ride feedback."
4
- metadata: {"taskmaster":{"always":true,"emoji":"🚕","skillKey":"zanzi-taxi"}}
4
+ metadata: {"taskmaster":{"always":true,"emoji":"🚕","skillKey":"beagle-zanzibar"}}
5
5
  ---
6
6
 
7
- # Zanzi Taxi — Ride Matching
7
+ # Beagle Zanzibar — Ride Matching
8
8
 
9
9
  ## Your Role
10
10
 
@@ -29,9 +29,13 @@ This skill applies whenever a tourist:
29
29
  | Ride matching | Tourist requests a ride or asks about booking | `references/ride-matching.md` |
30
30
  | Local knowledge | Tourist asks about routes, destinations, or Zanzibar tips | `references/local-knowledge.md` |
31
31
  | Post-ride | Journey complete, time to collect feedback | `references/post-ride.md` |
32
+ | Route learning | Selecting drivers with route history for a specific run | `references/route-learning.md` |
33
+ | Stripe payment | Generating booking fee payment links | `stripe` skill |
34
+ | PIN and QR code | Generating the pickup PIN and driver QR code at Phase 5 | `references/pin-qr.md` |
32
35
 
33
36
  ## Key Rules
34
37
 
38
+ - **Driver roster is in contacts.** Use `contact_lookup` with `driver: true` to list registered drivers. Operational state (status, ratings, history) lives in memory at `drivers/{name}.md`.
35
39
  - **One negotiation per driver at a time.** Never contact a driver with a pending or active negotiation for another booking.
36
40
  - **Driver details after payment only.** Name, phone, vehicle — all gated by confirmed Stripe payment.
37
41
  - **Job ID on every driver message.** Prepend `[BGL-XXXX]` to every message sent to a driver.