Add three composition cases driven by the same generic web Tool: - examples/doc-site (documentation site), - examples/research-workspace (existing section 8 workbench prototype), - examples/quantum-editor (finite scenario/interaction design). Add a real production delivery trial in examples/research-workbench-app (Express + JSON persistence + static UI): validation, search, status transitions, linked statistics, JSON errors, real file persistence; node:test API acceptance and a Playwright browser E2E. The production app is not a runtime dependency of the web Tool; prototype PASS is kept separate from production PASS. docs/WEB-04-delivery.md records the design-source to implementation mapping, intentional non-goals and task splits. scripts/domain-acceptance.sh is the explicit domain entry: installs the built Tool, runs check/preview/handoff for the three cases, then installs/tests the production app incl. browser E2E, and removes the Tool. Evidence records the real CLI/Design/Preview identities and local PASS results. Pin the domain submodules to the merged Design (WEB-01/03) and Preview (WEB-02) candidates; activation and root gitlink belong to WEB-05. Refs cflmy/marqdo-ext-web#2, cflmy/marqdo#6
55 lines
3.6 KiB
Markdown
55 lines
3.6 KiB
Markdown
# WEB-04 领域组合案例与生产交付试验
|
||
|
||
日期:2026-11-27。责任仓:`marqdo-ext-web`(领域组合与验收);工单:[marqdo-ext-web#2](https://git.cflmy.cn/cflmy/marqdo-ext-web/issues/2);父工单:[marqdo#6](https://git.cflmy.cn/cflmy/marqdo/issues/6)。
|
||
|
||
本文件描述 WEB-04 的三个组合案例、一个真实生产交付试验及其设计源映射。生产实现是独立应用,不是 `web` Tool 的运行依赖;原型 PASS 不等于生产 PASS。
|
||
|
||
## 三个组合案例(同一通用 renderer/Tool)
|
||
|
||
| 案例 | 设计根 | 设计单元 | 验证 |
|
||
| --- | --- | --- | --- |
|
||
| 文档型网站 | `examples/doc-site/` | `首页` | `marqdo web check/preview/handoff` |
|
||
| §8 科研任务台(原型) | `examples/research-workspace/` | `工作台` | 同上 |
|
||
| 量子电路编辑器设计 | `examples/quantum-editor/` | `编辑器` | 同上(含有限场景/交互) |
|
||
|
||
三例均由同一 `marqdo web` Tool(Design + Preview 固定 revision)驱动,没有按案例分叉的 renderer、HTML 注入或 CLI 语法。
|
||
|
||
## 生产交付试验:科研任务台
|
||
|
||
- 位置:`examples/research-workbench-app/`(Express 应用 + 真实 JSON 持久化 + 静态前端)。
|
||
- 设计源映射:
|
||
|
||
| 设计源 | 生产实现 |
|
||
| --- | --- |
|
||
| `examples/research-workspace/index.mq.md#工作台` | 页面布局与统计/任务/工作区三块 |
|
||
| `components/statistics.mq.md#统计` | `/api/stats` 与顶部统计条 |
|
||
| `components/tasks.mq.md#任务` | `/api/tasks`(列表/搜索/创建/状态流转)与任务列表 UI |
|
||
| `components/workspace.mq.md#科研工作区` | 工作区容器与错误提示区域 |
|
||
| `components/navigation.mq.md#导航` | 顶栏导航(占位,首版无多页面路由) |
|
||
|
||
- 真实能力:创建任务(校验标题/优先级)、按标题搜索、状态 open→doing→done、统计随数据联动、真实文件持久化、HTTP 错误 JSON 与 UI 错误提示。
|
||
- 有意未实现(明确记录,不冒充):认证/多用户、真实数据库、网络同步、导入导出、任务编辑/删除、真实实验设备接入。后续按 `docs/WEB-DESIGN.md` 边界在目标应用仓实现。
|
||
- 漂移追踪:重新生成 `marqdo web handoff examples/research-workspace/index.mq.md --unit 工作台`,比较 `design id` 与源摘要;本文件记录的设计源路径即映射锚点,源变更需按任务拆分更新本应用并记录差异。
|
||
- 任务拆分建议:认证与账户、数据库与迁移、任务编辑与删除、统计导出、多页面路由;各自独立应用工单,不改 Web Tool 运行时。
|
||
- 测试映射:
|
||
- 原型:`marqdo web preview` 的离线 HTML/场景(W31–W34 组合案例证据)。
|
||
- 生产 API:`npm test`(真实 HTTP + 临时文件持久化 + 错误/统计断言)。
|
||
- 生产 E2E:`npx playwright test`(真实浏览器:统计、搜索、创建校验联动)。
|
||
|
||
## 验证入口
|
||
|
||
```sh
|
||
MARQDO_BIN=<verified marqdo> \
|
||
MARQDO_WEB_TOOL_JSON=<built marqdo-web-preview tool.json> \
|
||
MARQDO_NPM_CACHE=<optional npm cache dir> \
|
||
scripts/domain-acceptance.sh
|
||
```
|
||
|
||
脚本以同一 Tool 跑三个案例的 check/preview/handoff,再安装并测试生产应用(API + 浏览器 E2E),最后卸载 Tool;任何原型测试都不会代替生产 E2E。
|
||
|
||
## 证据与未验证
|
||
|
||
- 本文件与领域 CI 脚本构成 WEB-04 候选;实际命令输出/退出码记录在父工单与根候选评论。
|
||
- 浏览器 E2E 需要可用的 Chromium;无浏览器环境必须标 UNVERIFIED,不得用静态断言冒充。
|
||
- 领域 gitlink 固定 Design/Preview 候选与根接入属于 WEB-04/WEB-05 同候选工作;根 `--checkouts` 与冷安装证据在 WEB-05 完成。
|