feat: WEB-01 core Design interpreter over public Analysis 3
Implement the first real Design capability in the unique owner repository: - src/analysis.rs runs the verified CLI check --emit with direct argv, validates Analysis 3 schema/source_digest, and snapshots one module without any implicit discovery or Markdown parser. - src/document.rs selects the exact Knowledge H2 by anchor, direct retained H3 sections, and the single GFM 组件 table from the analysis AST; cell text is read from the analysis-provided source by UTF-8 byte span. - src/lib.rs binds design links by exact candidate_path + anchor (never label or filename guessing), validates rows/slots/widths, recursion, containment cycles and module/depth/byte limits, and builds deterministic component definitions, separate instances, source identities and a provisional handoff. - Stable diagnostics separate Engine failures (exit 2) from author-contract errors (exit 1); no partial model on failure. - tests/design_contract.rs exercises the real CLI for recursive layout, definition reuse, width forms and the main negative cases; scripts/ci.sh is the explicit entry (fmt/clippy/test) with a verified CLI. Scenarios/input/event/dependency contracts and the full WEB-03 handoff remain open and are recorded as unverified in the evidence document. Refs cflmy/marqdo-web-design#1, cflmy/marqdo#6
This commit was merged in pull request #3.
This commit is contained in:
1 parent
39c99e59d2
commit
75cd26ef89
13 files changed
+1649
-15
No files matched your search
+10
-11
@@ -27,22 +27,21 @@ RC.4 Analysis 只包含已静态加载模块,`not_loaded` 不等于缺失。
|
||||
- `missing/ambiguous/outside_scope/invalid/external` 对设计依赖是错误;普通内容链接不追踪。无法从公开字段确认物理映射时报告“不支持”,不得调用私有 loader 或搜索文件名。
|
||||
- 并发编辑一致性:以实际输入 bytes 与 digest 校验;同一文件在一轮中两次 Analysis 内容不同即失败重试;输出前复核所有参与设计的源码/资产摘要。交付只列真正使用的输入,不打包全部已加载依赖。
|
||||
|
||||
## 计划代码结构(尚未创建)
|
||||
## 代码结构(WEB-01 核心已创建)
|
||||
|
||||
```text
|
||||
Cargo.toml / Cargo.lock
|
||||
src/lib.rs # 公开 API 与结果类型
|
||||
src/analysis.rs # CLI 调用、公开协议校验、静态输入快照
|
||||
src/document.rs # 确定的章节/表格选择、单元引用
|
||||
src/model.rs # 定义、实例、布局、场景、来源
|
||||
src/graph.rs # 递归链接、循环、依赖与限制
|
||||
src/handoff.rs # Markdown 交付
|
||||
src/diagnostic.rs # 稳定错误码与来源位置
|
||||
tests/ # 单元、负例、真实 CLI contract
|
||||
scripts/ci.sh # 激活时提供的独立验收入口
|
||||
docs/
|
||||
src/lib.rs # 公开 API、递归布局/实例/上限/handoff(WEB-01 核心)
|
||||
src/analysis.rs # CLI check --emit 调用、Analysis 3 校验、模块快照
|
||||
src/document.rs # 精确 anchor/H3/GFM 表/Link 选择
|
||||
src/diagnostic.rs # 稳定错误码、span、Engine/Design 区分
|
||||
tests/design_contract.rs # 真实 CLI 正例 + 负例
|
||||
scripts/ci.sh # 显式独立验收入口(fmt/clippy/test)
|
||||
docs/ # API、开发指南与证据
|
||||
```
|
||||
|
||||
尚未拆分 `model.rs`/`graph.rs`/`handoff.rs` 是当前规模下的有意选择;场景/输入事件合同与完整 handoff 落地时再按真实边界拆分,不做预先空壳。
|
||||
|
||||
不为每个表格新建 crate;Design 与 Preview 各一个主要 crate。`docs/WEB-DESIGN.md` 在领域仓库,本仓库不得复制。
|
||||
|
||||
## 公开 API 原则
|
||||
|
||||
Reference in new issue
Block a user