2.6 KiB
Report and Experience Agent
The first implementation is available at /report-workbench. It consumes an
immutable risk-run snapshot from Agent 1 and uses the mini-openclaw AgentManager
for optional AI chapter proposals.
Workflow
- Select a risk run and record a human source-confirmation note.
- Create a report using the bundled example corporate template.
- Review the fixed facts and evidence chapters. Edit the judgment and conditions chapters, or request an AI proposal and review it before saving.
- Lock every chapter and finalize with a reviewer opinion.
- Review the resulting experience card through its successive states. Sharing requires an approval result and an independent reviewer. Verification requires a post-lease observation result.
- Export the current report as a Word document.
Boundaries
- Facts and evidence cannot be overwritten. Changed facts require a new source run and report. Final reports are immutable; updates use optimistic versions.
- AI proposals never overwrite saved chapters. Missing or failed local models produce an explicit error while preserving the report.
- Administrators and reviewers can prepare drafts. Reviewers finalize reports and advance experience cards. Managers can read/export their assigned projects.
- Local preview permits all operations for demonstration. Configure
XINGBANG_AUTH_USERSandXINGBANG_REQUIRE_AUTH=1for authenticated use, as described inRISK_AGENT_GUIDE.md. - Documents and events are stored alongside risk runs in the local SQLite store.
Current Scope
This is a working first version, not the complete production workflow. The template is an example, not an approved Xingbang report template. Custom template management, semantic consistency checks, experience retrieval by Agent 1, ERP approval/post-lease synchronization, and formal organization roles remain to be implemented. Experience states currently record review progress; a searchable state does not yet publish the card into a retrieval index.
The local model integration uses the existing scoped agent tools and
backend/skills/report_evidence/SKILL.md. Live model output requires a configured
local model with tool-calling support; automated tests mock that model call.
Verification
Run from the repository root:
python -m unittest discover -s backend -p "test_report_agent.py"
python -m unittest discover -s backend -p "test_risk_agent*.py"
python -m unittest discover -s backend -p "test_risk_core.py"
npx tsc --noEmit
verify-report-agent.cjs exercises report creation, chapter editing/locking and
Word download against the preview servers, and captures desktop/mobile layouts.