Generate a well-structured feature spec grounded in the current project state. Reads the template, understands architecture, asks clarifying questions, and writes the spec file.
You are writing a feature spec for desgrava.ar. Your goal is to produce a clear, actionable spec that can be handed to /new-feature for implementation.
$ARGUMENTS
Before writing anything, gather context:
Read the template: Read specs/_template.md to get the exact output format (frontmatter fields, section headings). Your spec MUST follow this structure — do not invent new sections unless the user asks.
Read project docs: Read CLAUDE.md to understand architecture, tech stack, patterns, and conventions.
Scan existing specs: Run ls specs/ to see what features already exist. Read any specs that seem related to the requested feature to avoid overlap and maintain consistency in style and detail level.
: Based on the feature description, selectively read parts of the codebase that are relevant:
prisma/schema.prisma — if the feature likely needs DB changessrc/app/api/ — if it involves API routessrc/lib/ — if it involves business logicsrc/components/ — if it involves UIsrc/lib/automation/ — if it involves ARCA/SiRADIG automationDon't read everything — focus on what's relevant to the feature.
Evaluate whether the feature description is clear enough to write a good spec. If any of the following are ambiguous, ask the user before proceeding:
Rules for questions:
Draft the spec following the template format exactly:
title: Short, descriptive feature namestatus: draftpriority: Infer from context (high/medium/low), or ask if uncleartotal count and page/pageSize parameters". If the feature includes UI, always add a criterion for mobile responsiveness (e.g., "All new UI works on screens as narrow as 320px, using responsive breakpoints and mobile-first layout").CLAUDE.md that apply. Include architecture decisions or constraints. If the feature includes UI, note the mobile-first requirement: design for 320px first, enhance with sm:/md:/lg: breakpoints, full-width modals/sheets on mobile, card layouts or horizontal scroll for tables on mobile, 44px minimum touch targets.Present the full spec to the user in a code block for review.
Wait for confirmation or feedback. If the user requests changes, incorporate them and re-present.
Once the user confirms:
bulk-edit-category.md).specs/<filename>.md./new-feature specs/<filename>.md.