<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>pgdesign Documentation</title>
  <link href="https://smmh.dev/pgdesign/feed.xml" rel="self"/>
  <link href="https://smmh.dev/pgdesign/"/>
  <id>https://smmh.dev/pgdesign/</id>
  <updated>2026-08-12T00:00:00Z</updated>
  <entry>
    <title>Architecture: The Laws</title>
    <link href="https://smmh.dev/pgdesign/architecture-laws/"/>
    <id>https://smmh.dev/pgdesign/architecture-laws/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>pgdesign rests on a small algebra — a content-addressed object model wrapped around a category of schema migrations, governed by one equivalence relation. Every defect class the system guards against is a violation of one of the laws below, so those defect classes are eliminated by construction rather than case-by-case. Any future proposal is judged the same way: which law does it implement, check, or violate?</summary>
  </entry>
  <entry>
    <title>pgdesign build</title>
    <link href="https://smmh.dev/pgdesign/cli-build/"/>
    <id>https://smmh.dev/pgdesign/cli-build/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign check</title>
    <link href="https://smmh.dev/pgdesign/cli-check/"/>
    <id>https://smmh.dev/pgdesign/cli-check/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign codegen</title>
    <link href="https://smmh.dev/pgdesign/cli-codegen/"/>
    <id>https://smmh.dev/pgdesign/cli-codegen/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign diff</title>
    <link href="https://smmh.dev/pgdesign/cli-diff/"/>
    <id>https://smmh.dev/pgdesign/cli-diff/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign fmt</title>
    <link href="https://smmh.dev/pgdesign/cli-fmt/"/>
    <id>https://smmh.dev/pgdesign/cli-fmt/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign generate</title>
    <link href="https://smmh.dev/pgdesign/cli-generate/"/>
    <id>https://smmh.dev/pgdesign/cli-generate/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign import</title>
    <link href="https://smmh.dev/pgdesign/cli-import/"/>
    <id>https://smmh.dev/pgdesign/cli-import/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign CLI Reference</title>
    <link href="https://smmh.dev/pgdesign/cli-index/"/>
    <id>https://smmh.dev/pgdesign/cli-index/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign introspect</title>
    <link href="https://smmh.dev/pgdesign/cli-introspect/"/>
    <id>https://smmh.dev/pgdesign/cli-introspect/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign migrate</title>
    <link href="https://smmh.dev/pgdesign/cli-migrate/"/>
    <id>https://smmh.dev/pgdesign/cli-migrate/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign revise</title>
    <link href="https://smmh.dev/pgdesign/cli-revise/"/>
    <id>https://smmh.dev/pgdesign/cli-revise/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign seed</title>
    <link href="https://smmh.dev/pgdesign/cli-seed/"/>
    <id>https://smmh.dev/pgdesign/cli-seed/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign serve</title>
    <link href="https://smmh.dev/pgdesign/cli-serve/"/>
    <id>https://smmh.dev/pgdesign/cli-serve/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign stats</title>
    <link href="https://smmh.dev/pgdesign/cli-stats/"/>
    <id>https://smmh.dev/pgdesign/cli-stats/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>pgdesign testdb</title>
    <link href="https://smmh.dev/pgdesign/cli-testdb/"/>
    <id>https://smmh.dev/pgdesign/cli-testdb/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen (strictcli), do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>Format Reference</title>
    <link href="https://smmh.dev/pgdesign/format-reference/"/>
    <id>https://smmh.dev/pgdesign/format-reference/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>pgdesign schemas are written in TOML. A schema file defines metadata, custom types, and table definitions.</summary>
  </entry>
  <entry>
    <title>API Reference</title>
    <link href="https://smmh.dev/pgdesign/gen-index/"/>
    <id>https://smmh.dev/pgdesign/gen-index/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>Cross-Repository Imports</title>
    <link href="https://smmh.dev/pgdesign/imports/"/>
    <id>https://smmh.dev/pgdesign/imports/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>Imports let one pgdesign project reference tables owned by *another* pgdesign project — a shared &quot;framework&quot; schema, a platform team's user table, a billing service's accounts — across a git dependency, without copying the definitions by hand or coupling the two repositories at build time.</summary>
  </entry>
  <entry>
    <title>pgdesign</title>
    <link href="https://smmh.dev/pgdesign/"/>
    <id>https://smmh.dev/pgdesign/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>A PostgreSQL schema compiler. You declare your database in TOML; pgdesign compiles it to SQL DDL and enforces database design principles on the way.</summary>
  </entry>
  <entry>
    <title>internal/audit</title>
    <link href="https://smmh.dev/pgdesign/internal-audit/"/>
    <id>https://smmh.dev/pgdesign/internal-audit/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/catalog</title>
    <link href="https://smmh.dev/pgdesign/internal-catalog/"/>
    <id>https://smmh.dev/pgdesign/internal-catalog/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/chain</title>
    <link href="https://smmh.dev/pgdesign/internal-chain/"/>
    <id>https://smmh.dev/pgdesign/internal-chain/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/codegen</title>
    <link href="https://smmh.dev/pgdesign/internal-codegen/"/>
    <id>https://smmh.dev/pgdesign/internal-codegen/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/config</title>
    <link href="https://smmh.dev/pgdesign/internal-config/"/>
    <id>https://smmh.dev/pgdesign/internal-config/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/dbutil</title>
    <link href="https://smmh.dev/pgdesign/internal-dbutil/"/>
    <id>https://smmh.dev/pgdesign/internal-dbutil/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/diagnostic</title>
    <link href="https://smmh.dev/pgdesign/internal-diagnostic/"/>
    <id>https://smmh.dev/pgdesign/internal-diagnostic/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/diff</title>
    <link href="https://smmh.dev/pgdesign/internal-diff/"/>
    <id>https://smmh.dev/pgdesign/internal-diff/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/discover</title>
    <link href="https://smmh.dev/pgdesign/internal-discover/"/>
    <id>https://smmh.dev/pgdesign/internal-discover/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/enc</title>
    <link href="https://smmh.dev/pgdesign/internal-enc/"/>
    <id>https://smmh.dev/pgdesign/internal-enc/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/extregistry</title>
    <link href="https://smmh.dev/pgdesign/internal-extregistry/"/>
    <id>https://smmh.dev/pgdesign/internal-extregistry/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/fd</title>
    <link href="https://smmh.dev/pgdesign/internal-fd/"/>
    <id>https://smmh.dev/pgdesign/internal-fd/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/format</title>
    <link href="https://smmh.dev/pgdesign/internal-format/"/>
    <id>https://smmh.dev/pgdesign/internal-format/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/generate</title>
    <link href="https://smmh.dev/pgdesign/internal-generate/"/>
    <id>https://smmh.dev/pgdesign/internal-generate/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/graph</title>
    <link href="https://smmh.dev/pgdesign/internal-graph/"/>
    <id>https://smmh.dev/pgdesign/internal-graph/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/imports</title>
    <link href="https://smmh.dev/pgdesign/internal-imports/"/>
    <id>https://smmh.dev/pgdesign/internal-imports/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/introspect</title>
    <link href="https://smmh.dev/pgdesign/internal-introspect/"/>
    <id>https://smmh.dev/pgdesign/internal-introspect/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/livenorm</title>
    <link href="https://smmh.dev/pgdesign/internal-livenorm/"/>
    <id>https://smmh.dev/pgdesign/internal-livenorm/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/livestats</title>
    <link href="https://smmh.dev/pgdesign/internal-livestats/"/>
    <id>https://smmh.dev/pgdesign/internal-livestats/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/migrate/design</title>
    <link href="https://smmh.dev/pgdesign/internal-migrate-design/"/>
    <id>https://smmh.dev/pgdesign/internal-migrate-design/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/migrate</title>
    <link href="https://smmh.dev/pgdesign/internal-migrate/"/>
    <id>https://smmh.dev/pgdesign/internal-migrate/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/model</title>
    <link href="https://smmh.dev/pgdesign/internal-model/"/>
    <id>https://smmh.dev/pgdesign/internal-model/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/modelgen</title>
    <link href="https://smmh.dev/pgdesign/internal-modelgen/"/>
    <id>https://smmh.dev/pgdesign/internal-modelgen/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/objstore</title>
    <link href="https://smmh.dev/pgdesign/internal-objstore/"/>
    <id>https://smmh.dev/pgdesign/internal-objstore/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/parse/pgschema</title>
    <link href="https://smmh.dev/pgdesign/internal-parse-pgschema/"/>
    <id>https://smmh.dev/pgdesign/internal-parse-pgschema/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/parse</title>
    <link href="https://smmh.dev/pgdesign/internal-parse/"/>
    <id>https://smmh.dev/pgdesign/internal-parse/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/predicate</title>
    <link href="https://smmh.dev/pgdesign/internal-predicate/"/>
    <id>https://smmh.dev/pgdesign/internal-predicate/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/project</title>
    <link href="https://smmh.dev/pgdesign/internal-project/"/>
    <id>https://smmh.dev/pgdesign/internal-project/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/rev</title>
    <link href="https://smmh.dev/pgdesign/internal-rev/"/>
    <id>https://smmh.dev/pgdesign/internal-rev/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/risk</title>
    <link href="https://smmh.dev/pgdesign/internal-risk/"/>
    <id>https://smmh.dev/pgdesign/internal-risk/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/seed</title>
    <link href="https://smmh.dev/pgdesign/internal-seed/"/>
    <id>https://smmh.dev/pgdesign/internal-seed/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/semtype</title>
    <link href="https://smmh.dev/pgdesign/internal-semtype/"/>
    <id>https://smmh.dev/pgdesign/internal-semtype/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/serve</title>
    <link href="https://smmh.dev/pgdesign/internal-serve/"/>
    <id>https://smmh.dev/pgdesign/internal-serve/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/splitfmt</title>
    <link href="https://smmh.dev/pgdesign/internal-splitfmt/"/>
    <id>https://smmh.dev/pgdesign/internal-splitfmt/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/sql</title>
    <link href="https://smmh.dev/pgdesign/internal-sql/"/>
    <id>https://smmh.dev/pgdesign/internal-sql/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/sqlexpr</title>
    <link href="https://smmh.dev/pgdesign/internal-sqlexpr/"/>
    <id>https://smmh.dev/pgdesign/internal-sqlexpr/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/sqlparse</title>
    <link href="https://smmh.dev/pgdesign/internal-sqlparse/"/>
    <id>https://smmh.dev/pgdesign/internal-sqlparse/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/sqlutil</title>
    <link href="https://smmh.dev/pgdesign/internal-sqlutil/"/>
    <id>https://smmh.dev/pgdesign/internal-sqlutil/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/testdb</title>
    <link href="https://smmh.dev/pgdesign/internal-testdb/"/>
    <id>https://smmh.dev/pgdesign/internal-testdb/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/typeinfo</title>
    <link href="https://smmh.dev/pgdesign/internal-typeinfo/"/>
    <id>https://smmh.dev/pgdesign/internal-typeinfo/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/validate</title>
    <link href="https://smmh.dev/pgdesign/internal-validate/"/>
    <id>https://smmh.dev/pgdesign/internal-validate/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>internal/workload</title>
    <link href="https://smmh.dev/pgdesign/internal-workload/"/>
    <id>https://smmh.dev/pgdesign/internal-workload/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>&lt;!-- generated by selfdoc gen, do not edit --&gt;</summary>
  </entry>
  <entry>
    <title>The Migration Chain</title>
    <link href="https://smmh.dev/pgdesign/migration-chain/"/>
    <id>https://smmh.dev/pgdesign/migration-chain/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>This page explains the *concepts* behind pgdesign's migration system — what a revision is, what an edge is, and why the design gives you integrity guarantees that file-numbered migration tools cannot. For the command-by-command how-to (generate, apply, rollback, squash, rebase, upgrade, baseline), see the [Migration Guide](migration-guide.md).</summary>
  </entry>
  <entry>
    <title>Quickstart</title>
    <link href="https://smmh.dev/pgdesign/quickstart/"/>
    <id>https://smmh.dev/pgdesign/quickstart/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>pgdesign is a PostgreSQL schema compiler. You define your database schema in TOML, and pgdesign compiles it to SQL DDL with strict enforcement of database design principles.</summary>
  </entry>
  <entry>
    <title>Validation Rules</title>
    <link href="https://smmh.dev/pgdesign/validation-rules/"/>
    <id>https://smmh.dev/pgdesign/validation-rules/</id>
    <updated>2026-08-12T00:00:00Z</updated>
    <summary>pgdesign enforces **134** diagnostic rules across 6 categories (E: 78 errors, W: 32 warnings, I: 11 info, S: 5 seed, C: 7 codegen, A: 1 audit).</summary>
  </entry>
  <entry>
    <title>Code Generation Guide</title>
    <link href="https://smmh.dev/pgdesign/codegen-guide/"/>
    <id>https://smmh.dev/pgdesign/codegen-guide/</id>
    <updated>2026-07-29T00:00:00Z</updated>
    <summary>pgdesign generates type-safe application code from your schema definitions. Instead of manually writing struct definitions, ORM models, enum types, or validation logic that mirrors your database schema, you run `pgdesign codegen` and get generated source files that stay in sync with your TOML schema.</summary>
  </entry>
  <entry>
    <title>Diff Guide</title>
    <link href="https://smmh.dev/pgdesign/diff-guide/"/>
    <id>https://smmh.dev/pgdesign/diff-guide/</id>
    <updated>2026-07-29T00:00:00Z</updated>
    <summary>The `pgdesign diff` command compares your current TOML schema against a target and reports every difference: tables, columns, enums, views, functions, constraints, indexes, policies, sequences, domains, composite types, state machines, and partitioning configuration. Each column change carries a risk classification (Safe, Caution, or Dangerous) so you know what will happen before you run a migration.</summary>
  </entry>
  <entry>
    <title>Introspect Guide</title>
    <link href="https://smmh.dev/pgdesign/introspect-guide/"/>
    <id>https://smmh.dev/pgdesign/introspect-guide/</id>
    <updated>2026-07-29T00:00:00Z</updated>
    <summary>pgdesign's `introspect` command reads a live PostgreSQL database's schema via `pg_catalog` and produces TOML output in pgdesign's schema format. It is the primary tool for adopting pgdesign on an existing database.</summary>
  </entry>
  <entry>
    <title>Migration Guide</title>
    <link href="https://smmh.dev/pgdesign/migration-guide/"/>
    <id>https://smmh.dev/pgdesign/migration-guide/</id>
    <updated>2026-07-29T00:00:00Z</updated>
    <summary>pgdesign generates migrations by diffing your TOML schema against the last recorded schema state. A migration is a content-addressed **chain edge** — a self-contained transition between two schema revisions whose operations and object payloads live in the on-disk store. Edges carry DDL and DML operations, per-operation inverses (for rollback), and safety diagnostics.</summary>
  </entry>
  <entry>
    <title>Migration Intelligence</title>
    <link href="https://smmh.dev/pgdesign/migration-patterns/"/>
    <id>https://smmh.dev/pgdesign/migration-patterns/</id>
    <updated>2026-07-29T00:00:00Z</updated>
    <summary>How pgdesign generates safe, phased migrations with risk classification.</summary>
  </entry>
  <entry>
    <title>rlsbl Release Integration</title>
    <link href="https://smmh.dev/pgdesign/rlsbl-integration/"/>
    <id>https://smmh.dev/pgdesign/rlsbl-integration/</id>
    <updated>2026-07-29T00:00:00Z</updated>
    <summary>pgdesign's build freshness check can run as part of rlsbl's release pipeline. This ensures that no release ships with stale schema-derived output: if the TOML schema changed but `pgdesign build` was not re-run, the release is blocked.</summary>
  </entry>
  <entry>
    <title>Semantic Types</title>
    <link href="https://smmh.dev/pgdesign/semantic-types/"/>
    <id>https://smmh.dev/pgdesign/semantic-types/</id>
    <updated>2026-07-29T00:00:00Z</updated>
    <summary>pgdesign uses a semantic type system instead of raw PostgreSQL types. Each semantic type maps to a PG type and carries default constraints (NOT NULL, default values, check expressions). This ensures consistency across your schema and prevents common mistakes like nullable IDs or timestamps without time zones.</summary>
  </entry>
  <entry>
    <title>Content-Addressed Schemas: Making Schema Drift Unrepresentable</title>
    <link href="https://smmh.dev/blog/content-addressed-schemas-making-schema-drift-unrepresentable/"/>
    <id>https://smmh.dev/blog/content-addressed-schemas-making-schema-drift-unrepresentable/</id>
    <updated>2026-07-28T00:00:00Z</updated>
    <summary>Every team that has run a database for more than a year has met the same ghost. The schema in your repository says one thing. The database in production says something subtly different. A column was widened by hand during an incident. A migration was edited after it ran. An index was added directly in `psql` and never written down. Nobody is sure. The gap between what your schema *says* and what your database *is* — schema drift — is where a surprising amount of production pain lives.</summary>
  </entry>
  <entry>
    <title>Python Query Layer</title>
    <link href="https://smmh.dev/pgdesign/query-layer/"/>
    <id>https://smmh.dev/pgdesign/query-layer/</id>
    <updated>2026-06-25T00:00:00Z</updated>
    <summary>The `--mode query-layer --lang python` codegen mode generates a complete type-safe query layer with protocols, dual backends, and a constraint registry. The generated code is async-first and uses Python's Protocol typing for structural subtyping.</summary>
  </entry>
  <entry>
    <title>Design Intelligence</title>
    <link href="https://smmh.dev/pgdesign/design-intelligence/"/>
    <id>https://smmh.dev/pgdesign/design-intelligence/</id>
    <updated>2026-06-24T00:00:00Z</updated>
    <summary>The design intelligence subsystem analyzes schema structure beyond basic validation. It surfaces structural issues, optimization opportunities, and design anti-patterns through 12 diagnostics registered under the `&quot;design&quot;` tag. All diagnostics are implemented in `internal/validate/validate.go` and registered via `cmd/pgdesign/checks.go`.</summary>
  </entry>
  <entry>
    <title>Seed Data Generation</title>
    <link href="https://smmh.dev/pgdesign/seed-generation/"/>
    <id>https://smmh.dev/pgdesign/seed-generation/</id>
    <updated>2026-06-24T00:00:00Z</updated>
    <summary>The seed generator produces type-aware test data for all tables in a pgdesign schema. It respects FK dependencies, CHECK constraints, UNIQUE constraints, semantic types, and column nullability. Output is either INSERT statements or PostgreSQL COPY format.</summary>
  </entry>
  <entry>
    <title>State Machines</title>
    <link href="https://smmh.dev/pgdesign/state-machines/"/>
    <id>https://smmh.dev/pgdesign/state-machines/</id>
    <updated>2026-06-24T00:00:00Z</updated>
    <summary>pgdesign supports state machine types that enforce valid state transitions at the database level via triggers, generate D2 state diagrams, and produce transition methods in codegen output.</summary>
  </entry>
  <entry>
    <title>Ephemeral Test Databases</title>
    <link href="https://smmh.dev/pgdesign/testdb-guide/"/>
    <id>https://smmh.dev/pgdesign/testdb-guide/</id>
    <updated>2026-06-24T00:00:00Z</updated>
    <summary>pgdesign can create isolated, throwaway databases for your test suite. Each test run gets a fresh database built from your schema DDL. The database is dropped when the test finishes. Production credentials are never involved.</summary>
  </entry>
  <entry>
    <title>Type Extends</title>
    <link href="https://smmh.dev/pgdesign/type-extends/"/>
    <id>https://smmh.dev/pgdesign/type-extends/</id>
    <updated>2026-06-24T00:00:00Z</updated>
    <summary>Type derivation allows defining new types that inherit from and extend existing types. This works for all four type kinds: scalar, enum, composite, and state machine.</summary>
  </entry>
  <entry>
    <title>typeinfo Package</title>
    <link href="https://smmh.dev/pgdesign/typeinfo/"/>
    <id>https://smmh.dev/pgdesign/typeinfo/</id>
    <updated>2026-06-24T00:00:00Z</updated>
    <summary>The `typeinfo` package provides structured PostgreSQL type representation. It parses raw type strings (from TOML schemas, `format_type()` output, etc.) into a normalized struct and reconstructs SQL type strings for DDL generation.</summary>
  </entry>
  <entry>
    <title>Workload Analysis</title>
    <link href="https://smmh.dev/pgdesign/workload-analysis/"/>
    <id>https://smmh.dev/pgdesign/workload-analysis/</id>
    <updated>2026-06-24T00:00:00Z</updated>
    <summary>pgdesign provides a two-tier approach to index recommendations and performance diagnostics. The **structural tier** analyzes the TOML schema without a database connection. The **workload tier** analyzes live query patterns from `pg_stat_statements` and `pg_stat_user_tables`. Both tiers produce diagnostics through the standard `diagnostic.Diagnostics` system.</summary>
  </entry>
</feed>
