Repository navigation
Closed
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Description
Story
As a cost-observability maintainer,
I want add a date-versioned claude-opus-5-5 pricing row and a regression test that pins its rate,
so that deep-tier token-cost reports price Opus 5.5 calls correctly the moment the model is invoked, instead of falling through to no matching glob.
Acceptance Criteria
- A new TAB-separated row
claude-opus-5-5* 2026-09-22 4.00 0.20 5.00 20.00(columns: model_glob, effective_from, input, cache_read, cache_write, output) is appended to scripts/lib/model-pricing.tsv in the Anthropic Claude section. price_for claude-opus-5-5 2026-09-23returns exactly4.00 0.20 5.00 20.00(verified via a new test in tests/model_pricing.bats).- The new glob does not collide with or shadow the existing
claude-opus-4-*row:price_for claude-opus-4-8 <2026 date>still returns5.00 0.50 6.25 25.00. bats tests/model_pricing.batspasses andshellcheckis clean on any touched shell (no engine.sh change in this story).
Tasks / Subtasks
- Append the claude-opus-5-5 pricing row in the authoritative Claude block of model-pricing.tsv, preserving the append-only, effective-dated convention documented in the file header (never edit an existing row). (AC: test issue from agent #1)
- Add a price_for regression test for claude-opus-5-5 mirroring the existing sonnet-5 window tests. (AC: Go-live improvements for PR review agent #2)
- Add/confirm a guard test that the opus-4-* glob is unaffected by the new row (more-specific-glob selection). (AC: Add @claude delegation, auto-merge, and rebase handling #3)
- Run
bats tests/model_pricing.batsand shellcheck; fix any lint. (AC: Optimize review: small-PR and incremental fast paths #4)
Dev Notes
- model-pricing.tsv is DATA, not code: prices change only by APPENDING a new dated row for a glob — never mutate an existing row (header block in scripts/lib/model-pricing.tsv documents the deterministic most-specific-glob + effective_from<=T selection).
- Column order is input, cache_read, cache_write, output (USD/MTok). cache_write here is the placeholder $5.00 from the idea; if the migration guide states a different 5-minute cache-write rate, use that value and note the source in the row comment.
- The existing
claude-opus-4-*glob (effective 2025-11-01) will NOT matchclaude-opus-5-5(different major digit), so there is no shadowing — AC-3 exists to lock that in against future glob edits. - Test file scripts/lib is sourced by tests/model_pricing.bats via
source scripts/lib/model-pricing.sh; follow the existingrun price_for .../[ "$output" = "..." ]pattern. - This story touches ONLY pricing data + its test — no engine.sh, so it is safe to land ahead of any model swap and carries zero runtime blast radius.
Project Structure Notes
Confined to scripts/lib/model-pricing.tsv and tests/model_pricing.bats — matches the repo's 'prices are reviewed data' pattern; no workflow or engine change.
References
- scripts/lib/model-pricing.tsv#header-append-only-convention
- scripts/lib/model-pricing.sh#price_for
- tests/model_pricing.bats#sonnet-5-window-tests
Likely target surface
scripts/lib/model-pricing.tsvtests/model_pricing.bats
Story prepared by the BMAD Scrum Master (Bob) for epic #1895. Status: ready-for-dev.
Metadata
Metadata
Assignees
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Activity
don-petry commentedon Sep 23, 2026
Dev-Lead Implementation Plan
Issue: #1896 — [Phase 1] Price claude-opus-5-5 in model-pricing.tsv and lock it with a regression test
Scope
Append a date-versioned
claude-opus-5-5*pricing row (2026-09-22) to the authoritative Anthropic block ofscripts/lib/model-pricing.tsvand lock it with regression tests, without touching engine.sh.Implementation Checklist
claude-opus-5-5* 2026-09-22 4.00 0.20 5.00 20.00in the Anthropic Claude block ofscripts/lib/model-pricing.tsv(append-only; never edit an existing row)Tests to Write
price_for claude-opus-5-5 2026-09-23→4.00 0.20 5.00 20.00(mirrors the sonnet-5 window tests)price_for claude-opus-4-8 <2026 date>→5.00 0.50 6.25 25.00(opus-4-* glob unaffected — no shadowing)Test Command
bats tests/model_pricing.bats(plus full suite) andbash .dev-lead/scripts/dev-lead-lint.shdon-petry commentedon Sep 23, 2026
Dev-Lead: Progress (in progress — not yet durable)
Plan Execution (intended)
claude-opus-5-5*row (effective 2026-09-22) to the Anthropic Claude block ofscripts/lib/model-pricing.tsv, immediately after theclaude-opus-4-*row (append-only; no existing row edited).price_forregression tests: the opus-5.5 window (4.00 0.20 5.00 20.00) and a guard that theopus-4-*glob is unaffected by the new row.Notes on the data value
cache_write = 5.00is exactly 1.25× the4.00base input, matching the file header's documented 5-minute cache-write convention, so no deviating-source comment was warranted on the row.Local check output (provisional — not the pushed run)
Files touched (this workspace, not yet pushed)
scripts/lib/model-pricing.tsv: +1 pricing row forclaude-opus-5-5*.tests/model_pricing.bats: +2 regression tests (opus-5.5 rate + opus-4-* no-shadow guard).Notes
No engine.sh change; scope confined to pricing data + its test, matching the story's zero-runtime-blast-radius intent.
don-petry commentedon Sep 23, 2026
Dev-Lead: Implementation Complete — PR #1904
The implementation for issue #1896 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.
65f78082787b34a9a352de6539ed0e66176fd0f2main: 2 file(s), +12/-0 linesReview happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.
feat: implement issue #1896 — [Phase 1] Price claude-opus-5-5 in mode…