Skip to Content

Statuses

Every enumeration is a text column with a named CHECK (column IN (...)) constraint built by enum_check() in api/app/db/models/_enums.py (ADR 0006). Values are lower-case snake_case and appear in API bodies exactly as listed here; the web app renders them as sentence-case labels (“Under review”) and the docs keep the database spelling in code. Coloured chips always carry a text label, and agent-origin content never uses the pass tone until a person has accepted it.

The five status words and the illustrative label

Products, providers, tools and capabilities carry exactly one of five release statuses: available (released and in use), preview (released to a private preview for design partners after its gates passed), designed (specified and under construction; nothing is available), planned (sequenced for a named release) and roadmap (intended, not sequenced). No other status word is used on the site, in these docs or in the deck; the words come from RELEASE_STATUSES in code, never from hand-written copy. Records that exist only to show the product (the seeded program trv-101, its people and its data, every HTML mock and every console screenshot) carry the label “Illustrative” (illustrative on the record; “Console build, illustrative data” inside a screenshot frame) so that no example is read as a customer, a result or a live system.

Enumerations

Organisation, access and connections

EnumerationConstantValues
Release status (products, providers, tools, capabilities)RELEASE_STATUSESavailable, preview, designed, planned, roadmap
Program statusPROGRAM_STATUSESactive, paused, completed, archived
Stage idSTAGE_IDSdiscovery, preclinical, clinical, manufacturing
Scope kindSCOPE_KINDSorg, program
Subject typeSUBJECT_TYPESuser, group
Connection statusCONNECTION_STATUSESpending, connected, error, disabled
Credential classCREDENTIAL_CLASSESservice, delegated
Write policyWRITE_POLICIESread_only
Sync triggerSYNC_TRIGGERStest, webhook, manual, scheduled
Sync run statusSYNC_RUN_STATUSESqueued, running, succeeded, partial, failed, skipped
Webhook delivery outcomeWEBHOOK_OUTCOMESenqueued, ignored, rejected
Rate budget scopeBUDGET_SCOPESplatform, organization, connection

Audit and signatures

EnumerationConstantValues
Actor kind (audit envelope)ACTOR_KINDShuman, agent, system
Signature meaning (server-derived)SIGNATURE_MEANINGSauthored, reviewed, approved, acknowledged
Signature authentication methodSIGNATURE_AUTH_METHODSidp_reauth, dev_token
Signature target typeSIGNATURE_TARGET_TYPESprotocol, report, requirement_set (R5 adds stage_gate; moved from R4 by ADR 0032)

Agent runs, versions and the console

EnumerationConstantValues
Agent run kindAGENT_RUN_KINDSevidence_compare, evidence_gaps, evidence_hypotheses, plans_draft_protocol, plans_draft_report, review_check, console_turn, progress_propose, review_extract_requirements, review_sop_impact, review_check_batch, twin_cycle, twin_handoff
How a twin run was started (agent_runs.initiated_by, null for other runs)RUN_INITIATORSschedule, event, handoff, user
Agent run statusAGENT_RUN_STATUSESqueued, running, awaiting_input, succeeded, failed, cancelled
Agent run modeAGENT_RUN_MODESinteractive, background
Worker laneAGENT_RUN_LANESinteractive, background
Agent event levelAGENT_EVENT_LEVELSdebug, info, warning, error
Public run error codeAGENT_ERROR_CODESruntime_unavailable, session_lost, budget_exhausted, timed_out, cancelled_by_user, attribution_leak, internal_error, gate_expired, policy_denied, plan_violation, config_mismatch, runtime_updating, rate_limited
Agent key (roles)AGENT_KEYSconsole, evidence, plans, review, progress, reader
Agent version statusAGENT_VERSION_STATUSEScandidate, active, retired
Capability risk classRISK_CLASSESoperational, evidence_generating
Model check outcome (run_snapshots.model_check)MODEL_CHECK_OUTCOMESmatch, config_mismatch, unverified
Thread statusTHREAD_STATUSESopen, archived
Thread visibilityTHREAD_VISIBILITIESprivate, program
Message roleMESSAGE_ROLESuser, agent, system, tool
Message statusMESSAGE_STATUSESstreaming, complete, failed
Message feedbackMESSAGE_FEEDBACKnone, helpful, corrected, dismissed
Interrupt kindINTERRUPT_KINDSplan_approval, write_approval, consent, question, batch_approval
Interrupt statusINTERRUPT_STATUSESpending, resolved, expired, cancelled
Tool call statusTOOL_CALL_STATUSESproposed, approved, declined, running, succeeded, failed, policy_denied
Artifact kindARTIFACT_KINDSplan, comparison_table, finding_set, hypothesis_set, protocol_draft, report_draft, deviation_table, sop_diff, milestone_view, summary, persona_brief (R4 adds skill_result, run_id NULL allowed; 11 -> 12)
Notification kindNOTIFICATION_KINDSapproval_requested, needs_input, run_finished, run_failed, sop_changed, batch_completed, connector_reauth, handoff_received, digest, twin_paused, mention, decision_reminder
Run mode (users.settings.console_run_mode)RUN_MODESapprove_each_write, auto_reads_gated_writes, keep_planning
Stream event kind (GET .../threads/{thread_id}/stream)STREAM_EVENT_KINDSstate, text_delta, citation, tool_call_proposed, tool_call_result, interrupt, artifact_delta, message_complete, run_finished, keepalive

Documents and Evidence

EnumerationConstantValues
Assertion kindASSERTION_KINDSobservation, interpretation, assumption, suggestion
OriginORIGINShuman, agent
Licence code (documents, chunks, sources)LICENCE_CODEScc0, cc_by, cc_by_sa, cc_by_nd, cc_by_nc, publisher_copyright, customer_internal, unknown
Document statusDOCUMENT_STATUSESpending, ready, error, archived
Question statusQUESTION_STATUSESopen, answered, parked
Source kindSOURCE_KINDSpublication, eln_entry, protocol, report, dataset, sop_document, registry_record, preprint, other
Source statusSOURCE_STATUSESpending, ready, error, archived
Source link targetSOURCE_LINK_TARGETSquestion, finding, hypothesis
Hypothesis statusHYPOTHESIS_STATUSESproposed, under_review, accepted, rejected, retired
Hypothesis decisionHYPOTHESIS_DECISIONSaccepted, rejected
Gap statusGAP_STATUSESopen, addressed, dismissed
Evidence agent run kindEVIDENCE_AGENT_RUN_KINDSevidence_compare, evidence_gaps, evidence_hypotheses

Plans

EnumerationConstantValues
Research plan statusPLAN_STATUSESdraft, review, approved, archived
Protocol statusPROTOCOL_STATUSESdraft, review, approved, superseded, archived
Protocol formatPROTOCOL_FORMATSmarkdown, usdm_json
Experiment statusEXPERIMENT_STATUSESplanned, running, completed, aborted
Report statusREPORT_STATUSESdraft, review, approved, archived
Tool invocation statusTOOL_INVOCATION_STATUSESqueued, running, succeeded, failed
Tool invocation modeTOOL_INVOCATION_MODESsync, async
Plans agent run kindPLANS_AGENT_RUN_KINDSplans_draft_protocol, plans_draft_report

Review

EnumerationConstantValues
SOP status (local SOPs)SOP_STATUSESdraft, review, approved, superseded, archived
SOP source kindSOP_SOURCE_KINDSlocal, connector
SOP version lifecycle state (mapped per connection)SOP_LIFECYCLE_STATESdraft, in_review, effective, superseded, obsolete, unmapped
Requirement set statusREQUIREMENTS_STATUSESnone, proposed, accepted, rejected
Requirement modalityREQUIREMENT_MODALITIESMUST, SHOULD, MAY
Check target typeCHECK_TARGET_TYPESprotocol, experiment, report, eln_entry
Check statusCHECK_STATUSESqueued, running, succeeded, partial, failed
Check binding ruleBINDING_RULESauto, manual
Review finding kindREVIEW_FINDING_KINDSmissing_metadata, unsupported_conclusion, inconsistent_entry, undocumented_deviation, other
Review severityREVIEW_SEVERITIESinfo, minor, major
Review finding decisionREVIEW_DECISIONSopen, accepted, dismissed, resolved
Review decision choice (request body)REVIEW_DECISION_CHOICESaccepted, dismissed, resolved
Deviation statusDEVIATION_STATUSESsuspected, confirmed, not_a_deviation, closed
Proposed deviation classification (agent-proposed, person-confirmed)DEVIATION_CLASSIFICATIONSminor, major, critical

Progress

EnumerationConstantValues
Milestone statusMILESTONE_STATUSESplanned, in_progress, blocked, completed, cancelled
Dependency kindDEPENDENCY_KINDSblocks, informs
Open item statusOPEN_ITEM_STATUSESopen, answered, closed
Approval target typeAPPROVAL_TARGET_TYPESmilestone, plan, protocol, report, hypothesis (R5 adds stage_gate; moved from R4 by ADR 0032)
Approval statusAPPROVAL_STATUSESrequested, approved, rejected, withdrawn
Approval decisionAPPROVAL_DECISIONSapproved, rejected

Persona twins (R3)

EnumerationConstantValues
Twin statusTWIN_STATUSESactive, paused, retired
Why a twin is pausedTWIN_PAUSED_REASONSuser, manage, budget, high_decline_rate, permission_lost, membership_lost, user_inactive, migrated
Trigger kindTWIN_TRIGGER_KINDSschedule, event, handoff, mention
Trigger priorityTWIN_TRIGGER_PRIORITIESnow, digest
Audit actions a trigger may name (closed)TRIGGERABLE_ACTIONSconnector_object.update, hypothesis.decision, sop_version.update, milestone.update, handoff.accept, experiment.update, approval.create
Audit actions that pause a twinPAUSE_ACTIONSrole_assignment.delete, user.deactivate
Inbox item kindINBOX_ITEM_KINDSdecision, signature, question, handoff, mention, information (R5 adds stage; moved from R4 by ADR 0032)
Inbox item statusINBOX_ITEM_STATUSESopen, snoozed, done, dismissed, expired
Inbox feedbackINBOX_FEEDBACKnone, helpful, not_useful
Hand-off kindHANDOFF_KINDSreview, data, decision, information
Hand-off statusHANDOFF_STATUSESsent, accepted, declined, done, withdrawn
Delegation statusDELEGATION_STATUSESactive, expired, revoked

Phase 4: workbench, memory, pins, assets and skills (R4, designed)

Every value below is fixed in PRODUCT-CONTRACT.md section 12 and mirrored in docs/lib/content.ts; none exists in code until the R4 migration 0006_workbench lands, and every count is an R4 target re-derived on release: tables 60 -> 63 (evidence_pins, document_assets, memory_records; EXPECTED_TABLE_COUNT = 63), routes 189 -> 206 (EXPECTED_ROUTE_COUNT = 206), harness keys 20, workbench roles 15, artifact kinds 12; run kinds stay 13, interrupt kinds 5, notification kinds 12, USER_SETTING_* 7 -> 8 (USER_SETTING_WORKBENCH_ROLE), permissions 87 and persona version 3 unchanged.

EnumerationConstantValues
Workbench role key (users.settings.workbench_role[program_id], agent_runs.harness_key)WORKBENCH_ROLE_KEYSmedicinal_chemist, biologist_pharmacologist, dmpk_tox_scientist, cmc_process_scientist, clinical_pharmacologist, regulatory_strategist, medical_writer, qa_reviewer, program_manager, analytical_qc_scientist, formulation_scientist, computational_biologist, biostatistician, ip_analyst, portfolio_head
Neutral persona harness key (the other five of the 20 HARNESS_KEYS)NEUTRAL_HARNESS_KEYSscientist, quality_reviewer, program_lead, program_owner, manufacturing_specialist
Memory tier (memory_records.tier)MEMORY_TIERSindividual, person, role
Memory kindMEMORY_KINDSepisodic, preference, vocabulary, rubric_adjustment, lesson, rubric_version (tier 2 admits preference, vocabulary, rubric_adjustment only)
Memory statusMEMORY_STATUSESproposed, kept, promotion_requested, promoted, forgotten
Memory originMEMORY_ORIGINShuman, agent
Pin target type (evidence_pins.target_type)PIN_TARGET_TYPESchunk, asset, record
Asset kind (document_assets.kind)ASSET_KINDSfigure, table, page, supplement, attachment, rendition, dataset
Asset statusASSET_STATUSESpending, mirrored, caption_only, failed
Document integrity status (documents.integrity_status)INTEGRITY_STATUSESok, corrected, retracted
Licence statement class (chip_class on pins and assets; one enum, two names)LICENCE_STATEMENT_CLASSESpublic_domain, cc_by, cc_by_sa, acknowledgement, internal, third_party_suspected, locator, no_derivatives (eight; the last added 2026-09-16 for cc_by_nd)
Provider status on the role home (SourceStatusOut.status)SOURCE_CONNECTION_STATUSESconnected, not_connected, degraded, terms_changed (R5; the terms probe is designed and the value cannot occur in R4, contract 12.4)
Skill classSKILL_CLASSESA (numeric and checklist, server-side read tool), B (library, worker job)
Skill reference status (references.json)SKILL_REFERENCE_STATUSESverified, to_verify
Rubric level (rendered as words; no verdict word exists)RUBRIC_LEVELSno_evidence, weak, moderate, strong
Tool-call denialcheck_allowedunknown_tool, policy_denied, plan_violation (existing), harness_denied (R4)

