Blog
Saved0

Why source code is no longer the full record of an AI application

The diff was empty and the claims app still behaved differently. Why AI applications need three linked records (code, a published definition and a run record) and how to tie them together.

LinkedIn
On this page
  1. The diff was empty. The application had changed.
  2. Was source code ever the whole system?
  3. What can a repository prove, and what can't it?
  4. Three linked records, not one source of truth
  5. When does a visual workflow count as the definition?
  6. "Everything as code" helps, but doesn't finish the job
  7. An application version is a manifest, not a label
  8. Code review becomes behavior-change review
  9. Common anti-patterns
  10. Ten rules for a complete record of an AI application
  11. The result: authority with a boundary
  12. Frequently asked questions
  13. How Frozion keeps the definition and the record linked
  14. Sources
The short answer

Source code still proves how each capability works, but AI behavior also depends on prompts, model routes, policies, schemas, mappings, context and approvals that change outside the repository. Keep three linked records: code for capabilities, a published application definition for how they're assembled and governed, and a run record for what actually happened in each case.

The diff was empty. The application had changed.

An insurer uses an AI-assisted app to decide whether a low-value claim can be settled automatically or needs a specialist. A customer challenges a decision, and engineering is asked the usual question: what changed?

The repository shows nothing relevant. The same commit has been in production for six weeks. Tests and pipeline are green. The branch that sends claims to manual review is exactly where it was.

Yet the behavior changed. In those six weeks, a model alias moved to a newer provider release. A prompt fragment in a separate registry was revised. The search index was rebuilt from an updated claims manual. A feature definition changed how prior incidents count. A policy bundle raised the threshold for specialist review. A mapping started defaulting a missing field differently. One tenant moved to a different inference region.

None of it appeared in the diff. An engineer can show the line that calls the classifier and the branch that follows it. Nobody can show, from the repository, which model, prompt, evidence, feature values, policy revision, mapping and route governed this claim.

The problem isn't that code stopped mattering. It's that the team was using one artifact to answer a question that now spans several.

Was source code ever the whole system?

Not literally, but for deterministic apps the important behavior sat in code and nearby configuration. AI moves much of it into prompts, models, policies and context that change on their own schedules.

Production systems always depended on databases, infrastructure, secrets and operations. But for a deterministic app, the repository, the build and the database could explain most of what happened. Cloud-native practice already loosened that: declarative infrastructure separates desired state from live state, and build provenance separates the source revision from the artifact actually built.

AI widens the gap. An AI application's behavior depends on things that are versioned separately, deployed separately, resolved dynamically or created only at runtime:

  • model, provider release, route and fallback;
  • prompts, instructions, tool descriptions and output contracts;
  • search indexes, ranking, context rules and freshness;
  • feature definitions and the values on the day;
  • policy revisions, decision inputs and enforcement;
  • mappings, queries and schemas;
  • tenant, purpose, residency and delegated authority;
  • waits, approvals, timers, retries and events;
  • region, environment and endpoint;
  • the actual inputs, outputs, writes and evidence.

That's what the shift to deciding steps does. When a step chooses its path at runtime, the things that steer it (context, prompt, model, policy) become part of the application whether or not they live in the repo.

What can a repository prove, and what can't it?

A repository proves how each capability is implemented, reviewed and tested. It can't prove what was deployed, what resolved at runtime, what entered the context, what was approved or what changed in other systems.

A well-run repository establishes the algorithm, its review history, its tests, its declared dependencies, its types and its internal error handling. Those are foundational controls.

It doesn't establish which build was deployed, which model alias resolved, which policy was active, which prompt or mapping was used, which records went into the context, which identity reached the API, which proposal an approver saw, what happened after a timeout, or which external write committed.

Software supply-chain frameworks such as SLSA make the same point at build time: provenance exists because a source revision alone isn't the full history of an artifact. AI applications need that discipline at the application level.

What shapes behaviorWhat it can changeWhy code review misses it
Capability codeAlgorithms, connectors, calculationsUsually visible in code review
Workflow definitionOrder, branches, mappings, waits, retries, approvalsOften lives in an orchestration store
Models and promptsInterpretation, extraction, generation, tool choiceResolved through registries, aliases and routes
Schemas and mappingsField meaning, defaults, validationOften managed apart from code
Policy and authorityEligibility, conditions, scope, approval rulesUpdated and evaluated outside the repo
Context and featuresWhich evidence and facts are usedPoint-in-time and data-dependent
DeploymentRegion, endpoint, provider, flagsDesired and live state can differ
Run state and evidenceActual path, approvals, writesExists only when a case runs

