spec: fold the builder check into agent login by link
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+33
−6
docs/superpowers/specs/2026-11-07-agent-login-link-design.md+33 −6
CI cancelled — superseded by a newer push — run details
Intent
Attributed to this commit: 41.2 g CO₂e (4,832,755 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-agent-login-link, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/specs/2026-11-07-agent-login-link-design.md b/docs/superpowers/specs/2026-11-07-agent-login-link-design.md| index 39b54abfe..30c89b270 100644 |
| --- a/docs/superpowers/specs/2026-11-07-agent-login-link-design.md |
| +++ b/docs/superpowers/specs/2026-11-07-agent-login-link-design.md |
| @@ -100,8 +100,11 @@ Plain `carlos auth login` keeps today's behaviour (print, then wait). |
| `carlos auth login --help` and the docs page for agents say: agents use |
| `--no-wait`, show the person the link, then run `--wait`. |
| -Builder's call: whether a second `--no-wait` replaces the stored pending |
| -login (my call: yes, newest wins), and the exact file name. |
| +The pending file records the console origin, the device code, its expiry |
| +and the label, so `--wait` polls the console that started it whatever |
| +`--console` or default is in force later. A second `--no-wait` replaces it |
| +(newest wins); a plain `carlos auth login`, a successful `--wait`, and an |
| +expired login delete it. My calls; the file name is the builder's. |
| ### 3. The approval page acts on the code in the link |
| @@ -111,7 +114,8 @@ login (my call: yes, newest wins), and the exact file name. |
| request renders the description that today appears only after typing: |
| the code, large; the label with its "supplied by the machine asking" |
| caveat; where it dialled from (IP, plus city and country from the |
| - platform GeoIP feed when it has an answer); how long ago it started; |
| + platform GeoIP feed the console already answers from, as handleAPIGeo |
| + does; IP alone when there is no answer); how long ago it started; |
| when it expires. Then: Approve, and "That wasn't me". |
| - The question on the page is the check R1 depends on, in plain words: |
| "Does your agent show this code?" plus "If you didn't just ask an agent |
| @@ -129,7 +133,12 @@ via `/?next=`, so whichever browser finishes signing in arrives on the |
| approval page with the code. |
| Approve stays a POST with the session's CSRF token and the step-up gate. |
| -Deny stays ungated. |
| +Deny stays ungated. A person who signed in just now is fresh and is not |
| +asked again. An older session gets today's step-up. For an email session |
| +that is a confirmation email whose link only works in the browser that |
| +asked, but whose code can be typed on the waiting page. Making step-up |
| +links work in any browser is out of scope for this slice (my call); the |
| +code box is the path. |
| ### 4. Email codes work in any browser (R2) |
| @@ -141,6 +150,22 @@ Everything else stands: 5 wrong codes burn a challenge |
| hour, a right code ends the address's other sign-in challenges, and the |
| reply still never says whether an address has a challenge. |
| +Edges (my calls, from the builder check): |
| + |
| +- When the form's address differs from the address on this browser's own |
| + live challenge, the form's address wins: the code is checked against |
| + that address's live challenges. |
| +- A code is accepted when it matches ANY live sign-in challenge for the |
| + address, counted as one guess. Asking twice and opening the older email |
| + is the normal phone case (the first email can arrive late). The send |
| + caps (5 per address per hour) bound how many challenges are live, so |
| + the odds per guess rise by at most 5x, against 10 wrong guesses per |
| + address per day. |
| +- Wrong codes count against the address only when that address has a live |
| + sign-in challenge; otherwise they count against the IP alone. The reply |
| + is the same either way, and attacker-chosen addresses never create |
| + per-address limiter entries. |
| + |
| The check page already carries the address. A browser that never asked |
| needs a way to reach a code box for an address: the front page's "Check |
| your email" step is reached by asking for an email, which sends a new |
| @@ -193,5 +218,7 @@ Drafts only; every string goes through copy review when built. |
| ## Left to the builder |
| File names, flag spellings beyond `--no-wait` and `--wait`, how the GeoIP |
| -place is formatted, and test structure. Marked "my call" above: newest |
| -pending login wins; add "I already have a code" to the front page. |
| +place is formatted, and test structure. Marked "my call" above: the |
| +pending-login file's contents and lifecycle; the any-browser code's edges |
| +(form address wins, any live challenge matches, limiter keying); step-up |
| +links stay same-browser; "I already have a code" on the front page. |