Guide for creating high-quality specifications for {{PROJECT_NAME}}. Use when starting a new SPEC or reviewing specs against architectural standards.
Design and review specifications (SPECs) against Open Mercato architecture and quality rules.
AGENTS.md for module conventions and .ai/specs/ for existing specs.SPEC-{number}-{date}-{title}.md in .ai/specs/.Q1, Q2, …) after the TLDR.Use the Specification Template. Adapt if needed, but ensure core concerns are addressed.
Required sections: TLDR, Problem Statement, Proposed Solution, Data Models, API Contracts, Risks, Changelog.
# Architectural Review: {SPEC-0XX: Title}
## Summary
{1-3 sentences: what the spec proposes and overall health}
## Findings
### Critical
{Cross-module ORM, tenant isolation leaks, missing auth guards}
### High
{Missing undo logic, incorrect module placement, missing phase strategy}
### Medium
{Missing failure scenarios, inconsistent terminology}
### Low
{Style suggestions, nits}
organization_id is mandatory for all tenant-scoped entities.