Cogneris
Environmental Compliance & Inspection

Intent · Every environmental obligation current and evidenced — zero reportable exceedances at Woodbine (UTS).

Operating tolerance: issues closed in ≤ 5 days · no repeat findings · every permit condition met.

← Documentsdocs/PORTAL-ROLES.md7,212 words

The portal's users, roles and role requirements

Status: PROPOSAL. Written 2026-08-03 by Claude Opus 5 (Claude Code) at Pete's request: *outline all of the users, roles and the requirements for those roles* for the portal.

Basis. The live deployed console at https://esg-web.sequents.workers.dev/ (esg.cogneris.com returns HTTP 403 behind Cloudflare Access), read against the source in app, apps/esg-field, packages and workers. Every claim about what exists today is cited to a file and line.

Scope, corrected by Pete on 2026-08-03 and binding on this document. Everything built, and everything currently in flight, is OPERATIONAL — environmental review, inspection, NCR, incident and investigation, audit. There is no planning, no costing and no bidding activity, and no role in this document holds authority over any of them. Where PERSONA §2 describes four project phases, only the fourth — managing — is in scope here. Phases 1–3 (bid · cost·plan · onboard) are recorded in §4.1 as parked, so that when they arrive the authorities are already named and nobody re-derives them; nothing in §6 grants them today.

Domain scope — the E, not the S or the G. Asked directly on 2026-08-03 and answered honestly: everything here is environmental compliance on operating construction sites. Nothing in this document, and nothing in the product, covers the social or governance/disclosure sides of ESG. The console's own module switcher says as much — ESG · Environmental is active, while GRC · Governance, Risk & Compliance and HSM · Health & Safety Management are declared and inactive (app/components/ConsoleShell.tsx:131) — and a word-boundary search of the repository for GHG, carbon, GRI, SASB, ISSB, TCFD, CSRD, Indigenous engagement, social value, human rights, modern slavery or local content returns nothing outside vendored third-party headers. If S and G come into scope they bring roles that do not exist here — a disclosure / sustainability lead, a community and stakeholder liaison, a social-value or local-content officer, an external assurance provider (which is not an auditor), and a supply-chain owner — and a different record model: periodic aggregate reporting over a defined boundary, rather than append-only site events. Do not stretch these ten roles to cover it.

This is the specification half of WORKLIST item R2 — *"approval vocabulary + role and access model"*, currently [!] blocked: not started — and of primitive P2 in PORTAL-proposal §5. It does not build anything. It says who the users are, what a role is, what each role may and may not do, and what the record must say about them.

Read with PERSONA-environmental-director.md (the portfolio reader), PORTAL-proposal.md (the surface), PORTAL-boardroom-and-modules.md (the four audiences the record is cut for — board · client · regulator · management, which are consumers, not roles: one derivation, four renderers), BRD-field-processes.md §4 (stakeholders and the business rules every authority below traces to) and FRD-field-processes.md §6 (FR-X-8, FR-SEC).


0. What is actually true today, before any of this is proposed

Stated first so nothing below reads as nearer than it is.

#FactEvidence
0.1A closed role enum already exists in shipped code — inspector · reviewer · manager · admin, with an explicit per-surface allow-list in three bands (field-and-oversight / oversight / audit)workers/esg-query/src/authz.ts:50, workers/esg-query/src/authz.ts:325, workers/esg-query/src/authz.ts:346
0.2It governs reads only. FR-X-8 — "role-based access governs who may assign, verify and close" — is marked ⚠️ against exactly this fileFRD §6
0.3The field app has no identity at all. inspectorId is the literal string "device" everywhere it is written, and the code says so in a commentapps/esg-field/screens/inspect/TaskFlow.tsx:262, apps/esg-field/screens/inspect/TaskFlow.tsx:636
0.4The console's ingest endpoint defaults the author to "device" tooapp/api/ncrs/route.ts:90
0.5Where actors are named, two incompatible vocabularies are in use. NCR assignment holds a job title — assignee: "Site super", "HSE lead", "Env monitor" — while the ledger holds a person — signedBy: "D. Osei · Environmental Manager". A title is not attributable: two people can both be "Site super" and the record cannot say which one owed the workapp/lib/ncr.ts:89, app/lib/ncr.ts:211, app/lib/ledger.ts:55
0.6The console's own operator is a title, not a user — OPERATOR = { name: "Environmental Manager", greetingName: "Marie" }, a literalapp/lib/mywork.ts:62
0.7The only access boundary in the console is loopback, with a documented interim residual risk, pending "real authn/authz and org identity"app/lib/admin-access.ts:42
0.8The signature model already has two roles — Inspector and Site Representative — and they are the only role concept that reaches a signed artefact todayapps/esg-field/screens/SignoffSheet.tsx:45
0.9Cloudflare Access is a perimeter, not an identity. It decides who may reach the origin. It puts no name in any record, and nothing downstream reads itoperational

