Commit Graph

3 Commits

Author SHA1 Message Date
Bernt 118180e7ff docs: PR-001 Domain Model v1.2 — Three Rules + Experience Intelligence + Capability Tags
- Added Three Rules to README:
  1. Domain knows nothing about AI (no AIObservation, YOLODetection, etc.)
  2. Everything is an Artifact (common contract for all produced objects)
  3. All decisions are reproducible (answer: which observations, evidence,
     model, version, rules, reviewer, when, approved version)

- Renamed Human Intelligence → Experience Intelligence
  - Broader scope: citizen surveys, customer satisfaction, field technician
    feedback, contractor experience, service desk data
  - More future-proof than 'Human Intelligence'

- Added Capability Tags for developers:
  - Observation: [Detection, Vision, GPS, Image]
  - Decision: [Decision, Recommendation, Business]
  - Artifact: [Storage, Versioning, Lineage]
  - Makes dependencies clear as platform grows

- Updated Domain Invariants:
  - DecisionCase: must have at least one Review before Approved
  - Review: must belong to exactly one Decision, must have reviewer

- Added Merge Criteria:
  - All stakeholders (developer, AI engineer, product owner, domain expert)
    can read model and understand same terms
  - No AI objects, all Artifacts, reproducible decisions

Rationale: Lock domain language before implementation. Shared vocabulary
for code, docs, APIs, tests, and product discussions.
2026-07-02 14:09:45 +00:00
Bernt b4391f9600 docs: PR-001 Domain Model v1.1 — Human Intelligence as future module
- Added Human Intelligence as separate external module (not in core domain)
- Positioning: External Intelligence Module, not part of Epic-001
- Architecture: Reality Intelligence with four branches:
  - Infrastructure Intelligence (core, Epic-001)
  - Operational Intelligence (future)
  - Human Intelligence (future module)
  - External Intelligence (future)

- Human Insight Artifact: Source, Geography, Period, Metrics, Confidence
- Usage: Linked to Area or Decision Case, never mixed with raw observations
- Example: Decision Case enriched with 'Many complaints last 30 days'
- When: After Epic-001 stable and 20+ Decision Cases exist

Rationale: Keep core domain clean. Human data is context, not observation.
Add after basic pipeline is proven.
2026-07-02 13:50:38 +00:00
Bernt a08e897f96 docs: PR-001 Domain Model — Core language for LandveX Intelligence Lab
- Package: @landvex/domain
- Zero dependencies on Express, PostgreSQL, S3, or AI frameworks
- Four package structure: domain, contracts, shared, infrastructure
- Domain never depends on infrastructure

- Aggregate Roots: FieldSession, Mission, DecisionCase
- Entities: MissionAsset, Artifact, Observation, Evidence, Finding,
  Decision, Review, Action, Outcome
- Value Objects: MissionId, ArtifactId, SessionId, ObservationId,
  DecisionId, GeoLocation, GpsAccuracy, Confidence, Severity, Priority,
  Hash, StorageUri, Version

- Enums: ArtifactType, ReviewStatus, DecisionVerb, MissionStatus, SessionStatus
- Event Contracts: FieldSessionCreated, MissionCreated, MissionImported,
  ArtifactUploaded, ArtifactValidated, ObservationCreated, EvidenceCreated,
  FindingCreated, DecisionCreated, DecisionReviewed, DecisionApproved

- Domain Invariants:
  - FieldSession: must have location, date, can have zero missions
  - Mission: must belong to one Session, must have at least one Artifact
  - DecisionCase: must have at least one Observation, one Evidence,
    exactly one Decision, cannot be Approved without Review
  - Artifact: must have unique hash, storage URI, versioned

- TypeScript interfaces for all domain objects
- Branded ID types for type safety
- Strict rule: No new feature may introduce new domain concepts without
  approved change to domain model

- README: 'This package describes LandveX domain model. Contains no
  dependencies to database, HTTP, cloud storage, or AI frameworks.'

- Next: PR-002 Persistence Adapter (Repository Interface → PostgreSQL/S3/Event Store)

Rationale: Lock the language before writing infrastructure code.
Shared vocabulary for code, docs, APIs, tests, and product discussions.
2026-07-02 13:49:19 +00:00