en un clic
spec-writing
// Guide for creating high-quality specifications for sandbox. Use when starting a new SPEC or reviewing specs against architectural standards.
// Guide for creating high-quality specifications for sandbox. Use when starting a new SPEC or reviewing specs against architectural standards.
Design and implement consistent backend/backoffice interfaces using @open-mercato/ui. Use when building admin pages, CRUD interfaces, data tables, forms, detail pages, or any backoffice UI.
Implement a specification (or specific phases) for a community module package in the official-modules repo. Handles multi-phase implementation with unit tests, sandbox verification, and code-review compliance. Use when the user says "implement spec", "implement SPEC-XXX", "implement phases", "build from spec", or "code the spec". Tracks progress by updating the spec with implementation status.
Scaffold a new community module package in the official-modules monorepo. Use when creating a new @open-mercato/* npm package from scratch, starting a new module, or when implement-spec needs a package skeleton before filling in business logic. Triggers on "scaffold module", "create module", "new module package", "new package", "add community module".
Guide for creating high-quality specifications for community modules in the official-modules repo. Use when starting a new SPEC, designing a new module, or reviewing an existing spec. Follows the same "Martin Fowler" staff-engineer standards as the core repo. Triggers on "write spec", "new spec", "design module", "spec for", "create spec".
Guide for safely ejecting and customizing core modules. Use when a developer needs to modify a core module's behavior beyond what UMES extensions support, wants to eject a module, or is considering whether to eject vs extend. Triggers on "eject", "customize module", "modify core module", "override module", "fork module", "change built-in", "should I eject".
| name | spec-writing |
| description | Guide for creating high-quality specifications for sandbox. 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.{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}
makeCrudRoute, <CrudForm>, <DataTable>, apiCall / useGuardedMutation, DI-resolved cache, createModuleEvents) or invent its own substitute? See AGENTS.md → Mandatory Module Mechanisms for the full canon and links. No raw fetch, no raw <form>, no new Redis(...), no manual cross-module ORM joins.encryption.ts defaultEncryptionMaps entry and route reads through findWithDecryption? See AGENTS.md → CRITICAL Rule #11 (Encryption maps) + the "Encryption maps for sensitive data" row of the Mandatory Module Mechanisms table and .ai/skills/data-model-design/SKILL.md § Sensitive Data and Encryption Maps. No hand-rolled AES, no crypto.subtle, no "TODO encrypt later".text-red-* / bg-green-*), Tailwind text scale (no text-[11px] / text-[13px]), shared primitives (StatusBadge, Alert, FormField, SectionHeader, CollapsibleSection, LoadingMessage / Spinner / DataLoader, EmptyState), lucide-react icons in page body (never inline <svg>), dialog Cmd/Ctrl+Enter submit + Escape cancel, aria-label on every icon-only button? See AGENTS.md → CRITICAL Rule #10 (Strict Design System alignment for every UI change) and .ai/skills/backend-ui-design/SKILL.md. Specs that touch existing pages MUST honour the Boy Scout rule.organization_id is mandatory for all tenant-scoped entities.<module>/encryption.ts, read via findWithDecryption) — see AGENTS.md → Data Encryption.makeCrudRoute), backend forms (CrudForm), tables (DataTable), HTTP (apiCall — never raw fetch), non-CrudForm writes (useGuardedMutation), cache (DI-resolved @open-mercato/cache), events (createModuleEvents) — see AGENTS.md → Mandatory Module Mechanisms.<svg> in page-body UI. See AGENTS.md → Design System..ai/skills/data-model-design/SKILL.md → Sensitive Data and Encryption Maps.ai/skills/module-scaffold/SKILL.md → Encryption maps.ai/skills/backend-ui-design/SKILL.md — DS-compliant pages