Data schema definition template
Tables, columns and the rules that keep the data correct, before the migration.
Card required · Eligible new accounts pay nothing until day 14
The template
Data Schema Definition
ERD Overview
Describe the relationships between the main entities.
Table Definitions
Table: [Name]
id(uuid, pk)name(text)metadata(jsonb)
Indexes & Constraints
Foreign keys, unique constraints, and performance indexes.
Migration Strategy
How will we deploy these changes? Any downtime required?
Query Patterns
Common access patterns we need to optimize for.
What Specky makes with this
A filled-in version for a fictional product. In your workspace, Specky cites the calls, tickets and messages it found, as footnotes, and writes “Needs Evidence” where it found none instead of inventing a source.
ExampleFictional product, fictional peopleShowHide
Schema: invoice payments
| Table | Column | Type | Notes |
|---|---|---|---|
| payments | id | uuid | primary key |
| payments | invoice_id | uuid | references invoices, on delete cascade |
| payments | amount_cents | integer | > 0 |
| payments | paid_on | date |
Rules
- An invoice's balance is its total minus the sum of its payments.
- Payments are never edited in place; a correction is a new negative payment.
Do this from Claude
Stay in Claude Code, the Claude apps, Cursor or ChatGPT. Connect Specky’s MCP server once, copy this template, paste it into the chat and ask. The MCP tools can’t open your template library, so the agent works from the pasted copy and saves the result to Specky.
1. Connect once
claude mcp add --transport http specky \ https://www.specky.space/api/mcp \ --header "Authorization: Bearer sk_live_your_key"
Replace sk_live_your_key with a workspace API key from Settings → Developer in Specky. Write and AI calls follow your workspace role and plan limits, and anything an agent writes lands as a draft for review.
MCP setup guideAll supported agentshttps://www.specky.space/api/mcp
2. Ask
“Here is the Specky "Data Schema Definition" template (pasted below). Search my Specky workspace for evidence about <feature>, fill in the template with a footnote for every claim, mark anything unsupported as "Needs evidence", and save it as a spec draft.”
Calls
search_workspace,create_document
Questions
Why write the schema before the migration?
A schema is cheap to change on paper and expensive to change in production. Writing it down lets someone question a relationship before data depends on it.
How do I use the Data Schema Definition template in Specky?
Open Templates from the command menu (Cmd+K, or Ctrl+K on Windows) and press Use on "Data Schema Definition". Specky creates a new document with these sections in place and opens it in the editor. If your workspace was created before this template was added, press "Add missing defaults" in Templates first.
Can I use it without Specky?
Yes. Copy it as Markdown or download the .md file and paste it into your docs tool, your repo or an issue. Specky adds the links back to the customer evidence behind each claim.