Repository navigation
Description
Overview
The Brain board is the morning door, and on mobile it is mostly blind: eleven of its legs read GitHub through gh api, and a Claude Code remote session has no gh at all. The render is honest about it — could not read, a degraded banner, no green badge from a partial view — but honest-and-blind is still blind.
Phase 1 of PyAutoMind/draft/feature/pyautobrain/board_without_gh_phase1_seam.md (parent: board_without_gh.md, which holds the design and the measurements). The parent's Phase 0 probe was run on 2026-08-27 and selected this option: $GH_TOKEN returns 200 on /user and /rate_limit and 403 on every repo-scoped path ("GitHub access is not enabled for this session"), so enabling raw REST (option 2) needs an org-admin action that has not happened, and installing gh (option 3) rides the same credential.
board/_board.py is a subprocess and cannot call mcp__github__* tools — those are an agent capability. That is why this is a seam and not a substitution.
Plan
board/_board.pyaccepts pre-fetched GitHub JSON via--github-data <file>;gh_json()reads from it when present.- The
ghpath is untouched, so a developer box behaves exactly as it does today. - The
/boardskill — which is the agent — gathers that JSON viamcp__github__*whencommand -v ghfails, writes the file, and invokes the renderer with the flag. - Prove it on one leg family: the seven
overnight: could not read <repo>/<workflow>rows, the largest block of the eleven. - Document the file's shape as a contract in
board/AGENTS.md, because it outlives whoever writes it. - A leg with no injected data still reports
could not read— no leg may substitute an empty answer for an unasked question.
Detailed implementation plan
Affected Repositories
- PyAutoBrain (primary)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoBrain | claude/mobile-workflow-review-tyv13y | clean |
| ./PyAutoMind | claude/mobile-workflow-review-tyv13y | clean |
Suggested branch: feature/board-github-data-seam
Implementation Steps
board/_board.py— add--github-data <path>to the argument parser. Load it once into a mapping keyed by the same identitygh_json()already uses for its calls (repo + endpoint), so the injected data and the live path are interchangeable by construction rather than by convention.board/_board.py—gh_json()consults the injected mapping first, falls back toghwhen it is absent, and returns the existing "could not ask" sentinel when neither is available. Do not add a third outcome: the 2026-08-26 work established that asked and got nothing and could not ask are the only two, and green is emitted only by a render that read everything.skills/board/board.md— the gathering half. Probecommand -v ghonce; when absent, collect the overnight legs' data withmcp__github__actions_list(list_workflow_runs) per watched workflow, write the file, and invoke the renderer with--github-data. Note thatlist_workflow_runshas nohead_shafilter — filter bybranchand matchhead_shain the gatherer, the same trap recorded inskills/prm/prm.md's mcp lane.board/AGENTS.md— extend "Reading the board in a remote session" with the file's schema, the identity key, and the rule that an absent key means could not ask, not nothing.- Tests — drive the seam from a fixture file, never a live call: a full fixture renders the overnight rows live; a partial fixture leaves the uncovered legs reading
could not readand keeps the badge non-green; theghpath is unchanged when no flag is passed.
Key Files
board/_board.py—gh_json(), argument parsingskills/board/board.md— the MCP-gathering half (agent-side)board/AGENTS.md— the documented contracttests/test_board_degraded.py— the invariants this must not break
Trade-offs
The seam costs a documented contract between a skill and a script. It was chosen over the alternatives because the probe closed them: it works today and needs no external permission. If an org admin later connects the Claude GitHub App, gh_json() can become a plain REST helper on every surface and the seam becomes removable — so keep the contract small enough to delete.
Original Prompt
Click to expand starting prompt
# Board phase 1: the injection seam, proven on the overnight legs
Type: feature
Target: pyautobrain
Repos:
- PyAutoBrain
Difficulty: medium
Autonomy: supervised
Priority: normal
Status: formalised
Filed: 2026-08-27
Parent: draft/feature/pyautobrain/board_without_gh.md
Phase 1 of the board's gh-less work. The parent prompt holds the design, the
measurements and the 2026-08-27 probe that selected this option; read it first
and do not re-derive them.
## Scope
Build the seam and prove it on **one** leg family — the seven `overnight:
could not read <repo>/<workflow>` rows, the largest block of the eleven.
- `board/_board.py` accepts pre-fetched GitHub JSON (`--github-data <file>`),
and `gh_json()` reads from it when present. The `gh` path is untouched, so a
dev box behaves exactly as today.
- The `/board` skill — which *is* the agent, and so is the only thing that can
call `mcp__github__*` — gathers that JSON when `command -v gh` fails, writes
it, and invokes the renderer with the flag. `_board.py` stays a pure
renderer; a subprocess cannot reach MCP tools and this is the whole reason
the seam exists.
- The file's shape is a documented contract in `board/AGENTS.md` (extend
"Reading the board in a remote session"), because it outlives whoever writes
it.
## Guards
- Tests drive the seam from a **fixture file**, never a live call.
- A leg with no injected data still reports `could not read` — the invariant
from the 2026-08-26 work: no leg may substitute an empty answer for an
unasked question. A green badge still requires a render that read everything.
## Done when
The overnight rows are live in a remote render, the degraded count drops by
seven, the dev-box path is byte-identical, and `tests/test_board_degraded.py`
plus the new fixture tests pass.
Activity
Jammy2211 commentedon Aug 27, 2026
Shipped
PR #305 merged as
ef887f8(main at71b62f5)._board.pytakes--github-data <file>—{endpoint: response}, keyed by the endpoint string exactly asgh_json()receives it, so injected and live data are interchangeable by construction. The/boardskill gathers viamcp__github__*whenghis absent; the renderer stays pure, because MCP tools are an agent capability a subprocess cannot reach.Proved in a session with no
gh: one injected endpoint renders✓ PyAutoLabs/PyAutoBrain/nightly-release.yml — success (6h)with its run link, while the six uninjected legs still readcould not readand the board stays degraded and non-green.The three rules the seam does not bend — a miss is could not ask, an explicit
nullsays the gatherer's own fetch failed, a malformed file is fatal rather than degrading — are the 2026-08-26 degraded-render invariant restated, and are pinned by 8 fixture-driven tests (569 total,ruffclean).One contract detail found by doing rather than designing: the row's age reads
created_at, notupdated_at. A gatherer that stores the wrong field renders?, which reads as a render bug rather than a bad file. Documented inboard/AGENTS.mdandskills/board/board.md, and asserted in the tests.Phase 2 — the remaining four legs (versions, community, resume, upkeep) — is
PyAutoMind/draft/feature/pyautobrain/board_without_gh_phase2_legs.md, now unblocked.Generated by Claude Code