Skip to main content
Liorry Herisnor
Status: Live internal toolProduct Delivery2025 — present

Using AI to Improve Product Development

The development process behind the other case studies — written requirements, scoped tasks, AI coding tools, automated pre-release checks and human approval on every production change.

At a glance

This workflow helps move work from initial requirements through tested production delivery. It is what lets one person own the platform, the infrastructure, the data pipelines and the agent systems at the same time: I define the requirement, the acceptance criteria and the test approach, then use AI-assisted development tools to accelerate the implementation, with automated checks doing the verification that AI is unreliable at.

  • 50% faster

    Development cycles

    Improvement in time from written requirement to verified production change under this workflow.

    Source: Self-reported by Liorry Herisnor.

  • Always human-approved

    Production mutation

    No model applies a change to a production system. Diagnosis is read-only until a person approves the action.

    Source: Enforced by the agent governance layer and by the commit and deploy gates.

  • Zero LLM calls

    Commit gates

    Formatting, linting, type checking, secret scanning and schema validation run deterministically on every commit — no model in the loop.

    Source: Git hook configuration used across repositories.

Status
Status: Live internal tool
Category
Product Delivery
Dates
2025 — present
My role
Author and owner of the workflow
Target users
Myself, across every project in this portfolio, Contributors working in the same repositories, AI assistants operating under the same rules
Technology
Claude and Claude Code, Repository operating manuals, Context packs and task cards, Automated pre-commit checks, Knowledge retrieval, Model routing

What I owned

  • Product vision
  • Requirements
  • Architecture decisions
  • Prioritization
  • Delivery coordination
  • Testing
  • Release planning

Areas this project actually involved. Anything not listed, I did not own.

Who and what supported delivery

AI coding assistants
The assistants this workflow governs — implementation, architecture review and pre-push diff review, always under a context pack, a task card and a budget.
AI agents
Diagnostic agents operating read-only, with any production action requiring human confirmation.
Contractors
Contributors working in the same repositories under the same operating manuals and the same commit gates.

The workflow is written so a human, a contractor and an AI assistant all inherit the same rules from the same documents.

Related artifacts

The problem

Using AI to write code is easy. Using it to deliver production systems responsibly, repeatedly, across several large codebases, is a different problem with a different failure mode.

The assistant does not know what the system is. Given a large repository it infers structure from names and directory layout. In our codebases that inference is actively wrong: several components share names, and a substantial subtree does not run at all. The result is not gibberish — it is a confident, well-argued change to the wrong component.

Context is expensive and mostly wasted. Letting an assistant explore freely burns a large token budget rediscovering things that are already written down, then runs out of room for the actual task.

Every task gets the same model. Extracting a field from a struct and designing a recovery contract are not the same problem, but they were routed to the same model at the same cost. Overpaying on trivial work and underpowering hard work, simultaneously.

Review quality is inconsistent when I am the only reviewer. Reviewing my own work — including work an assistant produced under my direction — misses the same class of thing every time, because it is my blind spot doing the reviewing.

AI in the commit path is slow and non-deterministic. Calling a model on every commit makes commits slow, expensive and variable. The same commit can pass and fail on different days, which destroys trust in the gate.

The dangerous failure is a confident wrong change. Not a syntax error — those are caught immediately. A plausible change that violates an invariant nobody wrote down.

Previous workflow

Before: AI assistance without a method

Everything here works for a small codebase. None of it survives contact with a large one.

  1. Human action

    Describe the task in a chat window

    • Problem: Requirement stated conversationally, not written down
    • Problem: No acceptance criteria before work started
  2. AI / LLM

    Assistant explores the repository

    • Problem: Large token spend rediscovering documented facts
    • Problem: Architecture inferred from names, and names collide here
    • Problem: Ran out of context before the actual task
  3. AI / LLM

    Assistant proposes a change

    • Problem: Plausible changes to the wrong component
    • Problem: Invariants violated because they were never stated
    • Problem: Same model for trivial and architectural work
  4. Human action

    I review it

    • Problem: Reviewing my own direction — consistent blind spots
    • Problem: Contract violations skimmed past
    • Problem: No second perspective available
  5. Automated software

    Commit and push

    • Problem: Inconsistent formatting and lint discipline
    • Problem: No secret scan before push
    • Problem: Content schema errors found at build, not at commit
  6. Human action

    Deploy and hope

    Decision point: Was that safe?

    • Problem: Verification depended on remembering to do it
    • Problem: No standard post-deploy check
  • Human action
  • Automated software
  • AI / LLM

