Agents Builders

Label non-bash capture actions

Archived
label-non-bash-capture-actions

Created

Jul 06, 15:37

Started

Jul 06, 15:39

Completed

Jul 06, 17:46

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

label-non-bash-capture-actions

Repositories

mcritchie-studio

Release Slug

Branch

feat/label-non-bash-capture-actions

QA URL

Production URL

observability agent-ops

Acceptance Criteria

  • Read Grep Glob actions show a synthesized summary
  • Delegate actions show the subagent description text
  • Bash auto-labeling behavior stays unchanged

Expected Test Plan

  • [unit] hook synthesizes a label per non-bash tool kind

Checks Run

  • [unit] action_summary synthesizes a label per non-Bash tool kind (Read/Edit/Write/NotebookEdit basename, Grep/Glob pattern, Task/Agent description, WebFetch url, WebSearch query, AskUserQuestion header)
  • [unit] nil-safe when a tool's param is missing; unmapped tool yields no label
  • [unit] Bash summary routing unchanged (bash_summary passthrough; no description stays nil)
  • [unit] synthesized label is secret-redacted before it lands on the public surface
  • [integration] a captured Task/delegate action POSTs the synthesized summary end-to-end
  • [full-suite@60a96b80030db57c6335cabc74076c69b60a99e5] bin/rails db:test:prepare test test:system green
  • [rubocop@60a96b80030db57c6335cabc74076c69b60a99e5] bin/rubocop clean

Agent Context

Narration-hygiene fix (operator, 2026-07-06). Non-Bash actions render blank in the Alex heartbeat (READ dash, DELEGATE dash) because the PostToolUse capture hook (bin/atomic-capture-hook) only auto-populates a goal SUMMARY for Bash (from the Bash description). Fix: in bin/atomic-capture-hook, synthesize a concise human summary for every non-Bash tool from its most meaningful param when the tool provides no description: Read/Edit/Write -> verb + file basename (Read task-board-api.md); Grep -> Grep plus the pattern; Glob -> Glob plus the pattern; Task/Agent (delegate) -> the tool description param (the 3-5 word subagent label already carried by the Agent tool -- this is the biggest win, it makes DELEGATE rows read meaningfully); WebFetch/WebSearch -> the query or URL; AskUserQuestion -> the question header. Keep Bash's existing auto-labeling EXACTLY as-is. The synthesized summary sets the action goal/summary field the heartbeat renders. See how the hook maps tool_name -> kind (KIND_MAP) and where it builds the payload; add a per-kind label function. Best-effort/non-fatal like the rest of the hook. Unit-test the label synthesis per tool kind.

Stage Timeline

Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. means the agent didn't report that metric.

Sizing Avi · PO SMALL Dev SMALL Actual XL ≠ forecast
  1. Created Designed
    L Lugia
    Lugia
    Model
    Duration
    Tokens
    Cost
    Completed Jul 06, 15:37 · 2 days ago
    api
  2. Designed Building
    L Lugia
    Lugia
    Model
    claude-opus-4-8
    Duration
    3 minutes
    Tokens
    5,919,204
    Cost
    ~$3.81
    Started Jul 06, 15:37
    Completed Jul 06, 15:39 · 2 days ago
    cli
  3. Building Submitted
    L Lugia
    Lugia
    Model
    claude-opus-4-8
    Duration
    15 minutes
    Tokens
    Cost
    Started Jul 06, 15:39
    Completed Jul 06, 15:54 · 2 days ago
    cli
  4. Submitted Blocked
    C Carl
    Carl
    Model
    claude-opus-4-8
    Duration
    37 minutes
    Tokens
    Cost
    Started Jul 06, 15:54
    Completed Jul 06, 16:32 · 2 days ago
    cli
  5. Blocked Submitted
    L Lugia
    Lugia
    Model
    claude-opus-4-8
    Duration
    8 minutes
    Tokens
    15,260,619
    Cost
    ~$9.44
    Started Jul 06, 16:32
    Completed Jul 06, 16:39 · 2 days ago
    cli
  6. Submitted Blocked
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    11 minutes
    Tokens
    3,137,291
    Cost
    ~$2.72
    Started Jul 06, 16:39
    Completed Jul 06, 16:50 · 2 days ago
    cli
  7. Blocked Reviewed Review Activity
    Model
    claude-opus-4-8
    Duration
    13 minutes
    Tokens
    24,741,701
    Cost
    ~$15.31
    Started Jul 06, 16:50
    Completed Jul 06, 17:03 · 2 days ago
    cli
  8. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    21 minutes
    Tokens
    31,920,420
    Cost
    ~$19.85
    Started Jul 06, 17:03
    Completed Jul 06, 17:24 · 2 days ago
  9. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    22 minutes
    Tokens
    3,506,639
    Cost
    ~$3.04
    Started Jul 06, 17:24
    Completed Jul 06, 17:46 · 2 days ago
  10. Shipped Archived
    Model
    Duration
    about 4 hours
    Tokens
    Cost
    Started Jul 06, 17:46
    Completed Jul 06, 22:06 · 1 day ago

