forked from EduCraft/curriculum-project-hub
feat(spec): Artifact gets fields, target = artifact + typed steps, drop RenderRule (ADR-0011)
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>
This commit is contained in:
@@ -13,16 +13,18 @@ import Spec.Courseware.Course
|
||||
# Courseware —— 产品层契约(课程工程文件)
|
||||
|
||||
护城河:课程"工程文件"的语义母本与合法性规则。决策出处 ADR-0005 / 0006 / 0007 / 0008
|
||||
/ 0009 / 0010。
|
||||
/ 0009 / 0010 / 0011。
|
||||
|
||||
已填实(PINNED):
|
||||
- `Primitives` —— 基元载体(表示留给实现;schema 形态见 ADR-0006)。
|
||||
- `RichContent` —— 富内容 = 带虚拟路径的 typst 源(ADR-0006 的 prose 母本)。
|
||||
- `Artifact` —— export 产物形状(单文件 / 文件树),target 值的一部分(ADR-0009)。
|
||||
- `Artifact` —— export 产物(带字段 ADT:`singleFile filepath` / `fileTree root outputs`),
|
||||
target 值的一部分(ADR-0009/0011)。
|
||||
- `Element` —— kind 标签 + 依赖 schema 的数据。
|
||||
- `Lesson` —— element 的有序序列(序载教学语义、不建模时长)。
|
||||
- `Render` —— export target = 一次 build(map + reduce):target-中心的 `TargetSpec`
|
||||
携产物形状 + per-kind map;`covers` 判定;build 形态结构锚点(ADR-0009,修订 ADR-0005)。
|
||||
- `Render` —— export target = artifact + 有序 typed steps:`TargetSpec` 携 `artifact` +
|
||||
`steps : List Step`(`typstCompile template` / `shell run`)+ 覆盖声明 `covers`;
|
||||
`RenderConfig.covers` 判定(ADR-0009/0011,修订 ADR-0005)。RenderRule 载荷已废止。
|
||||
- `Diagnostic` —— Severity + 7 类诊断的含义与级别 + **合法 lesson = 无 error 级诊断**;
|
||||
模型外设施诊断以抽象谓词 + `Oracle` 实现边界表示(ADR-0010)。
|
||||
- `Pipeline` —— 检查管线的 5 阶段、执行序、compile 门控(ADR-0010)。
|
||||
|
||||
Reference in New Issue
Block a user