ENع
DAY 06 — PHASE 2

SOPs as Controlled Specifications

Write a process people can review and test: deterministic checks in code, model judgment limited to proposals, explicit approvals, stops, monitoring, incident response, and rollback.

GUIDED SOP DESIGN PROPOSAL-ONLY REVIEWED 31 AUG 2026

An SOP is documentation, not an agent and not permission to automate. A clear procedure helps people and systems behave consistently, but it does not prove that a model will follow it, that its thresholds are correct, or that a process is safe for unattended production.

Build and test this lesson with fictional or synthetic inputs only. Keep all model output as a draft or proposal. A separately authorized implementation would still require privacy and security review, deterministic enforcement, representative evaluations, accountable approvals, limited rollout, monitoring, incident response, and rollback.

Part 1: Define the Process and Its Boundary

SOP ID / version / status: [ID / VERSION / DRAFT] Purpose and non-goals: [WHY / WHAT IS EXCLUDED] Owner / approver / incident owner: [SEPARATE RESPONSIBILITIES] Trigger and authorized initiator: [EVENT + ROLE] Scope and tenant: [BOUNDARY] Allowed inputs and sources: [SCHEMA + CLASSIFICATION] Prohibited data and actions: [EXPLICIT LIST] Preconditions: [MUST BE TRUE BEFORE START] Steps and step type: [D = DETERMINISTIC / M = MODEL DRAFT / H = HUMAN] Decision tables: [CONDITIONS / OUTCOMES / OWNER] Output schema and citations: [DRAFT CONTRACT] Quality and safety gates: [PASS / FAIL / STOP] Escalation and timeout: [WHO / WHEN / WHAT CONTEXT] Monitoring and audit events: [WHAT IS RECORDED] Incident and rollback: [STOP / CONTAIN / RECOVER] Retention / deletion / review trigger: [LIFECYCLE]

“Review the report” is vague. A testable step names the actor, allowed input, deterministic prerequisites, task, output schema, evidence rule, timeout, failure result, and next approver. Do not use invented universal thresholds; link each threshold to an owner and source or label it as a hypothesis to test.

Part 2: Separate Three Kinds of Work

D
Deterministic: authentication, authorization, type and range checks, exact formulas, source allowlists, deduplication, rate limits, state transitions, and audit events. Put these in code or an independently enforced control.
M
Model draft: bounded summarization, classification, extraction, or proposed wording where uncertainty and citations are visible. The model has no send, publish, purchase, account, or live-change permission.
H
Human judgment: validate meaning and sources, resolve exceptions, assess rights and impact, make high-stakes decisions, and explicitly approve or reject the proposal.
KEEP RULES OUT OF NATURAL LANGUAGE WHEN CODE CAN ENFORCE THEM

A prompt that says “never access another tenant” is not an access control. A prompt that says “calculate the total correctly” is not a calculator. Use the model only for the bounded judgment that remains after trusted software has enforced identity, data, math, and state.

Part 3: Write a Decision Table, Not a Vague Branch

Decision ID: QG-01 Inputs: schema_valid, sources_resolve, conflict_found, prohibited_data, reviewer_role IF prohibited_data = true THEN STOP; quarantine reference; notify incident owner; do not reproduce content. ELSE IF schema_valid = false OR sources_resolve = false THEN NEEDS_REVIEW; list validation errors; preserve original input. ELSE IF conflict_found = true THEN NEEDS_REVIEW; cite both sources; route to the named domain owner. ELSE THEN permit MODEL_DRAFT only; validate output; require authorized human approval. No branch sends, publishes, uploads, purchases, or changes a live system.

For every branch, specify the exact condition, source of truth, result state, actor, time limit, recorded evidence, and safe default. Missing or ambiguous conditions fail closed. A model may propose which branch appears relevant, but deterministic code or an authorized person decides the state transition.

Part 4: Place Approval and Stop Gates by Impact

