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 建文件合同。
This commit is contained in:
2026-08-05 21:07:50 +08:00
parent 7a0b4b0c4f
commit 5866b3d6cc
6 changed files with 444 additions and 9 deletions
+1
View File
@@ -12,6 +12,7 @@ path = "src/main.rs"
cph-check = { path = "../cph-check" }
cph-diag = { workspace = true }
cph-model = { workspace = true }
cph-schema = { path = "../cph-schema" }
cph-typst = { path = "../cph-typst" }
clap = { version = "4", features = ["derive"] }
clap_complete = "4"