-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
epicLarge-scale project or initiativeLarge-scale project or initiative
Description
π Pulse v5.0 β Agent-Native Renovation Plan
Target Launch: May 22, 2026
Timeline: 13 weeks from Feb 19, 2026
Builders: AI agents (Corazon as product lead, coding agents for implementation)
Human review gates: Dread (architecture approval, prompt review, launch sign-off)
Executive Summary
Pulse v5 is a ground-up rebuild from a command-routing WhatsApp bot to an agent-native financial assistant. The LLM becomes the orchestrator β not a fallback. Every Flash wallet operation becomes an atomic tool the agent can compose. User context persists and compounds across sessions. New features ship as prompt files, not code deploys.
What we're shipping May 22:
- Personal Financial Agent (Ring 1) on WhatsApp Cloud API
- Agent loop with Claude tool-use as the brain
- Persistent user context (the moat)
- Core wallet operations (balance, send, receive, history, contacts)
- Account linking (OTP)
- Jamaican Patois dialect processing
- Voice support (ElevenLabs TTS + STT)
- Confirmation gates for all financial ops
- Structured observability logging
What we're NOT shipping May 22:
- Merchant agent (Ring 2) β post-launch
- Corridor/remittance agent (Ring 3) β post-launch
- Telegram, SMS, or other platform adapters β post-launch
- Full multi-dialect support (Trini/Bajan/Haitian) β post-launch
- Bill pay / mobile top-up β pending Flash API integration
- Virtual cards (Bridge.xyz/Rain.xyz) β future consideration
- v4 data migration β zero existing users, clean start
Architecture Decisions (Locked)
| Decision | Choice | Rationale |
|---|---|---|
| WhatsApp delivery | Cloud API (not whatsapp-web.js) | Official, webhook-based, no Chrome dependency, scalable. Access exists via +13059244435. |
| Primary AI | Claude (Anthropic) with tool-use | Best-in-class tool use, reasoning, and safety for financial ops |
| Fallback/fast AI | Gemini Flash | Dialect detection, simple classification, cost optimization |
| Architecture | Agent-native (LLM-as-orchestrator) | Tools are primitives, prompts are features, agent composes behavior |
| Framework | NestJS + TypeScript | Consistent with v4 expertise, strong DI for hexagonal pattern |
| State | Redis (hot) + filesystem (persistent) | Fast context loading + durable storage |
| Context | Per-user persistent context | Compounds over time, creates defensible moat |
| Voice | ElevenLabs (TTS) + Whisper/Google (STT) | Preserve working v4 integrations |
| Observability | Pino structured logging + agent loop traces | Debug any user session, track tool execution |
| Process mgmt | PM2 | Proven in v4, simple, effective |
| Validation | Zod | Runtime type safety for context, tool params, API responses |
| Testing | Jest | Unit + integration + dialect fixtures |
Weekly Milestones
ποΈ Week 1 (Feb 19 β Feb 25): Project Setup & Architecture Scaffolding
- Initialize v5 branch or new repo structure
- Set up TypeScript + NestJS project skeleton matching spec directory structure
- Define all port interfaces (
MessagingPort,AIProviderPort,WalletPort,ContextStorePort,VoicePort,NotificationPort,StoragePort) - Define
Toolinterface contract andToolRegistrywith auto-discovery - Define
UserContextschema with Zod validation - Set up Pino structured logging
- Set up Jest with test scaffolding
- CI pipeline (lint, typecheck, test)
- Deliverable: Compilable skeleton with all interfaces defined, CI green
π§ Week 2 (Feb 26 β Mar 4): Agent Loop Core
- Implement
AgentLoop.tsβ core execution loop (tool calls, completion signals, max iterations) - Implement
AgentConfig.tsβ model tier selection (fast/balanced/powerful) - Implement
CompletionSignal.tsβ complete/clarify/escalate signals - Implement
ClaudeAdapter.tsβ Anthropic API with tool-use format - Implement
GeminiAdapter.tsβ fallback/fast tier - System tools:
complete,clarify,escalate,update_context - Unit tests for agent loop with mocked AI provider
- Deliverable: Agent loop that can receive a message, call tools, and produce a response
π¬ Week 3 (Mar 5 β Mar 11): WhatsApp Cloud API Adapter
- Implement
WhatsAppCloudAdapter.tsimplementingMessagingPort - Webhook verification endpoint (Meta callback verification)
- Inbound message handling (text, voice notes, images)
- Outbound messaging (text, voice, images, documents)
- Message queuing and rate limiting
- Typing indicators and read receipts
- Group message handling
- Integration test with Cloud API sandbox
- Deliverable: Can receive and respond to WhatsApp messages via Cloud API
π Week 4 (Mar 12 β Mar 18): Context System & Security
- Implement
ContextManager.tsβ load, update, persist logic - Implement
ContextBuilder.tsβ builds system prompt from user context - Implement
RedisContextAdapter.tsβ hot cache with 24h TTL - Implement
PersistentContextAdapter.tsβ filesystem durable storage - AES-256-GCM encryption for context files at rest
- Context scope isolation (user A can never load user B's context)
-
InputSanitizer.tsβ prompt injection defense for context writes -
AuditLog.tsβ immutable append-only log for financial operations -
RateLimiter.tsβ per-user rate limiting - Unit tests for context CRUD, encryption, scope isolation
- Deliverable: Full context lifecycle working β load β inject into prompt β update after interaction β persist
πΈ Week 5 (Mar 19 β Mar 25): Wallet Tools & Flash API Integration
- Implement
FlashAPIAdapter.tsβ GraphQL client for Flash API - Wallet tools:
check_balance,send_payment,receive_payment,get_transaction_history,get_exchange_rate,estimate_fee -
ConfirmationGate.tsβ stakes-based approval matrix - Wire confirmation flow into agent loop (agent proposes β gate β user confirms β execute)
- Currency conversion logic (BTC/sats β JMD/USD/TTD/BBD)
- Integration tests against Flash API (staging/sandbox if available)
- Deliverable: Can check balance, send payment with confirmation, receive payment, view history β all through natural conversation
π Week 6 (Mar 26 β Apr 1): Identity, Contacts & Account Linking
- Identity tools:
link_account,verify_otp,get_account_status,get_kyc_status - Contact tools:
resolve_contact,list_contacts,add_contact,remove_contact - OTP flow integration (Flash API β β WhatsApp message flow)
- Contact resolution logic (name, phone number, username β Flash identity)
- Frequent contacts tracking in UserContext
- Onboarding prompt (
prompts/capabilities/onboarding.md) - Deliverable: New user can link account via OTP, manage contacts, and the agent remembers their contacts
π Week 7 (Apr 2 β Apr 8): Prompts & Personal Agent Behavior
- Write and refine
base-agent.mdβ core Pulse identity - Write
safety-rails.mdβ financial safety rules - Write
dialect-awareness.mdβ Caribbean communication guidance - Write
personal-agent.mdβ proactive personal agent behavior - Write
onboarding.mdβ new user flow - Prompt composition system β dynamic assembly based on user context and account type
- Feature prompts:
recurring-payments.md,spending-summary.md,smart-suggestions.md - Agent personality testing β does it feel Caribbean, not corporate?
- Deliverable: Pulse has a distinct personality, proactive behaviors, and culturally-aware communication
π£οΈ Week 8 (Apr 9 β Apr 15): Dialect Processing & Voice
- Implement
DialectClassifier.tsβ detect Jamaican Patois (primary) - Implement
DialectNormalizer.tsβ normalize for AI while preserving meaning - Implement
CurrencyParser.tsβ "two bills" β 200 JMD, "a grand" β 1000 - Jamaican Patois dictionary (
dictionaries/jamaican.ts) - Dialect confidence tracking in UserContext (cumulative)
-
ElevenLabsAdapter.tsβ TTS voice responses -
WhisperAdapter.tsβ STT for voice notes - Voice note β text β agent β text β voice note flow
- Dialect fixture tests with real Caribbean text samples
- Deliverable: "Mi waa fi sen Sean two bills" works end-to-end with proper parsing and culturally-appropriate response
π Week 9 (Apr 16 β Apr 22): Integration & Orchestration
- Implement
MessageOrchestrator.tsβ top-level message flow coordinator - Implement
AgentOrchestrator.tsβ manages agent loop lifecycle - Implement
EventBus.tsβ internal events for notifications/UI - Wire everything together: WhatsApp β Orchestrator β Context β Agent β Tools β Response
- End-to-end flow testing: new user β link β send payment β check balance
- Error handling and graceful degradation (AI provider down, Flash API timeout, etc.)
- Session recovery (interrupted conversations, pending actions)
- Deliverable: Complete happy path working end-to-end, errors handled gracefully
π§ͺ Week 10 (Apr 23 β Apr 29): Testing & Hardening
- Full integration test suite
- Security testing: prompt injection via context, scope isolation, confirmation bypass attempts
- Financial accuracy tests: currency conversion precision, fee estimation, amount parsing
- Load testing: concurrent user sessions, context load times
- Edge cases: voice-only users, group messages, rapid-fire messages, very long messages
- Agent loop guardrails: infinite loop prevention, token budget management
- Dialect test suite with real Caribbean text samples
- Deliverable: Confidence that the system handles adversarial inputs, edge cases, and load
π Week 11 (Apr 30 β May 6): Staging Deployment & Internal Testing
- Deploy to staging VPS (Ubuntu 22.04/24.04)
- PM2 configuration and process management
- Environment configuration and secrets management
- Health check endpoint and basic monitoring
- Internal team testing (Dread + select testers on WhatsApp)
- Bug triage and fixes from internal testing
- Prompt refinement based on real conversations
- Deliverable: Running on staging, internal team actively testing
π§ Week 12 (May 7 β May 13): Polish & Bug Fixes
- Fix bugs from internal testing
- Performance optimization (context load time, agent loop latency)
- Prompt tuning based on real usage patterns
- Response time optimization (target: first response < 3 seconds)
- WhatsApp message formatting polish
- Error messages that are helpful, not technical
- Documentation: README, deployment guide, architecture docs
- Deliverable: Production-ready quality, all known bugs fixed
π― Week 13 (May 14 β May 20): Production Launch Prep
- Production deployment
- Final smoke tests on production
- Monitoring and alerting setup
- Rollback plan documented
- Launch communications ready
- May 22: LAUNCH π
- Deliverable: Pulse v5 live on WhatsApp Cloud API
Review Gates (Dread Approval Required)
| Gate | When | What Dread Reviews |
|---|---|---|
| Architecture | End of Week 1 | Port interfaces, directory structure, tool contracts |
| Agent Brain | End of Week 2 | Agent loop behavior, model tier selection, completion signals |
| Money Flows | End of Week 5 | Wallet tools, confirmation gates, financial safety |
| Personality | End of Week 7 | Prompts, agent voice, Caribbean feel |
| Integration | End of Week 9 | Full end-to-end flow demo |
| Launch | Week 13 | Final sign-off |
Risk Register
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| WhatsApp Cloud API approval/rate limits | Medium | High | Start integration early (Week 3), have sandbox ready |
| Claude tool-use latency too high for chat UX | Medium | Medium | Model tier optimization, Gemini for fast tasks, response streaming |
| Flash API availability/staging access | Medium | High | Get staging credentials early, mock adapter for development |
| Dialect parsing accuracy | Medium | Medium | Start with Jamaican only, conservative matching, improve via logs |
| Context system prompt injection | Low | High | Sanitize all LLM-written context fields, test adversarial inputs |
| Scope creep (merchant, corridor, bill pay) | High | High | Locked scope. Post-launch backlog. Corazon says no. |
Success Criteria (May 22 Launch)
- β New user texts Pulse β useful interaction within 60 seconds, no commands to learn
- β "Send Marcus two bills" β dialect parsing + contact resolution + 200 JMD + confirmation + payment
- β Agent remembers users across sessions (context persistence)
- β New features addable via prompt files (no code deploy)
- β Every financial operation has audit trail + appropriate confirmation
- β Jamaican Patois works naturally
- β Agent composes tools for requests not explicitly programmed
- β WhatsApp is an adapter, not the architecture
- β First response latency < 3 seconds
- β Zero unauthorized payment executions
Post-Launch Roadmap (Not in Scope for May 22)
- Ring 2: Merchant Agent β invoice generation, daily summaries, refunds, business analytics
- Ring 3: Corridor Agent β cross-border remittance (USβJamaica at 1-2%)
- Multi-dialect β Trinidadian, Barbadian, Haitian KreyΓ²l
- Multi-platform β Telegram, SMS adapters
- Bill pay / top-up β pending Flash API integration (net-new work)
- Virtual cards β Bridge.xyz / Rain.xyz integration (requires KYC tier)
- Admin dashboard β web UI for monitoring, user management, prompt editing
- Discovery tools β locate nearest Flash cash-out agent
Plan authored by Corazon (Product Strategist, Pulse) β Feb 19, 2026
Approved for execution by: [pending]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
epicLarge-scale project or initiativeLarge-scale project or initiative