KrinosAI — Architecture Decision Record (ADR)
Template ID: TPL-03-07 | Stage: 03-Design | Version: 0.3
Record: KAI-VORAL-ADR-001 — retrospective draft for Visionary Oral. Not approved.
Purpose: Record one significant architecture decision: context, options, choice, consequences and when to revisit it.
Required inputs: HLD; requirements and constraints driving the decision.
Document control
| Field |
Required entry |
| Document ID |
KAI-VORAL-ADR-001 |
| Template used |
TPL-03-07 Architecture Decision Record (ADR) v0.3 |
| Product / project / software version or commit SHA |
VORAL (Visionary Oral) / PRJ-001 / a6b4429e3165 (branch app_dev of AI-Dental-Project/Visionary_Oral) |
| Record status and version |
Draft v0.1 |
| Author / technical reviewer / quality reviewer |
Claude Code (drafted with Claude Code for KrinosAI) / Tech Lead (name to be assigned) / Security & Privacy Officer (name to be assigned) |
| Created / updated / approved dates |
2026-10-27 / 2026-10-27 / Pending |
| Applicable SOP and revision |
SOP-LC-03 v0.3 |
| Related issue, commit, requirement and evidence links |
KAI-VORAL-DEC-001; repo ADRs mobile/docs/ml-repo/adr/0001–0008 |
| Approver and decision record |
Pending |
Applicability and evidence baseline
Product / system boundary: Web app and API (dentalapp/), doctor/admin mobile app (mobile/), PDF Lambda (dentalapp/pdf-lambda/) at a6b4429e3165, and the external services they call.
Related approved requirements, risks and change records: None approved. Related drafts are listed in document control.
Retrospective record? Yes — follows the Retrospective Documentation Protocol (KrinosAI lifecycle pack, 05-References/). Items are labelled Observed (code or Git at a6b4429), Measured (dated run), Stated (named person, dated) or Not recorded. Records the main architecture decisions visible in code as ADR-001 to ADR-005, each linked to the project decision (DEC) it implements.
Acceptable evidence: an implementation reference (file:line at a commit SHA), a dated test record, a signed decision, a vendor agreement, or another independently verifiable artifact. Never invent approvals, clinical results, measurements or performance data.
1. Decision title context and drivers
| ADR ID |
Title |
Drivers |
| ADR-001 |
One backend (Next.js API) for web and mobile |
Single API surface already hardened; avoid a second backend (mobile/README.md:3-7) — DEC-009 context |
| ADR-002 |
On-device ONNX inference on the phone |
Offline use; one format for Android and iOS — DEC-005, DEC-006 |
| ADR-003 |
Offline-first mobile with local queue and caches |
Clinics with poor connectivity — DEC-012 |
| ADR-004 |
Reachability checked against our backend, not Google |
False "offline" on many networks (commit a6b4429) |
| ADR-005 |
Phone copy of a report preferred until the server copy is complete |
Report must not change between openings (commit a6b4429, REQ-022) |
2. Decision status and decision owner
| ADR ID |
Status |
Owner |
Date |
| ADR-001 |
Accepted (observed in code) |
Tech Lead |
Not recorded |
| ADR-002 |
Accepted |
ML Lead |
Not recorded |
| ADR-003 |
Accepted |
Mobile Lead |
Not recorded |
| ADR-004 |
Accepted (implemented 2026-10-25) |
Mobile Lead |
2026-10-25 |
| ADR-005 |
Accepted (implemented 2026-10-25) |
Mobile Lead |
2026-10-25 |
3. Options including do nothing
| Option |
Description |
| A |
Keep current design (chosen for each ADR) |
| B |
Separate mobile backend / server-only inference / online-only app / default NetInfo check / always server copy |
| C |
Do nothing (status before each change) |
4. Tradeoff comparison
| Driver |
A |
B |
C |
| Offline capability |
Yes |
Partial |
No |
| Cost and complexity |
Medium |
High |
Low |
| Consistency web vs mobile |
Medium (ADR-002 confidence shift) |
High |
— |
5. Chosen approach and rationale
| Choice |
Rationale |
| A for ADR-001 to ADR-005 |
Fits offline clinics; reuses the existing backend; fixes reported user issues (2026-10-25) |
6. Consequences and accepted risks
| Consequence |
Type |
| Phone and server findings can differ (ADR-002) |
Accepted risk — OPEN-011 |
| Patient data stored on phones (ADR-003) |
Accepted risk — OPEN-029 |
| Mobile depends on backend route shapes (ADR-001) |
Accepted risk — OPEN-036 |
7. Validation and reversal triggers
| Trigger |
Action |
| Validation shows phone-vs-server disagreement above an agreed limit |
Revisit ADR-002 |
| Device-loss incident |
Revisit ADR-003 (encryption, expiry) |
8. Links to superseding decisions
| ADR ID |
Supersedes |
Superseded by |
| ADR-001 |
Repo ADR 0001 (separate repository) in practice |
— |
| ADR-002 |
— |
— |
| ADR-003 |
Repo ADR 0004 (access lease) — not implemented |
— |
| ADR-004 |
Default NetInfo reachability |
— |
| ADR-005 |
Always prefer the saved server copy |
— |
Open issues and decisions
| ID |
Specific gap or decision |
Responsible owner |
Due date |
Blocks gate? |
Evidence required |
Status |
| OPEN-001 |
Tracker project ID, named requester and sponsor, and named reviewers are not recorded |
Product Owner |
2026-11-10 (proposed) |
Yes |
Tracker entry; names with roles |
Open |
| OPEN-011 |
No clinical validation |
Clinical advisor with ML Lead |
2026-12-15 (proposed) |
Yes |
Validation study |
Open |
| OPEN-029 |
No retention or deletion periods for patient data, photos, reports, backups or phone caches |
Security & Privacy Officer |
2026-11-30 (proposed) |
Yes |
Retention schedule in the DPIA |
Open |
| OPEN-036 |
No OpenAPI specification and no contract tests for the 75 API route files |
Backend Lead |
2026-12-15 (proposed) |
No |
OpenAPI file and contract tests in CI |
Open |
Review and approval
| Review role |
Named individual |
Decision |
Date |
Signed / controlled record |
| Author |
Claude Code (drafted with Claude Code) |
Draft |
2026-10-27 |
This file at the commit that adds it |
| Technical reviewer |
Tech Lead (name to be assigned) |
Pending |
Pending |
Pending |
| Quality / regulatory reviewer (if applicable) |
Qualified regulatory reviewer (name to be assigned) |
Pending |
Pending |
Pending |
| Authorized approver |
Tech Lead (name to be assigned) |
Pending |
Pending |
Pending |