feat: WEB-01 core Design interpreter over public Analysis 3 #3

Merged
cflmy merged 1 commits from feature/web01-design-core into main 2026-11-27 02:33:55 +08:00
Owner

范围(WEB-01 核心候选)

在唯一责任仓实现 Design 的第一批真实能力,只消费公开 CLI Analysis 3:

  • src/analysis.rs:直接 argv 调用已验证 CLI check --emit,校验 marqdo.analysis schema 3 / source_digest / 单模块快照;无隐式发现、无 Markdown 解析器。
  • src/document.rs:按精确 anchor 选 Knowledge H2、直接保留 H3、从 AST 选唯一 GFM 组件 表;单元格文本按 Analysis 提供源码的 UTF-8 byte span 读取。
  • src/lib.rs:按 candidate_path+fragment 精确绑定设计链接(不按 label/文件名猜);校验行/槽/宽度、包含环、模块/深度/字节上限;产出确定性定义、独立实例、源身份与 provisional handoff。
  • 稳定诊断区分 Engine(退出码 2)与作者合同错误(退出码 1);失败无部分模型。
  • tests/design_contract.rs 使用真实 CLI(无 mock)覆盖递归布局、定义复用、宽度形式与主要负例;scripts/ci.sh 为显式验收入口(fmt/clippy/test + 固定 CLI)。

验证(本地候选 75cd26e)

未完成(不隐藏,工单保持 open)

输入/事件/依赖/验收 合同模型、场景/交互、WEB-03 完整 handoff/组件图、并发/陈旧 Analysis 二次一致性、完整安全负例矩阵、组件 CI 服务接入、领域/根接入(WEB-05)。

Refs cflmy/marqdo-web-design#1, cflmy/marqdo#6

## 范围(WEB-01 核心候选) 在唯一责任仓实现 Design 的第一批真实能力,只消费公开 CLI Analysis 3: - `src/analysis.rs`:直接 argv 调用已验证 CLI `check --emit`,校验 `marqdo.analysis` schema 3 / `source_digest` / 单模块快照;无隐式发现、无 Markdown 解析器。 - `src/document.rs`:按精确 anchor 选 Knowledge H2、直接保留 H3、从 AST 选唯一 GFM `组件` 表;单元格文本按 Analysis 提供源码的 UTF-8 byte span 读取。 - `src/lib.rs`:按 `candidate_path`+`fragment` 精确绑定设计链接(不按 label/文件名猜);校验行/槽/宽度、包含环、模块/深度/字节上限;产出确定性定义、独立实例、源身份与 provisional handoff。 - 稳定诊断区分 Engine(退出码 2)与作者合同错误(退出码 1);失败无部分模型。 - `tests/design_contract.rs` 使用真实 CLI(无 mock)覆盖递归布局、定义复用、宽度形式与主要负例;`scripts/ci.sh` 为显式验收入口(fmt/clippy/test + 固定 CLI)。 ## 验证(本地候选 `75cd26e`) - `scripts/ci.sh`(CLI 由根固定 `cli/deadf6e` 构建,`sha256:6ede3b9e...`):fmt/clippy PASS,8/8 契约测试 PASS。 - 证据:[docs/evidence/WEB-01-design-core.md](docs/evidence/WEB-01-design-core.md)。 ## 未完成(不隐藏,工单保持 open) `输入`/`事件`/`依赖`/`验收` 合同模型、`场景`/`交互`、WEB-03 完整 handoff/组件图、并发/陈旧 Analysis 二次一致性、完整安全负例矩阵、组件 CI 服务接入、领域/根接入(WEB-05)。 Refs cflmy/marqdo-web-design#1, cflmy/marqdo#6
cflmy added 1 commit 2026-11-27 02:33:48 +08:00
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
cflmy merged commit 75cd26ef89 into main 2026-11-27 02:33:55 +08:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cflmy/marqdo-web-design#3