Agents Builders

Wire Avi task sizing

Archived
avi-task-sizing

Created

Jun 25, 20:47

Started

Jun 25, 21:17

Completed

Jun 25, 22:58

DevOps handoff

Type

Feature

Shape

backend

Worktree Slug

avi-task-sizing

Repositories

mcritchie-studio

Release Train

Branch

feat/avi-task-sizing

Local URL

QA URL

Production URL

backend workflow docs

Acceptance Criteria

  • bin/task create accepts size estimate flags
  • Avi sets po_size at task creation time
  • Builder stamps dev_size on move to building
  • actual_size auto-derives from measured usage at ship
  • AGENTS and CLAUDE docs describe sizing workflow

Expected Test Plan

  • [unit] size flag parsing + actual_size derivation specs
  • [integration] create→building→ship size lifecycle

Checks Run

  • [unit] derive_actual_size threshold boundaries + zero-usage nil (test/models/task_test.rb)
  • [unit] CLI size-flag validation rejects bad values (test/lib/task_cli_test.rb)
  • [integration] create --po-size, move building --dev-size, ship auto-derives actual_size (test/controllers/api/v1/tasks_controller_test.rb)
  • [integration] API permits po/dev/pm size columns; 422 on out-of-range (test/controllers/api/v1/tasks_controller_test.rb)
  • [full-suite@0b26c3947209ba89597ab833400cfe64db5b4fa0] bin/rails test green
  • [rubocop@0b26c3947209ba89597ab833400cfe64db5b4fa0] bin/rubocop clean

Agent Context

Epic: Task Intelligence (#3 of 4, backend+docs). SEQUENCE: build AFTER usage-capture-hardening (shared files bin/task + app/models/task.rb). Sizing infra ALREADY EXISTS: Task has pm_size/po_size/dev_size/actual_size (SIZES=small/medium/large/xl), sizes_revealed_at sealed-bid reveal, /tasks/:slug/sizing page (SizingsController). Work: (a) add --po-size/--dev-size/--pm-size flags to bin/task create + update; (b) Avi=default sizer sets po_size at create (NOT a hard gate — direct bin/task create still allowed, size backfilled); (c) builder Pokémon stamps dev_size on move→building (it already claims lease there); (d) AUTO-DERIVE actual_size at ship from measured tokens+cost+duration via thresholds (small/med/large/xl) — wire into the →shipped transition; (e) update AGENTS.md + CLAUDE.md DevOps Routing to describe Avi-sizes-then-Pokemon-builds. Decision log: operator chose default-sizer-not-gate + auto-derive actual_size. Feeds the estimate-vs-actual chart in task-intelligence-dashboard.

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 Dev Actual LARGE
  1. Created Designed
    R Rhydon
    Rhydon
    Model
    Duration
    Tokens
    Cost
    Completed Jun 25, 20:47 · 1 day ago
    api
  2. Designed Building
    R Rhydon
    Rhydon
    Model
    claude-opus-4-8
    Duration
    30 minutes
    Tokens
    Cost
    Started Jun 25, 20:47
    Completed Jun 25, 21:17 · 1 day ago
    cli
  3. Building Submitted
    R Rhydon
    Rhydon
    Model
    claude-opus-4-8
    Duration
    26 minutes
    Tokens
    14,825,754
    Cost
    ~$11.07
    Started Jun 25, 21:17
    Completed Jun 25, 21:43 · 1 day ago
    cli
  4. Submitted Reviewed
    J Jasper
    Jasper primary
    A Alex
    Alex light
    Model
    claude-opus-4-8
    Duration
    21 minutes
    Tokens
    Cost
    Started Jun 25, 21:43
    Completed Jun 25, 22:04 · 1 day ago
    cli
  5. Reviewed Assembled
    S Steffon
    Steffon
    Model
    Duration
    41 minutes
    Tokens
    Cost
    Started Jun 25, 22:04
    Completed Jun 25, 22:45 · 1 day ago
  6. Assembled Shipped
    A Avi
    Avi
    Model
    Duration
    13 minutes
    Tokens
    Cost
    Started Jun 25, 22:45
    Completed Jun 25, 22:58 · 1 day ago
  7. Shipped Archived
    Model
    Duration
    about 3 hours
    Tokens
    Cost
    Started Jun 25, 22:58
    Completed Jun 26, 01:51 · 1 day ago

Conversation

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

Comment 1 day ago

Review pair APPROVED: jasper (heavy) + alex (light). Sizing logic correct vs all 5 acceptance bullets — ACTUAL_SIZE_THRESHOLDS small->xl exclusive bounds + INFINITY catch-all; measured_tokens_total sums COALESCE(tokens_in+tokens_out); after_update :autoderive_actual_size is shipped-only, blank-only (never clobbers manual /sizing), update_column (no re-entrancy), rescue->ErrorLog (can't unwind a ship); validations + client/server defense-in-depth. Docs land in canonical index.md/claude.md. CI green. HELD DRAFT (jasper ready-to-undraft=NO): hard dependency — must merge AFTER #208 (usage-capture-hardening), then re-rebase bin/task + task.rb + re-confirm CI before undraft. Non-blocking nits: measured_tokens_total comment says 'tokens_total' (sums in+out); docs forward-ref a not-yet-built 'sizing intelligence dashboard' (real consumer is /sizing) — reword on next touch.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

Dev

Actual

LARGE