Lift the business decisions the MVP made into the Lean master, per constitution
rule 5. lake build green (20 jobs), no sorry.
- Artifact.lean: `inductive Artifact | singleFile | fileTree` — product shape is
part of a target's value (ADR-0009); it determines the assemble/reduce step.
- Render.lean reworked target-centric (ADR-0009, amends ADR-0005's matrix):
`TargetSpec` carries `artifact` + a per-kind `renders` map (field visibility
lives in this map); `RenderConfig.spec : TargetId → Option TargetSpec`; `covers`
rewritten (target must exist AND its map covers the kind) — semantics continuous
with ADR-0005 so renderIgnored still typechecks. `BuildStepForm` (declarative |
shell) is a structural anchor for the build form (shell hatch = ADR-0005's
medium-only category b) without replicating the schema.
- Diagnostic.lean extended: `DiagKind` (7 classes) + `DiagKind.severity` (six
error, renderIgnored warning); `Oracle` makes external-facility verdicts
(compiles/refsResolve/dataConforms/contentFilesPresent) an explicit
implementation boundary; `Legal` = no error-level diagnostic (backfills
ADR-0005's deferred full-legality), with renderIgnored deliberately excluded
(it's a warning).
- Pipeline.lean: the 5 phases (load→structural→schema→compile→coverage) as
structure — order + the compile gate (compile runs only on zero prior errors) +
load halts the pipeline. Algorithms stay out of Lean (depth ceiling).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>