Skip to content

backlog(B-0581): RE-LAND skill wrapping gh auth refresh interactive flow (supersedes stale #3961)#4754

Merged
AceHack merged 1 commit into
mainfrom
otto/cli-reland-b0581-gh-auth-refresh-skill-2026-05-23
May 23, 2026
Merged

backlog(B-0581): RE-LAND skill wrapping gh auth refresh interactive flow (supersedes stale #3961)#4754
AceHack merged 1 commit into
mainfrom
otto/cli-reland-b0581-gh-auth-refresh-skill-2026-05-23

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 23, 2026

Summary

Re-lands B-0581 (skill wrapping gh auth refresh interactive flow + scope-grant registry) from stale PR #3961 (7 days old, DIRTY, 0 unresolved threads but unable to merge).

Per .claude/rules/blocked-green-ci-investigate-threads.md stale-armed-PR resolution decision tree:

  • Substrate exists on main? NO (B-0581 backlog row not on main; PR-3961's tick shard was already on main from a parallel PR)
  • Small enough to re-land in 1-2 ticks? YES (1 substantive file + auto-regenerated BACKLOG.md index)
  • RE-LAND VIA CHERRY-PICK

What's in this PR

The backlog row captures the empirically-motivated observation that Otto's Bash tool can't handle gh auth refresh's Y/n prompt + one-time code surfacing + Enter-to-open-browser blocking step — a skill wrapper would unblock that flow.

Composes with

Test plan

  • Cherry-pick succeeded (BACKLOG.md conflict resolved by regenerating index)
  • B-0581 row content verbatim from original
  • Branch matches ZETA_EXPECTED_BRANCH guard
  • CI green

Next step after merge: close #3961 with cross-link.

🤖 Generated with Claude Code

…ope-grant registry

Aaron 2026-05-16, after Otto tried to fire `gh auth refresh` blindly via
Bash tool: "we need a skill around this." The empirical artifact that
made the gap visible was the one-time code (472D-B3EF in that run) that
gh surfaces mid-flow — Otto's non-interactive subprocess would burn the
code without surfacing it to the human.

Files the design row for a `.claude/skills/gh-auth-refresh-wrapper/SKILL.md`
+ `tools/auth/gh-auth-refresh-wrapper.ts` helper that:
1. Spawns gh + pumps stdin for Y/n
2. Captures the one-time code via stdout regex
3. Surfaces the code prominently (banner + pbcopy + osascript notification)
4. Pumps Enter to open browser (after surfacing the code)
5. Polls gh auth status until new scopes appear
6. Appends to ~/.local/share/zeta/scope-grants.jsonl
   ({machineId, scopes[], grantedBy, grantedAt, command})

6-slice decomposition, S effort overall. Aaron volunteered to be the
human-in-the-loop test subject when this row gets picked up.

Composes with B-0570 (scarcity tracker — scope affects API budget),
B-0571 (GitHub App = production alternative), B-0580 (Enterprise
ruleset management — uses scopes this skill grants), and the canonical
substrate at feedback_aaron_fine_grained_pat_workflow_*_2026_05_16.md.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant