Skip to content

feat(board): Nerves board — browse every config file and option across the repos #172

Description

@Jammy2211

Human request (2026-09-26, verbatim)

Now do the Nerves board, which should be a simply way for me to view all config file source code entries and options acrosss the repos (e.g their config folders). I'm not sure the dashboard necssarily needs me to put stuff yet, but thats fine well prob grow it as we go

Overview

Nothing in the org lists config keys. The libraries ship YAML under <pkg>/config/ (fit 17 files, array 4,
galaxy 99 / 7.7k lines, lens 5, cti 6) and the four workspaces carry overriding copies (config/, 12–86
files each; autolens_workspace's priors shadow PyAutoGalaxy's, so override detection must run against the
whole stack). Settings files carry # comments (the only option docs); prior files carry none and follow one
schema (Class: param: {type, mean/sigma | lower/upper, width_modifier, limits}). autonerves resolves
workspace → last-imported library → … (conf.Config.push(keep_first=True)), lowercases keys, has no key
inventory, no CLI, no Pages site, and no palette in the board theme. PyAutoNerves has pytest CI (main.yml).

Design decisions

  • Read-only browser, grown later. No actions, no to-do rows. Sections per repo; per file: top-level key
    chips, then <details> with the source (comments preserved, line-numbered, GitHub link at that line).
    Prior files render as a table (Class · param · type · mean/σ or bounds · width) instead of raw YAML.
  • One page per repo + an index. index.html = overview (counts per repo, the override map, the env-var
    panel, a search box) and repos/<repo>.html per library/workspace. The index embeds a compact JSON key
    index {repo, file, key_path, comment, anchor} so the search box (copy of the Memory board's flt())
    finds keys/files/comments across every repo and links to the anchor. Keeps each page well under 1 MB.
  • Override map. For each workspace file, the same relative path is looked up across the libraries in
    autonerves order (lens → galaxy → array → fit; cti for autocti_workspace); the file row shows "overrides
    PyAutoGalaxy/…" and the keys that differ or are workspace-only. build/*.yaml (CI tooling) is listed in
    its own "workspace tooling" group, not as an override.
  • Env-var panel. PYAUTO_* names grepped from autonerves/test_mode.py, workspace.py, __init__.py
    with the comment line above each — the non-YAML options the Nerves also own.
  • Feed: green when every file parses and no workspace key is orphaned; yellow with one item per
    unparseable file and one per workspace file carrying keys absent from its library counterpart (text names
    the keys); grey when nothing collected. Never red.
  • Collection: local run reads the workspace layout via PyAutoMind/repos.yaml path:; the workflow does
    the Brain-board sparse-checkout trick (clone --filter=blob:none --no-checkout + sparse-checkout set --no-cone '<pkg>/config/**' / config/**) for the 6 libraries + 4 workspaces. Config dirs list comes
    from one SOURCES table at the top of the renderer (repo, github, config dir, kind library|workspace,
    stack order).

PR 1 — PyAutoBrain (feature/nerves-board)

  1. board/_theme.py: ORGANS["nerves"] (sample PyAutoNerves/logo.png; compute ≥4.5:1 contrast) +
    MARKS["nerves"]; config/policy.yaml boards: += nerves: PyAutoNerves (organ order: after hands,
    before gut). Tests: tests/test_board_theme.py gains nerves; the footer-order assertions updated.

PR 2 — PyAutoNerves (feature/nerves-board, after PR 1)

  1. scripts/board.py (stdlib + pyyaml; mirrors PyAutoGut/scripts/board.py shape: theme() finder,
    --brain, --root (workspace root holding repos.yaml or the sparse clones), --collect OUT /
    --snapshot F, formats --html-index, --html-repo NAME, --md, --md-brief, --json, --badge,
    --state, and --site DIR that writes everything). collect(): walk each SOURCES dir, read text,
    yaml.safe_load (errors captured per file), extract top-level keys, per-line comments, prior tables,
    overrides vs the stack, env vars; snapshot = {generated, sources[], files[], overrides[], env_vars[], errors[]}. Pure renderers over the snapshot. The renderer is NOT part of the autonerves package
    (check MANIFEST.in/pyproject so scripts/ is not shipped to PyPI).
  2. .github/workflows/nerves_board.yml: cron 55 5 * * * + dispatch; checkout self + PyAutoBrain +
    PyAutoMind (for repos.yaml); sparse-clone the 10 config sources into sources/; --collect then
    --site _site; "Validate the cockpit feed against the Brain contract"; configure-pages (site created
    once by the human token — do it BEFORE the first run this time); upload; deploy. permissions: contents: read, pages: write, id-token: write.
  3. README.md: a "Nerves board" section (what it shows, that it is read-only, how the override map is
    computed); AGENTS.md: the board + the stale test path fix (test_autonerves/tools/test_decorators.py
    does not exist — correct the command). Nerves' main.yml pytest must keep passing: add
    test_autonerves/test_board.py (hermetic: a tmp tree with two fake libraries + one workspace, a prior
    file, a broken YAML; asserts keys, override diff, prior table rows, env-var panel, state validates with
    the copied 6-line check, badge, index JSON search entries; no tenant literals) — check main.yml's
    test path so the new test runs in CI (or add it to the matrix).

PR 3 — pyautolabs.github.io (feature/nerves-board, after the Nerves site is live)

  • cockpit/index.html ORGANS: Nerves gains feed: BASE + "PyAutoNerves/state.json"; README/AGENTS mention
    (and drop the "Nerves keeps its grey card" line added today).

Branch survey / claims

Repo Branch Dirty Claimed by
PyAutoBrain main clean eyes-organ-order, cosmos-web-ring-greeting — disjoint
PyAutoNerves main clean eyes-organ-order (AGENTS.md 1 line) — this task edits AGENTS.md too (new section + test-path fix): merge-safe, note it
pyautolabs.github.io main clean eyes-organ-order (no diff) — disjoint
Own worktree with parallel-claim:.

Execution (Fable session)

/create_issue on PyAutoNerves → active.md → worktree_create nerves-board PyAutoBrain PyAutoNerves pyautolabs.github.io → one Opus subagent (Brain → Nerves → hub; Nerves renderer exercised locally against
the real workspace layout, e.g. --root /home/jammy/Code/PyAutoLabs) → ship (Heart YELLOW → ask ack) →
merge Brain → create the Nerves Pages site with the human token → merge Nerves → dispatch nerves_board.yml
→ verify feed + a search → merge hub → cockpit's Nerves card populates → close-out.

Verification

  • Brain: pytest tests/test_board_theme.py -q. Nerves: pytest test_autonerves -q (existing + new);
    python scripts/board.py --brain ../PyAutoBrain --root /home/jammy/Code/PyAutoLabs --collect snap.json on
    the real tree (expect ≈ 330 files), --site /tmp/x then python ../PyAutoBrain/board/_state.py /tmp/x/state.json
    → state: ok; index.html < 1 MB, each repo page < 1.5 MB; the key index contains positions; workflow YAML
    parses; tenant firewall --root <wt> OK.
  • After merge: nerves_board.yml green with state: ok; https://pyautolabs.github.io/PyAutoNerves/ lists the
    10 sources; search "positions" finds the point-source keys; the cockpit's Nerves card populates.

Original Prompt

Click to expand starting prompt

Organ cockpit: Nerves board — browse every config file and option across the repos

Type: feature
Target: PyAutoNerves
Repos:

  • PyAutoNerves
  • PyAutoBrain
  • pyautolabs.github.io
    Difficulty: medium
    Autonomy: safe
    Priority: high
    Status: formalised
    Consequence: glance
    Witness: the Nerves board workflow on main is green with the validate step logging state: ok; https://pyautolabs.github.io/PyAutoNerves/ lists every config file of the six libraries and four workspaces with expandable source; a search for 'positions' finds the point-source config keys; the cockpit's Nerves card populates.
    Review-minutes: 3
    Unattended: ready
    Filed: 2026-09-26
    Epic: organ-cockpit

The human's request (2026-09-26, verbatim): 'Now do the Nerves board, which should be a simply way for me to view all config file source code entries and options acrosss the repos (e.g their config folders). I'm not sure the dashboard necssarily needs me to put stuff yet, but thats fine well prob grow it as we go'.

This supersedes the 2026-09-26 'Nerves gets no board' decision recorded in the gut-board completion record: the Nerves board is a read-only browser of the configuration layer the Nerves own, not a to-do surface.

  1. A Pages board rendered by a script in PyAutoNerves with the shared theme: for every config folder across the library repos (PyAutoNerves, PyAutoFit, PyAutoArray, PyAutoGalaxy, PyAutoLens, PyAutoCTI) and the workspaces that override them (autofit/autogalaxy/autolens/autocti workspace config folders), one section per repo listing each YAML config file with its top-level keys and, expanded on demand, the file's source with its comments (the comments are the option docs) and a link to the file on GitHub. Workspace files that override a library file of the same relative path are shown beside it with the differing keys highlighted. A client-side search box filters by file name or key. Rendered from sparse checkouts of the config folders at workflow time.
  2. A state.json cockpit feed (contract PyAutoBrain board/state_schema.json): green when every file parses, yellow with one item per unparseable file or per workspace override whose keys do not exist in the library file, grey when nothing could be collected. Never red.
  3. Board family wiring: nerves palette + mark in PyAutoBrain board/_theme.py, nerves: PyAutoNerves in config/policy.yaml boards, the cockpit ORGANS Nerves feed line in pyautolabs.github.io, a Pages publish workflow in PyAutoNerves (the Pages site itself is created once by a human token — the repo token cannot create it).

Out of scope: editing config from the board; a to-do or action surface (may grow later); config diffs across library versions.

Witness: the Nerves board workflow on main is green with the validate step logging state: ok; https://pyautolabs.github.io/PyAutoNerves/ lists every config file of the six libraries and four workspaces with expandable source; a search for 'positions' finds the point-source config keys; the cockpit's Nerves card populates.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SbKQQHRRgm2b69aT9t7771

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions