Agents Builders

Feed banked insights forward

Archived
feed-banked-insights-forward

Created

Jul 03, 12:41

Started

Jul 03, 12:41

Completed

Jul 03, 21:53

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

feed-banked-insights-forward

Repositories

mcritchie-studio

Release Slug

Branch

feat/feed-banked-insights-forward

Local URL

QA URL

Production URL

auth

Acceptance Criteria

  • Bearer endpoint returns the top-N banked insights
  • SessionStart hook injects insights into a fresh session
  • Feed is capped and newest-curation-first

Expected Test Plan

  • [unit] ActionGrade.insight_feed clamp + to_insight shape; session-insights formatter (line/context)
  • [integration] GET /api/v1/insights (feed/shape/limit/empty/auth); bin/session-insights emits SessionStart JSON end-to-end

Checks Run

  • [unit] insight_feed newest-first clamp 1..50, to_insight compact shape (drops nils, provenance from either source); session-insights insight_line ✓/✗+provenance+symbol keys, additional_context header/empty
  • [integration] GET /api/v1/insights bearer-gated returns banked feed newest-first with count meta, honors limit, empty bank ok, 401 without token; real session-insights shell-out mints token + GETs + prints SessionStart additionalContext (empty bank prints nothing, exit 0)
  • [full-suite@f3c859bc7fe706c488a7931f116038887f970294] bin/rails test green
  • [rubocop@f3c859bc7fe706c488a7931f116038887f970294] bin/rubocop clean

Agent Context

North-star lever 1 (operator greenlit 07-03): turn the OPSD learning loop from write-only to feed-forward. Today ActionGrade.banked (the Insight Bank) is read by ONE html page; nothing loads a banked lesson into a fresh session (only the Pokemon mascot auto-loads at SessionStart). Build: (1) ActionGrade.insight_feed(limit:) + #to_insight — the banked grades newest-curation-first, capped (clamp 1..50, default 12); serialize slug+disposition+long_form+grader+task_slug (provenance read INLINE from atomic_action&.task_slug || atomic_event&.task_slug — do NOT depend on #337's insight_source, which isn't merged to release yet). (2) GET /api/v1/insights (bearer-gated Api::V1 like atomic_actions) → render_data(feed). (3) bin/session-insights CLI (mirror bin/atomic-event token/HTTP/non-fatal structure) that GETs the feed and prints the Claude Code SessionStart additionalContext JSON so a fresh agent hatches with the insights in context; Codex parity via its context-injecting SessionStart. Document the settings.json wiring (activation via bin/install-agent-docs is a follow-up, like the capture hook). Relevance-by-app/shape filtering is a documented FOLLOW-UP; v1 = top-N recent. Decision seam already set by operator: SessionStart top-N hook + bank canonical.

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 MEDIUM Dev MEDIUM Actual XL ≠ forecast
  1. Created Designed
    A Arbok
    Arbok
    Model
    Duration
    Tokens
    Cost
    Completed Jul 03, 12:41 · 5 days ago
    api
  2. Designed Building
    A Arbok
    Arbok
    Model
    claude-opus-4-8
    Duration
    under a minute
    Tokens
    1,588,098
    Cost
    ~$0.98
    Started Jul 03, 12:41
    Completed Jul 03, 12:41 · 5 days ago
    cli
  3. Building Submitted
    A Arbok
    Arbok
    Model
    claude-opus-4-8
    Duration
    11 minutes
    Tokens
    30,639,886
    Cost
    ~$16.79
    Started Jul 03, 12:41
    Completed Jul 03, 12:52 · 5 days ago
    cli
  4. Submitted Reviewed Review Activity
    C Carl
    Carl primary
    J Jasper
    Jasper light
    Model
    claude-opus-4-8
    Duration
    about 1 hour
    Tokens
    2,139,517
    Cost
    ~$2.79
    Started Jul 03, 12:52
    Completed Jul 03, 13:44 · 5 days ago
    cli
  5. Reviewed Assembled
    S Steffon
    Steffon
    Model
    claude-opus-4-8
    Duration
    16 minutes
    Tokens
    2,804,893
    Cost
    ~$2.46
    Started Jul 03, 13:44
    Completed Jul 03, 14:00 · 5 days ago
  6. Assembled Shipped
    A Avi
    Avi
    Model
    claude-opus-4-8
    Duration
    about 8 hours
    Tokens
    593,519,689
    Cost
    ~$365.62
    Started Jul 03, 14:00
    Completed Jul 03, 21:53 · 5 days ago
  7. Shipped Archived
    Model
    Duration
    about 10 hours
    Tokens
    Cost
    Started Jul 03, 21:53
    Completed Jul 04, 07:34 · 4 days ago

Conversation

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

No task feedback has been recorded yet.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

MEDIUM

Dev

MEDIUM

Actual

XL