Skip to content

docs: add DB schema reference documentation - #162

Merged
kthoms merged 17 commits into
mainfrom
db-schema
Nov 12, 2026
Merged

kthoms merged 17 commits into
mainfrom
db-schema

Conversation

@kthoms

@kthoms kthoms commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Adds a chapter "DB schema" as reference documentation with detailed description of each domain and table.

Screenshot 59 Screenshot 58

Copilot AI review requested due to automatic review settings July 6, 2026 20:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new “Database Schema Reference” documentation set for Operaton schema v7.24 (including an ER diagram source and per-domain reference pages), and adds supporting Mermaid rendering tooling/scripts plus related “superpowers” design/plan documents.

Changes:

  • Added DB schema reference docs under docs/documentation/reference/db-schema/ (index + domain pages) and an ER diagram source (schema.mermaid).
  • Added Mermaid initialization scripts and Mermaid-related dependencies intended to enable Mermaid rendering in Docusaurus.
  • Added/updated “superpowers” specs and implementation plans for DB schema reference docs and automated version updates.

Reviewed changes

Copilot reviewed 17 out of 22 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
static/mermaid-init.js Adds a client-side script to convert language-mermaid code blocks into rendered Mermaid diagrams.
src/mermaid-loader.js Adds a client-side Mermaid initializer/re-initializer intended for SPA navigation.
package.json Adds Mermaid + Docusaurus Mermaid theme dependencies.
docusaurus.config.ts Minor formatting changes; relevant location to wire Mermaid theme/loading.
docs/superpowers/specs/2026-06-09-db-schema-reference-design.md Adds an approved design spec for modular DB schema reference docs.
docs/superpowers/specs/2026-05-29-automated-version-updates-design.md Adds an approved design spec for automated doc version updates.
docs/superpowers/plans/2026-06-09-db-schema-reference-implementation.md Adds a detailed implementation plan for the DB schema reference docs.
docs/superpowers/plans/2026-05-29-automated-version-updates.md Adds a detailed implementation plan for automated version updates.
docs/documentation/reference/db-schema/schema.mermaid Adds the Mermaid ER diagram source for the schema.
docs/documentation/reference/db-schema/index.md Adds the DB schema reference landing page, quick reference, and diagram link.
docs/documentation/reference/db-schema/general.md Adds documentation for ACT_GE_* tables.
docs/documentation/reference/db-schema/repository.md Adds documentation for ACT_RE_* tables.
docs/documentation/reference/db-schema/runtime.md Adds documentation for ACT_RU_* tables, indexes, and example queries.
docs/documentation/reference/db-schema/history.md Adds documentation for ACT_HI_* tables.
docs/documentation/reference/db-schema/identity.md Adds documentation for ACT_ID_* tables.
.devenv/scripts/schema-theme.css Adds CSS to theme the rendered Mermaid ER diagram by domain.
.devenv/scripts/render-schema.sh Adds a helper script to render schema.mermaid to SVG/PNG using npx mermaid-cli.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mermaid-loader.js Resolved
Comment thread src/mermaid-loader.js Resolved
Comment thread static/mermaid-init.js Resolved
Comment thread static/mermaid-init.js Resolved
Comment thread package.json Resolved
kthoms and others added 12 commits November 11, 2026 09:55
Replace mmdc Mermaid renderer with Graphviz pipeline:
- Add mermaid-to-dot.py: converts schema.mermaid to schema.dot
- schema.dot: subgraph cluster per domain (GE/RE/RU/HI/ID) with dotted
  color-coded borders, splines=ortho for rectangular edge routing,
  HTML-table entity nodes with PK/FK badges, self-referential edges dashed
- Update render-schema.sh: python3 → mermaid-to-dot.py → dot → SVG/PNG
- Regenerate schema.svg (582 KB vs 2 MB with mmdc)

schema.mermaid is kept unchanged for GitHub inline preview.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Byte-level SVG surgery on the 7.22 diagrams proved impractical (glyphs
are Inkscape vector paths with no shared IDs or font metadata across
files). Switched to regenerating diagrams from schema.mermaid via
mermaid-cli, verified end-to-end during planning.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
kthoms and others added 5 commits November 11, 2026 15:38
- Remove unused Mermaid runtime wiring (src/mermaid-loader.js,
  static/mermaid-init.js, mermaid and @docusaurus/theme-mermaid deps).
  ER diagrams are pre-rendered SVGs; no page uses mermaid fences.
- Revert whitespace-only changes to docusaurus.config.ts
- Untrack committed __pycache__ files (already gitignored)
- Fix malformed heading and stray line in version-update design spec
- Replace machine-local absolute paths in plans with variables

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/ is gitignored; files were committed by accident.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kthoms
kthoms merged commit b0865b4 into main Nov 12, 2026
3 checks passed
@kthoms
kthoms deleted the db-schema branch November 12, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants