Position Assistant (Digital Employee) System Status Assessment — 2026-08-10
Assessment Method: Static structure audit (61 employee definitions / 39 worker implementations / routing table) + real operation smoke test (runStaffOnce executed for 4 representative employees + 12 keyword routes).
Conclusion: Overall functional. Identified and fixed 1 critical bug that would paralyze all 'capability-type' employees (rule_engine.db old schema), and fixed 1 non-critical coverage enhancement gap.
I. Architecture and Scale
- Entry point: server.js → startDigitalStaff() → boss-scheduler/index.js (unified BossScheduler, local LiteScheduler) → runStaffOnce(staffId, intent).
- Dispatch sequence (lite-scheduler _dispatchWorkerPath): loop/goal → pipeline → worker script → capability single-ability → generic.
- Employee definition source: server/boss-scheduler/profiles/local.yaml, all 61 employees enabled.
- Worker implementation: 39 .js files under server/boss-scheduler/workers/; 35 keys in the WORKERS mapping table of lite-scheduler.
| Dimension | Count | Description |
|---|---|---|
| Defined employees | 61 | All enabled |
| Has available worker implementation | 43 | Key exists in WORKERS mapping and file exists |
| Capability only (no worker) | 7 | import / inspect / repair / compare / valuate / collect / identify |
| No worker but contains pipeline/loop configuration | 11 | Follows pipeline / loop / generic path |
| Orphaned worker files (not referenced by any employee) | 4 | asset-valuator / inspect-worker / repair-worker / report-i18n |
II. Keyword Routing Test (staff-router.matchStaff)
Routing performed on 12 real business statements, 11 correctly matched, 1 deviation:
| User Statement | Matched Staff | Score | Remarks |
|---|---|---|---|
| Check quality data for the phosphoric acid extraction process | DS-OPS-001 | 20 | ✅ |
| Analyze cost structure of precision rotating shafts | DS-COST-001 | 20 | ✅ |
| Is there a material shortage in inventory? | DS-STOCK-001 | 10 | ✅ |
| Supplier evaluation | DS-VEN-001 | 30 | ✅ |
| Run the liquor industry knowledge base pipeline | DS-KBPIPE-001 | 30 | ✅ |
| Process parameter anomaly, help me fix it | DS-SUPPLY-001 | 15 | ⚠️ Should be DS-REPAIR-001 / DS-INSPECT-001 |
| Is the system healthy? | DS-BOSS-002 | 30 | ✅ |
| Generate business analysis report | DS-REPORT-001 | 45 | ✅ |
| Look up NCR investigation form | DS-NCR-001 | 20 | ✅ |
| SPC Control Chart Out of Bounds | DS-SPC-001 | 20 | ✅ |
| What's the News Today | DS-NEWS-001 | 10 | ✅ |
| Write a Product Copy | DS-CONTENT-001 | 5 | ✅ (Low Score but Still Hit) |
III. Real Operation Smoke Test (runStaffOnce)
All success=true, and real data (not empty shells) is returned:
| Staff | Duration | Result |
|---|---|---|
| DS-SYS-001 System Operations Engineer | 485ms | All systems healthy ✅ |
| DS-PROC-DATA-001 Process Data Repair Specialist | 1.5s | Read sccapp_process_data.db, found PPS master data quality issues: Empty process files 5217 / Orphaned 3230 / Unnamed 3489 / Empty fields 47980, generated HTML report ✅ |
| DS-INSPECT-001 Data Inspector (capability path) | 5.2s | Executed identify→inspect→generate pipeline ✅ (This path was paralyzed before the fix, see Section IV) |
| DS-STOCK-001 Inventory Manager (SCSAI Backend) | 54ms | Query SCSAI yields 6 stock items, 4 below safety level, estimated replenishment ¥485,504 ✅ |
Note: MTClaw local acceleration service not started, capability-based employees automatically downgraded to rule engine (still functional, just slower).
IV. Discovered and Fixed Critical Bugs (Hard)
Bug 1: Old schema in rule_engine.db caused rule engine initialization failure (fixed)
- Symptom: All employees using the 'Capability / Rule Engine' path (import / inspect / repair / compare / valuate / collect / identify, etc., 7 types + rule engine fallback) reported [sqlite-compat] exec failure (rule_engine.db): no such column: rule_id during startup, causing rule engine initialization to abort. Each execution step stalled for ~10s before downgrading.
- Root Cause: rule_engine.db was created by old code. The table structures of sciot_corrections / sciot_rule_candidates / sciot_rule_history were inconsistent with the new version (missing columns like rule_id). _ensureTables used CREATE TABLE IF NOT EXISTS, which is a no-op for existing tables, causing subsequent CREATE INDEX ... ON sciot_corrections(rule_id) to fail directly.
- Fix: Added idempotent _migrateStaleColumns() at the beginning of initialize() in server/core/rule-engine.js (performs ALTER TABLE ADD COLUMN for missing columns, safely preserving existing data).
- Verification: After the fix, the rule engine initializes successfully, coverage enhancement improves from 0% to 100%, all 4 smoke tests pass, and there are 0 schema errors.
- Backup: server/data/rule_engine.db.bak-20260810 (pre-fix).
Bug 2: Missing columns in sciot_item_types caused coverage enhancement to be skipped (non-fatal, now fixed).
- Phenomenon: [RuleEngine] Rule coverage enhancement failed (non-fatal): no such column: is_core_business. Five-dimensional full coverage enhancement not executed.
- Root Cause: rule-coverage-enhancer.js only added the category column, missing is_core_business.
- Fix: In Phase 0 of server/core/rule-coverage-enhancer.js, perform unified "existence check + add missing column" for both the category and is_core_business columns.
5. Open Items / Suggestions (Non-blocking)
- MTClaw not started: Capability-type employees currently rely on the rule engine as a fallback. To improve complex task quality, start the local MTClaw acceleration service (http://127.0.0.1:18790).
- 18 employees without workers only sampled for verification: The capability/pipeline/loop path mechanism is confirmed functional (inspect test OK), but not tested individually. It is recommended to run a confirmation test for each of the 7 capability-only employees.
- 4 orphan workers are not wired: inspect-worker.js / repair-worker.js exist, but DS-INSPECT-001 / DS-REPAIR-001 follow the capability path. For richer behavior, you can add worker: pointing to them in the YAML.
- server.js is currently not running: routes have been grep-checked with no conflict markers (can be started). The HTTP endpoint /api/digital-staff/run reuses the same runStaffOnce path.
- Lite mode LLM is off by default: pure generic path (without worker/capability/pipeline/loop) staff rely on LLM to produce substantive content.
6. Conclusion
Usable. The framework can start, route, and execute real tasks for most staff. The rule engine schema bug that previously blocked 'capability-type' staff (7 core quality/data staff) has been fixed and verified. Remaining items are enhancements and do not affect 'end-to-end usability'.
BossAgents