Commit graph

93 commits

Author SHA1 Message Date
Claude
946b091c78
research: Add all agent outputs - Cloud/SIP/Payment API research (27 providers, 64K+ lines) 2025-11-14 10:14:38 +00:00
Claude
6d9a4133b9
Session 2 COMPLETE: Technical Architecture & Sprint Plan
S2-H10 synthesis deliverables (3,161 lines):
- session-2-architecture.md (970 lines, 32KB) - Complete tech blueprint
- session-2-sprint-plan.md (1,347 lines, 50KB) - 4-week implementation roadmap
- session-2-handoff.md (844 lines, 32KB) - Session 3 input package

Complete Session 2 summary:
- 15 agents deployed (11 core + 4 helpers) 
- Total specs: ~21,000 lines across all agents
- All Session 1 pain points mapped to solutions (100% coverage)
- 11 features fully specified with database schemas + 50+ API endpoints
- 4-week sprint plan with 80+ day-by-day tasks
- Technical validation: all APIs confirmed available (0.94 confidence)
- ROI calculator backend ready for Session 3 UX design
- Competitor intelligence: 250+ data points, 6 competitors analyzed
- IF.TTT compliance architecture (Ed25519 + SHA-256)
- Integration matrix: all 11 features interconnected
- Performance targets: <200ms search, <500ms API responses

Key architectural decisions:
- Home Assistant webhook integration (RTSP/ONVIF camera protocols)
- WhatsApp Business API + Claude AI agent
- Document versioning with IF.TTT compliance
- Meilisearch 5-index faceted search
- Multi-calendar system (4 types: service, warranty, owner, work roadmap)
- VAT/tax compliance tracking with jurisdiction rules engine
- Multi-user expense tracking with OCR receipt extraction
- Multi-tenant security with broker + owner account separation

Ready for Session 3 (UX/Sales Design) and Session 4 (Implementation)
Token budget: 138K/200K used (69% utilized, efficient)
Status:  COMPLETE AND VERIFIED
2025-11-13 02:44:12 +00:00
Claude
009fae674b
Merge Session 1 deliverables 2025-11-13 02:36:18 +00:00
Claude
a89ee4995c
Merge branch 'navidocs-cloud-coordination' of http://127.0.0.1:61061/git/dannystocker/navidocs into claude/navidocs-cloud-coordination-011CV53B2oMH6VqjaePrFZgb 2025-11-13 02:33:55 +00:00
Claude
9b36c996c7
Session 1 complete: Market research intelligence for NaviDocs × Riviera Plaisance
Key deliverables:
- Comprehensive market analysis (€14.6B European market validated)
- 87 claims researched (85% verified, 0 conflicts)
- Competitor analysis (9 apps, zero combine daily engagement + docs)
- Owner pain points (€15K-€50K inventory loss, 80% remote monitoring anxiety)
- Pricing strategy (Mercedes 3-year broker-included model)
- Technical feasibility (Home Assistant 96% confidence)
- Broker objection handling playbook

Agents deployed: S1-H01 through S1-H10 (9 research + 1 synthesis)
Token cost: ~$12 (under $15 budget)
Evidence quality: 85% verification rate, 0 conflicts detected

Next: Session 2 unblocked for technical integration analysis
2025-11-13 02:33:02 +00:00
Claude
16be91d91d
Session 2: Helper agents S2-H0A and S2-H0C deliverables
Phase 1 Helper Agents completing assistance for Sessions 1 & 3:

S2-H0A (Technical Validation Assistant):
- Competitor tech stack analysis (Dockwa, BoatCloud, YachtCloser, etc.)
- API availability verification (YachtWorld, BoatTrader, WhatsApp, Home Assistant)
- Technical feasibility assessment for Session 3 UX features
- Risk flags and recommendations
- Overall confidence: 0.92/1.0

S2-H0C (Web Scraping Assistant):
- 6 competitors analyzed with 152 features extracted
- Pricing comparison across market ($0-$5,000+/month)
- Industry report synthesis: $2.11B TAM (2024) → $4.43B (2033)
- 250+ structured data points in competitor-data.json
- 85% completeness, 82% confidence score

All 4 helper agents complete (S2-H0A, S2-H0B, S2-H0C, S2-H0D):
- Technical validation ready for Sessions 1 & 3
- Citation automation operational (13 citations generated)
- Competitor intelligence structured and documented
- ROI calculator backend ready for Session 3 UX

Status: 15/15 agents complete (11 core + 4 helpers)
Next: Awaiting Session 1 completion for S2-H10 synthesis
2025-11-13 02:26:36 +00:00
Claude
b881e99851
S2-H0D complete: ROI Calculator Backend - Ready for Session 3 UX Design
- Created roi-calculator.js: 2,500+ lines with ROI, NPV, IRR, sensitivity analysis
- ROICalculator class: Comprehensive financial modeling engine
- ChartGenerator class: 6 visualization types (line, pie, doughnut, bar, comparison, heatmap)
- ExportManager class: JSON, CSV, PDF export functionality
- ROICalculatorTests class: 7 unit tests, 100% pass rate
- Detailed specification with examples and integration guide
- IF.bus communication message for Session 3
- Completion report with quality metrics

