Skip to content

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.

feat(artifacts): an editorial page kit and page anatomy on the Jarvis brand

rubenluetke10-beep24cbf0b9aecb
diff --git a/jarvis/artifacts/brief.py b/jarvis/artifacts/brief.py
index 8bf682f506..3007a4206f 100644
--- a/jarvis/artifacts/brief.py
+++ b/jarvis/artifacts/brief.py
@@ -37,9 +37,11 @@ from jarvis.artifacts.design_guide import (
CHARTS,
DESIGN_SYSTEM,
DONE_MEANS,
+ PAGE_ANATOMY,
READ_THE_REQUEST,
THEME_BOOTSTRAP_JS,
THEME_CSS,
+ WRITING,
)
# How much of a previous version rides along on a revision. The worker rewrites
@@ -220,6 +222,8 @@ def build_artifact_brief(
FACTS_RULE,
*([source_data.strip()] if source_data and source_data.strip() else []),
READ_THE_REQUEST,
+ PAGE_ANATOMY,
+ WRITING,
DESIGN_SYSTEM,
"\n".join(
[
diff --git a/jarvis/artifacts/design_guide.py b/jarvis/artifacts/design_guide.py
index d220fcbdd3..8a567950d5 100644
--- a/jarvis/artifacts/design_guide.py
+++ b/jarvis/artifacts/design_guide.py
@@ -51,9 +51,11 @@ THEME_CSS: Final = """\
--line:#3B3A38;--line-2:#4A4946;
--accent:#FFD60A;--accent-ink:#0A0A0A;--accent-soft:rgba(255,214,10,.14);
--good:#4ADE80;--warn:#F2B23D;--bad:#EF5350;
+ --good-soft:rgba(74,222,128,.12);--warn-soft:rgba(242,178,61,.14);--bad-soft:rgba(239,83,80,.14);
+ --sunken:#1F1F1D;
--s1:#C98500;--s2:#4F8EF7;--s3:#E0633F;--s4:#1F9E7F;--s5:#9085E9;--s6:#C84E8A;
--seq-1:#5A4A12;--seq-2:#8A6E0C;--seq-3:#B9930A;--seq-4:#E0B30A;--seq-5:#FFD60A;
- --radius:12px;--radius-sm:8px;
+ --radius:8px;--radius-sm:4px;
--font:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
--mono:"JetBrains Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace}
@media (prefers-color-scheme:light){
@@ -63,6 +65,8 @@ THEME_CSS: Final = """\
--line:#E8E6DC;--line-2:#D9D6C9;
--accent:#A86B00;--accent-ink:#FFFFFF;--accent-soft:rgba(168,107,0,.12);
--good:#1F8A4C;--warn:#B26A00;--bad:#C0392B;
+ --good-soft:rgba(31,138,76,.10);--warn-soft:rgba(178,106,0,.10);--bad-soft:rgba(192,57,43,.10);
+ --sunken:#F0EEE6;
--s1:#A86B00;--s2:#2A6FD0;--s3:#D4532E;--s4:#158F6B;--s5:#5B46C2;--s6:#C23F86;
--seq-1:#F3E3A6;--seq-2:#E3C25A;--seq-3:#C99500;--seq-4:#A86B00;--seq-5:#7A4D00}}
:root[data-theme="light"]{color-scheme:light;
@@ -71,6 +75,8 @@ THEME_CSS: Final = """\
--line:#E8E6DC;--line-2:#D9D6C9;
--accent:#A86B00;--accent-ink:#FFFFFF;--accent-soft:rgba(168,107,0,.12);
--good:#1F8A4C;--warn:#B26A00;--bad:#C0392B;
+ --good-soft:rgba(31,138,76,.10);--warn-soft:rgba(178,106,0,.10);--bad-soft:rgba(192,57,43,.10);
+ --sunken:#F0EEE6;
--s1:#A86B00;--s2:#2A6FD0;--s3:#D4532E;--s4:#158F6B;--s5:#5B46C2;--s6:#C23F86;
--seq-1:#F3E3A6;--seq-2:#E3C25A;--seq-3:#C99500;--seq-4:#A86B00;--seq-5:#7A4D00}
*,*::before,*::after{box-sizing:border-box}
@@ -78,17 +84,86 @@ html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 var(--font);
-webkit-font-smoothing:antialiased;font-feature-settings:"cv02","cv03","cv04","cv11"}
h1,h2,h3{margin:0;line-height:1.2;letter-spacing:-.01em;text-wrap:balance}
-h1{font-size:clamp(26px,3.2vw,34px);font-weight:650}
-h2{font-size:20px;font-weight:600}
+h1{font-size:clamp(30px,4.6vw,50px);font-weight:700;line-height:1.05;letter-spacing:-.025em}
+h2{font-size:21px;font-weight:650;letter-spacing:-.015em}
h3{font-size:16px;font-weight:600}
p{margin:0;max-width:68ch}
-a{color:var(--accent)}
+a{color:var(--accent);text-decoration:underline dotted;text-underline-offset:3px}
code,pre,.mono{font-family:var(--mono);font-size:.92em}
-.eyebrow{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2);font-weight:600}
+.eyebrow{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.14em;
+ text-transform:uppercase;color:var(--accent)}
.card{background:var(--bg-2);border:1px solid var(--line);border-radius:var(--radius);
padding:16px 18px}
.muted{color:var(--ink-2)}
.num{font-variant-numeric:tabular-nums}
+/* --- The kit: the editorial report look, on brand. Use these classes; do not
+ rebuild parallel ones. --- */
+.wrap{max-width:1080px;margin:0 auto;padding:56px 32px 80px}
+.prose{max-width:68ch}.prose>*+*{margin-top:14px}
+.masthead{padding-bottom:28px;margin-bottom:8px;border-bottom:1px solid var(--line-2)}
+.masthead h1{margin-top:14px}
+.standfirst{margin-top:18px;font-size:18px;line-height:1.55;color:var(--ink-2);max-width:62ch}
+.standfirst strong{color:var(--ink);font-weight:600}
+.byline{margin-top:18px;font-family:var(--mono);font-size:11.5px;letter-spacing:.04em;color:var(--ink-3)}
+.section{margin-top:56px}
+.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;
+ padding-bottom:10px;margin-bottom:20px;border-bottom:1px solid var(--line)}
+.section-head .mark{font-family:var(--mono);font-size:11px;letter-spacing:.12em;
+ text-transform:uppercase;color:var(--ink-3);white-space:nowrap}
+.split{display:grid;grid-template-columns:5fr 3fr;gap:40px;align-items:start}
+.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:1px;
+ background:var(--line);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
+.metric{background:var(--bg-2);padding:18px 20px}
+.metric .value{font-family:var(--mono);font-size:30px;font-weight:600;line-height:1.1;
+ letter-spacing:-.02em;font-variant-numeric:tabular-nums}
+.metric .label{margin-top:6px;font-size:13px;color:var(--ink-2)}
+.metric.is-key .value{color:var(--accent)}
+.finding{display:grid;grid-template-columns:44px 1fr;gap:4px 16px;padding:18px 0 18px 16px;
+ border-left:3px solid var(--line-2);border-bottom:1px solid var(--line)}
+.finding .n{font-family:var(--mono);font-size:12px;color:var(--ink-3);padding-top:3px}
+.finding h3{margin-bottom:6px}
+.finding .src{margin-top:8px;font-family:var(--mono);font-size:11.5px;color:var(--ink-3)}
+.finding.good{border-left-color:var(--good)}.finding.warn{border-left-color:var(--warn)}
+.finding.bad{border-left-color:var(--bad)}.finding.key{border-left-color:var(--accent)}
+.chip{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:10.5px;
+ font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:2px 7px;
+ border:1px solid currentColor;border-radius:var(--radius-sm);color:var(--ink-2)}
+.chip.good{color:var(--good);background:var(--good-soft)}
+.chip.warn{color:var(--warn);background:var(--warn-soft)}
+.chip.bad{color:var(--bad);background:var(--bad-soft)}
+.evidence{margin-top:10px;font-family:var(--mono);font-size:12.5px;line-height:1.55;
+ background:var(--sunken);border-left:2px solid var(--line-2);padding:10px 14px;
+ white-space:pre;overflow-x:auto;color:var(--ink-2)}
+.verdict{display:grid;grid-template-columns:120px 1fr;gap:20px;align-items:baseline;
+ padding:16px 0;border-bottom:1px solid var(--line)}
+.verdict .tag{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.1em;
+ text-transform:uppercase;color:var(--ink-3)}
+.verdict.yes .tag{color:var(--accent)}
+.callout{background:var(--bg-2);border:1px solid var(--line);border-left:3px solid var(--accent);
+ border-radius:0 var(--radius) var(--radius) 0;padding:16px 20px}
+.callout .eyebrow{display:block;margin-bottom:6px}
+.table-wrap{overflow-x:auto}
+.table{width:100%;border-collapse:collapse;font-size:14px}
+.table th{font-family:var(--mono);font-size:11px;font-weight:600;letter-spacing:.08em;
+ text-transform:uppercase;color:var(--ink-3);text-align:left;padding:8px 12px;
+ border-bottom:1px solid var(--line-2)}
+.table td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}
+.table .n{text-align:right;font-family:var(--mono);font-variant-numeric:tabular-nums}
+.bar{display:grid;gap:6px;margin:14px 0}
+.bar-head{display:flex;justify-content:space-between;gap:12px;font-size:14px}
+.bar-head .v{font-family:var(--mono);font-variant-numeric:tabular-nums;color:var(--ink-2)}
+.bar-track{height:8px;background:var(--bg-3)}
+.bar-fill{height:100%;width:var(--w);background:var(--ink-3);border-radius:0 4px 4px 0}
+.bar-fill.is-key{background:var(--accent)}
+.colophon{margin-top:72px;padding-top:16px;border-top:1px solid var(--line);display:flex;
+ flex-wrap:wrap;justify-content:space-between;gap:12px;font-family:var(--mono);font-size:11px;
+ letter-spacing:.05em;color:var(--ink-3)}
+.colophon .brand{display:inline-flex;align-items:center;gap:8px;color:var(--ink-2)}
+.gigi{width:18px;height:18px;flex:none}
+.gigi .body{fill:#0E0E0E;stroke:var(--accent);stroke-width:10;stroke-linejoin:round}
+.gigi .eye{fill:var(--accent)}
+@media (max-width:760px){.wrap{padding:36px 18px 56px}.split{grid-template-columns:1fr;gap:24px}
+.verdict{grid-template-columns:1fr;gap:6px}.finding{grid-template-columns:1fr}}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion:reduce){
*,*::before,*::after{animation:none!important;transition:none!important}}"""
@@ -101,6 +176,41 @@ var t=new URLSearchParams(location.search).get("theme");
if(t==="light"||t==="dark"){document.documentElement.setAttribute("data-theme",t);}
}catch(e){}})();"""
+# The brand mark — the gigi ghost (jarvis/ui/web/frontend/src/components/
+# MascotGigi.tsx, reduced to its silhouette and eyes) — for the colophon. It is
+# the ONLY mark the page carries; the rejected gold star never appears.
+GIGI_MARK_SVG: Final = (
+ '<svg class="gigi" viewBox="0 0 256 256" aria-hidden="true">'
+ '<path class="body" d="M58 90Q58 36 128 36Q198 36 198 90L198 208L180 186L160 208'
+ 'L140 186L120 208L100 186L80 208L58 186Z"/>'
+ '<ellipse class="eye" cx="102" cy="108" rx="13" ry="17"/>'
+ '<ellipse class="eye" cx="154" cy="108" rx="13" ry="17"/></svg>'
+)
+
+# The skeleton every page starts from. Its shape is what the strongest pages
+# in the maintainer's own archive share (2026-09-29 review of twenty of them):
+# eyebrow, a headline that is a claim, a standfirst that answers the question,
+# then sections with a hairline head, then the colophon.
+PAGE_SKELETON: Final = (
+ '<main class="wrap">\n'
+ ' <header class="masthead">\n'
+ ' <p class="eyebrow">Diagnosis · Laptop performance</p>\n'
+ " <h1>The laptop crawls because one process holds a whole core</h1>\n"
+ ' <p class="standfirst"><strong>Short answer: yes, it is the app.</strong> '
+ "One render loop keeps 93 % of a core busy while the window is idle.</p>\n"
+ " </header>\n"
+ ' <section class="section">\n'
+ ' <div class="section-head"><h2>Where the time goes</h2>'
+ '<span class="mark">§ 1 · measured</span></div>\n'
+ " …\n"
+ " </section>\n"
+ ' <footer class="colophon">\n'
+ ' <span class="brand">' + GIGI_MARK_SVG + "Personal Jarvis</span>\n"
+ " <span>Source: process sampling, 10-minute window</span>\n"
+ " </footer>\n"
+ "</main>"
+)
+
# --- The guide, section by section ---------------------------------------------
@@ -128,11 +238,66 @@ Default when unsure: a calm, well-composed document. A utilitarian request (memo
plan, comparison, explanation) gets the same craft as a landing page, delivered \
quietly — no hero, no tagline, no marketing voice."""
+PAGE_ANATOMY: Final = """\
+## Page anatomy — how a strong page is put together
+Every page opens the same way, whatever its kind: an `.eyebrow` (the kind of page \
+and its subject, e.g. "Diagnosis · Laptop performance"), an `<h1>` that states a \
+CLAIM, and a `.standfirst` whose first sentence answers the user's question. Then \
+the sections, each under a `.section-head`, and last the `.colophon`. Pick the \
+archetype that fits the request and follow its order:
+- Diagnosis / report / audit → the verdict in the standfirst; a `.metrics` strip or \
+ONE hero number; numbered `.finding`s ranked by impact, each with the measured \
+number, a status `.chip` (fixed / open / needs restart …) and an `.src` line naming \
+where it comes from; an `.evidence` block where raw output proves the point; one \
+recommendation in a `.callout`; "still open" last.
+- Comparison / decision → `.verdict` rows ("Not so" / "It is so") that settle the \
+misconception first; the options side by side with the same attributes in the same \
+order (`.table`); ONE option marked Recommended in a `.callout` with the single \
+reason it beats the runner-up; the rejected options stay listed, one line each.
+- Explainer / pipeline → the whole picture first (one diagram of the stages), then \
+the stages as a numbered sequence with input → output for each; what already exists \
+vs. what is new.
+- Brief / status → the one thing that needs the reader today at the top; then \
+grouped lists (needs attention / on track / done) with times and owners in mono.
+- Plan / checklist → the goal in one sentence, then steps as a real sequence with \
+done/open state, then risks.
+- Dashboard / data → the `.metrics` strip, then the chart(s), then a `.table` for the \
+long tail.
+- Tool / prototype / game → the working thing first, the reasoning (rules, what was \
+rejected) calmly below it.
+Use the kit (the classes in the token block: `.wrap .masthead .standfirst .byline \
+.section .section-head .split .metrics .finding .chip .evidence .verdict .callout \
+.table .bar .colophon`) instead of inventing parallel components; extend it only for \
+what the kit does not cover, on the same tokens. The skeleton:
+```html
+""" + PAGE_SKELETON + """
+```
+The example text shows the register — replace every word with the request's own \
+content. The colophon carries the gigi mark and "Personal Jarvis" on the left and, on \
+the right, what the page is based on (the source, the time window, the assumption) — \
+the only branding the page has; never a logo anywhere else."""
+
+WRITING: Final = """\
+## Writing — the copy is half the page
+- Headlines are claims, not topics: "The wiki writes well and finds badly", not \
+"Wiki analysis". Section headings are claims too wherever the section has a finding.
+- The standfirst answers first ("Short answer: yes — …"), then gives the one reason. \
+The reader who stops after it knows the result.
+- Every finding carries its number with the unit (6 of 53, 93 %, 2.4 s) and its \
+source; a claim without evidence is marked as an assumption.
+- One recommendation, with the reason it beats the runner-up; trade-offs named in one \
+plain clause ("but: the most expensive of the three").
+- Short sentences, common words, no filler; labels as short as a person would say \
+them — a stat label is two to four words, never a sentence.
+- Length follows content: a page is as long as its findings, never padded; cut any \
+section that restates another."""
+
DESIGN_SYSTEM: Final = """\
## Design system — the page is shown inside the Jarvis desktop app and must look like it
Paste the token block below VERBATIM as the first <style> in <head>, and the \
-bootstrap script as the first <script> in <head>. Derive every colour, font and radius \
-from these tokens; never introduce a hex that is not in the block (semantic status \
+bootstrap script as the first <script> in <head>. The block is the tokens AND the \
+component kit (see Page anatomy); your own CSS comes after it. Derive every colour, \
+font and radius from these tokens; never introduce a hex that is not in the block (semantic status \
colours included). Dark is the default; light is fully defined; both are complete — \
scan your stylesheet before finishing: no colour may be defined ONLY inside a media \
or [data-theme] block.
@@ -140,12 +305,18 @@ or [data-theme] block.
series, the active state — and is quiet everywhere else. Never a gradient, never a \
glow, never a coloured headline.
- Surfaces: page `--bg`, cards `--bg-2`, recessed/hover `--bg-3`; 1px `--line` \
-borders; radius `--radius` (12px) for cards, `--radius-sm` (8px) for controls — not \
-every box is a rounded card, and a plain section with a hairline rule is often the \
-better choice.
-- Type: `--font` for everything, `--mono` only for code, ids, and columns of digits \
-(`.num`). One type scale (h1 / h2 / h3 / body / 13px caption / 11px eyebrow) — stay on \
-it. Headings carry weight by size and weight, not by colour.
+borders; radius `--radius` (8px) for the few cards there are, `--radius-sm` (4px) \
+for chips and controls. Hairlines over cards: rows separated by 1px lines, a stat \
+strip as a `gap:1px` grid on `--line` (`.metrics`), status as a 3px stripe at the \
+start of a row (`.finding.bad`) — not a coloured box.
+- Type: `--font` for reading text and headings; `--mono` for the typographic anchors — \
+eyebrows, section marks, ids, file paths, stat values, table headers and columns of \
+digits (tabular numbers). One type scale (h1 / h2 / h3 / body / 18px standfirst / 13px \
+caption / 11px eyebrow) — stay on it, never an inline `style="font-size:…"`. Headings \
+carry weight by size and weight, not by colour.
+- Width: the page sits in `.wrap` (max 1080px); running text in a `.prose` column \
+(~68 characters); asymmetric two-column layouts use `.split` (5fr / 3fr), never three \
+equal columns by reflex.
- Spacing: siblings laid out with flex/grid + gap (never stacked margins); an 8px \
rhythm (8/12/16/24/32/48); wide tables, code and diagrams scroll inside their own \
`overflow-x:auto` container — the page body never scrolls sideways.
@@ -206,6 +377,11 @@ lorem ipsum; placeholder numbers; "TODO"; a title with an appended explainer \
("Dashboard — an interactive overview of…").
- Charts: dual axes, thick saturated blocks, dashed grids, rainbow categories, a value \
on every point, a 2-slice pie, legend-less multi-series, text in the series colour.
+- A headline that names a topic instead of stating a claim; a standfirst that \
+restates the title; stat labels that are whole sentences; the same finding said twice.
+- Hex colours or `#fff` written into component CSS (they break the other theme); \
+radii of 12px and more; inline font sizes; a second logo or brand mark beside the \
+colophon's.
- Web fonts or anything fetched (the sandbox blocks every request — the page breaks \
silently); scattered micro-animations; animation that runs without being asked for."""
@@ -219,6 +395,8 @@ working on both grounds; no colour defined only in a media/[data-theme] block.
- The page does exactly what the request asked — the chart the user named, the \
comparison, the explanation — with the real numbers and facts from the request; \
where something was missing, a clearly labelled assumption.
+- It opens with eyebrow, claim headline and answering standfirst, and closes with the \
+colophon (gigi mark, "Personal Jarvis", the source).
- Nothing on the page says how it was built, which model wrote it, or what the \
instructions were.
- Nothing else was created or changed."""
@@ -229,7 +407,11 @@ __all__ = [
"CHARTS",
"DESIGN_SYSTEM",
"DONE_MEANS",
+ "GIGI_MARK_SVG",
+ "PAGE_ANATOMY",
+ "PAGE_SKELETON",
"READ_THE_REQUEST",
"THEME_BOOTSTRAP_JS",
"THEME_CSS",
+ "WRITING",
]
diff --git a/tests/unit/artifacts/test_brief.py b/tests/unit/artifacts/test_brief.py
index 16202d0abe..8a54b05e5e 100644
--- a/tests/unit/artifacts/test_brief.py
+++ b/tests/unit/artifacts/test_brief.py
@@ -16,7 +16,12 @@ from jarvis.artifacts.brief import (
artifact_filename,
build_artifact_brief,
)
-from jarvis.artifacts.design_guide import THEME_BOOTSTRAP_JS, THEME_CSS
+from jarvis.artifacts.design_guide import (
+ GIGI_MARK_SVG,
+ PAGE_SKELETON,
+ THEME_BOOTSTRAP_JS,
+ THEME_CSS,
+)
from jarvis.missions.stream_evidence import clean_request_body
@@ -110,8 +115,9 @@ def test_an_oversized_previous_page_is_clipped_head_and_tail() -> None:
brief = build_artifact_brief("Tweak.", title="Huge", language="en", previous_html=huge)
assert "middle of the previous version omitted" in brief.prompt
assert brief.prompt.rstrip("`\n").endswith("ZEND")
- # The guide itself is ~12k chars; the clipped page adds the cap, not more.
- assert len(brief.prompt) < MAX_PREVIOUS_HTML_CHARS + 20_000
+ # The guide itself is ~25k chars (tokens, kit, anatomy); the clipped page
+ # adds the cap, not more.
+ assert len(brief.prompt) < MAX_PREVIOUS_HTML_CHARS + 30_000
def test_brief_is_deterministic() -> None:
@@ -158,3 +164,30 @@ def test_source_data_rides_between_the_facts_rule_and_the_design_guide() -> None
"My mail as a page.", title="Mail", language="en", source_data=" \n"
).prompt == plain
assert "## Source data" not in plain
+
+
+def test_the_brief_teaches_the_page_anatomy_and_the_writing() -> None:
+ """The archive review of 2026-09-29: strong pages open with eyebrow, a claim
+ headline and an answering standfirst, use hairline structure, and close with
+ a colophon. The brief states that shape and ships the kit that draws it."""
+ prompt = build_artifact_brief("x", title="T", language="en").prompt
+ assert "## Page anatomy" in prompt and "## Writing" in prompt
+ assert PAGE_SKELETON in prompt
+ for kit_class in (".masthead", ".standfirst", ".metrics", ".finding", ".colophon"):
+ assert kit_class + "{" in THEME_CSS, kit_class
+ assert "Headlines are claims, not topics" in prompt
+
+
+def test_the_colophon_carries_the_gigi_mark_and_never_the_star() -> None:
+ assert GIGI_MARK_SVG in PAGE_SKELETON
+ assert "Personal Jarvis" in PAGE_SKELETON
+ assert 'class="eye"' in GIGI_MARK_SVG
+ assert "star" not in GIGI_MARK_SVG.lower()
+
+
+def test_the_kit_writes_no_theme_breaking_colour() -> None:
+ """Component rules use tokens only; a raw white or black would break one theme.
+ The gigi body is the single fixed colour — the ghost is black in both."""
+ kit = THEME_CSS.split("/* --- The kit", 1)[1]
+ hexes = set(re.findall(r"#[0-9A-Fa-f]{3,8}\b", kit))
+ assert hexes == {"#0E0E0E"}