| 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
/experiment submits 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, or I approve.
- A user-modified budget below
estimate_cents is 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 either
timeout_seconds or wallclock_minutes. Use region: "us" and tier: "spot" unless the user or workflow requires a different visible capacity slice.
- Run
scripts/quote_term_sheet.py to build the canonical JSON term-sheet object.
Prefer live quote endpoints when credentials exist; use --market-json for tests
and dry runs; use --allow-heuristic-dry-run only 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 explicit Approve / Modify / Cancel
prompt.
- 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 new user_budget_cents and 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.py through
--term-sheet-json, passing matching --region and --tier. The submit helper
refuses artifacts or CLI requests that omit or change the approved region/tier.
Do not shell raw curl 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_id
job_shape
availability
status_code
status_reason
quote_source
generated_at
compute
stages
estimate_cents
recommended_budget_cents
user_budget_cents
wallclock_minutes
confidence_bucket
confidence_statement
decision
Use references/template.md as the user-facing block shape.