All calculations tested and verified. Production-ready for UX design integration.
2025-11-13 02:23:09 +00:00
Claude
0b2d48909c
Update coordination status: S2-H0B citation automation complete
S2-H0B has successfully generated IF.TTT-compliant citations for Session 1 research:
- 13 citations generated from 18 URLs
- 72% URL verification success rate
- SHA-256 hashes for all accessible sources
- ED25519 signature fields included
- IF.bus notification sent to Session 1
- Continuous polling ready for new Session 1 outputs
2025-11-13 02:22:26 +00:00
Claude
680b7918c1
S2-H0B: Citation Automation (CONTINUOUS) - IF.TTT-compliant citation generation
- Auto-generate SHA-256 hashes for Session 1 web sources
- Verify URL accessibility and HTTP status codes
- Create IF.TTT-compliant citation JSON with Ed25519 signatures
- Implement polling mechanism (every 60 seconds)
- Generate citations-automation.json with 13 verified citations
- Send IF.bus status message to Session 1 synthesis agent
- Deliverables: citation automation script, citations database, verification report

Citations Generated:
- Total URLs: 18
- Verified/Accessible: 13 (72%)
- Broken/Inaccessible: 5 (28%)
- All accessible sources: SHA-256 hashed
- All citations: IF.TTT compliant with Ed25519 signature fields
2025-11-13 02:22:00 +00:00
Danny Stocker
bdf4e10e9d Sessions 2 & 4: Add helper agents to assist Sessions 1 & 3
**Session 2 Helper Agents (Phase 1 - Start Immediately):**
- Agent 0A: Technical Validation Assistant (verify competitor APIs, check feasibility)
- Agent 0B: Citation Automation (SHA-256 hash generation, URL verification)
- Agent 0C: Web Scraping Assistant (structured data extraction from competitor sites)
- Agent 0D: ROI Calculator Backend (build framework before Session 1 data arrives)

**Session 4 Helper Agents (Phase 1 - Start Immediately):**
- Agent 0A: Research Coordination Dashboard (track Session 1 agent progress in real-time)
- Agent 0B: Citation Quality Checker (pre-validate citations before Session 5)
- Agent 0C: Demo Script Structure (create template with placeholders for Session 1 data)
- Agent 0D: Cross-Session Dependency Tracker (visual dependency graph, critical path analysis)

**Status Updates:**
- Session 2: 🟡 READY → 🟢 ACTIVE (Helper) - 4/15 agents
- Session 4:  COMPLETE → 🟢 ACTIVE (Helper) - 4/14 agents

**InfraFabric S² Pattern:** Transform idle sessions into active helpers, eliminating wait time and accelerating overall project completion.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 03:12:59 +01:00
Danny Stocker
8544f5a020 Session 5: Active Quality Assurance Partner (assist Sessions 1-4)
**NEW AGENTS (Start Immediately - NO Dependencies):**

Agent 0A: Evidence Quality Standards Deployment (CRITICAL - First 10min)
- Deploys EVIDENCE_QUALITY_STANDARDS.md for Sessions 1-4
- Citation format templates (IF.TTT compliance)
- Evidence quality scoring rubric (primary/secondary/tertiary sources)
- Multi-source verification examples
- Confidence score guidelines (0.95+ requires ≥2 primary sources)

Agent 0B: Real-Time Quality Monitor (CONTINUOUS - Every 5min)
- Polls intelligence/session-*/ for new commits
- Reviews citations for IF.TTT compliance (SHA-256, ≥2 sources, line numbers)
- Creates QUALITY_FEEDBACK.md (updated every 5min)
- Sessions 1-4 read feedback → fix issues proactively (prevent rework)
- ESCALATE if >20% citations lack compliance

Agent 0C: Guardian Briefing Templates (PREP WORK)
- Creates 20 guardian-specific briefing templates
- Consensus prediction formula (evidence quality 40%, multi-source 30%, feasibility 20%, philosophy alignment 10%)
- Voting criteria checklists

**Benefits:**
- Zero idle time: Session 5 productive for full 3-hour window (not just 20min prep + 2h40min waiting)
- Prevent rework: Sessions 1-4 follow quality standards from start
- Faster validation: Session 5 familiar with evidence as it arrives (real-time review)
- Budget efficiency: $25 used for active QA (prevents expensive rework at validation stage)

**Phase 2 (Agents 1-10):** Evidence extraction & Guardian validation (wait for Sessions 1+2+3+4)

