From 79e3a55c19ccb11918b40655c861d0563e9cd2fc Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 8 Oct 2026 20:52:15 +0100 Subject: [PATCH] feat: describe organ functions in dashboard banners --- board/_theme.py | 21 ++++++++++++++++++--- config/policy.yaml | 2 +- docs/board-navigation.md | 26 ++++++++++++++++++++++++++ tests/test_board_theme.py | 11 ++++++----- 4 files changed, 51 insertions(+), 9 deletions(-) diff --git a/board/_theme.py b/board/_theme.py index 675b600..a13939b 100644 --- a/board/_theme.py +++ b/board/_theme.py @@ -68,11 +68,13 @@ # vignette: a tinted lift behind the wordmark falling to near-black. ORGANS = { "broca": { + "function": "Assistants", "organ": "Broca", "tagline": "Evaluate. Maintain. Improve.", "ink_light": "#8b3e68", "ink_dark": "#f4a5ce", "glow": "#f4a5ce", "hero": ("#351329", "#09030a"), }, "brain": { + "function": "Orchestration", "organ": "Brain", "tagline": "Reason. Plan. Decide.", "ink_light": "#2159c9", "ink_dark": "#6f9dff", "glow": "#4d8bff", @@ -80,18 +82,21 @@ "hero": ("#16234f", "#000312"), }, "mind": { + "function": "Planning", "organ": "Mind", "tagline": "Intent. Priority. Flow.", "ink_light": "#0a7d72", "ink_dark": "#2ee6cf", "glow": "#00d1ba", "hero": ("#07302b", "#000000"), }, "cortex": { + "function": "Science", "organ": "Cortex", "tagline": "Question. Run. Rule.", "ink_light": "#a5177d", "ink_dark": "#ff7ad9", "glow": "#ff4fc3", "hero": ("#340a2a", "#000000"), }, "memory": { + "function": "Knowledge", "organ": "Memory", "tagline": "Remember. Learn. Evolve.", "ink_light": "#6b34d6", "ink_dark": "#b37eff", "glow": "#b37eff", @@ -104,24 +109,28 @@ # #fff and #f5c518 at 11.6:1 on #0d1117. The tagline is the one the # organ's own dashboard already wears. "eyes": { + "function": "Visualization", "organ": "Eyes", "tagline": "See. Compare. Improve.", "ink_light": "#7d6300", "ink_dark": "#f5c518", "glow": "#ffc933", "hero": ("#2e2503", "#000000"), }, "ears": { + "function": "Community", "organ": "Ears", "tagline": "Listen. Understand. Follow through.", "ink_light": "#96520b", "ink_dark": "#ffc078", "glow": "#ffc078", "hero": ("#36200d", "#080503"), }, "heart": { + "function": "Tests", "organ": "Heart", "tagline": "Check. Validate. Protect.", "ink_light": "#b50f1a", "ink_dark": "#ff6b73", "glow": "#ff1c28", "hero": ("#37080d", "#000000"), }, "hands": { + "function": "Releases", "organ": "Hands", "tagline": "Build. Execute. Deliver.", "ink_light": "#9a5400", "ink_dark": "#ffa733", "glow": "#ff9201", @@ -133,6 +142,7 @@ # #34d399 at 9.8:1 on #0d1117. The tagline is the one the organ's own # dashboard wears. "pulse": { + "function": "Profiling", "organ": "Pulse", "tagline": "Measure. Trace. Compare.", "ink_light": "#0b7a4b", "ink_dark": "#34d399", "glow": "#2ee88f", @@ -145,18 +155,21 @@ # #6420e0 (7.4:1 on #fff) and #a27aff (6.1:1 on #0d1117). Bluer than the # Memory violet, as the two logos are. "insight": { + "function": "Inference", "organ": "Insight", "tagline": "Infer. Inspect. Understand.", "ink_light": "#995500", "ink_dark": "#ffc163", "glow": "#ffb347", "hero": ("#392600", "#000000"), }, "dna": { + "function": "Environments", "organ": "DNA", "tagline": "Specify. Compare. Evolve.", "ink_light": "#087b88", "ink_dark": "#67e8f9", "glow": "#22d3ee", "hero": ("#08343c", "#00060a"), }, "nerves": { + "function": "Configuration", "organ": "Nerves", "tagline": "Signal. Connect. Understand.", "ink_light": "#6420e0", "ink_dark": "#a27aff", "glow": "#7523fe", @@ -168,6 +181,7 @@ # is the same hue taken down to #3f7a00 (5.3:1 on #fff); the dark-scheme # ink #8fe01a reads at 11.6:1 on #0d1117. "gut": { + "function": "Cleanup", "organ": "Gut", "tagline": "Delete. Clean. Keep healthy.", "ink_light": "#3f7a00", "ink_dark": "#8fe01a", "glow": "#8ad414", @@ -177,6 +191,7 @@ # the tagline are designed to sit in the family rather than read off a # file. Replace both from the logo if that repo ever grows one. "organism": { + "function": "Overview", "organ": "Scientist", "tagline": "Describe. Build. Release.", "ink_light": "#0b6fa4", "ink_dark": "#5ec7f5", "glow": "#38bdf8", @@ -991,14 +1006,14 @@ def hero(key, kind, lede_html="", *, navigation=(), navigation_columns=None): """The masthead: the organ's logo re-drawn — mark, wordmark, rule, tagline. `lede_html` is accepted for compatibility but not displayed. - `kind` is what this page *is* under the wordmark ("Dashboard", "Board"), - so the mark stays the organ's and the page keeps its own name. + `kind` remains accepted for compatibility with existing renderers. + The grey label describes the organ's function, from the shared metadata. """ o = organ(key) # Legacy prose arguments remain accepted for downstream compatibility. return (f'
{mark(key)}' f'