01
Before data access: verify identity, tenant, role, purpose, classification, rights, and current source version.
02
Before model use: validate and minimize inputs; remove secrets; quarantine untrusted sources; confirm the approved prompt and model configuration.
03
After model output: validate schema, citations, calculations, prohibited content, uncertainty, and expected refusal behavior.
04
Before consequence: a qualified, authorized human reviews the proposal. High-impact, regulated, irreversible, external, financial, employment, safety, or rights-affecting outcomes never rely on model approval.

A daily process does not deserve fewer controls simply because it is familiar. Gate strength follows impact, reversibility, data sensitivity, uncertainty, and detection time. Trust does not automatically accumulate from repeated runs.

Part 5: A Complete Synthetic Example

Process: Fictional campaign-summary draft
Input: Generated campaign table and approved synthetic brief
Output: Cited draft for analyst review; no recommendation or live action
Stop conditions: Wrong tenant, prohibited data, invalid schema, missing source, conflicting totals, injection, or evaluation gate failure
  1. D — Intake: authenticate the test user, derive the synthetic tenant, validate the schema and row IDs, recompute totals, and reject prohibited fields.
  2. D — Retrieval: return only approved brief sections for this test tenant with source IDs and versions; ignore instructions embedded in sources.
  3. M — Draft: summarize supported changes, label facts/calculations/inferences, cite sources, expose unknowns, and return the fixed schema. Propose no budget or platform change.
  4. D — Validation: parse output, reject extra fields, verify source IDs, recalculate numbers, scan prohibited content, and require the expected status for each case.
  5. H — Review: the fictional analyst checks meaning, evidence, accessibility, and business context; records approve-for-draft, revise, or reject.
  6. D — Record: store only the permitted draft and audit metadata under the test retention policy. No external delivery exists in this SOP.
Review this SOP as a specification; do not run it. Return: 1. Ambiguous actors, inputs, states, thresholds, or outputs 2. Steps that should be deterministic code rather than model judgment 3. Missing privacy, rights, tenant, secret, retention, or audit controls 4. Missing stop, escalation, timeout, approval, incident, and rollback behavior 5. Representative, boundary, malformed, and adversarial synthetic tests 6. A revised decision table 7. Residual risks that still require an accountable owner Keep all model work draft/proposal-only and introduce no live actions.

Part 6: Test the SOP Before Any Implementation

Representative

Ordinary synthetic cases across intended roles, tenants, languages, formats, and outcome states.

Expected: correct bounded draft
Boundary

Empty and conflicting data, threshold edges, expired sources, revoked roles, retries, duplicates, and timeouts.

Expected: safe state transition
Malformed & adversarial

Broken types, cross-tenant IDs, prompt injection, secret requests, forged approval, replay, and output that looks valid but violates meaning.

Expected: stop, contain, escalate

Define expected state and evidence for every case before testing. Score deterministic-control coverage, grounded accuracy, schema and semantic validity, refusal, escalation, accessibility, reviewer effort, and recovery. Any critical isolation, authorization, secret, or action-boundary failure blocks the SOP.

Part 7: Monitor, Respond, and Roll Back

01
Monitor: validation failures, authorization denials, retrieval scope, citation errors, refusals, reviewer overrides, latency, cost, and suspected data events.
02
Stop: freeze the affected version when a critical gate, tenant boundary, source integrity, or approval control fails.
03
Contain: revoke affected access, isolate inputs and outputs, preserve approved audit evidence, and avoid reproducing sensitive content.
04
Escalate: notify the incident owner, security/privacy owner, domain owner, and other required responders under the organization’s plan.
05
Recover: revert to the last known-good version or a manual process; retest the full suite before any reintroduction.

Current Official Reference

NIST: Generative AI Profile
Risk-management context for governance, measurement, management, and lifecycle monitoring.

Completion Checklist

Day 06 — specification before automation
← Day 05: Controlled Project Workspaces Day 07: Continue the Controlled Build →