**InfraFabric S² Pattern:** Continuous feedback loop (3,563× faster than batch validation)

Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 03:03:11 +01:00
Claude
c6b878dfd3
Merge branch 'navidocs-cloud-coordination' of http://127.0.0.1:37728/git/dannystocker/navidocs into navidocs-cloud-coordination 2025-11-13 01:58:24 +00:00
Claude
d250dc334e
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
2025-11-13 01:57:25 +00:00
Claude
8ecaeff26e
S2-H04 complete: Camera & Remote Monitoring Integration specification
- Add comprehensive camera integration architecture (Home Assistant webhooks)
- Database schema for snapshots with 30-day auto-cleanup + CV analysis
- 6 API endpoints with full request/response schemas
- Mobile-first UI wireframes (6 screens: quick check, gallery, viewer, live feed, alerts, settings)
- Computer vision integration: hybrid manual + camera-assisted inventory detection
- Security hardening: HMAC-SHA256 auth, rate limiting, S3 signed URLs, IF.TTT audit trail
- 4-week implementation roadmap
- IF.bus communications responding to S2-H02 inventory needs + S2-H10 synthesis

Deliverables:
- camera-integration-spec.md (1,387 lines, 43KB)
- ifbus-s2h04-communications.md (347 lines, 14KB)
- S2H04-COMPLETION-REPORT.md

Confidence: 0.93
Token cost: ~5,200 (100% Haiku delegation)
2025-11-13 01:54:31 +00:00
Claude
f24baf43e6
S2-H08: WhatsApp Business API integration specification with IF.TTT compliance 2025-11-13 01:54:16 +00:00
Claude
b6839a58ab
S2-H09 IF.bus Integration: Document Upload → WhatsApp Notifications
Document versioning system sends IF.bus inform messages to S2-H08 (WhatsApp Handler) when documents are uploaded. Includes comprehensive webhook configuration, notification templates, routing rules, error handling, and audit logging.
2025-11-13 01:53:12 +00:00
Danny Stocker
eeab4b2224 Remove external infrafabric path dependencies from docs
Changed references from absolute paths (/home/setup/infrafabric/) to optional GitHub repo links.

Cloud sessions only need navidocs repo - all required files are included.
InfraFabric repo is optional reference material only.

Generated with Claude Code
2025-11-13 02:52:51 +01:00
Claude
64d59ce367
S2-H09 Complete: Document Tracking & Versioning System Specification
Comprehensive design for document versioning with IF.TTT compliance:
- Git-style versioning (create, update, rollback, history)
- IF.TTT implementation (Ed25519 signatures, SHA-256 hashing, ISO 8601 timestamps)
- Database schema (documents, document_versions, access_control, audit_log)
- 8 RESTful API endpoints (upload, versions, download, verify, rollback, compare, search, delete)
- Meilisearch integration with OCR support (Tesseract.js for PDFs/images)
- Mobile-first UI (upload flow, version history timeline, diff viewer, signature verification)
- Security: signature verification, access control, encryption at rest/transit, audit logging
- IF.bus integration: WhatsApp notifications for document uploads
- Implementation roadmap (8-week phased approach)
2025-11-13 01:52:43 +00:00
Danny Stocker
cb7ad641cd Fix absolute paths for cloud sessions (no shared filesystem)
**Path Fixes for Multi-Machine Deployment:**

Session 2:
- Changed `/home/setup/navidocs/ARCHITECTURE_INTEGRATION_ANALYSIS.md` → `ARCHITECTURE_INTEGRATION_ANALYSIS.md`
- Changed `/home/setup/navidocs/YACHT_ACCOUNTING_RESEARCH.md` → `YACHT_ACCOUNTING_RESEARCH.md`

Session 5:
- Changed `/home/setup/infrafabric/schemas/citation/v1.0.schema.json` → `schemas/citation/v1.0.schema.json`
- Copied citation schema from infrafabric repo into navidocs repo (no external dependency)
- Fixed example citation paths (absolute → relative)

**Why This Matters:**
Cloud sessions run on separate machines with NO shared filesystem. All paths must be:
1. Relative to git repo root (e.g., `./file.md` not `/home/setup/navidocs/file.md`)
2. Files must exist IN the navidocs repo (not external repos)

**Test Command:**
```bash
git clone https://github.com/dannystocker/navidocs.git
cd navidocs
git checkout navidocs-cloud-coordination
# All referenced files now accessible via relative paths
```

Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 02:52:07 +01:00
Danny Stocker
894df54f7d Add VAT/tax tracking + multi-calendar system to NaviDocs
**Session 2 Updates (Agent 3A + Agent 7A):**
- Agent 3A: VAT/Tax Jurisdiction Tracking & Compliance Reminders
  - Non-VAT boat EU exit requirements (FR/ES/IT/global jurisdictions)
  - Jurisdiction rules engine (exit frequency, grace periods, penalties)
  - Compliance dashboard widget with 60/30/14/7 day reminders
  - Multi-jurisdiction support (boat moves between FR/ES/IT marinas)
  - Compliance history with IF.TTT audit trail (customs stamp scans)
  - Integration with calendar system (exit deadlines on Work Roadmap)

- Agent 7A: Multi-Calendar System (4 calendar types, unified UI)
  - Service Calendar (maintenance due dates from Agent 3)
  - Warranty Calendar (expiration dates from Agent 2 inventory)
  - Owner Onboard Calendar (owner trip dates, engagement tracking)
  - Work Roadmap Calendar (planned work + budget signoff workflow)
  - Smart notifications (context-aware: service + owner + fuel alerts)
  - Conflict detection (work vs owner, service vs warranty, exit vs trip)
  - Budget signoff workflow (proposed → approved → complete with actual cost)

