← ClaudeAtlas

session-triagelisted

Decide whether to open a Mission + Run based on session signals (turns, debug keywords, tool failures). Open, observe, record-tool. Keeps active-task persistence automatic per `runtime-state-required`.
Kucell/cortex-agent · ★ 1 · AI & Automation · score 74
Install: claude install-skill Kucell/cortex-agent
# session-triage (L1 audit-trail — Phase 1) Decide whether the current session warrants an active-task persistence record (mission + run + structured events). When it does, open both in one shot. When the agent makes observations or hits tool failures, log them as typed events so a fresh agent / a future session can resume. ## When to Use - SessionStart hook fires and the session has 3+ turns of investigation / debug work → run `triage` automatically. - At any time during the session, when the user surfaces an observation → run `observe --message "…"`. - After any tool failure → run `record-tool --tool <name> --exit <n> --stderr "…"`. ## Commands ### 0. `triage` — decide & open if warranted ```bash node .agent/skills/session-triage/scripts/index.js triage \ --threshold 3 \ --signal-file /tmp/session-signals.json # optional, defaults to stdin ``` Reads a JSON `{ turns: N, text: "...", tool_failures: N, user_questions: N }`. Prints `{ open: bool, mission_id?: "M-NNN", run_id?: "R-...", reason }`. Side-effect (when `open: true`): invokes `management-api` to create both a mission and a run via existing endpoints (`missions/M-NNN/`, `runs/R-...json`). Pure logic when stdin is empty / signals weak — prints `open: false` and exits 0 (no failure). ### 1. `observe` — log a human observation ```bash node .agent/skills/session-triage/scripts/index.js observe \ --run-id <id> --message "user observed canvas render area disappeared" \ [--phase triage|investigation] ```