# spec.yml - Workflow for generating complete, focused specifications

# Generate a new specification with validation and refinement
# Usage: prodigy run spec --args "Description of feature to implement"

# Step 1: Generate initial specification(s)
- claude: "/prodigy-add-spec $ARG"
  commit_required: true

# Step 2: Validate all created specifications
- claude: "/prodigy-validate-all-specs ${step.files_added:specs/*.md} --original '$ARG' --output .prodigy/spec-validation.json"
  validate:
    result_file: ".prodigy/spec-validation.json"
    threshold: 100  # All specs must be 100% complete and focused
    on_incomplete:
      claude: "/prodigy-refine-specs ${validation.incomplete_specs} --gaps ${validation.gaps}"
      max_attempts: 5
      fail_workflow: false  # Continue even if we can't perfect the specs
      commit_required: true  # Require commit for refinements

# Step 3: Final reporting
- claude: "/prodigy-report-specs ${workflow.files_added:specs/*.md}"
