BossAgents System Current State Analysis and Refactoring Proposal
Date: 2026-07-07
Objective: Clarify the system's actual status and design a complete solution to demonstrate value
1. System Current State
1.1 System Architecture
┌─────────────────────────────────────────────────────────────────────────┐
│ 前端(Vue 3 + Vite) │
│ ┌────────────┐ ┌─────────────┐ ┌─────────────┐ ┌──────────────┐ │
│ │ 数据资产看板│ │ 关系图谱 │ │ 规则引擎 │ │ 数字员工管理 │ │
│ │ (Dashboard)│ │ (Relation) │ │ (Rules) │ │ (Staff) │ │
│ └─────┬──────┘ └──────┬──────┘ └──────┬──────┘ └──────┬───────┘ │
└────────┼────────────────┼────────────────┼────────────────┼──────────┘
│ │ │ │
┌────────┴────────────────┴────────────────┴────────────────┴──────────┐
│ 后端(Node.js + Express) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ 统一资产服务 │ │ 规则引擎服务 │ │ 数字员工调度器 │ │
│ │ (AssetSvc) │ │ (RuleEngine) │ │ (BossScheduler) │ │
│ └──────┬───────┘ └──────┬───────┘ └──────────┬─────────┘ │
└─────────┼────────────────┼───────────────────────┼──────────────────┘
│ │ │
┌─────────┴────────────────┴───────────────────────┴──────────────────┐
│ 数据源层 │
│ ┌─────────────────┐ ┌─────────────────┐ ┌───────────────────┐ │
│ │ pps_process_data│ │ rule_engine.db │ │ sciot_import.db │ │
│ │ (341MB, 92万条) │ │ (6.5万条) │ │ (Digital Staff 34) │ │
│ └─────────────────┘ └─────────────────┘ └───────────────────┘ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌───────────────────┐ │
│ │ aml_store.db │ │ n8n_workflows │ │ SCIOT/SCIOT │ │
│ │ (8,235条) │ │ MySQL (4,300) │ │ (7,706 XML) │ │
│ └─────────────────┘ └─────────────────┘ └───────────────────┘ │
│ ┌─────────────────┐ │
│ │ SCSAI PLM │ │
│ │ (远程 114.113.xxx) │
│ └─────────────────┘ │
└───────────────────────────────────────────────────────────────────────┘
1.2 现有数据状况(真实验证)
| 数据源 | 文件/位置 | 数据量 | 状态 | 价值 |
|--------|----------|--------|------|------|
| Process Data | server/data/sccapp_process_data.db (341MB) | 921,067 entries | ✅ Synced | Core asset source |
| Rule Engine | server/data/rule_engine.db | 65,778 entries | ✅ Ready | Meta-model definition |
| AML Objects | server/data/aml_store.db | 8,235 entries | ✅ Ready | Industrial object definition |
| Digital Employees | server/data/sciot_import.db | 34 employees | ✅ Ready | Automation capability |
| n8n Workflows | MySQL 43.137.8.43 | 4,300 workflows | ✅ Connected | Business process automation |
| AML Files | SCIOT/SCIOT | 7,706 XML files | ✅ Ready | System object definition |
| Data Assets | data_assets table | 3,656 entries | ✅ LLM extracted | Structured assets |
| Asset Relations | asset_relations table | 455 entries | ⚠️ Partial | Association relationships |
1.3 Existing API Capabilities
| Module | API | Function |
|---|---|---|
| Data Assets | GET /api/unified-assets/dashboard | Dashboard statistics (6-layer data sources) |
| GET /api/unified-assets/list | Asset list (pagination, filtering) | |
| GET /api/unified-assets/:id | Asset details | |
| GET /api/unified-assets/:id/relation-graph | Relationship graph | |
| Rule Engine | GET /api/unified-assets/rule-engine | Rule engine statistics |
| Digital Staff | GET /api/digital-staff/status | Staff status |
| GET /api/digital-staff/dashboard | Work dashboard | |
| BOM Management | GET/POST /api/bom/* | BOM version management |
| Change Management | GET/POST /api/change/* | ECR/ECO change process |
| Data Pipeline | POST /api/data-pipeline/extract | LLM structured extraction |
| SCSAI | GET/POST /api/SCSAI/* | SCSAI PLM Data Synchronization |
1.4 Digital Employee Capabilities (34)
| Category | Employee | Function |
|---|---|---|
| Data Management | Data Clerk, Data Collector, Data Repairer, Data Inspector, Asset Identifier | Data Synchronization, Collection, Repair, Inspection |
| Business Process | Procurement Assistant, Supplier Steward, Inventory Steward, Supply Chain Steward, Business Brain | Procurement, Supply Chain, Inventory Management |
| Quality & Change | Change Analyst, ECR Reviewer, Process Data Repairer | Change Analysis, ECR Review |
| Document Content | Content Digital Employee, Document Digital Employee, Document Verifier, Report Analyst, Content Generator | Document Generation, Verification, Reporting |
| System Operations | System Operations Engineer, Equipment Operator, Target Tracker, Price Monitor | System Inspection, Equipment Monitoring |
1.5 Current Status of Front-end Pages
| Page | Path | Status | Issues |
|---|---|---|---|
| Data Asset Dashboard | /demo#/data-asset-dashboard | ⚠️ Numbers Only | Only displays numbers, no interaction, no value demonstration |
| Relationship Graph | /demo#/data-asset-dashboard (tab) | ⚠️ Simple Ring Chart | No drag-and-drop, zoom, limited relationships |
| Rule Engine | /demo#/data-asset-dashboard (tab) | ⚠️ List Display | Only displays rule list |
| Data Health Check | /demo#/data-asset-dashboard (tab) | ⚠️ Mock Data | No real health check logic |
| Digital Staff Management | /demo#/digital-staff | ✅ Available | Has status display, execution logs |
II. Core Issues (Why the Demo Lacks Value)
2.1 Data Asset Dashboard Lacks "Value"
Current State: Only displays numbers (3656, 920k, 4300...)
Issues:
- Numbers are just numbers; their business meaning is unclear
- No correlation analysis between data points
- No quantification of business value (e.g., "How much are these assets worth?")
- No issue identification (e.g., "Which data has quality problems?")
2.2 Relationship Graph Lacks "Relationships"
Current State: 455 relationships, only shows simple hierarchy like Process Specification → Operation → Step
Issues:
- Too few relationships (455 vs. 920k data records)
- No cross-data-source relationships (e.g., Process Specification → Supplier → Material)
- No business scenarios (e.g., "Which products are affected by this process?")
2.3 Rule Engine Lacks "Rules"
Current State: 2,372 rules, but all are metadata definitions
Issues:
- Rules are not executed
- Rules are not linked to specific data
- No demonstration of rule-triggered effects
2.4 Digital Staff Lacks "Business Closed Loop"
Current State: 34 digital staff, each running independently
Problem:
- Lack of collaboration among employees
- No end-to-end business process demonstration
- No business value output (e.g., "how much money procurement saved")
III. Restructuring Plan: A System that Demonstrates Value
3.1 Core Value Proposition
The value that the Data Asset Management Platform should demonstrate:
- Asset Visualization: Enabling users to see the full picture and value of data assets
- Relationship Discovery: Enabling users to see business connections between data
- Quality Health Check: Enabling users to discover and fix data issues
- Intelligent Insights: Enabling users to gain business insights from data
- Automated Operations: Enabling users to see how digital workers automatically handle business
3.2 Solution Design
#### 3.2.1 Data Asset Dashboard Restructuring
Goal: Shift from "displaying numbers" to "demonstrating value"
Design:
┌─────────────────────────────────────────────────────────────────┐
│ 数据资产价值仪表盘 │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌──────────────┐ │
│ │ ? 资产总价值 │ │ ? 价值趋势 │ │ ⚠️ 风险预警 │ │
│ │ ¥ 12,580,000 │ │ +15.2% 本周 │ │ 3项数据异常 │ │
│ │ (估值模型计算) │ │ │ │ │ │
│ └─────────────────┘ └─────────────────┘ └──────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ ? 资产分类分布 │ │
│ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ │
│ │ │工艺 │ │工序 │ │工步 │ │检验 │ │规则 │ │其他 │ │ │
│ │ │1505 │ │1001 │ │1000 │ │100 │ │2372 │ │... │ │ │
│ │ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────┐ ┌─────────────────────────────────┐ │
│ │ ? 资产搜索 │ │ ? 高价值资产榜 │ │
│ │ [搜索框] │ │ 1. 工艺规程A - ¥850,000 │ │
│ │ │ │ 2. 工艺规程B - ¥720,000 │ │
│ └─────────────────────┘ │ 3. 规则模板X - ¥680,000 │ │
│ └─────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
关键功能:
- Asset Valuation Model: Calculate asset value based on data type, completeness, usage frequency, and business criticality
- Value Trend: Display changes in asset value over time
- Risk Alerts: Automatically discover data quality issues, broken relationships, and rule failures
- High-Value Asset Ranking: Display the Top 10 high-value assets and their value sources
#### 3.2.2 Relationship Graph Restructuring
Goal: Shift from "simple hierarchy" to "business relationship network"
Design:
┌─────────────────────────────────────────────────────────────────┐
│ 资产关系网络 │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 左侧:资产选择面板 │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ Search:[____________] │ │
│ │ 类型筛选:[工艺规程] [工序] [物料] [供应商] [规则] │ │
│ │ │ │
│ │ ? 资产列表 │ │
│ │ ├─ 工艺规程 A (点击查看关系) │ │
│ │ ├─ 工艺规程 B (点击查看关系) │ │
│ │ ├─ 供应商 高端动力 (点击查看关系) │ │
│ │ └─ ... │ │
│ └───────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 右侧:关系图谱可视化 │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ │ │
│ │ ? 工艺规程A │
│ │ │ │
│ │ ┌──────┼──────┐ │
│ │ ▼ ▼ ▼ │
│ │ ?喷砂 ?回火 ?淬火 │
│ │ │ │ │ │
│ │ ▼ ▼ ▼ │
│ │ ?工步 ?工步 ?工步 │
│ │ │ │
│ │ ▼ │
│ │ ? 供应商-高端动力 │
│ │ │ │
│ │ ▼ │
│ │ ? 物料-钢材 │
│ │ │
│ └───────────────────────────────────────────────────────────┘ │
│ │
│ 底部:关系统计与分析 │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │ 节点数:15 | 关系数:23 | 关联供应商:3 | 关联物料:5 │ │
│ │ 关系类型:包含工序(8) | 分解为工步(6) | 使用物料(5) │ │
│ │ | 供应商提供(3) | 规则约束(1) │ │
│ └───────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
关键功能:
- Multi-Source Relationships: Process Specification → Process Step → Operation Step → Inspection Point → Supplier → Material → Rule
- Relationship Types: Contains, Decomposes, Uses, Provides, Constrains, Influences
- Interactive Exploration: Click nodes to expand/collapse, drag, zoom, filter
- Business Scenarios: "Which suppliers are affected by this process?", "Which processes use this material?"
#### 3.2.3 Data Health Check Restructuring
Goal: Shift from "simulated data" to "real health check"
Design:
┌─────────────────────────────────────────────────────────────────┐
│ 数据质量体检中心 │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ ? 体检总分:78/100 │ │
│ │ ┌─────────────────────────────────────────────────────┐ │ │
│ │ │ 完整性 ████████████░░░░ 85% │ │ │
│ │ │ 一致性 ██████████░░░░░░ 70% │ │ │
│ │ │ 规范性 █████████░░░░░░░ 65% │ │ │
│ │ │ 可追溯性 ███████████░░░░ 80% │ │ │
│ │ │ 活跃度 █████████████░░░ 90% │ │ │
│ │ └─────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────┐ ┌─────────────────────────────────┐ │
│ │ ? 问题清单 │ │ ?️ 修复建议 │ │
│ │ ├─ 数据缺失 (23条) │ │ ├─ 自动补全缺失字段 │ │
│ │ ├─ 格式错误 (15条) │ │ ├─ 标准化格式转换 │ │
│ │ ├─ 关系断裂 (8条) │ │ ├─ 重建资产关系 │ │
│ │ └─ 规则失效 (3条) │ │ └─ 触发修复工作流 │ │
│ └─────────────────────┘ └─────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ ? 体检报告详情 │ │
│ │ ┌─────────────────────────────────────────────────────┐ │ │
│ │ │ 资产ID | 问题类型 | 严重程度 | 状态 | 操作 │ │ │
│ │ │ ─────────────────────────────────────────────────── │ │ │
│ │ │ PPS-001 | 数据缺失 | 高 | 待修复 | [Repair] │ │ │
│ │ │ PPS-002 | 格式错误 | 中 | 已修复 | [查看] │ │ │
│ │ │ ... │ │ │
│ │ └─────────────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
关键功能:
- 5-Dimensional Check: Completeness, Consistency, Standardization, Traceability, Activity
- Issue Discovery: Automatically detect data quality issues
- Fix Recommendations: Provide remediation solutions based on rule engine.
- One-Click Fix: Trigger digital workers for automatic remediation.
#### 3.2.4 Intelligent Insight Module
Goal: Shift from "passive display" to "active insight".
Design:
┌─────────────────────────────────────────────────────────────────┐
│ AI 智能洞察中心 │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ ? 自然语言查询 │ │
│ │ [搜索框:"哪些工艺使用了高端动力的钢材?"] [Search] │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ ? 智能洞察结果 │ │
│ │ │ │
│ │ ? 查询结果: │ │
│ │ 共有 5 个工艺规程使用了高端动力提供的钢材: │ │
│ │ ├─ 工艺规程 A - 年使用量:150吨 - 采购成本:¥750,000 │ │
│ │ ├─ 工艺规程 B - 年使用量:80吨 - 采购成本:¥400,000 │ │
│ │ └─ ... │ │
│ │ │ │
│ │ ? 洞察建议: │ │
│ │ 高端动力的钢材价格比市场均价高 15%,建议: │ │
│ │ ├─ 重新谈判价格 │ │
│ │ ├─ 寻找替代供应商 │ │
│ │ └─ 优化工艺减少用量 │ │
│ │ │ │
│ │ ? 推荐动作: │ │
│ │ [创建询价任务] [发送给采购助手] [生成分析报告] │ │
│ │ │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ ? 业务指标趋势 │ │
│ │ ├─ 资产利用率趋势 │ │
│ │ ├─ 数据质量趋势 │ │
│ │ └─ 成本节省趋势 │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
关键功能:
- Natural Language Query: Query data assets using natural language.
- Intelligent Insight: AI analyzes data and provides business recommendations.
- Recommended Actions: Directly trigger digital workers to execute suggestions.
#### 3.2.5 Digital Worker Collaboration Demo
Goal: Shift from "independent operation" to "business closed-loop".
Design:
┌─────────────────────────────────────────────────────────────────┐
│ 数字员工业务闭环演示 │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ? 演示场景:采购成本优化流程 │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ 数据巡检 │───►│ 成本分析 │───►│ 供应商 │───►│ 采购助手 │ │
│ │ 员 │ │ 师 │ │ 管家 │ │ │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ 发现异常 分析成本 评估供应商 创建订单 │
│ (物料涨价) (涨价15%) (寻替代) (下单) │
│ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ ? 业务价值: │ │
│ │ ├─ 本次优化节省:¥ 235,000 │ │
│ │ ├─ 累计节省:¥ 1,280,000 │ │
│ │ └─ 效率提升:67% │ │
│ └─────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
关键功能:
- Business Process Demo: End-to-end demonstration of digital worker collaboration.
- Value Quantification: Display cost savings and efficiency improvements.
- Real-time Execution: Can trigger real digital workers to execute.
IV. Implementation Plan
Phase 1: Data Layer Refactoring (Weeks 1-2)
Goal: Establish a complete asset relationship network.
Tasks:
- Reconstruct asset relationships from process data in sccapp_process_data.db (Process → Operation → Step → Inspection Point).
- Synchronize material, supplier, and BOM data from SCSAI.
- Establish cross-data-source relationships (Process → Supplier → Material).
- Build an asset valuation model (based on data type, completeness, usage frequency).
Acceptance Criteria:
- Asset relationship count ≥ 10,000.
- Cross-data-source relationship count ≥ 5,000.
- Asset valuation model is functional.
Phase 2: Backend API Refactoring (Weeks 2-3)
Goal: Provide APIs to support value demonstration.
Tasks:
- Implement asset valuation API.
- Implement multi-data-source relationship query API.
- Implement data quality health check API.
- Implement AI intelligent insight API.
- Implement digital worker collaboration API.
Acceptance Criteria:
- All new APIs are available.
- Response time
Phase 3: Frontend Page Refactoring (Weeks 3-4)
Objective: Implement front-end pages that demonstrate value
Tasks:
- Refactor the data asset dashboard (value dashboard)
- Refactor the relationship graph (business relationship network)
- Refactor the data health check (real health check)
- Create a new intelligent insights module
- Create a new digital employee collaboration demo module
Acceptance Criteria:
- All pages are functional
- Smooth user experience
Phase 4: Demo Scenario Construction (Weeks 4-5)
Objective: Build demonstrable business scenarios
Tasks:
- Procurement cost optimization scenario
- Data quality remediation scenario
- Process change impact analysis scenario
- Supplier evaluation scenario
Acceptance Criteria:
- Each scenario can be demonstrated independently
- Clear value output is present
V. Expected Outcomes
Value to be demonstrated during the presentation
| Demo Scenario | Demo Content | Value Demonstrated |
|---|---|---|
| Asset Value | Display total asset value of 12.58 million and Top 10 high-value assets | Data is a valuable asset |
| Relationship Discovery | Show the complete network of Process → Operation → Step → Supplier → Material | Business relationships exist between data |
| Quality Health Check | Display a 78-point health check result, with 3 issues and their remediation | Data quality is quantifiable and fixable |
| Intelligent Insights | Natural language query: "Which processes use high-power steel?" yields insights and suggestions | AI understands business and provides recommendations |
| Business Closed Loop | Demo the procurement cost optimization process, showing savings of 235,000 | Digital employees can automatically create value |
Key Metrics
| Metric | Before Refactoring | After Refactoring |
|---|---|---|
| Number of Asset Relationships | 455 | ≥ 10,000 |
| Cross-data-source relationships | 0 | ≥ 5,000 |
| Data health check dimensions | 0 | 5 |
| Natural language query | Not supported | Supported |
| Business value quantification | Not supported | Supported |
| Demo scenarios | 0 | 4 |
VI. Risks and Dependencies
Risks
| Risk | Impact | Mitigation |
|---|---|---|
| Unstable SCSAI connection | Unable to sync material/supplier data | Use local cache, degrade display |
| Unstable MySQL connection | n8n data cannot be displayed | Use cache, periodic sync |
| LLM call timeout | Delayed intelligent insights | Set timeout, degrade response |
Dependencies
| Dependency | Description |
|---|---|
| SCSAI PLM | Source for material, supplier, and BOM data |
| MySQL (n8n) | Source for workflow data |
| DeepSeek LLM | Intelligent insights and natural language queries |
| ECharts | Chart visualization |
VII. Conclusion
Current system issue: Only displays numbers, not value.
Refactoring goal: Shift from "number display" to "value demonstration," enabling users to see:
- The value of data assets (monetary worth)
- Relationships between data (business relevance)
- Data quality issues (quantifiable)
- AI-driven insights (business recommendations)
- The value of digital employees (automation benefits)
Expected timeline: 5 weeks to complete all refactoring, ready for formal demonstration.
BossAgents