The consequence, plainly: every governance authority described in the decks is currently a button that anyone who can reach the origin may press, recorded against nobody. Roles are not a hardening pass on this system. They are the precondition for the record being worth keeping.


1. Five things that are routinely conflated, and are not the same

The whole model below depends on keeping these apart.

TermDefinitionExample
UserA human with credentials who signs in and actsMarie, environmental manager on ONxpress
PartyA named actor on a record who may never sign inThe regulator (MECP); the crew that performed a correction
Role (band)The coarse authority class carried in the signed session claimmanager
ScopeWhich rows the role may see and act on — tenant · project(s) · sitesallowedSites: ["woodbine", "exhibition"]
GrantA single named capability — one governance verb on one object classncr.close.retract

Two further distinctions that the current code violates:

  • An identity in the record is not a login. A crew member who did the work, a site representative who countersigned on a phone, an external auditor — all must be nameable on a record without ever holding an account. Requiring a login to be named is how systems end up recording "device".
  • A role is not a job title. "HSE lead" is an organisational fact that changes without any system event. manager is an authority the system grants and revokes. Storing the first where the second belongs is defect 0.5.

2. The users and parties

Thirteen actors appear across the decks, the BRD, the console data and the field app. Not all of them are users.

#ActorRelationshipSigns in?Where they workAppears today as
U1Field inspector / environmental technicianemployeeyes — deviceesg-field app"device" (apps/esg-field/screens/inspect/TaskFlow.tsx:262); Inspector signer
U2Environmental monitor — specialist, frequently subcontractedemployee or subcontractoryes — deviceesg-field appassignee: "Env monitor", permit holder
U3Site supervisor / superintendent / foremanemployee (delivery, not environment)yes — portal, narrowportal: assigned work onlyassignee: "Site super", "Earthworks super", "Night super"
U4HSE leademployeeyes — portalportal: assigned work, own projectowner: "HSE lead"
U5Environmental manager — one project, in deliveryemployeeyes — portalportal: project workspaceOPERATOR literal; signedBy: "D. Osei · Environmental Manager"
U6Environmental director — every project, operationallyemployeeyes — portalportal: portfolio lens + decision queuePERSONA doc; nothing in code
U7Internal auditoremployee, independent of the audited siteyes — device + portalesg-field (walk) + portal (report)absent — audits are unbuilt (BRD §5.3)
U8External auditornot an employee (BR-AU2)yes — time-boxed, read + audit captureportal, scoped and datedabsent
U9Client representativenot an employeeyes — read-only, released records onlyportal, released reports onlyclient: "Metrolinx", "Aecon", "Meridian Retail Trust", "STC"
U10Platform administrator / operatoremployee (ours)yes — platform surfaces/admin, provisioningloopback-gated (app/lib/admin-access.ts:42)
P1Site representative — countersigns a walk on the inspector's devicemay be anyone on sitenosignature pane onlySite Representative signer (apps/esg-field/screens/SignoffSheet.tsx:46)
P2Crew / operator / vendor — performs corrective worksubcontractor or employeenonamed on the actionby: "Earthworks crew", "Vendor"
P3Regulator — MECP, TRCAexternal authorityneverconsumes notifiable reportsauthority: "MECP · Spills", issuer: "MECP · EASR"
P4Board / JV boardinternal governanceno — receives the packquarterly board pack (PORTAL-boardroom-and-modules.md)absent

And one non-human actor, which is the most important row in the table because it is the one most likely to be given authority by accident:

#ActorAuthority
N1Rita — one per identity, not one for the system (see §3.4)None. Ever, in any of her instances. She may draft, summarise, rank and propose. She may not mark coverage, sign, submit, close a ticket, assign an owner, or supply a value no person or sensor produced (FR-UX-9, BR-U4, BR-P2/FR-SEC-5, enforced by scripts/guard-no-llm-in-proof-chain.mjs)
N2The deviceA device is a bearer of a key, not an actor. It attests where and when a record was captured. It never attests who — that is U1's credential, bound at sign-in

3. The role model

3.1 The rule: one enum, three axes

Keep the four bands that already ship. inspector · reviewer · manager · admin (workers/esg-query/src/authz.ts:50) is a closed enum enforced on the read plane with an explicit per-surface allow-list. A second, richer enum invented for the portal guarantees the read plane and the write plane will disagree about who someone is — and the disagreement will surface as a person who can approve a thing they cannot see.

