85 lines
4.7 KiB
Markdown
85 lines
4.7 KiB
Markdown
# Review Coordination Agent
|
|||
|
|
|
||
|
|
Agent 3 is available at `/review-workbench`. The local preview runs at
|
||
|
|
`http://127.0.0.1:3012/review-workbench` with the API on loopback port 8012.
|
||
|
|
The application reuses Agent 1 risk snapshots, identity configuration, SQLite
|
||
|
|
storage, audit trail, and mini-openclaw's scoped AgentManager execution.
|
||
|
|
|
||
|
|
## Workflow
|
||
|
|
|
||
|
|
1. Create a coordination project from an existing risk run. Select its industry
|
||
|
|
and complexity (1-5). Only one active coordination record per project is allowed.
|
||
|
|
2. Configure reviewers with industries, capacity, outside workload, availability,
|
||
|
|
and project exclusions. The recommendation ranks eligible people using industry
|
||
|
|
matching (40 points) and remaining capacity after assignment (up to 60 points).
|
||
|
|
Local workload is the sum of assigned active project complexity. Capacity and
|
||
|
|
outside workload use the same units. These are preview heuristics, not approved
|
||
|
|
Xingbang assignment policy. An administrator confirms the local assignment.
|
||
|
|
3. Convert findings into follow-up tasks with an owner and due date, or record
|
||
|
|
a reviewer's evidence-based disposition. Material submission does not close a
|
||
|
|
task. Inspection must precede reviewer confirmation. A reviewer can reopen it.
|
||
|
|
4. Record the proposal: CNY ten-thousands, months, annual percentage rate, deposit
|
||
|
|
percentage, and guarantee conditions. Each actual change stores old/new values
|
||
|
|
and creates affected review items. Decimal-equivalent inputs are not changes.
|
||
|
|
5. Confirm pending risks, tasks and change reviews before department review,
|
||
|
|
committee preparation, or completion. A proposal must also be recorded.
|
||
|
|
6. Inspect the current briefing, export text, or request an AI briefing.
|
||
|
|
|
||
|
|
Proposal changes during department review or committee preparation return the
|
||
|
|
project to financial analysis. Updating to a later risk snapshot for the same
|
||
|
|
project preserves previous snapshots, invalidates applicability of old risk
|
||
|
|
confirmations, and creates data/report review tasks. Open tasks remain open.
|
||
|
|
|
||
|
|
## Human Authority
|
||
|
|
|
||
|
|
- Administrator: people configuration, local assignment, task preparation,
|
||
|
|
inspections and proposal recording.
|
||
|
|
- Reviewer: risk disposition, task resolution/reopening, change confirmation,
|
||
|
|
and progression through final review stages; also prepares tasks and proposals.
|
||
|
|
- Customer manager: sees authorized project records and submits material references.
|
||
|
|
- Loopback-only preview: all operations enabled for demonstration.
|
||
|
|
|
||
|
|
The current roles reuse the existing application roles. Secretary, assigned main
|
||
|
|
reviewer and department-head identity mapping still needs formal organization
|
||
|
|
integration. The workspace records local responsibilities; it does not assign or
|
||
|
|
approve projects in ERP. Configure authentication using `RISK_AGENT_GUIDE.md`.
|
||
|
|
|
||
|
|
## Agent Execution
|
||
|
|
|
||
|
|
The optional AI briefing uses `risk.local_model` -> `invoke_risk_task` ->
|
||
|
|
`AgentManager.invoke_scoped` with only authorized snapshot-reading tools and the
|
||
|
|
`review_coordination/SKILL.md` native skill. It cannot assign, close tasks, execute
|
||
|
|
SQL, or change reports. Missing model configuration returns a clear error without
|
||
|
|
changing the project. A briefing is visibly stale after another project update.
|
||
|
|
Tests run the real agent/tool loop with a deterministic test model; a production
|
||
|
|
local model has not been exercised in this environment.
|
||
|
|
|
||
|
|
## Current Integration Boundaries
|
||
|
|
|
||
|
|
- Reviewer information and workload are manually configured, not live ERP data.
|
||
|
|
- Material submissions record ERP identifiers or file locations. There is no
|
||
|
|
file upload, attachment retrieval or content inspection in this version.
|
||
|
|
- Change impacts are conservative deterministic review checklists. They do not
|
||
|
|
perform financial recalculation or automatically rewrite Agent 2 reports.
|
||
|
|
- Source updates select a later existing Agent 1 run; they do not poll ERP.
|
||
|
|
- The briefing export is text, not the formal committee document template.
|
||
|
|
- This does not implement experience retrieval from Agent 2, reminder delivery,
|
||
|
|
automatic assignment, or formal approval writeback.
|
||
|
|
- Sample people and tasks created by browser verification are explicitly labeled
|
||
|
|
as examples. They are stored locally and can be used to try the workflow.
|
||
|
|
|
||
|
|
## Verification
|
||
|
|
|
||
|
|
```powershell
|
||
|
|
python -m unittest discover -s backend -p "test_coordination_agent.py"
|
||
|
|
python -m unittest discover -s backend -p "test_risk_agent*.py"
|
||
|
|
python -m unittest discover -s backend -p "test_report_agent.py"
|
||
|
|
python -m unittest discover -s backend -p "test_risk_core.py"
|
||
|
|
npx tsc --noEmit
|
||
|
|
node verify-coordination-agent.cjs
|
||
|
|
```
|
||
|
|
|
||
|
|
The browser script uses the running preview servers and creates labeled demo
|
||
|
|
records. It checks project intake, people, assignment, material submission, plan
|
||
|
|
changes and impacts, briefing download, and layouts at 1440, 1024 and 390 pixels.
|