docs(小宝预警): 更新架构与 Agent 规范

This commit is contained in:
Script Generator
2026-06-29 20:05:55 +08:00
parent f8db9aa384
commit 37695a8101
5 changed files with 65 additions and 6 deletions

View File

@@ -177,3 +177,18 @@ The personal daily report is derived from two inputs:
`workspace-daily-report.ts` remains a pure aggregation engine. It groups today's current-user activity into delivery, progress, creation, risk, and note sections, and also detects in-progress work that started before today but has no activity or progress note today.
This is intentionally not a generic rules engine or event bus. The rule surface is explicit, typed, and local to the workspace/daily-report use case.
## Xiaobao Warning Layer (2026-06-29)
Xiaobao Warning is a version-level release-risk capability shown above `/workspace` in the main navigation. It answers whether a version can ship on the expected release date, why it may not, roughly how long it may slip, and which release window is safer.
The rule surface stays in pure frontend engines:
- `xiaobao-risk.ts`: risk score, level, forecast release date, confidence, and current snapshot.
- `xiaobao-risk-evidence.ts`: version work aggregation, daily report/activity evidence, and silent-risk detection.
- `xiaobao-risk-trend.ts`: daily snapshots, trend detection, and snapshot signatures.
- `xiaobao-risk-ai.ts`: AI trigger policy, cache signature, and backend request mapping.
Managers with `xiaobao.warning:manage` can see all unfinished versions. Non-managers with `xiaobao.warning:view` can only see unfinished versions where the current user is in `version.members`.
AI explains rule results only. It writes interpretation cache to `xiaobao-risk-insights` and never mutates Version, Requirement, DevTask, TestCase, Bug, or Member data. Risk snapshots are saved to `xiaobao-risk-snapshots` when the page is opened. The first version uses page-triggered analysis rather than a background scheduled Agent.