Goals and non-goals

Goals

  1. An assistant starts from written architectural truth rather than inference.
  2. Context is assembled deliberately, not discovered expensively.
  3. Model selection matches the task class, in capability and in cost.
  4. Deterministic checks run on every commit with no model involved.
  5. AI review adds a second perspective before push, where it is cheap.
  6. No production mutation happens without human approval.
  7. Diagnosis is read-only until an action is explicitly approved.

Non-goals

  • No AI in the commit gate. Deliberate. Gates must be fast and deterministic.
  • No autonomous deployment. Ever.
  • Not a replacement for understanding the system. The workflow makes me faster at work I could do; it does not let me ship what I do not understand.
  • Not model-vendor-specific. The routing tiers are roles, not product names.

My role

I wrote this workflow and I am its primary user. It is the reason the other case studies in this portfolio exist at the scale they do.

  • Authored the repository operating manuals — the architectural truth, the invariants with their evidence, the commands, and the definition of done.
  • Designed the context strategy — context packs, generated repository maps and task cards, replacing free exploration.
  • Set the model routing policy — which class of task gets which tier, and which tasks get no model at all.
  • Built the deterministic gate set — formatting, linting, type checking, secret scanning and content-schema validation, all without an LLM call.
  • Defined the approval boundary — read-only diagnosis, human approval for mutation, audit trail throughout.
  • Ran it across every project here — platform, delivery engine, data pipelines, agent governance and this portfolio site.
  • Revised it from failures — most rules here exist because something went wrong without them.

Product solution

The operating manual is the foundation. Each repository carries a document that states what the system is, which architectural claims are true today, the invariants that must not break with a pointer to the evidence for each, the build and validation commands, and the definition of done. An assistant reads this first, every time. It is also what a new human contributor reads first — the two audiences want the same document.

Context packs replace exploration. Rather than letting an assistant search a large repository, the relevant material is assembled: the operating manual, a generated map of the relevant subtree, the specific files in scope, and the task card. Exploration beyond that is limited and deliberate.

Task cards make the unit small. A task card carries the goal, the acceptance criteria, the files in scope, the invariants that apply, and the sensitivity level of the data involved. Small enough to fit in context with room to think.

Model routing by task class. Deterministic facts get no model — a query, a grep or a script answers better and for free. Extraction and summarization go to an inexpensive tier. Architecture and security review go to a strong tier. Production incidents get the best available reasoning, because that is where being wrong is most expensive. Fallbacks exist for provider trouble, and spend is tracked.

Deterministic gates at commit. Formatting, linting, type checking, secret scanning and content-schema validation run on every commit. Fast, repeatable, no model, no network.

AI review before push. Once the deterministic gates pass, the diff goes to a model for review against the repository's invariants. This is where a second perspective is cheap and I am at my weakest — reviewing my own direction.

Human approval for anything that mutates production. Diagnosis is read-only. An action requires a person. Enforced structurally by the agent governance layer for automated agents, and by process for interactive work.

Workflow

