@givolt/i3-composer-agent 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +1 -1
- package/.claude/commands/i3-prototype.md +5 -7
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.gemini/commands/i3-prototype.toml +5 -7
- package/README.md +12 -7
- package/bin/i3-composer-agent.cjs +33 -2
- package/bin/install.cjs +14 -0
- package/bin/native-migration.cjs +27 -3
- package/commands/i3-prototype.toml +5 -7
- package/docs/codebuddy-setup.md +65 -2
- package/docs/codex-setup.md +4 -0
- package/docs/other-hosts.md +1 -1
- package/docs/ui-prototype-native/MAIN-SESSION-REPORT.md +66 -0
- package/docs/ui-prototype-native/USAGE.md +91 -0
- package/docs/workbuddy-setup.md +4 -0
- package/evals/cases/i3-frontend-ui-engineering.json +16 -0
- package/evals/cases/i3-ui-prototype.json +109 -0
- package/evals/cases/i3-using-agent-skills.json +28 -0
- package/evals/fixtures/i3-ui-prototype/admin-list/assets/reference.css +3 -0
- package/evals/fixtures/i3-ui-prototype/admin-list/assets/reference.js +8 -0
- package/evals/fixtures/i3-ui-prototype/admin-list/capability-definition.json +67 -0
- package/evals/fixtures/i3-ui-prototype/admin-list/index.html +89 -0
- package/evals/fixtures/i3-ui-prototype/admin-list/readme.md +52 -0
- package/evals/fixtures/i3-ui-prototype/admin-list/template.json +8 -0
- package/evals/zh-CN/cases/i3-frontend-ui-engineering.json +17 -0
- package/evals/zh-CN/cases/i3-ui-prototype.json +115 -0
- package/evals/zh-CN/cases/i3-using-agent-skills.json +30 -0
- package/package.json +35 -1
- package/plugin.json +1 -1
- package/scripts/design-provider-discovery-test.js +190 -0
- package/scripts/design-provider-test.js +75 -0
- package/scripts/enterprise-template-test.js +67 -1
- package/scripts/lib/prototype-fixture.cjs +17 -0
- package/scripts/prototype-locations-test.js +58 -0
- package/scripts/ui-prototype-content-test.js +123 -0
- package/scripts/ui-prototype-dependencies-test.js +213 -0
- package/scripts/ui-prototype-devtools-test.js +53 -0
- package/scripts/ui-prototype-native-test.js +504 -0
- package/scripts/ui-prototype-template-test.js +261 -0
- package/scripts/ui-prototype-test.js +10 -0
- package/skills/i3-ui-prototype/SKILL.md +142 -23
- package/skills/i3-ui-prototype/assets/capabilities/management.json +294 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/acceptance.json +51 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/component-map.json +13 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/index.html +11 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/package-lock.json +2298 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/package.json +22 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/public/prototype-config.json +6 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/App.vue +136 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/components/DeviceEditor.vue +111 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/config.ts +19 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/content.ts +28 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/domain/devices.ts +50 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/domain/theme.ts +25 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/main.ts +18 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/style.css +50 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/useDevices.ts +66 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/tests/devices.test.ts +44 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/tests/theme.test.ts +26 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/tsconfig.json +15 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/vite.config.ts +4 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/profile.json +174 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/readme.md +61 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/index.html +11 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/package-lock.json +2298 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/package.json +22 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/public/prototype-config.json +21 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/App.vue +51 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/config.ts +18 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/domain/theme.ts +25 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/main.ts +18 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/style.css +13 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/tests/theme.test.ts +26 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/tsconfig.json +15 -0
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/vite.config.ts +4 -0
- package/skills/i3-ui-prototype/assets/optional-skills/host-targets.json +737 -0
- package/skills/i3-ui-prototype/assets/optional-skills/sources.json +27 -0
- package/skills/i3-ui-prototype/assets/templates/catalog.js +149 -0
- package/skills/i3-ui-prototype/assets/templates/catalog.json +3 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/capability-definition.json +294 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/design-system.md +3 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/index.html +507 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/manifest.json +1 -1
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/offline-build.json +265 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/offline.js +8888 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/template.json +9 -0
- package/skills/i3-ui-prototype/assets/templates/gallery/index.html +6 -6
- package/skills/i3-ui-prototype/assets/templates/index.html +3 -0
- package/skills/i3-ui-prototype/assets/templates/serve-gallery.cjs +7 -0
- package/skills/i3-ui-prototype/references/artifact-contract.md +25 -0
- package/skills/i3-ui-prototype/references/content-template.md +76 -0
- package/skills/i3-ui-prototype/references/enterprise-admin.md +9 -3
- package/skills/i3-ui-prototype/references/entry-contract.md +71 -0
- package/skills/i3-ui-prototype/references/expert-adapter.md +39 -5
- package/skills/i3-ui-prototype/references/framework-contract.md +76 -0
- package/skills/i3-ui-prototype/references/interaction-acceptance.md +165 -0
- package/skills/i3-ui-prototype/references/legacy-native.md +58 -0
- package/skills/i3-ui-prototype/references/optional-skills.md +59 -0
- package/skills/i3-ui-prototype/references/template-adapters.md +1 -1
- package/skills/i3-ui-prototype/references/workflow-contract.md +58 -4
- package/skills/i3-ui-prototype/scripts/adapters/easel-html.cjs +3 -3
- package/skills/i3-ui-prototype/scripts/content-template.cjs +98 -0
- package/skills/i3-ui-prototype/scripts/design-provider-discovery.cjs +128 -0
- package/skills/i3-ui-prototype/scripts/enterprise-template.cjs +30 -14
- package/skills/i3-ui-prototype/scripts/manage-baseline.cjs +1 -1
- package/skills/i3-ui-prototype/scripts/native-browser.cjs +785 -0
- package/skills/i3-ui-prototype/scripts/native-build.cjs +91 -0
- package/skills/i3-ui-prototype/scripts/native-delivery.cjs +91 -0
- package/skills/i3-ui-prototype/scripts/native-devtools.cjs +91 -0
- package/skills/i3-ui-prototype/scripts/native-files.cjs +35 -0
- package/skills/i3-ui-prototype/scripts/native-pilot-lib.cjs +244 -0
- package/skills/i3-ui-prototype/scripts/native-pilot.cjs +34 -0
- package/skills/i3-ui-prototype/scripts/optional-skill-install.cjs +203 -0
- package/skills/i3-ui-prototype/scripts/prototype-dependencies.cjs +81 -0
- package/skills/i3-ui-prototype/scripts/prototype-lib.cjs +50 -26
- package/skills/i3-ui-prototype/scripts/prototype-locations.cjs +65 -0
- package/skills/i3-ui-prototype/scripts/sync-template.cjs +19 -0
- package/skills/i3-ui-prototype/scripts/template-contract.cjs +398 -0
- package/skills/i3-ui-prototype/scripts/validate-result.cjs +117 -0
- package/skills/i3-using-agent-skills/SKILL.md +2 -5
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# 原型制作与续接
|
|
2
|
+
|
|
3
|
+
<!-- i3:zh-guide:start -->
|
|
4
|
+
## 中文使用说明
|
|
5
|
+
|
|
6
|
+
按下文完整工程步骤、检查项与验证条件执行。根据任务选择适用步骤,保留证据、风险和退出条件;正文示例中的英文标签在面向用户输出时译为中文。
|
|
7
|
+
|
|
8
|
+
默认使用简体中文解释、追问及生成报告;用户明确要求其他语言时可切换。原方法正文、引用、阈值和审批条件完整保留。代码标识、路径、命令、工具参数、JSON 键/枚举与原文引用保持原样。
|
|
9
|
+
<!-- i3:zh-guide:end -->
|
|
10
|
+
|
|
11
|
+
当前默认内容模板为完整企业管理后台,生成目标为 Vue3+antDv-next。HTML 参考可以离线编辑;生成的框架工程需要安装依赖、构建并启动预览。安装方式见 [CodeBuddy 说明](../codebuddy-setup.md)。
|
|
12
|
+
|
|
13
|
+
## 在 CodeBuddy 发起
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
/i3-prototype analyze 根据 PRD 分析原型范围和模板适用能力,先不写入或安装
|
|
17
|
+
/i3-prototype create 根据 PRD,参考完整 enterprise-admin 模板,生成 Vue3+antDv-next 原型,ID 为 assets
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
自然语言、命令、using 选择及直接调用 Skill 均由主会话执行,无原型专责 Agent。using 按普通发现逻辑选择原型 Skill;原型流程按阶段复用前端、官方框架、UIUX 和浏览器能力,避免一次加载全部模板、依赖源码及历史日志。
|
|
21
|
+
|
|
22
|
+
只读分析交付覆盖、选型、验收计划及缺口,不创建原型、安装依赖、启动浏览器或保存用户级记忆。创建/修订的写入限于本次项目与明确范围,长期记忆、全局配置及其他项目另需明确授权。
|
|
23
|
+
|
|
24
|
+
## 可选官方 Skill 与后续检测
|
|
25
|
+
|
|
26
|
+
从业务项目根运行:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/prototype-dependencies.cjs check --project .
|
|
30
|
+
# 以下仅在明确选择安装后执行,可单独选 uiux 或 antdv:
|
|
31
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/prototype-dependencies.cjs install --project . --skills uiux,antdv
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
i3 默认不安装这两项依赖,跳过不永久禁用。后续补装后重新检测即可,无需重装 i3;必要时重载 CodeBuddy 窗口或新建会话让宿主发现。已有可用全局 UIUX 可复用,已有第三方技能和工具不覆盖。缺 Python 仅报告,不安装系统运行环境。官方正文、许可、版本和来源保留,详情见已安装 Skill 的 references/optional-skills.md。
|
|
35
|
+
|
|
36
|
+
UIUX 专业模式为默认,缺少可用查询资源会提示,不静默降级;用户明确选择基础模板模式后仍完成同样业务功能、四主题和验收。安装依赖不会自动改变既有原型的模式、源码或证据。检测不代表真实宿主调用;CodeBuddy 仍须通过其 Skill 工具实际加载。
|
|
37
|
+
|
|
38
|
+
antDv 官方 Skill 和组件库是独立部分:未安装 Skill 时可使用对应版本官方文档/类型/源码,记录实际渠道;生成工程仍需 antDv-next 库。新工具目录为对应宿主基址下的 tools/i3-prototype/antdv-cli,支持项目和全局安装;旧 .prototype-tools/antdv-cli 保留读取兼容;只读检测返回可执行的 Node 入口,也识别既有 .prototype-tools/node_modules 布局。固定 CLI 0.0.0-beta.1 的 1.5.2 知识仅作参考,目标组件库 1.5.3 仍核对实际类型/源码。不自动升级 CLI,不以 Error 文本、exit 0 或占位 lint 代替成功。
|
|
39
|
+
|
|
40
|
+
## 内置模板与业务原型
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/native-pilot.cjs template-page --page models-page
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
默认只读使用 Skill 安装目录 assets/templates/enterprise-admin 中随版本发布的完整模板,业务项目不生成 ui-templates。可双击内置 index.html 离线查看;模板内容由维护者在 Skill 源码中修改、校验并随包发布,业务使用期间不修改安装目录。索引在内存只读计算,随生成时的模板、范围与能力快照固定到 inputs。业务修改直接落在 prototypes/<id>/app/,Skill 升级不隐式改写已有原型。
|
|
47
|
+
|
|
48
|
+
只读取本次相关页面。完整索引提供参考页面、路由和资源清单,不表示自动理解或实现全部旧业务。已有 ui-templates 副本保留,不自动读取、覆盖或删除;明确需要其手工内容时,先显式 sync-template 该副本,再在 create 时传 --template-root <已有目录>。旧 prepare-template 命令继续用于兼容,不是新流程必需步骤。
|
|
49
|
+
|
|
50
|
+
## 需求范围与创建
|
|
51
|
+
|
|
52
|
+
主会话根据实际 PRD 整理 .prototype-preparation/assets/scope.json:逐页声明业务标题、referencePage、区域类型、需求原文及来源。列表适用查询、复选、分页、批量与状态反馈;编辑区域适用校验、保存失败保留和重试。豁免须有明确需求依据。不能漏报实际区域来逃避能力。
|
|
53
|
+
|
|
54
|
+
新原型默认提供明亮、暗黑、清新、科技,默认明亮,无编号。列表默认可调分页 10/20/50,默认 10;在 scope 的区域参数中明确覆盖真实需要。旧实例仍按原有固定输入,不追溯修改。
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/native-pilot.cjs create --project . --id assets --scope .prototype-preparation/assets/scope.json --host codebuddy
|
|
58
|
+
# 仅在明确选择基础模板模式后,增加 --expert-mode template。
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
必须提供有来源的 scope,不再自动回退设备演示需求。目标存在时先读取 state,按修订流程保留已有手改,不重新 create。初始化仅提供需求对应的原生框架骨架和主题,business.status 为 needs-adaptation;主会话继续实现实际业务页面、字段、模拟数据和交互后才可验收。
|
|
62
|
+
|
|
63
|
+
## 实现、构建与真实验收
|
|
64
|
+
|
|
65
|
+
按需使用 i3-frontend-ui-engineering、可调用的 antDv 官方 Skill、UIUX 查询和取舍。官方 Skill 可调用时先实际加载;无法调用时记录官方资料等效渠道。UIUX 的加载、真实查询、建议采用与效果验证分别有依据。
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/native-pilot.cjs state prototypes/assets
|
|
69
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/native-pilot.cjs build prototypes/assets --install
|
|
70
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/native-pilot.cjs preview prototypes/assets
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
首次且允许安装工程依赖时用 --install,之后复用已安装依赖。业务流程覆盖查询、多选、分页、编辑抽屉、校验失败、提交失败、重试保存及列表同步;另验抽屉进入/退出、模糊遮罩、四主题保留状态、窄屏、键盘与焦点恢复。
|
|
74
|
+
|
|
75
|
+
主会话实际加载 i3-browser-testing-with-devtools,通过 Chrome DevTools MCP 对当前构建检查 DOM/计算样式、截图、console、network、可访问性及性能。缺少工具时保留未验证;读取 Skill、只有截图或运行补充脚本不能冒充该链路通过。浏览器使用项目 localhost 和隔离测试环境。
|
|
76
|
+
|
|
77
|
+
按 inputs/acceptance.json 的本次业务场景实测,保存真实报告,再登记:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/native-pilot.cjs record-run prototypes/assets --report /absolute/path/actual-business-report.json
|
|
81
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/native-pilot.cjs record-devtools-review prototypes/assets --report /absolute/path/actual-devtools-report.json
|
|
82
|
+
node .codebuddy/skills/i3-ui-prototype/scripts/native-pilot.cjs state prototypes/assets
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
从 state 取得当前准确的 finalize/revise 命令;不要复用修改前摘要。结构校验及报告导入不证明真实 Skill 调用,仍须核对原始宿主调用记录。源码或固定输入变化后重建并重验受影响场景。native-pilot 的历史 browser 子命令仅服务旧设备合同,不适用于新完整模板业务。
|
|
86
|
+
|
|
87
|
+
## 续接、兼容与交付
|
|
88
|
+
|
|
89
|
+
新会话先 state 恢复身份、范围、模式、构建与证据,按 nextAction 继续,不重新生成覆盖。已有 v1 HTML 与旧 v2 原生实例按原合同检查,保留原摘要、手改和认可基线;小模板仅保留测试夹具,旧设备框架起点在 legacy-starter,不作为新生成入口。
|
|
90
|
+
|
|
91
|
+
最终回复给出原型路径、范围、revision、实际模式、已执行检查、证据及未决项。完成本地技术验证仍为 pending-review,人工认可具体 revision/digest 后才能冻结基线;不把骨架、安装通过或自填报告当作业务完成。
|
package/docs/workbuddy-setup.md
CHANGED
|
@@ -82,3 +82,7 @@ npx @givolt/i3-composer-agent --workbuddy --scope global --yes --force
|
|
|
82
82
|
[命令格式](https://www.codebuddy.cn/docs/cli/slash-commands) 和
|
|
83
83
|
[项目目录说明](https://www.codebuddy.cn/docs/workbuddy/From-Beginner-to-Expert-Guide/Function-Description/Project)。
|
|
84
84
|
目录落盘、发现与模型行为分别验收。
|
|
85
|
+
|
|
86
|
+
## 可选原型工具
|
|
87
|
+
|
|
88
|
+
原型辅助工具位于本宿主基址的 `tools/i3-prototype/`,支持项目和全局范围;旧项目 `.prototype-tools` 继续读取兼容。推荐使用 `npx @givolt/i3-composer-agent@2.3.2 --workbuddy --scope global --yes --prototype-skills uiux,antdv`;项目安装将 scope 改为 project。可选依赖默认 none,后续也可使用已安装 Skill 的 prototype-dependencies.cjs 单独检测/补装。完整用法见原型 Skill 的 references/optional-skills.md。
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
{
|
|
32
32
|
"prompt": "Tag and publish the release",
|
|
33
33
|
"owner": "i3-git-workflow-and-versioning"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"prompt": "Generate a reviewable interactive UI prototype from business requirements",
|
|
37
|
+
"owner": "i3-ui-prototype"
|
|
34
38
|
}
|
|
35
39
|
]
|
|
36
40
|
},
|
|
@@ -47,6 +51,18 @@
|
|
|
47
51
|
"ARIA roles or semantic elements are used correctly",
|
|
48
52
|
"Component state is managed deliberately rather than ad hoc"
|
|
49
53
|
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": 2,
|
|
57
|
+
"kind": "dialogue",
|
|
58
|
+
"prompt": "An approved production design now needs a reusable accessible Vue form component. Separately, a product owner wants an interactive review prototype from an editable HTML reference. Explain the owner of each request and how frontend implementation guidance can support prototype work. Do not implement anything.",
|
|
59
|
+
"expected_output": "Production frontend ownership and prototype support are distinguished without duplicating or replacing either workflow",
|
|
60
|
+
"expectations": [
|
|
61
|
+
"Production component implementation remains in the frontend implementation method and the existing engineering workflow",
|
|
62
|
+
"The review-prototype request belongs to the prototype workflow in the main session, where frontend guidance can support actual interface implementation",
|
|
63
|
+
"Frontend guidance does not require creating a prototype, installing a dedicated prototype role or changing its general method",
|
|
64
|
+
"Prototype-specific version, baseline and acceptance ownership stays with the prototype workflow; no runtime work or human approval is invented"
|
|
65
|
+
]
|
|
50
66
|
}
|
|
51
67
|
]
|
|
52
68
|
}
|
|
@@ -17,6 +17,22 @@
|
|
|
17
17
|
{
|
|
18
18
|
"prompt": "Iterate the interactive prototype using review feedback and preserve the approved baseline",
|
|
19
19
|
"top_k": 1
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"prompt": "Use this editable HTML reference to generate a device management prototype with native Vue and antDv-next components",
|
|
23
|
+
"top_k": 1
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"prompt": "Analyze a plan for turning this content template and business brief into an interactive prototype, without changing any files",
|
|
27
|
+
"top_k": 1
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"prompt": "Revise the prototype using my feedback and preserve my manual edits while reviewing the drawer animation",
|
|
31
|
+
"top_k": 1
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"prompt": "Use the prototype skill directly to inspect our review candidate without starting another agent",
|
|
35
|
+
"top_k": 1
|
|
20
36
|
}
|
|
21
37
|
],
|
|
22
38
|
"negative": [
|
|
@@ -27,6 +43,14 @@
|
|
|
27
43
|
{
|
|
28
44
|
"prompt": "Optimize slow database indexes",
|
|
29
45
|
"owner": "i3-performance-optimization"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"prompt": "Implement the approved production design as an accessible reusable Vue form component",
|
|
49
|
+
"owner": "i3-frontend-ui-engineering"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"prompt": "Debug an existing application failure: the save request broke after a network error",
|
|
53
|
+
"owner": "i3-debugging-and-error-recovery"
|
|
30
54
|
}
|
|
31
55
|
]
|
|
32
56
|
},
|
|
@@ -44,6 +68,91 @@
|
|
|
44
68
|
"A runnable prototype and verification evidence are produced; absent browser evidence is marked pending",
|
|
45
69
|
"The prototype remains pending human review and no approved baseline is invented"
|
|
46
70
|
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": 2,
|
|
74
|
+
"kind": "dialogue",
|
|
75
|
+
"prompt": "Use the i3-ui-prototype skill directly in this session to analyze how an editable HTML content template and capability list could produce a Vue 3 plus antDv-next device-list prototype. This is analysis only: do not change files, install or upgrade tools, persist design output, or start a separate agent.",
|
|
76
|
+
"expected_output": "A read-only prototype analysis that keeps direct Skill execution valid and states the framework, content, capability and acceptance boundaries",
|
|
77
|
+
"expectations": [
|
|
78
|
+
"The current executor runs the shared preflight without redispatching to an Agent, command or meta-skill",
|
|
79
|
+
"The response preserves analysis-only scope and does not initialize, install, persist design output or update project execution state",
|
|
80
|
+
"Editable content reference, reusable capabilities and target-framework behavior are explained as separate inputs",
|
|
81
|
+
"Unavailable provider, host or browser capabilities remain explicitly unverified rather than reported as executed",
|
|
82
|
+
"The analysis deliverable is the conversation; it does not invent prototype completion or human approval"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": 3,
|
|
87
|
+
"prompt": "Create a separate device-list review prototype with the admin-list editable content template and native Vue 3 plus antDv-next components. For this case explicitly use template mode. Requirements: 21 deterministic devices, 10 per page; filtering or changing page clears current-page selection; batch status changes affect only selected records; an edit drawer validates required name, preserves input on simulated save failure, retries, and updates the correct row. Verify normal drawer exit and mask blur on the current build when a real browser is available. Preserve any existing prototype and leave this candidate for human review.",
|
|
88
|
+
"expected_output": "An isolated native component prototype with fixed capability inputs, reproducible local data, current-build verification or a truthful verification gap",
|
|
89
|
+
"files": [
|
|
90
|
+
"i3-ui-prototype"
|
|
91
|
+
],
|
|
92
|
+
"expectations": [
|
|
93
|
+
"The instance uses the native framework runtime and fixed template, capability, scope and framework inputs rather than converting an existing legacy instance",
|
|
94
|
+
"Real antDv-next components implement filtering, current-page selection, pagination and the edit flow with deterministic isolated mock state",
|
|
95
|
+
"Required capability bindings remain independently checkable and are not removed or arbitrarily marked inapplicable to make checks pass",
|
|
96
|
+
"The executor distinguishes source inspection, successful build and real browser execution; unavailable checks remain unverified",
|
|
97
|
+
"Browser evidence, when present, refers to the current candidate and actual build, with drawer motion and blur verified separately from static screenshots",
|
|
98
|
+
"Template mode is explicit and does not claim UIUX use; existing prototypes remain unchanged and no human baseline approval is invented"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": 4,
|
|
103
|
+
"kind": "dialogue",
|
|
104
|
+
"prompt": "Inspect this prototype verification claim without modifying files: the source was changed after testing, the server still serves the previous build, and the only evidence is a screenshot plus a report manually marked passed. A teammate suggests removing the pagination capability and marking it inapplicable so we can approve the candidate. Explain the valid next step; do not execute a new test or approve a baseline.",
|
|
105
|
+
"expected_output": "A read-only rejection of stale evidence and unsupported exemption, with concrete required revalidation and pending human review",
|
|
106
|
+
"expectations": [
|
|
107
|
+
"The changed candidate and previous build invalidate the supplied acceptance claim",
|
|
108
|
+
"A screenshot or manually passed report is not treated as proof of current-build browser execution or drawer animation",
|
|
109
|
+
"Pagination remains required unless an explicit requirement or scope-change source justifies an exemption",
|
|
110
|
+
"The response proposes rebuilding and revalidating against fixed inputs without claiming those actions already occurred",
|
|
111
|
+
"No files are changed, no tests are pretended, and human baseline approval remains separate"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": 5,
|
|
116
|
+
"kind": "dialogue",
|
|
117
|
+
"prompt": "In this main session, analyze an editable admin-list HTML reference and a business brief for a Vue 3 plus antDv-next review prototype. Keep this read-only. The host has no dedicated prototype role and no parent-child JSON transport. State the useful analysis and next steps without installing tools or running creation-stage checks.",
|
|
118
|
+
"expected_output": "A complete read-only main-session analysis with useful coverage and a truthful acceptance plan",
|
|
119
|
+
"expectations": [
|
|
120
|
+
"The main session directly applies the shared prototype preflight without requiring or simulating a dedicated Agent",
|
|
121
|
+
"The analysis delivers requirement and bound-capability coverage, template and framework selection, acceptance planning and concrete gaps",
|
|
122
|
+
"No initialization, installation, persisted design, project state update, build, browser run or creation-stage UIUX adoption gate occurs",
|
|
123
|
+
"No parent-child JSON, PROTOTYPE_RESULT_V1 marker or validate-result execution is made a prerequisite for the natural-language deliverable",
|
|
124
|
+
"Unavailable capabilities and fixed-parameter conflicts remain visible; analysis completion is distinct from implemented coverage and human approval"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": 6,
|
|
129
|
+
"prompt": "Create a separate native Vue 3 plus antDv-next device-list review candidate from the editable admin-list reference. Use template mode explicitly. I authorize four in-page themes named 明亮、暗黑、清新、科技, defaulting to 明亮. Enable and fix the theme requirement in my HTML working copy, preserve business state while switching, and preserve all existing prototypes and manual edits. Do not ask again whether themes are wanted. Keep fixed required capabilities and verify the current build when the specified browser tools are available.",
|
|
130
|
+
"expected_output": "A main-session native review candidate with explicitly fixed four-theme inputs, preserved state and truthful current-build evidence or gaps",
|
|
131
|
+
"files": [
|
|
132
|
+
"i3-ui-prototype"
|
|
133
|
+
],
|
|
134
|
+
"expectations": [
|
|
135
|
+
"The main session uses the prototype workflow and supporting frontend and version-matched official framework knowledge for actual implementation, without requiring a dedicated persona",
|
|
136
|
+
"The authorized theme capability is bound in the user HTML working copy and fixed with its requirement source rather than left disabled or sent for repeat confirmation",
|
|
137
|
+
"The generated framework implements the four exact theme names, defaults to 明亮, and verifies that business state survives theme changes",
|
|
138
|
+
"Existing or unrequested-theme instances, user edits and approved baselines remain unchanged",
|
|
139
|
+
"Template mode does not claim UIUX use; fixed required capabilities and applicable acceptance scenarios are retained",
|
|
140
|
+
"Build, actual browser Skill and DevTools observations, supplemental regression and current delivery evidence are distinguished; unavailable checks remain incomplete",
|
|
141
|
+
"The final natural-language delivery identifies the candidate, current evidence and gaps, and leaves human review pending without requiring a parent-child result envelope"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": 7,
|
|
146
|
+
"kind": "dialogue",
|
|
147
|
+
"prompt": "Compare how you would handle three requests: analyze a prototype plan without writing; revise the prototype drawer interaction for review; implement the approved drawer as a reusable production component. Explain which skills and evidence apply to each, without executing the requests.",
|
|
148
|
+
"expected_output": "Operation-specific support and a clear boundary between prototype work and production frontend engineering",
|
|
149
|
+
"expectations": [
|
|
150
|
+
"Read-only prototype analysis uses only material needed for coverage and selection and plans later verification without executing it",
|
|
151
|
+
"Prototype interaction revision stays within prototype workflow ownership and uses frontend, official framework and browser capabilities when the revision requires them",
|
|
152
|
+
"Professional UIUX lookup, adoption and effect verification remain distinct and apply to professional design work, with no silent downgrade to template mode",
|
|
153
|
+
"Approved production component implementation follows the frontend implementation method and the existing engineering workflow rather than creating a new review prototype",
|
|
154
|
+
"No claim of completed runtime checks or human baseline approval is made"
|
|
155
|
+
]
|
|
47
156
|
}
|
|
48
157
|
]
|
|
49
158
|
}
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
{
|
|
24
24
|
"prompt": "Make the modal accessible for keyboard users",
|
|
25
25
|
"owner": "i3-frontend-ui-engineering"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"prompt": "Generate a reviewable interactive UI prototype from business requirements",
|
|
29
|
+
"owner": "i3-ui-prototype"
|
|
26
30
|
}
|
|
27
31
|
]
|
|
28
32
|
},
|
|
@@ -39,6 +43,30 @@
|
|
|
39
43
|
"The rationale references the routing logic rather than guessing",
|
|
40
44
|
"Core operating behaviors (assumptions surfaced) are respected"
|
|
41
45
|
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": 2,
|
|
49
|
+
"kind": "dialogue",
|
|
50
|
+
"prompt": "A user asks for a device-management review prototype from an editable HTML reference and a short business brief. Choose the applicable skill and explain the next step in this session; do not create files or launch a separate task.",
|
|
51
|
+
"expected_output": "Ordinary routing to i3-ui-prototype in the main session, with operation and scope decided by the working skill",
|
|
52
|
+
"expectations": [
|
|
53
|
+
"The meta-skill selects the prototype workflow for reviewable prototype work",
|
|
54
|
+
"The main session uses the working skill without requiring a dedicated persona, persistent routing rule or parent-child result protocol",
|
|
55
|
+
"Detailed operation, framework and acceptance decisions remain in the prototype workflow rather than being copied into the meta-skill",
|
|
56
|
+
"The requested read-only routing explanation does not initialize a prototype or claim implementation"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": 3,
|
|
61
|
+
"kind": "dialogue",
|
|
62
|
+
"prompt": "Two tasks arrive separately: implement an approved production Vue form component with keyboard support; inspect a review prototype against its approved baseline. Route each task and explain how the existing engineering workflow still applies. Do not perform either task.",
|
|
63
|
+
"expected_output": "Separate routing for production engineering and prototype review without changing the general lifecycle",
|
|
64
|
+
"expectations": [
|
|
65
|
+
"Production UI implementation follows the engineering workflow with the frontend implementation method",
|
|
66
|
+
"Prototype fidelity inspection selects the prototype workflow",
|
|
67
|
+
"The prototype route does not replace generic planning, implementation or review methods or impose prototype-specific delegation on them",
|
|
68
|
+
"The response does not invent runtime verification or human approval"
|
|
69
|
+
]
|
|
42
70
|
}
|
|
43
71
|
]
|
|
44
72
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#202936;background:#f5f7fa;line-height:1.5;font-synthesis:none;--border:#dce2ea;--primary:#245bc7}
|
|
2
|
+
*{box-sizing:border-box}body{margin:0}main{max-width:1360px;margin:auto;padding:40px 32px}h1{font-size:30px;letter-spacing:-.02em;margin:4px 0 8px}h2{font-size:18px;margin:0 0 20px}.eyebrow{font-size:11px;letter-spacing:.14em;color:#66758b;font-weight:700}.page-heading>p:last-child,.hint,footer{color:#647287;font-size:13px}.page-heading{margin-bottom:28px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px}.panel{background:#fff;border:1px solid var(--border);border-radius:10px;padding:24px}.filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}label{display:flex;flex-direction:column;gap:6px;font-size:13px}input,select,button{font:inherit;border:1px solid #cdd5e1;border-radius:5px;background:white;color:inherit;padding:8px 10px}input:focus-visible,select:focus-visible,button:focus-visible{outline:3px solid #b6d0ff;outline-offset:2px}button{cursor:pointer;font-size:13px;min-height:36px}button:hover{border-color:var(--primary)}button.primary{background:var(--primary);color:#fff;border-color:var(--primary)}input[type=checkbox]{width:16px;height:16px;padding:0;accent-color:var(--primary)}.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:22px 0 6px;font-size:12px}.toolbar>span{margin-right:auto;color:#647287}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap;font-size:13px}th,td{border-bottom:1px solid #e9edf3;padding:14px 12px}th{background:#f8fafc;font-weight:600}th:first-child,td:first-child{width:42px}.badge{display:inline-block;color:#24794e;background:#eef8f2;border-radius:4px;padding:2px 8px;font-size:12px}.badge.muted{color:#657184;background:#f0f2f5}.pagination{display:flex;align-items:center;justify-content:end;gap:10px;margin:22px 0;font-size:12px;flex-wrap:wrap}.pagination label{flex-direction:row;align-items:center}.pagination select{padding:6px}.state-reference{border-top:1px dashed var(--border);padding-top:18px;font-size:12px;color:#647287}.state-reference label{max-width:230px}.state-message{min-height:24px;margin:10px 0 0}.editor label{margin-bottom:16px}.editor input,.editor select{width:100%}.editor-actions{display:flex;justify-content:end;gap:8px;margin:22px 0}.editor ul{padding-left:18px}.editor li{margin:8px 0}footer{margin-top:22px}a{color:var(--primary)}
|
|
3
|
+
@media(max-width:1000px){.workspace{grid-template-columns:1fr}.editor{max-width:none}}@media(max-width:600px){main{padding:24px 14px}.panel{padding:18px}.filters>label{width:100%}.pagination{justify-content:start}h1{font-size:26px}}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// This reference only switches sample state text. Framework behavior belongs to the generated prototype.
|
|
3
|
+
document.querySelectorAll('[data-field-id="preview-state"]').forEach(function (control) {
|
|
4
|
+
control.addEventListener('change', function () {
|
|
5
|
+
var messages = { success: '已展示示例内容。', loading: '正在加载设备…', empty: '未找到匹配设备,可调整条件。', error: '设备加载失败,请重试;已有输入应保留。' };
|
|
6
|
+
control.closest('[data-capability-id]').querySelector('[data-preview-message]').textContent = messages[control.value];
|
|
7
|
+
});
|
|
8
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "admin-list",
|
|
4
|
+
"version": "1.2.0",
|
|
5
|
+
"regionModes": ["management-list", "edit-form"],
|
|
6
|
+
"capabilities": [
|
|
7
|
+
{
|
|
8
|
+
"id": "theme", "title": "可选命名主题", "appliesTo": ["management-list"], "requirement": "optional",
|
|
9
|
+
"parameters": {"defaultTheme": {"type": "string", "required": true, "enum": ["light"]}, "presets": {"type": "array", "required": true, "includes": ["light", "dark", "fresh", "tech"]}},
|
|
10
|
+
"scenarios": [
|
|
11
|
+
{"id": "switch", "title": "原生组件主题一致且保留业务状态", "expected": "明亮、暗黑、清新、科技按名称选择;Table/Form/Drawer/Select浮层同步,切换不重挂、不丢筛选选择与未保存输入"},
|
|
12
|
+
{"id": "persistence", "title": "实例主题偏好隔离与恢复", "expected": "独立namespace主题键,刷新恢复;同源第二实例隔离;坏缓存与拒存储安全回退"},
|
|
13
|
+
{"id": "accessibility", "title": "四主题可访问与窄屏", "expected": "实际文字对比度、键盘焦点、320/375窄屏和减少动效均可验证"}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "filter", "title": "查询与重置", "appliesTo": ["management-list"], "requirement": "required",
|
|
18
|
+
"parameters": {"resetPage": {"type": "boolean", "required": true, "enum": [true]}, "clearSelection": {"type": "boolean", "required": true, "enum": [true]}},
|
|
19
|
+
"scenarios": [
|
|
20
|
+
{"id": "query", "title": "查询命中与无结果", "expected": "条件只显示匹配记录,无匹配时显示空结果"},
|
|
21
|
+
{"id": "reset", "title": "重置查询", "expected": "条件清空、回到第一页并清空选择"}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "selection", "title": "当前页多选", "appliesTo": ["management-list"], "requirement": "required",
|
|
26
|
+
"parameters": {"strategy": {"type": "string", "required": true, "enum": ["current-page-clear-on-change"]}},
|
|
27
|
+
"scenarios": [
|
|
28
|
+
{"id": "select-page", "title": "单选、全选与部分选中", "expected": "选中数量和当前页全选状态与记录一致"},
|
|
29
|
+
{"id": "clear-on-change", "title": "换页或筛选清空选择", "expected": "翻页或重新筛选后选中数量为零"}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "pagination", "title": "分页", "appliesTo": ["management-list"], "requirement": "required",
|
|
34
|
+
"parameters": {
|
|
35
|
+
"mode": {"type": "string", "required": false, "enum": ["fixed", "adjustable"], "default": "fixed"},
|
|
36
|
+
"fixedPageSize": {"type": "integer", "required": false, "minimum": 1, "requiredInMode": "fixed"},
|
|
37
|
+
"defaultPageSize": {"type": "integer", "required": false, "minimum": 1, "requiredInMode": "adjustable"},
|
|
38
|
+
"pageSizeOptions": {"type": "array", "required": false, "items": {"type": "integer", "minimum": 1}, "minItems": 2, "uniqueItems": true, "requiredInMode": "adjustable"},
|
|
39
|
+
"minimumTestPages": {"type": "integer", "required": true, "minimum": 3}
|
|
40
|
+
},
|
|
41
|
+
"scenarios": [
|
|
42
|
+
{"id": "pages", "title": "默认容量下至少三页记录", "expected": "按固定容量或可调模式的默认容量核对首、中、末页及总数"},
|
|
43
|
+
{"id": "page-size", "title": "绑定分页容量", "expected": "fixed 只允许 fixedPageSize 且无容量切换;adjustable 只允许 defaultPageSize 与唯一正整数 pageSizeOptions,默认值必须包含其中;实际切换每个绑定选项并恢复默认值,重置页码与选择"}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "bulk", "title": "批量状态变更", "appliesTo": ["management-list"], "requirement": "required",
|
|
48
|
+
"parameters": {"target": {"type": "string", "required": true, "enum": ["selected-only"]}},
|
|
49
|
+
"scenarios": [{"id": "selected-only", "title": "批量操作正确对象", "expected": "未选择时禁用;操作只更新选中记录并反馈结果"}]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "edit", "title": "编辑表单", "appliesTo": ["edit-form"], "requirement": "required",
|
|
53
|
+
"parameters": {"presentation": {"type": "string", "required": true, "enum": ["drawer"]}, "preserveOnFailure": {"type": "boolean", "required": true, "enum": [true]}},
|
|
54
|
+
"scenarios": [
|
|
55
|
+
{"id": "validation", "title": "必填校验", "expected": "空名称不保存并定位错误"},
|
|
56
|
+
{"id": "save", "title": "保存同步", "expected": "保存后列表中的正确记录更新,其他记录不变"},
|
|
57
|
+
{"id": "retry", "title": "提交失败与重试", "expected": "失败保留输入,重试成功后同步列表"},
|
|
58
|
+
{"id": "drawer-motion", "title": "抽屉进入退出与模糊遮罩", "expected": "进入退出动画完整,关闭后恢复焦点和滚动,遮罩实际具有滤镜"}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "feedback", "title": "数据状态与反馈", "appliesTo": ["management-list", "edit-form"], "requirement": "required",
|
|
63
|
+
"parameters": {"states": {"type": "array", "required": true, "includesByMode": {"management-list": ["loading", "empty", "error", "success"], "edit-form": ["loading", "error", "success"]}}},
|
|
64
|
+
"scenarios": [{"id": "states", "title": "适用状态可触发并恢复", "expected": "绑定 states 中的各状态可确定性触发;失败后保留必要输入,恢复后显示正确数据"}]
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>管理列表 · 内容模板</title>
|
|
7
|
+
<link rel="stylesheet" href="assets/reference.css">
|
|
8
|
+
<script src="assets/reference.js" defer></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<!-- 修改文案、字段或排列即可预览;page/region 身份保持稳定。复制区域请生成新的 region-id。 -->
|
|
12
|
+
<main data-page-id="devices">
|
|
13
|
+
<header class="page-heading">
|
|
14
|
+
<p class="eyebrow">ADMIN LIST / CONTENT REFERENCE</p>
|
|
15
|
+
<h1>设备管理</h1>
|
|
16
|
+
<p data-content-id="page-description">管理设备档案与运行状态。此页是可编辑的内容参考,最终原型由目标框架生成。</p>
|
|
17
|
+
</header>
|
|
18
|
+
|
|
19
|
+
<div class="workspace">
|
|
20
|
+
<section class="panel" data-region-id="device-list" data-region-mode="management-list" aria-labelledby="list-title">
|
|
21
|
+
<h2 id="list-title">设备清单</h2>
|
|
22
|
+
<!-- OPTIONAL_FOUR_THEMES: 用户明确要求四主题时,在项目工作副本中解开下面这一段注释,再按 readme.md 补充 scope 来源并同步。
|
|
23
|
+
<aside data-capability-id="theme" data-capability-parameters='{"defaultTheme":"light","presets":["light","dark","fresh","tech"]}'>
|
|
24
|
+
页面主题:明亮、暗黑、清新、科技;首次默认明亮。
|
|
25
|
+
</aside>
|
|
26
|
+
-->
|
|
27
|
+
<div class="filters" data-capability-id="filter" data-capability-parameters='{"resetPage":true,"clearSelection":true}'>
|
|
28
|
+
<label>设备名称<input data-field-id="query-name" placeholder="输入设备名称"></label>
|
|
29
|
+
<label>设备状态<select data-field-id="query-status"><option>全部状态</option><option>运行中</option><option>已停用</option></select></label>
|
|
30
|
+
<button class="primary" data-action-id="query" type="button">查询</button>
|
|
31
|
+
<button data-action-id="reset-query" type="button">重置</button>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="toolbar" data-capability-id="bulk" data-capability-parameters='{"target":"selected-only"}'>
|
|
35
|
+
<span>批量操作只影响选中记录</span>
|
|
36
|
+
<button data-action-id="bulk-disable" type="button">批量停用</button>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div data-capability-id="selection" data-capability-parameters='{"strategy":"current-page-clear-on-change"}'>
|
|
40
|
+
<p class="hint">已选择 <strong>0</strong> 项 · 翻页或筛选后清空选择</p>
|
|
41
|
+
<div class="table-scroll">
|
|
42
|
+
<table>
|
|
43
|
+
<thead><tr>
|
|
44
|
+
<th><input type="checkbox" data-field-id="select-page" aria-label="选择当前页"></th>
|
|
45
|
+
<th data-field-id="device-code">设备编号</th>
|
|
46
|
+
<th data-field-id="device-name">设备名称</th>
|
|
47
|
+
<th data-field-id="device-category">分类</th>
|
|
48
|
+
<th data-field-id="device-status">状态</th>
|
|
49
|
+
</tr></thead>
|
|
50
|
+
<tbody>
|
|
51
|
+
<tr><td><input type="checkbox" data-field-id="select-example-1" aria-label="选择示例设备一"></td><td>DEV-001</td><td>一号循环泵</td><td>循环泵</td><td><span class="badge">运行中</span></td></tr>
|
|
52
|
+
<tr><td><input type="checkbox" data-field-id="select-example-2" aria-label="选择示例设备二"></td><td>DEV-002</td><td>二号换热器</td><td>换热器</td><td><span class="badge muted">已停用</span></td></tr>
|
|
53
|
+
</tbody>
|
|
54
|
+
</table>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<nav class="pagination" aria-label="列表分页" data-capability-id="pagination" data-capability-parameters='{"fixedPageSize":10,"minimumTestPages":3}'>
|
|
59
|
+
<span>共 21 条</span><button data-action-id="previous-page" type="button">上一页</button>
|
|
60
|
+
<span aria-current="page">1 / 3</span><button data-action-id="next-page" type="button">下一页</button>
|
|
61
|
+
<span>每页 10 条</span>
|
|
62
|
+
</nav>
|
|
63
|
+
|
|
64
|
+
<div class="state-reference" data-capability-id="feedback" data-capability-parameters='{"states":["loading","empty","error","success"]}'>
|
|
65
|
+
<label>数据状态示例<select data-field-id="preview-state"><option value="success">正常</option><option value="loading">加载</option><option value="empty">空结果</option><option value="error">失败</option></select></label>
|
|
66
|
+
<p class="state-message" role="status" data-preview-message>已展示示例内容。</p>
|
|
67
|
+
</div>
|
|
68
|
+
</section>
|
|
69
|
+
|
|
70
|
+
<aside class="panel editor" data-region-id="device-editor" data-region-mode="edit-form" aria-labelledby="editor-title">
|
|
71
|
+
<div data-capability-id="edit" data-capability-parameters='{"presentation":"drawer","preserveOnFailure":true}'>
|
|
72
|
+
<h2 id="editor-title">编辑设备</h2>
|
|
73
|
+
<button data-action-id="edit" type="button">编辑</button>
|
|
74
|
+
<p class="hint">最终原型以右侧抽屉呈现,并保留完整进入、退出和焦点恢复。</p>
|
|
75
|
+
<label>设备编号<input data-field-id="edit-code" value="DEV-001" readonly></label>
|
|
76
|
+
<label>设备名称 <span aria-label="必填">*</span><input data-field-id="edit-name" value="一号循环泵" required></label>
|
|
77
|
+
<label>分类<select data-field-id="edit-category"><option>循环泵</option><option>换热器</option><option>传感器</option></select></label>
|
|
78
|
+
<label>状态<select data-field-id="edit-status"><option>运行中</option><option>已停用</option></select></label>
|
|
79
|
+
<div class="editor-actions"><button data-action-id="cancel-edit" type="button">取消</button><button data-action-id="save-edit" class="primary" type="button">保存</button></div>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="state-reference" data-capability-id="feedback" data-capability-parameters='{"states":["loading","error","success"]}'>
|
|
82
|
+
<p>提交结果示例</p><ul><li>处理中:按钮显示提交状态。</li><li>失败:保留输入并可重试。</li><li>成功:更新正确记录并关闭抽屉。</li></ul>
|
|
83
|
+
</div>
|
|
84
|
+
</aside>
|
|
85
|
+
</div>
|
|
86
|
+
<footer>修改后可直接刷新;生成前运行模板同步,核对内容与能力绑定。</footer>
|
|
87
|
+
</main>
|
|
88
|
+
</body>
|
|
89
|
+
</html>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 管理列表内容模板
|
|
2
|
+
|
|
3
|
+
双击 `index.html` 可离线查看;直接修改 HTML,再刷新页面即可预览。安装包中的文件是起点,日常编辑项目里的 `ui-templates/admin-list/` 工作副本;重新准备模板不会覆盖已有副本。
|
|
4
|
+
|
|
5
|
+
## 首期内容投影
|
|
6
|
+
|
|
7
|
+
同步后,新建的 Vue+antDv-next 原型会把以下内容写入自己的 `app/public/prototype-config.json`,由真实组件读取并展示:
|
|
8
|
+
|
|
9
|
+
- 页面首个 `h1` 标题,以及 `data-content-id="page-description"` 的说明。
|
|
10
|
+
- 两个区域的首个 `h2`,分别作为列表与编辑标题。
|
|
11
|
+
- 现有表头、筛选字段与编辑字段的可见标签。支持包裹式 `label`、`label for`、嵌套文字和 HTML 字符实体;`data-label` 可明确覆盖标签。
|
|
12
|
+
- 已有输入框的 placeholder;设备名称必填规则继续保留。
|
|
13
|
+
- 查询、重置、批量停用、编辑、保存、取消、上一页和下一页的可见文案。
|
|
14
|
+
|
|
15
|
+
`page-id`、`region-id`、`field-id`、`action-id` 是稳定身份,改文案时保留它们。内容绑定在生成实例时固定;之后再改模板,只影响明确使用新模板创建的候选,不会更新已有原型。
|
|
16
|
+
|
|
17
|
+
首期不是通用 HTML 到 Vue 编译器。新增或删除页面、区域、字段、操作,改字段含义、枚举值、数据模式、列顺序或行为参数时,需要主会话执行者明确适配框架代码、能力映射与验收。未知字段/操作、缺少首期必需项和删除名称必填会阻止初始化,避免内容静默消失。HTML 的 CSS 与普通 JS 只服务内容参考;生成工程采用真实框架样式和行为。
|
|
18
|
+
|
|
19
|
+
示例行、选择框和数据状态下拉用于参考预览;固定 21 条设备数据及其状态逻辑由原型演示需求定义。分类、状态文案与数据枚举的变更需要显式业务映射,不凭选项文字自动猜测。
|
|
20
|
+
|
|
21
|
+
## 同步与生成
|
|
22
|
+
|
|
23
|
+
修改 HTML 后先执行 `sync-template.cjs <模板工作目录>`;只读核对使用 `--check`。不同宿主通过 i3-ui-prototype Skill 提供的统一入口运行这些步骤。同步会重新检查身份、能力参数和索引摘要;通过后才能创建新候选。索引是派生产物,不直接编辑。
|
|
24
|
+
|
|
25
|
+
## 按本次需求启用四主题
|
|
26
|
+
|
|
27
|
+
默认 HTML 不绑定主题,旧 HTML、v1 和未绑定主题的 v2 实例保持原行为。本次用户要求“明亮、暗黑、清新、科技,默认明亮,页面内选择”时,先准备项目工作副本,在 `devices/device-list` 下找到 `OPTIONAL_FOUR_THEMES` 注释,仅去掉包住 `aside` 的注释边界,保留这段内容:
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<aside data-capability-id="theme" data-capability-parameters='{"defaultTheme":"light","presets":["light","dark","fresh","tech"]}'>
|
|
31
|
+
页面主题:明亮、暗黑、清新、科技;首次默认明亮。
|
|
32
|
+
</aside>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
在本次 `scope.json` 的 `requirements` 中保留已有需求并追加下列结构;`source.reference` 填本次真实用户消息或需求文件的准确定位,`statement` 保留确认的需求原意:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"id": "THEME-01",
|
|
40
|
+
"text": "页面可选择明亮、暗黑、清新、科技四主题,首次默认明亮",
|
|
41
|
+
"source": {
|
|
42
|
+
"type": "user",
|
|
43
|
+
"reference": "<本次真实需求的准确定位>",
|
|
44
|
+
"statement": "本次生成原型四主题可页面选择:明亮、暗黑、清新、科技,默认明亮"
|
|
45
|
+
},
|
|
46
|
+
"capabilities": [{"pageId":"devices","regionId":"device-list","capabilityId":"theme"}]
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
同步、只读检查工作模板,再用该工作目录和 `--scope <本次scope.json>` 创建新实例。生成结果读取固定绑定,使用真实 antDv-next `ConfigProvider`、`Select` 和语义 token;页面与抽屉内均有主题选择,浮层跟随主题。离线 HTML 仍可双击编辑,这段文字本身不模拟原生换肤。
|
|
51
|
+
|
|
52
|
+
固定验收从基础 20 项增加到 23 项;额外三项验证四主题效果、偏好持久化与隔离、可访问性,并核对第二页、筛选、选择和抽屉未保存输入保持。新模板不会更新旧实例;已有实例新增主题必须按已授权范围显式 `revise --accept-inputs`,不能只改运行配置。
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
{
|
|
24
24
|
"prompt": "按照现有任务计划增量实现 CSV 导出,每个切片都验证。",
|
|
25
25
|
"owner": "i3-incremental-implementation"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"prompt": "选择 UI 原型模板,制作一个可操作的申请审批交互原型供评审。",
|
|
29
|
+
"owner": "i3-ui-prototype"
|
|
26
30
|
}
|
|
27
31
|
]
|
|
28
32
|
},
|
|
@@ -40,6 +44,19 @@
|
|
|
40
44
|
"Component state is managed deliberately rather than ad hoc",
|
|
41
45
|
"人类可读的追问、说明、进度、报告与生成文档使用简体中文;保留代码、路径、工具参数、JSON 协议及机器状态的原始格式。"
|
|
42
46
|
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": 1002,
|
|
50
|
+
"kind": "dialogue",
|
|
51
|
+
"prompt": "已认可的生产设计需要实现为可复用、可访问的 Vue 表单组件。另有产品负责人希望根据可编辑 HTML 参考制作交互评审原型。请说明两个请求各由哪项工作流负责,以及前端实现方法如何支持原型工作。不执行任何实现。",
|
|
52
|
+
"expected_output": "Production frontend ownership and prototype support are distinguished without duplicating or replacing either workflow",
|
|
53
|
+
"expectations": [
|
|
54
|
+
"Production component implementation remains in the frontend implementation method and the existing engineering workflow",
|
|
55
|
+
"The review-prototype request belongs to the prototype workflow in the main session, where frontend guidance can support actual interface implementation",
|
|
56
|
+
"Frontend guidance does not require creating a prototype, installing a dedicated prototype role or changing its general method",
|
|
57
|
+
"Prototype-specific version, baseline and acceptance ownership stays with the prototype workflow; no runtime work or human approval is invented",
|
|
58
|
+
"人类可读的追问、说明、进度、报告与生成文档使用简体中文;保留代码、路径、工具参数、JSON 协议及机器状态的原始格式。"
|
|
59
|
+
]
|
|
43
60
|
}
|
|
44
61
|
]
|
|
45
62
|
}
|