Maintenance Guide¶
Purpose¶
Use this guide when a change affects user-facing behavior, exported symbols, sync semantics, or platform behavior and you need to know which docs and JSDoc must change with it.
Documentation ownership rules¶
README.mdis the entry point, not the full manual.docs/development.mdowns contributor setup and local workflow.docs/architecture.mdowns system structure, flow, and security boundaries.docs/command-reference.mdowns command contracts and support-state notes.docs/troubleshooting.mdowns failure cases and next diagnostic steps.- This page owns upkeep rules and review checkpoints.
- The released CLI routing surface spans
README.md,docs/command-reference.md,docs/development.md,docs/maintenance.md, anddocs/troubleshooting.md; when one of those pages changes the released-versus-source boundary, review all five for consistency.
Release workflow ownership rules¶
- The GitHub Release record created by release-please is the canonical release-information surface.
- The npm publish path must use GitHub OIDC trusted publishing only.
- Long-lived npm write tokens are not a supported normal-release credential model for this repo.
- User-facing documentation must not present
bunxinstallation as supported until release validation succeeds for that workflow. - When the released CLI path changes,
README.md,docs/command-reference.md,docs/development.md,docs/maintenance.md, anddocs/troubleshooting.mdmust stay aligned on installation, usage, when-to-use guidance, and the GitHub Releases source of truth.
Publish workflow checklist¶
Before merging a release-surface change, verify:
.nvmrc,package.jsonVolta pin, and workflow Node version expectations still align..github/workflows/release-please.ymlgrantsid-token: writeandcontents: readto the publish job.- The publish job upgrades npm to
11.5.1or later when required. - No step relies on
NPM_TOKEN,NODE_AUTH_TOKEN, or equivalent long-lived npm publish secrets. README.mdanddocs/command-reference.mdpoint users to the GitHub Release record for version and change information.bun run build:package,bun run pack:dry-run, andbun run checkall pass.
When docs must be updated¶
Update repository docs in the same change when you:
- add or remove a CLI command or subcommand
- change required inputs, defaults, or outcomes for an existing workflow
- change how the released CLI is installed or how release notes are surfaced
- alter agent support, path resolution, daemon behavior, or vault semantics
- introduce a new platform-specific caveat
- change secret-handling or recipient expectations
- add or change a workflow, architecture, lifecycle, or interaction explanation that is materially clearer as a Mermaid diagram than as prose alone
JSDoc expectations¶
- All exported functions, classes, interfaces, and types in production source need concise JSDoc.
- Maintained internal production helpers should also have JSDoc when they carry workflow or safety meaning.
- Prefer one summary sentence and one short rationale or constraint sentence when needed.
- Use
@param,@returns, and@throwswhen they add signal rather than noise. - Treat stale JSDoc as a defect, not as optional cleanup.
Mermaid expectations¶
- Use Mermaid in repository-hosted docs when it makes a workflow, structure, lifecycle, or interaction easier to understand than prose alone.
- Do not add decorative diagrams that repeat surrounding text without improving clarity.
- Keep diagram labels self-explanatory so the chart is still useful when skimmed quickly.
- Validate every new or changed Mermaid diagram before merge.
Documentation-only feature exception¶
- A feature may skip automated test-case additions only when every changed file is limited to repository-hosted documentation or feature-planning artifacts and the change does not alter runtime source files, exported symbols, configuration schemas, packaging logic, CI automation, or generated workflow scripts.
- Documentation-only features still need
bun run checkbefore merge. - Documentation-only features still need Mermaid validation for every new or changed diagram.
- Documentation-only features still need manual walkthrough validation steps recorded in the relevant spec, plan, or quickstart artifact.
Review checklist¶
Before merging, verify:
- README still routes readers to the right guide within one screenful.
- Command changes are reflected in
docs/command-reference.md. - Setup or recovery changes are reflected in
docs/development.mdordocs/troubleshooting.md. - Architecture-sensitive changes are reflected in
docs/architecture.md. - Exported production symbols changed by the PR have updated JSDoc.
- Any required Mermaid diagrams were added or updated and validated successfully.
- Documentation-only PRs that skip automated test additions record why the exception applies and include manual walkthrough validation steps.
- Support-state wording is explicit where behavior is partial, planned, or unsupported.
README.mdanddocs/command-reference.mdstill point to the canonical GitHub Release record for release notes.bun run checkstill passes.README.md,docs/command-reference.md,docs/development.md,docs/maintenance.md, anddocs/troubleshooting.mdstill agree on when to use the released CLI path versus contributor-from-source commands.
Terminology guardrails¶
- Use vault for the encrypted Git repository, not “backup folder” or “storage layer.”
- Use snapshot for reading local state into artifacts.
- Use apply for writing decrypted vault state onto the machine.
- Use recipient for an age public key that can decrypt the vault.
- Use daemon for the background auto-sync process.
Scope boundary for JSDoc work¶
- Production modules under
src/are in scope. - Files under
src/**/__tests__/are not the primary documentation target for this feature. - Maintained support code under
src/test-helpers/stays in scope when it is part of the supported development surface.