docs: rewrite documentation for v2 following the Diátaxis framework
- Dominant language
- Python
- Stars
- 72
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
Rewrite **every page** of the BalatroBot documentation for **v2** (dev branch), restructured around the Diátaxis framework — How-to guides · Reference · Explanation — with a correctness-verification workflow so every claim in the docs is checked against the actual code.
## Why (current state)
- 6 hand-written Markdown pages (one 72 KB `api.md` with 89 headings), built with MkDocs + mkdocs-material, versioned with mike (`latest` = main, `dev` = dev branch, `v*` tags), `mkdocs-llmstxt` plugin, mdformat enforced in CI.
- Deployed by `.github/workflows/deploy_docs.yml` to gh-pages (versions 0.1.0 → 1.5.2 + `latest`/`dev` aliases).
- Pages mix documentation types (reference pages contain how-tos and explanations, tutorial content is buried in the API reference), and the v1-era structure no longer fits the v2 surface: 5 platforms (incl. docker), instance pool (`serve --num` / `list` / `stop`), screenshots, 24 API methods.
## Target structure (11 files)
```text
docs/
├── index.md Landing
├── how-to/ install.md · launch.md · instances.md · write-a-bot.md · contribute.md
├── reference/ cli.md (incl. configuration) · api.md
└── explanation/ architecture.md · game-state.md · runtime.md
```
## Writing style & conventions
Keep the current direct, table-driven voice, upgraded with:
1. **Quadrant-specific tone** (Diátaxis): how-to = directive/imperative; first-bot walkthrough = friendly, short sentences; reference = neutral, consistent; explanation = "About X" titles.
2. **Plain language**: define every domain term at first mention, gloss Balatro jargon (blind, game state, save vs runtime profile, consumeables…), CONTEXT.md as terminology authority.
3. **First-mention linking rule**: the first mention of a concept on a page links to that concept's own docs page (term → page map); later mentions stay plain.
## Correctness & verification
- Every page has explicit **sources of truth** (openrpc.json, types.lua, enums.lua, typer CLI, config.py, platforms).
- **Live-replay** every documented API call against a real Balatro instance — no invented JSON.
- New CI test `tests/cli/test_docs.py`: openrpc ↔ api.md, typer ↔ cli.md, config env vars ↔ cli.md, internal link checker.
## Shipping
- Docs merge into `dev` → auto-deployed to the `dev` version by `deploy_docs.yml`.
- `v2.0.0` tag creates a permanent version; when main moves to v2, `latest` flips automatically. v1.x docs stay archived on gh-pages.
## Sub-issues
- [ ] #225 — Phase 0 · Audit & scaffold (½ day) — blocked by: nothing
- [ ] #226 — Phase 1 · Reference rewrite (2–3 days) — blocked by #225
- [ ] #227 — Phase 2 · Explanation pages (1–2 days) — blocked by #226
- [ ] #228 — Phase 3 · How-to guides (2–3 days) — blocked by #226, #227
- [ ] #229 — Phase 4 · Automation & polish (1 day) — blocked by #226, #228
- [ ] #230 — Phase 5 · Ship (½ day) — blocked by #225–#229
## Definition of done
- [ ] All 11 pages rewritten and verified against their sources of truth
- [ ] Style guide enforced (first-mention links, plain language, quadrant tones)
- [ ] `tests/cli/test_docs.py` green in CI
- [ ] v2 docs live on the `dev` version of the docs site
Contributor guide
Research direction
Start with the current six Markdown pages, CONTEXT.md, and the listed sources of truth: openrpc.json, types.lua, enums.lua, typer, config.py, and platforms. Review the phase sub-issues, beginning with #225, and run the existing documentation checks before changing structure. Done means all 11 v2 pages are verified, tests/cli/test_docs.py is green, and the dev docs version is deployed by .github/workflows/deploy_docs.yml.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, markdown, python
- Domain
- ci-cd, documentation, testing
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 28/100