Audit actions added in R4 (registry style <target>.<verb>): workbench_role.set, workbench_role.assign, workbench_role.default_applied, pin.create, pin.delete, pin.share, memory.keep, memory.forget, memory.oversight_read, memory.promote, document.gather, document.blob_read, document.third_party_flag, asset.capture, skill_run.start, agent_run.harness_denied; none joins TRIGGERABLE_ACTIONS or PAUSE_ACTIONS. Worker jobs added: documents_gather, jats_normalise, assets_extract, assets_mirror, memory_expire, provider_probe, retraction_watch, skill_library_job. The asset statuses mirrored and caption_only and the memory statuses kept, promotion_requested, promoted and forgotten have no tone in the pinned 61-value map and render neutral (recorded as a follow-up for the contract owner; the map grows only at R5).

Transition rule for plans, protocols, reports and local SOPs: POST .../transition accepts any value of the resource’s status enum other than approved (422 Invalid transition otherwise, 409 Conflict when the row already has that status); approved is set only by the /approve route, which refuses rows that are already approved, archived or superseded. Protocols and reports that carry a signature refuse every further update with 409 record_signed: a change is a new version with supersedes_id. The diagrams below show the intended path through each lifecycle.

Thread

open archived

Visibility is a second axis: private by default, program only after the owner’s explicit Share with program action. Promote, approve and export never change it.

Message

streaming complete failed

Agent run

queued running awaiting_input succeeded failed cancelled

Interrupt

pending resolved expired cancelled

A detached interrupt (run_interrupts.detached = true, R3) never changes its run’s status: the twin cycle files it and ends succeeded, approval executes the write server-side, and expiry writes nothing (“Expired, nothing written”). Interrupts on a twin run are resolvable only by the bound person or, for write approvals, an active delegate holding the write’s permission (403 bound_user_only otherwise).

Tool call

proposed approved declined running succeeded failed policy_denied

Read tools skip the approval step: they start as running when the run mode allows automatic reads. A proposal filed by a twin also carries basis_hash; when the linked record changed since the proposal the approval is refused with 409 stale_proposal, the row stays proposed and the card reads “Changed since proposed”.

Twin (R3)

active paused retired

One active twin per person and program (409 twin_active_exists). “Paused. Nothing runs until you resume.”

Inbox item (R3)

open snoozed done dismissed expired

An item is a pointer, never a copy: it closes when its source resolves and carries delegated_from_user_id when it was routed. Items past due_at raise one decision_reminder per day to holders of program.twins.read.

Hand-off (R3)

sent accepted declined done withdrawn

There is no proposed state: the row exists only after the sending person approved. A duplicate of the same kind to the same persona on the same record is refused while one is sent or accepted (409 handoff_exists).

Delegation (R3)

active expired revoked

Signature and stage items are never routed by delegation; the audit row cannot carry both a delegation and a signature. Twins do not follow the delegate.

Document

pending ready error archived

Requirement set (SOP version)

none proposed accepted rejected

SOP version lifecycle state

draft in_review effective superseded obsolete unmapped

