The Studio is specified by requirements that describe what it does today. Each one is tied to the code that produces the behaviour and to the test that checks it.
What the requirements are
The requirements live in the repository, in a bundle managed by the okfreq tool. They come at two levels. A StRS (stakeholder requirement) is a use case: something a writer, reviewer or maintainer can do and see in VS Code. A SwRS (software requirement) is one observable behaviour of the extension, written with its scenarios: given a situation, when something happens, then this is the outcome. A rule that many behaviours share is written once and cited by the others. Together they specify what the Studio does today, never what we would like it to do.
Why we keep them
The documented behaviour stays equal to the code, because each requirement is checked against the source and the tests.
Bugs become visible: a behaviour that looks wrong is written down as it behaves, under a "Known issue", and its fix is planned separately.
We know which test checks which behaviour, and which behaviour has no test.
A change can be reviewed against a contract: the requirement, the code and the test change together.
How it works
A use case (StRS) is refined into behaviours (SwRS). Each behaviour is anchored in two places by a one-line comment holding its identifier: @implements_req where the code produces it, and @tests_req in the test that checks it.
A real example
This requirement is read from the report and the repository as they stand. Its statement and a scenario, then the two comments that tie it to the code and to the test.
SwRS-MDOKFSTUDIO-GFM-021 · derives from StRS-MDOKFSTUDIO-GFM-003 · cites 5 cross-cutting rules
Clicking a checkbox toggles one source character
When a writer clicks a checkbox in reading or edit mode, the extension SHALL edit only the character between its brackets, without opening a block editor, and revert the checkbox and show the reason next to it for a few seconds (and as its tooltip) when the host refuses the toggle.
Scenario: Toggle in reading mode
GIVEN a trusted preview with '- [ ] a'
WHEN the checkbox is clicked
THEN the source becomes '- [x] a' and no block editor opens
In the code, the marker next to the implementation: src/core/edits/sourceEdits.ts:58
// @implements_req SwRS-MDOKFSTUDIO-GFM-021
/**
* Gives the task-list marker at 1-based `line`, zero-based `column` (its opening bracket) the
* state `checked`: a one-character edit between the brackets.
*/
export function planCheckboxToggle(text: string, line: number, column: number, checked: boolean): CheckboxTogglePlan {
const lines = sourceLines(text);
In the test, the marker above the test that checks it: test/core/edits/sourceEdits.test.ts:33
// @tests_req SwRS-MDOKFSTUDIO-GFM-021
test("a checkbox toggle changes the one character between the brackets", () => {
const text = "# Tasks\r\n\r\n- [ ] one\r\n- [x] two\r\n";
const toggle = planCheckboxToggle(text, 3, 2, true);
assert.deepEqual(toggle, { edit: { start: 14, end: 15, text: "x" } });
assert.equal(applied(text, toggle), "# Tasks\r\n\r\n- [x] one\r\n- [x] two\r\n");
assert.equal(applied(text, planCheckboxToggle(text, 4, 2, false)), "# Tasks\r\n\r\n- [ ] one\r\n- [ ] two\r\n");
What keeps it in sync
The requirement checks run in CI with the other static checks (just check runs just requirements-lint): okfreq validate checks the requirement files and their links, okfreq lint --check checks the generated navigation, and okfreq update-coverage --check fails when a marker is missing, unknown or out of date. A change that moves marked code or tests moves the markers in the same commit.
The figures
Counts come from the okfreq generate-report JSON and cover active requirements only (16 approved, 12 draft, 472 proposed); retired ones are counted below. Report generated 2026-10-29T16:37:08.325514+00:00.
79StRS use cases
421SwRS behaviours
100%implemented (415 of 415)
100%tested (415 of 415)
100%fully traceable (415)
6SwRS with a marker exemption
166known issues in 69 SwRS
26 of 79StRS with a stakeholder validation test
Per scope
Scope
StRS
SwRS
Implemented
Tested
block-editing
8
52
52 / 52
52 / 52
code-blocks
2
10
10 / 10
10 / 10
diagrams
4
23
23 / 23
23 / 23
frontmatter-editing
3
13
13 / 13
13 / 13
frontmatter-schema
5
19
19 / 19
19 / 19
gfm
2
9
9 / 9
9 / 9
layout-width
3
9
9 / 9
9 / 9
lifecycle-sync
7
32
30 / 30
30 / 30
myst
6
23
23 / 23
23 / 23
palette-slash
7
64
64 / 64
64 / 64
rendering-core
3
21
19 / 19
19 / 19
review-annotations
6
43
43 / 43
43 / 43
table-editing
6
29
29 / 29
29 / 29
theme-zoom
3
8
8 / 8
8 / 8
toolbar-navigation
8
43
43 / 43
43 / 43
trust-security
6
23
21 / 21
21 / 21
Total
79
421
415 / 415
415 / 415
Retired requirements
Kept for their identifiers, never counted above and exempt from markers.
Lifecycle
StRS
SwRS
deprecated
2
59
superseded
51
457
Browse the requirements
Browsing the requirements from this site, from a use case to its behaviours and their tests, with a page per requirement and a search, is planned and not available yet. Until then the requirements are readable in the repository, under requirements/tiers/.