白
ecc92c9a87
docs(adr): cph 的 nested-manifest / batch-export 改号 0036/0037
...
上游 0029/0030 与本地 filelib 侧同号 ADR 相撞,cph 两份改到本地空闲号段,
代码锚点引用一并跟随。
2026-08-06 00:51:33 +08:00
hongjr03
5866b3d6cc
feat(cli): cph init / cph add 子命令(工程脚手架)
...
init 生成可 check 的工程根(manifest.toml + .cph-version + 默认 exports/student.typ + 空 kind 目录);
add 按 kind 建 part 目录/element.toml/必填内容文件并追加 [[parts]]。均纯本地,不涉及 hub 语义;
Engine 改惰性构造。cph-schema 新增 required_content_field_names() 作为 add 建文件合同。
2026-08-05 21:22:26 +08:00
hongjr03
fe8a17c6ad
feat(cph): add outline export command
2026-08-05 18:34:05 +08:00
hongjr03
3f9b60f692
chore: remove Lean spec; ADRs are the single source of truth
...
The spec/ Lean semantic master had no conformance gate, no codegen, and
no CI tie to implementations — alignment was carried entirely by human
review, the same mechanism that carries the ADRs. In practice the ADRs
plus greppable code comments were already the load-bearing artifacts,
so spec/ was the most expensive kind of stale documentation.
- delete spec/ and the spec-check CI workflow
- README: constitution rewritten around ADRs as decision truth
- AGENTS.md/CLAUDE.md: discipline re-anchored (new decisions -> new ADR,
never rewrite ADR history; supersede instead)
- code comments: re-anchor 'Mirrors Spec.X' invariants to ADR numbers
(cph-diag, cph-check, cph-model, hub runner/capacity/org, prisma)
- leave ADR bodies and .scratch audit snapshots untouched (history);
fix live references in open readiness tickets
2026-07-20 09:07:26 +00:00
hongjr03
73fa28a178
feat: provision non-root Hub service
2026-07-10 15:59:35 +08:00
hongjr03
5f791c5ce4
chore: restore checker CI gate
2026-07-10 13:46:22 +08:00
sjfhsjfh
ebcb3a7589
feat(model+spec): .cph-version 契约文件 + CphVersionMismatch 诊断(ADR-0016);bump 0.0.2
...
教研工程文件根放 .cph-version(内容=面向的 cph 版本)。cph 加载时比对自身版本
(CARGO_PKG_VERSION),不相容报 CphVersionMismatch error 并拒绝。当前判定为版本完全
相等(MVP);判定逻辑孤立在 versions_compatible 单谓词,后续可放宽为 semver 区间而
不动诊断分类/spec/CLI。
spec(7 类诊断,原 6 类):
- Diagnostic.lean: DiagKind 增 cphVersionMismatch(error 级),分类注释 6→7
- Pipeline.lean: load 阶段含 .cph-version 兼容性判定
- Courseware.lean: ADR 区间 →0016
实现:
- cph-diag: DiagCode::CphVersionMismatch("E-CPH-VERSION")
- cph-model: load() 解析 manifest 成功后 check_cph_version;versions_compatible
谓词(完全相等);CPH_VERSION const。missing .cph-version 暂跳过(迁移期 OPEN);
空文件报 error
- examples/TH-141、valid/mini fixture、KenKen 课各加 .cph-version=0.0.2
测试:cph-model 4 个版本门测试;全 workspace 53 passed;lake 25 jobs 绿。
负向验证:9.9.9 .cph-version → E-CPH-VERSION error + check 拒绝(exit 1)。
bump: workspace.package 0.0.1→0.0.2;cph --version 报 cph 0.0.2;README 同步
(含版本契约说明)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-23 16:03:54 +08:00
sjfhsjfh
4a9eb59aa9
feat(cli): cph completions <shell> 子命令(clap_complete)
...
用 clap_complete 4 给 cph 生成 shell 补全脚本(bash/zsh/fish/powershell/elvish)。
clap ValueEnum 枚举 Shell;run_completions 从 Cli::command() 派生,自动跟随
子命令/flag 演进。用法:`cph completions zsh > ~/.zfunc/_cph`。
- 依赖经 `cargo add clap_complete@4 -p cph-cli` 添加(4.6.5,默认 features 无额外依赖)
- README 补补全安装一节
测试:全 workspace 49 passed。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-23 15:21:46 +08:00
sjfhsjfh
e3370cad15
chore: release 0.0.1
...
workspace.package version 0.1.0 → 0.0.1(6 个 crate 经 version.workspace=true
继承,单点改动)。render typst 包维持 0.1.0(独立生态,不锁步)。
- cph --version 报 cph 0.0.1
- 嵌入 render cache 目录按 CLI 版本建键:~/.cache(或 ~/Library/Caches)/cph/render-0.0.1/
- README 补"安装 cph 命令行"一节:cargo install --path crates/cph-cli --locked
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-23 15:14:34 +08:00
sjfhsjfh
9309a175c0
docs(readme): reflect the checker workspace, render package, and examples
...
The repo-layout block said implementation parts were "尚未创建"; they now exist.
Document the repo-root cargo workspace (so future parts reuse base crates), the
crates/ map (cph-diag/model/schema/typst reusable; cph-check/cli the checker),
the render/ typst package, and examples/.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-22 01:58:11 +08:00
sjfhsjfh
3a22669f0a
chore: scaffold monorepo with spec/ Lean project and governance docs
...
- spec/: freshly initialized Lean library project (lake init, v4.31.0), no deps
- .gitea/workflows/spec-check.yml: CI running lake build on spec/ (well-formedness gate, not a spec-to-impl gate)
- README.md: monorepo overview + the 5 "constitution" rules positioning spec/ as upstream semantic master
- CLAUDE.md: global agent manual
- spec/README.md: contract writing conventions (prose+type, PINNED/OPEN/ADR tags, no sorry)
- docs/adr/0001-0004: system-level decision records (retrieved from main)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-21 22:00:18 +08:00