task-debrief · v1.1.0 · 2026-10-16 · sha256 8e881c2aa2865d15
task-debrief v1.1.0A
Immutable. This exact content never changes and is served at /api/v1/blob/8e881c2aa2865d15.
--- name: task-debrief description: Use when the user invokes a task debrief to verify the agent's completed work and audit its child agents, time, logged model cost, and workflow lessons in a private report. author: J StaR Films coauthored: J StaR Films / Takomi version: 1.1.0 disable-model-invocation: true --- # Task debrief Run this only when the user invokes `/skill:task-debrief`. Arguments may name a task or time range. This is a read-only audit of work, apart from files in `C:/Users/johno/.agents/task-audits/`. Do not modify project files, skills, configuration or external services as part of the audit. Suggest improvements; seek separate approval to apply any of them. Do not spawn agents to audit agents by default. 1. **Completion gate, before any audit work.** Check your own live `todo` list and Takomi board, if used, for work belonging to the task being audited. Verify completed items against deliverables and checks, not status labels alone; report any relevant `pending`, `in_progress`, or `blocked` items. Do not mistake unrelated tasks for this task's unfinished work, silently mark items complete, or treat deferred work as finished. If this task has unfinished work, report it and stop before opening transcripts, collecting usage, or writing notes. If its task state cannot be inspected, report that limit and stop. Do not ask the user whether their to-do list is done; this is the agent's completion check. Continue with unfinished or unverifiable work only when the user explicitly requests an interim audit, and label it as such. After the gate passes, locate the invoking user message timestamp and use it as the cutoff so this audit does not count itself. If that timestamp is unavailable, state the chosen cutoff and its limitation. Use the current `PI_SESSION_FILE` from a Pi shell tool as the parent journal. If the journal holds multiple tasks, establish the requested task's start and end from the user's messages and completion; ask if the boundary is ambiguous. An ephemeral session or unavailable journal means costs are unknown, not zero. The current project is the repository root (or the working directory if no repository). Use its directory name as the report's project label; distinguish same-named projects by a short path hash if needed. Make a new report directory `C:/Users/johno/.agents/task-audits/<project>/<task-id>/`, using the task's existing thread ID or journal session ID for `<task-id>`. Keep reports private and do not copy full transcripts or personal records into them. 2. **Establish child ownership.** If T3 is available, get the current thread ID from `t3_thread_list` and paginate `includeSubagents: true` across the project. Select only descendants with an unbroken `parentThreadId` chain to this thread, not merely similar titles. Use `t3_thread_read` activity for each owned child to record its runs and their statuses/times. Match each child to a local Pi journal by a unique session name, creation time and worktree/session provenance. Inspect only candidate session headers, not every unrelated chat's messages. A matching title alone is insufficient. If several journals could match, leave that child unmatched and disclose the gap. If T3 isn't available, use explicit task/child IDs in local execution artifacts or user-supplied manifests; report ownership as unverified. Other providers' agents may have no local Pi journal; include them as missing-usage children, not as $0 agents. Never infer ownership from a project-wide file count. 3. **Calculate usage.** Write a small `manifest.json` inside the private report directory, with the parent and each owned child's exact thread ID, parent ID, title, optional `sessionFile` and all returned run records. The manifest is private metadata, not a transcript. Run `node <skill-directory>/scripts/collect.cjs --parent "$PI_SESSION_FILE" --parent-thread <thread-id> --expected-children <count> --manifest <report-dir>/manifest.json --out <report-dir> --start <ISO-time> --cutoff <ISO-time>`. For no T3 children pass `--expected-children 0` and an empty manifest only when that zero is verified. The collector writes `usage.json` and `usage.md`. Verify the child count, matched journals, timestamp bounds and warnings before quoting totals. When usage records or child journals are missing, report *known logged estimate* and *unknown remainder*, not a full cost. 4. **Read the task's evidence.** Inspect relevant user requests and corrections, task packets, child conclusions, test and release receipts, and actual blockers. Sample where large; cite concrete messages, files or dated events. Separate user-authored prompts from system notifications and compaction summaries. Say what went well, whether work went smoothly, what caused friction, what the user's prompting helped or complicated, and what the agent should change. Attribute failures fairly; label hypotheses as hypotheses. Distinguish calendar duration, summed child run intervals (which can overlap or include waits), actual tool activity and billed compute. Pi's `usage.cost` is a logged estimate, not a payment receipt. Provider subscriptions, external reviewers and infrastructure may be outside it. 5. **Save one useful note.** Write `retrospective.md` in the same report directory: task scope/outcome and remaining work; evidence-backed wins/friction; prompting feedback; harness/skill improvement candidates with owner and expected benefit; a short prioritized next-time checklist; link `usage.md`; coverage, estimate-vs-invoice caveat and any unknowns. Keep opinion and evidence separate. No raw prompt dumps or credential values. Mention where the notes live in the chat reply, along with the total *known logged* estimate and missing coverage. For an explicitly requested interim audit, list unfinished or unverifiable items and state that the task is not verified complete. For Pi-only use, there may be no T3 metadata. Then ask for a specific child manifest or report only the verified parent instead of inventing an all-agent total. On another harness, use its verified session and usage records; this collector is Pi JSONL-specific. Re-run with a new dated report directory or explicit consent before replacing an existing report.