feat: interpret the remaining retained H3 contracts (WEB-01)

Add the input/event/scenario/interaction/dependency/acceptance model and
validation on top of the core loader:
- 输入/事件 plain-text tables with non-empty unique names; links rejected;
- 场景 only on leaf components, ASCII slug states unique, exactly one initial,
  content cell is exactly one link to a Knowledge unit (Exec and design
  component declarations rejected), scene limit 32;
- 交互 state references, non-empty unique event labels per state, reachability
  from the initial state, multi-state requires transitions, 128 limit;
- 依赖 must target loaded design components with non-empty reasons and an
  acyclic design dependency graph;
- 验收 keeps the direct section text, rejects empty content, never interprets
  it as a test;
- contract-aligned limits (100 docs/200 defs/1000 instances/12 depth/12 slots
  per row/1 MiB file/16 MiB total) and a richer deterministic handoff.

14 real-CLI contract tests now cover the positives and main negatives. Docs and
the WEB-01 evidence record which security/concurrency cases and WEB-03 handoff
remain open; WEB-01 stays open.

Refs cflmy/marqdo-web-design#1, cflmy/marqdo#6
This commit was merged in pull request #4.
This commit is contained in:
cflmy committed 2026-11-27 02:37:22 +08:00
1 parent 75cd26ef89
commit 9684e388ce
6 files changed
+948 -14

No files matched your search

+1 -1
View File
@@ -37,4 +37,4 @@ Web 领域**唯一设计文档解释实现**。本仓库交付独立 Rust librar
- `src/document.rs`:精确 anchor 选 Knowledge H2、直接保留 H3、GFM `组件` 表 AST/表头/单元格/Link 选择。
- `src/lib.rs`:递归布局、实例、宽度/行/槽校验、包含环与深度/模块/字节上限、稳定诊断、源身份与确定性 handoff。
- `tests/design_contract.rs`:8 个真实 CLI 契约测试(正例 + 负例);`scripts/ci.sh` 为显式验收入口。
- 未完成:`输入`/`事件`/`依赖`/`验收`、`场景`/`交互`、WEB-03 完整 handoff/组件图;证据见 [docs/evidence/WEB-01-design-core.md](docs/evidence/WEB-01-design-core.md)。
- 未完成:WEB-03 完整 handoff/组件图、并发/陈旧 Analysis 复核、完整安全负例矩阵、组件 CI 服务与 WEB-05;证据见 [docs/evidence/WEB-01-design-core.md](docs/evidence/WEB-01-design-core.md)。