design-system/styleguide.html — internal reference, not deployed. Renders the live web/src/styles/site.css.
OKF4net DESIGN.md ↗
design-system/styleguide.md type: DesignSystem

The §Document.

The OKF4net site has one idea: every page is a concept document. Editor-tab navigation, a framed document window, ## chapter markers with § spec references, a raw⇄rendered duality. This page is the system's mirror — it renders the real stylesheet, so it can't drift from what ships.

##

Foundations

tokens — the only values you may use

Colour. One brand hue (Klein blue), near-black ink, and a narrow set of neutrals. Every colour is a CSS variable in :root; never hard-code a hex in a page.

--white #ffffffpage background
--ink #101014text, borders, code blocks
--blue #1a3fd6brand — links, accents, primary
--blue-soft #eef1fdtints — fm cells, code, hovers
--gray #6a6a72secondary text
--hair #e3e3e8hairline borders
--ok #0e8a4dsuccess, YAML strings

Inside pre.block (dark) the syntax palette shifts to hold contrast on ink: .k #7e9bff keywords · .s #ffd166 strings · .c #7a7a85 comments · .ok #6fd18a success.

Type. Three families, three jobs. Never introduce a fourth.

display — Inter Tight, 800/900, tight tracking · h1, h2, blockquote, cta
Knowledge is a directory of markdown files.
body — Inter, 400/500/600, 16px / 1.6 · prose, lede, lists
Load a bundle, check conformance, walk the cross-link graph. Bundle.Load never aborts on a bad file — parse failures land in ParseErrors.
mono — Space Mono, 400/700 · nav, labels, paths, code, data
okf validate ./my_bundle → OK: conformant with OKF v0.1

Layout & rhythm. One centred column, .frame at max-width: 1200px with fluid gutters (clamp(16px, 3.5vw, 48px)). Prose measures are capped (64ch body, 44ch blockquote) for readability. Borders are 1.5px solid ink for structure, 1px hair for internal grids. Zero border-radius — the system is orthogonal by design.

##

The metaphor

every page is a concept document
If you can cat a file, you can read OKF — so every page looks like a file you could cat.

The whole identity derives from the product. Pages don't decorate; they impersonate an OKF concept document:

  • The top navigation is a strip of editor tabs — each link is a *.md concept id, the current page marked with an inset blue underline.
  • Content opens inside a framed document window (.doc-window) with a chrome bar showing the file path (my_bundle/page.md) and its type:.
  • The home hero carries a live raw ⇄ rendered toggle — the same duality OKF has between markdown source and its rendered view.
  • Chapters are numbered with a ## markdown-heading badge and annotated with the spec section they map to (§4–§5).

Structure encodes something true: the § references are real spec citations, the file paths are plausible concept ids, the sidebar in /docs is a real bundle tree. Decoration that doesn't map to the product gets cut.

##

Components

rendered live · reveal the source
.doc-window / .doc-chromeframed page opening — path + type
tables/orders.mdtype: Table

The document window frames every page. Its chrome names the file and its type.

source
<div class="doc-window">
  <div class="doc-chrome">
    <span class="path">tables/<b>orders.md</b></span>
    <span>type: Table</span>
  </div>
  <div class="rendered"> … </div>
</div>
.cheadchapter head — ## badge, title, § ref
##

Load a bundle

§3, §5 — Bundle · LinkScanner
source
<div class="chead">
  <span class="h">##</span>
  <h2>Load a bundle</h2>
  <span class="ref">§3, §5 — Bundle · LinkScanner</span>
</div>
.concept-grid / .celldefined terms — 2-up bordered grid
bundle

A directory tree of markdown files — the unit of distribution.

concept

One document: YAML frontmatter, then a markdown body.

source
<div class="concept-grid">
  <div class="cell">
    <div class="term">bundle</div>
    <p>A directory tree of markdown files.</p>
  </div> …
</div>
pre.blockcode — ink panel, blue rule, .k/.s/.c/.ok tokens
var bundle = Bundle.Load("./my_bundle");
// permissive: a bad file never aborts
Console.WriteLine($"{bundle.Count} concepts");
source
<pre class="block"><span class="k">var</span> bundle = Bundle.Load(
  <span class="s">"./my_bundle"</span>);
<span class="c">// comment</span></pre>
table.mapreference rows — mono key + prose
CommandDoes
okf validateConformance check (§9), non-zero exit on failure
okf graphCross-link graph, --dot for Graphviz
table.indexgenerated index.md listing (§6) — docs only
TypeConceptDescription
Guidegetting-startedInstall and validate your first bundle.
ReferenceagentssoonThe Agent Framework tools.
ol.stepsa real sequence — numbered process
  1. Fork and branch from main.
  2. Add tests — never regenerate a snapshot in tests/fixtures/ without reading the diff.
  3. Open a PR citing the spec section (§).
blockquotethe thesis line — display weight, blue rule
If you can cat a file, you can read OKF; if you can git clone a repo, you can ship it.
.warna rule that must not be broken
GOLDEN FIXTURES

Never edit tests/fixtures/. If C# output differs from a golden file, the C# is wrong — fix the port.

.btn · .btn.primary · .conformactions & the dashed conformance badge
conformant with OKF v0.1 · 218/218 tests · 5 byte-exact golden comparisons
.nextcross-link teaser closing a chapter

→ cli.md — the same engine, as one AOT binary for CI

.ctaclosing call to action — soft-blue panel

Ship knowledge as files.

The spec is short, the codebase is dependency-free, and the test suite tells you immediately whether you're right.

##

Patterns & guardrails

how to assemble a page

Page skeletons. Two openings, one body.

SkeletonWhen
hero + raw/renderedHome only — the marquee concept document with the live toggle and site.js.
.page-docEvery subpage — a slimmer document window (path + type + h1 + lede), no toggle.
.docs-shellReference pages under /docs — bundle-tree sidebar + the .page-doc opening.

Below the opening, content is always a .docbody of section.chapter blocks, each led by a .chead.

Responsive. Three stops. At 960px the editor-tab nav is hidden and the docs sidebar stacks above content. At 720px the frame goes full-bleed: it drops its gutters, the document window loses its side borders, and code blocks bleed edge to edge while text keeps a 16px inset.

Accessibility floor (non-negotiable):

  • Visible keyboard focus everywhere — :focus-visible draws a 2px blue outline; never remove it.
  • prefers-reduced-motion disables smooth scroll and all transitions.
  • Ink-on-white and blue-on-white clear WCAG AA; the dashed .conform badge and .tag chips are never the sole carrier of meaning.
  • Every interactive tab and toggle exposes state (aria-current, aria-pressed).

→ DESIGN.md — the written spec: token table, build conventions, and voice rules