Docs from code: backfill doc comments, then structure + repurpose existing docs #924

Open
opened 2026-11-04 09:57:36 +00:00 by kayg · 0 comments
Owner

kayg 2026-11-04: documentation is written in the code (doc comments: Rust //! / ///, TS/Svelte JSDoc), and the docs are generated from it instead of written after the fact. Comments don't count toward file-size limits. The structure gets decided later, and existing docs get repurposed.

Already done:

  • the hard rule is in every agent brief (BRIEF-COMMON);
  • ADR 0070 (#917) is folding in the rule ("comments are not LoC" plus doc comments on modules and public items);
  • batch 1 of the backfill is running (idle Rust crates, plus missing_docs as each crate is finished).

Scheduled here:

  1. Later backfill batches, in the order their in-flight PRs land: notes, tasks, engine/store/server, search, auth, contacts, calternal, then apps/web and packages/ui (JSDoc).
  2. Docs structure (needs kayg's input once batches 1–2 are in):
    • user docs vs developer docs;
    • generator (cargo doc + a TS doc generator, or one site combining both);
    • where ADRs, plans and docs/money/* fit.
  3. Repurpose existing docs: map docs/**, CONTEXT.md, TASTE.md and ARCHITECTURE.md into the structure; move code-level facts into doc comments; keep decisions in ADRs.
  4. CI: a doc-coverage check per crate/package (missing_docs, plus a JSDoc check for exported TS) that only tightens, never loosens.
kayg 2026-11-04: documentation is written in the code (doc comments: Rust `//!` / `///`, TS/Svelte JSDoc), and the docs are generated from it instead of written after the fact. Comments don't count toward file-size limits. The structure gets decided later, and existing docs get repurposed. **Already done:** - the hard rule is in every agent brief (BRIEF-COMMON); - ADR 0070 (#917) is folding in the rule ("comments are not LoC" plus doc comments on modules and public items); - batch 1 of the backfill is running (idle Rust crates, plus `missing_docs` as each crate is finished). **Scheduled here:** 1. Later backfill batches, in the order their in-flight PRs land: notes, tasks, engine/store/server, search, auth, contacts, calternal, then apps/web and packages/ui (JSDoc). 2. Docs structure (needs kayg's input once batches 1–2 are in): - user docs vs developer docs; - generator (`cargo doc` + a TS doc generator, or one site combining both); - where ADRs, plans and `docs/money/*` fit. 3. Repurpose existing docs: map `docs/**`, `CONTEXT.md`, `TASTE.md` and `ARCHITECTURE.md` into the structure; move code-level facts into doc comments; keep decisions in ADRs. 4. CI: a doc-coverage check per crate/package (missing_docs, plus a JSDoc check for exported TS) that only tightens, never loosens.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#924
No description provided.