Implements audit-harness-inspired session lifecycle: audit session creation/end/recover/report-daily with JSONL buffer and graded context recovery (L0-L4). Guideline service for behavioral compliance rules (condition/action model with criticality). Correction service for persistent user correction tracking across agent sessions. 8 supporting skills: audit-start/end/report-daily/recover + command variants for slash-command integration.
2.1 KiB
2.1 KiB
name, description
| name | description |
|---|---|
| audit-recover | Restore lost context from audit trail. Use when unsure of prior decisions, can't remember what was discussed, or the user says "/recover". Do not guess — check the records. |
/recover — Context Recovery
Trigger
/recover # L0+L1+L2 (current session)
/recover full # L3 (full trail)
/recover {session_id} # specific session
Core principle
When uncertain, check the audit trail. Do not work from memory. Recovering from records is the only reliable way to avoid repeating corrected mistakes.
When to trigger
| Signal | What to do |
|---|---|
| Can't recall session details | Run /recover |
| Unsure about current task | Run /recover |
| About to propose something possibly corrected | Run /recover, check corrections |
| Answer is vague, missing specifics | Run /recover full |
Steps
Graded loading
Level 0 — Index (~200t)
Read .boo/runs/index.json → last 5 entries (id, task, status)
Level 1 — Task state (~500t)
Read .current_session → session_id
Read session.json → task, start_time
Read last 3 audit_trail.jsonl entries → "where am I"
Level 2 — User corrections (~1000t) ⚠️ HIGHEST PRIORITY
Scan all audit_trail files for user_correction records
Scan for conclusion entries
Read latest daily report §4 (anomalies) + §6 (backlog)
Level 3 — Full context (~3000t, /recover full only)
Full audit_trail.jsonl
Full audit_pending.jsonl
Output
=== Context Recovery Report ===
Source: .boo/runs/<session_id>/
Level: L2
Task: <session.task>
Status: <last action>
⚠️ User corrections (must follow):
1. <timestamp> Original: "..."
Correction: "..."
Principle: <principle>
Key conclusions:
- <...>
Open issues:
- <...>
⚠️ Recovered from audit trail, not memory.
Notes
- Corrections have highest priority — don't contradict them
- If current plan contradicts corrections, correct the plan
- Keep output concise — don't copy entire trail into context
- Recover "why" and "don't" before "what was done"