Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions agents/conductors/cortex/_cortex.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,9 +618,12 @@ def render_dashboard_html(c: dict) -> str:
f"{c['generated']} — regenerate, do not hand-edit -->",
f"<style>{_theme_css(THEME_ORGAN)}{_FRESH_CSS}</style>",
"</head>", "<body>",
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'<div class="fresh"><p class="muted">Last updated '
Expand Down
28 changes: 20 additions & 8 deletions agents/conductors/intake/_intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
'<a href="#recent">Recent</a> 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'<div class="fresh"><p><b>Last updated {c["generated"]}.</b> '
f'This page is {_md_inline(REFRESH_BLURB)}</p>',
Expand All @@ -2668,7 +2676,7 @@ def record_row(r):
H += [f"<li><code>{_attr(d)}</code></li>" for d in c["drift"]]
H += ["</ul>"]
H.append(_status_box_html(c["batch"]))
H += ["<h2>Start here</h2>"]
H += ['<a id="start-here"></a><h2>Start here</h2>']

members = _epic_members(c)
standalone = [r for r in records if not r.get("epic")]
Expand All @@ -2690,7 +2698,11 @@ def h2(title, src):
# registry file is the full record, the page is the view.
a = (f' <a class="mdsrc" href="{_attr(blob + src)}">markdown '
"version</a>") if blob else ""
return f"<h2>{title}{a}</h2>"
anchor = {"In flight": "in-flight", "Parked": "parked",
"Planned": "planned", "Backlog": "backlog",
"Bundles": "bundles", "Epics": "epics"}.get(title)
prefix = f'<a id="{anchor}"></a>' if anchor else ""
return prefix + f"<h2>{title}{a}</h2>"

H += [h2("In flight", "active.md"),
'<p class="muted">Issued — each has an open GitHub issue and '
Expand Down
5 changes: 5 additions & 0 deletions board/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
43 changes: 28 additions & 15 deletions board/_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 [])
Expand All @@ -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.
Expand All @@ -1567,13 +1580,13 @@ def render_html(data):
"/blob/main/README.md")
H.append('<p class="muted mdsrc"><a href="board.md">markdown '
f'version</a> · <a href="{_attr(gh)}">GitHub Page</a></p>')
H.append("<h2>⌨ Morning sync (local)</h2>")
H.append("<a id=\"morning\"></a><h2>⌨ Morning sync (local)</h2>")
H.append(_row(
"Sync every repo to main + clean generated cruft — run in a terminal "
"at the workspace root, not in an AI assistant chat.",
MORNING_CMD, term=True))

H.append("<h2>🌙 Overnight</h2>")
H.append("<a id=\"overnight\"></a><h2>🌙 Overnight</h2>")
for r in data["overnight"]:
# The workflow is the row's subject; its repo and its conclusion are
# facets, so they read as pills — the repo in the organ accent
Expand Down Expand Up @@ -1607,7 +1620,7 @@ def render_html(data):
else:
H.append(_plain(text))

