Files
boocode/data/skills/boocode/audit-start/SKILL.md
indifferentketchup 9f6f6f7871 feat(coder,server): audit engine — session audit, guideline compliance, user correction tracking
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.
2026-06-07 22:16:35 +00:00

2.2 KiB

name, description
name description
audit-start Create an audit session with context recovery. Use when beginning a new task, before making changes, or when the user says "/start". Ensures all subsequent work is tracked in a recoverable session.

/start — Audit Session + Context Recovery

Trigger

/start "task description"

Why

Every work session should be tracked. Without a session:

  • Hooks output to an auto_ session with no task description
  • /end can't run integrity checks
  • Daily reports lack task context

/start costs one directory + one JSON file. The return is traceability.

Steps

1. Create the session

  1. Generate session_id = adhoc_YYYYMMDD_HHMM
  2. mkdir -p .boo/runs/{session_id}
  3. Write session.json:
    {
      "session_id": "<id>",
      "task": "<user description>",
      "start_time": "<ISO 8601>",
      "status": "in_progress",
      "expected_record_types": ["data", "change", "conversation"]
    }
    
  4. Write .boo/runs/.current_session with session_id (hook handshake)

2. Context recovery

Level 0 — Index:

  • Read .boo/runs/index.json → last 5 entries (id, task, status)

Level 2 — User corrections (critical):

  • Scan recent audit_trail.jsonl files for user_correction records
  • These must be surfaced first — repeating corrected mistakes wastes effort

Level 1 — Task state:

  • Read latest .boo/runs/daily/*_daily.md if it exists (§4 anomalies, §6 backlog)
  • Read latest *_morning_review.md if it exists

3. Check unfinished sessions

  • Scan .boo/runs/ session dirs for session.json with status: "in_progress"
  • If found, propose: continue existing session or start fresh

4. Output recovery summary

Audit session: adhoc_20260320_1400
Task: <description>

Context recovery:

Recent activity:
  - <last 3 completed tasks>

⚠️ User corrections (must follow):
  - <all user_correction records>

Unresolved:
  - <unfinished sessions, open alerts>

Today's priorities:
  - <recommendations>

Notes

  • If .boo/runs/ doesn't exist, create it
  • If no history, start clean — no errors
  • session_id stays constant for the whole session; all [AUDIT] blocks share it
  • If .current_session already points at an active session, ask before replacing