Everything the thirteen actors need is expressible as band × scope × grants, without a fifth band:

  • Band — the coarse class, carried in the signed session claim. Decides which surfaces exist for you.
  • Scope — tenant · project · allowedSites, already the signed vocabulary (workers/esg-query/src/authz.ts:59). Decides which rows. An empty axis reads nothing — never "all".
  • Grants — named capabilities. Decide which verbs. This is the new part; nothing in the repo has it.

Plus party attributes on every identity, which are record facts rather than permissions: organisation, employmentRelation (employee · subcontractor · external), and for external parties an engagementWindow. BR-AU2 requires the record to show that an external auditor is not an employee; that cannot be derived from a band.

3.2 The director problem, which blocks the persona document

The signed claim is project — singular. The pilot is deliberately one project, many sites (FR-OVS-1, FR-SEC-10), and workers/esg-query/src/authz.ts:23 is explicit that a minter using a plural form reads nothing.

The environmental director (U6) cannot be expressed in the current claim vocabulary at all. Their defining property is that they hold every project, including ones not yet won. This is not a UI gap; it is a claim-shape gap, and it is the single change that unblocks PERSONA §2.

Three ways out, with a recommendation:

OptionConsequence
A. Widen the claim to projects: string[] (recommended)One coordinated change to a signed vocabulary shared by esg-query / esg-memory / esg-compliance. Do it once, now, while the pilot is one project and ["p1"] is a trivially compatible migration. Doing it later means re-minting every session in flight
B. One session per project, switched in the UIThe director's whole job — "where is my exposure across the portfolio" — becomes impossible to answer on one screen. Rejects the persona
C. A separate portfolio claim typeA second vocabulary to keep in step with the first. This is the drift 3.1 exists to prevent

Recommendation: A, and take it now. Deferring it is the expensive option.

3.3 Actor → band · scope · grants

ActorBandScopeDistinguishing grantsParty attributes
U1 inspectorinspectorone project, assigned sitescapture, raise, sign own walkemployee
U2 env monitorinspectorone project, assigned sitescapture, raise, record correctionemployee or subcontractor — must be stated
U3 site superinspectorone project, own sitesassigned NCRs only: record correction, request extensionemployee
U4 HSE leadreviewerone projectown + assigned; may assign within own siteemployee
U5 env managermanagerone project, all its sitesthe seven governance verbs on that projectemployee
U6 directormanagerall projects (needs 3.2 A)+ escalation, recurrence across projects, and external releaseemployee
U7 internal auditorreviewer + audit capture grantthe audited projectconduct audit, grade findings, raise NCRs, sign conformity conclusionemployee, independent of the audited site
U8 external auditorreviewer, time-boxedthe audited project, evidence onlyas U7, minus anything on other projectsnot an employee (BR-AU2), engagement window mandatory
U9 client repreviewer, released-onlyone projectread released reports; raise a query, never a ticketnot an employee
U10 adminadmintenantprovisioning, key rotation, quarantine, export trailemployee

Two consequences worth stating out loud, because both look wrong at first glance and are deliberate:

  • admin is not the top of a ladder. It is a different ladder — platform operations. It carries no compliance signature (SoD-5). The most privileged compliance role is manager.
  • U3 is inspector-banded on purpose. A superintendent outranks an inspector organisationally and has less environmental authority. Bands are authority over the record, not seniority. This is exactly why 1's "a role is not a job title" is load-bearing.

3.4 Rita is per-person, and that is a role requirement

Every role has their own Rita. She is not one system agent that everyone queries; she is the individual's agent, and there are as many of her as there are users. That single fact generates four requirements that nothing else in this document would produce:

IDRequirementWhy
A1Rita inherits her principal's scope exactly — the same tenant · project(s) · allowedSites claim, never a service identity, never a supersetAn agent that can see more than the person it answers to is a scope leak wearing a friendly face. It is also the easiest one to ship by accident, because a service token is the convenient way to build her
A2Rita holds none of her principal's grantsScope and authority are different axes (§1). She inherits the first and none of the second. The manager's Rita may draft a closure rationale; only the manager closes
A3Her memory is per-identityConversations are the institutional-memory side of the product (app/lib/conversations.ts). One person's exchanges must never surface in another's recall, and a shared memory across roles would leak an unreleased finding to a client rep's agent in one sentence
A4Her answers are attributed to her principal when acceptedAn accepted draft is the human's record. Rita is never the author of anything in the compliance chain (FR-ROLE-15)

Two properties of the shipped implementation are worth protecting rather than redesigning. The field app's Rita calls no network and holds no model key — answers are either briefed (matchScripted) or on-device (composeLocal), and each carries a provenance chip saying which (apps/esg-field/screens/Rita.tsx). And when she has no basis, she says so rather than composing a plausible answer — which on a spill or a permit is the difference between a tool and a hazard. Per-user scoping must not be the change that quietly introduces a shared server-side model with a service token.

She also researches, collaborates and works unbidden. Each instance may interrogate the institutional memory, ask a colleague's agent for information, and act on its own initiative — and where an answer would exceed the asker's scope, it asks its own human sponsor to approve the disclosure. The governing rule is one sentence: *an agent-to-agent answer may contain only what the requesting principal could have read themselves; anything more is a disclosure, and a disclosure is the sponsor's decision, never the agent's.* The protocol, the approval loop, the autonomy boundary and the per-role risks are in roles/agent-collaboration.md (F-AGT-1..23).

What differs per role is only the job she does — the inspector's Rita drafts a finding from speech, the director's answers the five questions across the portfolio. Each role file in docs/roles states hers. None of them gives her authority.


4. The authority matrix

The seven verbs are the decks' own — *review · decide · authorize · assign · escalate · verify · learn* — and all seven are writes (PORTAL-proposal §1).

VerbOn whatinspectorreviewermanageradmin
reviewany record in scopeown + assigned✅✅✅ platform only
decideaccept / reject with a reason❌propose✅❌
authorizemitigation, due date, verification evidence❌❌✅❌
assignowner + due date on an NCR (BR-CA4)❌within own site✅❌
escalateraise to notifiable / to the director✅ raise✅✅ + notify❌
verifycorrective work effective / not effective✅ disclosed (BR-CA7)✅✅❌
learnlink recurrence (repeatOf), amend the control❌propose✅❌

4.1 The sign-offs — operational only

Every sign-off below sits inside the operating site. There is no bid gate, no budget gate and no mobilisation gate in this model, because there is no bidding, costing or onboarding activity to gate.

Sign-offOn whatWhoBlocked by
Inspection report signed and issued in the pinned ONxpress format (BR-S5)one walkU5 (countersigned in the field by U1 + P1)nothing — the two-party signature already exists
Acceptance of a not-reached section (BR-S4)one walkU5approval vocabulary (P3)
NCR closure as corrected, on recorded and verified work (BR-CA5)one ticketU5P3
Countersignature of a self-verified closure (BR-CA7, SoD-2)one ticketU5P3 + person identity
Retraction as not-a-non-conformance (BR-CA6, SoD-1)one ticketU5, never the raiserP3
Acceptance of an investigation conclusion and its stated method (BR-I7)one caseU5 → U6 where notifiableinvestigations' two missing ends
Notifiable-incident escalation, against a deadline someone owns (BR-I4)one incidentU6no notification clock exists
Audit conformity conclusion (BR-AU6)one auditU7 / U8audits absent from the product
External release of a report to client, regulator or boardany released recordU6 onlyno release concept exists

Parked, not granted — the pre-operational gates. Recorded here only so they are not re-derived from scratch later. No role holds them, no surface renders them, and they are out of scope until bidding, costing or onboarding become real activities: bid go/no-go with environmental conditions attached · signed budget and dated schedule constraints · mobilisation readiness sign-off. All three are the director's, all three need Project lifecycle state (packages/esg-projects/src/index.ts:70, P5) and obligation applicability (P6), and none of that exists (PORTAL-proposal §8, PERSONA §2).


5. Separation of duties

Each rule states the constraint, the reason, and what the record must therefore carry. These are the rules that make roles worth having; without them a role model is just a menu filter.

IDRuleWhyRecord consequence
SoD-1The raiser of a finding may not close it as not-a-non-conformanceThat closure asserts the finding was wrong. Self-service retraction erases inconvenient findings with no traceRetraction is a manager decision naming the retractor and the grounds (PORTAL-proposal §7)
SoD-2Where one person both performed and verified a correction, the system discloses it — and does not prohibit it (BR-CA7)A lone technician is a real operating condition. Prohibiting it produces false records, not better onesRequires person identity on both the action and the verification. Impossible while both are titles (0.5)
SoD-3An auditor raises tickets and never closes them (BR-AU4, BR-X6)The NCR process is the single closure mechanism. An auditor closing their own finding audits nothingThe audit report cites NCR ids; closure lives on the ticket
SoD-4No role may promote an observation or OFI into an NCR, or record a major/minor without one (BR-AU3–5)Two of four grades must raise a ticket and two must not. This is a vocabulary rule, not a permissionThe grade is on the finding; the ticket link is derived, never chosen
SoD-5admin may never sign, close, verify or approve anything in the compliance recordOtherwise the person who can rotate keys can also close every ticket, and no audit trail means anythingAdmin actions land in the platform trail, not the decision ledger
SoD-6An external party (U8, U9) is never granted an internal band, and never sees an unreleased recordRelease is a decision (§4). Access to a draft is release without a decisionEvery external identity carries employmentRelation and an engagementWindow
SoD-7No model or agent holds any grant (N1)FR-UX-9 / FR-SEC-5, already enforced in CIDraft, original media, human edit and accepted record stay separately recoverable (BR-U4)
SoD-8An assignment names a person, never a title"Assigned to Site super" is unattributable and unenforceable — BR-CA4 requires it to be reportable as overdue against someoneTitles become a display derived from the person's role, not the stored value
SoD-9Delegation ("I am away — Marie holds my queue") is an appended, expiring event, never a settings toggleAn expired delegation must not silently persist, and an approval made under delegation must show itThe decision event names the delegate and the delegator
SoD-10Every decision is an appended event naming the person and the grounds — never a status flag (BR-X2)A flag cannot answer "who decided this, when, and why"Rejection carries a reason and returns the item to its originator

6. Requirements, role by role

Format per role: purpose · surfaces · may · must not · the record must state · what breaks today.

One file per role, with the feature list, lives in docs/roles — field inspector · environmental monitor · site supervisor · HSE lead · environmental manager · environmental director · internal auditor · external auditor · client representative · platform administrator. Those files answer what the portal is for and what must be built per role (F-<ROLE>-n features); this section states the authority. Where they appear to disagree, this section wins.

6.1 Field inspector (U1) — band inspector

  • Purpose. Capture what happened at the source, once, and know it arrived.
  • Surfaces. esg-field app only. On the read plane: inspection-summary · open-issues · evidence-records · incidents · corrective-actions (workers/esg-query/src/authz.ts:346).
  • May. Conduct an inspection walk; attest a section whole or item-by-item (BR-S3); record a section as not reached, with a reason (BR-S4); raise an NCR standalone or from a walk (BR-CA3); report an incident (BR-I2); capture photo/voice/text as one action (BR-U2); sign their own walk and collect the site representative's countersignature; record corrective work they performed.
  • Must not. See trend, score, coverage or register surfaces — the OVERSIGHT band explicitly excludes the field inspector, and that is correct: a score is a judgement about the site, and showing it during capture invites the record to be shaped to it. Assign an owner. Authorize a due date. Close a ticket. Release anything externally.
  • The record must state. The person (not the device); which sites they were scoped to; whether attestation was whole-section or item-by-item (BR-S3); where GPS/transcription was unavailable, that it was unavailable (BR-X4).
  • Breaks today. 0.3 — the inspector is the string "device", so every requirement in this section is currently unattributable.

6.2 Environmental monitor (U2) — band inspector

As 6.1, plus:

  • May. Record corrective work and verify it, subject to SoD-2 disclosure.
  • The record must state. employmentRelation — monitors are routinely subcontracted, and a subcontractor verifying their own correction is a materially different fact from an employee doing so.

6.3 Site supervisor / superintendent (U3) — band inspector, narrow scope

  • Purpose. Owns assigned corrective work and records what was done.
  • Surfaces. Portal, assigned items only — a queue, not a console.
  • May. Record corrective action against an NCR assigned to them, with the date the work was done, which may precede the date it was recorded (BR-CA8); attach evidence; request an extension with a reason; report an incident.
  • Must not. Assign work to themselves or others; verify their own correction silently (SoD-2 permits it, disclosed); close any ticket; see other sites' registers.
  • The record must state. Who performed the work (which may be a party, P2 — a crew or vendor — named on the action without an account).
  • Breaks today. assignee: "Site super" is a title (0.5), so the queue cannot be filtered to a person, and BR-CA4's "reportable as overdue against an owner" has no owner.

6.4 HSE lead (U4) — band reviewer

  • Purpose. First-line review within a project; the manager's delegate for routine assignment.
  • May. Everything in OVERSIGHT reads for their project; assign an owner and due date within their own site; propose a decision to the manager; verify corrective work they did not perform.
  • Must not. Authorize mitigation on other sites; retract a finding (SoD-1); release externally; countersign a self-verified closure — that is the manager's, precisely because it is the case the disclosure exists for.

6.5 Environmental manager (U5) — band manager, one project

  • Purpose. "Verifies closures, reviews reports, answers to the client" (BRD §4).
  • Surfaces. The project workspace /projects/[id]/* (CONSOLE-IA §4) and the decision queue filtered to their project.
  • May. All seven verbs (§4) within the project: confirm severity, authority and accountable owner; authorize mitigation, due date and required verification evidence; countersign self-verified closures; approve retraction (SoD-1); accept a not-reached section; accept an investigation conclusion; link recurrence; sign the inspection report.
  • Must not. Release to a client or regulator without the director's sign-off; approve their own delegation; escalate a notifiable incident on their own authority where the clock is the director's (§4.1).
  • The record must state. For every one of the above: person, timestamp, grounds, and the state before and after — the shape DecisionRecord (app/lib/ledger.ts:15) already has.
  • Breaks today. app/my-work/page.tsx:151 — five of these authorities are rendered as fully-styled buttons with no onClick. The labels are right, the positions are right, the writes do not exist. This is the cheapest place in the system for roles to become real.

6.6 Environmental director (U6) — band manager, all projects

  • Purpose. "Where is my exposure, and what have we committed to" — across every operating project (PERSONA §1). The persona's pre-award remit is real and is not in scope here (see the scope note at the top and §4.1's parked gates).
  • Surfaces. The portfolio lens; the six questions in decay order; the decision queue unfiltered; the incident spine (PORTAL-proposal §6–7).
  • May. Everything U5 may, on every project; plus the two authorities that are the director's alone (§4.1) — notifiable-incident escalation against an owned deadline (BR-I4), and external release to a client, regulator or board.
  • Must not. Substitute for the project manager's verification — a director closing tickets is a signal the queue is broken, not a feature. Alter a record; only append (BR-X2).
  • The record must state. Which sign-off, on what evidence, and what conditions were attached — a closure accepted with a condition and one accepted without are different commitments. For a release: what was released, to whom, and when.
  • Breaks today. One structural blocker, and it is not a backlog item: the signed claim cannot express multi-project scope (§3.2), so the portfolio reader cannot be minted at all. (Project also has no lifecycle state — packages/esg-projects/src/index.ts:70 — but that only bites the parked gates, not the operational ones.)

6.7 Internal auditor (U7) — band reviewer + audit-capture grant

  • Purpose. Conduct a scheduled audit against a standard or scope, not a checklist (BR-AU1).
  • May. Conduct the walkabout; grade findings major · minor · observation · OFI (BR-AU3); raise NCRs for majors and minors (BR-AU4); write the audit report — scope, standard, auditor, findings by grade, conformity conclusion (BR-AU6); sign that conclusion.
  • Must not. Close any NCR (SoD-3); audit a site where they hold delivery responsibility — independence is a scope rule, enforced at assignment; record an observation or OFI as a non-conformance (SoD-4).
  • The record must state. Internal vs external, and the auditor's identity and organisation (BR-AU2); coverage separately from conformity (BR-AU7, BR-S2).
  • Breaks today. Audits are absent from the product entirely (BRD §5.3) — this role has nothing to sign in to.

6.8 External auditor (U8) — band reviewer, time-boxed

As 6.7, plus the constraints that come from not being an employee:

  • May. Only within a declared engagementWindow, and only on the audited project's evidence.
  • Must not. Reach any other project; retain access after the window closes; see the decision queue or any unreleased draft (SoD-6).
  • The record must state. employmentRelation: external and the organisation, on the audit record itself — BR-AU2 is explicit that "an external auditor is not an employee and the record must reflect that."

6.9 Client representative (U9) — band reviewer, released-only

  • Purpose. Consume reports as evidence of conformity; the ONxpress-format inspection report is a contractual deliverable (BR-S5).
  • May. Read records released to them and their own project's released register; raise a query against a released record.
  • Must not. See drafts, the decision queue, or any record before release; raise or close an NCR — a client query becomes a ticket only when an internal role raises one (SoD-6, BR-X6).
  • The record must state. What was released, to whom, by whom, and when — release is a decision with an author, not a visibility setting.

6.10 Platform administrator (U10) — band admin

  • Purpose. Keep the platform running and provably tamper-evident.
  • May. Provision users, bands, scopes and grants; rotate keys; bind and revoke devices; reach the AUDIT surfaces — quarantine · chain-integrity · location-history (workers/esg-query/src/authz.ts:362); operate export and retention.
  • Must not. Sign, verify, close, assign, approve or release anything in the compliance record (SoD-5); grant themselves a compliance band without a second admin's approval; read record content where a scope claim would not admit them.
  • The record must state. Every provisioning act, in a platform trail separate from the decision ledger, including the grantor.
  • Breaks today. /admin is reachable on loopback with no identity at all (app/lib/admin-access.ts:42) — self-described as interim, pending exactly this document's implementation.

6.11 The parties, which are requirements too

PartyRequirement
P1 site representativeNameable and signable on the inspector's device, without an account — a two-party signature is already implemented (apps/esg-field/screens/SignoffSheet.tsx:45) and must survive identity landing
P2 crew / operator / vendorNameable on a corrective action as the performer, distinct from the U3 who recorded it. SoD-2's disclosure depends on being able to say these were different people
P4 boardNever a user. Receives a released pack under the same release decision as any external party (FR-ROLE-14). The four audiences in PORTAL-boardroom-and-modules §2 are cuts of one record, not four permission sets — the role model decides who may release each cut, never who may author a separate one
P3 regulatorNever a user. A recipient of a released notifiable report, with the notification deadline and the person accountable for closing it recorded (BR-I4)
N1 agentNo grant, ever (SoD-7)

7. Cross-cutting role requirements

New family FR-ROLE, traceable to FR-SEC-4, FR-X-8 and the BR rules named.

IDRequirementPriStatus
FR-ROLE-1Every actor on every record is a person or a named party, never a device, a title, or an empty defaultMUST❌ "device" (0.3, 0.4)
FR-ROLE-2The role enum stays the closed set inspector · reviewer · manager · admin; the portal introduces no second enumMUST✅ exists, reads only
FR-ROLE-3Authority = band × scope × grants. Scope axes are tenant · project(s) · allowedSites, trusted only from signed claims; an empty axis means nothing, never "all"MUST⚠️ read plane only
FR-ROLE-4The session claim expresses multi-project scope, or the director role cannot existMUST❌ §3.2
FR-ROLE-5Every identity carries organisation and employmentRelation; external identities also carry an engagementWindow and expire automaticallyMUST❌ (BR-AU2)
FR-ROLE-6Role is enforced on the write plane before any governance verb, in the same order as reads (authenticate → role → scope)MUST❌ FR-X-8 ⚠️
FR-ROLE-7Every governance act is an appended event naming the person and the grounds; no status flag, no in-place editMUST❌ (BR-X2, SoD-10)
FR-ROLE-8Rejection carries a reason and returns the item to its originatorMUST❌
FR-ROLE-9Where performer and verifier are the same person, the record discloses it and does not block itMUST❌ (BR-CA7, SoD-2)
FR-ROLE-10Retraction as not-a-non-conformance requires a role above the raiserMUST❌ (SoD-1)
FR-ROLE-11admin holds no compliance authority; admin acts land in a separate platform trailMUST❌ (SoD-5)
FR-ROLE-12Delegation is an appended, expiring event that both the delegate's actions and the audit trail displaySHOULD❌ (SoD-9)
FR-ROLE-13Auditor independence is enforced at assignment: a person may not audit a site where they hold delivery responsibilityMUST❌
FR-ROLE-14External release is a decision with an author, a recipient and a timestamp — never a visibility settingMUST❌ (SoD-6)
FR-ROLE-15No model or agent holds any grant; generated content is a draft a person accepts, and the draft, the original and the accepted record stay separately recoverableMUST✅ enforced in CI (FR-UX-9, FR-SEC-5)
FR-ROLE-19Every user has their own agent instance, which reads with the principal's scope claim and never a service identity (A1)MUST❌
FR-ROLE-20Agent memory and conversation history are per-identity; no recall crosses users, and no agent surfaces a record its principal could not open (A3)MUST❌
FR-ROLE-21An agent-to-agent answer contains only what the requesting principal could have read themselves; transitive requests are evaluated against the original requester, never the last hopMUST❌
FR-ROLE-22Any answer beyond that is a disclosure the responding agent's human sponsor approves, as a release decision naming the sponsor. Silence is refusal — no timeout grants a disclosure, and no agent approves its ownMUST❌
FR-ROLE-23An agent acts as "agent of X", never as X, and never exercises a governance verb (sign · close · assign · authorize · verify · retract · escalate · release)MUST❌
FR-ROLE-24Information received from another agent is hearsay — labelled, sourced, and never a record, a reported figure or the basis of a closureMUST❌
FR-ROLE-25Autonomous agent work is visible to its sponsor, stoppable by them, and dies with their accessMUST❌
FR-ROLE-16Signing in on a device binds a person to that device for the session; the device attests where and when, the credential attests whoMUST❌
FR-ROLE-17Revocation is immediate and retroactive in effect on access, and never retroactive on the record — a revoked user's past signatures standMUST❌
FR-ROLE-18A user with no scope sees an empty portal, not an error — and the portal says whySHOULD❌

8. Identity lifecycle

The part that is invisible until it is missing.

  1. Invite — an admin creates an identity with organisation and employmentRelation; no band, no scope. It can reach nothing.
  2. Grant — a manager (not an admin) assigns the band and the scope; the grant is an event naming the grantor. An admin granting a compliance band requires a second admin (SoD-5).
  3. Bind — the user signs in on a device; the session binds person to device (FR-ROLE-16). Field capture from that point names the person.
  4. Operate — every act appends an event.
  5. Delegate — optional, expiring, visible (SoD-9).
  6. Revoke — leavers, ended engagements and expired windows lose access immediately. Their records do not change (FR-ROLE-17). This is the rule that stops "we removed the auditor" from meaning "the audit lost its author".
  7. External expiry — U8 and U9 windows close automatically; renewal is a new decision, not an extension of an old one.

9. What must never appear

Extending PORTAL-proposal §10, specifically for roles:

  1. A record whose author is a device, a title, or blank.
  2. A "super-admin" who can do everything — the union of platform and compliance authority is the failure mode this whole model exists to prevent.
  3. A permission toggle where a decision belongs — release, delegation and retraction are decisions with authors, not settings.
  4. A role assumed from a job title, or a title stored where a person belongs.
  5. An external party seeing an unreleased draft.
  6. A generated summary, ranking or classification carrying anyone's authority.
  7. A revoked user's signature disappearing from a signed record.
  8. Silent self-verification — either disclose it or the record is a claim nobody can defend.

10. Open decisions

IDQuestionOwnerBlocks
RD-1Widen the signed claim to projects: string[] now, while the pilot is one project? (§3.2 — recommendation: yes)architectureU6 entirely
RD-2Does the portal issue its own session-JWT, or does Cloudflare Access remain the front door with a session service behind it? Restates PT-2, and the answer decides whether U8/U9 can exist at all — external parties cannot be put behind our Access tenantoperationsU8, U9
RD-3Where do grants live — in the signed claim (fast, coarse, re-mint to change) or looked up per request (fine, revocable instantly, a dependency on every write)?architectureFR-ROLE-6
RD-4Is a subcontracted environmental monitor (U2) inspector-banded on our tenant, or a scoped external identity? Answering "external" makes BR-AU2-style disclosure automatic; answering "inspector" makes day-to-day operation simplerdirector / commercialU2
RD-5Does the client representative (U9) get a login at all, or only released PDFs? A login is a support and access-review commitment for a party that may not want oneproduct / commercialU9
RD-6Who may grant a band — managers for their own project, or admins only? SoD-5 pushes toward the former; operational reality often pushes toward the latteroperations§8 step 2
RD-7Does auditor independence (FR-ROLE-13) get enforced by the system, or asserted by the audit programme? Enforcing it requires knowing who holds delivery responsibility, which nothing currently recordsdirectorU7
RD-8PT-3 answered here: the portal is one surface with role-scoped views, not separate director / manager / inspector portals. The decks imply one, the read plane already models one with per-surface allow-lists, and three surfaces would triple the places a permission can be wrong. Confirmproductthe whole IA

11. The order this becomes real

Aligned to PORTAL-proposal §9, which puts identity and the approval vocabulary at step 1 for exactly these reasons.

  1. A person, on the device and in the console. Replace "device" (apps/esg-field/screens/inspect/TaskFlow.tsx:262, app/api/ncrs/route.ts:90) with a signed-in identity. Nothing else in this document is testable until this lands.
  2. RD-1 — widen the claim to multi-project while the migration is trivial.
  3. Person, not title, on assignment (SoD-8). Titles become display.
  4. Write-plane role enforcement (FR-ROLE-6), reusing the read plane's order so the two cannot disagree.
  5. Make the five dead buttons real (app/my-work/page.tsx:151) — the manager's authorities, already labelled with the right verbs. This is the smallest change that turns the dashboard into a portal, and it exercises FR-ROLE-6, -7, -8 and -9 in one pass.
  6. Self-verification disclosure (FR-ROLE-9) — cheap once 1 and 3 exist, and it is the honesty differentiator that makes the record defensible.
  7. External identities (U8, U9) behind RD-2 and RD-5.
  8. Notifiable-incident escalation and external release (§4.1) — the two director-only operational authorities. Both need a recipient and a clock, neither of which exists.

Not in this order at all: the parked pre-operational gates (§4.1). They wait on activities that are not happening, not on anything in this document.


*Written 2026-08-03 by Claude Opus 5 (Claude Code) on branch feat/rn-app-parity. Traceability: BR-CA3..CA8, BR-S2/S3/S4/S5, BR-AU1..AU7, BR-I2/I4, BR-X2/X4/X5/X6, BR-U4/U6, BO-9 · FR-SEC-4, FR-SEC-5, FR-X-8, FR-UX-9 · PORTAL-proposal P1/P2/P3/P5, PT-2, PT-3 · PERSONA §2, §9.*