Policy engines show it plainly. Policy and data bundles can update without redeploying the app, and decision logs record the revision used. The code stays the same while the rule and the outcome change.

Three linked records, not one source of truth

The usual reaction is to ask which artifact should become the single source of truth. That's the wrong goal. A repository shouldn't become a live event store. A run history shouldn't implement algorithms. A visual workflow shouldn't duplicate every line of custom code. A policy engine shouldn't own control flow.

The goal is an explicit authority model: each important claim has one authoritative owner, and the owners are linked. For an AI application, three records matter most.

RecordQuestion it answersWhat it holdsWhat it links to
Capability recordHow is this capability built?Source, tests, build inputs, artifact digestThe definitions that use it; build provenance
Application definitionWhat was approved and published?The workflow, contracts, mappings, policies, model routes, context rules, state and side-effect rulesCapability artifacts, schemas, policies, environments, publish approval
Run recordWhat happened in this case?Resolved versions, inputs, context, decisions, approvals, state changes, outputs, writesThe exact published definition and external confirmations
Three linked records: capability code, published application definition and run record, with arrows showing what each references
Code says what a capability can do. The definition says what the app may do. The run record says what it did.

The definition doesn't copy every external artifact into one giant file. It binds them by stable, versioned identity: code by digest, policy by revision, schema by ID and version, prompt by revision, model by approved deployment and region, mapping or query by version, context rules by version, plus retry, approval and evidence requirements. Where it's stored matters less than its properties: immutable once published, addressable, reviewable, testable and tied to every case it starts.

When does a visual workflow count as the definition?

Only when it's the thing that runs. A diagram engineers implement elsewhere drifts; a builder that generates opaque code and then stops being the source becomes a historical sketch.

Visual tools can shrink the distance between design, review and operation, showing steps, contracts, policies, approvals, identity and writes in a form many roles can read. But a visual builder isn't authoritative because it looks complete.

Two failure modes are common. In the first, the diagram is documentation and the real system lives elsewhere. In the second, the builder emits code and the generated code becomes the real application. Either way, what people review and what runs come apart.

The fix is fidelity: the visual view, the stored definition, the published version, any compiled form and the run evidence stay traceably connected. Custom code still has a place; it enters the workflow as a capability with a declared contract, artifact identity, authority requirements, effect class and evidence obligations. The workflow doesn't replace code. It stops code from being the only place behavior can hide.

"Everything as code" helps, but doesn't finish the job

Storing prompts, policies, schemas, workflows and deployment declarations in Git is often a good idea. GitOps adds declarative desired state, immutable history and continuous reconciliation. But "stored in Git" and "complete record" are different claims:

  1. Git holds declared state; the system has live state. They can differ.
  2. Git doesn't prove what was deployed. Build and publish provenance has to connect source, configuration, dependencies and output.
  3. Runtime inputs can't be committed. Retrieved records, feature values, approvals, model responses and external writes exist only during a run.
  4. Git versions text; it doesn't model relationships. The runtime still has to interpret the definition, enforce its contracts, hold durable state and emit evidence.

Everything-as-code can be part of the architecture. It can't stand in for it.

An application version is a manifest, not a label

Many teams can name a service version but not an application version. A label such as claims-app-4.12 is only useful if it resolves to everything that shaped behavior: the published workflow and its digest, code artifacts, schemas and mappings, policy revisions, prompts and model routes, context and search rules, feature definitions and taxonomy, review screens where human approval matters, region and provider constraints, and the evidence schema.

Not everything must be bundled. It must be resolvable and, where behavior depends on it, pinned. Some dependencies are dynamic on purpose: a query uses the latest eligible records; a policy must apply the rule in force when the case resumes; a router picks among approved deployments. Dynamic doesn't mean unrecorded. The definition states the resolution rule; the run record captures what actually resolved. For long-running cases this matters most: you need an explicit rule for what stays bound, what's re-evaluated and what change invalidates an earlier approval. (See versioning AI workflows.)

Code review becomes behavior-change review

A pull request is still the right gate for code. It's not enough for every change that alters behavior.

What changedExampleReview question
CodeNew calculation, connector or validatorDoes it still meet its contract?
Workflow, mapping or schemaNew branch, default or field mappingDoes meaning or reachable behavior change?
Model, prompt or routeProvider release, prompt edit, fallbackDoes the tested automation range still hold?
Policy or authorityNew revision, tenant rule, approval conditionAre the new decisions and enforcement understood?
Context or featuresIndex rebuild, new source, feature definitionWhich evidence can now influence outcomes?
DeploymentRegion, endpoint, runtimeDoes the same definition resolve differently?
Running casesMigration, resume rule, approval expiryCan paused cases continue safely?