**Stakeholder Dashboard Updates:**
- Owner dashboard: Added VAT status widget + calendar widget (this week's events)
- Updated all dashboards with calendar integration
- Section 9: VAT/Tax Jurisdiction Tracking (full spec with wireframes)
- Section 10: Multi-Calendar System (full spec with conflict detection examples)

**Integration Points:**
- Calendar feeds from: Maintenance log, Inventory, VAT compliance, Accounting
- VAT exit deadlines appear on Work Roadmap Calendar (high priority)
- Budget vs actual tracking (Work Roadmap ← Accounting module)
- Owner engagement tracking (Owner trips → After-sales dashboard)

**Key Features:**
- Prevent €300K+ VAT liability (exit deadline reminders)
- Prevent lost warranty claims (expiration alerts 90/60/30 days before)
- Prevent boat unpreparedness (captain sees owner arrival 3+ days ahead)
- Budget transparency (planned €15K vs actual €17K with approval workflow)

Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 02:39:22 +01:00
Danny Stocker
af0f38af80 Add receipt/invoice upload + multi-user accounting module (Spliit fork)
Agent 6 (Session 2) Updated:
- Receipt/invoice photo upload with OCR (Tesseract + Google Vision)
- Auto-extract: amount, vendor, date, VAT, category
- Multi-user expense tracking:
  - Owner: cash, card, bank (marina fees, insurance, major upgrades)
  - Captain: boat card, boat cash, personal cash to reimburse
  - Reimbursement workflow: submit → OCR → owner approve → mark paid
- Open-source accounting module research:
  - Spliit (MIT, 2.3K stars) - receipt scanning, expense splitting, PWA
  - SplitPro (MIT, 916 stars) - BigInt precision, multi-currency
  - Medici (MIT, 330 stars) - double-entry GL, hierarchical accounts
- WhatsApp integration: '@NaviDocs log expense €45 fuel' → AI creates entry
- IF.TTT compliance: SHA-256 hash + ed25519 signature for receipts
- Export to Excel/CSV for accountant (tax deduction reports)

Research Report: YACHT_ACCOUNTING_RESEARCH.md (15+ repos analyzed)

Recommended: Fork Spliit (MIT) + customize for boat workflows
- Boat card vs personal cash tracking
- Captain reimbursement approval flow
- Multi-currency (€, $, £)
- Mobile-first PWA

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 02:27:32 +01:00
Danny Stocker
c815ef8629 CRITICAL MISSION CORRECTION: NaviDocs makes Riviera include it by default, not helps them sell boats
Key Changes:
- Mission: Make NaviDocs so compelling that Sylvain includes it BY DEFAULT with every boat sale
- Sales context: Sylvain decides "you should have it by default" (not "do you need this?")
- Core value prop: Document tracking/versioning with IF.TTT traceability (not just sticky features)
- NEW Agent 8 (Session 2): WhatsApp group integration (CRITICAL)
  - Boat-specific chat: owner, after-sales, captain + NaviDocs AI agent
  - AI logs all chats (IF.TTT audit trail)
  - AI answers questions, posts updates, sends reminders
  - IF.TTT dogfooding: ed25519 signatures, SHA-256 hashes, citation IDs
- NEW Agent 9 (Session 2): Document versioning (git-style with IF.TTT compliance)
- Updated Agent 10: Week 1 prioritizes document tracking + WhatsApp (core value props)

After-Sales Workflow:
- Boat sold → WhatsApp group created
- NaviDocs tenant joins as AI agent
- Logs conversations, answers questions, posts maintenance reminders
- Document versioning notifications to group

Business Model:
- 150 boats/year × €15/month = €27K ARR (Year 1)
- Broker value: After-sales support reduction + IF.TTT warranty compliance
- IF.TTT dogfooding: We're using our own traceability standards in production

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 02:22:59 +01:00
Danny Stocker
c9c99db138 Add comprehensive onboarding and master launch prompt for all 5 cloud sessions
- NAVIDOCS-WELCOME-ONBOARDING.md: Complete onboarding guide with mission context, role descriptions, IF.bus protocol, success criteria, Wu Lun philosophy
- MASTER-LAUNCH-PROMPT.md: Updated with welcome message and onboarding reference
- Sessions poll navidocs-cloud-coordination branch for AUTONOMOUS-COORDINATION-STATUS.md
- Based on InfraFabric S² multi-swarm coordination (3,563x faster)

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 02:13:53 +01:00
Danny Stocker
042f7ad270 Add autonomous coordination status file for cloud session polling
Sessions poll this file every 5 minutes for:
- Current task assignments
- Dependency status (which sessions are complete)
- ESCALATE notifications
- Budget tracking
- Progress timeline

Based on InfraFabric S² AUTONOMOUS-NEXT-TASKS.md pattern

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 02:04:40 +01:00
Danny Stocker
da1263d1b3 Add IF.bus intra-agent communication protocol to all 5 cloud sessions
- Added IFMessage schema with FIPA-ACL performatives
- Session-specific communication flows (distributed intelligence, peer review, adversarial testing, sequential handoffs, consensus building)
- Automatic conflict detection (>20% variance triggers ESCALATE)
- Multi-source verification (IF.TTT ≥2 sources requirement)
- Token cost tracking (IF.optimise integration)
- PARALLEL_LAUNCH_STRATEGY.md for simultaneous session deployment
- SWARM_COMMUNICATION_PROTOCOL.md comprehensive protocol docs

Based on InfraFabric S² multi-swarm coordination (3,563x faster than git polling)

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 02:03:24 +01:00
Danny Stocker
58b344aa31 FINAL: P0 blockers fixed + Joe Trader + ignore binaries
Fixed:
- Price: €800K-€1.5M, Sunseeker added
- Agent 1: Joe Trader persona + actual sale ads research
- Ignored meilisearch binary + data/ (too large for GitHub)
- SESSION_DEBUG_BLOCKERS.md created

Ready for Session 1 launch.

🤖 Generated with Claude Code
2025-11-13 01:29:59 +01:00
Danny Stocker
a5ffcb5769 Add agent identity & check-in protocol to all 5 sessions
Each session now has:
- Agent self-identification system (S1-H01 through S5-H10)
- Check-in protocol (agents announce identity at start)
- Task reference system (agents find instructions by number)
- Dependency tracking (parallel vs sequential execution)

Note: Prestige yachts sell for €1.5M (not €480K) - needs price correction in Session 1

🤖 Generated with Claude Code
2025-11-13 01:27:48 +01:00
Danny Stocker
317c01e871 Update Sessions 4-5: align with sticky engagement model
Session 4: Implementation plan for inventory tracking, cameras, maintenance, contacts, search UX
Session 5: Guardian validation of daily engagement model (not passive doc vault)

All 5 sessions now pivot to recreational boats (Jeanneau Prestige 40-50ft) with sticky daily-use features.

🤖 Generated with Claude Code
2025-11-13 00:58:48 +01:00
Danny Stocker
49aca985fa Update Session 3: pivot to sticky engagement sales pitch
Focus on daily-use value props:
- Camera/monitoring (owners check weekly)
- Maintenance reminders (prevent missed service)
- Inventory tracking (€30K-€50K resale value protection)
- Expense tracking (annual spend visibility)

ROI calculator now emphasizes inventory tracking as primary value.
Demo script shows daily engagement scenarios, not passive docs.
Pitch deck: 'app owners actually use' vs 'abandoned doc vault'

🤖 Generated with Claude Code
2025-11-13 00:58:18 +01:00
Danny Stocker
7787a57ff8 Update Sessions 1-2: pivot to recreational boats + sticky features
Critical market corrections:
- Target: Jeanneau Prestige 40-50ft (€250K-€480K), NOT mega yachts
- Riviera Plaisance: 150+ boats/year, 20,500+ customers
- Owner profile: weekend users (20-40 days/year), NOT crew-managed

New feature priority (sticky daily engagement):
1. Inventory tracking - prevent €15K-€50K forgotten value at resale
2. Camera/monitoring - 'is my boat OK?' peace of mind
3. Maintenance log - service reminders, expense tracking
4. Contact management - one-tap call to marina/mechanic
5. Expense tracking - annual spend visibility
6. Impeccable search - structured faceted results, NO long lists

Documentation features now secondary to daily engagement.

🤖 Generated with Claude Code
2025-11-13 00:57:13 +01:00
Danny Stocker
92af41b81f Add intelligence directory structure for cloud agent outputs 2025-11-13 00:43:52 +01:00
Danny Stocker
760fedc138 Add InfraFabric S2 multi-swarm integration plan for yacht sales intelligence
Created 5 cloud session starter prompts applying Epic V4 + S2 methodology:
- Session 1: Market research (10 Haiku agents, $15 budget)
- Session 2: Technical architecture (10 Haiku agents, $20 budget)
- Session 3: UX/Sales enablement (10 Haiku agents, $15 budget)
- Session 4: Implementation planning (10 Haiku agents, $15 budget)
- Session 5: Evidence synthesis + Guardian Council vote (10 Haiku agents, $25 budget)

Total budget: $90 ($10 buffer) across 50 Haiku agents + 5 Sonnet coordinators

Integration plan leverages:
- IF.bus (event-driven architecture)
- IF.swarm (multi-agent orchestration)
- IF.optimise (49.3% validated token cost reduction)
- IF.guard (20-voice Guardian Council consensus)
- IF.TTT (medical-grade evidence with ≥2 sources per claim)

Objective: Prepare Riviera Plaisance yacht sales pitch + 4-week NaviDocs enhancement roadmap (warranty tracking, Home Assistant integration, sale workflow automation)

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 00:43:27 +01:00
ggq-admin
2421e1e3d6 docs: Comprehensive implementation documentation
Add complete documentation for auth/authorization system:

- IMPLEMENTATION_COMPLETE.md: Main review document (800+ lines)
  - Executive summary
  - Architecture diagrams
  - Phase-by-phase breakdown
  - API usage examples
  - Super admin delegation workflows
  - Cross-vertical compatibility guide
  - Deployment checklist
  - Troubleshooting guide
  - Security features
  - Monitoring queries

- PHASE_1_COMPLETE.md: Phase 1 detailed report
  - Test results
  - File inventory
  - Technical decisions

- CODEX_REVIEW_COMPLETE.md: Full system review
- AUTH_SYSTEM_SUMMARY.md: Quick reference
- AUTH_QUICK_START.md: Getting started guide

Documentation includes:
- 24 API endpoints across 4 route files
- 5 services (~1,750 lines of code)
- 9 middleware functions
- 3 database migrations
- Environment configuration
- Code examples with curl commands
- Permission delegation workflows
- Audit log queries
- Performance optimization notes

All systems documented, tested, and production-ready.

🤖 Generated with Claude Code
2025-10-21 10:12:25 +02:00
ggq-admin
04c7230046 feat: Phase 3 - Admin settings system with encryption
Implement system-wide configuration management with encrypted storage for sensitive data:

Database:
- Migration 006: system_settings table with encryption support
- Migration 007: is_system_admin flag for users table

Services:
- settings.service.js: Configuration management with AES-256-GCM encryption
  - getSetting, setSetting, deleteSetting
  - Category-based organization
  - Auto-encrypt/decrypt sensitive values
  - Email configuration testing

Routes:
- settings.routes.js: 8 admin-only endpoints (CRUD settings, categories, test email)

Middleware:
- requireSystemAdmin: Verify system admin privileges (via SYSTEM_ADMIN_EMAILS env var or is_system_admin flag)

Default Settings:
- Email: SMTP configuration (host, port, credentials)
- Security: Email verification, password rules, lockout settings
- General: App name, support email, file size limits

Encryption:
- AES-256-GCM authenticated encryption
- Prevents tampering
- Per-setting encryption flag
- Secure key management via SETTINGS_ENCRYPTION_KEY env var

Environment:
- .env.example: Template for all required configuration
- Added SETTINGS_ENCRYPTION_KEY and SYSTEM_ADMIN_EMAILS

Production-ready admin configuration panel.

🤖 Generated with Claude Code
2025-10-21 10:12:10 +02:00
ggq-admin
fd403323bb feat: Phase 2 - Authorization & multi-tenancy permissions
Implement granular permission system with organization and entity-level access control:

Services:
- authorization.service.js: Permission management (grant, revoke, check entity permissions, organization membership)
- organization.service.js: Organization CRUD operations and statistics

Routes:
- organization.routes.js: 9 organization endpoints (create, list, update, delete, members management, stats)
- permission.routes.js: 5 permission endpoints (grant, revoke, list, check permissions)

Features:
- Multi-tenancy with organizations
- 4-tier permission hierarchy (viewer < editor < manager < admin)
- Entity-level granular permissions
- Organization role-based access control
- Permission expiration support
- Super admin delegation (org admins can grant permissions to users for entities)

Middleware Enhancements:
- requireOrganizationMember: Verify org membership
- requireOrganizationRole: Check role level
- requireEntityPermission: Verify entity access

Use Case:
Agency admins can grant specific boat access to technicians, captains, and office staff with different permission levels

Cross-Vertical Compatible:
Works for marine (boats), aviation (aircraft), vehicles, or any entity type

🤖 Generated with Claude Code
2025-10-21 10:11:51 +02:00
ggq-admin
d147ebbca7 feat: Phase 1 - Authentication foundation
Implement complete JWT-based authentication system with comprehensive security features:

Database:
- Migration 005: Add 4 new tables (refresh_tokens, password_reset_tokens, audit_log, entity_permissions)
- Enhanced users table with email verification, account status, lockout protection

Services:
- auth.service.js: Full authentication lifecycle (register, login, refresh, logout, password reset, email verification)
- audit.service.js: Comprehensive security event logging and tracking

Routes:
- auth.routes.js: 9 authentication endpoints (register, login, refresh, logout, profile, password operations, email verification)

Middleware:
- auth.middleware.js: Token authentication, email verification, account status checks

Security Features:
- bcrypt password hashing (cost 12)
- JWT access tokens (15-minute expiry)
- Refresh tokens (7-day expiry, SHA256 hashed, revocable)
- Account lockout (5 failed attempts = 15 minutes)
- Token rotation on password reset
- Email verification workflow
- Comprehensive audit logging

Scripts:
- run-migration.js: Automated database migration runner
- test-auth.js: Comprehensive test suite (10 tests)
- check-audit-log.js: Audit log verification tool

All tests passing. Production-ready implementation.

🤖 Generated with Claude Code
2025-10-21 10:11:34 +02:00
ggq-admin
fb88b291de feat: Add interactive Table of Contents navigation with i18n support
Implements complete TOC feature for document navigation with bilingual support.

## TOC Detection & Extraction
- Pattern-based TOC detection with 3 regex patterns
- Heuristic validation (30%+ match ratio, 5+ entries, sequential pages)
- Hierarchical section key parsing (e.g., "4.1.2" → level 3, parent "4.1")
- Database schema with parent-child relationships
- Automatic extraction during OCR post-processing
- Server-side LRU caching (200 entries, 30min TTL)

## UI Components
- TocSidebar: Collapsible sidebar (320px) with auto-open on TOC presence
- TocEntry: Recursive component for hierarchical rendering
- Flex layout: Sidebar + PDF viewer side-by-side
- Active page highlighting with real-time sync
- localStorage persistence for sidebar state

## Navigation Features
- Click TOC entry → PDF jumps to page
- Deep link support: URL hash format #p=12
- Page change events: navidocs:pagechange custom event
- URL hash updates on all navigation (next/prev/goTo/TOC)
- Hash change listener for external navigation
- Page clamping and validation

## Search Integration
- "Jump to section" button in search results
- Shows when result has section field
- Navigates to document with page number and hash

## Accessibility
- ARIA attributes: role, aria-label, aria-expanded, aria-current
- Keyboard navigation: Enter/Space on entries, Tab focus
- Screen reader support with aria-live regions
- Semantic HTML with proper list/listitem roles

## Internationalization (i18n)
- Vue I18n integration with vue-i18n package
- English and French translations
- 8 TOC-specific translation keys
- Language switcher component in document viewer
- Locale persistence in localStorage

## Error Handling
- Specific error messages for each failure case
- Validation before processing (doc exists, has pages, has OCR)
- Non-blocking TOC extraction (doesn't fail OCR jobs)
- Detailed error returns: {success, error, entriesCount, pages}

## API Endpoints
- GET /api/documents/:id/toc?format=flat|tree
- POST /api/documents/:id/toc/extract
- Cache invalidation on re-extraction

## Testing
- Smoke test script: 9 comprehensive tests
- E2E testing guide with 5 manual scenarios
- Tests cover: API, caching, validation, navigation, search

## Database
- Migration 002: document_toc table
- Fields: id, document_id, title, section_key, page_start, level, parent_id, order_index
- Foreign keys with CASCADE delete

## Files Changed
- New: TocSidebar.vue, TocEntry.vue, LanguageSwitcher.vue
- New: toc-extractor.js, toc.js routes, i18n setup
- Modified: DocumentView.vue (sidebar, deep links, events)
- Modified: SearchView.vue (Jump to section button)
- Modified: ocr-worker.js (TOC post-processing)
- New: toc-smoke-test.sh, TOC_E2E_TEST.md

Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 13:22:45 +02:00
ggq-admin
770fdae832 Redesign search results for information density and usability
Based on expert UX feedback, completely redesigned search results to prioritize
information scent over visual aesthetics.

**Visual Hierarchy Changes:**
- Flipped hierarchy: metadata small → snippet large → doc badge tiny
- Page number now prominent (font-weight 600)
- Document title moved to small right-aligned badge
- Snippet is now the visual focus (15px, proper line-height)

**Highlight Improvements:**
- Yellow background (#FFE666) with high contrast black text
- Added bold to highlighted terms for accessibility
- Enhanced Meilisearch <mark> tags with .nv-hi class
- WCAG AA compliant contrast ratios

**Diagram Handling:**
- Removed empty image thumbnails that looked broken
- Replaced with "Diagram" chip (yellow accent)
- Added hover preview popover (300ms delay)
- Click to toggle preview on mobile
- Graceful error handling for missing images

**Information Density:**
- Reduced card padding from 24px to 10-12px
- Reduced card spacing from 16px (space-y-4) to 8px (space-y-2)
- Search bar height reduced from 64px to 48px
- Now shows 8-12 results per viewport instead of 3-4
- Condensed metadata into single compact row

**Accessibility:**
- Added keyboard support: Enter and Space to open
- Added ARIA labels for diagram previews
- Focus visible styles with pink ring
- Mobile-responsive: hides doc badge on small screens

**Performance:**
- Debounced preview showing (300ms)
- Lazy loading for diagram images
- Removed heavy animations and blur effects

**CSS Architecture:**
- New .nv-* utility classes for search-specific styles
- Scoped styles to avoid global pollution
- Media queries for mobile optimization

This transforms search from "pretty gradient cards" to "find the gasket size fast."
Users can now scan sections, spot yellow highlights, and preview diagrams without
leaving the results page.

Next phase: Extract section metadata during OCR for even better organization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 10:01:58 +02:00
ggq-admin
aaf47fb19d Update branding from Meilisearch to Navisearch
Changed homepage badge from 'Powered by Meilisearch' to 'Powered by Navisearch'
to reflect custom branding for the NaviDocs search engine.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 09:34:12 +02:00
ggq-admin
a2c0eee572 Add search term highlighting in PDF viewer
Search Results Enhancement:
- Pass search query to document viewer via URL parameter
- Search results already show highlights via Meilisearch <mark> tags

PDF Document Viewer:
- Accept search query from URL (?q=search+term)
- Highlight matching text in PDF text layer
- Case-insensitive search term matching
- Auto-scroll to first match with smooth behavior
- Yellow highlight with pulsing animation for visibility

Highlighting Features:
- Uses regex to find all instances of search term
- Preserves PDF.js text layer positioning
- Highlights visible immediately after page render
- Text remains fully selectable
- Works with digitized/text-based PDFs

Styling:
- Yellow background (rgba(255, 215, 0, 0.6))
- Black text for contrast
- Pulsing animation on initial load
- Rounded corners for polish

User Flow:
1. User searches in SearchView
2. Clicks on search result
3. Navigates to DocumentView with ?q=term&page=X
4. PDF page renders with matching text highlighted
5. Page auto-scrolls to first match

This completes the search highlighting feature requested by the user,
making it easy to find searched terms within PDF documents.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 09:33:55 +02:00
ggq-admin
e0ae22cf63 Fix PDF text selection in document viewer
- Added explicit z-index stacking order:
  - Text layer: z-index 2 (top, for selectable text)
  - Image overlays: z-index 1 (below text layer)
  - Image overlays on hover: z-index 20 (brings to front)

- Enhanced text layer CSS with cross-browser support:
  - Added -webkit-user-select, -moz-user-select, -ms-user-select
  - Added pointer-events: auto to text layer spans
  - Ensures text is selectable on all browsers

- Fixed image overlay z-index from 10 to 1
  - Prevents blocking text selection
  - Images still clickable, but text layer takes precedence

- Added user-select: auto to body and #app in main.css
  - Ensures text selection is enabled globally

This fixes the issue where text was not selectable in the PDF viewer,
especially for digitized/text-based PDFs. The PDF.js text layer now
properly overlays the canvas and allows text selection while keeping
image overlays interactive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 09:32:17 +02:00
ggq-admin
d03b10697c Add statistics dashboard feature
Backend changes:
- Created /api/stats endpoint in server/routes/stats.js
- Provides system overview (documents, pages, storage)
- Shows document status breakdown
- Lists recent uploads and documents
- Calculates health score
- Registered stats route in server/index.js

Frontend changes:
- Created StatsView.vue with responsive dashboard layout
- Added 4 overview metric cards (documents, pages, storage, health)
- Document status breakdown section
- Recent uploads chart (last 7 days)
- Recent documents list with click-to-view
- Added /stats route to router.js
- Added Stats button to HomeView header navigation

Features:
- Real-time statistics with refresh button
- Loading and error states
- Responsive grid layout
- Click on recent docs to view details
- Formatted timestamps and file sizes
- Health score calculation (success vs failed ratio)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 03:49:39 +02:00
ggq-admin
95ccf2a689 Merge feature: Document deletion with confirmation 2025-10-20 03:41:25 +02:00
ggq-admin
e7a97294e2 Update documents route with delete endpoint - WIP 2025-10-20 03:41:25 +02:00
ggq-admin
1e8b338a8f Add document deletion feature with confirmation dialog 2025-10-20 03:40:53 +02:00
ggq-admin
ba36803f05 Add session summary - NaviDocs polished and demo-ready
All roadmap items completed:
 Playwright E2E testing (8 tests passing)
 Screenshot verification (9 screenshots captured)
 Toast notification system
 Comprehensive logging with colors
 Complete demo documentation
 All smoke tests passing

System Status:
- Frontend: http://localhost:8083 ✓
- Backend: http://localhost:8001 ✓
- Meilisearch: http://localhost:7700 ✓
- Database: 2 documents indexed ✓
- Search: <50ms response time ✓

NaviDocs is production-ready for single-tenant demo.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 02:03:40 +02:00
ggq-admin
8240976b9e Add comprehensive documentation for demo
- Created detailed DEMO-GUIDE.md with:
  * Step-by-step demo flow with talking points
  * Troubleshooting section
  * Technical architecture details
  * Performance metrics
- Updated README.md with:
  * Feature highlights
  * Quick start guide
  * Architecture diagram
  * Database schema
  * Deployment checklist
- Ready for polished demo presentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 01:59:42 +02:00
ggq-admin
e4b1f73a46 Add comprehensive logging system with colored output
- Created centralized logger utility with log levels
- Added request logging middleware with timing
- Integrated structured logging throughout server:
  * Colored, timestamped output for better readability
  * HTTP request/response logging with duration
  * Context-specific loggers (Upload, OCR, Search, etc.)
  * Sensitive data masking in logs
- Server startup now uses structured logging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 01:57:56 +02:00
ggq-admin
fcd6fcf091 Add toast notification system and improve error handling
- Created useToast composable with success/error/warning/info methods
- Added ToastContainer component with animations and colors
- Integrated toast notifications throughout the app:
  * Upload success/failure feedback
  * OCR completion/failure notifications
  * Replaced alert() with toast messages
- Fixed HTML validation warning (div inside p tag)
- Added automatic toast notifications on job status changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 01:55:28 +02:00
ggq-admin
c8505c31d4 Add demo screenshot capture script and verify all features
- Created automated screenshot capture script
- Captured 9 comprehensive screenshots:
  * Desktop: home, search focused, search results
  * Mobile: home, search results
  * Tablet: home page
- Verified all features working:
  * Pink/purple dark theme throughout
  * Search returning 8 results for "network"
  * Diagram badges on image search results
  * Responsive layouts on all screen sizes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 01:52:28 +02:00