Skip to content

WING-193 cloud AI finance and usage contract

Status: planned — locked until tenant, authentication, and role enforcement are implemented. No finance dashboard or dispatch-cap enforcement may be presented as live from this specification.

Access

The finance view requires a server-verified, Google-bound finance role assigned only to Pam. Neither YC/team entry-code possession, workspace ownership, email-domain matching, nor a client-side claim grants the role. Andrew receives alerts but does not implicitly receive finance-dashboard access unless separately assigned.

Content-free ledger

One aggregate row per provider, model, feature, audience, and UTC day:

provider, model, feature, audience, day,
inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens,
calculatedUsd, pricingVersion, pseudonymousWorkspaceId

The workspace identifier is a keyed pseudonym scoped to the finance ledger. Raw tenant/workspace IDs never appear. The ledger must contain zero prompts, profile/résumé facts, generated content, provider API keys, OAuth tokens, request/response bodies, filenames, job titles, or employer names.

YC-excluded feature attempts may record only a content-free blocked-attempt count. Excluded music generation, AI image generation, image enhancement/upscaling, and image-to-video contribute zero estimated or actual provider cost because no provider dispatch occurs.

Dashboard

  • actual spend by day/provider/model/feature/audience;
  • prepaid balance only where an official provider API exposes it;
  • forecast with method, observation window, and uncertainty;
  • remaining application budget;
  • top cost features without user content;
  • anomaly flags with the baseline and threshold that fired.

Unknown or unavailable balances display Not available from provider, never zero. Pricing is versioned and calculated USD remains distinguishable from provider-invoiced actuals.

Hard dispatch caps

Server-side caps apply before provider dispatch:

  • per workspace/day;
  • per workspace/month;
  • application-wide/day and month.

The transaction that reserves budget and the provider dispatch decision must be concurrency-safe. Crossing a cap blocks dispatch; a client cannot override it. Refund/correction behavior for failed provider calls must be explicit and idempotent. Auto-reload is off initially.

Private alerts

Send private email and Slack alerts to Pam and Andrew at 20%, 50%, 80%, and 100% of application budget, plus forecast breach. Deduplicate each threshold per budget period; retries must not spam. Messages contain aggregate spend and links, never user content or raw workspace IDs.

GCP budget exports/alerts are an infrastructure billing signal and must be labeled separately from WorkWingman's application hard caps. GCP alerts do not prevent an AI dispatch; app caps do.

Provider administration

Anthropic access uses the Console's Billing role for the minimum necessary billing visibility. Do not grant organization owner or API-key administration merely to view spend. Record the organization, role assignee, review date, and revocation procedure outside source control without copying credentials.

Acceptance gates

  • authorization tests prove non-finance users receive no finance data;
  • cross-tenant tests prove workspace pseudonyms cannot be reversed or correlated outside finance;
  • canary prompts/résumés/generated text/API keys are absent from ledger, logs, alerts, and exports;
  • concurrent requests cannot exceed a hard cap;
  • YC-excluded features never call a provider or enter cost estimates;
  • threshold alerts are private, deduplicated, and audience-correct;
  • GCP billing alerts and application caps are visually and operationally distinct;
  • pricing changes create a new pricing version rather than rewriting historical calculations.