{WORD}{o["organ"]}' - f'{kind}

' + f'{o["function"]}' f'
' f'

{o["tagline"]}

' f'{navigation_cards(navigation, columns=navigation_columns)}') diff --git a/config/policy.yaml b/config/policy.yaml index a8e8578..2d7f637 100644 --- a/config/policy.yaml +++ b/config/policy.yaml @@ -165,7 +165,6 @@ board: brain: PyAutoBrain mind: PyAutoMind cortex: PyAutoCortex - broca: PyAutoBroca memory: PyAutoMemory eyes: PyAutoEyes ears: PyAutoEars @@ -175,5 +174,6 @@ board: insight: PyAutoInsight dna: PyAutoDNA nerves: PyAutoNerves + broca: PyAutoBroca gut: PyAutoGut organism: PyAutoScientist diff --git a/docs/board-navigation.md b/docs/board-navigation.md index cd55837..05eb786 100644 --- a/docs/board-navigation.md +++ b/docs/board-navigation.md @@ -8,6 +8,32 @@ keeps ownership of collection, health, freshness and action semantics. ## Component contract +The grey label beneath each software name describes the organ's function. It +comes from `board/_theme.py::ORGANS`, regardless of legacy renderer `kind` +arguments. Logos, wordmarks, taglines and banner styling are unchanged. + +| Organ | Function | +|---|---| +| Brain | Orchestration | +| Mind | Planning | +| Cortex | Science | +| Memory | Knowledge | +| Eyes | Visualization | +| Ears | Community | +| Heart | Tests | +| Hands | Releases | +| Pulse | Profiling | +| Insight | Inference | +| DNA | Environments | +| Nerves | Configuration | +| Broca | Assistants | +| Gut | Cleanup | +| Scientist | Overview | + +The shared navigation follows `config/policy.yaml` → `board.boards`, with Broca +immediately after Nerves. Consumers adopt these labels and this order when their +boards are regenerated with the updated Brain checkout. + `board/_theme.py::hero(key, kind, lede_html='', navigation=(), navigation_columns=None)` retains its existing positional API. The optional keyword inserts `navigation_cards(items, label='Board sections', columns=None)` directly after the masthead diff --git a/tests/test_board_theme.py b/tests/test_board_theme.py index 4fe1110..5e80cdd 100644 --- a/tests/test_board_theme.py +++ b/tests/test_board_theme.py @@ -211,7 +211,8 @@ def test_the_hero_reproduces_the_logo_wordmark(): page = _theme.hero("mind", "Dashboard", "lede text") assert f'{_theme.WORD}{_theme.ORGANS["mind"]["organ"]}' in page assert _theme.ORGANS["mind"]["tagline"] in page - assert "Dashboard" in page and "lede text" not in page + assert 'Planning' in page + assert "Dashboard" not in page and "lede text" not in page def test_pills_tone_the_exception_and_leave_the_default_neutral(): @@ -284,8 +285,8 @@ def test_board_links_reads_the_declared_family_in_file_order(): # ad-hoc order). This helper is the one read, so the order it returns is # the order `config/policy.yaml` declares — the ruled organ order. links = _theme.board_links("https://example.invalid") - assert list(links) == ["brain", "mind", "cortex", "broca", "memory", "eyes", "ears", - "heart", "hands", "pulse", "insight", "dna", "nerves", "gut", "organism"] + assert list(links) == ["brain", "mind", "cortex", "memory", "eyes", "ears", + "heart", "hands", "pulse", "insight", "dna", "nerves", "broca", "gut", "organism"] assert list(links) == POLICY_BOARDS assert links["cortex"] == "https://example.invalid/PyAutoCortex/" @@ -307,8 +308,8 @@ def test_board_links_renders_the_family_footer_end_to_end(): footer = _theme.boards_footer( _theme.board_links("https://example.invalid", "heart"), "heart") order = re.findall(r'data-organ="(\w+)"', footer) - assert order == ["brain", "mind", "cortex", "broca", "memory", "eyes", "ears", "hands", - "pulse", "insight", "dna", "nerves", "gut", "organism"] + assert order == ["brain", "mind", "cortex", "memory", "eyes", "ears", "hands", + "pulse", "insight", "dna", "nerves", "broca", "gut", "organism"] def test_board_links_returns_nothing_when_the_config_is_unreadable():