Documentation Maintenance
This documentation site is maintained with automated tools to keep docs synchronized with the codebase.
Frontmatter Schema
Every doc page must have frontmatter following this schema:
---
id: unique-slug
title: "Page Title"
kind: spec|infra|conformance|guide|reference|meta
version: "1.2.3"
last_updated: "2026-04-28"
last_verified: "2026-04-28"
review_cadence_days: 30
status: stable
tags: [tag1, tag2]
---Required Fields
| Field | Type | Example | Purpose |
|---|---|---|---|
id | string | spec-brc-100 | Unique slug for page |
title | string | "BRC-100 Wallet" | Page title |
kind | enum | spec | Page category |
version | string | "1.2.3" | Latest tested version |
last_updated | date | 2026-04-28 | When content was written |
last_verified | date | 2026-04-28 | When last tested |
review_cadence_days | number | 30 | Days until next review |
status | enum | stable | Stability status |
tags | array | [wallet, brc-100] | Keywords |
Kind Values
- spec — Protocol specification
- infra — Infrastructure service
- conformance — Test vectors/runners
- guide — How-to guide
- reference — API reference
- meta — About, versioning, etc.
Status Values
- stable — Production ready
- beta — Feature complete, testing
- deprecated — Marked for removal
- experimental — Unstable, may change
Version Management
The version field tracks the latest tested version of what the page documents:
# For package docs
version: "1.2.3" # Latest tested npm version
# For spec docs
version: "2.0" # Spec version
# For meta pages
version: "1.0.0" # Documentation versionVersion Checking
Automated tools check if docs match the current npm version:
# Check workspace cross-package versions
pnpm check-versions
# Rewrite workspace dependency references to current package versions
pnpm sync-versions
# Validate docs frontmatter and relative links
pnpm --filter docs-site validateReview Cadence
The review_cadence_days field indicates how often a page should be reviewed:
review_cadence_days: 30 # Review monthlySuggested cadences:
- 7 days — Actively maintained features, new packages
- 14 days — Frequently changed APIs
- 30 days — Stable packages, specs
- 90 days — Rarely changed (versioning, about pages)
Staleness Calculation
A page becomes stale after:
stale_date = last_verified + review_cadence_days
Example:
last_verified: "2026-04-28"
review_cadence_days: 30
stale_date: "2026-05-28"
Automated agents flag stale pages and create issues/PRs to update them.
Maintenance Tasks
Update Package Version
When a package releases a new version:
pnpm sync-versions
pnpm check-versionsThis updates workspace package references and verifies they match the current package versions.
Verify Documentation
Check that examples work and links are correct:
pnpm --filter docs-site validate
pnpm docs:build
# Build only the documentation site
pnpm --filter docs-site buildChecks:
- All links are valid (HTTP 200)
- Code examples syntactically correct
- Version matches npm
- Required frontmatter present
Extract API Docs
For package documentation, extract TypeDoc:
pnpm --filter @bsv/sdk doc
# Package API docs are then consumed by the docs site build
pnpm docs:buildAutomated Maintenance
Scheduled Review
Automated agents check stale docs daily:
- Find pages where
last_verified + review_cadence_days < today - Create issue requesting verification
- If version mismatch found, create PR with updates
- Update
last_verifieddate after verification
GitHub Actions & Validation (Current State)
Frontmatter and link validation run automatically as part of the docs site build:
- Local author command:
pnpm --filter docs-site validate(runsvalidate-frontmatter.mjs+check-links.mjs) - Full build (includes the above + built-link hygiene + pagefind):
pnpm docs:build - Production deployment:
.github/workflows/docs-deploy.ymlrunspnpm docs:buildon every push tomainthat touchesdocs/**,docs-site/**,specs/**, or the deploy workflow itself.
A dedicated scheduled "docs-check" workflow (staleness flagging + PR validation on docs changes) is planned but not yet present. Until then, contributors should run pnpm --filter docs-site validate locally before opening docs PRs (this is also what the build does).
See also:
docs-site/scripts/validate-frontmatter.mjs+docs/_schemas/page.schema.jsondocs-site/scripts/check-links.mjsandcheck-built-links.mjs.github/workflows/docs-deploy.yml(the actual deploy pipeline)
Contributing Documentation
Edit a Doc Page
- Find the file in
/docs - Edit the content (below frontmatter)
- Update
last_updatedto today - If you verified the content, update
last_verified - Commit and create PR
Example:
---
id: spec-brc-100
title: "BRC-100 Wallet Interface"
kind: spec
version: "1.0"
last_updated: "2026-04-28" # ← Update to today
last_verified: "2026-04-28" # ← Update if you tested
review_cadence_days: 30
status: stable
tags: [wallet, brc-100]
---
# BRC-100 Wallet Interface
[Your content here]Create a New Page
- Create file in appropriate directory (
docs/specs/,docs/guides/, etc.) - Add required frontmatter
- Write content
- Run
pnpm --filter docs-site validate(andpnpm docs:buildfor the full check) to validate - Commit and create PR
Template:
---
id: unique-identifier
title: "Page Title"
kind: spec
version: "1.0.0"
last_updated: "2026-04-28"
last_verified: "2026-04-28"
review_cadence_days: 30
status: stable
tags: [tag1, tag2]
---
# Page Title
[Content]Frontmatter Validation
All pages are validated on commit:
# Validate frontmatter and relative links
pnpm --filter docs-site validate
# Build static docs and check built links
pnpm docs:buildChecks:
- Required fields present
- Valid enum values (kind, status)
- Date format (ISO 8601)
- ID is unique
- Version format is valid
Examples
Spec Page
---
id: spec-brc-100
title: "BRC-100 Wallet Interface"
kind: spec
version: "1.0"
last_updated: "2026-04-28"
last_verified: "2026-04-28"
review_cadence_days: 30
status: stable
tags: [wallet, brc-100, rpc]
---Package Page
---
id: pkg-sdk
title: "@bsv/sdk"
kind: reference
version: "1.2.3"
last_updated: "2026-04-28"
last_verified: "2026-04-28"
review_cadence_days: 14
status: stable
tags: [sdk, bitcoin, crypto]
---Guide Page
---
id: guide-wallet-aware
title: "Build a Wallet-Aware App"
kind: guide
version: "1.0.0"
last_updated: "2026-04-28"
last_verified: "2026-04-28"
review_cadence_days: 30
status: stable
tags: [guide, wallet, tutorial]
---Next Steps
- Contributing Guide — Source code contributions
- Versioning Policy — Version management
- GitHub Releases — See all updates