Karyo

Maintaining this repository

Karyo 2.1.1rendered at build time
On this page

How the code, the documents and the decision records are kept true to each other. This is for maintainers and for anyone whose change touches documented behaviour, which is most changes.

What "true" means here

  • The documents describe Karyo as it behaves today, including its known defects. A paragraph marked Known defect is current behaviour that is wrong and tracked as an issue.
  • There are no historical documents. Nothing here records how Karyo used to work or what it was once meant to be. When behaviour changes, the document that describes it is rewritten, and git history is the record of what it said before.
  • Every claim can be checked. Documents cite source paths, symbols and configuration keys, relative to the repository root, so a reader can re-derive a claim instead of trusting it.
  • Defects live in the issue tracker, not in documents about defects. The documents describe the behaviour; the issue describes what is wrong with it and names the documents its fix must update.

Every fact has one owner

docs/README.md lists every document, one line each. Each fact has one document that owns it, and every other page links there rather than repeating it:

The fact is about Its owner is
What Karyo does in the warehouse, rule by rule docs/functional/
What a person may configure, and who may docs/configuration/
What an outside system calls or receives docs/integration/
How it is built, deployed, run and recovered docs/operations/
How it is put together docs/architecture/
Why it is that way docs/architecture/decisions/
What a user sees on a screen docs/user-guide/
How to do a job with it docs/guides/

Adding a document means adding its line to the map. Removing one means removing its line and every link to it.

When you change behaviour

  1. Update the owning document in the same pull request. A behaviour change without its document is incomplete, whoever reviews it.
  2. When you fix a known defect, rewrite its passage. The paragraph that said the behaviour was wrong now describes the fixed behaviour, and the Known defect label goes.
  3. Update every document the issue names. An issue that describes a defect lists the documents its fix must update. The pull request updates each one, or says why one does not need it.
  4. Re-check citations into the files you changed. Documents cite paths, symbols and configuration keys. If you rename or remove one, update its citations and read the surrounding claims for sense. The consistency tests below check that every cited file exists and that no citation names a line, not whether a named symbol or key still exists or supports a claim; verify those yourself.
  5. Check the links you touched. The consistency tests check that every relative link resolves and every page is reachable from docs/README.md; a heading anchor that points into a page is still the author's and reviewer's job.
  6. Change a decision deliberately. If the change contradicts a decision record, rewrite or supersede the record in the same pull request, as how the set is kept true says.

Writing a document

  • Open with what the document covers, and name the files it is derived from where that is useful.
  • Present tense, and the product as it is. No "originally", "used to", "will be" or dates of past decisions.
  • Cite a repository-root-relative path with a symbol, function or configuration key for every claim someone might want to check. For example, cite application.yaml, quarkus.flyway.locations, or ReplenishmentService.scan in its named source file. ... may elide the middle of a long path. Do not use line numbers. If a superseded record cites deleted code, name its historical revision.
  • Never invent a reason. If nothing records why something is the way it is, say that it is not recorded. A plausible reason written down becomes indistinguishable from a real one.
  • Keep headings stable once other documents link to them; an anchor is a contract.
  • Plain punctuation: use a spaced hyphen ( - ) for a dash, never an em dash.

The user guide