States are read from the QMS and mapped per connection, never hard-coded. Only effective versions bind checks; unmapped versions are ineligible and appear in the connection’s health. superseded_at comes from the source or from the successor’s effective_at.

Agent version

candidate active retired

Program

active paused completed archived

Programs are archived, never deleted: audit and signature rows reference them with ON DELETE NO ACTION.

Source

pending ready error archived

Hypothesis

proposed under_review accepted rejected retired

Plan

draft review approved archived

Protocol

draft review approved superseded archived

Experiment

planned running completed aborted

Report

draft review approved archived

Check

queued running succeeded partial failed

A check never changes its binding: a different (sop_version_id, requirements_hash, check_logic_version) triple creates a new check with supersedes_check_id.

Review finding decision

open accepted dismissed resolved

Deviation

suspected confirmed not_a_deviation closed

Milestone

planned in_progress blocked completed cancelled

Approval

requested approved rejected withdrawn

Sync run

queued running succeeded partial failed skipped

Connection

pending connected error disabled

Tone map

One function, mirrored in web/lib/status.ts (toneFor, TONE_STATUS_COUNT = 61) and docs/lib/content.ts (TONE_STATUS_COUNT = 61). Unknown values are neutral, so nothing renders without a tone. Release words use info for available and preview and neutral for the rest. Phase 2 grew the map from 40 to 56: pass gained effective and complete; review gained awaiting_input, interrupted_input_required, in_review, candidate and enqueued; fail gained policy_denied; info gained streaming; neutral gained declined, obsolete, expired, gate_expired, ignored, none and archived_pending_purge. Phase 3 R3 grows it from 56 to 61: pass gains enabled (a duty or trigger), review gains sent (a hand-off waiting for its addressee), neutral gains done, snoozed and revoked. A lint on both sides asserts that every value of every *_STATUSES enumeration rendered as a chip has a tone; the R3 enumerations TWIN_STATUSES, INBOX_ITEM_STATUSES, HANDOFF_STATUSES and DELEGATION_STATUSES are covered in full. R4 leaves the map at 61 (TONE_STATUS_COUNT = 61, contract 12.7); R5 adds reviewed (pass, 62) with the stage gates (ADR 0032).

ToneCountStatuses
pass12connected, succeeded, approved, accepted, completed, ready, resolved, answered, active, effective, complete, enabled
review16pending, queued, draft, review, proposed, under_review, requested, suspected, planned, open, awaiting_input, interrupted_input_required, in_review, candidate, enqueued, sent
fail7error, failed, rejected, blocked, confirmed, aborted, policy_denied
info4running, in_progress, partial, streaming
neutral22disabled, skipped, archived, retired, dismissed, parked, cancelled, withdrawn, superseded, not_a_deviation, closed, paused, declined, obsolete, expired, gate_expired, ignored, none, archived_pending_purge, done, snoozed, revoked

interrupted_input_required is the agent container’s job state while a gate waits; the API stores the run as awaiting_input and the composer prints “Paused, waiting for a decision”. archived_pending_purge is the label the web app shows for a customer_internal document that is archived and inside its hold period. The gap status addressed and the SOP lifecycle state unmapped are not in the map and render neutral.

Source: api/app/db/models/_enums.py, api/app/db/models/_agentic.py, api/app/db/models/twin.py, api/app/db/models/inbox.py, api/app/db/models/handoff.py, api/app/db/models/delegation.py, api/app/db/models/org.py, api/app/db/models/rbac.py, api/app/db/models/connection.py, api/app/db/models/connectors.py, api/app/db/models/agent.py, api/app/db/models/agents.py, api/app/db/models/audit.py, api/app/db/models/conversation.py, api/app/db/models/documents.py, api/app/db/models/evidence.py, api/app/db/models/plans.py, api/app/db/models/review.py, api/app/db/models/progress.py, api/app/db/models/signatures.py, api/app/worker.py, web/lib/status.ts, web/lib/api/types.ts, docs/lib/content.ts (TONE_STATUS_COUNT = 61, R4_TARGETS, the phase-4 enumerations), PRODUCT-CONTRACT.md sections 10.4, 10.6, 11.4, 11.7, 12.6 and 12.7, decisions/0032-release-renumbering-stage-gates-to-r5.md