Skip to content

Documentation website

Owner request of 2026-11-13: publish the OKF bundle and the documentation as a full documentation website like other open-source projects, with how things are done, how to contribute, the Git workflow, the checks and how the automation fits together.

  • [E] Astro Starlight (owner, 2026-11-13): sidebar from the folders, offline search, dark mode; it uses the front matter of the OKF files.
  • [E] Language English, like code, OKF and pull requests; game terms stay German (owner, 2026-11-13).
  • [E] The whole OKF bundle is published as it is in the repository (owner, 2026-11-13). The repository holds no secrets.
  • [E] Published on GitHub Pages (https://heiss.github.io/nova-imperium/) after every push to main; the site is built in every pull request that changes it, with a link check, and published only after the merge (owner, 2026-11-13).
  • [E] Sections (owner, 2026-11-13):
    1. Getting started (play, run locally)
    2. Contributing (issues, clarification, changelog fragments, labels, code style)
    3. Git workflow (branches, the pull request flow, squash merges, the release pull request, hotfixes, Renovate; with diagrams)
    4. CI and checks (every job, the CI Gate, mutation tests and shards, Trivy, gitleaks, CodeQL, CodeRabbit)
    5. Automation (how the workflows work together: release pull request, tag, release, candidate images, nightly run, security hotfix)
    6. Operations
    7. Decisions (the OKF bundle)
  • [E] The site lives in website/ with its own package.json and lockfile, outside the game build; okf/ and docs/ stay the only source and are read at build time (owner, 2026-11-13). No workspace packages.
  • [E] agents.md for agents (owner, 2026-11-13): generated at build time from the title and description of every page, served raw (not rendered) at /nova-imperium/agents.md, a sitemap with a short description of where what is; every page is also served as raw Markdown and linked from it; llms.txt points to agents.md.
  • [E] The repository „About“ (owner, 2026-11-13): „A classic space strategy browser game for a group of friends – Node.js, SQLite, Svelte, self-hosted with Docker.“, homepage the site, topics browser-game, strategy-game, space, nodejs, typescript, sqlite, svelte, self-hosted. The session cannot write repository settings; the owner sets it.
  • website/ is its own pnpm package (Astro 7, Starlight, astro-mermaid, starlight-links-validator) with its own lockfile and Prettier; the root ESLint, Prettier, knip, jscpd and dependency-cruiser leave it out. Renovate updates it through config:recommended like the root package.
  • website/scripts/sync-content.mjs copies every Markdown file of okf/ and docs/ into git-ignored folders of website/src/content/docs/ before each build: the title from the front matter or the first heading, the description from the front matter or the page table in website/lib/pages.mjs, and the source path. okf/ becomes the section Decisions (/decisions/…); the place of each file of docs/ is in that table, and a new file of docs/ without a place stops the build.
  • A Markdown plugin (website/lib/markdown.mjs) rewrites the links as GitHub reads them: /ops/testing.md within the bundle, relative links within docs/, /okf/… from the guide pages. A link to a page becomes its route, a link to any other file of the repository a link to GitHub, a link to a missing file stops the build. The markers [E], [V] and [U] become badges. starlight-links-validator fails the build on every broken internal link or anchor.
  • agents.md, llms.txt and the raw Markdown of every page (/nova-imperium/<page>.md, links pointing to raw Markdown) are generated by website/src/pages/. Mermaid diagrams are drawn in the browser, so the build needs no headless browser.
  • The CI job „Documentation website“ (ci.yml) checks the format, runs the tests of website/test/ (node:test), builds and checks the links when website/, okf/, docs/, ci.yml or pages.yml change, and always on pushes, release pull requests and pull requests into hotfix/**; the CI Gate requires it then. Changes in website/ alone count as documentation: no game checks. pages.yml builds and deploys after every push to main (environment github-pages, one deployment at a time).
  • Task of the owner: Settings → Pages → Source „GitHub Actions“.

Almost every pull request conflicted at the top of the single file okf/log.md, and each resolution was a new push with a CI run of 30 to 40 minutes (on 2026-11-14 in #197, #205, #206, #207 and #209).

  • [E] Every entry is its own file okf/log/<date>-<short-name>.md, for example okf/log/2026-11-14-guild-ranks.md (owner, 2026-11-15, D1). A pull request adds a new file and never changes another entry, so two pull requests that each add an entry merge without a conflict. When two entries of one day would get the same name, the short name is made more specific.

  • [E] The entries of okf/log.md were split into files once, in the pull request of #212 (owner, 2026-11-15, D2): 136 entries before, 136 files after, every date, kind and text unchanged; the two entries #210 added to okf/log.md on main meanwhile became files too when main was merged.

  • [E] The website builds the log page from the folder, and okf/log.md is removed (owner, 2026-11-15, D3). The page keeps its URL (/decisions/log/, raw /decisions/log.md) and its anchors (one heading per date, #2026-11-14); links within the bundle point to the folder, /log/.

  • [E] The front matter of an entry, one key: value per line, as built: type, date, kind and issues (owner, 2026-11-15, O15):

    ---
    type: log-entry
    date: 2026-11-15T00:30
    kind: Code
    issues: [163, 45]
    ---
    #163 built with the owner's decisions of 2026-11-13: …

    type is always log-entry; date is the date of the name, with a UTC time THH:MM for new entries (below); kind is one of the kinds the log used before the split: Decision, Decision and code, Code, Feature, Fix, Update, Docs; issues lists every #N the text names, issues and pull requests, in the order of the text, and is left out when it names none (owner, 2026-11-15, O15; an HTML entity such as &#39; is no #N). The text is one paragraph and keeps the wording of the old line after „Kind: “; a text that starts with a parenthesis follows the kind directly (* **Fix** (found while porting): …).

  • [E] New entries carry a UTC time in date, for example date: 2026-11-15T00:30, and the page lists a day’s entries newest first (owner, 2026-11-15, O15). The entries before keep the date only: within a day the entries with a time come first, the newest first, then those without a time by file name (so 130 of the 136 split entries stand at another place within their day than in okf/log.md). The check takes YYYY-MM-DD or YYYY-MM-DDTHH:MM, the date part equal to the date of the name. [V] The time is required from 2026-11-15 on, the day of the decision; the page shows the date headings, not the times.

  • [E] OKF conformance (SPEC.md §2 and §9 of the OKF specification, read by the coordinator on 2026-11-15): log.md is an optional reserved file, so a bundle without it conforms; every other .md file is a concept document that needs a non-empty type, which every entry has (log-entry).

  • [E] A check refuses an entry without a valid date or a known kind, a name that is not <date>-<short-name>.md, and a front matter description that contains „: “ (owner, 2026-11-15, #212), a date other than the one of the name and, from 2026-11-15 on, a date without a time (O15). [V] It also refuses a type other than log-entry, a front matter line that is not key: value or a key given twice, issues that are not a list of numbers, an empty text, any other file in okf/log/ and a file okf/log.md that comes back (D3).

  • scripts/okf-log.ts reads, checks and renders the entries (parseEntry, checkLog, readLog, ordered, logMarkdown); its tests are src/test/okf-log.test.ts, one of them checks every entry of okf/log/, so pnpm check and the CI job „Lint, types, unit tests with coverage, build“ refuse a malformed entry. node scripts/okf-log.ts check runs the same check as a step of the CI job „Documentation website“, which runs for every change of okf/ and of scripts/okf-log.ts, so a pull request that changes only the OKF bundle is checked too.
  • The website reads the folder through the same code (website/lib/log.mjs imports scripts/okf-log.ts): scripts/sync-content.mjs writes the page decisions/log with the source okf/log, the raw Markdown comes from the same text, every entry file and the folder resolve to that page in website/lib/pages.mjs, and the sidebar lists the page among the top-level concepts. A malformed entry also stops the build. Tests in website/test/log.test.mjs.