Requirement to verified production change

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

  1. Human action

    Write the requirement

    Goal, acceptance criteria and explicit non-goals. Written down before any assistant is involved.

  2. Automated software

    Assemble the context pack

    Operating manual, generated repository map, in-scope files, task card, sensitivity level.

  3. Data store

    Retrieve grounded background

    Hybrid search over curated internal documentation for the relevant invariants and prior decisions.

  4. Automated software

    Route the task

    Decision point: Deterministic fact — no model. Extraction or summary — inexpensive tier. Architecture or security — strong tier. Production incident — best available reasoning.

  5. AI / LLM

    Implementation under budget

    Bounded token spend against a task card with acceptance criteria and the applicable invariants stated.

  6. Human action

    I review the change

    Against the acceptance criteria and the invariants, before any gate runs.

  7. Approval gate

    Deterministic commit gates

    Format, lint, type check, secret scan, content-schema validation.

    Decision point: Any failure blocks the commit. No model involved, no network call, same result every time.

  8. AI / LLM

    AI review before push

    The diff reviewed against the repository's invariants — a second perspective where I have consistent blind spots.

  9. Approval gate

    Human approval to deploy

    Decision point: No automated deployment. A person decides, always.

  10. Automated software

    Deploy with a rollback path

    Behavior changes ship behind flags that default to off, so deploying and changing behavior stay separate events.

  11. Automated software

    Post-deployment verification

    Smoke checks and health verification against the documented expected state.

  12. Monitoring / feedback

    Observe and feed back

    An incident becomes an invariant, a check or a runbook — not just a fix.

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

Architecture

The workflow as a system

Written artifacts, routing policy, gates and approval points. The tooling is replaceable; the structure is the product.

Written truth

Read first by both humans and assistants.

  • Repository operating manual

    Data store

    What the system is, which architectural claims hold today, and the definition of done.

  • Invariants with evidence

    Data store

    Rules that must not break, each pointing at the code or document that proves it.

  • Code map

    Data store

    Which tree is authoritative, which names collide, and which subtrees do not run.

  • Runbooks and failure modes

    Data store

    How the system actually breaks, including the failures that are silent.

Context assembly

  • Generated repository map

    Automated

    Structural map produced from the code rather than described by hand.

  • Task card

    Automated

    Goal, acceptance criteria, files in scope, applicable invariants, sensitivity level.

  • Knowledge retrieval

    Data store

    Hybrid search over curated documentation for prior decisions and applicable rules.

  • Sensitivity classification

    Approval gate

    Determines what may appear in a prompt at all. Secrets and production data never do.

Model routing

  • No model

    Automated

    Deterministic facts — a query, a grep or a script. Faster, free and exactly correct.

  • Inexpensive tier

    AI / LLM

    Extraction, summarization, mechanical transformation.

  • Strong tier

    AI / LLM

    Architecture, security review, non-obvious design work.

  • Premium reasoning

    AI / LLM

    Production incidents, where being wrong is most expensive.

  • Cost and rate tracking

    Monitoring

    Spend tracked per task class; fallbacks defined for provider trouble.

Gates

  • Deterministic commit gates

    Approval gate

    Format, lint, type check, secret scan, content-schema validation. No LLM call.

  • Pre-push AI review

    AI / LLM

    Diff reviewed against the repository's invariants.

  • Human deploy approval

    Approval gate

    No automated deployment under any circumstances.

  • Post-deploy verification

    Monitoring

    Smoke checks against a documented expected state.

Diagram is sanitized for publication: it shows responsibilities and data flow, not hostnames, addresses or credentials.

Where AI is used — and where it is not

AI / LLM responsibilities

  • Implementation against a task card with stated acceptance criteria.
  • Architecture review — challenging a design before it is built.
  • Pre-push diff review against the repository's invariants.
  • Incident reasoning and hypothesis generation, read-only.
  • Documentation synthesis from code, and drift detection.
  • Summarizing prior decisions retrieved from the knowledge base.

Deterministic responsibilities

  • Every commit gate: format, lint, type check, secret scan, schema validation.
  • Test execution and the pass or fail result.
  • The repository map, generated from code.
  • Sensitivity classification of what may enter a prompt.
  • Deployment, which additionally requires human approval.
  • Post-deploy health verification.
  • Cost and rate tracking.
  • Any factual question a query or script can answer exactly.

Decisions and tradeoffs

No LLM call in the commit gate

