diff --git a/docs/superpowers/plans/2026-06-03-registration-agent-prototype.md b/docs/superpowers/plans/2026-06-03-registration-agent-prototype.md deleted file mode 100644 index ab8669e..0000000 --- a/docs/superpowers/plans/2026-06-03-registration-agent-prototype.md +++ /dev/null @@ -1,376 +0,0 @@ -# Registration Agent Prototype Implementation Plan - -> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. - -**Goal:** Build a new high-fidelity, demo-ready prototype UI for the registration review agent platform across homepage, knowledge base, document processing, agent workspace, MCP, Skills, and leadership dashboard screens. - -**Architecture:** Keep the existing Django monolith and template routing boundaries, but replace the current visual system with a unified prototype shell and add a dedicated platform app for new governance pages. Use shared presentation data in service/view code so the pages tell one coherent business story without coupling design code to the existing agent execution internals. - -**Tech Stack:** Django templates, Django views/URLs, Python service helpers, shared inline CSS in base template, existing forms/models where useful. - ---- - -## File Structure - -- Modify: `F:\PyCharm\DEMO-AGENT\templates\base.html` -- Modify: `F:\PyCharm\DEMO-AGENT\templates\scenarios\index.html` -- Modify: `F:\PyCharm\DEMO-AGENT\templates\documents\document_list.html` -- Modify: `F:\PyCharm\DEMO-AGENT\templates\documents\upload.html` -- Modify: `F:\PyCharm\DEMO-AGENT\templates\chat\index.html` -- Create: `F:\PyCharm\DEMO-AGENT\apps\platform_ui\__init__.py` -- Create: `F:\PyCharm\DEMO-AGENT\apps\platform_ui\apps.py` -- Create: `F:\PyCharm\DEMO-AGENT\apps\platform_ui\views.py` -- Create: `F:\PyCharm\DEMO-AGENT\apps\platform_ui\urls.py` -- Create: `F:\PyCharm\DEMO-AGENT\apps\platform_ui\services.py` -- Create: `F:\PyCharm\DEMO-AGENT\templates\platform_ui\knowledge_base.html` -- Create: `F:\PyCharm\DEMO-AGENT\templates\platform_ui\mcp_center.html` -- Create: `F:\PyCharm\DEMO-AGENT\templates\platform_ui\skill_studio.html` -- Create: `F:\PyCharm\DEMO-AGENT\templates\platform_ui\command_center.html` -- Modify: `F:\PyCharm\DEMO-AGENT\config\settings.py` -- Modify: `F:\PyCharm\DEMO-AGENT\config\urls.py` -- Test: `F:\PyCharm\DEMO-AGENT\tests\` - -### Task 1: Register the new platform prototype app - -**Files:** -- Create: `apps/platform_ui/__init__.py` -- Create: `apps/platform_ui/apps.py` -- Create: `apps/platform_ui/views.py` -- Create: `apps/platform_ui/urls.py` -- Modify: `config/settings.py` -- Modify: `config/urls.py` - -- [ ] **Step 1: Add the Django app module skeleton** - -```python -from django.apps import AppConfig - - -class PlatformUiConfig(AppConfig): - default_auto_field = "django.db.models.BigAutoField" - name = "apps.platform_ui" -``` - -- [ ] **Step 2: Register the app in settings** - -```python -INSTALLED_APPS = [ - # ... - "apps.platform_ui", -] -``` - -- [ ] **Step 3: Add prototype page routes** - -```python -urlpatterns = [ - path("platform/", include("apps.platform_ui.urls")), -] -``` - -- [ ] **Step 4: Define view names for prototype pages** - -```python -urlpatterns = [ - path("knowledge-base/", views.knowledge_base, name="knowledge-base"), - path("mcp-center/", views.mcp_center, name="mcp-center"), - path("skills/", views.skill_studio, name="skills"), - path("command-center/", views.command_center, name="command-center"), -] -``` - -- [ ] **Step 5: Run framework validation** - -Run: `python manage.py check` -Expected: PASS with no URL or app import errors - -### Task 2: Create shared presentation data for the new prototype - -**Files:** -- Create: `apps/platform_ui/services.py` -- Modify: `apps/platform_ui/views.py` - -- [ ] **Step 1: Define one coherent demo dataset** - -```python -def get_platform_demo_context(): - return { - "batch": {...}, - "knowledge_sources": [...], - "mcp_connectors": [...], - "skills": [...], - "workflow_steps": [...], - } -``` - -- [ ] **Step 2: Keep each page view thin** - -```python -def knowledge_base(request): - context = get_platform_demo_context() - return render(request, "platform_ui/knowledge_base.html", context) -``` - -- [ ] **Step 3: Run framework validation** - -Run: `python manage.py check` -Expected: PASS with importable views and service helpers - -### Task 3: Replace the global visual system and navigation shell - -**Files:** -- Modify: `templates/base.html` - -- [ ] **Step 1: Rewrite the global shell** - -```html - -
- -
-
...
- {% block content %}{% endblock %} -
-
- -``` - -- [ ] **Step 2: Define the new design tokens and shared components** - -```css -:root { - --bg: #eef3f7; - --surface: #f8fbfd; - --panel: #ffffff; - --ink: #102033; - --accent: #1e5eff; - --signal: #d77a2b; -} -``` - -- [ ] **Step 3: Add global helpers for panels, metric cards, timelines, tables, pills, and section headers** - -```css -.panel { ... } -.metric-card { ... } -.section-heading { ... } -.timeline-step { ... } -.data-table { ... } -``` - -- [ ] **Step 4: Render shared navigation links to all prototype surfaces** - -```html -任务总览 -知识库配置 -文件中心 -工作台大屏 -``` - -- [ ] **Step 5: Open a few pages manually** - -Run: `python manage.py runserver` -Expected: the shell renders and every nav item resolves - -### Task 4: Redesign the homepage as the business-closure entry point - -**Files:** -- Modify: `templates/scenarios/index.html` -- Modify: `apps/scenarios/views.py` if extra presentation fields are needed - -- [ ] **Step 1: Add a structured homepage context if needed** - -```python -return render( - request, - "scenarios/index.html", - { - "scenarios": list_scenarios(), - "scenario_issues": list_scenario_issues(), - "hero_metrics": [...], - "workflow_overview": [...], - }, -) -``` - -- [ ] **Step 2: Replace the page body with hero, metrics, workflow strip, risk board, and quick-entry modules** - -```html -
...
-
...
-
...
-
...
-``` - -- [ ] **Step 3: Verify the homepage** - -Run: `python manage.py runserver` -Expected: `/` shows the new dashboard-like homepage - -### Task 5: Redesign the document pages around parsing and slicing workflow - -**Files:** -- Modify: `templates/documents/document_list.html` -- Modify: `templates/documents/upload.html` -- Optionally modify: `apps/documents/views.py` - -- [ ] **Step 1: Add any lightweight display-only summary fields in the view if needed** - -```python -return render( - request, - "documents/document_list.html", - { - "documents": documents, - "processing_summary": {...}, - "exception_items": [...], - }, -) -``` - -- [ ] **Step 2: Rebuild the list page into upload stats, pipeline board, anomaly box, and structured directory table** - -```html -
...
-
...
-
- ...
-
-``` - -- [ ] **Step 3: Rebuild the upload page into a guided import experience** - -```html -
...
-
...
-``` - -- [ ] **Step 4: Verify both pages** - -Run: `python manage.py runserver` -Expected: `/documents/` and `/documents/upload/` match the new prototype style - -### Task 6: Redesign the chat page as a controlled audit workspace - -**Files:** -- Modify: `templates/chat/index.html` -- Optionally modify: `apps/chat/views.py` - -- [ ] **Step 1: Add presentation-only helper blocks if the existing context is too sparse** - -```python -return render( - request, - "chat/index.html", - { - ... - "task_modes": [...], - "result_highlights": [...], - }, -) -``` - -- [ ] **Step 2: Replace the template with a three-zone workspace** - -```html -
-
...
-
...
-
...
-
-``` - -- [ ] **Step 3: Preserve the real form submission path while upgrading the visual output areas** - -```html -
...
-{% if result %} ... {% endif %} -``` - -- [ ] **Step 4: Verify one scenario page** - -Run: `python manage.py runserver` -Expected: `/chat//` still submits and now renders as a workbench - -### Task 7: Implement the governance and platform pages - -**Files:** -- Create: `templates/platform_ui/knowledge_base.html` -- Create: `templates/platform_ui/mcp_center.html` -- Create: `templates/platform_ui/skill_studio.html` -- Create: `templates/platform_ui/command_center.html` -- Modify: `apps/platform_ui/views.py` -- Modify: `apps/platform_ui/services.py` - -- [ ] **Step 1: Build the knowledge base page** - -```html -
...
-
...
-``` - -- [ ] **Step 2: Build the MCP center page** - -```html -
...
-
...
-``` - -- [ ] **Step 3: Build the Skill studio page** - -```html -
...
-
...
-``` - -- [ ] **Step 4: Build the leadership command center page** - -```html -
...
-
...
-
...
-``` - -- [ ] **Step 5: Verify page routing** - -Run: `python manage.py check` -Expected: PASS and all `/platform/...` routes resolve - -### Task 8: Regression, polish, and documentation sync - -**Files:** -- Modify: `README.md` if navigation or page descriptions need updating -- Modify: `AGENTS.md` only if current implementation status needs sync - -- [ ] **Step 1: Run core validation** - -Run: `python manage.py check` -Expected: PASS - -- [ ] **Step 2: Run targeted tests if template/view assumptions changed** - -Run: `pytest` -Expected: PASS or clearly identified existing failures unrelated to the prototype - -- [ ] **Step 3: Review the new screens for consistent terminology** - -Check: page titles, batch name, product name, risk labels, and workflow terms all match the new design spec - -- [ ] **Step 4: Update high-level documentation if needed** - -```markdown -## 当前原型页面 -- 任务总览 -- 知识库配置 -- 文件中心 -- 审核工作台 -- MCP 中心 -- Skill Studio -- 工作台大屏 -``` - -## Self-Review - -- Spec coverage: the plan covers homepage, knowledge base, document center, chat workspace, MCP, Skill studio, and leadership dashboard. -- Placeholder scan: no TODO/TBD markers remain. -- Type consistency: route names, app names, and page concepts are consistent across tasks. diff --git a/docs/superpowers/specs/2026-06-03-registration-agent-prototype-design.md b/docs/superpowers/specs/2026-06-03-registration-agent-prototype-design.md deleted file mode 100644 index d6a3057..0000000 --- a/docs/superpowers/specs/2026-06-03-registration-agent-prototype-design.md +++ /dev/null @@ -1,185 +0,0 @@ -# 注册审核智能体平台产品原型设计 - -## 目标 - -本次原型围绕“试剂盒临床注册文件准备与审核智能体平台”重新设计一套高保真、可点击、适合复试演示的 Web 产品界面。设计不沿用当前前端视觉,而是以新版需求分析为准,突出资料治理、法规知识底座、Agent 审核闭环、平台治理能力和可解释工作台。 - -## 设计范围 - -本次原型聚焦一条完整演示主线: - -1. 首页进入批次级任务总览。 -2. 查看法规知识库与结构化规则配置。 -3. 上传并解析申报资料,查看切片、页数、章节点归类和异常状态。 -4. 进入 AI Agent 审核工作台执行完整性检查、字段抽取和一致性核查。 -5. 查看外部 MCP 能力接入情况。 -6. 查看和编辑 Skill 编排能力。 -7. 进入领导演示型工作台大屏查看 Agent 工作流程、解释依据和风险态势。 - -## 设计原则 - -### 1. 业务闭环优先 - -页面组织必须服务“资料准备到审核闭环”,而不是把系统包装成泛化 Agent 工具箱。 - -### 2. 高层能看懂,操作员也能讲清 - -首页与大屏承担讲故事职责;知识库、文件中心、Agent 工作台承担业务可信度职责;MCP 与 Skill 页面承担平台能力说明职责。 - -### 3. 可解释性强于炫技 - -任何页面都应尽量展示来源、阶段、规则命中、风险等级、人工复核状态,而不是堆叠模型术语。 - -### 4. 信息密度高但不压抑 - -整体风格走“专业监管科技工作台”,采用明亮底色、深色信息层、铜橙风险强调、清晰分栏和大面积结构化留白。 - -## 视觉方向 - -### 色彩 - -- 主背景采用浅米白与冷灰蓝混合渐变,强调专业与稳定。 -- 主强调色采用深青蓝,承担导航、激活态、关键信息。 -- 风险强调采用铜橙与深红,用于高风险、缺失、待处理。 -- 成功状态采用低饱和绿色,用于已完成、已入库、规则已生效。 - -### 排版 - -- 页级标题使用强对比的中文大标题,突出“阶段感”。 -- 模块级标题使用中等字号与清晰副标题。 -- 指标数字使用紧凑等宽风格,强调可视化汇报感。 - -### 组件风格 - -- 顶部为平台导航与当前批次状态条。 -- 页面内部以大面板、信息条、时间线、矩阵卡片、指标舱和结构树为主。 -- 尽量避免传统后台里大量相同卡片堆叠,强化带状布局、流程图感和分析板感。 - -## 页面设计 - -### 1. 首页 / 任务总览 - -**目标:** -让评委在 10 秒内理解系统价值和当前批次进展。 - -**核心内容:** - -- 批次概览 Hero:当前申报批次、产品名、流程阶段、批次状态。 -- 四个关键指标:资料齐套率、法规命中率、字段抽取完成度、高风险项数量。 -- 演示主流程带:资料进入、规则配置、解析入库、审核执行、结果输出。 -- 今日待办与高风险问题板。 -- 快速入口:知识库、文件中心、审核工作台、大屏。 - -### 2. 知识库搭建与配置页 - -**目标:** -把“双层知识底座”讲透。 - -**核心内容:** - -- 左侧法规规则树:按章、条、要求项、模板字段展示。 -- 中部知识源列表:法规依据、业务资料、模板库、公告附件包。 -- 右侧切片与生效配置:切片策略、召回阈值、适用流程、最近更新时间。 -- 底部人工校订记录与知识更新入口。 - -### 3. 文件上传、切片与解析中心 - -**目标:** -展示 Documents 模块是“资料治理中心”。 - -**核心内容:** - -- 顶部上传拖拽区与批次选择。 -- 左侧批量导入队列:文件名、类型、页数、识别状态。 -- 中部处理流水:保存原件、提取文本、识别表格、页数统计、章节点归类、切片入库。 -- 右侧异常箱:疑似扫描件、归类待确认、页数低可信度、切片失败。 -- 下方目录总览表:章节点、资料名称、状态、模板命中情况。 - -### 4. AI Agent 审核工作台 - -**目标:** -把自由问答升级为受控审核任务工作台。 - -**核心内容:** - -- 顶部任务切换:目录汇总、完整性检查、字段抽取、一致性核查、综合风险报告。 -- 左侧自然语言输入与资料范围选择。 -- 中间 Agent 对话流与执行阶段条。 -- 右侧结构化结果舱:结论摘要、字段表、缺失项、冲突项、风险建议。 -- 下方证据区:法规条款引用、文档片段、来源页码、人工复核提示。 - -### 5. 外部 MCP 导入页 - -**目标:** -说明平台可扩展但不喧宾夺主。 - -**核心内容:** - -- MCP 连接卡:法规源、飞书通知、模板服务、文档转换、企业数据源。 -- 接入状态、鉴权方式、最近同步时间。 -- 输入输出能力摘要。 -- 一个简单的导入向导区块。 - -### 6. Skill 编辑与使用页 - -**目标:** -展示 Agent 可配置、可维护、可复用。 - -**核心内容:** - -- Skill 列表:完整性检查、字段抽取、一致性核查、Word 回填、飞书通知。 -- 中部编辑区:角色说明、工具绑定、输入输出约束、启停配置。 -- 右侧运行预览:最近测试结果、命中工具、失败原因。 -- 底部版本历史和发布状态。 - -### 7. Agent 工作台大屏 - -**目标:** -作为演示高潮页,向领导/评委解释“这一轮审核发生了什么”。 - -**核心内容:** - -- 顶部大标题与批次状态。 -- 左侧流程总览:资料进入、规则装载、字段池建立、一致性比对、风险汇总。 -- 中央主舞台:Agent 工作流时间轴,展示每一步的输入、动作、输出和解释。 -- 右侧风险热力与关键告警。 -- 底部证据矩阵:法规依据、命中文档、责任人、待补动作。 - -## 跳转与演示动线 - -推荐演示顺序: - -1. 首页说明平台定位。 -2. 进入知识库页说明法规与规则如何维护。 -3. 进入文件中心说明资料如何入库、切片、归类。 -4. 进入审核工作台发起一次完整性或一致性检查。 -5. 进入 Skill 页解释为何 Agent 行为可控。 -6. 进入 MCP 页说明可接飞书与外部能力。 -7. 最后切到大屏汇总整轮审核过程。 - -## 数据策略 - -本轮原型以高保真演示为优先,允许使用页面级演示数据,但必须满足: - -- 术语与字段名称来自新版需求分析。 -- 状态设计贴近真实业务流程。 -- 页面间批次名称、产品名称、风险项和规则口径保持一致。 - -## 实现策略 - -基于当前 Django 模板工程直接重构前端: - -1. 保留现有 Django 应用与路由边界。 -2. 新增平台页应用承接知识库、MCP、Skill、大屏页面。 -3. 重做 `base.html` 及所有主要模板的布局和样式。 -4. 使用共享演示数据构造页面内容,保证视觉统一和讲解一致。 - -## 测试与验证 - -原型完成后至少验证: - -1. Django 路由可访问。 -2. 首页、知识库、文件中心、审核工作台、MCP、Skill、大屏页面均可打开。 -3. 页面导航互通。 -4. `python manage.py check` 通过。 -5. 如无模板语法问题,关键页面可在本地服务下正常渲染。