Bakery 🥐
A beautiful Azure DevOps work item scraper with AI-powered OpenSpec integration.
Bakery is a professional CLI tool that scrapes Azure DevOps work items and generates comprehensive OpenSpec implementation plans using AI. Features beautiful terminal output, flexible configuration, and seamless OpenSpec CLI integration with automatic validation.
✨ Features
- 🚀 Clean Terminal Output - Minimal, professional interface with verbose mode available
- 🔧 Flexible Configuration - User-friendly TOML configuration system
- 📁 Smart Storage Options - Centralized or local project-based storage
- 🤖 AI-Powered OpenSpec Integration - Comprehensive implementation plan generation
- ✅ Automatic Validation - Built-in OpenSpec CLI validation and formatting
- 📋 Proper OpenSpec Structure - Creates changes/proposal.md, tasks.md, and specs/
- 🎯 Complete Azure DevOps Integration - Full work item content extraction
- 🔄 Retry Logic - Automatic retries for flaky Azure DevOps API calls
- 🖨️ Machine-Readable Output -
--printflag for LLM/automation integration - ⚙️ Professional CLI - Built with Rust for performance and reliability
🚀 Quick Start
Installation
# Install from crates.io
# The binary will be available as `bakery`
# Or build locally
Basic Usage
# Scrape a work item and generate OpenSpec change proposal
# Machine-readable output for LLM integration
# Verbose mode with detailed logging
# Open configuration file
📦 Package vs Binary Name
Important Note:
- Package name on crates.io:
bakery-devops - Binary name after installation:
bakery
# ✅ Correct: Install the package
# ✅ Correct: Use the binary
# ❌ Incorrect: package name ≠ binary name
⚠️ Prerequisites
Required:
- ✅ Azure DevOps Personal Access Token (PAT)
- ✅ Network access to
dev.azure.com
Optional for Full OpenSpec Integration:
- 🤖 Claude CLI or compatible AI tool - For plan generation
- 📋 OpenSpec CLI (
npm install -g openspec) - For validation and workflow
If you don't have OpenSpec CLI, Bakery will still:
- ✅ Scrape work items perfectly
- ✅ Generate AI plans (if AI configured)
- ⚠️ Skip validation (you'll see a warning)
If you don't have AI CLI configured:
# Disable OpenSpec generation
# Or disable in config
📋 Configuration
Bakery automatically creates a configuration file at:
- Windows:
%USERPROFILE%\.bakery\bakery-config.toml - Mac/Linux:
~/.bakery/bakery-config.toml
Run bakery config to open and edit the configuration.
Configuration Example
[]
= "your-organization"
= "YourProject"
= "your-pat-token-here"
= "7.1"
[]
= "~/devops-data"
= "Tickets"
= "openspec"
= false # Set true to use current directory
[]
= "claude --print \"{prompt}\""
= true
🔧 Azure DevOps Setup
-
Create a Personal Access Token (PAT):
- Go to https://dev.azure.com/{organization}/_usersSettings/tokens
- Click "New Token"
- Name: "Bakery Scraper"
- Scope: Work Items → Read (vso.work)
- Copy token to configuration
-
Configure Bakery:
# Update organization, project, pat_token
📁 OpenSpec Directory Structure
Bakery creates proper OpenSpec change proposals:
{base_directory}/
├── Tickets/
│ └── 12345/
│ ├── work_item.json
│ ├── attachments/
│ └── images/
└── openspec/
├── AGENTS.md # Created by openspec init
├── project.md # Project context
├── specs/ # Current specifications
└── changes/ # Change proposals
└── add-12345-feature-name/
├── proposal.md # Why, What, Impact
├── tasks.md # Implementation checklist
└── specs/ # Spec deltas
└── feature/
└── spec.md # ADDED/MODIFIED/REMOVED Requirements
Local Baking Mode
Set local_baking = true to create folders in current working directory.
🤖 AI Integration
Bakery uses stdin piping for maximum compatibility with AI CLIs:
Claude CLI (Recommended)
# In config:
Custom AI Tools
Any tool that accepts stdin or command-line prompts:
📋 OpenSpec Integration
Bakery generates proper OpenSpec change proposals following the official methodology:
What Gets Created:
1. proposal.md
[Problem/opportunity explanation]
- -
- -
2. tasks.md
- -
- --
- --
3. specs/{capability}/spec.md (if requirements included)
The system SHALL provide...
- -
[Full updated requirements]
[Deprecated features]
Automatic Validation
Bakery automatically runs openspec validate --strict on generated changes and reports results:
- ✅ Passed: Change is properly formatted
- ⚠️ Issues: Shows validation command to fix errors
- ⚙️ CLI not found: Continues without validation
OpenSpec Commands
After generating a change:
# List all changes
# View interactive dashboard
# Show change details
# Validate change
# After implementation, archive the change
📖 Command Line Options
🔍 Examples
Basic Usage
# Clean output (default)
# Verbose output with all details
# Skip OpenSpec generation
Machine-Readable Output
# Perfect for LLM/automation integration
# Output:
# --- BAKERY OUTPUT ---
# work_item_id: 12345
# work_item_title: Feature Name
# ticket_path: /path/to/Tickets/12345
# change_path: /path/to/openspec/changes/add-12345-feature-name
# status: success
Override Configuration
# Different organization
# Custom storage location
🎯 Output Modes
Default Mode (Clean & Concise)
🔄 Fetching work item #12345...
✓ Feature implementation
┌─────────────────────────────────────────────────────┐
│ 🤖 AI Generating OpenSpec Plan... │
└─────────────────────────────────────────────────────┘
✓ Validation passed
✓ 3 new requirement(s)
📁 /path/to/openspec/changes/add-12345-feature-name
✓ Complete
Next: openspec list or openspec view
Verbose Mode (-v)
- Detailed progress messages
- File paths for all operations
- Full summary with statistics
- Debug logging information
Print Mode (-p)
- Machine-readable key-value output
- No decorations or progress indicators
- Perfect for parsing by LLMs or scripts
🔄 Reliability Features
Automatic Retry Logic
- Azure DevOps API calls retry up to 3 times
- Exponential backoff (500ms base delay)
- Failures only shown in verbose/debug mode
- Handles flaky network connections gracefully
Error Handling
- Clear error messages for common issues
- Graceful degradation (works without AI/OpenSpec CLI)
- Detailed logging in verbose mode
🔧 Development
Building from Source
Running Tests
Development Run
🤝 Contributing
Contributions welcome! Please:
- Open an issue for major changes
- Follow Rust best practices
- Add tests for new features
- Update documentation
📄 License
MIT License - see LICENSE file for details.
👨💻 Author
Kyle Edward Donaldson
- Email: kyle@ked.dev
- GitHub: @KyleEdwardDonaldson
🙏 Acknowledgments
OpenSpec
This tool fully integrates with OpenSpec, the specification-driven development framework. Bakery generates proper OpenSpec change proposals that follow the official three-stage workflow.
Built With
- Rust - Systems programming language
- clap - Command line parsing
- colored - Terminal colors
- tokio - Async runtime
- reqwest - HTTP client
- scraper - HTML parsing
- indicatif - Progress indicators
- serde - Serialization
Integrations
- Azure DevOps - Work item management
- OpenSpec - Spec-driven development
- Claude CLI - AI-powered plan generation
📚 Resources
Bakery v0.2.0 - Transform Azure DevOps work items into comprehensive OpenSpec change proposals with AI-powered analysis and automatic validation. 🚀