Guides#
| Topic | Page |
|---|---|
| Targets, ownership, boundaries | Architecture |
| Install, launch, prefix, data | Installation, Launch and process lifecycle, Wine prefix, Data and persistence |
| Remote sources, announcements | Communication and boundaries |
| Support codes, recovery | Error recovery |
| Logs, levels, fields | Logging |
| UI | Design |
| Tests | Testing |
| Releases, Sparkle, runtime pins | Releases and updates |
| Licenses, wallpapers, benchmarks | License automation, Wallpaper tagging, Performance comparison |
Before handing off a change#
- Run the narrowest focused check while you iterate. Add a test only for behavior that no type, compiler check, or existing test covers.
- Update the affected guide or contract. Add user-visible changes to
CHANGELOG.md. - Run the relevant formatter, inspect its diff, and rerun the focused check.
- Run
just ci. - For website and documentation changes, also run
just check weband the production site build in Documentation website.
Documentation authoring#
Start every published Markdown file with YAML frontmatter:
---
title: Installation architecture
description: Manifest validation and installation boundaries
order: 20
audience: developers
toc: true
---
| Key | Rule |
|---|---|
title, description |
Required. |
order |
Finite number for sorting. |
hidden, draft, toc |
Booleans. hidden removes the page from navigation. toc controls the table of contents. |
audience |
all, developers, or users. |
code |
Optional. A code in the form XX-XXX. Requires a non-empty domain. |
- Public error codes come from
scripts/config/support-codes.json. Do not edit the generated code pages, the generated tables indocs/help/errors/README.md, ordocs/help/errors/registry.json. Each active code has one page at/help/errors/<lowercase-code>/. - The site validates
audiencebut does not group pages by it. The footer links the Development section under Contributors. - A
draft: truefile fails the production build. - Use
README.mdfor a directory landing page. It maps to the directory route. Do not addindex.md. Without a README, the build lists the visible children. - Use relative Markdown links with the
.mdsuffix. The build validates local targets and heading anchors. Update link fragments when you rename a heading. External links use onlyhttps:ormailto:. - Use GitHub alert markers (
[!NOTE],[!TIP],[!IMPORTANT],[!WARNING],[!CAUTION]) in blockquotes. The launcher shows them as labeled text, so meaning must not depend on color. Use one marker per point. Do not nest alerts. - Put diagrams in fenced
mermaidblocks with short labels. The launcher shows the block as text, so the prose must explain the contract.
Terms#
Use these terms in user help. Keep one term for each concept.
- Server: a publisher server, such as Global, Japan, or China. User help says "server", not "region".
- Game environment: the Wine prefix that runs the game. On the first mention on each page, write "game environment (Wine prefix)". Then write "game environment".
- Runtime: the files that run the game. User help names the architecture when the choice matters.
- Lane: one runtime architecture and its artifact. Use this term in developer documentation only, not in user help.
- Keep developer terms out of user help, such as Wine internals and partial files. The only exception is the first mention of game environment, which adds "(Wine prefix)".
Documentation website#
The SvelteKit site in web/ builds docs/ and CHANGELOG.md into the project website. It is dark-only and uses the tokens in web/src/lib/styles/arknights-client.css.
- The home page shows one official Arknights Global wallpaper from
web/static/artwork/, the only artwork the repository bundles. Show it uncropped at 16:9. Credit the artist, Hypergryph, and Yostar beside it. --site-accent-fillis the accent thatWallpaperColorExtractorderives from that wallpaper.--site-accent-inkis its AA-readable text variant. Update both together when the wallpaper changes.- Keep
--site-accent-inka literal hex.web/scripts/postbuild.mjschecks its contrast against--site-bg, which needs a parsed value. - Use the signal only for the primary download action, active navigation, and focus. Use tinted fills. Keep secondary controls as quiet neutral capsules.
Use Node 24.14 or newer and the pnpm version in web/package.json. The website has no Vitest suite. Validate it with these commands:
just check web
cd web
BASE_PATH=/Arknights-MacOS-Client pnpm build
just check web runs Svelte, type, and Prettier checks. Run just format web to accept Prettier changes. The build fails unless frontmatter, routes, links, heading anchors, canonical and social URLs, accessibility metadata, and base-path URLs are valid. For a UI or Mermaid change, also check light, dark, desktop, and mobile pages with just dev web.
just ci does not run these checks. A documentation-only edit does not trigger Pages. Run Actions → Publish website → Run workflow from main, or let the release workflow call it. Other branches fail before deployment.
Blog posts#
Write each post as one file in docs/blog/. Name the file YYYY-MM-DD-slug.md. The date in the file name must match date. The blog is not part of the documentation tree.
Use this frontmatter:
title: required. The post title.date: required. An existing date inYYYY-MM-DDform.summary: required. One or two sentences. The listing and search show it.draft: optional. Settrueto hide the post from production.
The post URL is /blog/<slug>/. The slug is the file name without the date. Keep the slug stable after you publish. The listing is at /blog/.
Drafts appear under pnpm dev. The listing marks them as Draft. Drafts do not appear in production output.
Use a fenced block with the info string share-chart to show relative sizes. Write the block as YAML or JSON:
```share-chart
title: Chip family
items:
- label: M1
share: 0.31
- label: M2
share: 0.27
```
titleis required. It names the chart.typeis optional. Usebar(default) orpie. Apiedraws a donut with a legend.itemsis a non-empty list. Each item needs alabeland ashare.- A
shareis a number from 0 to 1. The build fails for any other value. - For
type: pie, the shares must add up to between 0.98 and 1.02. The build fails otherwise. - The chart shows the rounded percentage next to each bar or slice. Screen readers hear a coarse wording, such as "about a third".
- The bars and slices keep the order you write. Colours repeat after seven items, and the seventh is a neutral grey.
- Quote a value that contains a colon, such as
"Chip family: TODO". Unquoted colons break the YAML.
Use a fenced block with the info string contact to add a contact callout. Write the block as YAML:
```contact
title: Help test the Taiwan server
text: We look for a volunteer who plays on the Taiwan server.
topic: testing
```
titleandtextare required. Each must be a non-empty string.topicis optional. Usetestingortranslation. The button adds?topic=<Topic>with a capitalized value to the form URL, which fills the hiddentopicfield. To add a topic, add its key and capitalized value tocontactTopicsinweb/src/lib/site.ts.- The button opens the contact form in a new tab. Other keys fail the build.
- The form URL comes from
contactFormUrlinweb/src/lib/site.ts. Do not write the URL in the block.
Use a fenced block with the info string chart to show benchmark data. Write the block as JSON:
```chart
{
"src": "/benchmarks/comparison.json",
"metric": "cpu_percent",
"title": "CPU use",
"unit": "% of one core",
"caption": "Lower is better."
}
```
srcis required. It is a site path that starts with/.//fails the build.modeis optional. Usetimeseries,summary, orstats.metricis optional. Use a name fromCHART_METRICSinweb/src/lib/content/chart.ts.title,unit, andcaptionare optional text.heightis an optional positive number.
To add developer notes, use <details> and <summary>. Use no attributes. Leave a blank line before and after the Markdown inside. Other raw HTML is escaped.