Add a shared transparent OrganizationAgentConfigFolder tree for grouping
agent roles and skills in the admin UI without affecting identity, bindings,
run loading, or slash commands.
Fix the abstraction level review flagged. lake build green (20 jobs), no sorry.
- Artifact.lean: bare enum → ADT with fields — singleFile(filepath) /
fileTree(root, outputs:glob). The product semantics (one file where, vs a tree
of what) are pinned in fields + doc, not erased behind empty constructors.
Paths/globs carried as String (semantics in doc; no filesystem algebra).
- Render.lean: Step inductive (typstCompile(template) | shell(run)) replaces the
loose BuildStepForm. TargetSpec = artifact + steps:List Step + covers:Kind→Prop
(the old renders:Kind→Option RenderRule is gone — coverage is now a plain
declaration; the render "how" lives in the typstCompile template). covers /
renderIgnored semantics continuous with ADR-0005.
- Primitives.lean: RenderRule field removed (the per-target payload is retired per
ADR-0011); a note records where the "how" now lives.
- Diagnostic.lean unchanged in meaning (covers signature stable; Legal still
quantifies over declared targets).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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>
Picture the whole framework, then pin the element-kind language layer.
System platform layer — rebuild the semantics likec4 can't draw (ADR-0001..0004):
- Prelude: opaque Identifiers carrier (ProjectId/RunId/SessionId/Principal)
- System/Run: RunState + Terminal subset (set completeness left OPEN, no invented pending)
- System/Lock: lock owner=run (typed), LockTable exclusivity, WellFormed invariant
(a lock holder must be a non-terminal run — couples Lock and Run)
- System/Permission: read<edit<manage role lattice, capability derivation,
can_mono monotonicity theorem; force-release sits outside the lattice (admin-only)
- System/Audit: intentionally thin (mostly plumbing, OPEN)
Courseware product layer — split the single Lesson file into focused modules and
fix doc tautology: Primitives / Element / Lesson / Render / Diagnostic, plus
QuestionBank and Course skeletons (core relations OPEN, not invented).
Diagnostic upgrades WarnsIgnored into a severity-tagged checker rule.
Element schema + rich-content model (ADR-0006, ADR-0007):
- docs/adr/0006: kind schema is declarative JSON Schema; field types are built-in
scalars plus a `content` extension; a `content` value is typst source taken as
module body; rich content must carry a VirtualPath (else click-to-jump and
relative import break — verified against typst source); import boundary =
within the engineering file + @package
- docs/adr/0007: on-disk form is a real directory tree (agent/grep friendly);
VirtualPath = real relative path; layout conventions deferred
- spec/Courseware/RichContent: prose anchor for rich content (opaque VPath,
RichContentRef); ElementData kept abstract — JSON/typst internals are
implementation detail, not contract
lake build green (18 jobs), no sorry, toolchain v4.31.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
First product-core concept in the semantic master spec: a curriculum
engineering file is one lesson, modeled as an ordered sequence of typed
element instances over an open kind universe.
- docs/adr/0005: lesson model decision narrative + deferred OPEN items
- spec/Spec/Courseware/Lesson.lean: Primitives carrier (KindId/ElementData/
TargetId/RenderRule kept abstract), Element, Lesson, RenderConfig, and the
first checker seed (WarnsIgnored: used-kind-with-no-render-rule => warning)
- wire Spec.lean -> Spec.Courseware; drop placeholder Basic.lean
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>