| layout | default |
|---|---|
| title | Common Tasks Quick Reference |
| permalink | /common-tasks/ |
Quick answers to "How do I X?" questions
This guide maps common user goals to recommended SpecFact CLI commands or command chains. Each entry includes a task description, recommended approach, link to detailed guide, and a quick example.
Not sure which task matches your goal? Use the Command Chains Decision Tree to find the right workflow.
Recommended: Brownfield Modernization Chain
Command: import from-code
Quick Example:
specfact import from-code --bundle legacy-api --repo .Detailed Guide: Brownfield Engineer Guide
Recommended: Greenfield Planning Chain
Command: plan init → plan add-feature → plan add-story
Quick Example:
specfact plan init --bundle new-feature --interactive
specfact plan add-feature --bundle new-feature --name "User Authentication"
specfact plan add-story --bundle new-feature --feature <feature-id> --story "As a user, I want to log in"Detailed Guide: Agile/Scrum Workflows
Recommended: External Tool Integration Chain
Command: import from-bridge → sync bridge
Quick Example:
specfact import from-bridge --repo . --adapter speckit --write
specfact sync bridge --adapter speckit --bundle <bundle-name> --bidirectional --watchDetailed Guide: Spec-Kit Journey | OpenSpec Journey
Recommended: import from-code
Quick Example:
specfact import from-code --bundle legacy-api --repo ./legacy-appDetailed Guide: Brownfield Engineer Guide
Recommended: plan review → plan update-feature
Quick Example:
specfact plan review --bundle legacy-api
specfact plan update-feature --bundle legacy-api --feature <feature-id>Detailed Guide: Brownfield Engineer Guide
Recommended: Code-to-Plan Comparison Chain
Command: plan compare → drift detect
Quick Example:
specfact import from-code --bundle current-state --repo .
specfact plan compare --bundle <plan-bundle> --code-vs-plan
specfact drift detect --bundle <bundle-name>Detailed Guide: Drift Detection
Recommended: AI-Assisted Code Enhancement Chain
Command: generate contracts-prompt → [AI IDE] → contracts-apply
Quick Example:
specfact generate contracts-prompt --bundle <bundle-name> --feature <feature-id>
# Then use AI IDE slash command: /specfact-cli/contracts-apply <prompt-file>
specfact contract coverage --bundle <bundle-name>Detailed Guide: AI IDE Workflow
Recommended: API Contract Development Chain
Command: spec validate → spec backward-compat
Quick Example:
specfact spec validate --spec openapi.yaml
specfact spec backward-compat --spec openapi.yaml --previous-spec openapi-v1.yamlDetailed Guide: Specmatic Integration
Recommended: Sidecar Validation Chain
Command: validate sidecar init → validate sidecar run
Quick Example:
# Initialize sidecar workspace
specfact validate sidecar init legacy-api /path/to/django-project
# Run validation workflow
specfact validate sidecar run legacy-api /path/to/django-projectWhat it does:
- Detects framework (Django, FastAPI, DRF, Flask, pure Python)
- Automatically installs dependencies in isolated venv (
.specfact/venv/) - Extracts routes and schemas from framework patterns (all HTTP methods captured for Flask)
- Populates OpenAPI contracts automatically (with expected status codes and response structure validation)
- Generates CrossHair harness for symbolic execution (using venv Python)
- Runs CrossHair and Specmatic validation
Detailed Guide: Sidecar Validation Guide
Recommended: spec generate-tests
Quick Example:
specfact spec generate-tests --spec openapi.yaml --output tests/
pytest tests/Detailed Guide: Contract Testing Workflow
Recommended: spec mock
Quick Example:
specfact spec mock --spec openapi.yaml --port 8080Detailed Guide: Specmatic Integration
Recommended: Team Collaboration Workflow
Command: project export → project import → project lock/unlock
Quick Example:
specfact project init-personas --bundle <bundle-name>
specfact project export --bundle <bundle-name> --persona product-owner
# Edit exported Markdown files
specfact project import --bundle <bundle-name> --persona product-owner --source exported-plan.mdDetailed Guide: Agile/Scrum Workflows
Recommended: project export
Quick Example:
specfact project export --bundle <bundle-name> --persona product-owner
specfact project export --bundle <bundle-name> --persona architect
specfact project export --bundle <bundle-name> --persona developerDetailed Guide: Agile/Scrum Workflows
Recommended: project version check → project version bump
Quick Example:
specfact project version check --bundle <bundle-name>
specfact project version bump --bundle <bundle-name> --type minorDetailed Guide: Project Version Management
Recommended: Plan Promotion & Release Chain
Command: plan review → enforce sdd → plan promote
Quick Example:
specfact plan review --bundle <bundle-name>
specfact enforce sdd --bundle <bundle-name>
specfact plan promote --bundle <bundle-name> --stage approvedDetailed Guide: Agile/Scrum Workflows
Recommended: plan compare
Quick Example:
specfact plan compare --bundle plan-v1 plan-v2Detailed Guide: Plan Comparison
Recommended: repro
Quick Example:
specfact repro --verboseDetailed Guide: Validation Workflow
Recommended: enforce sdd
Quick Example:
specfact enforce sdd --bundle <bundle-name>Detailed Guide: SDD Enforcement
Recommended: Gap Discovery & Fixing Chain
Command: repro --verbose → generate fix-prompt
Quick Example:
specfact repro --verbose
specfact generate fix-prompt --bundle <bundle-name> --gap <gap-id>
# Then use AI IDE to apply fixesDetailed Guide: AI IDE Workflow
Recommended: init --ide cursor
Quick Example:
specfact init --ide cursorDetailed Guide: AI IDE Workflow | IDE Integration
Recommended: Test Generation from Specifications Chain
Command: generate test-prompt → [AI IDE] → spec generate-tests
Quick Example:
specfact generate test-prompt --bundle <bundle-name> --feature <feature-id>
# Then use AI IDE slash command: /specfact-cli/test-generate <prompt-file>
specfact spec generate-tests --spec <spec-file> --output tests/Detailed Guide: AI IDE Workflow
Recommended: DevOps Adapter Integration - Bidirectional backlog sync
Command: sync bridge --adapter github --bidirectional
Quick Example:
# Export OpenSpec change proposals to GitHub Issues
specfact sync bridge --adapter github --bidirectional \
--repo-owner your-org --repo-name your-repo
# Import GitHub Issues as change proposals (automatic with --bidirectional)
# Track code changes automatically
specfact sync bridge --adapter github --track-code-changes \
--repo-owner your-org --repo-name your-repoDetailed Guide: DevOps Adapter Integration
Recommended: Backlog Refinement Guide 🆕 NEW FEATURE - AI-assisted template-driven refinement
Command: backlog refine
Quick Example:
# Refine GitHub issues with auto-detection
specfact backlog refine github --search "is:open label:feature"
# Filter by sprint and assignee
specfact backlog refine github --sprint "Sprint 1" --assignee dev1
# Filter by framework and persona (Scrum + Product Owner)
specfact backlog refine github --framework scrum --persona product-owner --labels feature
# Check Definition of Ready before refinement
specfact backlog refine github --check-dor --labels feature
# Preview refinement without writing (default - safe mode)
specfact backlog refine github --preview --labels feature
# Write refinement to backlog (explicit opt-in)
specfact backlog refine github --write --labels featureDetailed Guide: Backlog Refinement Guide
Recommended: backlog refine with sprint filtering
Command: backlog refine --sprint <sprint-name>
Quick Example:
# Refine items in current sprint
specfact backlog refine github --sprint "Sprint 1" --state open
# Refine ADO work items in specific iteration
specfact backlog refine ado --iteration "Project\\Sprint 1" --state ActiveDetailed Guide: Backlog Refinement Guide
Recommended: backlog refine with persona/framework filtering
Command: backlog refine --persona <persona> --framework <framework>
Quick Example:
# Use Product Owner templates with Scrum framework
specfact backlog refine github --persona product-owner --framework scrum --labels feature
# Use Developer templates with Agile framework
specfact backlog refine github --persona developer --framework agile --labels taskDetailed Guide: Backlog Refinement Guide
Recommended: backlog refine with DoR validation
Command: backlog refine --check-dor
Quick Example:
# Check DoR before refinement
specfact backlog refine github --check-dor --labels feature
# DoR configuration in .specfact/dor.yaml
rules:
story_points: true
priority: true
business_value: true
acceptance_criteria: trueDetailed Guide: Backlog Refinement Guide
Recommended: DevOps bridge adapter with bidirectional sync 🆕
Command: sync bridge --adapter github --bidirectional (or --mode export-only for export-only)
Quick Example:
# Bidirectional sync (export AND import)
specfact sync bridge --adapter github --bidirectional \
--repo-owner your-org --repo-name your-repo
# Export-only (one-way: OpenSpec → GitHub)
specfact sync bridge --adapter github --mode export-only \
--repo-owner your-org --repo-name your-repo
# Update existing issue (when proposal already linked to issue)
specfact sync bridge --adapter github --mode export-only \
--repo-owner your-org --repo-name your-repo \
--change-ids your-change-id \
--update-existingDetailed Guide: DevOps Adapter Integration
Recommended: Use --update-existing flag with --change-ids to update a specific linked issue
Command: sync bridge --adapter github --mode export-only --update-existing --change-ids <change-id>
Prerequisites:
- Change proposal must have
source_trackingmetadata linking it to the GitHub issue - The issue number should be in the proposal's
proposal.mdfile under "Source Tracking" section
Quick Example:
# Update issue #105 for change proposal 'implement-adapter-enhancement-recommendations'
specfact sync bridge --adapter github --mode export-only \
--repo-owner nold-ai \
--repo-name specfact-cli \
--change-ids implement-adapter-enhancement-recommendations \
--update-existing \
--repo /path/to/openspec-repoWhat Gets Updated:
- Issue body with latest proposal content (if content changed)
- Issue title (if proposal title changed)
- Status labels (OpenSpec status ↔ GitHub labels)
- OpenSpec metadata footer in issue body
Note: The adapter uses content hash detection - if proposal hasn't changed, issue won't be updated (prevents unnecessary API calls).
Detailed Guide: DevOps Adapter Integration - Update Existing Issues
Recommended: DevOps bridge adapter with project linking
Quick Example:
specfact sync bridge --adapter github --mode export-only --project "SpecFact CLI Development Board"Detailed Guide: DevOps Adapter Integration
Recommended: Check migration guides
Quick Example:
# Check current version
specfact --version
# Review migration guide for your version
# See: guides/migration-*.mdDetailed Guide: Migration Guide | Troubleshooting
Recommended: Troubleshooting Guide
Quick Example:
# Run validation with verbose output
specfact repro --verbose
# Check plan for issues
specfact plan review --bundle <bundle-name>Detailed Guide: Troubleshooting
- Command Chains Reference - Complete workflows with decision trees
- Command Reference - Complete command documentation
- Brownfield Engineer Guide - Legacy modernization guide
- Agile/Scrum Workflows - Team collaboration patterns