Options considered
AI review on every commit · AI review on large commits only · Deterministic gates only, AI review before push
Chosen
Deterministic gates at commit; AI review at push
Reason
A gate must be fast and give the same answer every time. A model in the commit path makes commits slow, costly and non-deterministic — the same commit can pass and fail on different days, which destroys trust in the gate itself.
Cost and risk accepted
Problems only a model would catch survive until the push review.
Result
Commits stayed fast and trustworthy. AI review sits where a few minutes is acceptable.

Curated context packs instead of free repository exploration

Options considered
Let the assistant explore · Automatically generate full context · Curated pack with limited exploration
Chosen
Curated pack: operating manual, generated map, in-scope files, task card
Reason
Free exploration burned most of the budget rediscovering documented facts, then reached confident wrong conclusions from colliding names.
Cost and risk accepted
Curation is ongoing work, and a pack that misses something relevant produces a change that misses it too.
Result
Materially better output at lower cost. The failure mode moved from confident-wrong to visibly-incomplete, which is far easier to catch.

Route by task class rather than using one model

Options considered
One strong model for everything · Cheapest model with escalation · Explicit routing by task class
Chosen
Explicit routing, including a no-model tier
Reason
Extraction and architecture are different problems. Using one model for both means overpaying on one and underpowering the other at the same time.
Cost and risk accepted
Routing rules to maintain, and occasional mis-routing that needs a retry at a different tier.
Result
Cost fell and quality rose on the tasks that matter. The no-model tier turned out to be the most valuable rule.

Invariants written with evidence, not just stated

Options considered
Document architecture narratively · List rules · List rules, each with a pointer to its proof
Chosen
Rules with evidence pointers
Reason
A stated rule with no evidence rots into folklore, and nobody can tell whether it is still true. A rule with a pointer can be checked and, when it stops being true, noticed.
Cost and risk accepted
Every invariant needs evidence maintained alongside it.
Result
The single most useful artifact for onboarding both humans and assistants.

Human approval for every production mutation, without exception

Options considered
Approval for risky changes only · Approval above a change-size threshold · Approval always
Chosen
Approval always
Reason
'Risky' is an assessment made before the incident. A threshold-based rule requires judgment precisely when judgment is under pressure, and the assessment that fails is the one nobody questioned.
Cost and risk accepted
I am a bottleneck on every production change, including trivial ones.
Result
Accepted deliberately. This is the rule I am least willing to relax.

Challenges

Confident wrong changes were the real danger. An assistant produced a well-reasoned change to a component that does not run in production, because the directory looked authoritative. It passed review because the reasoning was sound. The code map exists because of that, and it is the artifact I would write first in any new repository.

Documentation drift makes the whole method degrade. The workflow rests on written truth. When the writing goes stale, assistants confidently reproduce stale architecture, and the confidence is unchanged. A documentation check that fails on the specific drift that has bitten us before was the answer — including commands that silently print nothing when run without elevated privileges, which reads as "no logs" rather than "wrong command".

Task cards were too large at first. Multi-part cards produced changes that were partly right, and reviewing a partly-right large change is harder than reviewing two small ones. Smaller cards with tighter acceptance criteria fixed it, at the cost of more decomposition work up front.

Model routing needs actual cost visibility. The initial routing rules were my guesses about which tier suited which task. Without tracked spend they stayed guesses. Tracking cost per task class turned the policy into something evidence can adjust.

I am the bottleneck, by design. Human approval on every production change means everything queues behind me. I have not solved this and I am not trying very hard to, because the alternative is relaxing the rule I trust most.

The 50% figure is self-reported. It comes from my own observation of requirement-to-verified-change time across these projects, not from an instrumented measurement system. It is labeled that way wherever it appears.

Testing and validation

Testing layers and their evidence
LayerWhat it coversEvidence
Acceptance criteriaEvery task card states what done means before implementation starts.Definition of done in each repository's operating manual.
Deterministic gatesFormat, lint, type check, secret scan, content-schema validation on every commit.Git hooks configured per repository; no LLM call.
Test-first bug fixesA failing test that reproduces the defect is written before the fix.Applied to every defect; the test is the acceptance criterion.
AI pre-push reviewDiff reviewed against the repository's invariants.Run before push, after deterministic gates pass.
Integration and end-to-endPer-project suites — package tests, browser automation, delivery simulators.Documented in each project's case study.
Human approvalEvery production mutation.Enforced structurally for automated agents, by process for interactive work.
Post-deploy verificationSmoke checks against a documented expected state.Per-project verification runbooks.
RollbackBehavior changes ship behind flags defaulting to off.Reverting behavior does not require reverting code.

