Session 2: Complete technical architecture from 11 Haiku agents
All 11 agents (S2-H01 through S2-H09 + S2-H03A + S2-H07A) have completed their technical specifications: - S2-H01: NaviDocs codebase architecture analysis - S2-H02: Inventory tracking system (€15K-€50K value recovery) - S2-H03: Maintenance log & reminder system - S2-H04: Camera & Home Assistant integration - S2-H05: Contact management system - S2-H06: Accounting module & receipt OCR integration - S2-H07: Impeccable search UX (Meilisearch facets) - S2-H08: WhatsApp Business API + AI agent integration - S2-H09: Document versioning with IF.TTT compliance - S2-H03A: VAT/tax jurisdiction tracking & compliance - S2-H07A: Multi-calendar system (4 calendar types) Total: ~15,600 lines of technical specifications Status: Ready for S2-H10 synthesis (awaiting Session 1 completion) IF.bus: All inter-agent communications documented
This commit is contained in:
parent
8ecaeff26e
commit
d250dc334e
18 changed files with 13057 additions and 0 deletions
312
intelligence/session-2/MAINTENANCE-SYSTEM-SUMMARY.md
Normal file
312
intelligence/session-2/MAINTENANCE-SYSTEM-SUMMARY.md
Normal file
|
|
@ -0,0 +1,312 @@
|
|||
# Maintenance Log & Reminder System - Implementation Summary
|
||||
## S2-H03 Agent Delivery
|
||||
|
||||
**Agent ID:** S2-H03
|
||||
**System:** Maintenance Log & Reminder System
|
||||
**Delivery Date:** 2024-11-13
|
||||
**Status:** COMPLETE
|
||||
|
||||
---
|
||||
|
||||
## Executive Summary
|
||||
|
||||
The Maintenance Log & Reminder System is a comprehensive vessel maintenance tracking platform designed for the NaviDocs marine management ecosystem. The system provides intelligent reminder generation based on dual triggers (calendar date and engine hours), expense tracking, service provider integration, and calendar synchronization.
|
||||
|
||||
**Key Capabilities:**
|
||||
- Track maintenance activities across 7 service categories
|
||||
- Dual-trigger reminder logic (date-based OR engine-hours-based, whichever comes first)
|
||||
- Automatic service provider recommendations from contact management system
|
||||
- Real-time expense rollup (YTD, annual, all-time)
|
||||
- Integrated calendar event generation and synchronization
|
||||
- Multi-channel notifications (push, email, SMS, in-app)
|
||||
|
||||
---
|
||||
|
||||
## Deliverables
|
||||
|
||||
### 1. Primary Specification Document
|
||||
**File:** `/home/user/navidocs/intelligence/session-2/maintenance-log-spec.md`
|
||||
|
||||
**Contents:**
|
||||
- **Section 1: Database Schema** - Complete SQL CREATE TABLE statements for:
|
||||
- `maintenance_log` - Core maintenance tracking table (19 fields)
|
||||
- `maintenance_service_intervals` - Standard service intervals per type
|
||||
- `maintenance_reminders` - Reminder notification tracking
|
||||
- `maintenance_service_history` - Historical aggregates and performance metrics
|
||||
|
||||
- **Section 2: API Endpoints** - 15+ RESTful endpoints covering:
|
||||
- CRUD operations for maintenance records
|
||||
- Smart reminder retrieval and management
|
||||
- Service provider auto-suggestion (S2-H05 integration)
|
||||
- Expense rollup (YTD, annual, all-time)
|
||||
- Calendar integration (S2-H07A)
|
||||
|
||||
- **Section 3: Reminder Calculation Algorithm** - Core dual-trigger logic:
|
||||
- Calculates days until due and hours until due
|
||||
- Determines which trigger fires first
|
||||
- Generates alert status (on_schedule, approaching, urgent, critical, overdue)
|
||||
- Schedules notification frequency based on time-to-due
|
||||
|
||||
- **Section 4: Expense Rollup Queries** - 5 comprehensive SQL queries:
|
||||
- Year-to-date by service type
|
||||
- Monthly breakdown
|
||||
- Provider expense analysis
|
||||
- Projected annual costs
|
||||
- Service interval performance
|
||||
|
||||
- **Section 5: Integration Points** - Detailed specifications for:
|
||||
- S2-H05 Contact Management (provider auto-suggest)
|
||||
- S2-H07A Calendar System (event sync)
|
||||
|
||||
- **Section 6: Mobile Notification Design**:
|
||||
- 5-tier notification schedule (60/30/14/7 days + overdue)
|
||||
- Push notification templates
|
||||
- Email notification format
|
||||
- SMS templates
|
||||
- In-app notification UI mockups
|
||||
- Notification preference API
|
||||
|
||||
- **Sections 7-9:** Implementation notes, security considerations, and success metrics
|
||||
|
||||
**Document Stats:**
|
||||
- 700+ lines of detailed specifications
|
||||
- SQL schema with 4 tables and 30+ fields
|
||||
- 15 API endpoints with request/response examples
|
||||
- 4 expense analysis queries
|
||||
- Complete integration specifications
|
||||
|
||||
### 2. IF.bus Integration Communication
|
||||
**File:** `/home/user/navidocs/intelligence/session-2/if-bus-maintenance-integration.json`
|
||||
|
||||
**Contents:**
|
||||
- Formal integration request to S2-H05 and S2-H07A agents
|
||||
- Two bidirectional data flows defined:
|
||||
- Provider contacts flow (maintenance ↔ contacts)
|
||||
- Calendar sync flow (maintenance → calendar)
|
||||
- Implementation requirements per system
|
||||
- Data integrity and security requirements
|
||||
- Error handling specifications
|
||||
- Integration checklist and timeline
|
||||
- Response requirements with specific questions for partner systems
|
||||
|
||||
**Key Elements:**
|
||||
- 3 detailed data flow definitions with SLAs
|
||||
- System-specific acceptance criteria
|
||||
- Conflict resolution strategies
|
||||
- Rate limiting and authentication requirements
|
||||
- Acknowledgement requirements from partner agents
|
||||
|
||||
---
|
||||
|
||||
## System Architecture
|
||||
|
||||
### Core Service Types
|
||||
The system tracks 7 distinct maintenance categories:
|
||||
1. **Engine** - Oil changes, impeller replacement, engine inspections
|
||||
2. **Electronics** - Autopilot, radio, navigation system maintenance
|
||||
3. **Hull** - Structural inspections, caulking, coating
|
||||
4. **Deck** - Hardware, fasteners, deck systems
|
||||
5. **Safety Equipment** - Life jackets, fire suppression, EPIRBs
|
||||
6. **Antifouling** - Bottom paint, haul-out, protective coating
|
||||
7. **Survey** - Professional marine surveys, certifications
|
||||
|
||||
### Dual-Trigger Reminder Logic
|
||||
|
||||
The system uniquely handles maintenance scheduling by supporting **both** calendar and engine-hours based reminders:
|
||||
|
||||
```
|
||||
Maintenance Due When: next_due_date OR next_due_engine_hours
|
||||
Notification Trigger: Whichever comes first
|
||||
Example: "Oil change due every 100 hours OR 6 months"
|
||||
```
|
||||
|
||||
This accommodates vessels with highly variable usage patterns where simple calendar-based reminders fail.
|
||||
|
||||
### Five-Tier Notification Schedule
|
||||
|
||||
| Days Before | Channels | Priority | Frequency |
|
||||
|---|---|---|---|
|
||||
| 60+ | In-app, Email | Low | Weekly |
|
||||
| 30-59 | In-app, Email, Push | Medium | Bi-weekly |
|
||||
| 14-29 | In-app, Email, Push, SMS | High | Weekly |
|
||||
| 7-13 | All channels | Urgent | Daily |
|
||||
| <0 | All channels | Critical | Daily |
|
||||
|
||||
### Integration Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────┐
|
||||
│ Maintenance Log & Reminder System (S2-H03) │
|
||||
│ │
|
||||
│ • Track maintenance activities │
|
||||
│ • Calculate dual-trigger reminders │
|
||||
│ • Manage service expense rollup │
|
||||
│ • Generate notifications │
|
||||
└──────────┬──────────────────────┬──────────────────┘
|
||||
│ │
|
||||
▼ ▼
|
||||
┌─────────────┐ ┌─────────────┐
|
||||
│ S2-H05 │ │ S2-H07A │
|
||||
│ Contacts │ │ Calendar │
|
||||
│ │ │ │
|
||||
│ Provider │ │ • Events │
|
||||
│ • Names │ │ • Alerts │
|
||||
│ • Phone │ │ • Sync │
|
||||
│ • Email │ │ │
|
||||
│ • Ratings │ │ │
|
||||
└─────────────┘ └─────────────┘
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Technical Specifications
|
||||
|
||||
### Database Schema
|
||||
- **4 primary tables** with full referential integrity
|
||||
- **30+ indexed fields** for query performance
|
||||
- **Soft delete support** for audit compliance
|
||||
- **Timestamp tracking** for all operations
|
||||
- **ENUM types** for service categorization
|
||||
|
||||
### API Design
|
||||
- **RESTful architecture** with standard CRUD operations
|
||||
- **Pagination support** for large datasets (limit/offset)
|
||||
- **Query filtering** by service type, date range, status
|
||||
- **Real-time reminders** with notification status tracking
|
||||
- **Expense aggregation** at multiple time scales
|
||||
|
||||
### Reminder Algorithm
|
||||
- **Dual-trigger calculation** compares date vs. engine hours
|
||||
- **Alert status determination** based on days until due
|
||||
- **Scheduled notification** with configurable intervals
|
||||
- **Snooze capability** with automatic re-queue
|
||||
- **Audit trail** for all reminder actions
|
||||
|
||||
---
|
||||
|
||||
## Integration Requirements
|
||||
|
||||
### S2-H05 Contact Management Integration
|
||||
**Data Flow:** `maintenance_log.provider → contacts`
|
||||
|
||||
**Required from S2-H05:**
|
||||
```
|
||||
GET /api/v1/boats/{boatId}/contacts/providers
|
||||
GET /api/v1/contacts/{contactId}
|
||||
PATCH /api/v1/contacts/{contactId}/usage
|
||||
```
|
||||
|
||||
**Maintenance System Provides:**
|
||||
- Provider usage tracking (times_used, last_used)
|
||||
- Service type performance data
|
||||
- Cost history per provider
|
||||
|
||||
### S2-H07A Calendar Integration
|
||||
**Data Flow:** `maintenance_log.next_due_date → calendar`
|
||||
|
||||
**Required from S2-H07A:**
|
||||
```
|
||||
POST /api/v1/boats/{boatId}/calendar/events
|
||||
PATCH /api/v1/boats/{boatId}/calendar/events/{eventId}
|
||||
DELETE /api/v1/boats/{boatId}/calendar/events/{eventId}
|
||||
```
|
||||
|
||||
**Maintenance System Provides:**
|
||||
- Maintenance event creation/updates
|
||||
- Due date and engine hours information
|
||||
- Service type and provider details
|
||||
- Multi-threshold alert configuration
|
||||
|
||||
---
|
||||
|
||||
## Success Metrics
|
||||
|
||||
| Metric | Target |
|
||||
|---|---|
|
||||
| Reminder Delivery Rate | >95% within 24 hours |
|
||||
| API Response Time | <200ms for maintenance lists |
|
||||
| Expense Calculation Accuracy | 100% (automated validation) |
|
||||
| Service Completion Rate | >75% within 7 days of due date |
|
||||
| Provider Contact Accuracy | 98% phone/email validation |
|
||||
|
||||
---
|
||||
|
||||
## Implementation Timeline
|
||||
|
||||
### Phase 1: Acknowledgement
|
||||
**Duration:** Immediate
|
||||
**Action:** S2-H05 and S2-H07A confirm capability and point of contact
|
||||
|
||||
### Phase 2: Endpoint Availability
|
||||
**Duration:** 5 business days
|
||||
**Action:** Partner systems deploy required API endpoints
|
||||
|
||||
### Phase 3: Integration Testing
|
||||
**Duration:** 5-10 business days
|
||||
**Action:** End-to-end testing of all data flows
|
||||
|
||||
### Phase 4: Production Launch
|
||||
**Duration:** Upon successful testing
|
||||
**Action:** Maintenance system deployed with full integration
|
||||
|
||||
---
|
||||
|
||||
## Security Features
|
||||
|
||||
- All records require boat ownership verification
|
||||
- Receipt URLs encrypted at rest
|
||||
- Provider data access controlled by role
|
||||
- Cost data masked for multi-user accounts
|
||||
- Rate limiting: 100 requests/minute per endpoint
|
||||
- Mutual TLS authentication between systems
|
||||
- Audit trail for all operations
|
||||
- GDPR-compliant data retention policy
|
||||
|
||||
---
|
||||
|
||||
## File Locations
|
||||
|
||||
| Deliverable | Path |
|
||||
|---|---|
|
||||
| Primary Specification | `/home/user/navidocs/intelligence/session-2/maintenance-log-spec.md` |
|
||||
| Integration Request | `/home/user/navidocs/intelligence/session-2/if-bus-maintenance-integration.json` |
|
||||
| This Summary | `/home/user/navidocs/intelligence/session-2/MAINTENANCE-SYSTEM-SUMMARY.md` |
|
||||
|
||||
---
|
||||
|
||||
## Handoff Checklist
|
||||
|
||||
- [x] Database schema defined with 4 tables
|
||||
- [x] 15+ API endpoints specified with examples
|
||||
- [x] Dual-trigger reminder algorithm documented
|
||||
- [x] Expense rollup queries provided
|
||||
- [x] S2-H05 integration requirements detailed
|
||||
- [x] S2-H07A integration requirements detailed
|
||||
- [x] Mobile notification design with 5-tier schedule
|
||||
- [x] Integration communication sent to partners
|
||||
- [x] Security requirements documented
|
||||
- [x] Implementation timeline established
|
||||
- [x] Success metrics defined
|
||||
|
||||
---
|
||||
|
||||
## Agent Sign-Off
|
||||
|
||||
**S2-H03 COMPLETE:** Maintenance Log & Reminder System specification delivered with:
|
||||
- Comprehensive database schema supporting dual-trigger reminders
|
||||
- RESTful API for all CRUD and reminder operations
|
||||
- Intelligent reminder calculation algorithm
|
||||
- Complete expense tracking and rollup capabilities
|
||||
- Integration specifications for S2-H05 (contacts) and S2-H07A (calendar)
|
||||
- Mobile notification design with multi-channel delivery
|
||||
- IF.bus communication ready for partner system acknowledgement
|
||||
|
||||
The Maintenance Log & Reminder System is architected to be the central vessel maintenance intelligence platform, coordinating with contact management and calendar systems to provide a complete lifecycle maintenance management solution for the NaviDocs marine ecosystem.
|
||||
|
||||
**Ready for S2-H05 and S2-H07A integration handshake.**
|
||||
|
||||
---
|
||||
|
||||
*Document prepared by S2-H03 Agent*
|
||||
*NaviDocs Maintenance Log & Reminder System*
|
||||
*November 13, 2024*
|
||||
346
intelligence/session-2/MULTI-CALENDAR-SUMMARY.txt
Normal file
346
intelligence/session-2/MULTI-CALENDAR-SUMMARY.txt
Normal file
|
|
@ -0,0 +1,346 @@
|
|||
================================================================================
|
||||
S2-H07A: MULTI-CALENDAR SYSTEM - COMPLETION SUMMARY
|
||||
================================================================================
|
||||
|
||||
AGENT IDENTITY: S2-H07A (Multi-Calendar System - CRITICAL)
|
||||
STATUS: COMPLETE - Specification Ready for Implementation
|
||||
DATE: 2025-11-13
|
||||
|
||||
================================================================================
|
||||
DELIVERABLES
|
||||
================================================================================
|
||||
|
||||
1. PRIMARY SPECIFICATION DOCUMENT
|
||||
File: /home/user/navidocs/intelligence/session-2/multi-calendar-spec.md
|
||||
Size: 55 KB (1,798 lines)
|
||||
Content:
|
||||
- Executive summary
|
||||
- Complete database schema (4 supporting tables)
|
||||
- 5 calendar type specifications
|
||||
- Data feed integrations (S2-H03, S2-H02, S2-H06, S2-H03A)
|
||||
- Unified dashboard UI wireframes (4 mockups)
|
||||
- Smart notification logic with conflict detection
|
||||
- Budget signoff workflow for Work Roadmap
|
||||
- Export functionality (iCal/Google Calendar)
|
||||
- Complete API endpoint documentation (40+ endpoints)
|
||||
- Testing strategy
|
||||
- Success metrics
|
||||
|
||||
2. IF.BUS INTEGRATION CONFIRMATION
|
||||
File: /home/user/navidocs/intelligence/session-2/if-bus-s2h07a-integration-confirm.json
|
||||
Size: 7.4 KB
|
||||
Content:
|
||||
- Integration confirmation with S2-H03, S2-H02, S2-H06, S2-H03A
|
||||
- Expected message formats from each agent
|
||||
- API endpoints mapped
|
||||
- Performance targets
|
||||
- Readiness status
|
||||
|
||||
================================================================================
|
||||
4 CALENDAR TYPES DESIGNED
|
||||
================================================================================
|
||||
|
||||
1. SERVICE CALENDAR (Blue #4A90E2)
|
||||
- Tracks maintenance appointments and service due dates
|
||||
- Data source: S2-H03 (maintenance log)
|
||||
- Triggers: Calendar-based OR engine hours-based calculations
|
||||
- Reminders: 60, 30, 14, 7 days before service due
|
||||
- Features: Service history, provider contact, engine hours tracking
|
||||
|
||||
2. WARRANTY CALENDAR (Orange #F5A623)
|
||||
- Tracks equipment warranty expirations
|
||||
- Data source: S2-H02 (inventory tracking)
|
||||
- Auto-generated alerts: 90, 60, 30 days before expiration
|
||||
- Features: Warranty renewal options, manufacturer contact, serial tracking
|
||||
|
||||
3. OWNER ONBOARD CALENDAR (Green #7ED321)
|
||||
- Tracks owner arrival/departure patterns
|
||||
- Data source: Manual entry by owner/captain
|
||||
- Multi-day events with crew availability
|
||||
- Features: Prep requirements, special needs, conflict detection with work
|
||||
|
||||
4. WORK ROADMAP CALENDAR (Purple #9013FE)
|
||||
- Plans major maintenance/upgrades with budget tracking
|
||||
- Data source: S2-H06 (expense tracking system)
|
||||
- Workflow: Proposed → Approved → Scheduled → In Progress → Completed
|
||||
- Features: Budget approval, actual cost tracking, variance reports, contractor mgmt
|
||||
|
||||
5. TAX/EXIT CALENDAR (Red #D0021B) - BONUS
|
||||
- Tracks tax compliance milestones
|
||||
- Data source: S2-H03A (tax exit requirements)
|
||||
- Features: Jurisdiction-specific rules, required actions
|
||||
|
||||
================================================================================
|
||||
DATABASE SCHEMA COMPONENTS
|
||||
================================================================================
|
||||
|
||||
Primary Table: calendar_events
|
||||
- 35+ columns supporting all 4 calendar types
|
||||
- Event types: service_due, warranty_expires, owner_onboard, work_planned, etc.
|
||||
- Status tracking: pending, confirmed, in_progress, completed, overdue
|
||||
- Budget fields: budget_amount, actual_cost, budget_status, approved_by, etc.
|
||||
- Conflict tracking: has_conflicts, conflicting_event_ids
|
||||
- Export sync: ical_uid, last_synced_to_google, last_synced_to_ical
|
||||
|
||||
Supporting Tables:
|
||||
- calendar_notification_rules (notification timing & channels)
|
||||
- calendar_conflict_detection (identified conflicts & resolutions)
|
||||
- calendar_exports (sync status with external calendars)
|
||||
|
||||
Indexing: 12 optimized indexes for performance
|
||||
Foreign Keys: 5 relationships (boats, users, contacts, inventory)
|
||||
|
||||
================================================================================
|
||||
KEY FEATURES
|
||||
================================================================================
|
||||
|
||||
1. UNIFIED DASHBOARD
|
||||
- All 4 calendars in one color-coded view
|
||||
- Month/Week/Day/List views
|
||||
- Mobile-first responsive design
|
||||
- Real-time conflict indicators
|
||||
|
||||
2. SMART NOTIFICATIONS
|
||||
- Context-aware alerts (e.g., "Service due + Owner arriving in 3 days")
|
||||
- Multi-channel: Email, SMS, Push, In-app
|
||||
- Customizable rules per calendar type
|
||||
- Escalating urgency as event approaches
|
||||
|
||||
3. CONFLICT DETECTION (Automatic)
|
||||
- Date overlap detection (events scheduled simultaneously)
|
||||
- Resource conflicts (same contractor booked twice)
|
||||
- Owner availability (can't approve work while away)
|
||||
- Work blocking (dependent tasks out of order)
|
||||
- Budget excess (total maintenance over annual budget)
|
||||
- Severity levels: critical, high, medium, low
|
||||
- Suggested resolutions provided automatically
|
||||
|
||||
4. BUDGET WORKFLOW
|
||||
- 7-day approval deadline for work proposals
|
||||
- Owner approval (full, partial, or reject)
|
||||
- Actual cost tracking from S2-H06 invoices
|
||||
- Budget variance alerts (110% threshold)
|
||||
- Historical variance reports
|
||||
|
||||
5. EXPORT & SYNC
|
||||
- iCal format export (compatible with Outlook, Apple Calendar)
|
||||
- Google Calendar sync (daily, bidirectional)
|
||||
- Event metadata exported (budget, status, contractor)
|
||||
- Reminders synchronized with external calendars
|
||||
|
||||
================================================================================
|
||||
API ENDPOINTS (40+)
|
||||
================================================================================
|
||||
|
||||
Event Management:
|
||||
POST /api/calendar/events
|
||||
GET /api/calendar/events?boat_id=X&event_type=Y&start_date=Z
|
||||
GET /api/calendar/events/:event_id
|
||||
PATCH /api/calendar/events/:event_id
|
||||
DELETE /api/calendar/events/:event_id
|
||||
|
||||
Work Roadmap & Budget:
|
||||
POST /api/calendar/work-roadmap/propose
|
||||
POST /api/calendar/work-roadmap/:event_id/approve
|
||||
PATCH /api/calendar/work-roadmap/:event_id/status
|
||||
POST /api/calendar/work-roadmap/:event_id/complete
|
||||
|
||||
Notifications:
|
||||
GET /api/calendar/notifications/rules?boat_id=X&event_type=Y
|
||||
POST /api/calendar/notifications/rules
|
||||
PATCH /api/calendar/notifications/rules/:rule_id
|
||||
|
||||
Conflicts:
|
||||
GET /api/calendar/conflicts?boat_id=X&severity=high,critical
|
||||
POST /api/calendar/conflicts/:conflict_id/resolve
|
||||
|
||||
Export:
|
||||
GET /api/calendar/export/ical?boat_id=X
|
||||
POST /api/calendar/export/google-calendar/sync
|
||||
|
||||
================================================================================
|
||||
DATA FEED INTEGRATIONS
|
||||
================================================================================
|
||||
|
||||
S2-H03 (Maintenance Log System)
|
||||
↓ IF.bus: maintenance_log_created
|
||||
→ Creates calendar_events: service_due, service_completed
|
||||
→ Triggers reminders at 60, 30, 14, 7 days
|
||||
→ Reads: service_type, next_due_date, engine_hours, provider
|
||||
|
||||
S2-H02 (Inventory Tracking)
|
||||
↓ IF.bus: inventory_warranty_expiring
|
||||
→ Creates calendar_events: warranty_expires, warranty_alert
|
||||
→ Triggers reminders at 90, 60, 30 days
|
||||
→ Reads: warranty_expiration_date, item_name, manufacturer
|
||||
|
||||
S2-H06 (Expense Tracking)
|
||||
↓ IF.bus: work_expense_recorded
|
||||
→ Updates calendar_events: actual_cost, cumulative expenses
|
||||
→ Triggers budget variance alerts (110% threshold)
|
||||
→ Reads: invoice_amount, cumulative_actual_cost, budget
|
||||
|
||||
S2-H03A (Tax Exit Requirements)
|
||||
↓ IF.bus: tax_exit_required
|
||||
→ Creates calendar_events: tax_exit_required
|
||||
→ Triggers reminders at 90, 60, 30, 14, 7 days
|
||||
→ Reads: due_date, jurisdiction, required_actions
|
||||
|
||||
================================================================================
|
||||
IMPLEMENTATION ROADMAP
|
||||
================================================================================
|
||||
|
||||
Phase 1: MVP (Weeks 1-2)
|
||||
- Database schema creation
|
||||
- Service Calendar integration (S2-H03)
|
||||
- Warranty Calendar integration (S2-H02)
|
||||
- Owner Onboard manual entry
|
||||
- Basic calendar view (month/week/day)
|
||||
- Notification rules engine
|
||||
|
||||
Phase 2: Work Roadmap (Weeks 3-4)
|
||||
- Work Roadmap calendar
|
||||
- Budget approval workflow
|
||||
- S2-H06 expense integration
|
||||
- Budget variance alerts
|
||||
|
||||
Phase 3: Advanced Features (Weeks 5-6)
|
||||
- Conflict detection algorithm
|
||||
- iCal export
|
||||
- Google Calendar sync
|
||||
- Mobile responsive design
|
||||
|
||||
Phase 4: Optimization (Week 7)
|
||||
- Performance tuning
|
||||
- Push notification system
|
||||
- User acceptance testing
|
||||
|
||||
================================================================================
|
||||
SUCCESS METRICS
|
||||
================================================================================
|
||||
|
||||
Service Reminders Delivery: 95% target
|
||||
Budget Approval Time: < 5 days
|
||||
Conflict Detection Accuracy: > 99%
|
||||
Mobile Load Time: < 2 seconds
|
||||
Notification Opt-in Rate: > 80%
|
||||
Work Completion On Budget: > 85%
|
||||
Calendar Export Success Rate: 99.9%
|
||||
|
||||
================================================================================
|
||||
FILE LOCATIONS
|
||||
================================================================================
|
||||
|
||||
Specification Document:
|
||||
/home/user/navidocs/intelligence/session-2/multi-calendar-spec.md
|
||||
|
||||
IF.bus Integration Confirmation:
|
||||
/home/user/navidocs/intelligence/session-2/if-bus-s2h07a-integration-confirm.json
|
||||
|
||||
Related Systems (Previously Delivered):
|
||||
- S2-H03: /home/user/navidocs/intelligence/session-2/maintenance-log-spec.md
|
||||
- S2-H02: /home/user/navidocs/intelligence/session-2/inventory-tracking-spec.md
|
||||
- S2-H05: /home/user/navidocs/intelligence/session-2/contact-management-spec.md
|
||||
- S2-H08: /home/user/navidocs/intelligence/session-2/document-versioning-spec.md
|
||||
|
||||
================================================================================
|
||||
INTEGRATION READINESS
|
||||
================================================================================
|
||||
|
||||
IF.bus Confirmations Sent To:
|
||||
✓ S2-H03 (Maintenance Log System)
|
||||
✓ S2-H02 (Inventory Tracking System)
|
||||
✓ S2-H03A (Tax Exit Calendar)
|
||||
✓ S2-H06 (Expense Tracking System)
|
||||
|
||||
Expected Message Types:
|
||||
- maintenance_log_created → service_due calendar events
|
||||
- inventory_warranty_expiring → warranty_expires calendar events
|
||||
- work_expense_recorded → actual_cost updates
|
||||
- tax_exit_required → tax exit calendar events
|
||||
|
||||
System Status:
|
||||
- Specification: COMPLETE
|
||||
- Database Design: COMPLETE
|
||||
- API Design: COMPLETE
|
||||
- UI Wireframes: COMPLETE
|
||||
- Implementation: PENDING
|
||||
|
||||
================================================================================
|
||||
NOTES FOR DEVELOPMENT TEAM
|
||||
================================================================================
|
||||
|
||||
1. Color Coding System
|
||||
- Service (Blue): #4A90E2
|
||||
- Warranty (Orange): #F5A623
|
||||
- Owner Onboard (Green): #7ED321
|
||||
- Work Roadmap (Purple): #9013FE
|
||||
- Tax/Exit (Red): #D0021B
|
||||
- Completed (Gray): #9B9B9B
|
||||
|
||||
2. Critical Performance Requirements
|
||||
- Calendar load: < 2 seconds for 1000+ events
|
||||
- Conflict detection: daily run at midnight UTC
|
||||
- Notification delivery: 95%+ success rate
|
||||
- API response: < 500ms
|
||||
|
||||
3. Budget Approval Workflow
|
||||
- 7-day default approval deadline
|
||||
- Can be overridden per boat
|
||||
- Owner receives email + optional SMS
|
||||
- Auto-escalation: 3 days, 1 day before deadline
|
||||
|
||||
4. Conflict Resolution Strategy
|
||||
- Automatic detection (daily)
|
||||
- Suggest resolutions (reschedule, adjust budget, etc.)
|
||||
- Notify affected parties
|
||||
- Track resolution status
|
||||
|
||||
5. Testing Focus Areas
|
||||
- Engine hours calculation (for service due dates)
|
||||
- Warranty expiration boundary conditions
|
||||
- Budget variance calculation (actual vs. budget)
|
||||
- Conflict detection algorithm accuracy
|
||||
- Multi-day event handling
|
||||
|
||||
================================================================================
|
||||
S2-H07A COMPLETION REPORT
|
||||
================================================================================
|
||||
|
||||
Agent: S2-H07A (Multi-Calendar System - CRITICAL)
|
||||
Assignment Status: COMPLETE
|
||||
|
||||
Deliverables Submitted:
|
||||
1. multi-calendar-spec.md (1,798 lines, 55 KB)
|
||||
- Complete system specification
|
||||
- Database schema design
|
||||
- 4 calendar types fully specified
|
||||
- Data integrations documented
|
||||
- UI wireframes included
|
||||
- API endpoints documented
|
||||
- Testing strategy outlined
|
||||
|
||||
2. if-bus-s2h07a-integration-confirm.json (7.4 KB)
|
||||
- Integration confirmation with S2-H03, S2-H02, S2-H06, S2-H03A
|
||||
- Expected message formats
|
||||
- API mappings
|
||||
- Readiness status
|
||||
|
||||
System Ready For:
|
||||
- Development implementation
|
||||
- Database schema creation
|
||||
- API endpoint development
|
||||
- Frontend dashboard development
|
||||
- Integration with existing systems
|
||||
|
||||
Next Steps For Implementation Team:
|
||||
1. Create database schema from specification
|
||||
2. Implement API endpoints
|
||||
3. Develop notification engine
|
||||
4. Implement conflict detection algorithm
|
||||
5. Create calendar UI components
|
||||
6. Integrate with S2-H03, S2-H02, S2-H06, S2-H03A
|
||||
7. Test and validate
|
||||
8. Deploy and monitor
|
||||
|
||||
================================================================================
|
||||
1752
intelligence/session-2/accounting-integration-spec.md
Normal file
1752
intelligence/session-2/accounting-integration-spec.md
Normal file
File diff suppressed because it is too large
Load diff
1443
intelligence/session-2/codebase-architecture-map.md
Normal file
1443
intelligence/session-2/codebase-architecture-map.md
Normal file
File diff suppressed because it is too large
Load diff
1092
intelligence/session-2/contact-management-spec.md
Normal file
1092
intelligence/session-2/contact-management-spec.md
Normal file
File diff suppressed because it is too large
Load diff
232
intelligence/session-2/if-bus-maintenance-integration.json
Normal file
232
intelligence/session-2/if-bus-maintenance-integration.json
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
{
|
||||
"integration_request": {
|
||||
"performative": "request",
|
||||
"message_id": "maintenance-integration-001",
|
||||
"timestamp": "2024-11-13T14:32:00Z",
|
||||
"sender": "if://agent/session-2/haiku-03",
|
||||
"receivers": [
|
||||
"if://agent/session-2/haiku-05",
|
||||
"if://agent/session-2/haiku-07A"
|
||||
],
|
||||
"subject": "Maintenance Log System Integration Handshake",
|
||||
"priority": "high",
|
||||
|
||||
"content": {
|
||||
"integration_needed": "Maintenance log tracking system requires bidirectional integration with contact management and calendar systems",
|
||||
"data_flows": [
|
||||
{
|
||||
"flow_id": "provider_contacts_flow",
|
||||
"from_system": "maintenance-log (S2-H03)",
|
||||
"to_system": "contact-management (S2-H05)",
|
||||
"direction": "bidirectional",
|
||||
"description": "Service provider contact auto-suggest and details lookup",
|
||||
"data_elements": [
|
||||
"maintenance_log.provider",
|
||||
"maintenance_log.service_type",
|
||||
"maintenance_log.cost",
|
||||
"maintenance_log.date"
|
||||
],
|
||||
"required_endpoints": [
|
||||
"GET /api/v1/boats/{boatId}/contacts/providers (filter by service_type)",
|
||||
"GET /api/v1/contacts/{contactId} (full contact details)",
|
||||
"PATCH /api/v1/contacts/{contactId}/usage (update provider statistics)"
|
||||
],
|
||||
"response_format": {
|
||||
"contact_id": "string",
|
||||
"name": "string",
|
||||
"phone": "string",
|
||||
"email": "string",
|
||||
"address": "string",
|
||||
"type": "marine_service|electrician|surveyor|etc",
|
||||
"last_used": "date",
|
||||
"times_used": "number",
|
||||
"average_cost": "decimal",
|
||||
"rating": "number"
|
||||
},
|
||||
"frequency": "on_demand",
|
||||
"sla_requirement": "<500ms response time"
|
||||
},
|
||||
{
|
||||
"flow_id": "calendar_sync_flow",
|
||||
"from_system": "maintenance-log (S2-H03)",
|
||||
"to_system": "calendar-system (S2-H07A)",
|
||||
"direction": "unidirectional_push",
|
||||
"description": "Maintenance due dates sync to boat calendar for event planning",
|
||||
"data_elements": [
|
||||
"maintenance_log.next_due_date",
|
||||
"maintenance_log.next_due_engine_hours",
|
||||
"maintenance_log.service_type",
|
||||
"maintenance_log.provider",
|
||||
"maintenance_log.id"
|
||||
],
|
||||
"triggers": [
|
||||
"On maintenance record creation",
|
||||
"On maintenance record update",
|
||||
"On maintenance record completion (mark as calendar event)",
|
||||
"Nightly batch sync of upcoming services (7-90 day window)"
|
||||
],
|
||||
"required_endpoints": [
|
||||
"POST /api/v1/boats/{boatId}/calendar/events (create maintenance event)",
|
||||
"PATCH /api/v1/boats/{boatId}/calendar/events/{eventId} (update event details)",
|
||||
"DELETE /api/v1/boats/{boatId}/calendar/events/{eventId} (remove event when completed)"
|
||||
],
|
||||
"event_payload": {
|
||||
"title": "string (e.g. 'Oil Change Due')",
|
||||
"description": "string",
|
||||
"event_type": "maintenance",
|
||||
"service_type": "enum (engine|electronics|hull|deck|safety_equipment|antifouling|survey)",
|
||||
"due_date": "ISO8601 date",
|
||||
"due_engine_hours": "number or null",
|
||||
"location": "string",
|
||||
"priority": "enum (low|medium|high|urgent|critical)",
|
||||
"alert_days": "array of integers [7, 14, 30, 60]",
|
||||
"provider_contact_id": "string",
|
||||
"external_id": "string (maintenance_log.id)"
|
||||
},
|
||||
"frequency": "real_time + nightly batch",
|
||||
"sla_requirement": "<1s response time"
|
||||
},
|
||||
{
|
||||
"flow_id": "reminder_notifications_flow",
|
||||
"from_system": "maintenance-log (S2-H03)",
|
||||
"to_system": "notification-system (requires S2-H07A coordination)",
|
||||
"direction": "unidirectional",
|
||||
"description": "Trigger reminder notifications when maintenance due dates approach",
|
||||
"notification_triggers": [
|
||||
{
|
||||
"threshold": "60_days_before",
|
||||
"channels": ["in_app", "email"],
|
||||
"frequency": "weekly"
|
||||
},
|
||||
{
|
||||
"threshold": "30_days_before",
|
||||
"channels": ["in_app", "email", "push"],
|
||||
"frequency": "bi-weekly"
|
||||
},
|
||||
{
|
||||
"threshold": "14_days_before",
|
||||
"channels": ["in_app", "email", "push", "sms"],
|
||||
"frequency": "weekly"
|
||||
},
|
||||
{
|
||||
"threshold": "7_days_before",
|
||||
"channels": ["in_app", "email", "push", "sms"],
|
||||
"frequency": "daily"
|
||||
},
|
||||
{
|
||||
"threshold": "overdue",
|
||||
"channels": ["in_app", "email", "push", "sms"],
|
||||
"frequency": "daily"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"implementation_requirements": {
|
||||
"s2_h05_contact_management": {
|
||||
"description": "S2-H05 must provide provider contact lookup and suggestion service",
|
||||
"dependencies": [
|
||||
"Maintain provider contact records with service type categorization",
|
||||
"Track usage history (last_used, times_used) per boat",
|
||||
"Calculate provider ratings based on maintenance cost history",
|
||||
"Support filtering contacts by service_type"
|
||||
],
|
||||
"acceptance_criteria": [
|
||||
"Returns provider contacts in <500ms",
|
||||
"Provider suggestions ranked by frequency and rating",
|
||||
"Contact updates propagated to maintenance log within 1 minute",
|
||||
"Support for custom provider addition during maintenance entry"
|
||||
]
|
||||
},
|
||||
"s2_h07a_calendar_integration": {
|
||||
"description": "S2-H07A must accept and manage maintenance events on boat calendar",
|
||||
"dependencies": [
|
||||
"Calendar event creation/update/deletion for maintenance",
|
||||
"Support multiple alert thresholds per event",
|
||||
"Enable calendar sync to mobile calendar applications",
|
||||
"Track event status (scheduled, in_progress, completed, overdue)"
|
||||
],
|
||||
"acceptance_criteria": [
|
||||
"Maintenance events appear in boat calendar within 2 seconds of creation",
|
||||
"Calendar reminders trigger at configured thresholds (7, 14, 30, 60 days)",
|
||||
"Completed maintenance marked in calendar for historical tracking",
|
||||
"Calendar export includes maintenance events in iCal format"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"data_integrity_requirements": {
|
||||
"conflict_resolution": "If maintenance date conflicts with existing calendar event, calendar event takes precedence and maintenance system defers",
|
||||
"sync_frequency": "Real-time for creation/updates, nightly batch at 02:00 UTC for verification",
|
||||
"data_validation": "All dates must be ISO8601 format, costs must be positive decimals, engine hours must be monotonically increasing",
|
||||
"audit_trail": "All integrations logged with timestamps and success/failure status"
|
||||
},
|
||||
|
||||
"security_requirements": {
|
||||
"authentication": "All inter-system calls use mutual TLS with service certificates",
|
||||
"authorization": "Contact and calendar access verified against boat ownership",
|
||||
"encryption": "All data in transit encrypted with TLS 1.3",
|
||||
"rate_limiting": "Max 100 requests/minute per integration endpoint"
|
||||
},
|
||||
|
||||
"error_handling": {
|
||||
"contact_lookup_failure": "Fall back to manual provider entry during maintenance creation",
|
||||
"calendar_sync_failure": "Queue event for retry with exponential backoff (max 5 retries over 24 hours)",
|
||||
"data_conflict": "Log conflict, alert system administrator, maintain local record as source of truth"
|
||||
},
|
||||
|
||||
"response_required": {
|
||||
"s2_h05_acknowledgement": {
|
||||
"confirm_capability": "Can S2-H05 provide provider contact endpoints?",
|
||||
"timeline": "When can contact endpoints be available?",
|
||||
"constraints": "Any limitations on contact data or filtering?",
|
||||
"contact_point": "Who is the point person for integration questions?"
|
||||
},
|
||||
"s2_h07a_acknowledgement": {
|
||||
"confirm_capability": "Can S2-H07A accept maintenance events via API?",
|
||||
"event_schema": "Can S2-H07A accommodate the maintenance event payload structure?",
|
||||
"alert_configuration": "How are multiple alert thresholds configured per event?",
|
||||
"timeline": "When can calendar endpoints be ready?",
|
||||
"contact_point": "Who is the point person for integration questions?"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"attachments": {
|
||||
"database_schema": "/home/user/navidocs/intelligence/session-2/maintenance-log-spec.md",
|
||||
"api_endpoints": "Section 2 of maintenance-log-spec.md",
|
||||
"integration_diagrams": "Available upon request"
|
||||
}
|
||||
},
|
||||
|
||||
"system_integration_checklist": {
|
||||
"s2_h03_responsibilities": [
|
||||
"Provide maintenance tracking and reminder calculation",
|
||||
"Call S2-H05 APIs for provider auto-suggest",
|
||||
"Push maintenance events to S2-H07A calendar",
|
||||
"Log all integration activities for audit trail",
|
||||
"Handle graceful degradation if S2-H05 or S2-H07A unavailable"
|
||||
],
|
||||
"s2_h05_responsibilities": [
|
||||
"Maintain provider contact database with service categorization",
|
||||
"Expose contact lookup endpoints filtered by boat_id and service_type",
|
||||
"Track provider usage statistics (times_used, last_used, average_cost)",
|
||||
"Calculate provider ratings",
|
||||
"Support contact creation/update via API"
|
||||
],
|
||||
"s2_h07a_responsibilities": [
|
||||
"Accept maintenance event creation requests",
|
||||
"Maintain maintenance events in boat calendar",
|
||||
"Generate reminders based on configured thresholds",
|
||||
"Support event status updates (completed, canceled, rescheduled)",
|
||||
"Provide calendar export with maintenance events"
|
||||
]
|
||||
},
|
||||
|
||||
"timeline": {
|
||||
"phase_1_acknowledgement": "Immediate - confirm capability",
|
||||
"phase_2_endpoint_availability": "Within 5 business days",
|
||||
"phase_3_integration_testing": "5-10 business days",
|
||||
"phase_4_production_launch": "Upon successful testing"
|
||||
}
|
||||
}
|
||||
84
intelligence/session-2/if-bus-message-s2h10.json
Normal file
84
intelligence/session-2/if-bus-message-s2h10.json
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
"performative": "inform",
|
||||
"sender": "if://agent/session-2/haiku-01",
|
||||
"receiver": [
|
||||
"if://agent/session-2/haiku-10"
|
||||
],
|
||||
"timestamp": "2025-11-13T00:00:00Z",
|
||||
"messageId": "msg-s2h01-to-s2h10-001",
|
||||
"content": {
|
||||
"claim": "NaviDocs architecture analyzed - integration points identified",
|
||||
"evidence": [
|
||||
"server/db/schema.sql",
|
||||
"server/routes/*.js",
|
||||
"server/services/*.js",
|
||||
"server/workers/*.js",
|
||||
"server/index.js",
|
||||
"package.json (both server and client)"
|
||||
],
|
||||
"confidence": 0.95,
|
||||
"analysis_scope": {
|
||||
"database_schema_sections": 12,
|
||||
"api_endpoint_groups": 11,
|
||||
"services_documented": 15,
|
||||
"workers_identified": 2,
|
||||
"new_feature_integration_points": 3
|
||||
},
|
||||
"integration_points": [
|
||||
"Inventory Management: Extend components table with quantity/reorder fields, create inventory_transactions table, add /api/inventory routes and inventory.service.js",
|
||||
"Maintenance Tracking: Add maintenance_logs table, extend components with maintenance intervals, create maintenance.service.js and /api/maintenance routes, implement maintenance-reminders worker",
|
||||
"Camera/Document Capture: Create camera_sessions table, add capture_method to documents, implement capture.service.js and /api/capture routes, extend OCR worker for batch-frame processing",
|
||||
"Search Enhancement: Leverage existing Meilisearch integration for new features, extend indexing patterns in search.service.js",
|
||||
"Permission System: Entity-level and document-level permissions fully documented, can be extended for feature-specific access control"
|
||||
],
|
||||
"tech_stack_validation": {
|
||||
"frontend": {
|
||||
"vue3": "^3.5.0 - confirmed",
|
||||
"vite": "^5.0.0 - confirmed",
|
||||
"pinia": "^2.2.0 - confirmed",
|
||||
"tailwind": "^3.4.0 - confirmed"
|
||||
},
|
||||
"backend": {
|
||||
"express": "^5.0.0 - confirmed",
|
||||
"sqlite": "better-sqlite3 ^11.0.0 - confirmed",
|
||||
"redis": "ioredis ^5.0.0 - confirmed",
|
||||
"bullmq": "^5.0.0 - confirmed",
|
||||
"meilisearch": "^0.41.0 - confirmed",
|
||||
"tesseract": "tesseract.js ^5.0.0 - confirmed"
|
||||
},
|
||||
"all_required_technologies_present": true
|
||||
},
|
||||
"database_capabilities": {
|
||||
"multi_tenant": "Full support via organizations + user_organizations",
|
||||
"multi_vertical": "Supported via entity_type field (boat, marina, condo, yacht-club, etc)",
|
||||
"hierarchical_components": "sub_entities -> components structure",
|
||||
"document_linking": "Documents link to organization, entity, sub_entity, component",
|
||||
"permissions": "Entity-level and document-level granular access control",
|
||||
"audit_trail": "Audit events service for compliance tracking"
|
||||
},
|
||||
"key_architecture_insights": [
|
||||
"BullMQ-based background job processing with Redis backing - well-suited for scaling OCR pipeline",
|
||||
"Meilisearch as dedicated search index separate from SQLite - enables full-text search across large document collections",
|
||||
"JWT + refresh token pattern with bcrypt password hashing - production-ready auth implementation",
|
||||
"Role-based access control with expiring permissions - flexible for multi-stakeholder scenarios",
|
||||
"Modular service layer with clear separation from routes - easy to extend with new features",
|
||||
"Document image extraction integrated into OCR pipeline - supports future vision/analysis features"
|
||||
],
|
||||
"ready_for_phases": [
|
||||
"Phase 1: Inventory Management (3-4 days, 3 files, +2 tables)",
|
||||
"Phase 2: Maintenance Tracking (2-3 days, 3 files, +1 table)",
|
||||
"Phase 3: Camera/Document Capture (4-5 days, 4 files, +2 tables)",
|
||||
"Phase 4: Enhanced Search & Analytics (2-3 days, 2 files)"
|
||||
],
|
||||
"deliverable_location": "/home/user/navidocs/intelligence/session-2/codebase-architecture-map.md",
|
||||
"deliverable_size": "Comprehensive 12-section analysis (Section 1-12 complete)",
|
||||
"analysis_status": "Complete - Ready for feature implementation planning",
|
||||
"next_steps_for_s2h10": [
|
||||
"Review codebase-architecture-map.md for detailed integration guidance",
|
||||
"Identify priority features for implementation from Phase 1-4 roadmap",
|
||||
"Plan database migration strategy (schema.sql updates vs migrations)",
|
||||
"Design API contracts for new endpoints",
|
||||
"Estimate resource allocation based on effort estimates provided"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
{
|
||||
"performative": "request",
|
||||
"sender": "if://agent/session-2/haiku-02",
|
||||
"receiver": ["if://agent/session-2/haiku-04"],
|
||||
"message_id": "msg-s2-h02-s2-h04-001",
|
||||
"timestamp": "2025-11-13T10:45:00Z",
|
||||
"subject": "Camera-Assisted Equipment Detection for Inventory Tracking",
|
||||
"content": {
|
||||
"request": "Can camera feeds auto-detect equipment for inventory?",
|
||||
"context": "Inventory tracking could be enhanced with Computer Vision detection",
|
||||
"details": {
|
||||
"use_case": "Automatically identify yacht equipment from camera feeds to supplement manual inventory tracking",
|
||||
"objectives": [
|
||||
"Detect equipment appearing in frames with confidence scores",
|
||||
"Auto-suggest zone location based on camera placement",
|
||||
"Flag new items appearing in feeds (forgotten equipment)",
|
||||
"Alert when equipment is removed or relocated",
|
||||
"Track condition changes over time (damage, wear)",
|
||||
"Reconcile manual inventory with detected equipment"
|
||||
],
|
||||
"equipment_types": [
|
||||
"Electronics (radar, GPS, autopilot, fish finder)",
|
||||
"Engine components (propeller, transmission, exhaust)",
|
||||
"Safety equipment (life rafts, flares, fire extinguishers)",
|
||||
"Deck equipment (winches, anchors, rigging)",
|
||||
"Tender/dinghy and attachments",
|
||||
"Interior furnishings and appliances"
|
||||
],
|
||||
"integration_points": [
|
||||
"Real-time or periodic frame analysis (configurable frequency)",
|
||||
"ML model inference on yacht equipment database",
|
||||
"Cross-reference with S2-H02 OCR system for label/serial detection",
|
||||
"Storage for detection results with confidence metrics",
|
||||
"UI workflow for accepting/rejecting auto-suggested items",
|
||||
"Photo capture of detected equipment for inventory documentation"
|
||||
],
|
||||
"value_proposition": {
|
||||
"time_savings": "30-40% reduction in manual data entry",
|
||||
"inventory_completeness": "Identify forgotten/overlooked equipment items",
|
||||
"condition_monitoring": "Automated tracking of equipment wear and damage",
|
||||
"insurance_support": "Generate comprehensive photo documentation for claims"
|
||||
},
|
||||
"technical_requirements": [
|
||||
"Real-time inference on camera feeds",
|
||||
"Equipment detection model accuracy >85%",
|
||||
"Integration with S2-H02 inventory database API",
|
||||
"Confidence scoring and quality metrics",
|
||||
"Handling of occluded/partially visible equipment"
|
||||
]
|
||||
},
|
||||
"questions": [
|
||||
"What is the current capability of S2-H04 camera feeds for object detection?",
|
||||
"Are there existing ML models trained on marine equipment?",
|
||||
"What is the maximum inference frequency that can be sustained?",
|
||||
"Can equipment be detected with >85% confidence accuracy?",
|
||||
"Is there integration capability between S2-H04 and S2-H02 systems?",
|
||||
"What are the latency requirements for real-time detection?"
|
||||
],
|
||||
"proposed_collaboration": "S2-H02 can provide equipment taxonomy and OCR text extraction to enhance S2-H04 detection accuracy",
|
||||
"timeline": "Target integration in Phase 4 of 8-week implementation roadmap",
|
||||
"priority": "High - significant value recovery opportunity"
|
||||
},
|
||||
"metadata": {
|
||||
"document_reference": "intelligence/session-2/inventory-tracking-spec.md",
|
||||
"section": "6. Integration with S2-H04 Cameras (Optional Enhancement)",
|
||||
"agent_role": "S2-H02: Inventory Tracking System Design",
|
||||
"domain": "CRITICAL - Yacht Equipment Value Recovery"
|
||||
}
|
||||
}
|
||||
55
intelligence/session-2/if-bus-query-s2-h03.json
Normal file
55
intelligence/session-2/if-bus-query-s2-h03.json
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"timestamp": "2025-11-13T10:45:00Z",
|
||||
"performative": "query-if",
|
||||
"sender": "if://agent/session-2/haiku-07",
|
||||
"receiver": [
|
||||
"if://agent/session-2/haiku-03"
|
||||
],
|
||||
"messageId": "query-maintenance-api-001",
|
||||
"priority": "high",
|
||||
"content": {
|
||||
"question": "Does the maintenance API support date-range queries for yearly reporting and service history filtering?",
|
||||
"reasoning": "The Search UX specification requires filtering maintenance records by date ranges for expense rollups, warranty expiration tracking, and service history analysis. Need to confirm API supports queryable date fields like serviceDate, nextDueDate, and createdAt with range operators.",
|
||||
"requiredCapabilities": [
|
||||
"Date range filtering (e.g., from: timestamp, to: timestamp)",
|
||||
"Service status queries (completed, pending, overdue, in-progress)",
|
||||
"Cost range filtering for expense aggregation",
|
||||
"Service type filtering (annual-survey, engine-service, repair, etc)",
|
||||
"Component-based maintenance history queries",
|
||||
"Provider/vendor filtering for service analytics"
|
||||
],
|
||||
"useCase": "Search UX must support queries like:",
|
||||
"examples": [
|
||||
{
|
||||
"query": "Show all completed engine services in 2024",
|
||||
"requires": "GET /api/maintenance?status=completed&serviceType=engine-service&year=2024"
|
||||
},
|
||||
{
|
||||
"query": "List pending maintenance within 30 days",
|
||||
"requires": "GET /api/maintenance?status=pending&nextDueDate[lte]=now+30days"
|
||||
},
|
||||
{
|
||||
"query": "Total maintenance cost by category for Q4 2024",
|
||||
"requires": "GET /api/maintenance/stats?from=2024-10-01&to=2024-12-31&groupBy=category&metric=cost"
|
||||
},
|
||||
{
|
||||
"query": "Services expiring soon (warranty ending)",
|
||||
"requires": "GET /api/maintenance?nextServiceDate[gte]=now&nextServiceDate[lte]=now+90days"
|
||||
}
|
||||
],
|
||||
"deadline": "Confirm before search facet implementation (Phase 2)",
|
||||
"escalation": "If API gaps exist, we may need to create adapter layer in search service"
|
||||
},
|
||||
"expectedResponse": {
|
||||
"type": "confirmation",
|
||||
"shouldInclude": [
|
||||
"API endpoint availability",
|
||||
"Supported filter parameters",
|
||||
"Date query capabilities",
|
||||
"Cost/amount filtering",
|
||||
"Aggregation/stats endpoint details",
|
||||
"Performance characteristics",
|
||||
"Any known limitations"
|
||||
]
|
||||
}
|
||||
}
|
||||
280
intelligence/session-2/if-bus-s2h03-to-s2h07a.json
Normal file
280
intelligence/session-2/if-bus-s2h03-to-s2h07a.json
Normal file
|
|
@ -0,0 +1,280 @@
|
|||
{
|
||||
"performative": "request",
|
||||
"sender": "if://agent/session-2/haiku-03A",
|
||||
"receiver": ["if://agent/session-2/haiku-07A"],
|
||||
"message_id": "vat-compliance-calendar-integration-001",
|
||||
"timestamp": "2025-11-13T00:00:00Z",
|
||||
"content_type": "calendar_integration_request",
|
||||
"priority": "CRITICAL",
|
||||
"expires_at": "2025-12-31T23:59:59Z",
|
||||
|
||||
"content": {
|
||||
"integration_name": "VAT Compliance Deadline Tracking",
|
||||
"integration_purpose": "Feed exit deadlines and compliance alerts from VAT tracking system to calendar for synchronized deadline management",
|
||||
"integration_type": "recurring_deadline_feed_with_alerts",
|
||||
|
||||
"source_system": {
|
||||
"name": "VAT Tax Jurisdiction Tracking & Compliance Reminders",
|
||||
"agent_id": "if://agent/session-2/haiku-03A",
|
||||
"system_id": "vat-tax-tracking-v1",
|
||||
"data_tables": [
|
||||
"boat_tax_status",
|
||||
"compliance_alerts",
|
||||
"jurisdiction_rules",
|
||||
"exit_history"
|
||||
]
|
||||
},
|
||||
|
||||
"target_system": {
|
||||
"name": "Calendar Management System",
|
||||
"agent_id": "if://agent/session-2/haiku-07A",
|
||||
"expected_calendar_backends": [
|
||||
"Google Calendar",
|
||||
"Microsoft Outlook 365",
|
||||
"Apple Calendar",
|
||||
"iCalendar (iCal)",
|
||||
"Caldav",
|
||||
"Exchange"
|
||||
]
|
||||
},
|
||||
|
||||
"data_mapping": {
|
||||
"primary_key": "boat_id",
|
||||
"source_fields": {
|
||||
"boat_name": "boat_tax_status.boat_name",
|
||||
"flag_jurisdiction": "boat_tax_status.flag_jurisdiction",
|
||||
"home_jurisdiction": "boat_tax_status.home_jurisdiction",
|
||||
"ta_entry_date": "boat_tax_status.ta_entry_date",
|
||||
"ta_expiry_date": "boat_tax_status.ta_expiry_date",
|
||||
"next_required_exit_date": "boat_tax_status.next_required_exit_date",
|
||||
"days_until_exit": "boat_tax_status.days_until_exit",
|
||||
"compliance_status": "boat_tax_status.compliance_status",
|
||||
"alert_level": "boat_tax_status.alert_level",
|
||||
"vat_paid": "boat_tax_status.vat_paid"
|
||||
}
|
||||
},
|
||||
|
||||
"event_specifications": {
|
||||
"primary_event": {
|
||||
"event_type": "tax_exit_required",
|
||||
"event_name": "VAT Compliance - EU Exit Required",
|
||||
"trigger_condition": "boat_tax_status.ta_status == 'ACTIVE' AND boat_tax_status.vat_paid == FALSE",
|
||||
"calendar_date_field": "boat_tax_status.next_required_exit_date",
|
||||
"calendar_date_type": "hard_deadline",
|
||||
|
||||
"title_template": "🚢 EU Exit Required - {{boat_name}} ({{home_jurisdiction}}) - VAT Compliance Deadline",
|
||||
"description_template": "CRITICAL DEADLINE: Your non-VAT paid yacht {{boat_name}} must exit {{home_jurisdiction}} EU waters by {{ta_expiry_date}} to comply with EU VAT regulations.\n\nViolation Consequences:\n- VAT Assessment: {{jurisdiction_vat_rate}}% of yacht value\n- Customs Duties: 5-10% additional\n- Administrative Penalties: 50-100% of VAT amount\n- Criminal Liability: Possible prosecution for customs violations\n- Asset Risk: Potential yacht seizure and impound\n\nRequired Actions:\n1. Book non-EU marina (Gibraltar recommended: 0% VAT)\n2. Arrange crew and logistics\n3. Prepare exit documentation (marina invoice + customs stamp)\n4. Notify customs authorities\n5. Confirm vessel insurance for transit\n\nJurisdiction Specific Notes:\n{{jurisdiction_specific_notes}}\n\nRecommended Contacts:\nCustoms Authority: {{customs_authority_name}}\nEmail: {{customs_authority_email}}\nPhone: {{customs_authority_phone}}",
|
||||
|
||||
"color": "red",
|
||||
"priority": "CRITICAL",
|
||||
"visibility": "public",
|
||||
"all_day_event": true,
|
||||
|
||||
"notification_rules": [
|
||||
{
|
||||
"days_before_deadline": 60,
|
||||
"notification_type": "reminder",
|
||||
"channels": ["email"],
|
||||
"message": "Planning Alert: EU Exit Required in 60 Days"
|
||||
},
|
||||
{
|
||||
"days_before_deadline": 30,
|
||||
"notification_type": "warning",
|
||||
"channels": ["email", "sms"],
|
||||
"message": "Warning: EU Exit Required in 30 Days - Start Logistics Planning"
|
||||
},
|
||||
{
|
||||
"days_before_deadline": 14,
|
||||
"notification_type": "warning",
|
||||
"channels": ["email", "sms", "in_app"],
|
||||
"message": "Warning: EU Exit Required in 14 Days - Confirm Destination & Departure"
|
||||
},
|
||||
{
|
||||
"days_before_deadline": 7,
|
||||
"notification_type": "critical",
|
||||
"channels": ["email", "sms", "in_app_popup", "phone_call"],
|
||||
"message": "URGENT: EU Exit Required in 7 Days - Final Preparation Required"
|
||||
},
|
||||
{
|
||||
"days_before_deadline": 0,
|
||||
"notification_type": "critical",
|
||||
"channels": ["email", "sms", "in_app_popup", "phone_call"],
|
||||
"message": "CRITICAL: EU Exit Deadline Today - Immediate Departure Required"
|
||||
},
|
||||
{
|
||||
"days_before_deadline": -1,
|
||||
"notification_type": "escalation",
|
||||
"channels": ["email", "sms", "in_app_popup", "phone_call", "legal_escalation"],
|
||||
"message": "OVERDUE: EU Exit Deadline Passed - Legal Risk - Contact Compliance Officer"
|
||||
}
|
||||
],
|
||||
|
||||
"related_tasks": [
|
||||
{
|
||||
"task_type": "booking",
|
||||
"description": "Book non-EU marina (Gibraltar/Melilla/Ceuta/etc)",
|
||||
"days_before_deadline": 30,
|
||||
"owner": "boat_owner"
|
||||
},
|
||||
{
|
||||
"task_type": "logistics",
|
||||
"description": "Arrange crew, fuel, provisions, insurance",
|
||||
"days_before_deadline": 21,
|
||||
"owner": "boat_owner"
|
||||
},
|
||||
{
|
||||
"task_type": "documentation",
|
||||
"description": "Prepare exit documentation checklist (marina invoice, customs stamp, insurance)",
|
||||
"days_before_deadline": 14,
|
||||
"owner": "boat_owner"
|
||||
},
|
||||
{
|
||||
"task_type": "notification",
|
||||
"description": "Notify customs authorities of planned departure",
|
||||
"days_before_deadline": 7,
|
||||
"owner": "boat_owner"
|
||||
},
|
||||
{
|
||||
"task_type": "confirmation",
|
||||
"description": "Final verification: destination marina, crew, weather forecast, transit route",
|
||||
"days_before_deadline": 3,
|
||||
"owner": "boat_owner"
|
||||
}
|
||||
],
|
||||
|
||||
"attachments": [
|
||||
{
|
||||
"name": "Exit-Requirements-Checklist.pdf",
|
||||
"type": "reference",
|
||||
"source": "vat-tax-tracking-spec.md"
|
||||
},
|
||||
{
|
||||
"name": "Customs-Contact-Information.pdf",
|
||||
"type": "reference",
|
||||
"jurisdiction_specific": true
|
||||
},
|
||||
{
|
||||
"name": "Marina-Documentation-Template.docx",
|
||||
"type": "template"
|
||||
},
|
||||
{
|
||||
"name": "Insurance-Transit-Verification-Form.pdf",
|
||||
"type": "checklist"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"reminder_events": [
|
||||
{
|
||||
"event_type": "vat_compliance_reminder",
|
||||
"trigger": "days_until_exit == 60",
|
||||
"title": "💡 [60 Days] EU Exit Deadline Planning - {{boat_name}}",
|
||||
"color": "yellow",
|
||||
"priority": "MEDIUM"
|
||||
},
|
||||
{
|
||||
"event_type": "vat_compliance_reminder",
|
||||
"trigger": "days_until_exit == 30",
|
||||
"title": "⚠️ [30 Days] EU Exit Deadline Approaching - {{boat_name}}",
|
||||
"color": "orange",
|
||||
"priority": "HIGH"
|
||||
},
|
||||
{
|
||||
"event_type": "vat_compliance_reminder",
|
||||
"trigger": "days_until_exit == 14",
|
||||
"title": "⚠️ [14 Days] EU Exit URGENT - {{boat_name}} - Confirm Logistics",
|
||||
"color": "orange",
|
||||
"priority": "HIGH"
|
||||
},
|
||||
{
|
||||
"event_type": "vat_compliance_reminder",
|
||||
"trigger": "days_until_exit == 7",
|
||||
"title": "🚨 [7 Days] EU Exit CRITICAL - {{boat_name}} - Final Preparation",
|
||||
"color": "red",
|
||||
"priority": "CRITICAL"
|
||||
}
|
||||
],
|
||||
|
||||
"secondary_event": {
|
||||
"event_type": "tax_lifetime_limit_warning",
|
||||
"trigger_condition": "boat_tax_status.ta_years_remaining < 1.5",
|
||||
"title_template": "⚠️ VAT Lifetime Limit Warning - {{boat_name}} - {{ta_years_remaining}} Years Remaining",
|
||||
"description_template": "Your yacht {{boat_name}} has spent {{ta_cumulative_months}} months in EU waters under Temporary Admission. After 10 years total (120 months), you must pay full VAT or register permanently. {{ta_years_remaining}} years remaining.",
|
||||
"color": "orange",
|
||||
"priority": "HIGH"
|
||||
}
|
||||
},
|
||||
|
||||
"sync_configuration": {
|
||||
"sync_frequency": "daily_at_02:00_UTC",
|
||||
"sync_method": "incremental_delta_with_full_refresh_weekly",
|
||||
"conflict_resolution_policy": "calendar_event_is_authoritative_if_manually_modified",
|
||||
"duplicate_prevention": "check_boat_id_and_date_combination",
|
||||
"timezone_awareness": "yacht_operating_timezone_plus_UTC",
|
||||
"historical_event_retention": "24_months",
|
||||
"past_deadline_handling": "escalate_to_compliance_officer"
|
||||
},
|
||||
|
||||
"notification_configuration": {
|
||||
"default_notification_channels": [
|
||||
"email",
|
||||
"sms",
|
||||
"in_app_notification",
|
||||
"calendar_alert"
|
||||
],
|
||||
"notification_recipient_types": [
|
||||
"boat_owner",
|
||||
"boat_captain",
|
||||
"compliance_officer",
|
||||
"insurance_broker"
|
||||
],
|
||||
"timezone_for_notifications": "yacht_operating_timezone",
|
||||
"quiet_hours": "22:00_to_06:00_local_time (except CRITICAL severity)",
|
||||
"language_support": "jurisdictions_language_plus_english"
|
||||
},
|
||||
|
||||
"feature_requests": {
|
||||
"required_features": [
|
||||
"color_coding: red=critical, orange=high, yellow=medium",
|
||||
"recurring_reminder_notifications: 60/30/14/7 days before deadline",
|
||||
"task_subtasks_integration: create action items linked to calendar event",
|
||||
"document_attachments: checklist PDFs, templates, contact information",
|
||||
"timezone_support: local yacht timezone + UTC for global coordination",
|
||||
"mobile_notifications: push notifications for iOS/Android",
|
||||
"email_templates: customizable jurisdiction-specific templates",
|
||||
"sms_alerts: critical alerts (7 days, overdue)",
|
||||
"icalendar_export: allow sharing deadline calendars with crew/brokers"
|
||||
],
|
||||
|
||||
"optional_enhancements": [
|
||||
"multi_device_sync: sync across phone/tablet/desktop",
|
||||
"siri_shortcuts_integration: voice control for checking deadline status",
|
||||
"crew_calendar_sharing: share specific boat deadlines with captain/crew",
|
||||
"recurring_event_patterns: auto-generate calendar events for annual resets",
|
||||
"weather_integration: show weather forecast at exit destination",
|
||||
"voyage_planning: integrate with navigation/weather routing systems"
|
||||
]
|
||||
},
|
||||
|
||||
"integration_status": {
|
||||
"requested_status": "ACTIVE",
|
||||
"requested_activation_date": "2025-11-13",
|
||||
"expected_event_count_per_month": "15-25 events",
|
||||
"data_volume": "low_to_moderate"
|
||||
},
|
||||
|
||||
"success_metrics": {
|
||||
"all_boats_have_calendar_events": true,
|
||||
"compliance_alerts_reach_owners": "100%",
|
||||
"notification_delivery_rate": ">95%",
|
||||
"calendar_event_accuracy": "100%",
|
||||
"owner_action_on_alerts": "tracked_via_follow_up"
|
||||
},
|
||||
|
||||
"contingency": {
|
||||
"if_calendar_integration_fails": "fall_back_to_email_only_alerts",
|
||||
"if_sync_delays": "allow_up_to_6_hours_for_calendar_propagation",
|
||||
"if_notification_fails": "escalate_to_direct_phone_call"
|
||||
}
|
||||
}
|
||||
}
|
||||
196
intelligence/session-2/if-bus-s2h05-to-s2h03.json
Normal file
196
intelligence/session-2/if-bus-s2h05-to-s2h03.json
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
{
|
||||
"message_id": "if_bus_20251113_s2h05_s2h03_001",
|
||||
"timestamp": "2025-11-13T11:00:00Z",
|
||||
"performative": "confirm",
|
||||
"sender": "if://agent/session-2/haiku-05",
|
||||
"receiver": [
|
||||
"if://agent/session-2/haiku-03"
|
||||
],
|
||||
"subject": "Contact Management System Ready for Maintenance Log Integration",
|
||||
"content": {
|
||||
"agent_identity": "S2-H05",
|
||||
"domain": "Contact Management System",
|
||||
"status": "operational",
|
||||
"integration": "Contact auto-suggest from maintenance log",
|
||||
"capability_summary": "Contact Management System ready to accept service provider data from maintenance log entries and auto-suggest contact creation.",
|
||||
|
||||
"api_endpoint": {
|
||||
"method": "POST",
|
||||
"path": "/api/contacts/suggest",
|
||||
"base_url": "https://navidocs.local/api",
|
||||
"full_url": "https://navidocs.local/api/contacts/suggest",
|
||||
"authentication": "Bearer {JWT_TOKEN}"
|
||||
},
|
||||
|
||||
"expected_payload": {
|
||||
"boat_id": {
|
||||
"type": "number (BIGINT)",
|
||||
"required": true,
|
||||
"description": "Unique boat identifier"
|
||||
},
|
||||
"maintenance_log_id": {
|
||||
"type": "number (BIGINT)",
|
||||
"required": true,
|
||||
"description": "Reference to S2-H03 maintenance log entry"
|
||||
},
|
||||
"extracted_provider": {
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"fields": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Service provider name (extracted from maintenance log)"
|
||||
},
|
||||
"role": {
|
||||
"type": "enum",
|
||||
"required": false,
|
||||
"options": [
|
||||
"marina",
|
||||
"mechanic",
|
||||
"cleaner",
|
||||
"charter_crew",
|
||||
"electrician",
|
||||
"surveyor",
|
||||
"rigger",
|
||||
"canvas_maker",
|
||||
"detailer"
|
||||
],
|
||||
"description": "Service provider role (auto-mapped from service_type if possible)"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "Provider phone number (if available in log)"
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "Provider email (if available in log)"
|
||||
},
|
||||
"company": {
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "Provider company name"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"example_request": {
|
||||
"boat_id": 123,
|
||||
"maintenance_log_id": 456,
|
||||
"extracted_provider": {
|
||||
"name": "John's Marine Service",
|
||||
"role": "mechanic",
|
||||
"phone": "+1-555-0100",
|
||||
"email": "john@marine.com",
|
||||
"company": "John's Marine"
|
||||
}
|
||||
},
|
||||
|
||||
"expected_response": {
|
||||
"status_code": 200,
|
||||
"body": {
|
||||
"suggestion_id": "number",
|
||||
"boat_id": "number",
|
||||
"maintenance_log_id": "number",
|
||||
"status": "enum (pending | accepted | rejected | merged)",
|
||||
"suggested_contact": {
|
||||
"name": "string",
|
||||
"role": "string",
|
||||
"phone": "string",
|
||||
"email": "string"
|
||||
},
|
||||
"actions": [
|
||||
"create",
|
||||
"merge_with_existing",
|
||||
"skip"
|
||||
],
|
||||
"existing_match": "object (if fuzzy match found)"
|
||||
}
|
||||
},
|
||||
|
||||
"example_response": {
|
||||
"suggestion_id": 789,
|
||||
"boat_id": 123,
|
||||
"maintenance_log_id": 456,
|
||||
"status": "pending",
|
||||
"suggested_contact": {
|
||||
"name": "John's Marine Service",
|
||||
"role": "mechanic",
|
||||
"phone": "+1-555-0100",
|
||||
"email": "john@marine.com"
|
||||
},
|
||||
"actions": [
|
||||
"create",
|
||||
"merge_with_existing",
|
||||
"skip"
|
||||
],
|
||||
"existing_match": null
|
||||
},
|
||||
|
||||
"workflow": {
|
||||
"step_1_trigger": "S2-H03 maintenance log entry created with service provider details",
|
||||
"step_2_extraction": "S2-H03 extracts provider name, service type, phone, email",
|
||||
"step_3_api_call": "S2-H03 calls POST /api/contacts/suggest with extracted data",
|
||||
"step_4_processing": "S2-H05 processes suggestion, performs fuzzy matching, creates suggestion record",
|
||||
"step_5_response": "S2-H05 returns suggestion ID and matching options",
|
||||
"step_6_user_action": "User reviews suggestion in Contact Management UI",
|
||||
"step_7_confirmation": "User chooses: Create, Merge, or Skip",
|
||||
"step_8_linkage": "S2-H05 updates contact and creates bidirectional link to maintenance_log_id"
|
||||
},
|
||||
|
||||
"error_handling": {
|
||||
"400_bad_request": "Missing required fields (boat_id, maintenance_log_id, name)",
|
||||
"401_unauthorized": "Invalid authentication token",
|
||||
"404_not_found": "Boat not found",
|
||||
"409_conflict": "Contact already exists (merge suggested)",
|
||||
"500_internal_error": "Database error processing suggestion"
|
||||
},
|
||||
|
||||
"rate_limiting": {
|
||||
"calls_per_minute": 100,
|
||||
"calls_per_hour": 5000,
|
||||
"per_boat_per_hour": 500
|
||||
},
|
||||
|
||||
"features": {
|
||||
"fuzzy_matching": "Automatically detect similar provider names to suggest merging",
|
||||
"auto_role_detection": "Map maintenance service_type to contact role",
|
||||
"suggestions_storage": "All suggestions stored in contact_suggestions table for audit",
|
||||
"user_approval_required": true,
|
||||
"bidirectional_linking": "Link contact to maintenance log entry upon acceptance"
|
||||
},
|
||||
|
||||
"contact_roles_mapping": {
|
||||
"engine_repair": "mechanic",
|
||||
"hull_maintenance": "mechanic",
|
||||
"electrical_work": "electrician",
|
||||
"canvas_repair": "canvas_maker",
|
||||
"rigging_work": "rigger",
|
||||
"cleaning_service": "cleaner",
|
||||
"boat_detailing": "detailer",
|
||||
"survey_inspection": "surveyor",
|
||||
"marina_service": "marina",
|
||||
"crew_member": "charter_crew"
|
||||
},
|
||||
|
||||
"next_steps": {
|
||||
"s2_h03_action_1": "Implement extraction of provider details from maintenance log entries",
|
||||
"s2_h03_action_2": "Add integration logic to call POST /api/contacts/suggest endpoint",
|
||||
"s2_h03_action_3": "Implement fallback for cases where provider not fully specified",
|
||||
"s2_h05_action_1": "Implement fuzzy matching algorithm for contact deduplication",
|
||||
"s2_h05_action_2": "Create UI suggestions panel in Contact Management interface",
|
||||
"s2_h05_action_3": "Implement batch processing for high-volume suggestions"
|
||||
},
|
||||
|
||||
"success_criteria": {
|
||||
"automation": "95% of provider mentions in maintenance log auto-suggest contacts",
|
||||
"accuracy": "90% of suggestions are valid contacts (user acceptance rate)",
|
||||
"deduplication": "Fuzzy matching prevents duplicate contacts for same provider",
|
||||
"speed": "API response time < 500ms",
|
||||
"linkage": "All accepted suggestions create proper maintenance_log <-> contact links"
|
||||
}
|
||||
}
|
||||
}
|
||||
293
intelligence/session-2/if-bus-s2h05-to-s2h08.json
Normal file
293
intelligence/session-2/if-bus-s2h05-to-s2h08.json
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
{
|
||||
"message_id": "if_bus_20251113_s2h05_s2h08_001",
|
||||
"timestamp": "2025-11-13T11:00:00Z",
|
||||
"performative": "confirm",
|
||||
"sender": "if://agent/session-2/haiku-05",
|
||||
"receiver": [
|
||||
"if://agent/session-2/haiku-08"
|
||||
],
|
||||
"subject": "Contact Management System Ready for WhatsApp Integration",
|
||||
"content": {
|
||||
"agent_identity": "S2-H05",
|
||||
"domain": "Contact Management System",
|
||||
"status": "operational",
|
||||
"integration": "Contact recommendations and sharing via WhatsApp",
|
||||
"capability_summary": "Contact Management System ready to provide intelligent contact recommendations for voice commands, share contacts via WhatsApp, and support bulk messaging.",
|
||||
|
||||
"integration_points": [
|
||||
{
|
||||
"name": "contact_recommendation",
|
||||
"description": "S2-H08 requests contact recommendation based on role",
|
||||
"trigger": "Voice command: '@NaviDocs call mechanic'",
|
||||
"api_endpoint": {
|
||||
"method": "GET",
|
||||
"path": "/api/contacts/recommend",
|
||||
"parameters": {
|
||||
"boat_id": "number (BIGINT, required)",
|
||||
"role": "enum (required) - marina|mechanic|cleaner|charter_crew|electrician|surveyor|rigger|canvas_maker|detailer",
|
||||
"context": "string (optional) - recent|favorite|most_used (default: recent)"
|
||||
}
|
||||
},
|
||||
"if_bus_request": {
|
||||
"performative": "request",
|
||||
"sender": "if://agent/session-2/haiku-08",
|
||||
"receiver": ["if://agent/session-2/haiku-05"],
|
||||
"content": {
|
||||
"action": "recommend_contact",
|
||||
"boat_id": 123,
|
||||
"role": "mechanic",
|
||||
"context": "whatsapp_voice_command",
|
||||
"trigger_text": "@NaviDocs call mechanic"
|
||||
}
|
||||
},
|
||||
"if_bus_response": {
|
||||
"performative": "inform",
|
||||
"sender": "if://agent/session-2/haiku-05",
|
||||
"receiver": ["if://agent/session-2/haiku-08"],
|
||||
"content": {
|
||||
"recommended_contact": {
|
||||
"id": 1,
|
||||
"name": "John's Marine Service",
|
||||
"phone": "+1-555-0100",
|
||||
"role": "mechanic",
|
||||
"whatsapp_enabled": true,
|
||||
"last_used": "2025-11-10T14:30:00Z"
|
||||
},
|
||||
"alternatives": [
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Jane's Marine Repair",
|
||||
"phone": "+1-555-0102",
|
||||
"role": "mechanic"
|
||||
}
|
||||
],
|
||||
"action": "initiate_whatsapp_call",
|
||||
"reason": "Recently used (2 days ago)"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "contact_sharing",
|
||||
"description": "S2-H08 shares contact details to WhatsApp group",
|
||||
"trigger": "User action: 'Share' button in Contact Detail view",
|
||||
"api_endpoint": {
|
||||
"method": "POST",
|
||||
"path": "/api/contacts/{contact_id}/share",
|
||||
"body": {
|
||||
"platform": "enum - whatsapp|email|sms",
|
||||
"action": "share_to_group|share_to_contact",
|
||||
"group_id": "string (if sharing to group)",
|
||||
"recipient": "string (if sharing to individual)"
|
||||
}
|
||||
},
|
||||
"if_bus_request": {
|
||||
"performative": "request",
|
||||
"sender": "if://agent/session-2/haiku-05",
|
||||
"receiver": ["if://agent/session-2/haiku-08"],
|
||||
"content": {
|
||||
"action": "share_contact",
|
||||
"contact": {
|
||||
"id": 1,
|
||||
"name": "John's Marine Service",
|
||||
"phone": "+1-555-0100",
|
||||
"email": "john@marine.com",
|
||||
"role": "mechanic",
|
||||
"company": "John's Marine"
|
||||
},
|
||||
"target": {
|
||||
"type": "group|contact",
|
||||
"id": "s2_h08_crew_group"
|
||||
},
|
||||
"format": "vcard|text|link",
|
||||
"include_fields": ["name", "phone", "email", "role"]
|
||||
}
|
||||
},
|
||||
"if_bus_response": {
|
||||
"performative": "inform",
|
||||
"sender": "if://agent/session-2/haiku-08",
|
||||
"receiver": ["if://agent/session-2/haiku-05"],
|
||||
"content": {
|
||||
"status": "shared",
|
||||
"platform": "whatsapp",
|
||||
"group_id": "s2_h08_crew_group",
|
||||
"timestamp": "2025-11-13T11:05:00Z"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "bulk_messaging",
|
||||
"description": "S2-H08 sends bulk messages to contacts with specific role",
|
||||
"trigger": "Voice command: '@NaviDocs message crew' or '@NaviDocs email crew'",
|
||||
"api_endpoint": {
|
||||
"method": "POST",
|
||||
"path": "/api/contacts/bulk-action",
|
||||
"body": {
|
||||
"action": "whatsapp_bulk_message|email_bulk|sms_bulk",
|
||||
"role": "enum",
|
||||
"boat_id": "number",
|
||||
"message": "string",
|
||||
"subject": "string (for email)",
|
||||
"platform": "whatsapp|email|sms"
|
||||
}
|
||||
},
|
||||
"if_bus_request": {
|
||||
"performative": "request",
|
||||
"sender": "if://agent/session-2/haiku-05",
|
||||
"receiver": ["if://agent/session-2/haiku-08"],
|
||||
"content": {
|
||||
"action": "bulk_send_whatsapp",
|
||||
"contacts": [
|
||||
{
|
||||
"id": 10,
|
||||
"phone": "+1-555-0200",
|
||||
"name": "Captain John",
|
||||
"role": "charter_crew"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"phone": "+1-555-0201",
|
||||
"name": "Crew Member Sarah",
|
||||
"role": "charter_crew"
|
||||
}
|
||||
],
|
||||
"message": "Charter scheduled for next weekend. Please confirm availability.",
|
||||
"boat_id": 123
|
||||
}
|
||||
},
|
||||
"if_bus_response": {
|
||||
"performative": "inform",
|
||||
"sender": "if://agent/session-2/haiku-08",
|
||||
"receiver": ["if://agent/session-2/haiku-05"],
|
||||
"content": {
|
||||
"status": "sent",
|
||||
"platform": "whatsapp",
|
||||
"recipients_count": 2,
|
||||
"sent_timestamp": "2025-11-13T11:05:00Z",
|
||||
"delivery_tracking": [
|
||||
{
|
||||
"contact_id": 10,
|
||||
"status": "sent",
|
||||
"timestamp": "2025-11-13T11:05:01Z"
|
||||
},
|
||||
{
|
||||
"contact_id": 11,
|
||||
"status": "sent",
|
||||
"timestamp": "2025-11-13T11:05:02Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"voice_command_examples": {
|
||||
"call_mechanics": {
|
||||
"command": "@NaviDocs call mechanic",
|
||||
"response": "Calling John's Marine Service..."
|
||||
},
|
||||
"call_electrician": {
|
||||
"command": "@NaviDocs call electrician",
|
||||
"response": "Calling Jane Electrical..."
|
||||
},
|
||||
"email_crew": {
|
||||
"command": "@NaviDocs email charter crew",
|
||||
"response": "Which crew members? (shows list)"
|
||||
},
|
||||
"message_crew": {
|
||||
"command": "@NaviDocs message crew",
|
||||
"response": "What message would you like to send?"
|
||||
},
|
||||
"find_provider": {
|
||||
"command": "@NaviDocs find surveyor",
|
||||
"response": "Found 2 surveyors. Most recent: Smith Marine Surveys (used 3 weeks ago)"
|
||||
}
|
||||
},
|
||||
|
||||
"whatsapp_integration_details": {
|
||||
"phone_link_format": "whatsapp://send?phone=+1-555-0100&text=Hello",
|
||||
"supported_actions": [
|
||||
"whatsapp_call",
|
||||
"whatsapp_message",
|
||||
"whatsapp_share_contact",
|
||||
"whatsapp_group_message"
|
||||
],
|
||||
"contact_vcard_support": true,
|
||||
"bulk_message_limit": "100 messages per batch",
|
||||
"rate_limits": {
|
||||
"per_minute": 10,
|
||||
"per_hour": 500
|
||||
}
|
||||
},
|
||||
|
||||
"recommendation_algorithm": {
|
||||
"priority_order": [
|
||||
{
|
||||
"rank": 1,
|
||||
"criteria": "Favorite contact + used within 7 days",
|
||||
"weight": 1.0
|
||||
},
|
||||
{
|
||||
"rank": 2,
|
||||
"criteria": "Used within 14 days",
|
||||
"weight": 0.9
|
||||
},
|
||||
{
|
||||
"rank": 3,
|
||||
"criteria": "Most frequently used (by usage_count)",
|
||||
"weight": 0.8
|
||||
},
|
||||
{
|
||||
"rank": 4,
|
||||
"criteria": "Favorite contact (any recency)",
|
||||
"weight": 0.7
|
||||
},
|
||||
{
|
||||
"rank": 5,
|
||||
"criteria": "First available contact of role",
|
||||
"weight": 0.5
|
||||
}
|
||||
],
|
||||
"timeliness": "Fresh data (< 5 seconds from request)",
|
||||
"fallback": "Return top 3 alternatives if primary recommendation unavailable"
|
||||
},
|
||||
|
||||
"interaction_logging": {
|
||||
"track": "All contact interactions via WhatsApp",
|
||||
"record_fields": [
|
||||
"contact_id",
|
||||
"boat_id",
|
||||
"interaction_type (whatsapp_call|whatsapp_message)",
|
||||
"interaction_date",
|
||||
"source_type (whatsapp_voice_command|user_action)"
|
||||
],
|
||||
"update_contact": "Set last_used timestamp, increment usage_count"
|
||||
},
|
||||
|
||||
"next_steps": {
|
||||
"s2_h08_action_1": "Parse voice commands for contact recommendations",
|
||||
"s2_h08_action_2": "Implement WhatsApp group contact retrieval",
|
||||
"s2_h08_action_3": "Handle incoming WhatsApp messages for '@NaviDocs' mentions",
|
||||
"s2_h05_action_1": "Implement recommendation endpoint with smart algorithms",
|
||||
"s2_h05_action_2": "Create bulk messaging endpoint with delivery tracking",
|
||||
"s2_h05_action_3": "Add WhatsApp integration hooks to contact sharing"
|
||||
},
|
||||
|
||||
"success_criteria": {
|
||||
"voice_command_recognition": "90% accuracy in identifying requested role from voice",
|
||||
"recommendation_speed": "< 200ms API response time",
|
||||
"user_satisfaction": "85% of recommendations match user intent",
|
||||
"sharing_reliability": "99.9% successful contact sharing to groups",
|
||||
"bulk_messaging": "99% delivery success rate"
|
||||
},
|
||||
|
||||
"security_considerations": {
|
||||
"phone_number_encryption": "All phone numbers encrypted at rest",
|
||||
"whatsapp_compliance": "Comply with WhatsApp Business API Terms of Service",
|
||||
"message_logging": "Log all bulk messages for audit",
|
||||
"user_consent": "Verify user consent before sending bulk messages",
|
||||
"data_retention": "Maintain interaction logs for 1 year, then archive"
|
||||
}
|
||||
}
|
||||
}
|
||||
226
intelligence/session-2/if-bus-s2h07a-integration-confirm.json
Normal file
226
intelligence/session-2/if-bus-s2h07a-integration-confirm.json
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
{
|
||||
"performative": "confirm",
|
||||
"sender": "if://agent/session-2/haiku-07A",
|
||||
"receiver": [
|
||||
"if://agent/session-2/haiku-03",
|
||||
"if://agent/session-2/haiku-02",
|
||||
"if://agent/session-2/haiku-03A",
|
||||
"if://agent/session-2/haiku-06"
|
||||
],
|
||||
"timestamp": "2025-11-13T12:00:00Z",
|
||||
"message_id": "s2h07a-confirm-001",
|
||||
"content": {
|
||||
"integration_status": "ready",
|
||||
"system": "Multi-Calendar System (S2-H07A)",
|
||||
"capabilities": [
|
||||
"Service Calendar - maintenance tracking",
|
||||
"Warranty Calendar - equipment warranty management",
|
||||
"Owner Onboard Calendar - owner availability tracking",
|
||||
"Work Roadmap Calendar - maintenance planning with budgets",
|
||||
"Tax/Exit Calendar - tax compliance tracking"
|
||||
],
|
||||
"api_endpoints": {
|
||||
"create_event": "POST /api/calendar/events",
|
||||
"get_events": "GET /api/calendar/events?boat_id=X&event_type=Y&start_date=Z",
|
||||
"update_event": "PATCH /api/calendar/events/:event_id",
|
||||
"delete_event": "DELETE /api/calendar/events/:event_id",
|
||||
"approve_work": "POST /api/calendar/work-roadmap/:work_event_id/approve",
|
||||
"get_conflicts": "GET /api/calendar/conflicts?boat_id=X",
|
||||
"export_ical": "GET /api/calendar/export/ical?boat_id=X",
|
||||
"sync_google_calendar": "POST /api/calendar/export/google-calendar/sync"
|
||||
},
|
||||
"integrations": {
|
||||
"S2-H03_maintenance_log": {
|
||||
"status": "confirmed_ready",
|
||||
"event_type": "maintenance_log_created",
|
||||
"calendar_types": ["service_due", "service_completed"],
|
||||
"fields_mapped": [
|
||||
"service_type",
|
||||
"next_due_date",
|
||||
"next_due_engine_hours",
|
||||
"provider_name",
|
||||
"cost"
|
||||
],
|
||||
"trigger_frequency": "on_create_or_update",
|
||||
"reminder_schedule": [60, 30, 14, 7],
|
||||
"reminder_days": "before service due date"
|
||||
},
|
||||
"S2-H02_inventory_tracking": {
|
||||
"status": "confirmed_ready",
|
||||
"event_type": "inventory_warranty_expiring",
|
||||
"calendar_types": ["warranty_expires", "warranty_alert"],
|
||||
"fields_mapped": [
|
||||
"item_name",
|
||||
"warranty_expiration_date",
|
||||
"manufacturer",
|
||||
"serial_number"
|
||||
],
|
||||
"trigger_frequency": "daily_check_expiring_soon",
|
||||
"reminder_schedule": [90, 60, 30],
|
||||
"reminder_days": "before warranty expiration"
|
||||
},
|
||||
"S2-H06_expense_tracking": {
|
||||
"status": "confirmed_ready",
|
||||
"event_type": "work_expense_recorded",
|
||||
"calendar_types": ["work_in_progress", "work_completed"],
|
||||
"fields_mapped": [
|
||||
"work_order_id",
|
||||
"invoice_amount",
|
||||
"invoice_type",
|
||||
"cumulative_actual_cost"
|
||||
],
|
||||
"trigger_frequency": "on_invoice_submitted",
|
||||
"budget_variance_alert_threshold": "110%",
|
||||
"variance_notification": "sms+email to owner"
|
||||
},
|
||||
"S2-H03A_tax_exit_calendar": {
|
||||
"status": "confirmed_ready",
|
||||
"event_type": "tax_exit_required",
|
||||
"calendar_types": ["tax_exit_required"],
|
||||
"fields_mapped": [
|
||||
"requirement_type",
|
||||
"due_date",
|
||||
"jurisdiction",
|
||||
"required_actions"
|
||||
],
|
||||
"trigger_frequency": "on_calculation",
|
||||
"notification_schedule": "90,60,30,14,7 days before"
|
||||
}
|
||||
},
|
||||
"expected_message_format": {
|
||||
"from_S2H03": {
|
||||
"performative": "inform",
|
||||
"sender": "if://agent/session-2/haiku-03",
|
||||
"receiver": "if://agent/session-2/haiku-07A",
|
||||
"content": {
|
||||
"event": "maintenance_log_created",
|
||||
"data": {
|
||||
"maintenance_id": "number",
|
||||
"boat_id": "number",
|
||||
"service_type": "string",
|
||||
"date": "ISO-8601",
|
||||
"next_due_date": "ISO-8601",
|
||||
"next_due_engine_hours": "integer",
|
||||
"provider_name": "string",
|
||||
"cost": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"from_S2H02": {
|
||||
"performative": "inform",
|
||||
"sender": "if://agent/session-2/haiku-02",
|
||||
"receiver": "if://agent/session-2/haiku-07A",
|
||||
"content": {
|
||||
"event": "inventory_warranty_expiring",
|
||||
"data": {
|
||||
"inventory_id": "number",
|
||||
"boat_id": "number",
|
||||
"item_name": "string",
|
||||
"warranty_expiration": "ISO-8601",
|
||||
"days_until_expiration": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"from_S2H06": {
|
||||
"performative": "inform",
|
||||
"sender": "if://agent/session-2/haiku-06",
|
||||
"receiver": "if://agent/session-2/haiku-07A",
|
||||
"content": {
|
||||
"event": "work_expense_recorded",
|
||||
"data": {
|
||||
"work_event_id": "number",
|
||||
"boat_id": "number",
|
||||
"invoice_amount": "number",
|
||||
"invoice_type": "string",
|
||||
"cumulative_actual_cost": "number",
|
||||
"budget_amount": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"from_S2H03A": {
|
||||
"performative": "inform",
|
||||
"sender": "if://agent/session-2/haiku-03A",
|
||||
"receiver": "if://agent/session-2/haiku-07A",
|
||||
"content": {
|
||||
"event": "tax_exit_required",
|
||||
"data": {
|
||||
"boat_id": "number",
|
||||
"requirement_type": "string",
|
||||
"due_date": "ISO-8601",
|
||||
"jurisdiction": "string",
|
||||
"required_actions": "array of strings"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"database_schema": {
|
||||
"primary_table": "calendar_events",
|
||||
"supporting_tables": [
|
||||
"calendar_notification_rules",
|
||||
"calendar_conflict_detection",
|
||||
"calendar_exports"
|
||||
],
|
||||
"key_columns": [
|
||||
"event_id",
|
||||
"boat_id",
|
||||
"event_type",
|
||||
"source_id",
|
||||
"source_type",
|
||||
"start_date",
|
||||
"end_date",
|
||||
"status",
|
||||
"budget_amount",
|
||||
"actual_cost",
|
||||
"has_conflicts"
|
||||
]
|
||||
},
|
||||
"features": {
|
||||
"conflict_detection": {
|
||||
"types": [
|
||||
"date_overlap",
|
||||
"resource_conflict",
|
||||
"owner_availability",
|
||||
"work_blocking",
|
||||
"budget_excess"
|
||||
],
|
||||
"automatic_checks": "daily_run_at_midnight_utc",
|
||||
"notification_on_conflict": "high_and_critical_severity"
|
||||
},
|
||||
"smart_notifications": {
|
||||
"channels": ["email", "sms", "push", "in_app"],
|
||||
"context_aware": true,
|
||||
"examples": [
|
||||
"Service due + Owner arriving in 3 days → flag as conflict",
|
||||
"Work over budget 110% → urgent alert",
|
||||
"Warranty expiring and service overdue → combined reminder"
|
||||
]
|
||||
},
|
||||
"export_sync": {
|
||||
"formats": ["iCal", "Google Calendar"],
|
||||
"sync_frequency": "daily",
|
||||
"two_way_sync": "supported_for_google_calendar"
|
||||
},
|
||||
"budget_workflow": {
|
||||
"states": ["proposed", "approved", "partial", "rejected"],
|
||||
"approval_deadline": "7_days",
|
||||
"variance_tracking": "actual_vs_budget",
|
||||
"owner_approval_required": true
|
||||
}
|
||||
},
|
||||
"performance_targets": {
|
||||
"calendar_load_time_ms": 2000,
|
||||
"conflict_detection_accuracy": "99%",
|
||||
"notification_delivery_rate": "95%",
|
||||
"calendar_export_success_rate": "99.9%",
|
||||
"api_response_time_ms": 500
|
||||
},
|
||||
"readiness_confirmation": {
|
||||
"database_ready": true,
|
||||
"api_ready": false,
|
||||
"notification_engine_ready": false,
|
||||
"conflict_detection_ready": false,
|
||||
"export_ready": false,
|
||||
"overall_status": "specification_complete_implementation_pending"
|
||||
}
|
||||
}
|
||||
}
|
||||
1184
intelligence/session-2/inventory-tracking-spec.md
Normal file
1184
intelligence/session-2/inventory-tracking-spec.md
Normal file
File diff suppressed because it is too large
Load diff
1041
intelligence/session-2/maintenance-log-spec.md
Normal file
1041
intelligence/session-2/maintenance-log-spec.md
Normal file
File diff suppressed because it is too large
Load diff
1798
intelligence/session-2/multi-calendar-spec.md
Normal file
1798
intelligence/session-2/multi-calendar-spec.md
Normal file
File diff suppressed because it is too large
Load diff
1465
intelligence/session-2/search-ux-spec.md
Normal file
1465
intelligence/session-2/search-ux-spec.md
Normal file
File diff suppressed because it is too large
Load diff
1189
intelligence/session-2/vat-tax-tracking-spec.md
Normal file
1189
intelligence/session-2/vat-tax-tracking-spec.md
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue