CtrlK
BlogDocsLog inGet started
Tessl Logo

g14wxz/commerce-database-architect

Database architecture skills, docs, and rules for high-demand multi-tenant commerce platforms (PostgreSQL source of truth, Neo4j as derived GraphRAG projection, transactional outbox, RLS-based tenant isolation). Includes live schema introspection workflow via Postgres MCP.

97

Quality

97%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

Commerce Database Architect — Tile Documentation

This Tessl tile bundles the database-architecture intelligence for a high-demand multi-tenant commerce platform. It works in tandem with a Spec Kit project that defines the constitution, ADRs, custom commands, and live schema-state snapshot.

What's inside

Skills

Skills activate automatically when their triggers are matched in user prompts. The seven skills in this tile:

SkillActivates when…
commerce-database-architectureDesigning or reviewing schema, modeling commerce entities, choosing architecture
postgres-schema-introspectionInspecting current DB state via Postgres MCP, refreshing the snapshot
schema-evolution-workflow"Add an attribute / modify entity / model this concept" requests
mermaid-diagram-reviewUser pastes a Mermaid ER diagram for review
adr-draftingAny deviation from constitutional defaults is being proposed
outbox-and-eventing-designDesigning or reviewing the outbox, audit, idempotency, projection workers
graph-rag-boundary-reviewAnything crossing the PostgreSQL ↔ Neo4j boundary

Steering rules (always-on)

  • database-non-negotiables — the minimum bar for every interaction
  • mcp-safety — rules for Postgres MCP usage
  • schema-evolution-discipline — how to handle "add an attribute" requests

Reference snippets

Battle-tested, copy-pasteable SQL for the patterns easy to get wrong:

  • reference-snippets/outbox-pattern.md — table + relay + retention
  • reference-snippets/rls-templates.md — RLS policies for tenant isolation
  • reference-snippets/inventory-movements.md — append-only inventory with balance trigger
  • reference-snippets/idempotency-keys.md — idempotency table + middleware pattern
  • reference-snippets/optimistic-concurrency.md — version-column pattern
  • reference-snippets/expand-contract-migration.md — zero-downtime migration template

Event catalog

event-catalog.md is the source of truth for every domain event the platform emits.

How it pairs with Spec Kit

The Spec Kit project provides the commands and memory:

  • .specify/memory/constitution.md — non-negotiable principles
  • .specify/memory/architecture-decisions.md — recorded ADRs
  • .specify/memory/database-architecture-principles.md — operational rules
  • .specify/memory/graph-ai-boundaries.md — Neo4j boundaries
  • .specify/memory/eventing-and-audit-principles.md — outbox + audit
  • .specify/memory/current-schema-state.md — live snapshot (updated by /speckit.dbsync)
  • .specify/memory/schema-change-log.md — append-only history
  • .claude/commands/speckit.dbreview.md — review diagrams/schemas/migrations
  • .claude/commands/speckit.dbsync.md — refresh the snapshot from MCP
  • .claude/commands/speckit.dbevolve.md — schema evolution workflow
  • .claude/commands/speckit.adr.md — auto-draft ADRs

The Tessl tile provides the portable, evaluable, versioned skills that travel across Claude Code, Cursor, Codex, Gemini, and Copilot.

Typical session flow

User: [pastes Mermaid diagram]
  ↓
mermaid-diagram-review skill activates
  ↓ (loads constitution + snapshot, runs 12-row check table)
returns 5-section structured response
  ↓
User accepts counter-proposal
  ↓
schema-evolution-workflow skill activates
  ↓ (5-placement analysis, blast radius, expand/contract)
returns migration plan + tests + change-log entry
  ↓
[ADR triggered if deviation detected]
  ↓
adr-drafting skill activates
  ↓
returns Proposed ADR
  ↓
User runs migration
  ↓
User runs /speckit.dbsync
  ↓
postgres-schema-introspection skill activates
  ↓
snapshot refreshed, drift report shown

Setup

See the top-level README.md of the project for installation, .mcp.json configuration, and the first-time walkthrough.

Versioning

Every breaking skill change bumps the tile MINOR version. Backward-compatible changes bump PATCH. Major rewrites bump MAJOR. The current version lives in tile.json.

When you bump, run:

tessl skill review .
tessl tile lint .
tessl eval run .
tessl tile publish . --workspace your-workspace
Workspace
g14wxz
Visibility
Public
Created
Last updated
Publish Source
CLI
Badge
g14wxz/commerce-database-architect badge