- Stats dashboard redesign design and implementation plans - Episode detail and Anki card link design - Internal knowledge base restructure - Backlog tasks for testing, verification, and occurrence tracking
3.3 KiB
Internal Knowledge Base Restructure Design
Problem: AGENTS.md currently carries too much project detail while deeper internal guidance is either missing from docs/ or mixed into docs-site/, which should stay user-facing. Agents and contributors need a stable entrypoint plus an internal system of record with progressive disclosure and mechanical enforcement.
Goals:
- Make
AGENTS.mda short table of contents, not an encyclopedia. - Establish
docs/as the internal system of record for architecture, workflow, and knowledge-base conventions. - Keep
docs-site/user-facing only. - Add lightweight enforcement so the split is maintained mechanically.
- Preserve existing build/test/release guidance while moving canonical internal pointers into
docs/.
Non-Goals:
- Rework product/user docs information architecture beyond boundary cleanup.
- Build a custom documentation generator.
- Solve plan lifecycle cleanup in this change.
- Reorganize unrelated runtime code or existing feature docs.
Recommended Approach
Create a small internal knowledge-base structure under docs/, rewrite AGENTS.md into a compact map that points into that structure, and add a repo-level test that enforces required internal docs and boundary rules. Keep docs-site/ focused on public/product documentation and strip out any claims that it is the canonical source for internal architecture or workflow.
Information Architecture
Proposed internal layout:
docs/
README.md
architecture/
README.md
domains.md
layering.md
knowledge-base/
README.md
core-beliefs.md
catalog.md
quality.md
workflow/
README.md
planning.md
verification.md
plans/
...
Key rules:
AGENTS.mdlinks todocs/README.mdplus a small set of core entrypoints.docs/README.mdacts as the internal KB home page.- Internal docs include lightweight metadata via explicit section fields:
StatusLast verifiedOwnerRead when
docs-site/remains public/user-facing and may link to internal docs only as contributor references, not as canonical internal source-of-truth pages.
Enforcement
Add a repo-level knowledge-base test that validates:
AGENTS.mdlinks to required internal KB docs.AGENTS.mdstays below a capped line count.- Required internal docs exist.
- Internal KB docs include the expected metadata fields.
docs-site/development.mdanddocs-site/architecture.mdpoint internal readers todocs/.AGENTS.mddoes not treatdocs-site/pages as the canonical internal source of truth.
Keep the new test outside docs-site/ so internal/public boundaries stay clear.
Migration Plan
- Write the design and implementation plan docs.
- Rewrite
AGENTS.mdas a compact map. - Create the internal KB entrypoints under
docs/. - Update
docs-site/contributor docs to referencedocs/for internal guidance. - Add a repo-level test plus package/CI wiring.
- Run docs and targeted repo verification.
Verification Strategy
Primary commands:
bun run docs:testbun run test:fastbun run docs:build
Focused review:
- read
AGENTS.mdstart-to-finish and confirm it behaves like a table of contents - inspect the new
docs/README.mdnavigation and cross-links - confirm
docs-site/still reads as user-facing documentation