Functional Requirements Document — ESG Field Processes
Derived from: BRD-field-processes.md.
Status: Revision B, 2026-07-30 — FR-NCR statuses corrected; FR-UX added; gap register and sequence re-ordered.
Assessed against: 2bf7e93 on feat/rn-app-parity, verified by inspection of the shipped shell.
Companions: GAP-ANALYSIS-console-vs-build.md · UX-simplicity-design-and-plan.md · revised-end-to-end-2026-07-29/
Requirement families follow the identifiers already in use across the codebase (FR-CAP, FR-INC, FR-COR, FR-RPT, FR-AUD, FR-SEC, FR-CMP, FR-VUI, FR-VIS, FR-ASK, FR-IMP, FR-OVS, FR-DEV). Four new families are introduced where nothing exists: FR-NCR (ticket lifecycle), FR-INS (inspection walk), FR-INV (investigation) and FR-UX (usability, §6.5). FR-AUD is extended beyond its single existing member.
Status legend: ✅ built · ⚠️ partial · ❌ absent.
1. Domain model
Four processes resolve to three structural families. This is the load-bearing decision of the specification.
| Family | Members | Shape | Lifetime |
|---|---|---|---|
| Ticket | NCR, Incident | Raised, owned, actioned, closed | Outlives whatever created it |
| Walk | Site inspection, Audit | Scoped traversal, section by section | Sealed on signature |
| Case | Investigation | Evidence accumulated over time | Concluded in a report |
1.1 Aggregates
| Aggregate | Key | Vocabulary | Status |
|---|---|---|---|
inspection/{id} | walk | packages/esg-events-inspection/src/index.ts | ✅ |
audit/{id} | walk | — | ❌ |
ncr/{id} | ticket | packages/esg-events-corrective/src/index.ts covers the remedy on the server side; the device restates the whole ticket locally in apps/esg-field/lib/ncr/ticket.ts | ✅ on device, ❌ on server |
incident/{id} | ticket | packages/esg-events-incident/src/index.ts | ✅ vocabulary, ❌ implementation |
investigation/{id} | case | — (investigating is only a status on incident) | ❌ |
report/{id} | output | packages/esg-events-report/src/index.ts | ✅ vocabulary, ⚠️ implementation |
1.2 The two structural rules
FR-DM-1 (MUST). A walk raises tickets; it does not contain them. An NCR raised during an inspection or audit is its own aggregate with its own identifier, carrying the walk as a recorded origin. Rationale: every stage after "raised" occurs after the walk is sealed, so containment would require appending to a sealed record. (BR-CA2, BR-CA3)
FR-DM-2 (MUST). Coverage and conformity are separate recorded facts on every walk. Coverage states whether a section was reached and attested, and by what method. Conformity is derived: a section is reportable as conformant only where coverage was attested and no finding stands against it. Absence of a finding alone must never render as conformity. (BR-S2, BR-AU7)
Current state: violated in the data model and violated again on the glass.
- Model.
AreaInspected.statusinapps/esg-field/lib/store/events.tsfuses the two into one tri-state field, so "walked it, nothing wrong" is indistinguishable from "nobody reached it".apps/esg-field/lib/ncr/analytics.ts:37already refuses the inference on the NCR side; the walk must match it.- Interface.
apps/esg-field/screens/InspectTab.tsx:4states that the inspection "opens pre-filled from the baseline (so progress reads full)". The UI therefore originates the fabricated coverage claim rather than merely failing to distinguish it. A model fix alone does not close FR-DM-2 — the pre-fill is the proximate cause and must go with it (FR-UX-4, BR-U6).
2. Process 1 — NCR ticket (FR-NCR)
| ID | Requirement | Pri | Status |
|---|---|---|---|
| FR-NCR-1 | An NCR is a distinct aggregate ncr/{id} with its own append-only event stream | MUST | ✅ apps/esg-field/lib/ncr/ticket.ts |
| FR-NCR-2 | Raise captures: site, area/category, optional checklist item, severity, description, requested action (nullable), raiser, GPS where available, and evidence (photos, audio, transcript) | MUST | ✅ RaiseNcrInput + apps/esg-field/screens/ncr/NcrRaise.tsx |
| FR-NCR-3 | Raise records an origin: the walk aggregate and section it came from, or null for a standalone raise. Standalone is the primary path, not a special case | MUST | ⚠️ origin: NcrOrigin \| null exists and standalone works; the raise-from-a-walk-finding path is not wired — see FR-NCR-19 |
| FR-NCR-4 | Lifecycle states are derived from the event stream, never stored: open → assigned → actioned → verified → closed | MUST | ✅ foldNcr derives NcrStatus; no status is persisted |
| FR-NCR-5 | Assignment captures assignee, due date, and assigner. Re-assignment is a new event; the latest is the owner | MUST | ✅ assignNcr |
| FR-NCR-6 | Corrective action captures the action, who performed it, the date the work was done, and evidence. The completion date is distinct from the capture timestamp and may precede it | MUST | ✅ recordCorrectiveAction |
| FR-NCR-7 | Corrective action must not require prior assignment — an on-the-spot fix must be recordable | MUST | ✅ only a closed ticket refuses |
| FR-NCR-8 | Verification captures verifier, outcome (effective / not-effective), and note. The system must refuse verification where no corrective action has been recorded | MUST | ✅ refuses nothing-to-verify |
| FR-NCR-9 | A not-effective verification returns the ticket to awaiting-action. A subsequent action supersedes the failed verdict; the earlier action is never edited | MUST | ✅ derived awaitingAction |
| FR-NCR-10 | The system must refuse closure as corrected unless the latest corrective action has been verified effective | MUST | ✅ refuses not-verified |
| FR-NCR-11 | Closure reasons are corrected, not-a-non-conformance, superseded. The latter two assert no correction and require no verification | MUST | ✅ |
| FR-NCR-12 | Closure as superseded requires the identifier of the superseding ticket | MUST | ✅ refuses superseded-id-required |
| FR-NCR-13 | A closed ticket may be reopened; reopening is a new event that never un-writes the closure, and returns the ticket to unowned work | MUST | ✅ reopenNcr, refuses not-closed |
| FR-NCR-14 | Where the verifier is the same person who performed the corrective work, the record must expose that fact. It must not be blocked | MUST | ✅ derived selfVerified flag; nothing is blocked |
| FR-NCR-15 | Overdue is derived from the assigned due date against a caller-supplied clock. No library reads a clock to decide it | MUST | ✅ isOverdue(ticket, now) |
| FR-NCR-16 | A ticket inbox lists all NCRs with status, owner, due date and overdue flag, offline | MUST | ✅ apps/esg-field/screens/ncr/NcrInbox.tsx, routed at 2bf7e93 |
| FR-NCR-17 | Every refusal above surfaces an explicit, actionable error identifying which rule refused | SHOULD | ✅ NcrError + typed NcrErrorCode |
| FR-NCR-18 | The ticket flow is reachable from the app shell — inbox, raise and detail behind one entry point, with now sampled once per entry so "overdue" cannot disagree between list and detail | MUST | ✅ apps/esg-field/screens/ncr/NcrFlow.tsx via apps/esg-field/app/index.tsx:84 |
| FR-NCR-19 | A finding raised during a walk creates the ticket inline — pre-filled with section, GPS, time and photo — and returns the operator to the same point in the walk with a brief confirmation. The operator never retypes the finding | MUST | ❌ the load-bearing remaining gap; satisfies FR-NCR-3's origin and FR-INS-10 |
| FR-NCR-20 | The console presents the same ticket inbox and detail, so a ticket closed on a device is visible and actionable in the office | MUST | ❌ blocked on FR-IF-1 and GA-1 |
Traces: BR-CA2…BR-CA8, BO-2.
3. Process 2 — Site inspection (FR-INS, FR-CAP)
| ID | Requirement | Pri | Status |
|---|---|---|---|
| FR-INS-1 | An inspection is created against a template that defines its sections; the template identifier is recorded and is never a placeholder | MUST | ✅ apps/esg-field/lib/store/events.ts |
| FR-INS-2 | The template governing process 2 today is the ONxpress weekly environmental inspection: 9 sections, 34 items (packages/esg-inspection-template/src/index.ts) | MUST | ✅ |
| FR-INS-3 | Section progress is the unit of navigation: the operator sees which sections are covered, which are outstanding, and which were not reached | MUST | ⚠️ |
| FR-INS-4 | Coverage is recorded per section as attested (with method) or not-reached (with reason) — see FR-DM-2 | MUST | ❌ |
| FR-INS-5 | Coverage method is recorded as section-affirmation or item-by-item. A whole-section attestation is a real attestation over every item beneath it and may print as such; which one occurred must be recoverable | MUST | ✅ AreaVerdictMethod |
| FR-INS-6 | Items departing from a section attestation are recorded as explicit exceptions. Absent exceptions and empty exceptions are different claims and must not be conflated | MUST | ✅ |
| FR-INS-7 | A section that could not be reached is recordable with a reason, and renders as not-inspected — never as compliant | MUST | ❌ |
| FR-INS-8 | Photo capture binds the device timestamp, GPS fix where available, and the section (and item where applicable) at the moment of capture | MUST | ✅ FR-CAP-* |
| FR-INS-9 | Where GPS is unavailable or denied, the record states so; no coordinate is invented | MUST | ✅ |
| FR-INS-10 | Findings raised during the walk create NCRs per FR-NCR-3; the inspection does not own their closure | MUST | ❌ |
| FR-INS-11 | Sign-off captures signer, drawn signature, timestamp and GPS; multiple signatures are supported | MUST | ✅ apps/esg-field/lib/signature |
| FR-INS-12 | The inspection report is generated on device, offline, reproducing the pinned ONxpress structure: title, per-page form-ID footer, section bands, tri-state per item, watermarked photo thumbnails, signature block | MUST | ✅ apps/esg-field/lib/report, pinned by reference/Test_Aecon_Report_Structure.md |
| FR-INS-13 | The report must not print an item verdict that nobody gave. Where coverage method is absent, the report says so rather than back-filling ticks | MUST | ✅ apps/esg-field/lib/report/inspectionIR.ts |
| FR-INS-14 | Photo watermarks carry capture timestamp, GPS coordinates and reverse-geocoded address | MUST | ⚠️ address unverified |
| FR-INS-15 | The entire inspection including report generation completes with no connectivity | MUST | ✅ |
Traces: BR-S1…BR-S7, BO-1, BO-5.
4. Process 3 — Internal and external audit (FR-AUD)
Nothing in this section exists. FR-AUD-1 in the codebase is a report-fidelity requirement (the golden PDF acceptance gate), not the audit process; the requirements below are new and extend the family.
| ID | Requirement | Pri | Status |
|---|---|---|---|
| FR-AUD-2 | An audit is an aggregate audit/{id} sharing the walk structure with inspection: created, sections covered, signed, reported | MUST | ❌ |
| FR-AUD-3 | An audit records its type, internal or external, as a first-class attribute | MUST | ❌ |
| FR-AUD-4 | An audit records auditor identity and organisation, accommodating an auditor who is not an employee | MUST | ❌ |
| FR-AUD-5 | An audit records the standard or scope it is conducted against — clauses or programme elements — which may differ from an inspection checklist | MUST | ❌ |
| FR-AUD-6 | Audit findings are graded major-nc, minor-nc, observation, opportunity-for-improvement. This vocabulary is distinct from an inspection item verdict and from NCR severity | MUST | ❌ |
| FR-AUD-7 | A major-nc or minor-nc finding must raise an NCR per FR-NCR-3, and the audit report cites the ticket identifier | MUST | ❌ |
| FR-AUD-8 | An observation or opportunity-for-improvement must not raise an NCR | MUST | ❌ |
| FR-AUD-9 | Audit coverage per section obeys FR-DM-2 identically to inspection coverage | MUST | ❌ |
| FR-AUD-10 | The audit report is a distinct output: scope, standard, auditor and organisation, findings grouped by grade with cited NCR identifiers, and a conformity conclusion | MUST | ❌ |
| FR-AUD-11 | Where the audit finds no non-conformance, the report states the scope covered — it must not imply conformity beyond what was walked | MUST | ❌ |
| FR-AUD-12 | An audit completes offline exactly as an inspection does | MUST | ❌ |
Design direction: implement audit as the same walk engine as inspection, discriminated by kind, differing in three payload details — scope/standard rather than only template sections, auditor organisation, and graded findings. It is not a second engine. Doing otherwise duplicates coverage, evidence and signature logic.
Traces: BR-AU1…BR-AU7, BO-3.
5. Process 4 — Incident → investigation → report
5.1 Incident (FR-INC)
Vocabulary is contracted in packages/esg-events-incident/src/index.ts; no implementation exists in either client.
| ID | Requirement | Pri | Status |
|---|---|---|---|
| FR-INC-1 | An incident is an aggregate incident/{id}, reportable by any field user in a minimum number of steps | MUST | ❌ |
| FR-INC-2 | Classification is type + severity chosen from closed sets — never free text. Types: spill, permit-or-limit exceedance, off-site release, community complaint, regulatory visit, regulatory order, wildlife/SAR encounter | MUST | ✅ vocabulary |
| FR-INC-3 | occurredAt and reportedAt are separate recorded fields and are never conflated. An incident is commonly reported hours or days after the fact | MUST | ❌ |
| FR-INC-4 | Location and GPS at reporting are captured, with FR-INS-9 honesty where unavailable | MUST | ❌ |
| FR-INC-5 | Persons involved, injuries, and environmental release details are captured per type | MUST | ❌ |
| FR-INC-6 | Immediate actions taken (make safe, contain, evacuate) are recorded on the incident, distinct from later corrective action | MUST | ❌ |
| FR-INC-7 | A notifiable incident carries a notification deadline; the system tracks it and a person closes it. The system must not mark a notification satisfied on its own | MUST | ✅ vocabulary (IncidentNotificationDue, IncidentNotified) |
| FR-INC-8 | State transitions reported → investigating → contained → closed / verified are append-only events | MUST | ✅ vocabulary |
| FR-INC-9 | An incident links to the obligations it puts at risk | SHOULD | ✅ vocabulary |
| FR-INC-10 | An incident is reportable fully offline | MUST | ❌ |
5.2 Investigation (FR-INV)
Entirely absent. Today investigating is a status on an incident, and TaskKind = "investigation" in apps/esg-field/lib/store/events.ts:55 models an investigation as a template-less inspection — the wrong axis. An investigation is a case, not a walk.
| ID | Requirement | Pri | Status |
|---|---|---|---|
| FR-INV-1 | An investigation is an aggregate investigation/{id} opened from an incident, recording that incident and a lead investigator | MUST | ❌ |
| FR-INV-2 | Evidence is attachable over time — photos, documents, measurements — each bound at capture per FR-SEC-11 | MUST | ❌ |
| FR-INV-3 | Witness statements are recordable, attributed, with audio and transcript where dictated | MUST | ❌ |
| FR-INV-4 | A timeline of events leading to the incident is constructible, each entry timestamped and sourced | MUST | ❌ |
| FR-INV-5 | Root cause determination records the method used (e.g. 5-why, fishbone, timeline analysis) and the causes found. A conclusion must not be presented as compelled by evidence that does not compel it | MUST | ❌ |
| FR-INV-6 | Contributing factors are distinguishable from root causes | SHOULD | ❌ |
| FR-INV-7 | Recommended corrective actions raise NCRs per FR-NCR-3, with the investigation as origin | MUST | ❌ |
| FR-INV-8 | An investigation concludes explicitly; conclusion is an event, not the absence of further activity | MUST | ❌ |
| FR-INV-9 | An investigation spanning days survives app restart and connectivity loss with no data loss | MUST | ❌ |
5.3 Investigation report (FR-RPT)
| ID | Requirement | Pri | Status |
|---|---|---|---|
| FR-RPT-5 | The investigation report is derived from the event stream, never stored as an authored blob — consistent with the inspection report fold in apps/esg-field/lib/report | MUST | ❌ |
| FR-RPT-6 | The report states: incident classification, occurrence and report times, immediate actions, evidence inventory, timeline, root cause with method, and recommended actions with NCR identifiers | MUST | ❌ |
| FR-RPT-7 | Report lifecycle is draft → in-review → final → submitted → superseded | MUST | ✅ vocabulary |
| FR-RPT-8 | A superseding revision retains the earlier version; nothing is overwritten | MUST | ✅ vocabulary |
| FR-RPT-9 | Where the investigation reached no root cause, the report states that. It must not present a placeholder conclusion | MUST | ❌ |
Traces: BR-I2…BR-I9, BO-4.
6. Cross-cutting requirements
| ID | Requirement | Pri | Status |
|---|---|---|---|
| FR-X-1 | Every process operates fully offline. Connectivity is never a precondition for capture | MUST | ⚠️ inspection only |
| FR-X-2 | All stores are append-only, enforced at the storage engine. A correction is a new event | MUST | ✅ apps/esg-field/lib/store/db.ts triggers |
| FR-X-3 | Every event carries a device capture timestamp supplied by the capturing surface; the sync tier fills a server-received timestamp. Neither is ever fabricated | MUST | ✅ FR-SEC-8 |
| FR-X-4 | Identifiers are minted from the platform CSPRNG. If entropy is unavailable the operation fails rather than falling back to a weak identifier | MUST | ✅ apps/esg-field/lib/entropy.ts |
| FR-X-5 | Unavailable inputs (GPS, transcription, network) are reported as unavailable. No value is substituted | MUST | ✅ |
| FR-X-6 | A submission is reported as delivered only where delivery was observed. Response status is classified before any success is reported to the operator | MUST | ✅ apps/esg-field/lib/ncr/api.ts |
| FR-X-7 | Field clients are React Native for iOS and Android. No web field client | MUST | ✅ |
| FR-X-8 | Role-based access governs who may assign, verify and close | MUST | ⚠️ workers/esg-query/src/authz.ts covers reads only |
6.5 Usability (FR-UX)
New family. Traces BR-U1…BR-U8 and BO-7/8/9. Design detail lives in UX-simplicity-design-and-plan.md; the acceptance spine is the golden journey in revised-end-to-end-2026-07-29: camera/voice/text → durable evidence → transcript → AI draft → human confirmation → finding/NCR → signature → local submission → delivery receipt → portal review → report.
| ID | Requirement | Pri | Status |
|---|---|---|---|
| FR-UX-1 | Every screen answers, without help: what am I doing, what did the system capture, what must I confirm, what happens next, did it arrive | MUST | ⚠️ |
| FR-UX-2 | Camera, voice and typing are three inputs to one capture action. No input is a separate destination | MUST | ⚠️ Capture and Speak ship as separate tabs — permitted for a persistent conversation, not for capture |
| FR-UX-3 | Each screen has exactly one dominant action; secondary actions are quiet; destructive actions are separated and confirmed | MUST | ⚠️ |
| FR-UX-4 | No default pre-answers a question the record then attributes to a person. Unanswered state renders as unanswered, and progress counts only explicit answers | MUST | ❌ violated — see §1.2 |
| FR-UX-5 | A clean 9-section walk costs no more than 10 deliberate interactions (nine section attestations plus signature); an exception costs +2; a not-reached section costs +2 | MUST | ❌ |
| FR-UX-6 | Delivery is surfaced as five distinct, plainly-worded states — signed and saved · queued · sending · received · not received — never one checkmark, and never a spinner over work already durably stored | MUST | ❌ |
| FR-UX-7 | A persistent indicator shows offline / syncing / all-received, with the queue reachable from it, and states explicitly when it is safe to close the app | MUST | ❌ |
| FR-UX-8 | Machine-generated content is labelled a draft, is editable, and is visually restrained — no glow, no animation, never "AI verified". Original media, original transcript, human edits and the accepted record stay separately recoverable | MUST | ❌ |
| FR-UX-9 | Generated drafts may not mark coverage, sign, submit, close a ticket, or supply a value no person or sensor produced | MUST | ✅ enforced upstream by scripts/guard-no-llm-in-proof-chain.mjs in .github/workflows/security-guards.yml (FR-SEC-5) |
| FR-UX-10 | Primary touch targets are ≥ 56 pt and sit in the bottom thumb zone; secondary targets are ≥ 44 pt; body text is ≥ 16 px equivalent | MUST | ⚠️ primaries at 44/56/64/76 landed at 2bf7e93; nine sub-44 dimensions remain to classify |
| FR-UX-11 | The interface uses business vocabulary (inspection, finding, NCR, incident, audit, submit, received, report) and not invented product words | MUST | ⚠️ "My Brief" ships; "Live Brief", "Decision Log", "Weekly capture" remain in the console |
| FR-UX-12 | Colour is never the sole carrier of state; WCAG 2.2 AA contrast and interaction requirements are met; every icon has an accessible name; recording, progress, errors and receipt changes are announced | MUST | ⚠️ contrast measured and legal; announcements unaudited |
| FR-UX-13 | Seeded or demonstration data is visibly labelled as such, with a resettable scenario, and never implies that capture, delivery or reporting works where it does not | MUST | ❌ |
| FR-UX-14 | Voice capture is proven end to end on a physical device — audio in, transcript out — and where it fails it names the reason rather than substituting a script | MUST | ⚠️ model shipped and byte-verified, transcription unproven on device |
| FR-UX-15 | Recording starts on tap and stops on a second tap; hold-to-talk may be an additional shortcut, never the only method. Leaving with unsaved audio prompts to save or discard | MUST | ⚠️ |
| FR-UX-16 | An incident is reportable on one screen in under 30 seconds by an untrained user | MUST | ❌ |
Traces: BR-U1…BR-U8, BO-7, BO-8, BO-9.
7. Interfaces
| ID | Requirement | Pri | Status |
|---|---|---|---|
| FR-IF-1 | The device delivers captured records to a server-side ingest endpoint reachable from a handset | MUST | ❌ blocking |
| FR-IF-2 | Ingest is idempotent, keyed on the client-minted record identifier, so retries cannot duplicate | MUST | ✅ design in apps/esg-field/lib/sync |
| FR-IF-3 | Queued submissions retry with backoff and survive process death mid-send | MUST | ✅ design |
| FR-IF-4 | The console presents each process, organised as Overview · Submissions · Issues · Register with a single submission-detail page owning record, evidence, transcript and AI provenance, findings and tickets, append-only activity, and report | MUST | ❌ none of the four exists; today's console is twelve destinations, nine of them hardcoded |
| FR-IF-5 | A published, addressable ingest worker exists | MUST | ❌ eleven of twelve workers declare no route |
| FR-IF-6 | The device is admitted by the edge — an Access service token, or an ingest hostname outside Access | MUST | ❌ operations decision, BRD DP-5 |
| FR-IF-7 | The receiving surface has a durable store bound to it | MUST | ❌ zero bindings in wrangler.jsonc; see GA-1 |
FR-IF-1 is the gating defect for BO-6, and it decomposes into three independent obstacles — FR-IF-5, FR-IF-6 and FR-IF-7 — none of which is in application code.
workers/esg-syncexposes only/and/healthpublicly and requires an HMAC gateway assertion a device cannot mint; eleven of twelve workers are not addressable at all.- Cloudflare Access adjudicates before any app code runs.
https://esg.cogneris.com302-redirects every path to the Access login — verified 2026-07-29 for/,/app,/inspections,/api/inspectionsand static assets.middleware.tsmatches only/adminand cannot exempt a route from Access; no middleware can.- Even an admitted, successful POST would land nowhere — the console has no server-side store (GA-1).
Fixing any one of the three leaves the boundary severed. See BRD §2.4, §7 DP-1/DP-5/DP-6, AS-5.
8. Non-functional
| ID | Requirement | Pri |
|---|---|---|
| NFR-1 | A section attestation is a single interaction; walking 34 items must not require ~40 taps. Quantified in FR-UX-5: a clean 9-section walk costs ≤ 10 deliberate interactions | MUST |
| NFR-2 | Capture surfaces remain responsive with gloves, in daylight, one-handed. Raised to MUST — it is the condition of use, not a preference, and it is currently an untested claim (BRD DP-7) | MUST |
| NFR-3 | An inspection's full record including photos survives device restart and app termination | MUST |
| NFR-4 | Report generation completes on device within a few seconds for a typical inspection | SHOULD |
| NFR-5 | Both clients build for iOS and Android from one React Native source | MUST |
| NFR-6 | An untrained field worker completes a simple finding — capture, confirm, save — with a median under 30 seconds | MUST |
| NFR-7 | 90% of first-time users complete the golden journey unassisted; no participant mistakes queued for received; no participant believes generated text is original evidence | MUST |
| NFR-8 | Voice transcription runs on-device with no connectivity (engine present and byte-verified; unproven on a handset — FR-UX-14) | MUST |
9. Traceability
| Business rule | Functional requirements |
|---|---|
| BR-CA2, BR-CA3 | FR-DM-1, FR-NCR-1, FR-NCR-3 |
| BR-CA4 | FR-NCR-5, FR-NCR-15, FR-NCR-16 |
| BR-CA5 | FR-NCR-8, FR-NCR-10 |
| BR-CA6 | FR-NCR-11 |
| BR-CA7 | FR-NCR-14 |
| BR-CA8 | FR-NCR-6 |
| BR-S1 | FR-INS-1, FR-INS-2, FR-INS-3 |
| BR-S2 | FR-DM-2, FR-INS-4, FR-INS-7 |
| BR-S3 | FR-INS-5, FR-INS-6, FR-INS-13 |
| BR-S4 | FR-INS-7 |
| BR-S5 | FR-INS-12, FR-INS-14 |
| BR-S6 | FR-INS-10 |
| BR-S7 | FR-INS-15, FR-X-1 |
| BR-AU1 | FR-AUD-5 |
| BR-AU2 | FR-AUD-3, FR-AUD-4 |
| BR-AU3 | FR-AUD-6 |
| BR-AU4 | FR-AUD-7 |
| BR-AU5 | FR-AUD-8 |
| BR-AU6 | FR-AUD-10, FR-AUD-11 |
| BR-AU7 | FR-AUD-9 |
| BR-I2 | FR-INC-1 |
| BR-I3 | FR-INC-3 |
| BR-I4 | FR-INC-7 |
| BR-I5 | FR-INC-6 |
| BR-I6 | FR-INV-1…FR-INV-4 |
| BR-I7 | FR-INV-5, FR-RPT-9 |
| BR-I8 | FR-INV-7, FR-INV-8, FR-RPT-5, FR-RPT-6 |
| BR-I9 | FR-RPT-7, FR-RPT-8 |
| BR-X1…BR-X6 | FR-X-1…FR-X-8, FR-DM-1 |
| BR-U1 | FR-UX-1, FR-UX-3 |
| BR-U2 | FR-UX-2, FR-UX-15 |
| BR-U3 | FR-UX-6, FR-UX-7 |
| BR-U4 | FR-UX-8, FR-UX-9 |
| BR-U5 | FR-UX-11 |
| BR-U6 | FR-UX-4, FR-UX-5, FR-DM-2, FR-INS-4, FR-INS-7 |
| BR-U7 | FR-UX-10, FR-UX-12, NFR-2 |
| BR-U8 | FR-UX-13 |
10. Gap register
Ordered by consequence.
| # | Gap | Blocks | Requirements |
|---|---|---|---|
| 0 | Voice transcription is unproven on a device. A 99 MB on-device model ships, byte-verified and wired; nobody has spoken into it. Dictation is the alternative to typing in gloves, and it is step 3 of the golden journey | BO-1, BO-7 | FR-UX-14, NFR-8 |
| 1 | No device-reachable ingest, severed in three independent places — no published worker, Access adjudicating before app code, and no store behind the endpoint. Nothing captured has ever reached a server | BO-6, all four processes | FR-IF-1, FR-IF-5, FR-IF-6, FR-IF-7 |
| 2 | The walk fabricates coverage. The inspection opens pre-filled "so progress reads full", asserting attestations no person made. The only defect in this document that manufactures evidence | BO-5, BO-9 | FR-UX-4, FR-DM-2, FR-INS-4, FR-INS-7 |
| 3 | Audit process entirely absent. No aggregate, no vocabulary, no surface. Every "audit" in the codebase is an audit trail or an RBAC role | BO-3 | FR-AUD-2…12 |
| 4 | Investigation absent, and offered anyway. A status on incident, not a case; TaskKind = "investigation" models it as a template-less inspection, and the shell presents a "New investigation" button that creates exactly that | BO-4 | FR-INV-1…9 |
| 5 | Incident capture absent despite a complete contracted vocabulary | BO-4 | FR-INC-1, 3…6, 10 |
| 6 | Delivery state is not expressed. No vocabulary distinguishes signed-and-saved from queued from received, so the product cannot tell the truth about the gap in row 1 even where it knows it | BO-8 | FR-UX-6, FR-UX-7 |
| 7 | No console surface for NCR, audit, incident or investigation — and nine of the twelve that exist are hardcoded, with the two data-backed ones broken in production | BO-6 | FR-IF-4, FR-NCR-20, FR-UX-13 |
| 8 | Three unconnected persistence models — console flat SQLite, device append-only log, device relational store — and the @esg/* vocabularies govern none of them, since the field app declares no dependency on them | BO-5 | FR-X-2 |
| 9 | Write-side authorisation unspecified. Read authorisation exists; who may assign, verify or close does not. Now live: the device closes tickets today | BO-2 | FR-X-8 |
| 10 | The field tool's design authority is a browser mock of a phone, from which its geometry and interaction model are inherited | BO-7 | FR-UX-10, NFR-2 |
Withdrawn from Revision A: "NCR has no lifecycle." The ticket ladder is implemented and routed (§2). What remains of it is FR-NCR-19 (inline raise from a finding) and FR-NCR-20 (console inbox).
10.1 Recommended sequence
Each step is independently deliverable and preserves compatibility for concurrent work, per the pull-request independence rule in AGENTS.md.
- FR-UX-14 — press the mic on the device. Two minutes, no code. Voice is step 3 of the golden journey and everything downstream of it is speculative until it works.
- FR-IF-6 — the edge decision (Access service token or an ingest hostname outside Access). Pure operations, longest lead time, blocks nothing else from starting. Begin immediately and in parallel.
- FR-UX-4 / FR-DM-2 / FR-INS-4 — remove the pre-fill and split coverage from conformity, with the 9-tap attestation gesture replacing it. Promoted from third to second: it is a breaking change to a committed event shape, so it wants the longest compatibility runway, and it is a prerequisite for an honest audit and an honest report.
- FR-IF-5 + FR-IF-7 + FR-UX-6/7 — publish one ingest worker, bind one store, and express the five delivery states. These three are one vertical slice: without the third, the first two cannot be observed by an operator.
- FR-NCR-19 — inline raise from a walk finding. Small, self-contained, and the highest-value remaining device work now that the ladder is routed.
- FR-IF-4 — the console, reduced to Overview · Submissions · Issues · Register, with the submission-detail page as its centre. Depends on step 3 for anything real to show.
- FR-AUD-2…12 — audit on the shared walk engine, after step 2 makes coverage honest.
- FR-INC then FR-INV then FR-RPT-5/6 — the incident chain, reusing the proven capture/delivery/portal seams rather than building parallel ones.
What changed from Revision A's sequence, and why. The NCR ticket has moved off the critical path — it is built and routed. Coverage/conformity has moved up, because it is the one gap that actively fabricates evidence, and because a report generated before it lands will have to be regenerated afterwards. And proving voice now leads, because it costs nothing and invalidates the most if it fails.
11. Verification approach
| Requirement class | How verified |
|---|---|
| Lifecycle refusals (FR-NCR-8, 10, 12, 13) | Unit tests asserting the specific refusal and that nothing was appended |
| Coverage/conformity separation (FR-DM-2) | A section with no findings and no attested coverage must not render as conformant |
| Report fidelity (FR-INS-12) | Existing golden gate: structural assertions plus tolerance-bounded visual regression against Test_Aecon.pdf |
| Durability (FR-X-2, NFR-3) | Append one event of every kind, close, reopen, assert byte-identical re-read |
| Honesty requirements (FR-X-5, FR-X-6) | Fault injection: deny GPS, drop network, return 403 — assert the surfaced state is the failure, not a substituted value |
| Offline (FR-X-1) | Every process test runs with no network configured |
| Tap budget (FR-UX-5, NFR-1) | Instrument a clean 9-section walk and assert ≤ 10 deliberate interactions; assert the same walk records nine explicit attestations, not nine defaults |
| No fabricated defaults (FR-UX-4) | Open a walk, sign it immediately, and assert the report renders every section as not inspected. A green report from an untouched walk is the failure this test exists to catch |
| Delivery states (FR-UX-6, FR-UX-7) | Fault injection across all five states; assert the operator-visible string differs in each, and that no spinner survives a successful local save |
| Draft provenance (FR-UX-8, FR-UX-9) | Assert original media, original transcript, human edit and accepted record are separately retrievable after an edit; assert guard-no-llm-in-proof-chain.mjs still passes |
| Voice (FR-UX-14, NFR-8) | On a physical handset, in airplane mode: speak, and assert a transcript appears. On failure, assert the reason is named and no scripted text is substituted |
| Touch targets (FR-UX-10) | Enumerate interactive elements and assert none is below 44 pt, primaries ≥ 56 pt. Decorative dimensions are classified once and excluded explicitly, never by omission |
| Usability (NFR-6, NFR-7) | Moderated panel per the revised set §10 — first-time field worker, experienced inspector, supervisor, compliance reviewer, screen-reader user, and a user in gloves outdoors |