Skip to main content
Liorry Herisnor
Runtime state: Running in productionProduct Delivery

PRD to Production

From a written requirement to a verified production change — context packs, task cards, deterministic commit gates, AI review before push, human approval to deploy.

Runtime state: The workflow I actually use. Its deterministic commit gates run on every commit in the repositories described here, including this one.

Business objective
Deliver production changes at speed without letting an assistant make a confident, well-argued change to the wrong thing.
Trigger
A requirement is written down with acceptance criteria and explicit non-goals.
Inputs
  • Written requirement with acceptance criteria and non-goals
  • The repository's operating manual and invariants
  • A generated map of the relevant subtree
  • Sensitivity classification of the data involved
Outputs
  • A reviewed, tested, deployed change
  • Post-deployment verification against a documented expected state
  • Updated documentation where architectural truth changed

The workflow

Requirement to verified production change

Two AI steps, four deterministic gates, a human at both ends.

  1. Human action

    Write the requirement

    Goal, acceptance criteria, explicit non-goals. Before any assistant is involved.

  2. Approval gate

    Sensitivity classification

    Decision point: What may appear in a prompt? Secrets and production data never do. Classified before context is assembled, not after.

  3. Automated software

    Assemble the context pack

    Operating manual, generated repository map, in-scope files, task card. Free exploration is limited and deliberate.

  4. Data store

    Retrieve prior decisions

    Hybrid search over curated documentation for applicable invariants and previous decisions.

  5. Automated software

    Route by task class

    Decision point: Deterministic fact — no model. Extraction — inexpensive tier. Architecture or security — strong tier. Incident — premium reasoning.

  6. AI / LLM

    Implement against the task card

    Bounded token spend, with acceptance criteria and applicable invariants stated in the card.

  7. Human action

    I review the change

    Against acceptance criteria and invariants, before any gate runs.

  8. Approval gate

    Deterministic commit gates

    Decision point: Format, lint, type check, secret scan, content-schema validation. Any failure blocks the commit. No model, no network, same answer every time.

  9. AI / LLM

    Pre-push review

    The diff reviewed against the repository's invariants — a second perspective where a single reviewer has consistent blind spots.

  10. Automated software

    Test suites

    Unit, integration and end-to-end as the project requires.

  11. Approval gate

    Human approval to deploy

    Decision point: No automated deployment, under any circumstances, at any change size.

  12. Automated software

    Deploy behind a flag

    Behavior changes default to off, so deploying and changing behavior stay separate events with separate reverse paths.

  13. Monitoring / feedback

    Post-deployment verification

    Smoke checks against a documented expected state.

  14. Human action

    Enable the flag deliberately

    Decision point: A separate decision from the deploy, made with the deploy already verified.

  • Human action
  • Automated software
  • AI / LLM
  • Data store
  • Approval gate
  • Monitoring / feedback

Decision points

  • What may enter a prompt? Sensitivity classification, before context assembly.
  • Which tier handles this task? Including the no-model tier, which is often correct.
  • Is the task card small enough? Multi-part cards produce partly-right changes, and a partly-right large change is harder to review than two small ones.
  • Do the gates pass? Deterministic; no judgment involved.
  • Deploy? Human.
  • Enable the flag? A separate human decision.

Responsibilities

AI / LLM

  • Implementation against a task card.
  • Architecture review before a design is built.
  • Pre-push diff review against invariants.
  • Documentation synthesis and drift detection.

Deterministic

  • All five commit gates.
  • Test execution and the pass or fail result.
  • The repository map, generated from code.
  • Sensitivity classification.
  • Deployment, which also requires human approval.
  • Post-deploy health verification.

Human approval points

  1. Writing the requirement. Nothing starts without it.
  2. Reviewing the change before the gates run.
  3. Approving the deploy. No threshold, no exception.
  4. Enabling the flag, separately from deploying.

Failure handling

FailureResponse
Change targets the wrong componentThe code map exists specifically for this; it states which tree is authoritative and which names collide.
Invariant violatedCaught at human review or pre-push review. The invariant document is what makes it checkable.
Commit gate failsCommit is blocked. Fast enough that fixing and retrying is cheaper than arguing.
Secret detectedCommit blocked. Non-negotiable and non-overridable.
Tests failNot deployable. A failing test is reported as failing, never explained away.
Deploy causes a problemDisable the flag. Behavior reverts without a code rollback.
Documentation driftsA documentation check fails on the drift patterns that have bitten us before.

Monitoring

Time from requirement to verified change, commit gate failure rate by gate, pre-push review catch rate, post-deploy verification results, and flag age. Flags that outlive their rollout are technical debt with a countdown.

More workflow designs

Back to the library