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 both centralized and local storage modes.
✨ Features
- 🚀 Beautiful Terminal Output - Colorful, emoji-enhanced user experience
- 🔧 Flexible Configuration - User-friendly TOML configuration system
- 📁 Smart Storage Options - Centralized or local project-based storage
- 🤖 AI-Powered OpenSpec Integration - Comprehensive implementation plan generation
- 🎯 Complete Azure DevOps Integration - Full work item content extraction
- ⚙️ Professional CLI - Built with Rust for performance and reliability
- 📋 OpenSpec Methodology - Proper three-stage workflow integration
🚀 Quick Start
Installation
# Install from crates.io
# Or build locally
Basic Usage
# Scrape a work item and generate OpenSpec plan
# Open configuration file
# Get help
⚠️ Prerequisites
Required for Basic Usage:
- ✅ Azure DevOps Personal Access Token (PAT)
- ✅ Network access to
dev.azure.com
Optional for OpenSpec Integration:
- 🤖 AI CLI Tool (any of the following):
- Claude CLI - Recommended
- OpenAI CLI
- Custom AI tools that accept prompts via command line
If you don't have an AI CLI configured, Bakery will still scrape work items perfectly:
-
Disable OpenSpec generation:
-
Disable in configuration:
[] = false
📋 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 the configuration file in your default editor.
Configuration Example
[]
# Azure DevOps organization name
= "your-organization"
# Azure DevOps project name
= "YourProject"
# Personal Access Token (PAT) for Azure DevOps API access
= "your-pat-token-here"
# Azure DevOps REST API version (usually don't need to change this)
= "7.1"
[]
# Base directory where Bakery stores all data
# Windows example: "C:/DevOpsData"
# Mac/Linux example: "~/devops-data"
= "~/devops-data"
# Subdirectory for scraped tickets
= "Tickets"
# Subdirectory for OpenSpec plans
= "openspec"
# Local baking mode - creates folders in current working directory
= false
[]
# AI command template for generating OpenSpec plans
# Use {prompt} as a placeholder for the generated prompt
= "claude -p \"{prompt}\""
# Automatically generate OpenSpec plans after scraping tickets
= true
🔧 Azure DevOps Setup
-
Create a Personal Access Token (PAT):
- Go to https://dev.azure.com/{organization}/_usersSettings/tokens
- Click "Create New Token"
- Give it a name (e.g., "Bakery Scraper")
- Select scopes: "Work Items" → "Read" (vso.work)
- Copy the token to your configuration
-
Configure Bakery:
- Run
bakery configto open configuration - Update
organization,project, andpat_token - Set your preferred
base_directory
- Run
📁 Storage Modes
Centralized Storage (Default)
{base_directory}/
├── Tickets/
│ ├── 12345/
│ │ ├── work_item.json
│ │ ├── attachments/
│ │ └── images/
│ └── 12346/
└── openspec/
├── 12345-concise-title.md
└── 12346-another-title.md
Local Baking Mode
Set local_baking = true to create folders in your current working directory:
current-project/
├── Tickets/
│ └── 12345/
└── openspec/
🤖 AI Integration
Bakery supports any AI CLI that accepts prompts as command line arguments:
Claude (Recommended)
OpenAI CLI
Custom AI Tools
Configure your preferred AI tool in the ai_command_template setting.
📋 OpenSpec Integration
Bakery generates comprehensive OpenSpec implementation plans that follow the proper three-stage workflow:
Generated Plans Include:
- Change Analysis: Scope identification and directory structure planning
- Proposal Structure: Complete proposal.md with Why, What Changes, and Impact
- Delta Specifications: Proper ADDED/MODIFIED/REMOVED Requirements with scenarios
- Implementation Tasks: Detailed tasks.md with analysis, implementation, and verification
- Design Documentation: design.md when needed for complex changes
- Three-Stage Workflow: Creating Changes → Implementing Changes → Archiving Changes
- Quality Gates: Validation, testing, and approval requirements
OpenSpec Features:
- ✅ Proper methodology integration from OpenSpec AGENTS.md
- ✅ Scenario-driven requirements with WHEN/THEN format
- ✅ Delta operations (ADDED/MODIFIED/REMOVED/RENAMED)
- ✅ Implementation task breakdowns
- ✅ Testing strategies and validation steps
- ✅ Quality gates and completion criteria
🎯 Features
Work Item Scraping
- ✅ Full work item details (title, description, state, type)
- ✅ Acceptance criteria extraction
- ✅ Comments and attachments
- ✅ Embedded images and media
- ✅ Related work items
- ✅ HTML content cleaning and formatting
OpenSpec Integration
- ✅ Comprehensive plan generation (130+ lines typical)
- ✅ Proper OpenSpec methodology
- ✅ AI-powered analysis and task creation
- ✅ Integration with multiple AI platforms
- ✅ Customizable filename formats
Terminal Experience
- 🎨 Beautiful colored output
- 📊 Detailed progress information
- ✅ Success/error messaging
- 📁 Storage location indicators
📖 Command Line Options
)
)
)
)
🔍 Examples
Basic Scraping
# Scrape work item with default settings
# Scrape with verbose logging
# Skip OpenSpec generation
Override Configuration
# Use different organization
# Use different project
# Use custom storage directory
Local Baking Mode
# Enable local baking in config, then run:
# Creates folders in current directory
🔧 Development
Building from Source
Running Tests
Development Setup
# Install development dependencies
# Run with debug output
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Guidelines
- Follow Rust best practices and conventions
- Add tests for new features
- Update documentation as needed
- Ensure the code builds with
cargo build - Run tests with
cargo test
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
👨💻 Author
Kyle Edward Donaldson
- Email: kyle@ked.dev
- GitHub: @kyleedonaldson
🙏 Acknowledgments
OpenSpec Integration
This tool integrates methodology and concepts from OpenSpec, a comprehensive specification-driven development framework. The OpenSpec workflow provides the structured approach to change management, requirement specification, and implementation planning that makes Bakery-generated plans so effective.
Built With
- Rust - Systems programming language
- clap - Command line argument parsing
- colored - Terminal colors
- tokio - Async runtime
- reqwest - HTTP client
- scraper - HTML parsing
- serde - Serialization/deserialization
- anyhow - Error handling
Integrations
- Azure DevOps - Work item management
- OpenSpec - Specification-driven development
- Claude - AI-powered plan generation
📚 Additional Resources
- Azure DevOps REST API Documentation
- OpenSpec Methodology
- Claude CLI Documentation
- Rust Documentation
Bakery - Transform your Azure DevOps work items into comprehensive implementation plans with the power of AI and OpenSpec methodology. 🚀