H.append("<h2>❤️ Readiness &amp; release</h2>")
H.append("<a id=\"readiness\"></a><h2>❤️ Readiness &amp; release</h2>")
monitoring = data.get("heart_monitoring")
if isinstance(monitoring, dict) and type(monitoring.get("score")) is int:
H.append(_row(
Expand Down Expand Up @@ -1656,7 +1669,7 @@ def render_html(data):
# carry their own prompts, this end never re-derives one.
perf = data.get("performance")
if perf is not None:
H.append("<h2>⏱ Test performance</h2>")
H.append("<a id=\"performance\"></a><h2>⏱ Test performance</h2>")
if perf.get("flagged"):
for f in perf["flagged"]:
link = (f' <a href="{_attr(f["url"])}">run ↗</a>'
Expand All @@ -1678,7 +1691,7 @@ def render_html(data):
+ pills(("nothing flagged", "g"))))

v = data["versions"]
H.append("<h2>🏷️ Version consistency</h2>")
H.append("<a id=\"versions\"></a><h2>🏷️ Version consistency</h2>")
if v["consensus"] and v["drift"] == 0:
H.append(_plain(
f'The coupled set agrees at <code>{esc(v["consensus"])}</code>'
Expand All @@ -1698,7 +1711,7 @@ def render_html(data):
H.append(f'<p class="muted">Latest release tag {esc(v["reference"])} — '
"the frozen source stamp trailing it is expected.</p>")

H.append("<h2>💬 Community · Ears</h2>")
H.append("<a id=\"community\"></a><h2>💬 Community · Ears</h2>")
if data["boards"].get("ears"):
H.append(_plain(f'<a href="{_attr(data["boards"]["ears"])}">Open Ears board ↗</a>'))
c = data["community"]
Expand Down Expand Up @@ -1752,7 +1765,7 @@ def community_row(e, note, tone):
else:
H.append(_row("Scan unavailable — run the Ears directly.", "Use the community skill."))

H.append("<h2>🔄 Resume</h2>")
H.append("<a id=\"resume\"></a><h2>🔄 Resume</h2>")
counts = data["resume"]["counts"]
mind_url = data["boards"].get("mind", "")
if counts:
Expand Down Expand Up @@ -1809,7 +1822,7 @@ def community_row(e, note, tone):
elif pending is not None:
H.append(_plain('<span class="muted">no pending-release PRs open</span>'))

H.append("<h2>🧹 Upkeep</h2>")
H.append("<a id=\"upkeep\"></a><h2>🧹 Upkeep</h2>")
# Standing invitations rather than state, so the one pill each carries is
# the door it routes to — what the 📋 puts on the clipboard, visible
# without tapping it.
Expand All @@ -1827,7 +1840,7 @@ def community_row(e, note, tone):

hygiene = data.get("hygiene")
if hygiene:
H.append(f'<h2>🧼 Hygiene <span class="muted">(scanned this render — '
H.append(f'<a id="hygiene"></a><h2>🧼 Hygiene <span class="muted">(scanned this render — '
f'{hygiene.get("repos_present")}/{hygiene.get("repos_declared")} '
"repos present)</span></h2>")
flagged = [r for r in hygiene["rows"]
Expand All @@ -1844,7 +1857,7 @@ def community_row(e, note, tone):
if devbox:
stale = (' — <span class="warn">STALE</span>'
if devbox.get("stale") else "")
H.append(f'<h2>🖥️ Dev box <span class="muted">(observed '
H.append(f'<a id="devbox"></a><h2>🖥️ Dev box <span class="muted">(observed '
f'{age_label(devbox["age_h"])} ago via morning.sh{stale})</span></h2>')
if devbox.get("stale"):
H.append(_row("Refresh the dev-box observation — run in a "
Expand Down Expand Up @@ -1872,7 +1885,7 @@ def community_row(e, note, tone):
H.append(_plain("worktree" + pills(*facets)))

if data.get("autonomy"):
H.append('<h2>🤖 Autonomous runs <span class="muted">(the calibration '
H.append('<a id="autonomy"></a><h2>🤖 Autonomous runs <span class="muted">(the calibration '
"log's tail)</span></h2>")
for a in data["autonomy"]:
H.append(_plain(
Expand All @@ -1883,7 +1896,7 @@ def community_row(e, note, tone):

doors = data["doors"]
if doors:
H.append("<h2>🚪 All doors</h2>")
H.append("<a id=\"doors\"></a><h2>🚪 All doors</h2>")
H.append("<details><summary>every agent and workflow door</summary>")
for d in doors:
if d["tier"] == "skill":
Expand All @@ -1905,7 +1918,7 @@ def community_row(e, note, tone):
H.append("</details>")

if data["degraded"]:
H.append("<h2>Degraded</h2>")
H.append("<a id=\"degraded\"></a><h2>Degraded</h2>")
for d in data["degraded"]:
H.append(_plain(f'<span class="warn">{esc(d)}</span>'))

Expand Down
45 changes: 43 additions & 2 deletions board/_theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,17 @@ def mark(key):
.hero .tag{margin:0;font-size:.63rem;font-weight:600;
letter-spacing:.3em;text-transform:uppercase;color:var(--glow);opacity:.9}
.lede{margin:0 0 .9rem}
/* Section links share a shape whether or not the owner has a useful count. */
.board-nav{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%%,10rem),1fr));
gap:.75rem;margin:1.5rem 0;min-width:0}
.board-nav-card{display:flex;flex-direction:column;justify-content:center;gap:.25rem;
min-width:0;min-height:5.5rem;padding:1rem;border:1px solid var(--line);
border-top:3px solid var(--accent);border-radius:12px;background:var(--btn);
color:var(--fg);text-decoration:none}
.board-nav-card:hover{background:var(--tint);text-decoration:none;border-color:var(--accent)}
.board-nav-card:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.board-nav-count{font-size:1.8rem;font-weight:700;line-height:1.15;color:var(--accent)}
.board-nav-label{font-weight:650}.board-nav-context{font-size:.8rem;color:var(--muted)}
/* --- sections ---------------------------------------------------------- */
h2{font-size:1.1rem;margin:2.1rem 0 .3rem;padding:0 0 .35rem;font-weight:650;
position:relative;color:var(--accent);border-bottom:2px solid var(--edge)}
Expand Down Expand Up @@ -709,7 +720,36 @@ def css(key):


# ------------------------------------------------------------- components ---
def hero(key, kind, lede_html=""):
def navigation_cards(items, label="Board sections"):
"""Section links with owner-supplied labels, optional counts and context.

Each item has ``href`` and ``label``; ``count=None`` omits the number,
while a textual count such as "Unknown" preserves missing evidence.
This presentation helper neither collects nor interprets board data.
"""
from urllib.parse import urlsplit

cards = []
for item in items:
href = str(item["href"])
if (not href or href != href.strip() or any(ord(c) < 32 for c in href)
or "\\" in href or href.startswith("//")
or urlsplit(href).scheme.lower() not in ("", "http", "https")):
raise ValueError("Navigation destination must be an anchor or safe web link")
count = item.get("count")
value = (f'<span class="board-nav-count">{_html.escape(str(count))}</span>'
if count is not None else "")
context = item.get("context")
note = (f'<span class="board-nav-context">{_html.escape(str(context))}</span>'
if context else "")
cards.append(f'<a class="board-nav-card" href="{_html.escape(href, quote=True)}">'
f'{value}<span class="board-nav-label">'
f'{_html.escape(str(item["label"]))}</span>{note}</a>')
return (f'<nav class="board-nav" aria-label="{_html.escape(label, quote=True)}">'
+ "".join(cards) + "</nav>") if cards else ""


def hero(key, kind, lede_html="", *, navigation=()):
"""The masthead: the organ's logo re-drawn — mark, wordmark, rule, tagline.

`kind` is what this page *is* under the wordmark ("Dashboard", "Board"),
Expand All @@ -721,7 +761,8 @@ def hero(key, kind, lede_html=""):
f'<h1>{WORD}<b>{o["organ"]}</b>'
f'<span class="kind">{kind}</span></h1>'
f'<div class="rule"></div>'
f'<p class="tag">{o["tagline"]}</p></header>{lede}')
f'<p class="tag">{o["tagline"]}</p></header>'
f'{navigation_cards(navigation)}{lede}')


# Facet vocabulary → pill tone. Anything unlisted falls back to the neutral
Expand Down
76 changes: 76 additions & 0 deletions docs/board-navigation.md
Original file line number Diff line number Diff line change
@@ -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.

![Brain desktop navigation](board-navigation/brain-desktop.png)

![Cortex phone navigation](board-navigation/cortex-phone.png)
Binary file added docs/board-navigation/brain-desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/board-navigation/cortex-phone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ satellites
adoption/guide
adoption/config_surfaces
board-sizing
board-navigation
example
```

Expand Down
Loading
Loading