Conversation

QA review feedback, agent handoffs, and follow-up notes for this task.

QA Feedback carl 2 days ago

Doc drift on the capture-hook's OWN contract: docs/agents/system/atomic-capture-hook.md line 33 still states 'summary — Bash only … other tools ⇒ absent', which is the exact behavior this PR reverses. Since non-Bash tools now synthesize a summary (Read/Edit/Write/NotebookEdit→basename, Grep/Glob→pattern, Task/Agent→description, WebFetch→url, WebSearch→query, AskUserQuestion→header), that payload-contract row is now false and will mislead future agents. Fix: in the same pass, update line 33 (and any nearby 'Bash only' summary phrasing) to describe the synthesized non-Bash label and note it is pattern-redacted like input/key_method; Bash stays its description-derived summary. Code, tests, secret-redaction (action_summary → redact_secrets before POST), nil-safety, and Bash passthrough all verified clean and CI-green — only the doc must catch up. Re-submit after the doc fix.

Handoff carl 2 days ago

Updated atomic-capture-hook.md contract to document the synthesized non-Bash summaries (redacted); code/tests unchanged.

QA Feedback avi 2 days ago

Re-review of PR #425 (resubmission). RESOLVED: the doc-drift block is cleared — docs/agents/system/atomic-capture-hook.md's summary row now matches the code line-for-line (Carl confirmed against synthesize_summary + redact_secrets at head 699a00ed), the only remaining 'Bash only' is on the key_method row which is correct, and there is ZERO code delta since last approval (only the doc commit). CI is GREEN (test SUCCESS, mergeState CLEAN). ONE remaining gate issue blocks reviewed: the full-suite + rubocop cert is STALE. It was recorded against 5cba403d (fingerprint 60a96b80) but the doc commit 699a00ed landed on top, so the cert no longer binds to head — the 'certify after final commit' trap. bin/dor-check REFUSES submitted->reviewed until a fresh cert binds to head, and it does NOT self-heal by waiting. FIX (no code work): from your worktree re-run 'bin/full-suite-check label-non-bash-capture-actions' as the LAST step (commit nothing after it), then push, 'bin/task move label-non-bash-capture-actions submitted', and post 'bin/task note label-non-bash-capture-actions --resolves-feedback ...'. Since CI is already green and the only delta is the doc, a clean re-cert clears the gate on the next pass with no further changes.

Handoff avi 2 days ago

Re-certified at head 699a00ed: fingerprint 60a96b80 IS head's tree hash (the cert was never stale -- a tree-hash-read-as-a-stale-commit false positive). dor-check now confirms DoR-to-Merge met; CI green 4 checks; content approved by Avi twice, zero code delta. Advancing to reviewed.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

SMALL

Dev

SMALL

Actual

XL