Refactor lapis.md API docs generation to be on-demand and non-destructive #169
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#169
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refactor the lapis.md TypeDoc pipeline so committed API reference pages remain durable site content, regeneration happens only when explicitly requested, and validation checks drift without mutating tracked files.
Problem
The lapis.md package currently runs API-doc generation automatically in
dev,build, andastro check. The generator deletes the publishedsrc/content/docs/developers/api-reference/tree up front, rebuilds into a temp location, and then copies results back. That is heavier than necessary for normal site work and makes the published docs tree vulnerable to deletion when generation fails mid-run.Goal
Make API-doc regeneration explicit, keep generated docs checked into the repo, preserve the published docs tree on failures, and add a non-mutating freshness check for package validation and CI.
Scope
@lapis-notes/lapis.mdscripts so onlyapi-docs:generatemutates tracked API docs.Non-goals
dev,build, orcheck.Acceptance Criteria
pnpm --filter @lapis-notes/lapis.md api-docs:generateis the only command that rewritessrc/content/docs/developers/api-reference/.dev,build, andcheck:astrodo not regenerate tracked API docs implicitly.api-docs:checkcommand fails when committed docs drift from the generated output and passes when they match.Implementation Notes
Prefer a shared implementation that:
Suggested Files or Specs To Inspect
packages/lapis.md/package.jsonpackages/lapis.md/scripts/postprocess-api-docs.mjspackages/lapis.md/typedoc.jsonpackages/lapis.md/spec.mdspec/src/20-packages/lapis.md/index.mdturbo.jsonValidation Commands
pnpm --filter @lapis-notes/lapis.md check:allpnpm --filter @lapis-notes/lapis.md testmake spec-lintmdbook build specRelated Issues
#94Capture live app screenshots for public docsFollow-up Tasks
#147separately;backlog:newrequired--forceto create this issue.Implementation Summary
Made lapis.md API docs generation explicit, non-destructive, drift-checked, and covered by package-local tests and spec updates.