Results

Before and after comparison for each measured outcome
MeasureBeforeAfterHow it is measured
Requirement to verified changeBaseline before this workflow.50% faster.Written requirement to verified production change, across the projects in this portfolio. Self-reported.
Assistant groundingArchitecture inferred from names, in codebases where names collide.Operating manual, invariants with evidence and a code map read first, every time.The same documents onboard human contributors.
Context costMost of the budget spent rediscovering documented facts.Curated packs: manual, generated map, in-scope files, task card.Exploration beyond the pack is limited and deliberate.
Model cost fitOne model for every task, regardless of difficulty.Four tiers including a no-model tier, routed by task class with tracked spend.The no-model tier removed cost from tasks a query answers exactly.
Commit gate reliabilityInconsistent formatting and lint discipline; no secret scan.Five deterministic checks on every commit, no LLM call, same result every time.Fast enough not to be worked around, which is why they hold.
Agent-assisted diagnostic volumeDiagnosis was manual and ad hoc.More than 53,000 recorded agent runs across three agents, spanning over 125,000 steps.Counted from the run and step tables. Read-only diagnosis; every production mutation still required a human.
Production change safetyDeploy and hope, with verification depending on memory.Human approval always, flags defaulting to off, documented post-deploy verification.No exceptions; the rule has no threshold to argue about.

The cycle-time figure is self-reported from my own observation across these projects, not from an instrumented measurement system. The structural changes below are verifiable from the repositories themselves.

Evidence

  • Repository operating manual

    Architectural truth, invariants with evidence, commands and definition of done.

    Placeholder — evidence pending sanitization review before publication.
  • Invariants document

    Rules that must not break, each with a pointer to its proof.

    Placeholder — evidence pending sanitization review before publication.
  • Deterministic commit gate output

    Format, lint, type check, secret scan and schema validation on a real commit.

    Placeholder — evidence pending sanitization review before publication.
  • Model routing policy

    Task classes mapped to tiers, including the no-model tier.

    Placeholder — evidence pending sanitization review before publication.

Lessons

What worked. Writing invariants with evidence. It is the cheapest artifact in the workflow and it does the most work — it onboards humans, grounds assistants, and gives the pre-push review something concrete to check against.

What failed. My first instinct was to put AI review in the commit gate, on the theory that earlier is better. It made commits slow and non-deterministic, and a gate that gives different answers on different days stops being a gate — people start working around it. Fast and deterministic beats thorough, at that position in the pipeline.

What changed. The no-model tier. Recognizing that a large share of what I was asking a model to do was a factual question a query answers exactly — faster, free and without the possibility of being wrong — changed both cost and accuracy.

What I would do differently. I would write the code map before the first task, not after the first confident wrong change. Every repository has a version of "which tree is real", and it is two pages that prevent hours of debugging the wrong component.

What this demonstrates about AI-product leadership. This workflow is an argument that the value of AI in delivery comes from the structure around it, not from the model. Written truth, assembled context, routing by task class, deterministic gates and human approval at the boundary. The model is replaceable; the structure is what makes the output trustworthy — and being able to say precisely where a model is not allowed to operate is what makes it defensible to anyone responsible for the system.

Next milestone

  • Mechanical invariant checks. Invariants are documented with evidence and enforced at review. Turning each into a check that fails a build removes the dependence on a reviewer noticing.
  • Instrumented cycle-time measurement, so the improvement figure comes from data rather than from my own observation.
  • Routing policy driven by tracked spend, replacing the initial guesses with evidence about which tier actually suits which task class.

Want the detail behind this?

I am happy to walk through the architecture, the decisions and what I would change.