lattice-schema

Create sequential Pixeltable migrations and update schema documentation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents Pixeltable schema drift by standardizing how migrations are authored, validated, and reflected in the canonical schema documentation.

Core Features & Use Cases

  • Write-once migration discipline: Ensures new tables and columns are added only via sequential numbered migrations (0015+), never by editing immutable 0001–0014.
  • Idempotent schema authoring: Uses _helpers.py (ensure_namespace, ensure_table, ensure_column, assert_ownership) to enforce ownership rules and consistent table/column creation.
  • Docs-drift and correctness scoring: Runs the pre-commit docs-drift validator and then the schema scoring script to measure completeness, geometry/path correctness, and doc synchronization.
  • Canonical metadata upkeep: Updates meta/SCHEMA.md and meta/ARCHITECTURE.md alongside migration changes so the repo remains discoverable and verifiable.

Quick Start

Ask the AI to create the next numbered migration for adding a new lattice/* Pixeltable table or column, then update meta/SCHEMA.md and run the docs-drift check and schema score before proposing a commit.

Frequently Asked Questions about lattice-schema

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

FAQPage Schema
How do I prevent Pixeltable schema drift when adding new tables and columns?▼

You prevent Pixeltable schema drift by authoring sequential, write-once numbered migrations using idempotent helper calls, then updating canonical documentation and running validation scoring checks before committing.

What is the correct way to create a new Pixeltable migration for a lattice table?▼

To create a new Pixeltable migration, add a sequentially numbered file in the migrations directory using helper functions like ensure_table and ensure_column, and never edit prior immutable migrations.

Why does my schema documentation drift check fail after adding new lattice columns?▼

Your schema documentation drift check fails because meta files like SCHEMA.md and ARCHITECTURE.md are not updated alongside migration changes, causing the pre-commit validator to detect synchronization gaps.

Can I use pxt.Geometry when defining new columns in Pixeltable migrations?▼

No, you cannot use pxt.Geometry when defining new columns in Pixeltable migrations, as the schema discipline explicitly forbids this type and mandates using idempotent helper calls instead.

How do I update namespace ownership for lattice tables in _helpers.py?▼

You update namespace ownership by using the assert_ownership helper within your sequential migration script to enforce rules, ensuring the new lattice tables are properly registered before running scoring scripts.

What limitations exist when modifying existing Pixeltable migrations?▼

Existing Pixeltable migrations are limited by a write-once discipline that forbids editing prior sequential files, meaning all schema changes must be applied through new incrementally numbered migration scripts.