MTG Copilot Docs
Data model

Comprehensive Rules

Every numbered rule, verbatim, with its parents, cross references and examples.

9 columns. Every value below is generated from the provenance registry.

FieldTypeSourceUpdatedWritten by
rule_numberstringwotcon demandscripts/seed-rules.ts
Rule number as printed, e.g. '509.1a'. Primary key.
rule_textstringwotcon demandscripts/seed-rules.ts
The rule's text, verbatim.
parent_rule_numberstring | nullwotcon demandscripts/seed-rules.ts
The rule this one sits under, e.g. '509.1' for '509.1a'; NULL at the top level.
section_titlestring | nullwotcon demandscripts/seed-rules.ts
Title of the containing section, e.g. 'Attacking'.
chapter_titlestring | nullwotcon demandscripts/seed-rules.ts
Title of the containing chapter, e.g. 'Turn Structure'.
sort_keystring | nullwotcon demandscripts/seed-rules.ts
Zero-padded key that sorts rules in printed order, which their numbers do not do lexically.
rule_referencesstring[] | nullwotcon demandscripts/seed-rules.ts
Other rule numbers this rule cites, parsed from its text.
examplesstring[] | nullwotcon demandscripts/seed-rules.ts
The rule's own 'Example:' paragraphs, split out.
concept_tagsstring[] | nullcalculatedon demandscripts/seed-rules.ts (post-process)
Glossary concept names mentioned by this rule, matched during seeding. Links a rule to the taxonomy.

TypeScript model

interface game_rules {
  rule_number:        string
  rule_text:          string
  parent_rule_number: string | null
  section_title:      string | null
  chapter_title:      string | null
  sort_key:           string | null
  rule_references:    string[] | null
  examples:           string[] | null
  concept_tags:       string[] | null
}

On this page