# Master Contract — [Project name] > Template from Jorel del Portal's method (joreldelportal.com/metodo-en.html). > Rule #1: no line of code is written until the contract is complete. > When two decisions clash, the higher-level document wins. ## 00 · Vision - **What is being built:** [one sentence] - **Why:** [the real problem it solves] - **What it is NOT:** [explicit limits] - **Success criterion:** [how you'll know it worked] ## 01 · Domain model - Entities: [list with one-line definitions] - Relationships and invariants: [what must always be true] - States and transitions: [diagram or table] ## 02 · Design - Main loop / core flow: [the full happy path] - Mechanics and progression: [how usage evolves] ## 03 · Technical architecture - Stack and why: [decision + discarded alternative] - Modules and responsibilities: [one per line] - Contracts between modules: [interfaces, not implementations] ## 04 · Data-driven rules - What is data and what is code: [the exact boundary] - Versioned schemas: [where they live, how they're validated] - Fail-fast validation: [what breaks the build] ## 05 · Vertical slice - Scope of the first cut: [the minimum that proves the architecture end to end] - Acceptance criteria: [verifiable, not opinions] ## 06 · AI rules (if applicable) - What AI may execute and under which contracts - What requires explicit human approval - Documents AI must not touch ## 07 · Folder structure - What lives —and what doesn't— in each folder ## 08 · Code standards - Language conventions: [the ones that are validated, not wished for] ## 09 · Content pipeline - How each piece of content/data is created and validated ## 10 · Roadmap - Phases 0→N with advance criteria per phase (a phase doesn't start until the previous one closes) ## ADR · Decisions - Architecture decision record, with reasons (see adr-template.md)