Bets
A bet is a name, an appetite (a share of the week), what done looks like in a few journeys, and scopes — existing issues — that each finish on their own. One crew member leads. Open /<owner>/<repo>/bets; the MCP has bets (read) and bet (act); the terminal has Bets in the palette (p propose, b back, s stop, c cut, e end, l what is left, d feels done, n not yet). All three go through actions/bets.ts, and every write emits a bet.* event, which the web pages follow with their "new activity" pill.
- Who sees what. The plan (shares, journeys, left lines, a verdict's reason) is for a person who administers the repo; any other reader sees names, states and scopes. Agents never act on a bet.
bet.*events are admin-only to match.
- Propose. "Ask the planner to propose bets" groups open issues in no live bet: by first label; else by the pillar an unlabelled issue holds up (later and structural issues are skipped); else by the title word most unlabelled issues share. A group of two or more becomes a proposal at 20% of the week. At most five proposals a pass; no model, so the same state gives the same proposals.
- Notes. Only notes written by the repo's owner or an admin count (a visitor's never join or appear). Such a note joins a proposal when its issue is held there, it names one of the group's issues as
#N, or it shares two words with the group's name and its issues' titles; it is quoted in the journeys as "The owner's note". - Back. The owner (a person who administers the repo, never an agent) backs one with a share. At most 5 run, and their shares stay within 100%.
- The wallet. Backing is refused, with one sentence, "Estimate $X, balance $Y", when the bet's estimate is above what is free of the owner's model grant; an estimate equal to it starts. A form shows the sentence as a flash on the bet; a JSON client gets 422. The estimate is the bet's budget (below) at the dollars a builder second has cost this repository's runs over 30 days, and the wallet is the grant's remainder less what the bets already running have yet to spend. With no grant or no history nothing is refused. The planner's own starts skip a bet the wallet cannot cover. The sentence ends with the way out: lower the share, or ask a site admin to raise the grant (Settings, Accounts). The web page, MCP
betand terminal show the same sentence. - Before you press. A proposed bet's card (and its row in the terminal) prints
Estimate $X of $Y left, the estimate beside the wallet the refusal would judge by. When the estimate passes the wallet the line addsshort by $Z, the Back it button is disabled, and the reason sits beside it. With no grant or no history there is no line. The line is on proposed cards only: a stopped bet re-backed from its page shows no estimate first, though the refusal still judges it. - Picks. Once a repository has ever had a bet backed, builders pick only scopes of a running bet, issues the owner asked for or raised, and small fixes, polish included (polish held to its share of the week, see polish-share.md). An issue in no bet does not start by itself. A repository with no bet picks as before.
- Appetite. The budget is share × builder slots × one week of builder time, counted from the runs on the bet's scopes since it was backed. At the budget the bet stops: no extension. Its left line defaults to the open scopes; the lead rewrites it in one line; the owner re-backs, cuts or ends it (ending as done is for a stopped bet only; a running bet finishes when every scope closes).
- Scopes read figuring out (no run yet), executing, or raised hand (nothing moved for two days), or done.
- Finishing. When every scope is closed the bet is finished and its page says "This is done. Try it." with a link; the owner taps Feels done or Not yet, because… (the bet returns to stopped with that reason).
/changelogmarks each landing with its bet and filters by it (?bet=). - Idle forge. If nothing was ever backed and the oldest proposal is a day old, the top two start at 10%, marked "not backed by the owner". One tap on Stop it ends any of them, and the planner does not restart a stopped bet.
- Daily cap. A bet can carry a cap in dollars a day (the bet page, MCP
betverbcap,$in the terminal; empty clears it; a positive amount of at most cents, else refused). Once the runs on its scopes have spent the cap since 00:00 UTC (usagerows), the crew holds the bet's queued runs, never a running one, with the log notequeued, not started: the bet "…" is at its daily cap of $X (UTC day); it resumes at 00:00 UTC; vitals counts them as held by a bet's daily cap, not as failures. The next UTC day they start as usual. Setting emitsbet.capped.
Left out: a per-week reset of the appetite window.
A note of the owner's (or an admin's) whose issue no group holds seeds a bet of its own, named from the note and quoting it, even alone. A visitor's note never does.