--- name: autospec-clarify description: "Identify underspecified areas in YAML spec and encode clarifications back into the spec." --- # autospec-clarify This Agent Skill is generated from autospec.clarify. When the user invokes "$autospec-clarify" or "/autospec.clarify", load and follow these instructions directly. Treat the text after the skill or command name as "$ARGUMENTS". Do not route back through "autospec clarify"; this skill is the prompt for the stage. Project specs directory: ./specs ## User Input ```text $ARGUMENTS ``` You **MUST** consider the user input before proceeding (if not empty). ## Outline Goal: Detect and reduce ambiguity or missing decision points in the active feature specification and record the clarifications directly in the spec.yaml file. Note: This clarification workflow should run BEFORE `$autospec-plan`. If the user explicitly states they are skipping clarification (e.g., exploratory spike), you may proceed, but must warn that downstream rework risk increases. ## Pre-computed Context The following paths have been pre-computed and are available for use: - **FEATURE_DIR**: `{{.FeatureDir}}` - **FEATURE_SPEC**: `{{.FeatureSpec}}` 1. **Load and analyze** the spec file at `{{.FeatureSpec}}`. Perform a structured ambiguity & coverage scan using this taxonomy. For each category, mark status: Clear / Partial / Missing. **Functional Scope & Behavior:** - Core user goals & success criteria - Explicit out-of-scope declarations - User roles / personas differentiation **Domain & Data Model:** - Entities, attributes, relationships - Identity & uniqueness rules - Lifecycle/state transitions - Data volume / scale assumptions **Interaction & UX Flow:** - Critical user journeys / sequences - Error/empty/loading states - Accessibility or localization notes **Non-Functional Quality Attributes:** - Performance (latency, throughput targets) - Scalability (horizontal/vertical, limits) - Reliability & availability (uptime, recovery expectations) - Observability (logging, metrics, tracing signals) - Security & privacy (authN/Z, data protection, threat assumptions) - Compliance / regulatory constraints (if any) **Integration & External Dependencies:** - External services/APIs and failure modes - Data import/export formats - Protocol/versioning assumptions **Edge Cases & Failure Handling:** - Negative scenarios - Rate limiting / throttling - Conflict resolution (e.g., concurrent edits) **Constraints & Tradeoffs:** - Technical constraints (language, storage, hosting) - Explicit tradeoffs or rejected alternatives **Terminology & Consistency:** - Canonical glossary terms - Avoided synonyms / deprecated terms **Completion Signals:** - Acceptance criteria testability - Measurable Definition of Done style indicators **Misc / Placeholders:** - TODO markers / unresolved decisions - Ambiguous adjectives ("robust", "intuitive") lacking quantification 3. **Generate candidate questions** (maximum 5). Apply these constraints: - Maximum of 10 total questions across the whole session - Each question must be answerable with EITHER: - A short multiple-choice selection (2-5 distinct, mutually exclusive options), OR - A one-word / short-phrase answer (explicitly constrain: "Answer in <=5 words") - Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation - Ensure category coverage balance: attempt to cover the highest impact unresolved categories first - Exclude questions already answered, trivial stylistic preferences, or plan-level execution details - Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests 4. **Sequential questioning loop** (interactive): - Present EXACTLY ONE question at a time - For multiple-choice questions: - **Analyze all options** and determine the **most suitable option** based on best practices, common patterns, risk reduction, and alignment with project goals - Present your **recommended option prominently** at the top with clear reasoning (1-2 sentences) - Format as: `**Recommended:** Option [X] - ` - Then render all options as a Markdown table: | Option | Description | |--------|-------------| | A |