This doesn't need a giant committee. It needs impact-aware routing: a schema change to application and data owners, a policy change to security and the domain, a model route change with evaluation evidence, a side-effect change to operations and finance. If the definition knows its dependencies, the platform can show the impact before anyone publishes. Testing the new version against recorded cases (see behavior replay) turns that review from opinion into evidence.

Common anti-patterns

Anti-patternWhy it failsWhat to do instead
"No code changed, so nothing changed"Prompts, models, policies and context movedReview every change that can alter behavior
One artifact as the source of truth for everythingIt ends up wrong about most thingsGive each claim one owner and link the owners
Diagram maintained beside the real systemIt drifts from what runsMake the reviewed definition the executed one
Generated code becomes the real appThe visual model turns into a sketchKeep the definition authoritative after publish
Release labels with no manifestCan't say what a version containedResolve every label to pinned dependencies
Dynamic aliases left unrecordedCan't reconstruct what ranRecord what each alias resolved to, per run
Paused cases with no version ruleApprovals silently apply to changed proposalsDefine what stays bound and what forces re-approval

Ten rules for a complete record of an AI application

  1. Name which artifact is authoritative for code, definition, deployment, business data and each run.
  2. Publish immutable application definitions; drafts can change, published versions can't.
  3. Pin or record every dependency that shapes behavior.
  4. Keep desired, deployed and realized state separate.
  5. Keep the visual view, stored definition, compiled form and evidence connected.
  6. Give paused cases explicit rules for resume, migration and re-approval.
  7. Record what every dynamic reference resolved to in each run.
  8. Review every behavior-bearing change by its impact, not just pull requests.
  9. Link trace IDs, decision IDs, operation IDs, approvals and external confirmations to one run.
  10. Keep secrets out of the definition, but keep the authority they carry visible.

The result: authority with a boundary

"Single source of truth" helps when it stops two systems owning the same fact. It misleads when it implies one repository can be authoritative for every fact in a distributed application. The better question is: which artifact is authoritative for this claim, and how is it linked to the rest?

For implementation, it's source code and its build provenance. For composition and governance, it's the published application definition. For business facts, it's the system of record. For what happened in one case, it's the run record. Source code hasn't lost its authority. Its authority now has a boundary, and the architecture's job is to keep the links across that boundary intact.


Frequently asked questions

If we store prompts and policies in Git, isn't that enough?

It's good practice for change history, but Git holds declared state, not live state. It doesn't prove what was deployed, what a model alias resolved to, which records entered context, or what an approver saw. Those facts only exist when a case runs.

What should an AI application version contain?

More than a label. It should resolve to the published workflow plus pinned or recorded versions of code artifacts, schemas, mappings, policies, prompts, model routes, context rules, features and deployment targets, so a release identifies everything that shapes behavior.

Which changes need review if the code didn't change?

Any change that can alter meaning, authority, state or consequence: a model route, prompt, policy revision, index rebuild, field mapping or default, deployment region or resume rule. Route each to the reviewers who understand its impact.

How does this work for agents we already run?

Route the agent's tool calls through a governed runtime over MCP or HTTPS. Each call then runs under a published workflow version, and the run record captures which policy, approval and confirmed outcome applied, even when the agent's own code is elsewhere.

With Frozion

How Frozion keeps the definition and the record linked

In Frozion, the workflow you assemble with Visual Orchestration is the definition that runs. Change is governed: a dependency view shows every workflow that uses a component, version compare shows exactly what changed, batch simulation runs the new version against recorded cases, and publishing takes approval, with rollback when needed. Deploys don't interrupt running cases. Provenance & Evidence keeps one tamper-evident record per decision (rule, facts, approval, attempt, confirmed outcome), and Behavior Intelligence & Replay inspects past cases without live side effects.


Sources

  1. OpenGitOps PrinciplesDeclarative, versioned desired state with continuous reconciliation.
  2. Kubernetes, Declarative management using configuration filesSeparates configuration files from live object state.
  3. SLSA (Supply-chain Levels for Software Artifacts)Build provenance distinct from the source revision.
  4. NIST AI Risk Management FrameworkInventory AI systems with provenance, versions and dependencies.
  5. Open Policy Agent documentationPolicy bundles update without redeploying the app; decision logs record revisions.
  6. JSON SchemaIdentifiable, machine-readable contracts for data.
  7. OpenTelemetry, SignalsRuntime traces, metrics and logs as distinct evidence.
  8. W3C PROV-OEntities, activities, agents and delegation.
  9. OpenLineageSeparates jobs from individual runs.
More in Platform architecture

Platform architecture

Why a governed runtime 4
Building AI applications 4
Semantic integration 1

Other topics

Pick up where you left off: