BossAgents Business Logic Validation Report

BossAgents Business Logic Validation Report

Version: v1.0

Date: 2026-06-23

Validation Scope: Rule Engine + LLM + 6 Core Capabilities + 6 Core Digital Employees + Three-End Unification


I. Validation Environment

ItemValue
ServerNode.js v22.14.0, Port 3006
DatabaseSQLite (boss_analytics.db + sciot_import.db)
SCSAIhttps://ylxt.chat/scplm, Database SCPLM
FrontendVue 3 + Vite, Built to dist/

II. Validation of 8 Core Capabilities

2.1 End-to-End Test Results

#CapabilitySuccessData SourceDurationNotes
1identify✅rule_engine1071msRule engine hit, 7 query types
2validate✅llm_router1166msNo rule engine match, LLM Router fallback
3create✅relationship_resolver670msRelationship-aware + Dual-database duplicate check
4repair✅rule_engine525msRule engine hit 12 repair rules
5optimize✅rule_engine1msRule engine hit 5 optimize rules
6compare✅rule_engine1msRule engine hit 5 compare rules
7generate✅llm_router1472msNo rule engine match, LLM Router fallback
8inspect✅rule_engine589ms4 inspect rules executed

2.2 Rule Engine + LLM Fallback Chain

能力调用 → CapabilityRuntime.xxx()
  ├─ 1. 规则引擎优先: engine.executeXxx()
  │     └─ 命中 → 返回 source='rule_engine'
  └─ 2. LLM 降级: _callLLMViaRouter()
        ├─ SmartLLMRouter → Worker(端侧) / Solver(云端)
        │     └─ 成功 → 返回 source='llm_router'
        └─ llmBrain.thinkJson() → 返回 source='llm'

验证结论:所有8个能力均遵循"规则引擎优先,LLM降级"模式。

2.3 Rule Engine Statistics

MetricValue
Total Rules2,371
Built-in Rules~50 (identify:1, create:3, create_pre:5+, repair:12, optimize:5, compare:5, validate:4+, inspect:4, create_post:1)
Auto-generated Rules~3,489 (from AML/SCSAI sync)
Business Module CoveragePLM(24), Project(14), QS(21), QP(33), WEFIC_ACCOUNTING(60+)

III. Validation of 6 Core Digital Employees

3.1 Employee List

| ID | Name | Capability | Type |

|----|------|------|------|

| DS-DATA-001 | Data Clerk | identify | worker |

| DS-SYS-001 | System Ops Engineer | identify | worker |

| DS-OPS-001 | Data Steward | identify | worker |

| DS-BIZ-001 | Business Brain | identify | worker |

| DS-PROC-001 | Procurement Assistant | create | worker |

| ⟦DS-SCSAI-001⟧ | SCSAI Engineer | create | worker |

| DS-PROC-001 | Supply Chain Steward | repair | pipeline (identify+repair) |

| DS-STOCK-001 | Inventory Steward | repair | pipeline (identify+repair) |

| DS-LOOP-001 | Data Repair Specialist | repair | loop (identify+repair+validate) |

| DS-LOOP-001 | Inventory Alert Specialist | repair | loop (identify+repair+create) |

| DS-COST-001 | Cost Optimizer | compare | worker |

| DS-LOOP-001 | Price Monitor | compare | loop (identify+compare+generate) |

| DS-CONTENT-001 | Content Generator | generate | worker |

| DS-REPORT-001 | Report Analyst | generate | worker |

| DS-SCSAI-001 | Data Importer | import | worker |

| DS-DOC-001 | Document Validator | validate | worker |

| DS-ECR-001 | ECR Reviewer | validate | worker |

| DS-VEN-001 | Supplier Steward | inspect | worker |

Six Core Capabilities Covered: identify ✅ | create ✅ | repair ✅ | optimize ✅ (Covered by DS-COST-001) | compare ✅ | generate ✅

3.2 Execution Path

数字员工触发 → LiteScheduler._runWorker()
  ├─ 路径0: pipeline → 多步能力组合 (CapabilityRuntime[capName]())
  ├─ 路径1: worker → 专用worker函数 (可访问ctx.capability)
  ├─ 路径2: capability → 直接调用CapabilityRuntime[capMethod]()
  └─ 路径3: 通用 → 返回默认结果

验证结论:所有路径最终都通过CapabilityRuntime执行,6大基础能力为底座。


4. Unified Three-End Validation

4.1 CapabilityDispatcher Routing

EndsourceEntry PointRouting TargetValidation Result
Webweb/api/pipeline/executeCapabilityRuntime✅
Web - Digital Staffweb/api/digital-staff/runCapabilityDispatcher → scheduler✅
Feishufeishufeishu-router.runWithTimeoutCapabilityDispatcher → scheduler✅ (Code Review)
Mini Programminiapp/api/pipeline/executeCapabilityRuntime✅

4.2 Unified Scheduling Flow

任意端 → CapabilityDispatcher.execute({source, capability, params})
  ├─ 参数归一化 (normalizeParams)
  ├─ 审计日志 START (audit-log.js)
  ├─ 路由分发:
  │   ├─ source=feishu 或 _staffId → scheduler.runStaffOnce()
  │   └─ source=web/miniapp → CapabilityRuntime[capability]()
  ├─ 审计日志 COMPLETE
  └─ 统一响应格式 {success, capability, source, traceId, duration, data}

4.3 旧端点兼容性

| 旧端点 | 状态 | 说明 |

|--------|------|------|

| /api/capability/identify | ✅ Compatible | → CapabilityDispatcher |

| /api/capability/validate | ✅ Compatible | → CapabilityDispatcher |

| /api/unified/create | ✅ Preserved | Frontend useCapabilityCreate direct connection |


