Skip to content

Commit 72b13d2

Browse files
Merge pull request #40 from ghostintheshell-192/feature/knowledge-base
The knowledge base: 24 concepts and 5 level pages, generated from the data
2 parents fc8cb1a + e0c4650 commit 72b13d2

92 files changed

Lines changed: 11306 additions & 215 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
{
2727
"type": "command",
2828
"command": "python3 \"$(git rev-parse --show-toplevel)/.development/scripts/update-tech-debt-index.py\" >/dev/null 2>&1 || true"
29+
},
30+
{
31+
"type": "command",
32+
"command": "node \"$(git rev-parse --show-toplevel)/.development/scripts/generate-kb.js\" >/dev/null 2>&1 || true"
2933
}
3034
]
3135
}
@@ -36,6 +40,10 @@
3640
{
3741
"type": "command",
3842
"command": "bash -c 'cat | python3 \"$(git rev-parse --show-toplevel)/.development/scripts/session-archive.py\"' || true"
43+
},
44+
{
45+
"type": "command",
46+
"command": "python3 \"$(git rev-parse --show-toplevel)/.development/scripts/update-tech-debt-index.py\" >/dev/null 2>&1 || true"
3947
}
4048
]
4149
}

.development/ARCHITECTURE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ kernel rules and never regenerated from the engine.
8181
- `collapses-oracle.test.js` — the content algebra (engine/content.js) against the declared `collapsesTo` rules, in both directions (degenerate-levels §6, §10). Run with: node collapses-oracle.test.js
8282
- `components-data.test.js` — validates the REAL component YAML files and keeps the headless fixture aligned with them. Run with: node components-data.test.js (uses python3 + pyyaml to read YAML; this repo is zero-dependency and...
8383
- `graph.test.js` — headless tests for the control-path graph module. Run with: node graph.test.js
84+
- `kb-data.test.js` — validates the REAL knowledge-base data: data/kb/*.yaml and the `kb:` block on the level files. Run with: node kb-data.test.js (uses python3 + pyyaml to read YAML; this repo is zero-dependency and No...
85+
- `kb-generator.test.js` — the knowledge-base generator's output is a build artefact that is COMMITTED, so it has to behave like one. Run with: node kb-generator.test.js (uses python3 + pyyaml to read the YAML the pages are c...
86+
- `kb-worked.test.js` — the worked calculation on a knowledge-base level page cannot contradict the engine. Run with: node kb-worked.test.js (uses python3 + pyyaml to read YAML, like the other data suites.)
8487
- `layout-golden.test.js` — golden-table verification for all parity algorithms. Run with: node layout-golden.test.js
8588
- `levels-oracle.test.js` — the hand-written recognizer as ORACLE for the data-driven one. Run with: node levels-oracle.test.js
8689
- `levels.test.js` — headless tests for the level catalogue and the shape matcher (engine/levels.js). Run with: node levels.test.js

.development/CURRENT-STATUS.md

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22

33
## Project State
44

5-
**Last Updated**: 2026-09-05
5+
**Last Updated**: 2026-09-06
66

77
**Current Phase**: Live in its own repo. Extracted from the personal-site repo and
88
deployed to **[raid-sandbox.dev](https://raid-sandbox.dev)** via Vercel (auto-deploy from
99
`main`, HTTPS enforced by `.dev`). The old site (`ghostintheshell-192.github.io`) now
1010
forwards its two indexed game URLs here via canonical + refresh stubs.
1111

12-
**Active Work**: none open. The **degenerate-levels spec** is implemented (PRs #35#37,
13-
2026-09-05, now `specs/implemented/degenerate-levels.md`): below its minimum a level
12+
**Active Work**: the **knowledge base** (roadmap item 3) is built on `feature/knowledge-base`
13+
and waits for its PR — an MVP by Valentina's word: 31 static pages generated from the data,
14+
24 concepts with their sources, five level pages with the engine's numbers, one page per
15+
concept, the map as a folding column beside the text. What remains of the spec's §9 is
16+
the other nine levels and the components page. Before that: the **degenerate-levels spec**
17+
is implemented (PRs #35#37, 2026-09-05, now `specs/implemented/degenerate-levels.md`): below its minimum a level
1418
collapses into a simpler one, the panel shows what was built next to what runs, and the
1519
diff between them is the trace of rewrites the level files declare. The **agnostic-engine
1620
plan** (2026-09-02) is complete and its technical queue closed (2026-09-04/05). What
@@ -19,6 +23,24 @@ its own (`reference/engine-robustness-and-extraction.md` §8).
1923

2024
## Recent Milestones
2125

26+
- **The knowledge base, generated from the data** (`feature/knowledge-base`, 2026-09-06,
27+
spec and implementation the same day, `specs/implemented/knowledge-base.md`): 24
28+
concept entries in `data/kb/` — the four storage layers, the two axes and their
29+
techniques, the three numbers, rebuild, scrubbing, the write hole, "RAID is not a
30+
backup", the physical actors — every sentence with a fact checked against a primary
31+
source read that day (the man pages, `raid0/1/5/10.c`, the 1988 paper, Anvin's RAID-6
32+
paper, Microsoft Learn, the MegaRAID guide, Intel, US-CERT) and 107 of 114 sources
33+
linked; a `kb:` block on levels 0/1/5/6/10 with the worked calculation filled from the
34+
engine; `generate-kb.js` (Node, vendored js-yaml, a markdown subset, an evaluator for
35+
`capacityTemplate`) writes 31 pages at commit time, tracked and served static —
36+
`kb.html` redirects, `kb.js` is gone, the sitemap lists them; three suites
37+
(`kb-data`, `kb-worked`, `kb-generator`: 336 tests) keep data, engine and pages
38+
aligned. The engine changed where the pages contradicted it: a mirror's write
39+
parallelism is one copy's width and its penalty the copy count, so RAID 0+1 writes
40+
like RAID 1+0 (`mirror-of-stripes-write-parallelism` resolved). Layout decided with
41+
Valentina reading as a learner: one page per concept, a `<details>` map beside the
42+
text, the page's sections on the right, the accent for links, a footer for the site's
43+
navigation on every page including the sandbox's. 22 headless suites - 2026-09-06
2244
- **Desktop only** ([ADR-003](reference/decisions/003-desktop-only.md), 2026-09-05):
2345
below 900px the game is no longer offered — `index.html` hides the canvases and shows
2446
a short notice saying what RAID Sandbox is, that it needs a desktop browser, and
@@ -149,10 +171,11 @@ decision.
149171
in `data/`), the decided first channel (hover a violation → highlight its nodes),
150172
and the engine's discarded `reason` strings. The data-driven engine made this
151173
cheaper: tooltips already come from `ui:` blocks. **M**
152-
3. **Knowledge base rework** — didactic, deeper than in-game, not a wiki. Same source
153-
as the icons, two depths, linked both ways. Crosses the SEO ceiling (content not in
154-
the served HTML): decide whether KB prose stays runtime-loaded or is written into
155-
the page. Start: `kb.html`/`kb.js`, `data/intro.yaml`, the SEO item below. **L**
174+
3. **Knowledge base rework****MVP DONE 2026-09-06** (`specs/implemented/knowledge-base.md`):
175+
one source, two depths, generated at commit time, 31 pages. Left, §9.3–9.4: the `kb:`
176+
block on the other nine levels (1E, 1+0, 0+1, 50, 60, 51, 61, 100, JBOD) and the
177+
components page; RAID 4 needs a model decision first (§14). The SEO ceiling is gone
178+
with it: the text is in the served HTML. **M** for what remains
156179
4. **The verdict, drawn** — a dashed box around the pieces that form the controller,
157180
coloured by verdict, the ADR-001 lesson with no words. Start:
158181
`specs/planned/derived-controller.md` ("the dashed box is the verdict, drawn"),
@@ -186,13 +209,14 @@ decision.
186209

187210
Small, any time:
188211

189-
- **Phantom back links**`index.html` and `kb.html` both carry "← back" to
190-
`ghostintheshell-192.github.io`; a "made by" link in the footer is honest, an arrow
191-
is not. **S**
212+
- ~~**Phantom back links**~~ — gone 2026-09-06 with the KB: `index.html` has a footer
213+
(knowledge base · author), `kb.html` is a redirect.
192214
- **Contact form** — the site is static and stays so: `mailto:` + a link to GitHub
193215
issues is the honest baseline; a third-party form service adds a host to the path
194216
(the js-yaml argument); a Vercel function would be the first server-side code. **S**
195-
- **SEO: the content is not in the served HTML** — folds into item 3. **M**
217+
- ~~**SEO: the content is not in the served HTML**~~ — closed by item 3 (2026-09-06):
218+
the knowledge base is static HTML with a `TechArticle` per page and a sitemap; what
219+
remains is Search Console (the property is still not shared with the MCP account).
196220
- **Google Fonts is the last third-party blocking request** — self-host JetBrains Mono. **S**
197221
- ~~**Push + PR flow**~~ — decided 2026-09-04 and written into `workflow.md` (PR #17):
198222
a PR per branch, merged from GitHub, so the `headless` check is a gate. One caveat
@@ -207,10 +231,6 @@ See `.development/tech-debt/`:
207231
the player builds (roadmap item 2).
208232
- `capacity-approximate-on-mixed-disks.md` — open (medium): usable capacity is
209233
approximate when an array mixes disk sizes.
210-
- `mirror-of-stripes-write-parallelism.md` — open (low): a mirror of striped legs
211-
writes as one disk, so RAID 0+1 gets `writeMult 0.5` and `writeClass medium` against
212-
1+0's `1` / `high`. Fixing it lets 0+1 satisfy the `database` challenge — a domain
213-
decision, taken on purpose, recorded there.
214234
- `physical-layer-canvas-has-no-touch-picker.md` — open (low, re-scoped by ADR-003): the physical
215235
layer has drag-and-drop only, the data layer also click-to-build; take up with item 9.
216236
- `automation-not-checked-on-windows.md` — open (low): hooks and dev scripts are

.development/INDEX.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@
2727

2828
- [README.md](specs/README.md) — Specs — what is written down, and what is not yet
2929

30-
### specs/implemented/ (3 files)
30+
### specs/implemented/ (4 files)
3131

3232
- [agnostic-engine.md](specs/implemented/agnostic-engine.md) — The agnostic engine — how the domain moved out of the code
3333
- [degenerate-levels.md](specs/implemented/degenerate-levels.md) — Degenerate levels — what the player has, next to what they tried to build
34+
- [knowledge-base.md](specs/implemented/knowledge-base.md) — Knowledge base — one source, two depths, pages that stand alone
3435
- [raid-sandbox-domain-model.md](specs/implemented/raid-sandbox-domain-model.md) — RAID Sandbox — Domain Model (design backbone)
3536

3637
### specs/planned/ (2 files)

.development/automation/docs-update.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ run_generator()
3232
run_generator "ARCHITECTURE.md" bash "$SCRIPTS/generate-architecture.sh"
3333
run_generator "INDEX.md" python3 "$SCRIPTS/generate-index.py"
3434
run_generator "tech-debt/README.md" python3 "$SCRIPTS/update-tech-debt-index.py"
35+
# The knowledge base is derived documentation too, only its output is served to
36+
# readers instead of read in the repo (specs/planned/knowledge-base.md §7).
37+
run_generator "kb/" node "$SCRIPTS/generate-kb.js"

0 commit comments

Comments
 (0)