diff --git a/docs/design/ui/README.md b/docs/design/ui/README.md index 387d967..a0b549c 100644 --- a/docs/design/ui/README.md +++ b/docs/design/ui/README.md @@ -46,13 +46,13 @@ ## 二、索引 -### Wireframes(静态线框图,10 张) +### Wireframes(静态线框图,10 + 5 张) | # | 文件 | 主题 | |---|------|------| | 1 | [main-three-pane.md](./wireframes/01-main-three-pane.md) | 主视图(侧边栏 + 聊天 + Artifact) | | 2 | [setup-wizard.md](./wireframes/02-setup-wizard.md) | 首次启动 4 步向导 | -| 3 | [settings.md](./wireframes/03-settings.md) | 设置页(General / Provider / Shortcuts / Experimental) | +| 3 | [settings.md](./wireframes/03-settings.md) | 设置页(通用 / 供应商 / 快捷键 / 实验性) | | 4 | [slash-command-palette.md](./wireframes/04-slash-command-palette.md) | 斜杠命令浮层 | | 5 | [artifact-panel-expanded.md](./wireframes/05-artifact-panel-expanded.md) | Artifact 全屏详情 | | 6 | [provider-switcher.md](./wireframes/06-provider-switcher.md) | 供应商切换浮层 | @@ -60,6 +60,8 @@ | 8 | [conversation-context-menu.md](./wireframes/08-conversation-context-menu.md) | 会话右键菜单 + 收藏 + 分组 | | 9 | [empty-states.md](./wireframes/09-empty-states.md) | 各种空状态 | | 10 | [env-status-bar.md](./wireframes/10-env-status-bar.md) | 持久化环境健康状态栏 | +| **11** | [**登录**](./wireframes/11-login.md) | 企业 SSO + IM 扫码 + 账号密码(Sprint 6 新增) | +| **12-15** | [**四大场景工作流**](./wireframes/12-15-workflow-scenes.md) | 业务/开发/测试/运维 角色视角(Sprint 6 新增) | ### Interaction Flows(交互流程,5 个 Mermaid) diff --git a/docs/design/ui/prototype/01-main-three-pane.html b/docs/design/ui/prototype/01-main-three-pane.html index d2c4539..cba6ac8 100644 --- a/docs/design/ui/prototype/01-main-three-pane.html +++ b/docs/design/ui/prototype/01-main-three-pane.html @@ -15,11 +15,41 @@
⚠️ 以下功能不稳定,启用前请知悉风险
Phase 2 简化方案: 本地单用户,登录时记录身份 + 选择角色(产品/开发/测试/运维),用于场景工作流的个性化显示。
+Phase 3 企业集成: 接入企业 SSO (OIDC / SAML),从 HR 系统拉取用户基本信息 + 角色 + 团队,打通企业微信/钉钉的身份。
++ 基于需求采集结果,撰写结构化 PRD。推荐用 + PRD 模板 + 作为起点,然后配合右侧的"智能操作"加速。 +
+ +/prd docs/prd/v1.0.md
+ 点击卡片 → 填写简单参数 → AI 自动执行。来自 skills/business/ 的 6 个 Prompt 模板。
+
从需求访谈笔记生成结构化 PRD
+ ++ 对技术选型、架构变更、重要 trade-off 写 Architecture Decision Record(ADR),记录决策过程和备选方案, + 让后人看得懂"当年为什么这么选"。 +
+ +templates/development/adr-template.md/adr index 更新索引
+ 来自 skills/development/ 的 7 个 Prompt 模板。
+
/linkage prd-to-design/linkage regression 推荐回归requirements: [REQ-005])/linkage regression 能自动推荐回归用例/coverage-analysis,确认无悬空/遗漏
+ 来自 skills/testing/ 的 8 个 Prompt 模板。
+
/linkage release-plan 自动生成发布计划/linkage regression 推荐回归HighErrorRate + P99LatencyHigh(已转发到企业微信)
+
+ 来自 skills/operations/ 的 8 个 Prompt 模板。
+
10 个核心页面的可交互 HTML 原型。点击卡片预览。
+15 个可交互 HTML 原型(10 个功能页 + 1 个登录 + 4 个场景工作流)。点击卡片预览。
📚 配套文档: 设计稿索引 · @@ -132,6 +132,42 @@
+ 每个场景有"时序→当前步骤→Prompt 一键操作"三栏布局。Prompt 来自 skills/ 目录的 29 个模板,变成表单化可点执行。
+
产品 · BA · 6 步: 需求采集 → PRD → 可测性 → 规则 → 冲突 → 归档
+ + +开发 · 架构 · 7 步: 澄清 → 设计 → ADR → API → 编码 → 评审 → 提测
+ + +测试 · QA · 6 步: 可测性 → 策略 → 用例 → 提测审核 → 执行 → 准出
+ + +SRE · On-call · 6 步: 发布计划 → Runbook → 发布 → 事件响应 → 复盘 → 改进
+ +
5 个关键交互流程图见 interaction-flows/(在 GitHub / 文档站可直接预览 Mermaid)。
diff --git a/docs/design/ui/prototype/prototype-modules-map.md b/docs/design/ui/prototype/prototype-modules-map.md
index 41e3f4b..4f5c8ea 100644
--- a/docs/design/ui/prototype/prototype-modules-map.md
+++ b/docs/design/ui/prototype/prototype-modules-map.md
@@ -20,6 +20,11 @@
| 08 | [会话右键菜单](./08-conversation-context-menu.html) | 收藏 / 分组 / 多选 / 删除 | 会话管理 | `SidebarView.swift`
`FavoritesManager.swift`
`ConversationStore.swift` | - |
| 09 | [空状态合集](./09-empty-states.html) | 引导 + 提示 + 错误恢复 | 兜底与教育 | 分散在上述各组件 | - |
| 10 | [环境状态栏](./10-env-status-bar.html) | 持久化健康提示 | 全局状态监控 | `EHUBInfoBar.swift` (需扩展)
`EnvironmentChecker.swift` | `platforms/*/scripts/check-environment.*` |
+| **11** | [**登录**](./11-login.html) | 身份 + 角色 | 登录/切换角色/退出 | **新增** `LoginView.swift`
`AuthManager.swift`
`RoleContext.swift` | - |
+| **12** | [**业务工作流**](./12-workflow-business.html) | 产品视角时序 | 需求→PRD→归档 · 6 步 | **新增** `WorkflowView.swift`
`PromptRegistry.swift`
`PromptRunner.swift` | `skills/business/` 6 个 prompt |
+| **13** | [**开发工作流**](./13-workflow-development.html) | 开发视角 | 设计→ADR→合入 · 7 步 | 共用 `WorkflowView.swift` | `skills/development/` 7 个 prompt |
+| **14** | [**测试工作流**](./14-workflow-testing.html) | 测试视角 | 策略→用例→准出 · 6 步 | 共用 | `skills/testing/` 8 个 prompt |
+| **15** | [**运维工作流**](./15-workflow-operations.html) | 运维视角 | 发布→事件→复盘 · 6 步 | 共用 | `skills/operations/` 8 个 prompt |
---
diff --git a/docs/design/ui/prototype/styles.css b/docs/design/ui/prototype/styles.css
index 900a406..0af544b 100644
--- a/docs/design/ui/prototype/styles.css
+++ b/docs/design/ui/prototype/styles.css
@@ -489,3 +489,309 @@ a:hover { text-decoration: underline; }
}
.proto-banner a { color: white; text-decoration: underline; }
body.with-banner .app { padding-top: 32px; }
+
+/* ============ 用户菜单(Sprint 6 新增) ============ */
+
+.user-chip {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--sp-2);
+ padding: var(--sp-1) var(--sp-3);
+ border-radius: var(--radius-md);
+ cursor: pointer;
+ border: 1px solid transparent;
+}
+.user-chip:hover {
+ background: var(--color-bg-hover);
+ border-color: var(--color-border);
+}
+.user-avatar {
+ width: 24px; height: 24px;
+ border-radius: 50%;
+ display: flex; align-items: center; justify-content: center;
+ color: white;
+ font-size: var(--fs-xs);
+ font-weight: 600;
+ background: var(--color-primary);
+ flex-shrink: 0;
+}
+.user-avatar.lg { width: 40px; height: 40px; font-size: var(--fs-md); }
+.user-name { font-weight: 500; font-size: var(--fs-sm); }
+.user-role { font-size: var(--fs-xs); color: var(--color-text-muted); }
+
+.user-menu {
+ position: absolute;
+ right: var(--sp-4);
+ top: calc(var(--topbar-height) + 4px);
+ background: var(--color-bg);
+ border: 1px solid var(--color-border);
+ border-radius: var(--radius-md);
+ box-shadow: var(--shadow-lg);
+ min-width: 260px;
+ z-index: 50;
+ padding: var(--sp-2) 0;
+}
+.user-menu-header {
+ padding: var(--sp-3) var(--sp-4);
+ border-bottom: 1px solid var(--color-border);
+ display: flex;
+ gap: var(--sp-3);
+ align-items: center;
+}
+.user-menu-item {
+ display: grid;
+ grid-template-columns: 1fr auto;
+ gap: var(--sp-3);
+ padding: var(--sp-2) var(--sp-4);
+ cursor: pointer;
+ font-size: var(--fs-md);
+}
+.user-menu-item:hover { background: var(--color-bg-hover); }
+.user-menu-sep { height: 1px; background: var(--color-border); margin: var(--sp-1) 0; }
+
+/* ============ 工作流页面(Sprint 6 新增) ============ */
+
+.workflow-page {
+ min-height: 100vh;
+ padding-top: 32px;
+ background: var(--color-bg-alt);
+ display: grid;
+ grid-template-columns: 280px 1fr 320px;
+ grid-template-rows: 60px 1fr;
+ grid-template-areas: "header header header" "timeline content tools";
+ height: 100vh;
+}
+
+.workflow-header {
+ grid-area: header;
+ background: var(--color-bg);
+ border-bottom: 1px solid var(--color-border);
+ padding: 0 var(--sp-5);
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.workflow-header .title { display: flex; align-items: center; gap: var(--sp-3); }
+.workflow-header .title-icon { font-size: var(--fs-2xl); }
+.workflow-header .title-main { font-size: var(--fs-xl); font-weight: 600; }
+.workflow-header .title-sub { font-size: var(--fs-sm); color: var(--color-text-muted); }
+
+.workflow-timeline {
+ grid-area: timeline;
+ background: var(--color-bg);
+ border-right: 1px solid var(--color-border);
+ padding: var(--sp-4);
+ overflow-y: auto;
+}
+.timeline-title {
+ font-size: var(--fs-xs);
+ color: var(--color-text-muted);
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ font-weight: 600;
+ margin-bottom: var(--sp-3);
+}
+.timeline-step {
+ position: relative;
+ padding: var(--sp-3) var(--sp-3) var(--sp-3) 40px;
+ border-radius: var(--radius-md);
+ cursor: pointer;
+ margin-bottom: var(--sp-1);
+}
+.timeline-step:hover { background: var(--color-bg-hover); }
+.timeline-step.active { background: var(--color-primary-lightest); }
+.timeline-step.done { opacity: 0.7; }
+
+.timeline-step::before {
+ content: attr(data-step);
+ position: absolute;
+ left: var(--sp-3);
+ top: var(--sp-3);
+ width: 24px; height: 24px;
+ border-radius: 50%;
+ background: var(--color-bg-hover);
+ border: 2px solid var(--color-border);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: var(--fs-xs);
+ font-weight: 700;
+ color: var(--color-text-muted);
+}
+.timeline-step.active::before {
+ background: var(--color-primary);
+ border-color: var(--color-primary);
+ color: white;
+}
+.timeline-step.done::before {
+ content: '✓';
+ background: var(--color-success);
+ border-color: var(--color-success);
+ color: white;
+}
+
+.timeline-step::after {
+ content: '';
+ position: absolute;
+ left: 23px;
+ top: 44px;
+ bottom: -4px;
+ width: 2px;
+ background: var(--color-border);
+}
+.timeline-step:last-child::after { display: none; }
+
+.timeline-step-title { font-weight: 500; font-size: var(--fs-md); }
+.timeline-step-meta { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; }
+
+.workflow-content {
+ grid-area: content;
+ overflow-y: auto;
+ padding: var(--sp-6);
+}
+.workflow-content h2 {
+ font-size: var(--fs-xl);
+ margin-bottom: var(--sp-4);
+}
+.workflow-content h3 {
+ font-size: var(--fs-lg);
+ margin-top: var(--sp-5);
+ margin-bottom: var(--sp-3);
+}
+
+.checklist-item {
+ display: flex;
+ gap: var(--sp-3);
+ padding: var(--sp-3);
+ border: 1px solid var(--color-border);
+ border-radius: var(--radius-md);
+ margin-bottom: var(--sp-2);
+ background: var(--color-bg);
+}
+.checklist-item input { margin-top: 3px; }
+.checklist-item-title { font-weight: 500; }
+.checklist-item-hint { font-size: var(--fs-sm); color: var(--color-text-muted); margin-top: 2px; }
+
+.workflow-tools {
+ grid-area: tools;
+ background: var(--color-bg);
+ border-left: 1px solid var(--color-border);
+ padding: var(--sp-4);
+ overflow-y: auto;
+}
+.tools-title {
+ font-size: var(--fs-xs);
+ color: var(--color-text-muted);
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ font-weight: 600;
+ margin-bottom: var(--sp-3);
+}
+
+.prompt-action-card {
+ padding: var(--sp-3);
+ border: 1px solid var(--color-border);
+ border-radius: var(--radius-md);
+ margin-bottom: var(--sp-2);
+ background: var(--color-bg);
+ cursor: pointer;
+ transition: all 0.2s;
+}
+.prompt-action-card:hover {
+ border-color: var(--color-primary);
+ transform: translateY(-1px);
+ box-shadow: var(--shadow-sm);
+}
+.prompt-action-card .icon { font-size: var(--fs-lg); margin-bottom: var(--sp-1); }
+.prompt-action-card .name { font-weight: 600; font-size: var(--fs-md); }
+.prompt-action-card .desc { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; }
+.prompt-action-card .meta {
+ margin-top: var(--sp-2);
+ display: flex;
+ gap: var(--sp-2);
+ font-size: var(--fs-xs);
+}
+.tag {
+ padding: 1px 6px;
+ background: var(--color-bg-hover);
+ border-radius: var(--radius-sm);
+ font-size: var(--fs-xs);
+ color: var(--color-text-muted);
+}
+
+/* Prompt 运行弹窗 */
+.prompt-modal .field { margin-bottom: var(--sp-3); }
+.prompt-modal .preview {
+ padding: var(--sp-3);
+ background: var(--color-bg-alt);
+ border-radius: var(--radius-md);
+ font-family: var(--font-mono);
+ font-size: var(--fs-xs);
+ white-space: pre-wrap;
+ line-height: 1.6;
+ max-height: 200px;
+ overflow-y: auto;
+ border: 1px solid var(--color-border);
+}
+
+/* 登录页 */
+.login-wrap {
+ min-height: 100vh;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 80px 16px 40px;
+ background: linear-gradient(135deg, #eef3ff 0%, #fff 100%);
+}
+.login-card {
+ width: 420px;
+ max-width: 100%;
+ background: var(--color-bg);
+ border-radius: var(--radius-xl);
+ padding: var(--sp-8) var(--sp-6);
+ box-shadow: var(--shadow-lg);
+}
+.login-logo {
+ text-align: center;
+ font-size: 40px;
+ margin-bottom: var(--sp-3);
+}
+.login-title {
+ font-size: var(--fs-2xl);
+ font-weight: 700;
+ text-align: center;
+ margin-bottom: var(--sp-1);
+}
+.login-sub {
+ text-align: center;
+ color: var(--color-text-muted);
+ margin-bottom: var(--sp-6);
+}
+.sso-btn {
+ display: flex;
+ align-items: center;
+ gap: var(--sp-3);
+ width: 100%;
+ padding: var(--sp-3);
+ border: 1px solid var(--color-border);
+ border-radius: var(--radius-md);
+ background: var(--color-bg);
+ cursor: pointer;
+ margin-bottom: var(--sp-2);
+ font-size: var(--fs-md);
+}
+.sso-btn:hover { background: var(--color-bg-hover); }
+.divider {
+ display: flex;
+ align-items: center;
+ gap: var(--sp-3);
+ margin: var(--sp-5) 0;
+ color: var(--color-text-muted);
+ font-size: var(--fs-xs);
+}
+.divider::before, .divider::after {
+ content: '';
+ flex: 1;
+ height: 1px;
+ background: var(--color-border);
+}
diff --git a/docs/design/ui/wireframes/11-login.md b/docs/design/ui/wireframes/11-login.md
new file mode 100644
index 0000000..113b339
--- /dev/null
+++ b/docs/design/ui/wireframes/11-login.md
@@ -0,0 +1,87 @@
+# Wireframe 11 · 登录(Sprint 6 新增)
+
+> Phase 2 引入用户身份。现阶段支持简单本地账号 + 预留企业 SSO 接口。
+
+## 布局(单页居中卡片)
+
+```
+ ┌───────────────────────────────────────┐
+ │ │
+ │ 🚀 │
+ │ EP Code AI │
+ │ 企业级 AI 研发助手 │
+ │ │
+ │ ┌──────────────────────────────────┐ │
+ │ │ 🏢 企业账号登录 → │ │ ← SSO 主入口(OIDC/SAML)
+ │ │ 通过公司统一身份 │ │
+ │ └──────────────────────────────────┘ │
+ │ ┌──────────────────────────────────┐ │
+ │ │ 💬 企业微信/钉钉/飞书 → │ │ ← IM 扫码
+ │ │ 扫码登录 │ │
+ │ └──────────────────────────────────┘ │
+ │ │
+ │ ─────── 或使用账号密码 ─────── │
+ │ │
+ │ 工号/邮箱 [_________________] │
+ │ 密码 [_________________] │
+ │ │
+ │ [✓] 保持登录 7 天 [忘记密码?] │
+ │ │
+ │ ┌──────────────────────────────────┐ │
+ │ │ 登 录 │ │
+ │ └──────────────────────────────────┘ │
+ │ │
+ │ 登录即同意 用户协议 / 隐私政策 │
+ └───────────────────────────────────────┘
+```
+
+## 分阶段落地
+
+| 阶段 | 能力 | 实现复杂度 |
+|------|------|----------|
+| **Phase 2 · Sprint 6-8** | 本地单用户 + 手动选角色 | 低 · Swift Keychain 存账号 |
+| **Phase 2 · Sprint 9-10** | 企业微信/钉钉/飞书扫码登录 | 中 · OAuth2 flow |
+| **Phase 3** | OIDC / SAML SSO(正规企业接入) | 高 · 需要服务端(PLAN ④) |
+| **Phase 3** | 从 HR 系统拉角色 / 团队 / 权限 | 高 · 服务端 + 企业权限体系 |
+
+## 登录后记录的用户字段
+
+```ts
+interface User {
+ id: string; // 工号(企业)或 UUID(本地)
+ name: string; // 显示名
+ email: string; // 邮箱
+ avatar?: string; // 头像(从 SSO 或用户上传)
+ roles: Role[]; // 主/副角色: 产品 / 开发 / 测试 / 运维
+ team?: string; // 团队(Phase 3 从 HR 拉)
+ department?: string; // 部门
+ lastLoginAt: Date;
+ device: {
+ os: string;
+ version: string;
+ fingerprint: string; // 审计用
+ };
+}
+type Role = 'product' | 'dev' | 'test' | 'ops' | 'other';
+```
+
+## 角色对工作流的影响
+
+登录时选择的主角色决定顶栏默认导航:
+
+- 选 **产品** → 顶栏左侧默认高亮 "💼 业务"
+- 选 **开发** → "💻 开发"
+- 选 **测试** → "🧪 测试"
+- 选 **运维** → "🚀 运维"
+
+角色可随时切换(用户菜单 → 🎭 切换角色 · `⌘⇧R`),不重启应用。
+
+## 安全
+
+- 密码本地存 Keychain (macOS) / Credential Manager (Windows) / libsecret (Linux)
+- SSO token 刷新策略: 有效期 7 天,刷新窗口 14 天
+- 首次登录设备记录 + 新设备登录通知(Phase 3)
+
+## 下一步
+- Sprint 7: macOS 实现本地单用户版,UI 参照本原型
+- Sprint 9: 服务端 RFC (PLAN § ④) 里细化 SSO / 审计 / 会话管理
diff --git a/docs/design/ui/wireframes/12-15-workflow-scenes.md b/docs/design/ui/wireframes/12-15-workflow-scenes.md
new file mode 100644
index 0000000..f5fec7d
--- /dev/null
+++ b/docs/design/ui/wireframes/12-15-workflow-scenes.md
@@ -0,0 +1,147 @@
+# Wireframe 12-15 · 四大场景工作流(Sprint 6 新增)
+
+> 每个场景一个页面,帮用户按方法论**顺序走完**该角色应做的所有动作。
+> Prompt 模板不是让用户"复制粘贴到 Claude",而是做成表单化按钮 → 点击 → 表单填参数 → 后台组合发送。
+
+## 共同布局(三栏 + 顶栏)
+
+```
+┌──────────────────────────────────────────────────────────────────────────────┐
+│ [场景图标] 场景名 用户身份 · 当前项目 ────────── │ ① 顶栏:场景身份信息
+├──────────────┬────────────────────────────────────┬──────────────────────────┤
+│ 📍 时序 │ 当前步骤详情 │ ✨ 智能操作(Prompt) │
+│ │ │ │
+│ 1 ✓ Step1 │ h2 当前步骤标题 │ 📝 Prompt 卡 1 │ ② 中栏:步骤
+│ 2 ✓ Step2 │ │ 📋 Prompt 卡 2 │ 详情 + 当前
+│ 3 ● Step3 │ ✅ Checklist: │ 🧪 Prompt 卡 3 │ Checklist +
+│ 4 ○ Step4 │ [✓] 项 1 │ ... │ 快速操作
+│ 5 ○ Step5 │ [ ] 项 2 │ │
+│ 6 ○ Step6 │ [ ] 项 3 │ 💡 跨场景联动提示 │ ③ 右栏:该阶段
+│ │ │ │ 可用的 AI 工具
+│ │ 📄 本阶段产出物 │ │
+│ │ [Artifact 卡] │ │
+│ │ │ │
+│ │ 💡 下一步 │ │
+│ │ [按钮 1] [按钮 2] │ │
+└──────────────┴────────────────────────────────────┴──────────────────────────┘
+ 280px flex 320px
+```
+
+## 四个场景具体时序
+
+### 12 · 💼 业务场景(产品/BA)
+
+| 步 | 阶段 | 关键产出 | Prompt 工具 |
+|----|------|---------|-----------|
+| 1 | 需求采集 | 访谈笔记 | - |
+| 2 | PRD 编写 | prd-vX.Y.md | 生成 PRD 初稿 · 拆用户故事 |
+| 3 | 可测性评审 | testability-report.md | PRD 可测性评审 |
+| 4 | 业务规则固化 | business-rules.md | 业务规则转表格 |
+| 5 | 冲突检测 & 变更 | change-log.md | 需求冲突检测 · 变更影响分析 |
+| 6 | 评审通过 & 归档 | PRD Accepted | - |
+
+### 13 · 💻 开发场景(开发/架构师)
+
+| 步 | 阶段 | 关键产出 | Prompt 工具 |
+|----|------|---------|-----------|
+| 1 | 接需求 · 澄清 | - | - |
+| 2 | 技术方案设计 | design-v1.md | 设计文档起草 |
+| 3 | ADR 决策 | ADR-NNNN.md | ADR 起草 |
+| 4 | API 契约对齐 | api-contract.md | 从代码反向生成 API · 契约冲突检测 |
+| 5 | 编码 · 自测 | PR | - |
+| 6 | 代码评审 · 合入 | review 记录 | 代码评审清单生成 |
+| 7 | 提测 · 发版说明 | Release Note | Release Note 生成 · 依赖升级风险分析 |
+
+### 14 · 🧪 测试场景(测试/QA)
+
+| 步 | 阶段 | 关键产出 | Prompt 工具 |
+|----|------|---------|-----------|
+| 1 | 需求可测性评审 | 评审意见 | PRD 可测性评审 |
+| 2 | 测试策略设计 | test-strategy.md | 测试策略起草 |
+| 3 | 用例编写 · 评审 | test-cases.md | 用例批量生成 · Bug 趋势分析 |
+| 4 | 提测申请审核 | 审核结果 | 提测单审核 |
+| 5 | 测试执行 | Bug 清单 | Bug 报告规范化 · 回归范围推荐 |
+| 6 | 准出报告 | test-report.md | 准出报告生成 |
+
+### 15 · 🚀 运维场景(SRE/On-call)
+
+| 步 | 阶段 | 关键产出 | Prompt 工具 |
+|----|------|---------|-----------|
+| 1 | 发布计划 | release-plan.md | 发布计划生成 |
+| 2 | Runbook 准备 | runbook-*.md | Runbook 起草 |
+| 3 | 发布执行 | release-log | - |
+| 4 | 事件响应 | INC-xxx.md | 事件分级 & 处理建议 |
+| 5 | 故障复盘 | postmortem.md | 故障复盘起草 · SLO 分析 |
+| 6 | 改进项跟踪 | actions 列表 | 改进项 → 需求池 |
+
+## Prompt 卡片的交互模型
+
+```
+点击卡片
+ ↓
+弹出参数表单
+ ├─ 输入来源: 选 Artifact / 粘贴文本 / 上传文件
+ ├─ 其他参数: 根据 prompt 模板定义
+ └─ Prompt 预览: 实时显示 Claude 将收到的完整 prompt(透明)
+ ↓
+点 "✨ 执行"
+ ↓
+- 关弹窗
+- 切换到主视图(01),自动创建新消息
+- 发送组合后的 prompt
+- AI 流式输出回复
+- 产出的 Artifact 自动入库,可在对应场景工作流里看到
+```
+
+## Prompt 元数据(每个 skills/xxx.md 的 frontmatter)
+
+```yaml
+---
+id: prd-draft
+category: business
+icon: 📝
+name: 生成 PRD 初稿
+description: 从需求访谈笔记生成结构化 PRD
+inputs:
+ - key: source
+ type: artifact_or_text
+ label: 输入来源
+ required: true
+ - key: notes
+ type: text
+ label: 补充说明
+ required: false
+output: prd-v{{version}}.md
+related_workflow: business
+workflow_step: 2
+---
+
+你是高级产品经理,请基于下方访谈笔记,按 templates/business/prd-template.md 的
+结构生成 PRD 草稿:
+...
+```
+
+应用启动时扫描 `skills/**/*.md` 的 frontmatter,建 Prompt 注册表 + 自动分类到对应场景工作流的右栏。
+
+## 与主视图(wireframe 01)的切换
+
+用户可以:
+- 主视图顶栏点"💼 业务 / 💻 开发 / 🧪 测试 / 🚀 运维" → 切换到对应场景工作流
+- 场景工作流里点"📝 继续编辑" / "✨ 执行" → 回到主视图开始 AI 对话
+
+**设计原则**: 主视图是"聊天主战场",场景工作流是"任务导航",两者各司其职。
+
+## Sprint 7 实现影响
+
+| 新增 Swift 文件 | 作用 |
+|-----------|------|
+| `WorkflowView.swift` | 三栏布局(共 4 个场景,通过数据驱动渲染) |
+| `PromptRegistry.swift` | 扫描 skills/ 目录,建 Prompt 注册表 |
+| `PromptActionCard.swift` | 右栏每张 Prompt 卡组件 |
+| `PromptRunner.swift` | 表单参数 → 组合 prompt → 发送到会话 |
+| `WorkflowStepModel.swift` | 时序数据模型(每场景的步骤定义) |
+| `RoleContext.swift` | 用户角色 → 决定默认场景 + 工作流状态持久化 |
+
+## 与已有 Skills 的兼容
+
+现有 29 个 prompt 在 `skills/