5. Large Model Routing Validation

5.1 SmartLLMRouter Architecture

SmartLLMRouter
  ├── Worker (端侧小模型): Ollama / 摩尔线程 / 华为昇腾 / 高通 / 三星
  │     └─ 高频简单任务 (~70ms)
  ├── Solver (云端大模型): DeepSeek / OpenAI兼容
  │     └─ 复杂推理任务 (~500ms)
  ├── MTCLaw 加速链: MTCLAW → Ollama → DeepSeek → simulatedThinking
  ├── 熔断机制: 连续5次失败触发,60秒半开
  └── 响应缓存: TTL 60秒

5.2 端侧NPU探测

| Provider | 端点 | 状态 |

|----------|------|------|

| Ollama | localhost:11434 | ✅ Implemented |

| Moore Threads GPU | localhost:8080 | ✅ Implemented |

| Huawei Ascend NPU | localhost:8888 | ✅ Implemented |

| Qualcomm NPU (QNN) | localhost:8889 | ✅ Implemented |

| Samsung Exynos | localhost:8890 | ✅ Implemented |

| DeepSeek (Cloud) | api.deepseek.com | ✅ Implemented |

5.3 MTCLAW Acceleration

MetricValue
enabledfalse (No GPU environment currently)
availablefalse
Fallback ChainMTCLAW → Ollama → DeepSeek → simulatedThinking

6. Rule Engine Integration Verification

6.1 Rule Coverage for Each Capability Scope

ScopeBuilt-in Rule CountIntegration MethodVerification
identify1executeIdentify()✅
validate4+execute('validate')✅
create3createItem() (validate→create_pre→AML→create_post)✅
create_pre5+createItem() lifecycle✅
create_post1createItem() lifecycle✅
repair12executeRepair()✅
optimize5executeOptimize()✅
compare5executeCompare()✅
generate0execute('generate') → fallback execute('transform')✅
inspect4executeInspect()✅
transform0execute('transform')✅ (fallback scope for generate)

6.2 _injectTypeContext Generality

Inject 10-step context for any ItemType:

  1. Attribute definition → 2. keyed fields → 3. required fields → 4. default values → 5. length constraints
  2. List optional values → 7. date pairs → 8. Item type attributes → 9. sequence configuration → 10. dual-database duplicate check

Validation conclusion: Generic rules (builtin-generic-*) apply to all 469 ItemTypes.


VII. List of Fixed Issues

Current Fixes (2026-06-23)

#IssueSeverityFix
1repair/optimize/compare LLM downgrade bypasses SmartLLMRouterP0Unified to _callLLMViaRouter()
2generate rule engine scope is transform, generate rules cannot be matchedP0Added GENERATE scope, try generate first then fallback to transform
3CapabilityRuntime initialization does not inject llmRouterP0Added llmRouter injection in _initCapabilityRuntime
4Missing on-device detection for Qualcomm/Huawei Ascend/SamsungP1Add 3 providers to InferenceServiceDetector
5server/services/audit-log.js missingP0Create it, providing start()/complete() interfaces
6Web client /api/digital-staff/run bypasses DispatcherP0Change to CapabilityDispatcher.execute()
7useCapabilityPipeline create executor bypasses DispatcherP0Change to dispatch('create', ...)
8No built-in rules for inspect scopeP1Add INSPECT scope + 4 rules
9Destructuring import of CapabilityDispatcher in server.js is incorrectP0Fix to direct assignment
10EPERM causes uncaughtException and process exitP0EPERM/EACCES no longer trigger exit
11pipelineStates memory leakP1Add 10-minute auto-cleanup scheduleCleanup
12lite-scheduler _pipelineOutput condition check errorP1Change to only check step.output
13Data-pipeline fallback prompt hardcodes 'Part' fieldP1Change to generic properties/relationships format
14Samsung Demo changed to support native EnglishP1Language switch=English version, Demo button only loads data

Historical Fixes (2026-06-21~22)

  • SCSAI Copy-Paste Save Functionality (4 APIs + Frontend Store/Composable)
  • Customization Center Optimization (navGroups extraction + navigation visibility + bidirectional navigation)
  • Phosphorus Chemical Knowledge Base Integration (5 tables + 34 knowledge entries + FTS search)
  • i18n ESM Compatibility Fix

VIII. Overall Architecture Assessment

Architecture ItemImplementation LevelScore
6 Core CapabilitiesAll 8 implemented, dual-channel rule engine + LLM95%
6 Core Digital Employees19 employees, covering all 6 capabilities90%
Rule EngineDeep integration, _injectTypeContext fully covered95%
LLM RouterWorker/Solver division + MTCLAW + 5 edge-side providers85%
Three-End UnificationUnified entry via CapabilityDispatcher90%
Overall Score91%

IX. Items for Improvement (P2)

  1. useCapabilityCreate.js frontend directly connects to SCSAI: intentional design, P2 migrate to Pipeline
  2. Business page CRUD directly connects to SCSAI: via useQuery.js, P2 migrate to Pipeline
  3. permission-service.js: P2 permission system not implemented
  4. inspect SCSAI query error: when SCSAIClient.applyAML throws exception, inspect returns error instead of degrading
  5. LLM Router statistics: LLM requests called by Pipeline not counted in router statistics
← 返回案例列表

Try 左帮右臂 Industrial Agent — your digital workforce

Available as a WeChat mini program, web app (ylxt.chat) and desktop client. Start from whichever fits your workflow.

🌐 Web App 💻 Desktop Download 📞 Call 189-8606-6876
WeChat mini program QR
Scan for the WeChat mini program
Share:
🤖 Try Now →
🤖
🎁