diff --git a/agents/conductors/cortex/_cortex.py b/agents/conductors/cortex/_cortex.py index ccc60c6c..dc63497b 100644 --- a/agents/conductors/cortex/_cortex.py +++ b/agents/conductors/cortex/_cortex.py @@ -618,9 +618,12 @@ def render_dashboard_html(c: dict) -> str: f"{c['generated']} — regenerate, do not hand-edit -->", f"", "", "
", - hero(THEME_ORGAN, "Dashboard", _esc(INTRO)), - stats((n["running"], "Running"), (n["open"], "Open"), - (n["active"], "Projects")), + hero(THEME_ORGAN, "Dashboard", _esc(INTRO), navigation=[ + {"label": "Running", "href": "#summary", "count": n["running"]}, + {"label": "Open", "href": "#summary", "count": n["open"]}, + {"label": "Projects", "href": "#projects", "count": n["active"]}, + {"label": "Check in", "href": "#checkin-box"}, + ]), # One line, deliberately: the `--check` normaliser drops it whole so # a date change is not drift. f'Last updated ' diff --git a/agents/conductors/intake/_intake.py b/agents/conductors/intake/_intake.py index ae891cde..96903bdc 100755 --- a/agents/conductors/intake/_intake.py +++ b/agents/conductors/intake/_intake.py @@ -2646,12 +2646,20 @@ def record_row(r): "start-dev skill prompt is on your clipboard — paste it " "into an AI assistant chat to route the assistant straight to that task. " 'Recent is the same work by date — what has ' - "been happening rather than what to do next."), - # The four numbers a human wants before reading a single row. - stats((c["issued_count"], "In flight"), - (len(c.get("human_review") or []), "Human review"), - (len(c["parked"]), "Parked"), - (len(c["planned"]), "Planned"), (c["total"], "Backlog")), + "been happening rather than what to do next.", navigation=[ + {"label": "Start here", "href": "#start-here"}, + {"label": "In flight", "href": "#in-flight", "count": c["issued_count"]}, + {"label": "Human review", "href": "#human-review", "count": len(c.get("human_review") or [])}, + {"label": "Parked", "href": "#parked", "count": len(c["parked"])}, + {"label": "Planned", "href": "#planned", "count": len(c["planned"])}, + {"label": "Backlog", "href": "#backlog", "count": c["total"]}, + ] + [{"label": label, "href": "#" + target} + for label, target, present in ( + ("Pending release", "pending-release", bool(c.get("pending_release"))), + ("Bundles", "bundles", bool(bundle_cards(c))), + ("Recent", "recent", bool(c.get("recent"))), + ("Epics", "epics", bool(c.get("epics") or _epic_members(c))), + ) if present]), ] H += [f'
Last updated {c["generated"]}. ' f'This page is {_md_inline(REFRESH_BLURB)}
', @@ -2668,7 +2676,7 @@ def record_row(r): H += [f"{_attr(d)}Issued — each has an open GitHub issue and ' diff --git a/board/AGENTS.md b/board/AGENTS.md index d36bb500..ae513686 100644 --- a/board/AGENTS.md +++ b/board/AGENTS.md @@ -82,6 +82,11 @@ repos' `pages_dashboard.yml`. ## Look (`_theme.py`) +Use the [shared section navigation](../docs/board-navigation.md) via +`hero(..., navigation=items)`: banner, linked cards, then freshness/context. +Owners supply safe destinations, labels and optional counts; no duplicate card +CSS or changes to data/action semantics. + The [responsive sizing standard](../docs/board-sizing.md) separates the outer board from its reading measure. The shared theme caps the border-box at `77.5rem` (1240px at the default root size), with `1rem` gutters below `46rem` diff --git a/board/_board.py b/board/_board.py index 8a5c9267..f3d1f3da 100755 --- a/board/_board.py +++ b/board/_board.py @@ -1542,7 +1542,21 @@ def render_html(data): "The organism's morning door — what ran overnight, who is " "waiting, and what needs you. Tap 📋 to put a command on your " "clipboard for an AI assistant chat; ⌨ rows are terminal " - "commands."), + "commands.", navigation=[ + {"label": label, "href": "#" + target, "count": count} + for (count, label), target in zip(section_counts(data), + ("overnight", "readiness", "community", "resume", "upkeep")) + ] + [{"label": "Morning sync", "href": "#morning"}, + {"label": "Versions", "href": "#versions"}] + + [{"label": label, "href": "#" + target} + for label, target, present in ( + ("Test performance", "performance", data.get("performance") is not None), + ("Hygiene", "hygiene", bool(data.get("hygiene"))), + ("Dev box", "devbox", bool(data.get("devbox"))), + ("Autonomous runs", "autonomy", bool(data.get("autonomy"))), + ("All doors", "doors", bool(data.get("doors"))), + ("Unavailable sources", "degraded", bool(data.get("degraded"))), + ) if present]), ] verdict_cls = "bad" if blocking else ("warn" if attention else "ok") spark = sparkline(data.get("history") or []) @@ -1558,7 +1572,6 @@ def render_html(data): # that can ask something of them, so the strip doubles as a contents # page. `–` where a source was unreachable: an absent count is never a # zero here, the same contract the rows keep. - H.append(stats(*section_counts(data))) # The sibling boards' header line: the markdown twin (written beside # index.html by --apply, so the relative href resolves on Pages) and the # way back to the repository front door on github.com. @@ -1567,13 +1580,13 @@ def render_html(data): "/blob/main/README.md") H.append('
markdown ' f'version · GitHub Page
') - H.append("{esc(v["consensus"])}'
@@ -1698,7 +1711,7 @@ def render_html(data):
H.append(f'Latest release tag {esc(v["reference"])} — ' "the frozen source stamp trailing it is expected.
") - H.append("{o["tagline"]}
{lede}') + f'{o["tagline"]}
' + f'{navigation_cards(navigation)}{lede}') # Facet vocabulary → pill tone. Anything unlisted falls back to the neutral diff --git a/docs/board-navigation.md b/docs/board-navigation.md new file mode 100644 index 00000000..da8c4e8b --- /dev/null +++ b/docs/board-navigation.md @@ -0,0 +1,76 @@ +# Shared board navigation + +Every board uses the same top order: organ logo/banner, section navigation +cards, freshness/context, then its content. The cards are real links, not +JavaScript-only hidden tabs. Counts are optional; an unknown count is never +silently rendered as zero. Each owner supplies meaningful destinations and +keeps ownership of collection, health, freshness and action semantics. + +## Component contract + +`board/_theme.py::hero(key, kind, lede_html='', navigation=())` retains its +existing positional API. The optional keyword inserts +`navigation_cards(items, label='Board sections')` directly after the masthead +and before the description. Existing consumers without navigation are unchanged. + +Each item is a mapping with `href` and `label`, plus optional `count` and +`context`. Text is escaped. Destinations accept local anchors, relative links +and HTTP(S) URLs, and reject active schemes, protocol-relative paths, backslashes +and control characters. `count=None` omits the value; `0` remains visible; +`'Unknown'` is a valid owner-supplied state. The theme does not calculate counts. + +Cards share the organ's accent, a large target, visible keyboard focus and a +fluid grid. They use the [shared sizing standard](board-sizing.md). Do not +copy card CSS into another repository or use the accent to imply health. Keep +existing section anchors; only render links whose targets exist. Multiple +counts may link to one meaningful summary, as Ears' follow-through cards do. + +## Renderer ownership and rollout + +The authoritative membership is `config/policy.yaml` → `board.boards`. + +| Board | Source owner | Integration | +|---|---|---| +| Brain | Brain `board/_board.py` | Shared component; section-owned counts plus count-free navigation | +| Mind | Brain `agents/conductors/intake/_intake.py` | Shared component; active/review/planned/backlog counts and optional sections | +| Cortex | Brain `agents/conductors/cortex/_cortex.py` | Shared component; running/open/projects counts and check-in link | +| Ears | Ears `ears/board.py`, `ears/presentation.py` | Downstream reference migration; readable freshness below navigation | +| Memory | Memory `scripts/board.py` | Downstream shared-theme consumer | +| Heart | Heart `heart/dashboard.py` | Downstream shared-theme consumer; retain readiness semantics | +| Hands | Hands `autohands/board.py` | Downstream shared-theme consumer | +| Pulse | Pulse `pulse/board.py` | Downstream shared-theme consumer | +| Nerves | Nerves `scripts/board.py` | Downstream shared-theme consumer | +| Gut | Gut `scripts/board.py` | Downstream shared-theme consumer | +| Scientist | Scientist `scripts/organism_board.py` | Downstream shared-theme consumer | +| Eyes | Eyes `eyes/board.py` | Independent-renderer migration | +| Insight | Insight `insight/board.py`, `insight/theme.py` | Independent-renderer migration | + +Consumer PRs depend on the Brain component merge. Source adoption does not +mean a board is live: refresh workflows must regenerate HTML and publication +must complete. The Mind task records that board-by-board rollout. Existing +copy/orchestration panels are a separate task; retain their payloads here. + +Remove Ears' prominent "STALE — refresh required before judging the queue" +wording during its migration. Display a timestamp and a plain explanation below +navigation instead, while keeping the existing stale/unknown behavior and expiry +handler. Do not hide evidence age or change feeds to make the layout look fresh. + +## Validation + +Renderer checks cover safe links, escaped labels, optional/zero/unknown counts, +header ordering and live anchor destinations. Browser validation covers 390, +768, 820, 1024 and 1440px in light/dark, long labels, keyboard navigation and +count-free cards. Whole-page overflow and existing copy/disclosure behavior +remain part of each consumer's validation; a shared CSS change alone is not +proof of adoption. + +The core implementation passed 1186 Brain tests and a strict Sphinx build. +Thirty Chromium cases exercised the three owner renderers at five widths in +light/dark: cards immediately followed the banner, every target existed, every +card fit the viewport with a touch-sized target, keyboard activation navigated +to the section, and no whole-page overflow occurred. Screenshots below use +synthetic test data, not current operational state. + + + + diff --git a/docs/board-navigation/brain-desktop.png b/docs/board-navigation/brain-desktop.png new file mode 100644 index 00000000..3ef1468f Binary files /dev/null and b/docs/board-navigation/brain-desktop.png differ diff --git a/docs/board-navigation/cortex-phone.png b/docs/board-navigation/cortex-phone.png new file mode 100644 index 00000000..5e160637 Binary files /dev/null and b/docs/board-navigation/cortex-phone.png differ diff --git a/docs/index.md b/docs/index.md index c23d8fa2..12763235 100644 --- a/docs/index.md +++ b/docs/index.md @@ -74,6 +74,7 @@ satellites adoption/guide adoption/config_surfaces board-sizing +board-navigation example ``` diff --git a/tests/test_board.py b/tests/test_board.py index a55542cb..05a38a86 100644 --- a/tests/test_board.py +++ b/tests/test_board.py @@ -560,12 +560,16 @@ def test_the_header_strip_counts_every_section_that_can_ask_something(tmp_path): page = _run(["--html"], tmp_path, stub).stdout for label in ("Overnight red", "Blockers", "Awaiting", "In flight", "Open issues"): - assert f"{label}" in page + assert f'{label}' in page + assert '