Skip to content

Δ10-C1: t-shirt estimator at SolveSpec-assembly — sizeClass + offload suggestion (never auto-routes) - #179

Merged
kateebonner merged 3 commits into
mainfrom
amico/issue-34-estimator
Jul 20, 2026
Merged

Δ10-C1: t-shirt estimator at SolveSpec-assembly — sizeClass + offload suggestion (never auto-routes)#179
kateebonner merged 3 commits into
mainfrom
amico/issue-34-estimator

Conversation

@kateebonner

Copy link
Copy Markdown
Contributor

Closes #34 (C1 scope; C2 — the calibrated solver×integrator estimator — stays deferred per the issue).

New amico-run estimate <script.jl> | --spec <solvespec.json> → one JSON line {sizeClass, score, estimatedBytes, localRamBytes, offloadSuggested, reason, inputs} — exit 0, or 64 config-class. Sizing math ported bit-faithfully from aws-infra's tshirt_sizing.py (A-v1: score = N × prod(levels)⁴; > 12000 → MEDIUM), golden table generated by running the reference (provenance in the test header). Offload suggestion = estimatedBytes vs local RAM (AMICO_LOCAL_RAM_BYTES override, else os.totalmem) — suggestion only: no executor key in the output, the spec is never written, and launch.ts has a zero-line diff (D7's no-auto-routing stands). 291/291 package tests (32 new), tsc clean, both bins build.

Consumer contract for #63 documented in the subcommand + exported from the package index.

🤖 Generated with Claude Code

kateebonner and others added 3 commits July 20, 2026 01:28
…34 C1)

Faithful TS port of aws-infra@origin/staging examples/tshirt_sizing.py
(A-v1): extract {N, levels, num_qudits} from the solve script, score
N * prod(levels)^4 (unitary-trajectory knot-point block), sizeClass
SMALL/MEDIUM at the reference's strict >12000 boundary — including the
reference's fallbacks (absent/unresolvable levels contribute nothing).
Offload suggestion signal: estimatedBytes (score x 8, Float64 count) vs
local RAM (os.totalmem, AMICO_LOCAL_RAM_BYTES override for tests/CI),
boolean + human-readable reason. Data only — nothing auto-routes (D7).

Golden table in the test header quotes reference values produced by
running the reference itself on the same inputs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`amico-run estimate <script.jl> | --spec <solvespec.json>` prints one
JSON line {sizeClass, score, estimatedBytes, localRamBytes,
offloadSuggested, reason, inputs}. --spec runs the SAME solvespec schema
validation as the launch gate, then reads the spec's script_path
(relative paths resolve against the spec's directory). Output is data
only: no executor key, no file writes, nothing auto-routes — launch.ts
is untouched. Dispatched via trySubcommand with the existing
existing-file guard (a script literally named `estimate` still
launches). Pure core re-exported from the package index for direct
consumption by the routing UX (#63).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
)

Delegates verbatim like resolve/sandbox — `amico estimate <args>` is
exactly `amico-run estimate <args>` — and the verb surface lists it, so
the #63 routing UX can call either bin for the same JSON signal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kateebonner
kateebonner merged commit 90c87fe into main Jul 20, 2026
kateebonner added a commit that referenced this pull request Jul 20, 2026
)

# Conflicts:
#	packages/schema/schemas/solvespec.schema.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Δ10 — Estimator integration (v0 = tshirt_sizing) + per-solve routing UX

1 participant