Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(artifacts): the original brand mark or plain text — never a lettered tile; the Artifacts section gets its own mark
rubenluetke10-beepff61f27a7d2c
diff --git a/jarvis/artifacts/brand_marks.py b/jarvis/artifacts/brand_marks.pynew file mode 100644index 0000000000..0199fd0f0d--- /dev/null+++ b/jarvis/artifacts/brand_marks.py@@ -0,0 +1,310 @@+"""Original brand marks for the pages a worker writes.++A generated page that names OpenAI, Anthropic, Google or Slack reaches for a+logo — and without help a model draws the one thing the maintainer will not+accept: a coloured tile with a letter in it ("G", "OA", "A"), an emoji, or an+invented glyph (the archive of 2026-08-23 had all three). The app already+bundles the ORIGINAL marks for the provider and plugin screens, with a+provenance ledger per folder (``LOGOS.md``). This module hands the marks a+request mentions to the worker, inline, so the page carries the real mark or+— when there is none — plain text, never a stand-in.++The worker cannot read the repo (an artifact task runs in a lean workspace,+and an installed app has no source checkout at all), so the SVG rides along in+the brief. Only the marks the request names are included, in order of first+mention, under a size cap — a request that names nothing adds one short rule+and nothing else.++Render paths follow the ledgers: a ``colour`` mark is pasted untouched (the+colours ARE the brand); a ``mono`` mark — a glyph whose own brand is+black-on-white or white-on-black, or a vendor's light variant bundled for the+dark app — is normalised to ``currentColor`` so it follows the page's ink on+both themes.+"""++from __future__ import annotations++import logging+import re+from dataclasses import dataclass+from pathlib import Path+from typing import Final, Literal++from jarvis.core.paths import repo_root++log = logging.getLogger(__name__)++Render = Literal["colour", "mono"]++# Where the app keeps its marks. Both folders carry a LOGOS.md ledger that+# records source and legal basis per file; the CI gate+# (scripts/ci/check_brand_logos.py) holds them to it.+_ASSETS_SUBDIR: Final = Path("jarvis") / "ui" / "web" / "frontend" / "src" / "assets"++# How many marks one brief carries, and how much text they may add. A request+# that names a dozen companies is a comparison table, not a logo wall.+MAX_MARKS: Final = 8+MAX_TOTAL_SVG_CHARS: Final = 24_000+++@dataclass(frozen=True)+class BrandFamily:+ """One bundled mark and the names in a request that call for it."""++ family: str+ label: str+ folder: str+ file: str+ render: Render+ aliases: tuple[str, ...]+++# Order matters twice: a longer alias must win over a shorter one it contains+# ("Google Cloud" before any bare "Google"), and the table's order is the+# tie-break when two families first appear at the same position.+BRAND_FAMILIES: Final[tuple[BrandFamily, ...]] = (+ BrandFamily(+ "google-cloud",+ "Google Cloud / Vertex AI",+ "providers",+ "google-cloud.svg",+ "colour",+ ("Google Cloud", "Vertex AI", "Vertex"),+ ),+ BrandFamily(+ "gemini",+ "Gemini",+ "providers",+ "gemini.svg",+ "colour",+ ("Gemini", "Google DeepMind", "DeepMind"),+ ),+ BrandFamily(+ "openai",+ "OpenAI",+ "providers",+ "openai.svg",+ "mono",+ ("OpenAI", "ChatGPT", "GPT-5", "GPT-4", "GPT", "Codex", "Whisper", "o3", "o4"),+ ),+ BrandFamily(+ "claude", "Claude / Anthropic", "providers", "claude.svg", "colour", ("Anthropic", "Claude")+ ),+ BrandFamily("xai", "xAI / Grok", "providers", "xai.svg", "mono", ("xAI", "Grok")),+ BrandFamily("nvidia", "NVIDIA", "providers", "nvidia.svg", "colour", ("NVIDIA", "Nvidia")),+ BrandFamily("ollama", "Ollama", "providers", "ollama.svg", "mono", ("Ollama",)),+ BrandFamily("groq", "Groq", "providers", "groq.svg", "mono", ("Groq",)),+ BrandFamily("openrouter", "OpenRouter", "providers", "openrouter.svg", "mono", ("OpenRouter",)),+ BrandFamily(+ "elevenlabs",+ "ElevenLabs",+ "providers",+ "elevenlabs.svg",+ "mono",+ ("ElevenLabs", "Eleven Labs"),+ ),+ BrandFamily("cartesia", "Cartesia", "providers", "cartesia.svg", "colour", ("Cartesia",)),+ BrandFamily("github", "GitHub", "brands", "github.svg", "mono", ("GitHub",)),+ BrandFamily("vercel", "Vercel", "brands", "vercel.svg", "mono", ("Vercel",)),+ BrandFamily("notion", "Notion", "brands", "notion.svg", "mono", ("Notion",)),+ BrandFamily("slack", "Slack", "brands", "slack.svg", "colour", ("Slack",)),+ BrandFamily("discord", "Discord", "brands", "discord.svg", "colour", ("Discord",)),+ BrandFamily("telegram", "Telegram", "brands", "telegram.svg", "colour", ("Telegram",)),+ BrandFamily("spotify", "Spotify", "brands", "spotify.svg", "colour", ("Spotify",)),+ BrandFamily(+ "youtube_music",+ "YouTube Music",+ "brands",+ "youtube_music.svg",+ "colour",+ ("YouTube Music",),+ ),+ BrandFamily("gmail", "Gmail", "brands", "gmail.svg", "colour", ("Gmail",)),+ BrandFamily(+ "google_calendar",+ "Google Calendar",+ "brands",+ "google_calendar.svg",+ "colour",+ ("Google Calendar",),+ ),+ BrandFamily(+ "google_drive", "Google Drive", "brands", "google_drive.svg", "colour", ("Google Drive",)+ ),+ BrandFamily("dropbox", "Dropbox", "brands", "dropbox.svg", "colour", ("Dropbox",)),+ BrandFamily("linear", "Linear", "brands", "linear.svg", "colour", ("Linear",)),+ BrandFamily("asana", "Asana", "brands", "asana.svg", "colour", ("Asana",)),+ BrandFamily("airtable", "Airtable", "brands", "airtable.svg", "colour", ("Airtable",)),+ BrandFamily("todoist", "Todoist", "brands", "todoist.svg", "colour", ("Todoist",)),+ BrandFamily("clickup", "ClickUp", "brands", "clickup.svg", "colour", ("ClickUp",)),+ BrandFamily("supabase", "Supabase", "brands", "supabase.svg", "colour", ("Supabase",)),+ BrandFamily("canva", "Canva", "brands", "canva.svg", "colour", ("Canva",)),+ BrandFamily(+ "home_assistant",+ "Home Assistant",+ "brands",+ "home_assistant.svg",+ "colour",+ ("Home Assistant",),+ ),+ BrandFamily("cal_com", "Cal.com", "brands", "cal_com.svg", "mono", ("Cal.com",)),+)+++@dataclass(frozen=True)+class BrandMark:+ """One mark, ready to paste into a page."""++ family: str+ label: str+ render: Render+ svg: str+++_ROOT_ATTR_RE: Final = re.compile(+ r"""\s(?:width|height|style|class|id)\s*=\s*(?:"[^"]*"|'[^']*')""", re.IGNORECASE+)+_TITLE_RE: Final = re.compile(r"<title>.*?</title>", re.IGNORECASE | re.DOTALL)+_XML_DECL_RE: Final = re.compile(r"<\?xml[^>]*\?>\s*", re.IGNORECASE)+_COMMENT_RE: Final = re.compile(r"<!--.*?-->", re.DOTALL)+_INK_FILL_RE: Final = re.compile(+ r"""fill\s*=\s*["'](?:#f{3,8}|#0{3,8}|white|black)["']""", re.IGNORECASE+)+_INK_STYLE_FILL_RE: Final = re.compile(+ r"""fill\s*:\s*(?:#f{3,8}|#0{3,8}|white|black)\b""", re.IGNORECASE+)+_SVG_OPEN_RE: Final = re.compile(r"<svg\b[^>]*>", re.IGNORECASE)+++def _normalise_svg(raw: str, render: Render) -> str:+ """One clean inline ``<svg>``: no XML prolog, comments or root sizing; a+ mono mark on ``currentColor`` so it follows the page's ink."""+ text = _XML_DECL_RE.sub("", raw)+ text = _COMMENT_RE.sub("", text)+ text = _TITLE_RE.sub("", text)+ match = _SVG_OPEN_RE.search(text)+ if match is None:+ return ""+ open_tag = _ROOT_ATTR_RE.sub("", match.group(0))+ if render == "mono":+ # Ink fills anywhere in the mark become the page's ink; a root with no+ # fill gets currentColor so paths that inherit follow it too.+ text = _INK_FILL_RE.sub('fill="currentColor"', text)+ text = _INK_STYLE_FILL_RE.sub("fill:currentColor", text)+ open_tag = _INK_FILL_RE.sub('fill="currentColor"', open_tag)+ if "fill=" not in open_tag:+ open_tag = open_tag[:-1] + ' fill="currentColor">'+ text = text[: match.start()] + open_tag + text[match.end() :]+ return " ".join(text.split())+++def assets_root() -> Path:+ """The folder the two mark ledgers live in (may not exist on an install)."""+ return repo_root() / _ASSETS_SUBDIR+++def _alias_pattern(alias: str) -> re.Pattern[str]:+ # Word-bounded, case-insensitive; "GPT" must not match "GPTQ" or "egpt",+ # and "o3" must not match inside "foo3". Dots and hyphens in the alias are+ # literal.+ return re.compile(r"(?<![A-Za-z0-9])" + re.escape(alias) + r"(?![A-Za-z0-9])", re.IGNORECASE)+++def mentioned_families(text: str) -> list[BrandFamily]:+ """The families a request names, in order of first mention."""+ hits: list[tuple[int, int, BrandFamily]] = []+ for order, fam in enumerate(BRAND_FAMILIES):+ first = None+ for alias in fam.aliases:+ m = _alias_pattern(alias).search(text)+ if m and (first is None or m.start() < first):+ first = m.start()+ if first is not None:+ hits.append((first, order, fam))+ hits.sort()+ return [fam for _, _, fam in hits]+++def find_brand_marks(+ text: str,+ *,+ root: Path | None = None,+ limit: int = MAX_MARKS,+ max_total_chars: int = MAX_TOTAL_SVG_CHARS,+) -> list[BrandMark]:+ """The original marks for the brands ``text`` names, ready to inline.++ Reads the bundled SVGs under ``root`` (default: the app's asset folder).+ A missing folder or file simply yields fewer marks — the brief's rule then+ tells the worker to write the name as text — never an error.+ """+ base = root if root is not None else assets_root()+ marks: list[BrandMark] = []+ budget = max_total_chars+ for fam in mentioned_families(text):+ if len(marks) >= limit:+ break+ path = base / fam.folder / fam.file+ try:+ raw = path.read_text(encoding="utf-8")+ except OSError: # no bundled file (wheel without assets) = no mark; the rule covers it+ log.debug(+ "brand mark %s unavailable at %s; the brief says text, no stand-in",+ fam.family,+ path,+ )+ continue+ svg = _normalise_svg(raw, fam.render)+ if not svg or len(svg) > budget:+ continue+ budget -= len(svg)+ marks.append(BrandMark(family=fam.family, label=fam.label, render=fam.render, svg=svg))+ return marks+++BRAND_MARKS_RULE: Final = """\+## Brand marks — the original or none+When the page names a company or product and a mark belongs beside the name, use the \+ORIGINAL mark, inline: the `<svg>` blocks supplied below, pasted as they are (size them \+with CSS — 16–20px beside text, 24–32px on a tile; never stretch, never recolour a \+colour mark; a mono mark inherits `color`, so it follows the ink on both themes). If a \+brand has no supplied mark, write its name in text — set in the same type as its \+neighbours, optionally with a neutral dot or initial-free tile. NEVER stand a logo in: \+no lettered tile ("G", "OA", "A" in a coloured square), no emoji, no invented glyph, no \+generic "AI" spark. A mark identifies a vendor — it never implies endorsement and never \+appears where the text does not name the vendor."""+++def brand_marks_section(marks: list[BrandMark]) -> str:+ """The brief section: the rule, then the marks the request called for."""+ if not marks:+ return BRAND_MARKS_RULE + "\nThis request names no brand with a bundled mark."+ lines = [+ BRAND_MARKS_RULE,+ "",+ "Supplied marks (paste verbatim, each once in a `<symbol>`/`<defs>` block or "+ "inline where used):",+ ]+ for mark in marks:+ how = "colour mark — do not recolour"+ if mark.render == "mono":+ how = "mono — inherits `color`"+ lines.append(f"- {mark.label} (`{mark.family}`, {how}):")+ lines.append("```html")+ lines.append(mark.svg)+ lines.append("```")+ return "\n".join(lines)+++__all__ = [+ "BRAND_FAMILIES",+ "BRAND_MARKS_RULE",+ "MAX_MARKS",+ "MAX_TOTAL_SVG_CHARS",+ "BrandFamily",+ "BrandMark",+ "assets_root",+ "brand_marks_section",+ "find_brand_marks",+ "mentioned_families",+]diff --git a/jarvis/artifacts/brief.py b/jarvis/artifacts/brief.pyindex 5ff95bc691..e126d0a500 100644--- a/jarvis/artifacts/brief.py+++ b/jarvis/artifacts/brief.py@@ -27,9 +27,11 @@ what lets a golden test pin the contract.from __future__ import annotationsimport re+from collections.abc import Sequencefrom dataclasses import dataclassfrom typing import Final+from jarvis.artifacts.brand_marks import BrandMark, brand_marks_sectionfrom jarvis.artifacts.design_guide import (AVOID,CHARTS,@@ -117,6 +119,7 @@ def build_artifact_brief(language: str,previous_html: str | None = None,previous_filename: str | None = None,+ brand_marks: Sequence[BrandMark] = (),) -> ArtifactBrief:"""Compose the worker instruction for one artifact.@@ -131,6 +134,10 @@ def build_artifact_brief(rewrites the whole file with the change applied).previous_filename: the previous page's filename, kept on a revision sothe new version lands under the same name.+ brand_marks: the original marks for the brands the request names+ (:func:`jarvis.artifacts.brand_marks.find_brand_marks`), inlined+ so the page never draws a lettered tile in a logo's place. The+ caller resolves them; this function stays free of the filesystem."""clean_title = " ".join((title or "").split()) or "Artifact"clean_request = (request or "").strip()@@ -188,6 +195,7 @@ def build_artifact_brief(]),CHARTS,+ brand_marks_section(list(brand_marks)),AVOID,DONE_MEANS,]diff --git a/jarvis/artifacts/design_guide.py b/jarvis/artifacts/design_guide.pyindex 5ed6cf5159..d220fcbdd3 100644--- a/jarvis/artifacts/design_guide.py+++ b/jarvis/artifacts/design_guide.py@@ -192,6 +192,10 @@ AVOID: Final = """\page; gradient text; glows, blurred colour blobs, radial backdrops; a gradient anywhere.- Pills and chips as decoration (an "eyebrow pill" above the headline, emoji chips as \filters); emoji as section markers or icons; 01/02/03 markers on non-sequences.+- A stand-in for a logo: a lettered tile ("G", "OA", "A" in a coloured square), an emoji, \+an invented glyph or a generic "AI" spark beside a vendor's name — the original mark \+(supplied in the brief when the request names the brand) or the name in plain text, \+nothing in between.- The Tailwind rainbow (#3b82f6, #a855f7, #8b5cf6, #06b6d4, #10b981, #f59e0b, #f43f5e, \slate greys) and any palette not in the token block; near-black with one acid-green \or neon accent; purple-to-blue gradients.diff --git a/jarvis/plugins/tool/create_artifact.py b/jarvis/plugins/tool/create_artifact.pyindex 4b67db057f..a94daf517f 100644--- a/jarvis/plugins/tool/create_artifact.py+++ b/jarvis/plugins/tool/create_artifact.py@@ -30,6 +30,7 @@ import loggingfrom collections.abc import Callablefrom typing import Any, Final+from jarvis.artifacts.brand_marks import find_brand_marksfrom jarvis.artifacts.brief import build_artifact_brieffrom jarvis.artifacts.locate import locate_artifactfrom jarvis.core.bus import EventBus@@ -223,12 +224,16 @@ class CreateArtifactTool:error=action_phrase("spawn_no_runner", language),)+ # The original marks for the brands the request names ride along in the+ # brief (the worker's workspace holds no repo); a request that names+ # none adds one rule: text, never a lettered tile in a logo's place.brief = build_artifact_brief(request,title=previous.title if previous else title,language=language,previous_html=previous.html if previous else None,previous_filename=previous.file.name if previous else None,+ brand_marks=find_brand_marks(f"{title} {request}"),)kontrollierer = self._resolve_kontrollierer()utterance = _utterance(ctx) or requestdiff --git a/jarvis/ui/web/frontend/src/components/layout/navGroups.ts b/jarvis/ui/web/frontend/src/components/layout/navGroups.tsindex 6d1d5b85fe..11206b61e8 100644--- a/jarvis/ui/web/frontend/src/components/layout/navGroups.ts+++ b/jarvis/ui/web/frontend/src/components/layout/navGroups.ts@@ -14,7 +14,6 @@ import {Boxes,Contact,FolderOpen,- Frame,Gauge,KeyRound,ListTodo,@@ -25,6 +24,7 @@ import {Notebook,ScrollText,Settings,+ Shapes,Share2,Sparkles,Store,@@ -35,6 +35,7 @@ import {type LucideIcon,} from "lucide-react";import type { SectionId } from "@/store/events";+import type { HomeSurface } from "@/lib/homeSurface";// Resolve a nav row's label, preferring the active-locale translation and// falling back to the English `fallbackLabel` when the key is not yet present@@ -44,6 +45,22 @@ export function resolveNavLabel(t: (key: string) => string, item: NavItem): strireturn resolved === item.labelKey && item.fallbackLabel ? item.fallbackLabel : resolved;}+/**+ * The front page is ONE section ("chats") with two faces — the voice stage+ * and the typed chat — picked by the `Voice | Chat` switch at the top of the+ * sidebar. Its nav row says which face it currently is: Mic + "Voice" or+ * bubble + "Chat", the same two words the switch uses. A fixed "Chats" label+ * under a switch that says "Voice" read as a contradiction (maintainer,+ * 2026-08-23). Every other row passes through unchanged. Pure, so the+ * sidebar and the rail present the row identically.+ */+export function presentNavItem(item: NavItem, surface: HomeSurface): NavItem {+ if (item.id !== "chats") return item;+ return surface === "voice"+ ? { ...item, labelKey: "sidebar.surface_voice", icon: Mic, fallbackLabel: "Voice" }+ : { ...item, labelKey: "sidebar.surface_chat", icon: MessageSquare, fallbackLabel: "Chat" };+}+export interface NavItem {id: SectionId;labelKey: string;@@ -109,7 +126,7 @@ export const NAV_GROUPS: NavItem[][] = [{id: "visualization",labelKey: "nav.visualization",- icon: Frame,+ icon: Shapes,fallbackLabel: "Visualization",},{ id: "board", labelKey: "nav.board", icon: Sparkles },diff --git a/jarvis/ui/web/frontend/src/views/VisualizationView.tsx b/jarvis/ui/web/frontend/src/views/VisualizationView.tsxindex a90045a452..eb62720ab3 100644--- a/jarvis/ui/web/frontend/src/views/VisualizationView.tsx+++ b/jarvis/ui/web/frontend/src/views/VisualizationView.tsx@@ -7,10 +7,10 @@ import {FileImage,FileText,FolderOpen,- Frame,Globe,Loader2,RefreshCw,+ Shapes,ShieldCheck,Workflow,} from "lucide-react";@@ -219,7 +219,7 @@ export function VisualizationView() {return (<div className="flex h-full min-h-0 flex-col"><ViewHeader- icon={<Frame className="h-4 w-4 text-primary" aria-hidden />}+ icon={<Shapes className="h-4 w-4 text-primary" aria-hidden />}title={t("visualization.title")}subtitle={t("visualization.subtitle")}right={@@ -669,7 +669,7 @@ function EmptyStage({ loading, error }: { loading: boolean; error: boolean }) {{loading && !error ? (<Loader2 className="h-5 w-5 animate-spin text-muted-foreground" aria-hidden />) : (- <Frame className="h-6 w-6 text-muted-foreground" aria-hidden />+ <Shapes className="h-6 w-6 text-muted-foreground" aria-hidden />)}<p className="text-sm font-medium">{t(error ? "visualization.error_title" : "visualization.empty_title")}diff --git a/pyproject.toml b/pyproject.tomlindex 5a538b34da..7ca8e9c730 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -829,6 +829,11 @@ jarvis = ["ui/web/dist/**/*","ui/web/dist/*","assets/**/*",+ # The original brand marks (+ their LOGOS.md provenance ledgers) the+ # artifact brief inlines for a worker (jarvis/artifacts/brand_marks.py).+ # Read via repo_root() at dispatch time, so a wheel install needs them too.+ "ui/web/frontend/src/assets/providers/*",+ "ui/web/frontend/src/assets/brands/*",# Node bot scripts shipped alongside their Python bridge tools (e.g. the# google_calendar bot). Not Python, so packages.find won't pick them up."plugins/tool/*.mjs",diff --git a/tests/unit/artifacts/test_brand_marks.py b/tests/unit/artifacts/test_brand_marks.pynew file mode 100644index 0000000000..2afd25d157--- /dev/null+++ b/tests/unit/artifacts/test_brand_marks.py@@ -0,0 +1,101 @@+"""Brand marks in the artifact brief — the original or plain text, never a tile.++What is pinned: a request that names a brand gets that brand's ORIGINAL mark+inlined (in order of first mention, capped), a mono mark follows the page's+ink, a request that names nothing adds only the rule, a missing asset folder+degrades to the rule — and the brief carries the section.+"""++from __future__ import annotations++from pathlib import Path++from jarvis.artifacts.brand_marks import (+ BRAND_FAMILIES,+ BRAND_MARKS_RULE,+ BrandMark,+ assets_root,+ brand_marks_section,+ find_brand_marks,+ mentioned_families,+)+from jarvis.artifacts.brief import build_artifact_brief+++def test_every_family_points_at_a_bundled_file_with_a_ledger() -> None:+ root = assets_root()+ for fam in BRAND_FAMILIES:+ assert (root / fam.folder / fam.file).is_file(), fam.family+ assert (root / fam.folder / "LOGOS.md").is_file(), fam.folder+++def test_mentions_come_back_in_order_of_first_appearance() -> None:+ text = "Put Slack first, then the OpenAI API, then Claude and the ChatGPT app."+ assert [f.family for f in mentioned_families(text)] == ["slack", "openai", "claude"]+++def test_aliases_are_word_bounded() -> None:+ assert mentioned_families("GPTQ quantisation and foo3 bars") == []+ assert [f.family for f in mentioned_families("the gpt-5 launch")] == ["openai"]+ assert [f.family for f in mentioned_families("Vertex AI hosts Gemini")] == [+ "google-cloud",+ "gemini",+ ]+++def test_marks_are_clean_inline_svg_and_mono_follows_the_ink() -> None:+ marks = find_brand_marks("Compare OpenAI and Gemini; link the GitHub repo.")+ by_family = {m.family: m for m in marks}+ assert set(by_family) == {"openai", "gemini", "github"}+ for mark in marks:+ assert mark.svg.startswith("<svg")+ assert "<?xml" not in mark.svg and "<title>" not in mark.svg+ assert ' width="' not in mark.svg.split(">", 1)[0]+ # Mono marks: the ink fill is currentColor so the page's --ink drives it.+ assert by_family["openai"].render == "mono" and 'fill="currentColor"' in by_family["openai"].svg+ assert "#fff" not in by_family["github"].svg.lower()+ assert 'fill="currentColor"' in by_family["github"].svg+ # A colour mark is untouched — its colours are the brand.+ assert by_family["gemini"].render == "colour"+++def test_limit_and_budget_bound_the_section() -> None:+ text = " ".join(f.aliases[0] for f in BRAND_FAMILIES)+ assert len(find_brand_marks(text, limit=3)) == 3+ assert find_brand_marks(text, max_total_chars=10) == []+++def test_missing_assets_degrade_to_the_rule(tmp_path: Path) -> None:+ assert find_brand_marks("OpenAI and Slack", root=tmp_path) == []+ section = brand_marks_section([])+ assert section.startswith(BRAND_MARKS_RULE)+ assert "names no brand" in section+++def test_section_lists_each_mark_once_with_its_render_note() -> None:+ marks = [+ BrandMark(family="openai", label="OpenAI", render="mono", svg="<svg>o</svg>"),+ BrandMark(family="gemini", label="Gemini", render="colour", svg="<svg>g</svg>"),+ ]+ section = brand_marks_section(marks)+ assert section.count("<svg>o</svg>") == 1+ assert "mono — inherits `color`" in section+ assert "colour mark — do not recolour" in section+++def test_brief_carries_the_rule_and_the_supplied_marks() -> None:+ marks = find_brand_marks("A comparison of Claude and GPT-5 pricing.")+ brief = build_artifact_brief(+ "A comparison of Claude and GPT-5 pricing.",+ title="Model pricing",+ language="en",+ brand_marks=marks,+ )+ assert "## Brand marks — the original or none" in brief.prompt+ assert "no lettered tile" in brief.prompt+ for mark in marks:+ assert mark.svg in brief.prompt+ # Without marks the brief still states the rule — text, never a stand-in.+ bare = build_artifact_brief("A weather page.", title="Weather", language="en")+ assert "## Brand marks — the original or none" in bare.prompt+ assert "names no brand" in bare.prompt