Commit Graph

16 Commits

Author SHA1 Message Date
Bernt 6e1aa1b0f6 LandveX Internal Pilot: DEPLOYED
- API running on port 3002
- UI running on port 3003
- Version endpoint: /version
- Health check: /health
- Platform Readiness: Mission Import , Artifact Registry ,
  Storage , Operations , Developer Mode 

Go Live Checklist updated with current status.
Docker Compose configured (ports adjusted for existing services).

Next: Pilot 001 — Break the system!
Test: bad coverage, large videos, interrupted upload,
multiple phones, bad GPS, darkness, rain, poor lighting.
2026-07-02 17:18:30 +00:00
Bernt ddfe99f9f2 Go Live Checklist + Version Endpoint
- Go Live Checklist for LandveX Internal Pilot deployment
- Version endpoint: /version returns environment, version, commit, build
- Ready for Internal Pilot deployment

Next: Deploy with Docker Compose
2026-07-02 17:10:09 +00:00
Bernt 207185e5fb Minimal RBAC + Feature Flags + Developer Mode
- 4 roles: SuperAdmin, Operator, Reviewer, PilotUser
- Capabilities (not pages): mission.create, artifact.view, decision.approve, etc.
- Feature flags: ENABLE_REPLAY, ENABLE_MODEL_TRAINING, etc.
- Developer Mode toggle in UI (activated by permission)
- New rule: All features must link to module, capability, and role

Next: Deploy pilot environment
2026-07-02 16:59:00 +00:00
Bernt c5a42506c1 Readiness Dashboard: System status before external pilots
- Shows all systems: API, Database, Storage, Upload, Mission, Map,
  Replay, AI Processing, Decision Pipeline
- Color-coded status: Green/Ready, Yellow/Partial, Red/Not Ready
- Version info: Environment, Version, Commit, Build time
- Exit criteria checklist for external pilots

Next: Deploy pilot environment
2026-07-02 16:57:20 +00:00
Bernt 6c2b5ee340 Deployment Strategy: 4 environments + Docker setup
- Development: localhost (API:3002, UI:3003)
- Integration: AI model validation
- Pilot: pilot.landvex.com (Docker Compose)
- Production: app.landvex.com
- Intelligence Lab: lab.landvex.internal

Docker Compose:
- API (Node.js)
- UI (Nginx)
- PostgreSQL
- MinIO (object storage)

Next: Deploy pilot environment
2026-07-02 16:53:10 +00:00
Bernt 4edc1d89a7 Pilot 001: Operativ checklista — inte dokument, arbetsverktyg
- Fältfas: område, varför, infrastruktur, förväntade objekt, tid, problem
- Teknisk fas: session, mission, artifacts, upload, metadata, explorer, viewer
- Beslutsfas: rätt observation, evidens, beslut, varför inte
- Utvärdering: tid, osäkerhet, automation, värde, nästa steg
- Golden Mission-knapp för att markera #0001

Mål: Kan vi gå från verklighet till verifierat Decision Case utan
manuella genvägar?

Stoppregel: Ingen ny arkitektur förrän Pilot 001 genomfört.

Next: Starta Pilot 001 — film, upload, verifiera
2026-07-02 16:34:49 +00:00
Bernt e669155bc9 MVP-0: Field Console + Health Dashboard
- Field Console: 4 tabs (Upload, Queue, Artifact Viewer, Timeline)
- Health Dashboard: system pulse for 6 engines
- No more ADR documents until MVP-0 proven with real mission

Stoppregel: Ingen ny arkitektur förrän första verkliga uppdraget.

Next: Pilot 001 — First real field upload
2026-07-02 16:22:21 +00:00
Bernt a2b3c922f7 MVP-0: First Field Upload — UI with Dataset Explorer, Artifact Viewer, Mission Upload
- Dataset Explorer: list missions with processing status
- Artifact Viewer: mission details, metadata, processing status
- Mission Upload: simple video upload form
- React + Vite + React Router
- Proxy to API at localhost:3000

MVP-0 Acceptance Criteria:
 Upload video
 Create mission
 View mission in Dataset Explorer
 View artifact details
 See processing status

No AI. Just file transfer, storage, metadata, registry.

Next: Pilot 001 — First real field upload
2026-07-02 16:15:25 +00:00
Bernt 5891bd849a ADR-012: Five Engines Platform Architecture + Economic Engine
- LANDVEX_PLATFORM_ARCHITECTURE.md: Five Engines (Reality, Knowledge,
  Decision, Mission, Economic)
- Credit: first-class economic object with types (mission, validation,
  training, priority, emergency)
- IntelligenceLedger: tracks value creation separate from financial accounting
- KnowledgeGap: missing information that drives missions
- Hotspot: composite score for mission generation
- Contradiction: conflicting information as opportunity

Key principle: Every component answers 'What value is created here?
Who pays for it?'

Next: PR-005A — Minimal Mission Import UI for MVP-0
2026-07-02 16:09:29 +00:00
Bernt c6e14c5928 ADR-012: Five Engines Platform Architecture + Economic Engine
- LANDVEX_PLATFORM_ARCHITECTURE.md: Five Engines (Reality, Knowledge,
  Decision, Mission, Economic)
- Credit: first-class economic object with types (mission, validation,
  training, priority, emergency)
- IntelligenceLedger: tracks value creation separate from financial accounting
- KnowledgeGap: missing information that drives missions
- Hotspot: composite score for mission generation
- Contradiction: conflicting information as opportunity

Key principle: Every component answers 'What value is created here?
Who pays for it?'

Next: PR-005A — Minimal Mission Import UI for MVP-0
2026-07-02 16:05:56 +00:00
Bernt 754c89506b ADR-011: Four-Layer Data Architecture — Raw Archive → Knowledge → Ontology → Decision
- Layer 1: ArchiveArtifact — immutable original with retention policy
- Layer 2: KnowledgeArtifact — extracted knowledge (observations,
  segmentations, feature vectors, relations)
- Layer 3: Knowledge Graph / Ontology (documented, not implemented)
- Layer 4: Decision Intelligence (existing DecisionCase)
- DataLifecycle: tracks every step with artifact lineage
- Key principle: AI models trained on curated datasets, not whole archive
- Ontology answers 'what does it mean in our domain?'

Long-term goal: Every observation converted once to structured
knowledge, reused infinitely for analysis, decisions, training.

Next: PR-005A — Minimal Mission Import UI for MVP-0
2026-07-02 16:03:39 +00:00
Bernt 13780baeb8 PR-004A: Mission Import API — MVP-0 First Field Upload
- POST /api/v1/missions/import — multipart upload with video
- GET /api/v1/missions/:id — retrieve mission
- GET /api/v1/missions — list active missions
- Express + multer for file handling
- Uses application layer handlers (PR-002.5)
- In-memory repositories (swap for PostgreSQL in PR-003B)

Acceptance Tests (5/5 passing):
 Import mission with video
 Reject upload without video
 Retrieve mission by ID
 404 for non-existent mission
 Health check

MVP-0 Definition of Done:
 Phone → Upload → Store → Retrieve
 No AI required
 First real artifact produced

Next: PR-005A — Minimal Mission Import UI
2026-07-02 16:01:29 +00:00
Bernt 2f0ab18e81 PR-003A: PostgreSQL Repository Adapters + Persistence Independence Test
- 4 PostgreSQL adapter stubs (Session, Mission, DecisionCase, Artifact)
- Migration 001: Initial schema (sessions, missions, artifacts, decision_cases)
- Persistence Independence Test: 6 tests verifying same behavior
  across InMemory and PostgreSQL implementations
- ADR-008: PostgreSQL Adapters for Production
- ADR-009: Persistence Independence

Architecture Quality Gates:
- Domain unchanged
- Application unchanged
- Only adapter implementation changes
- Same test suite runs against both implementations

Next: PR-003B — Schema & Migrations, PR-003C — Integration Tests,
PR-003D — Unit of Work / Transactions
2026-07-02 15:57:23 +00:00
Bernt eab9da0100 PR-002.5: Application Layer — Command/Result pattern, end-to-end flow
- 8 commands (CreateFieldSession, CreateMission, RegisterArtifact,
  CreateObservation, CreateDecisionCase, ApproveDecision, StartReview,
  CompleteReview)
- 4 handlers with validation and orchestration
- Result<T, E> pattern — explicit success/failure, no exceptions
- End-to-end test: Session → Mission → DecisionCase → Approval
- 3 tests proving full flow works in memory
- ADR-007: Command/Result Pattern

Acceptance Criteria:
 CreateFieldSession → CreateMission → CreateDecisionCase → ApproveDecision
 Without PostgreSQL, Redis, S3, API, HTTP, UI
 Business logic verified before infrastructure attached

Next: PR-003 — PostgreSQL adapters (swap InMemory → Postgres)
2026-07-02 15:06:59 +00:00
Bernt 02b51d7814 PR-002: Persistence Adapters — in-memory, zero external dependencies
- Repository interfaces defined by domain (@landvex/domain)
- 6 in-memory adapters: Session, Mission, DecisionCase, Artifact, EventStore, UnitOfWork
- 9 tests verifying adapter contracts
- Domain unchanged — infrastructure depends on domain, never reverse
- ADR-006: In-Memory Adapters for Testing

Definition of Done met:
- All adapters compile against domain interfaces
- Unit tests pass (9/9)
- No PostgreSQL, S3, Express, AI in this PR
- Ready for PR-003: PostgreSQL adapters
2026-07-02 14:59:37 +00:00
Bernt fa0dbf5127 PR-001: Domain Model v1.0 — compile-only, zero dependencies
- @landvex/domain package with TypeScript strict mode
- 3 Aggregate Roots: FieldSession, Mission, DecisionCase
- Branded IDs, Value Objects, Domain Events, Invariants
- 19 unit tests for IDs, FieldSession, DecisionCase
- Zero runtime dependencies (only TypeScript + jest for tests)
- Separates Entity / Value Object / Aggregate Root
- README documents Three Rules of the domain

Definition of Done met:
- Compiles without errors
- Exports all domain types
- Unit tests for invariants and value objects
- No PostgreSQL, S3, Express, AI models, queues
2026-07-02 14:26:29 +00:00