docs: audit and refresh user-facing and internal docs

Cross-check every config key, shortcut, default, and command against the
current source and fix the drift (mpv.socketPath, auto_start_overlay
default, AniSkip TAB key, JLPT N4 color, secondary-sub font/defaults,
secondary-sub language behavior, modular mpv plugin layout, and more).
Add plain-language intros and first-use definitions across onboarding and
integration pages so non-technical readers can follow along.

Internal docs/: fix stale module paths in architecture/domains.md, add
missing contract entry points and catalog rows, and bump verified dates.
Remove the obsolete docs/plans/ directory (its only plan shipped in
0.15.0) and reframe planning.md so plans live with the work, not in docs/.
This commit is contained in:
2026-05-23 21:21:16 -07:00
parent 4d1a20d69b
commit c02edc90cc
32 changed files with 262 additions and 381 deletions
+1 -2
View File
@@ -3,7 +3,7 @@
# SubMiner Internal Docs
Status: active
Last verified: 2026-03-13
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: you need internal architecture, workflow, verification, or release guidance
@@ -15,7 +15,6 @@ Read when: you need internal architecture, workflow, verification, or release gu
- [Workflow](./workflow/README.md) - planning, execution, verification expectations
- [Knowledge Base](./knowledge-base/README.md) - how docs are structured, maintained, and audited
- [Release Guide](./RELEASING.md) - tagged release checklist
- [Plans](./plans/) - active design and implementation artifacts
## Fast Paths
+1 -1
View File
@@ -3,7 +3,7 @@
# Architecture Map
Status: active
Last verified: 2026-03-26
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: runtime ownership, composition boundaries, or layering questions
+4 -2
View File
@@ -3,7 +3,7 @@
# Domain Ownership
Status: active
Last verified: 2026-03-26
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: you need to find the owner module for a behavior or test surface
@@ -19,7 +19,7 @@ Read when: you need to find the owner module for a behavior or test surface
- Config system: `src/config/`
- Overlay/window state: `src/core/services/overlay-*`, `src/main/overlay-*.ts`
- MPV runtime and protocol: `src/core/services/mpv*.ts`
- Subtitle/token pipeline: `src/core/services/tokenizer*`, `src/subtitle/`, `src/tokenizers/`
- Subtitle/token pipeline: `src/core/services/subtitle-*.ts`, `src/core/services/tokenizer*`, `src/core/services/tokenizer/`, `src/subsync/`
- Anki workflow: `src/anki-integration/`, `src/core/services/anki-jimaku*.ts`
- Immersion tracking: `src/core/services/immersion-tracker/`
Includes stats storage/query schema such as `imm_videos`, `imm_media_art`, and `imm_youtube_videos` for per-video and YouTube-specific library metadata.
@@ -37,6 +37,8 @@ Read when: you need to find the owner module for a behavior or test surface
- Anki-specific contracts: `src/types/anki.ts`
- External integration contracts: `src/types/integrations.ts`
- Runtime-option contracts: `src/types/runtime-options.ts`
- Settings UI contracts: `src/types/settings.ts`
- Session-binding contracts: `src/types/session-bindings.ts`
- Compatibility-only barrel: `src/types.ts`
## Ownership Heuristics
+1 -1
View File
@@ -3,7 +3,7 @@
# Layering Rules
Status: active
Last verified: 2026-03-13
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: deciding whether a dependency direction is acceptable
+1 -1
View File
@@ -3,7 +3,7 @@
# Knowledge Base Rules
Status: active
Last verified: 2026-03-13
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: maintaining the internal doc system itself
+11 -11
View File
@@ -3,24 +3,24 @@
# Documentation Catalog
Status: active
Last verified: 2026-03-13
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: finding internal docs or checking verification status
| Area | Path | Status | Last verified | Notes |
| --- | --- | --- | --- | --- |
| KB home | `docs/README.md` | active | 2026-03-13 | internal entrypoint |
| Architecture index | `docs/architecture/README.md` | active | 2026-03-13 | top-level runtime map |
| Domain ownership | `docs/architecture/domains.md` | active | 2026-03-13 | runtime and feature ownership |
| Layering rules | `docs/architecture/layering.md` | active | 2026-03-13 | dependency direction and smells |
| KB rules | `docs/knowledge-base/README.md` | active | 2026-03-13 | maintenance policy |
| KB home | `docs/README.md` | active | 2026-05-23 | internal entrypoint |
| Architecture index | `docs/architecture/README.md` | active | 2026-05-23 | top-level runtime map |
| Domain ownership | `docs/architecture/domains.md` | active | 2026-05-23 | runtime and feature ownership |
| Layering rules | `docs/architecture/layering.md` | active | 2026-05-23 | dependency direction and smells |
| KB rules | `docs/knowledge-base/README.md` | active | 2026-05-23 | maintenance policy |
| Core beliefs | `docs/knowledge-base/core-beliefs.md` | active | 2026-03-13 | agent-first principles |
| Quality scorecard | `docs/knowledge-base/quality.md` | active | 2026-03-13 | quality grades and gaps |
| Workflow index | `docs/workflow/README.md` | active | 2026-03-13 | execution map |
| Planning guide | `docs/workflow/planning.md` | active | 2026-03-13 | lightweight vs execution plans |
| Verification guide | `docs/workflow/verification.md` | active | 2026-03-13 | maintained verification lanes |
| Release guide | `docs/RELEASING.md` | active | 2026-03-13 | release checklist |
| Active plans | `docs/plans/` | active | 2026-03-13 | task-scoped design and implementation artifacts |
| Workflow index | `docs/workflow/README.md` | active | 2026-05-23 | execution map |
| Planning guide | `docs/workflow/planning.md` | active | 2026-05-23 | lightweight vs execution plans |
| Agent plugins | `docs/workflow/agent-plugins.md` | active | 2026-05-23 | repo-local agent workflow plugin ownership |
| Verification guide | `docs/workflow/verification.md` | active | 2026-05-23 | maintained verification lanes |
| Release guide | `docs/RELEASING.md` | active | 2026-05-23 | release checklist |
## Update Rules
-1
View File
@@ -37,4 +37,3 @@ Grades are directional, not ceremonial. The point is to keep gaps visible.
- Some deep architecture detail still lives in `docs-site/architecture.md` and may merit later migration.
- Quality grading is manual and should be refreshed when major refactors land.
- Active plans can accumulate without lifecycle cleanup if humans do not prune them.
-70
View File
@@ -1,70 +0,0 @@
# Config Settings Window
read_when: changing config UI, config save behavior, or config docs
## Intent
Add a dedicated Electron settings window for editing canonical config values without exposing the historical layout mistakes in `config.jsonc`.
The UI groups options by workflow:
- Viewing
- Mining & Anki
- Playback & Sources
- Input
- Integrations
- Tracking & App
- Advanced
Each field maps back to its current raw config path. The presentation layer must stay separate from generated config-template sections.
## Sources
- Canonical defaults: `DEFAULT_CONFIG`
- Existing option descriptions/enums: `CONFIG_OPTION_REGISTRY`
- UI registry: `src/config/settings/registry.ts`
- JSONC save path: `src/config/settings/jsonc-edit.ts`
- Window runtime: `src/main/runtime/config-settings-window.ts`
## Save Contract
Settings writes use `jsonc-parser.modify`, not `JSON.stringify`.
Required behavior:
- Preserve comments, trailing commas, unrelated keys, and hidden legacy keys.
- Reset removes the explicit path so defaults resolve normally.
- Validate the candidate config before writing.
- Reject warnings caused by modified fields.
- Preserve unrelated existing warnings and return them in the snapshot.
- Write atomically, reload `ConfigService`, classify with existing hot-reload logic, and apply live changes where supported.
- Never return secret values to the renderer; snapshots only expose configured/not-configured state.
## Hidden Compatibility Keys
Do not expose these as first-class controls:
- `ankiConnect.deck`
- Legacy top-level Anki migration fields such as `wordField`, `audioField`, media-generation aliases, and behavior aliases
- Legacy `ankiConnect.nPlusOne.*` aliases except canonical `nPlusOne.nPlusOne` and `nPlusOne.minSentenceWords`
- Deprecated Lapis sentence-card fields
- `youtubeSubgen.primarySubLanguages`
- `anilist.characterDictionary.refreshTtlHours`
- `anilist.characterDictionary.evictionPolicy`
- `jellyfin.accessToken`
- `jellyfin.userId`
- `controller.buttonIndices` as a normal editable field
## Verification
Minimum targeted checks:
- `bun test src/config/settings/registry.test.ts src/config/settings/jsonc-edit.test.ts src/settings/settings-model.test.ts src/main/runtime/config-settings-window.test.ts`
- `bun run test:config`
- `bun run typecheck`
- `bun run build`
If docs changed:
- `bun run docs:test`
- `bun run docs:build`
+1 -1
View File
@@ -3,7 +3,7 @@
# Workflow
Status: active
Last verified: 2026-03-13
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: planning or executing nontrivial work in this repo
+1 -1
View File
@@ -3,7 +3,7 @@
# Agent Plugins
Status: active
Last verified: 2026-03-26
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: packaging or migrating repo-local agent workflow skills into plugins
+4 -4
View File
@@ -3,7 +3,7 @@
# Planning
Status: active
Last verified: 2026-03-13
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: the task spans multiple files, subsystems, or verification lanes
@@ -28,9 +28,9 @@ Read when: the task spans multiple files, subsystems, or verification lanes
## Plan Location
- active design and implementation docs live in `docs/plans/`
- keep names date-prefixed and task-specific
- remove or archive old plans deliberately; do not leave mystery artifacts
- plans are task-scoped scratch artifacts; keep them with the work (worktree, branch, or PR description), not committed under `docs/`
- if a plan must be shared, keep names date-prefixed and task-specific
- delete plans once the work lands; do not leave mystery artifacts behind
## Plan Contents
+1 -1
View File
@@ -3,7 +3,7 @@
# Verification
Status: active
Last verified: 2026-03-13
Last verified: 2026-05-23
Owner: Kyle Yasuda
Read when: selecting the right verification lane for a change