Every screen, field and control the user guide describes is checked against the front-end and back-end source. A change to a screen updates its page in the same pull request, and re-captures the screen if the page carries it. Where a capability needs configuration before it acts (Loci's base URL), the guide says what the screen shows before that configuration; it does not describe behaviour a deployment does not have.

Code comments are documentation too

A comment that cites a document must cite one that exists, and a comment must not narrate history. Known debt: some comments still cite documents by paths that do not exist in this repository, or describe earlier behaviour. When you touch such a file, fix the comment. Applied migrations are the exception: their comments are part of the checksum and cannot change.

Dependencies, notices and images

  • Versions change in gradle/libs.versions.toml, the front-end lockfiles or the Dockerfiles, in a pull request of their own. A security floor for a platform-managed library goes through securityFloor in the root build.
  • THIRD-PARTY-NOTICES.md is reviewed against all three CycloneDX SBOMs. A dependency change updates the version-specific inventory in the same pull request after checking the upstream licence declaration. The release workflow rejects missing versions and disagreeing declarations, including on dry runs. Where Quarkus supplies no licence metadata, the notice needs a verified declaration and source URL for that exact version. Run the comparison in building before committing a dependency update.
  • Regenerating a lockfile after an engines edit (npm install --package-lock-only) adds six inBundle entries under @tailwindcss/oxide-wasm32-wasi on npm 10 and on npm 11. That is expected and idempotent, not a defect to chase. The one Node line is declared in .nvmrc and mirrored as described in deploying.
  • A new image build site is added to scripts/check-image-reproducibility.sh, or the reproducibility audit will not see it.
  • The Detekt baseline is not a place to put new findings to get to green. Fix the finding.
  • Figures and screenshots follow the style guide. A figure is a Mermaid source under docs/diagrams/, rendered by npm run diagrams in tests/e2e into a light and a dark SVG pair that is committed with it (diagram sources); never edit an SVG by hand, and never add an inline Mermaid fence. A screenshot is a demo-warehouse capture from npm run screens, listed in docs/media/screens/manifest.json; CI never re-captures, so after a change to a captured screen re-run the capture by hand and review the images by eye.

The consistency tests

tests/e2e/fixtures/repo-consistency.test.ts runs with the other helper tests in the nightly frontend job and pins what a reader of this repository relies on, network-free:

  • every relative link in the root markdown, docs/, and the pull-request template resolves;
  • every root-relative file citation exists, and none names a line number;
  • every page under docs/ is reachable from docs/README.md - so a new document needs its line in the map, or the test fails;
  • every Mermaid code block is non-empty, closed, and starts with a known diagram type;
  • the surface files a reader expects exist, including the image reproducibility and scan scripts;
  • every diagram source under docs/diagrams/ has both renders, with a provenance line that matches the source, palette, theme, font, applied look, and pinned renderer versions; sources carry roles rather than colour literals or style statements; the rendered look stays within the hand-drawn budget; and the palette meets its contrast floors in both variants;
  • every image embed resolves with alt text and a dark pairing, no inline Mermaid fences remain - every figure lives in docs/diagrams/, the README keeps to three figures and one screenshot pair, every canonical screenshot matches its manifest and is embedded by a page, and every file under docs/media except the screenshot manifest is shown by a document in this repository;
  • the screenshots are two named sets: the manifest is dated after the profile switch landed, each capture is in the core or the extended set, and only the Extended pages of the user guide show an extended- capture, so the README and the task pages show Core.

tests/e2e/fixtures/copy-vocabulary.test.ts holds the customer words the console, the floor app and the user guide never use ("small", "basic", "starter", "simple warehouse", "advanced customer", "enterprise", "pro", "upgrade"; the style guide says why).

The browser half of the figure guard is the nightly frontend job, which re-renders docs/diagrams/ with the same Chromium the browser tests pin and fails on any diff: that catches a hand-edited SVG, or a renderer, Mermaid or font change that alters output, which no hermetic check can.

The citation check exempts superseded decision records kept as history: a record whose status says Superseded has a whole body of statements about what was built, and a record marked Accepted; superseded in part is exempt for the deleted paths its own status paragraph names (that is the rule ADR 0031 records). Every current document is fully checked, so a missing file or a line number is a test failure, not a convention. A path under a build/ directory is a generated artifact and is not checked.

Release readiness is a dated snapshot of the issue tracker and the release blockers; when the issue migration changes the set, update its tables in the same change.

Tests and flakiness

A flaky test is a defect: file it, and fix the cause rather than retrying until it passes. Never disable a test, widen an exemption or skip a suite to make a pull request green; the root build fails any project whose deterministic test task is disabled or skipped.

The issue tracker

Issues are the substrate: every defect, feature request, documentation problem and question is an issue, with the forms in .github/ISSUE_TEMPLATE/. A security report never is: it is emailed to [email protected], as SECURITY.md describes. The migrated finding set and the release blockers are inventoried in release readiness, a dated snapshot a maintainer updates as issues open, close or migrate.

Settings outside the tree

A few things these documents rely on are repository settings, not files, and a maintainer keeps them in place:

  • Security and conduct mail. SECURITY.md and CODE_OF_CONDUCT.md use [email protected]. GitHub private vulnerability reporting is a public-repository feature and is unavailable for this private repository. The owner verified on 2026-10-20 that a message sent to the address arrives (release readiness).
  • Nobody pushes to main directly. CONTRIBUTING.md states the rule; branch protection is what enforces it.
  • CODEOWNERS names accounts with write access, or GitHub ignores the entry.