---
id: "concept-icm-as-compilation"
type: "concept"
source_timestamps: ["§6.1"]
tags: ["compilation", "theory", "future-direction"]
related: ["concept-stage-contracts", "concept-edit-source-principle", "prereq-unix-pipelines"]
definition: "ICM mirrors a multi-pass compiler: each stage reads the previous stage's intermediate representation, transforms it by its own rules, and writes an inspectable artifact the next stage consumes."
sources: ["paper"]
sourceVaultSlug: "icm-paper-folder-architecture-2026Jun02"
originDay: 2
---
# ICM as Multi-Pass Incremental Compilation

## The analogy

Beyond Unix pipelines and Make (see [[prereq-unix-pipelines]]), the closest theoretical analogy is **multi-pass compilation** (Aho et al.).

A multi-pass compiler transforms source through discrete passes:

1. lexer → tokens,
2. parser → syntax tree,
3. semantic analysis,
4. optimization,
5. code generation,

each reading the previous pass's output and writing a **well-defined, inspectable intermediate representation**.

## ICM as content compilation

ICM does the same with *content*:

- **research** transforms a brief into structured output,
- **script** transforms research into a script,
- **production** transforms the script into animation specs and code.

The intermediate artifacts are plain files that can be opened, read, and edited — the same property compilers exploit for debugging builds.

## Incremental compilation

The analogy extends to **incremental compilation**: re-running only the stages downstream of a change rather than the whole pipeline. This is a natural fit for ICM's filesystem layout — a downstream stage simply re-reads the (now-updated) upstream output.

## Connection to source integrity

The compiler analogy is also the foundation of the [[concept-edit-source-principle]]: editing *output* is patching the binary; editing *source* fixes every future build. Quoted directly in [[quote-edit-source]].


## Related across days
- [[prereq-unix-pipelines]]
- [[concept-icm-d2]]
- [[concept-stage-contracts]]
- [[arc-evidence-base-evolution]]
