LATTICE Schema Migration Authoring

Author Pixeltable schema migrations with write-once numbered files and helper-only changes.

3|Updated May 11, 2026
One-click install
npx skills add https://github.com/JeromyJSmith/lattice-platform --skill lattice-schema-migration-authoring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: LATTICE Schema Migration Authoring
Source: https://github.com/JeromyJSmith/lattice-platform/tree/main/.agents/skills/lattice-schema
Command: npx skills add https://github.com/JeromyJSmith/lattice-platform --skill lattice-schema-migration-authoring

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents Pixeltable schema migrations from drifting out of sync with the canonical schema documentation while ensuring migrations remain write-once and ownership rules are enforced.

Core Features & Use Cases

  • Write-once migration discipline: creates new numbered migration files (e.g., 0015+) without modifying immutable migrations 0001–0014.
  • Idempotent, helper-only schema changes: authors migrations using _helpers.py functions to ensure namespaces, tables, and columns while enforcing ownership and avoiding forbidden geometry writes.
  • Automatic docs-drift control: updates meta/SCHEMA.md, meta/ARCHITECTURE.md, and the LIVE STATE migration count, then runs pre-commit docs validation and the schema scoring ratchet.

Quick Start

Ask the AI to author the next Pixeltable migration for a new lattice/* table or column, update meta/SCHEMA.md and architecture state accordingly, and then run the docs-drift pre-commit check plus the schema score script before you commit.

Frequently Asked Questions about LATTICE Schema Migration Authoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep Pixeltable schema migrations in sync with documentation?

To keep Pixeltable schema migrations in sync with documentation, author new migrations using helper functions and simultaneously update `meta/SCHEMA.md` and `meta/ARCHITECTURE.md` to reflect the changes before running pre-commit checks.

What is the best way to add a new table in a lattice namespace without causing docs drift?

Adding a table in a `lattice/*` namespace without causing docs drift requires creating a new write-once numbered migration file, updating `_helpers.py` ownership, and running the schema scoring ratchet to validate documentation consistency.

Can I modify existing Pixeltable migrations to fix schema issues?

You cannot modify existing Pixeltable migrations because migrations 0001–0014 are immutable and write-once. You must author a new numbered migration file, such as 0015 or higher, to implement any schema changes safely.

Why does my schema score fail when I add new columns to Pixeltable?

Your schema score fails when adding new columns because the canonical documentation has drifted from the runtime schema. You must update `meta/SCHEMA.md` and architecture state, then run `scripts/score-schema.sh` to validate the changes.

Do I need to update `_helpers.py` when creating a new lattice namespace?

You need to update `_helpers.py` when creating a new `lattice/*` namespace to enforce ownership rules and ensure idempotent schema changes, which prevents forbidden geometry writes and maintains schema integrity.

How does the write-once migration discipline prevent schema inconsistencies?

Write-once migration discipline prevents schema inconsistencies by enforcing immutable historical migrations and requiring all new schema changes to be authored through helper-only functions, ensuring runtime schemas remain consistent with canonical documentation.