name: budget-term-sheet
description: Build a pre-deploy Rockie GPU budget term sheet before any Rocky-originated experiment submit. Trigger words "/budget-term-sheet", "quote the GPU budget", "show me the term sheet", or any workflow that is about to call /experiment for GPU / torch / triton / training / weight-download work.
/budget-term-sheet
Render the user-facing cost term sheet that Rocky must show before a Rocky-originated
POST $ROCKIELAB_API_URL/api/jobs/submit call. This skill is pre-submit UX and
approval gating only. It does not replace platform-context's credit reservation,
day caps, or hard budget enforcement.
When to invoke
- Before
/experimentsubmits a GPU / torch / triton / training / weight-download job. - When the user asks for a dry-run quote without launching compute.
- When a user changes the approved budget and Rocky needs to re-render the quote.
Hard rules
- Rocky-originated GPU submits go through this skill before
runtime/submit.py. - Only explicit approval tokens count:
approve,approved, orI approve. - A user-modified budget below
estimate_centsis non-submittable in this repo. - Non-available market states never submit.
- Keep the user-facing provider deidentified:
Rockie GPU, plus SKU/count/region/tier. - Do not dispatch real compute here. Quote and approval only.
Procedure
- Assemble a job spec with
job_shape,gpu_type,gpu_count,region,tier, and eithertimeout_secondsorwallclock_minutes. Useregion: "us"andtier: "spot"unless the user or workflow requires a different visible capacity slice. - Run
scripts/quote_term_sheet.pyto build the canonical JSON term-sheet object. Prefer live quote endpoints when credentials exist; use--market-jsonfor tests and dry runs; use--allow-heuristic-dry-runonly when the user explicitly wants a heuristic quote. - Render the markdown block with
scripts/render_term_sheet.py. The block must show: total estimate, stage breakdown, recommended budget, wall-clock, Rockie GPU compute summary, availability/confidence, and the explicitApprove / Modify / Cancelprompt. - Wait for a user reply. Parse it with
scripts/parse_approval.py. - Decision handling:
approve: keep the current budget and mark the term sheet approved.modify: re-render with the newuser_budget_centsand ask again.modify_then_approve: re-render with the new budget; only submit if the modified budget is still>= estimate_cents.cancel: abandon the submit.clarify: ask again; do not submit.
- Hand the final approved JSON artifact to
/experiment/runtime/submit.pythrough--term-sheet-json, passing matching--regionand--tier. The submit helper refuses artifacts or CLI requests that omit or change the approved region/tier. Do not shell rawcurl POST /api/jobs/submit.
Commands
Quote JSON:
python3 ${SKILL_DIR}/scripts/quote_term_sheet.py \
--job-spec-json /tmp/job-spec.json \
> /tmp/term-sheet.json
Render markdown:
python3 ${SKILL_DIR}/scripts/render_term_sheet.py \
--term-sheet-json /tmp/term-sheet.json
Parse the user's reply:
python3 ${SKILL_DIR}/scripts/parse_approval.py \
--estimate-cents 20000 \
--reply "cap it at $250 and I approve"
Canonical object
The term-sheet JSON must carry these fields:
quote_idjob_shapeavailabilitystatus_codestatus_reasonquote_sourcegenerated_atcomputestagesestimate_centsrecommended_budget_centsuser_budget_centswallclock_minutesconfidence_bucketconfidence_statementdecision
Use references/template.md as the user-facing block shape.