diff --git a/README.md b/README.md index c4c1e74..1da0cb7 100644 --- a/README.md +++ b/README.md @@ -676,7 +676,7 @@ Generated issues must include: - **Dependency Validation**: Automated checking for circular dependencies - **Status Propagation**: Subissue changes update epic progress -**Implementation Examples**: See [examples/issue-generation/](examples/issue-generation/) for detailed AI prompts, epic breakdown workflows, CI integration patterns, and traceability implementations. +**Implementation Examples**: See [examples/issue-generation/](examples/issue-generation/) for detailed AI prompts, epic breakdown workflows, CI integration patterns, and traceability implementations. For AI-first workflows, see [Beads guide](examples/issue-generation/beads-guide.md) - a git-native issue tracker with CLI access and persistent agent memory. > "If a task takes more than one day, split it." > – Kanban Guide, Lean Kanban University diff --git a/examples/issue-generation/.beads/.gitignore b/examples/issue-generation/.beads/.gitignore new file mode 100644 index 0000000..f438450 --- /dev/null +++ b/examples/issue-generation/.beads/.gitignore @@ -0,0 +1,29 @@ +# SQLite databases +*.db +*.db?* +*.db-journal +*.db-wal +*.db-shm + +# Daemon runtime files +daemon.lock +daemon.log +daemon.pid +bd.sock + +# Legacy database files +db.sqlite +bd.db + +# Merge artifacts (temporary files from 3-way merge) +beads.base.jsonl +beads.base.meta.json +beads.left.jsonl +beads.left.meta.json +beads.right.jsonl +beads.right.meta.json + +# Keep JSONL exports and config (source of truth for git) +!issues.jsonl +!metadata.json +!config.json diff --git a/examples/issue-generation/.beads/.local_version b/examples/issue-generation/.beads/.local_version new file mode 100644 index 0000000..ae6dd4e --- /dev/null +++ b/examples/issue-generation/.beads/.local_version @@ -0,0 +1 @@ +0.29.0 diff --git a/examples/issue-generation/.beads/README.md b/examples/issue-generation/.beads/README.md new file mode 100644 index 0000000..50f281f --- /dev/null +++ b/examples/issue-generation/.beads/README.md @@ -0,0 +1,81 @@ +# Beads - AI-Native Issue Tracking + +Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code. + +## What is Beads? + +Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git. + +**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads) + +## Quick Start + +### Essential Commands + +```bash +# Create new issues +bd create "Add user authentication" + +# View all issues +bd list + +# View issue details +bd show + +# Update issue status +bd update --status in_progress +bd update --status done + +# Sync with git remote +bd sync +``` + +### Working with Issues + +Issues in Beads are: +- **Git-native**: Stored in `.beads/issues.jsonl` and synced like code +- **AI-friendly**: CLI-first design works perfectly with AI coding agents +- **Branch-aware**: Issues can follow your branch workflow +- **Always in sync**: Auto-syncs with your commits + +## Why Beads? + +✨ **AI-Native Design** +- Built specifically for AI-assisted development workflows +- CLI-first interface works seamlessly with AI coding agents +- No context switching to web UIs + +🚀 **Developer Focused** +- Issues live in your repo, right next to your code +- Works offline, syncs when you push +- Fast, lightweight, and stays out of your way + +🔧 **Git Integration** +- Automatic sync with git commits +- Branch-aware issue tracking +- Intelligent JSONL merge resolution + +## Get Started with Beads + +Try Beads in your own projects: + +```bash +# Install Beads +curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash + +# Initialize in your repo +bd init + +# Create your first issue +bd create "Try out Beads" +``` + +## Learn More + +- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs) +- **Quick Start Guide**: Run `bd quickstart` +- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples) + +--- + +*Beads: Issue tracking that moves at the speed of thought* ⚡ diff --git a/examples/issue-generation/.beads/config.yaml b/examples/issue-generation/.beads/config.yaml new file mode 100644 index 0000000..f242785 --- /dev/null +++ b/examples/issue-generation/.beads/config.yaml @@ -0,0 +1,62 @@ +# Beads Configuration File +# This file configures default behavior for all bd commands in this repository +# All settings can also be set via environment variables (BD_* prefix) +# or overridden with command-line flags + +# Issue prefix for this repository (used by bd init) +# If not set, bd init will auto-detect from directory name +# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc. +# issue-prefix: "" + +# Use no-db mode: load from JSONL, no SQLite, write back after each command +# When true, bd will use .beads/issues.jsonl as the source of truth +# instead of SQLite database +# no-db: false + +# Disable daemon for RPC communication (forces direct database access) +# no-daemon: false + +# Disable auto-flush of database to JSONL after mutations +# no-auto-flush: false + +# Disable auto-import from JSONL when it's newer than database +# no-auto-import: false + +# Enable JSON output by default +# json: false + +# Default actor for audit trails (overridden by BD_ACTOR or --actor) +# actor: "" + +# Path to database (overridden by BEADS_DB or --db) +# db: "" + +# Auto-start daemon if not running (can also use BEADS_AUTO_START_DAEMON) +# auto-start-daemon: true + +# Debounce interval for auto-flush (can also use BEADS_FLUSH_DEBOUNCE) +# flush-debounce: "5s" + +# Git branch for beads commits (bd sync will commit to this branch) +# IMPORTANT: Set this for team projects so all clones use the same sync branch. +# This setting persists across clones (unlike database config which is gitignored). +# Can also use BEADS_SYNC_BRANCH env var for local override. +# If not set, bd sync will require you to run 'bd config set sync.branch '. +# sync-branch: "beads-sync" + +# Multi-repo configuration (experimental - bd-307) +# Allows hydrating from multiple repositories and routing writes to the correct JSONL +# repos: +# primary: "." # Primary repo (where this database lives) +# additional: # Additional repos to hydrate from (read-only) +# - ~/beads-planning # Personal planning repo +# - ~/work-planning # Work planning repo + +# Integration settings (access with 'bd config get/set') +# These are stored in the database, not in this file: +# - jira.url +# - jira.project +# - linear.url +# - linear.api-key +# - github.org +# - github.repo diff --git a/examples/issue-generation/.beads/issues.jsonl b/examples/issue-generation/.beads/issues.jsonl new file mode 100644 index 0000000..b37d432 --- /dev/null +++ b/examples/issue-generation/.beads/issues.jsonl @@ -0,0 +1,11 @@ +{"id":"issue-generation-7c9","title":"Epic: Restructure issue-generation examples for MECE, AI-first workflow","description":"Complete restructure of examples/issue-generation directory:\n- Fix task sizing (4-8 hours → \u003c1 hour for AI development)\n- Consolidate duplicate content (MECE compliance)\n- Create numbered learning path\n- Slim down README as navigation hub\n- Rename files with clear structure","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:15:44.932916-05:00","updated_at":"2025-12-10T11:10:01.863134-05:00","closed_at":"2025-12-10T11:10:01.863137-05:00"} +{"id":"issue-generation-7c9.1","title":"Update task sizing: 4-8 hours → \u003c1 hour in all files","description":"Update all references to '4-8 hours' to '\u003c1 hour' across:\n- README.md\n- ai-prompts-for-epic-management.md\n- detailed-kanban-workflow.md\n- ci-integration-examples.md\n- beads-example.md\nTarget: \u003c30 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:15:54.341478-05:00","updated_at":"2025-12-10T11:10:01.224491-05:00","closed_at":"2025-12-10T11:10:01.224493-05:00","dependencies":[{"issue_id":"issue-generation-7c9.1","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:15:54.341959-05:00","created_by":"daemon"}]} +{"id":"issue-generation-7c9.10","title":"Validate links and test navigation flow","description":"Final validation:\n- Check all internal links resolve\n- Test learning path flow (01 → 02 → 03...)\n- Verify no orphaned content\n- Confirm MECE compliance\nTarget: \u003c20 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:16:42.825114-05:00","updated_at":"2025-12-10T11:10:01.796202-05:00","closed_at":"2025-12-10T11:10:01.796204-05:00","dependencies":[{"issue_id":"issue-generation-7c9.10","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:16:42.82554-05:00","created_by":"daemon"}]} +{"id":"issue-generation-7c9.2","title":"Create 01-getting-started.md with AI-first concepts","description":"Create new getting started guide covering:\n- What are Kanban-optimized issues for AI development\n- Why \u003c1 hour tasks (not 4-8)\n- Core principles (flow, RED/GREEN/REFACTOR, CI/CD)\n- Next steps navigation\nTarget: \u003c45 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:16:11.959822-05:00","updated_at":"2025-12-10T11:10:01.287875-05:00","closed_at":"2025-12-10T11:10:01.287878-05:00","dependencies":[{"issue_id":"issue-generation-7c9.2","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:16:11.960319-05:00","created_by":"daemon"}]} +{"id":"issue-generation-7c9.3","title":"Create 02-choosing-tools.md from README content","description":"Extract tool comparison from README:\n- Decision tree (Beads vs traditional)\n- Comparison table (already exists in README)\n- When to use each tool\n- Hybrid approach guidance\nTarget: \u003c30 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:16:12.054233-05:00","updated_at":"2025-12-10T11:10:01.34896-05:00","closed_at":"2025-12-10T11:10:01.348962-05:00","dependencies":[{"issue_id":"issue-generation-7c9.3","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:16:12.05472-05:00","created_by":"daemon"}]} +{"id":"issue-generation-7c9.4","title":"Consolidate to 03-ai-prompts.md (rename ai-prompts-for-epic-management.md)","description":"Consolidate all AI prompt content:\n- Rename ai-prompts-for-epic-management.md → 03-ai-prompts.md\n- Remove duplicate prompts from detailed-kanban-workflow.md\n- Update task sizing in examples\n- Add cross-references\nTarget: \u003c45 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:16:12.145198-05:00","updated_at":"2025-12-10T11:10:01.407851-05:00","closed_at":"2025-12-10T11:10:01.407853-05:00","dependencies":[{"issue_id":"issue-generation-7c9.4","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:16:12.14562-05:00","created_by":"daemon"}]} +{"id":"issue-generation-7c9.5","title":"Rename to 04-workflow-examples.md and remove duplicates","description":"Rename detailed-kanban-workflow.md → 04-workflow-examples.md:\n- Remove duplicate AI prompts (already in 03-ai-prompts.md)\n- Keep JSON output examples\n- Update task sizing to \u003c1 hour\n- Add cross-references\nTarget: \u003c45 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:16:24.689343-05:00","updated_at":"2025-12-10T11:10:01.46827-05:00","closed_at":"2025-12-10T11:10:01.468273-05:00","dependencies":[{"issue_id":"issue-generation-7c9.5","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:16:24.689803-05:00","created_by":"daemon"}]} +{"id":"issue-generation-7c9.6","title":"Rename ci-integration-examples.md to 05-ci-integration.md","description":"Simple rename with updates:\n- Rename ci-integration-examples.md → 05-ci-integration.md\n- Update task sizing references\n- No content consolidation needed (well-scoped)\nTarget: \u003c15 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:16:24.788249-05:00","updated_at":"2025-12-10T11:10:01.533171-05:00","closed_at":"2025-12-10T11:10:01.533174-05:00","dependencies":[{"issue_id":"issue-generation-7c9.6","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:16:24.788712-05:00","created_by":"daemon"}]} +{"id":"issue-generation-7c9.7","title":"Rename beads-example.md to beads-guide.md","description":"Rename and update:\n- Rename beads-example.md → beads-guide.md\n- Update task sizing (4-8 hours → \u003c1 hour)\n- Parallel track for Beads users\nTarget: \u003c15 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:16:24.882337-05:00","updated_at":"2025-12-10T11:10:01.598146-05:00","closed_at":"2025-12-10T11:10:01.598149-05:00","dependencies":[{"issue_id":"issue-generation-7c9.7","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:16:24.882787-05:00","created_by":"daemon"}]} +{"id":"issue-generation-7c9.8","title":"Restructure README.md as navigation hub","description":"Transform README from content dump to navigation:\n- Remove detailed examples (keep quick start only)\n- Add learning path guide (01 → 02 → 03...)\n- Update directory structure listing\n- Keep comparison table for quick reference\n- Update task sizing to \u003c1 hour\nTarget: \u003c45 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:16:42.628954-05:00","updated_at":"2025-12-10T11:10:01.664111-05:00","closed_at":"2025-12-10T11:10:01.664113-05:00","dependencies":[{"issue_id":"issue-generation-7c9.8","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:16:42.629442-05:00","created_by":"daemon"}]} +{"id":"issue-generation-7c9.9","title":"Update all internal references and links","description":"Update cross-references after renames:\n- Main repo README.md references\n- Internal links within issue-generation files\n- Directory structure in README.md\n- Ensure all markdown links work\nTarget: \u003c30 minutes","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-10T10:16:42.72715-05:00","updated_at":"2025-12-10T11:10:01.730105-05:00","closed_at":"2025-12-10T11:10:01.730107-05:00","dependencies":[{"issue_id":"issue-generation-7c9.9","depends_on_id":"issue-generation-7c9","type":"parent-child","created_at":"2025-12-10T10:16:42.72761-05:00","created_by":"daemon"}]} diff --git a/examples/issue-generation/.beads/metadata.json b/examples/issue-generation/.beads/metadata.json new file mode 100644 index 0000000..c787975 --- /dev/null +++ b/examples/issue-generation/.beads/metadata.json @@ -0,0 +1,4 @@ +{ + "database": "beads.db", + "jsonl_export": "issues.jsonl" +} \ No newline at end of file diff --git a/examples/issue-generation/.gitattributes b/examples/issue-generation/.gitattributes new file mode 100644 index 0000000..807d598 --- /dev/null +++ b/examples/issue-generation/.gitattributes @@ -0,0 +1,3 @@ + +# Use bd merge for beads JSONL files +.beads/issues.jsonl merge=beads diff --git a/examples/issue-generation/01-getting-started.md b/examples/issue-generation/01-getting-started.md new file mode 100644 index 0000000..54852d1 --- /dev/null +++ b/examples/issue-generation/01-getting-started.md @@ -0,0 +1,278 @@ +# Getting Started with AI Issue Generation + +Learn how to generate Kanban-optimized issues for AI-assisted development workflows. + +## What Are Kanban-Optimized Issues? + +Kanban-optimized issues are work items designed for continuous flow rather than batched delivery. In AI-assisted development, this means: + +- **Small, focused tasks**: <1 hour to complete +- **Independently deployable**: Each task can ship without waiting for others +- **Continuous feedback**: Deploy and validate multiple times per day +- **Reduced work-in-progress**: Finish tasks quickly, don't accumulate partially-done work + +## Why <1 Hour Tasks for AI Development? + +AI fundamentally changes development velocity. What used to take hours now takes minutes: + +### Traditional Manual Coding (4-8 hour tasks) +``` +Planning (30 min) → Coding (6 hours) → Testing (1 hour) → Review (30 min) = 8 hours +``` + +### AI-Assisted Development (<1 hour tasks) +``` +Planning (5 min) → AI prompting (10 min) → Review/refine (20 min) → Testing (15 min) → Deploy (10 min) = 60 min +``` + +### Key Differences + +| Aspect | Manual Coding | AI-Assisted | +|--------|---------------|-------------| +| **Code generation** | Hours of typing | Minutes of prompting | +| **Iteration cycle** | Hours per change | 5-15 minutes per iteration | +| **Testing** | Manual, sequential | Automated, parallel | +| **Deployment** | 1-2x per day | Multiple times per hour | +| **Feedback loop** | End of day | Immediate | + +### Real-World AI Development Cycle Times + +Based on AI-assisted development: +- **JWT token generation**: 30-45 minutes (not 8 hours) +- **API endpoint**: 30-40 minutes (not 6 hours) +- **Database migration**: 15-25 minutes (not 3 hours) +- **Email template**: 15-20 minutes (not 4 hours) +- **Password reset form**: 20-30 minutes (not 4 hours) + +## Core Principles + +### 1. Flow Over Estimates + +Don't spend time estimating 4, 8, or 13 story points. Instead: +- **Split work** until each task is <1 hour +- **Measure actual cycle time** from start to production +- **Optimize for throughput**, not utilization + +```bash +❌ "This epic is 40 story points" +✅ "This epic has 12 tasks, each <1 hour" +``` + +### 2. Independent Deployment + +Every task should be deployable without waiting for other tasks: + +```bash +✅ "Add JWT token generation function" + → Can deploy with feature flag + → Doesn't break existing code + → Tests pass independently + +❌ "Implement complete authentication system" + → Can't deploy until entire system is done + → High risk, long feedback cycle +``` + +### 3. RED/GREEN/REFACTOR Development Cycle + +Break even small tasks into three phases: + +```bash +# Task: "Add JWT token validation middleware" (<1 hour total) + +## RED (15 minutes) +- Write failing test for middleware +- Define expected behavior +- Deploy test suite (CI runs, test fails as expected) + +## GREEN (25 minutes) +- AI generates minimum implementation +- Make test pass +- Deploy behind feature flag + +## REFACTOR (20 minutes) +- Clean up generated code +- Extract key management +- Add documentation +- Deploy refactored version +``` + +### 4. CI/CD for Every Task + +Each task should trigger and pass through your CI/CD pipeline: + +```yaml +Task: "Add password reset endpoint" + ↓ +Commit → CI Pipeline: + - Lint check ✓ + - Unit tests ✓ + - Integration tests ✓ + - Security scan ✓ + - Deploy to dev ✓ + ↓ +Production (with feature flag) +``` + +## Task Splitting Examples + +### Too Large (>1 Hour) +```markdown +❌ "Implement user authentication system" + - Too many components + - Can't deploy incrementally + - High risk +``` + +### Right Size (<1 Hour Each) +```markdown +✅ "Add JWT token generation function" +✅ "Add token validation middleware" +✅ "Create /auth/login endpoint" +✅ "Add password hashing utility" +✅ "Write integration tests for auth flow" +✅ "Add rate limiting to login" +✅ "Create session management middleware" +``` + +### AI-Assisted Splitting Prompt +```bash +ai "Split this feature into <1 hour tasks for AI-assisted development: + +Feature: User password reset via email + +Requirements: +- Each task <1 hour with AI assistance +- Independently deployable +- Include RED/GREEN/REFACTOR phases +- Specify CI/CD requirements" +``` + +## Getting Started Workflow + +### Step 1: Choose Your Tools + +See [02-choosing-tools.md](02-choosing-tools.md) to decide between: +- **Beads**: Git-native, CLI-first, offline-capable (ideal for AI agents) +- **GitHub/JIRA/Linear**: Web UI, team collaboration, enterprise features + +### Step 2: Learn AI Prompts + +See [03-ai-prompts.md](03-ai-prompts.md) for templates to: +- Break down epics into <1 hour tasks +- Generate RED/GREEN/REFACTOR acceptance criteria +- Create dependency chains +- Track progress automatically + +### Step 3: Understand Workflows + +See [04-workflow-examples.md](04-workflow-examples.md) for: +- Epic breakdown examples +- Relationship management patterns +- Progress tracking strategies +- Dependency validation + +### Step 4: Integrate CI/CD + +See [05-ci-integration.md](05-ci-integration.md) for: +- Traceability patterns +- File change validation +- Coverage enforcement +- Automated reporting + +## Quick Start Example + +```bash +# 1. Create an epic +ai "Create epic: User Dashboard with Analytics +Break into <1 hour tasks, each independently deployable" + +# 2. AI generates 8 tasks: +- Create analytics_events table (25 min) +- Add /api/analytics/events endpoint (35 min) +- Create dashboard data aggregation service (45 min) +- Add GET /api/dashboard/stats endpoint (30 min) +- Create DashboardCard React component (40 min) +- Add chart visualization component (50 min) +- Write integration tests for analytics flow (45 min) +- Add real-time updates with WebSocket (55 min) + +# 3. Work on first task +git checkout -b analytics-events-table +ai "Implement analytics_events table migration following RED/GREEN/REFACTOR" +git add . && git commit -m "feat: add analytics events table" +git push && create-pr + +# 4. CI runs automatically +- Tests pass ✓ +- Deploy to dev ✓ +- Merge to main ✓ + +# 5. Repeat for next task (all done in <8 hours total) +``` + +## Common Mistakes + +### ❌ Mistake 1: Using Manual Coding Time Estimates +```bash +"This will take 4-8 hours" +→ AI can do it in 30-45 minutes +``` + +### ❌ Mistake 2: Not Splitting Tasks Small Enough +```bash +"Implement authentication" (4-6 hours even with AI) +→ Split into 8 tasks of <1 hour each +``` + +### ❌ Mistake 3: Batching Deployments +```bash +"Let's finish all 8 tasks then deploy" +→ Deploy each task as soon as it's done +``` + +### ❌ Mistake 4: Skipping RED/GREEN/REFACTOR +```bash +ai "Write complete auth system with tests" +→ Break into RED (tests) → GREEN (impl) → REFACTOR (clean) +``` + +## Benefits of <1 Hour Tasks + +1. **Faster feedback**: Find problems in minutes, not days +2. **Reduced risk**: Smaller changes = easier debugging +3. **Better flow**: No tasks stuck "in progress" for hours +4. **Higher quality**: More frequent testing and validation +5. **Team visibility**: Clear progress throughout the day +6. **AI advantage**: Leverages AI speed, not constrained by typing + +## Next Steps + +1. **Choose your tools**: [02-choosing-tools.md](02-choosing-tools.md) +2. **Learn AI prompts**: [03-ai-prompts.md](03-ai-prompts.md) +3. **See examples**: [04-workflow-examples.md](04-workflow-examples.md) +4. **Integrate CI/CD**: [05-ci-integration.md](05-ci-integration.md) + +## Quick Reference + +```bash +# Task sizing rule +Target: <1 hour +Maximum: 2 hours (if longer, split it) +Optimal: 15-45 minutes + +# Task checklist +□ <1 hour with AI assistance? +□ Independently deployable? +□ Includes tests? +□ Passes through CI/CD? +□ RED/GREEN/REFACTOR phases defined? + +# Daily goal +8-10 tasks per developer per day +(not 1-2 large tasks) +``` + +--- + +**Remember**: AI changes everything. Don't use manual coding timeframes. Embrace <1 hour tasks for maximum velocity and feedback. diff --git a/examples/issue-generation/02-choosing-tools.md b/examples/issue-generation/02-choosing-tools.md new file mode 100644 index 0000000..cef4ddb --- /dev/null +++ b/examples/issue-generation/02-choosing-tools.md @@ -0,0 +1,350 @@ +# Choosing Your Issue Tracking Tool + +Decision framework for selecting between Beads, GitHub Issues, JIRA, and Linear for AI-assisted development. + +## Quick Decision Tree + +``` +Are you primarily using AI coding agents (Claude Code, Cursor, etc.)? +├─ YES → Do you work offline frequently or want git-native issues? +│ ├─ YES → Use Beads (see beads-guide.md) +│ └─ NO → Do you have non-technical stakeholders who need issue access? +│ ├─ YES → Use GitHub/JIRA/Linear (see below) +│ └─ NO → Use Beads (faster for AI agents) +└─ NO → Do you have enterprise requirements (SSO, audit trails)? + ├─ YES → Use JIRA + └─ NO → Use GitHub Issues or Linear +``` + +## Comparison Table + +| Feature | Beads | GitHub Issues | JIRA | Linear | +|---------|-------|---------------|------|--------| +| **AI Agent Access** | ✅ Native CLI | ⚠️ API + token | ⚠️ Complex API | ⚠️ API + token | +| **Offline Work** | ✅ Full | ❌ Limited | ❌ None | ❌ None | +| **Git Integration** | ✅ Native | ⚠️ External | ❌ Separate | ❌ Separate | +| **Setup Time** | ✅ Instant | ⚠️ Minutes | ❌ Hours/Days | ⚠️ Minutes | +| **Query Speed** | ✅ <50ms | ⚠️ 100-500ms | ⚠️ 200-1000ms | ⚠️ 100-300ms | +| **Non-tech Users** | ❌ CLI only | ✅ Web UI | ✅ Web UI | ✅ Web UI | +| **Collaboration** | ⚠️ Basic | ✅ Rich | ✅ Enterprise | ✅ Modern | +| **Integrations** | ❌ Minimal | ✅ Extensive | ✅ Enterprise | ✅ Modern | +| **Cost** | ✅ Free | ✅ Free | ❌ Paid | ⚠️ Paid | + +## When to Use Beads + +### ✅ Perfect For: + +**Solo developers or small technical teams** +- Everyone comfortable with CLI and git +- No need for web UI access +- Want maximum speed for AI agents + +**AI-first development workflows** +- Using Claude Code, Cursor, or similar AI tools daily +- AI agents need to query/update issues automatically +- Want issues to have persistent memory across sessions + +**Git-native workflows** +- Want issues versioned with code in the same repository +- Need to see issue history in git log +- Want to branch issues with code changes + +**Offline or distributed work** +- Frequent travel with limited connectivity +- Work on planes, trains, or in areas with poor internet +- Want zero dependency on external services + +**Example Use Case:** +```bash +# AI agent workflow with Beads +bd create --title "Add JWT token validation" \ + --body "RED: Write failing test +GREEN: Implement validation +REFACTOR: Extract key management" + +# AI agent queries ready work +bd ready # <50ms response +# bd-a1b2: Add JWT token validation + +# Work on task +bd update bd-a1b2 --status in_progress +ai "implement JWT validation following RED/GREEN/REFACTOR" + +# Complete and sync +bd update bd-a1b2 --status done +git add .beads/ && git commit -m "beads: complete JWT validation" +git push +``` + +### ❌ Not Ideal For: + +- Teams with non-technical stakeholders (PMs, designers, executives) +- Open source projects needing external contributor visibility +- Teams requiring rich collaboration (comments, mentions, attachments) +- Need for extensive integrations (Slack, Zapier, analytics tools) + +## When to Use GitHub Issues + +### ✅ Perfect For: + +**Teams with mixed technical levels** +- Developers, PMs, designers all need access +- Web UI more accessible than CLI +- Need comments, mentions, reactions + +**Open source projects** +- External contributors discover issues via github.com +- Community engagement and discussions +- Public visibility and discoverability + +**GitHub-centric workflows** +- Already using GitHub for code hosting +- Want PR auto-linking (`closes #123`) +- Using GitHub Actions for CI/CD +- Project boards for planning + +**Example Use Case:** +```yaml +# PR auto-closes issue +git commit -m "feat: add JWT validation + +Implements token validation with exp/iat checks. +Tests included with 98% coverage. + +Closes #42" + +# GitHub automatically: +# - Links PR to issue +# - Closes issue when PR merges +# - Notifies stakeholders +``` + +### ❌ Not Ideal For: + +- Pure AI agent workflows (API slower than Beads CLI) +- Offline work (requires internet connection) +- Git-native issue versioning (issues separate from code) + +## When to Use JIRA + +### ✅ Perfect For: + +**Enterprise requirements** +- SSO integration (SAML, LDAP) +- Audit trails and compliance +- Complex approval workflows (10+ states) +- Security and governance needs + +**Agile ceremonies** +- Sprint planning with story points +- Burndown charts and velocity tracking +- Time tracking for billing/resource planning +- Retrospective and estimation tools + +**Large organizations** +- Multiple teams with different workflows +- Custom fields and issue types +- Advanced JQL queries +- Hierarchical epic/story/subtask structures + +**Example Use Case:** +```jql +# Complex query across projects +project in (AUTH, INFRA) AND + sprint = "Sprint 42" AND + status changed from "In Progress" to "Done" + DURING (startOfWeek(), endOfWeek()) AND + assignee in membersOf("Backend Team") +ORDER BY priority DESC +``` + +### ❌ Not Ideal For: + +- Small teams (overhead too high) +- AI-first workflows (complex API, slow queries) +- Startups wanting speed over process +- Teams who find JIRA's complexity frustrating + +## When to Use Linear + +### ✅ Perfect For: + +**Fast-moving startups** +- Want speed and beauty over enterprise features +- Engineering teams that hate JIRA +- Product teams collaborating closely with engineers + +**Keyboard-first users** +- Lightning-fast keyboard shortcuts +- Minimal clicks to create/update issues +- Modern, responsive UI + +**Roadmap visibility** +- Cycles (2-week iterations) +- Roadmap views for stakeholders +- Progress tracking across teams + +**Modern integrations** +- Slack, Discord, Figma +- GitHub PR linking +- API-first architecture + +**Example Use Case:** +```bash +# Create issue with keyboard +Cmd+K → "Create issue" → + Title: "Add JWT validation" + Project: Auth + Cycle: Current + Estimate: <1 hour + → Enter + +# Total time: <10 seconds +``` + +### ❌ Not Ideal For: + +- Enterprise requirements (no SSO on lower tiers) +- Complex multi-stage workflows +- Teams needing extensive customization +- AI agent workflows (API better than JIRA, slower than Beads) + +## Hybrid Approach + +You can use multiple tools for different purposes: + +### Pattern 1: Beads + GitHub Issues + +```bash +# Internal tech work: Beads +bd create "Refactor authentication module" +bd create "Extract key management service" +bd create "Add integration tests for auth flow" + +# User-facing work: GitHub Issues +gh issue create --title "Password reset not working on mobile" +gh issue create --title "Feature request: Social login" + +# Benefits: +# - AI agents use Beads (fast CLI) +# - Users/stakeholders use GitHub (web UI) +# - Clear separation of internal vs external work +``` + +### Pattern 2: Beads with Sync (Experimental) + +```bash +# Work locally with Beads +bd create "Add JWT validation" +bd update issue-generation-7c9.1 --status done + +# Sync to external system for visibility +bd sync --to linear # Experimental feature +bd sync --to github # Experimental feature + +# Benefits: +# - Speed of Beads for development +# - Visibility in traditional tools for stakeholders +``` + +## Real-World Scenarios + +### Scenario 1: Solo Developer with AI Agent +**Recommendation**: Beads +- Fastest for AI queries (<50ms) +- No external dependencies +- Git-native workflow +- Offline capable + +### Scenario 2: 5-Person Startup (All Developers) +**Recommendation**: Beads or Linear +- Beads if everyone likes CLI and AI-first +- Linear if team wants modern web UI +- Both fast enough for small teams + +### Scenario 3: 10-Person Team (Devs + PM + Designer) +**Recommendation**: GitHub Issues or Linear +- PM and designer need web access +- Linear if budget allows (better UX) +- GitHub if already on GitHub + +### Scenario 4: 50-Person Engineering Org +**Recommendation**: JIRA or Linear +- JIRA for enterprise features, compliance +- Linear for speed, modern UX +- Consider GitHub for open source projects + +### Scenario 5: Open Source Project +**Recommendation**: GitHub Issues +- Public visibility for contributors +- Community engagement features +- PR auto-linking +- Free for public repos + +## Migration Considerations + +### Moving from JIRA to Beads +```bash +# Export JIRA issues +jira export --project AUTH --format json > jira-issues.json + +# Import to Beads (script) +python import-to-beads.py jira-issues.json + +# Benefits: +# - Escape JIRA complexity +# - Faster AI agent access +# - Git-native workflow +``` + +### Moving from Beads to GitHub +```bash +# Beads has experimental sync +bd sync --to github + +# Or manual export +bd list --json | gh-import-tool + +# When to do this: +# - Adding non-technical team members +# - Open sourcing the project +# - Need for richer collaboration +``` + +## Summary Recommendations + +### Choose Beads If: +1. AI-assisted development is your primary workflow +2. You're solo or small technical team +3. You want git-native issues +4. You work offline frequently +5. You want <50ms query speed + +### Choose GitHub Issues If: +1. Team includes non-technical members +2. Open source project +3. Already GitHub-centric +4. Want PR auto-linking +5. Need community engagement + +### Choose JIRA If: +1. Enterprise requirements (SSO, compliance) +2. Complex workflows +3. Agile ceremonies and reporting +4. Time tracking critical +5. Large organization (50+ people) + +### Choose Linear If: +1. Fast-moving startup +2. Dislike JIRA complexity +3. Want modern, beautiful UI +4. Keyboard-first users +5. Product/engineering collaboration + +## Next Steps + +**If you chose Beads**: See [beads-guide.md](beads-guide.md) for setup and usage + +**If you chose traditional tools**: See [03-ai-prompts.md](03-ai-prompts.md) for AI prompt templates that work across all platforms + +**Learn more**: [01-getting-started.md](01-getting-started.md) for core concepts diff --git a/examples/issue-generation/ai-prompts-for-epic-management.md b/examples/issue-generation/03-ai-prompts.md similarity index 98% rename from examples/issue-generation/ai-prompts-for-epic-management.md rename to examples/issue-generation/03-ai-prompts.md index ca7a96c..8bdf799 100644 --- a/examples/issue-generation/ai-prompts-for-epic-management.md +++ b/examples/issue-generation/03-ai-prompts.md @@ -8,7 +8,7 @@ Direct AI instructions for creating and managing epic-subissue relationships acr ai "Create an epic for User Authentication System with the following requirements: EPIC REQUIREMENTS: -1. Break into tasks that can be deployed in less than a day (4-8 hours max) +1. Break into tasks that can be deployed in <1 hour (AI-assisted development velocity) 2. Each task must be independently deployable 3. Use RED/GREEN/REFACTOR approach for all code tasks 4. Ensure CI/CD pipeline can run for each task diff --git a/examples/issue-generation/detailed-kanban-workflow.md b/examples/issue-generation/04-workflow-examples.md similarity index 90% rename from examples/issue-generation/detailed-kanban-workflow.md rename to examples/issue-generation/04-workflow-examples.md index 2be044e..191d7c3 100644 --- a/examples/issue-generation/detailed-kanban-workflow.md +++ b/examples/issue-generation/04-workflow-examples.md @@ -17,7 +17,7 @@ ai "Break down this epic for optimal Kanban flow: Epic: User Dashboard with Analytics Kanban task requirements: -- Maximum 4-8 hours per task (1 day) +- Maximum <1 hour per task (AI-assisted development) - If a task would take longer, split it - Each task independently deployable - Focus on flow over estimates @@ -45,7 +45,7 @@ Goal: Continuous flow with rapid feedback cycles." "Include user_id, event_type, timestamp, metadata columns", "Add appropriate constraints and foreign keys" ], - "cycle_time_target": "4 hours", + "cycle_time_target": "<1 hour", "labels": ["backend", "database", "kanban-ready"], "dependencies": [] }, @@ -237,20 +237,20 @@ Output: ai "Apply Kanban principles to split these work items: Kanban splitting rules: -- Maximum cycle time: 4-8 hours (1 day) -- If >8 hours, must split into smaller items +- Maximum cycle time: <1 hour (AI-assisted development) +- If >1 hour, must split into smaller items - Each item independently deployable - Measure actual cycle time, not estimates -Historical cycle times for reference: -- Authentication token generation: 8 hours -- Email template setup: 4 hours -- Password reset form: 4 hours -- API endpoint creation: 6 hours -- Database migration: 3 hours per table +Historical cycle times for AI-assisted reference: +- Authentication token generation: 30-45 minutes +- Email template setup: 15-20 minutes +- Password reset form: 20-30 minutes +- API endpoint creation: 30-40 minutes +- Database migration: 15-25 minutes per table For each task: -1. Can it be completed in <8 hours? +1. Can it be completed in <1 hour with AI assistance? 2. If no, how to split it? 3. What's the smallest valuable increment? @@ -259,4 +259,4 @@ Remember: Flow over estimates, rapid feedback over perfect planning." ## CI Integration Examples -See [ci-integration-examples.md](ci-integration-examples.md) for detailed examples of how to integrate AI-generated issues with CI workflows, including commit message formats, traceability, and automated reporting. \ No newline at end of file +See [05-ci-integration.md](05-ci-integration.md) for detailed examples of how to integrate AI-generated issues with CI workflows, including commit message formats, traceability, and automated reporting. \ No newline at end of file diff --git a/examples/issue-generation/ci-integration-examples.md b/examples/issue-generation/05-ci-integration.md similarity index 100% rename from examples/issue-generation/ci-integration-examples.md rename to examples/issue-generation/05-ci-integration.md diff --git a/examples/issue-generation/ANALYSIS.md b/examples/issue-generation/ANALYSIS.md new file mode 100644 index 0000000..b265001 --- /dev/null +++ b/examples/issue-generation/ANALYSIS.md @@ -0,0 +1,432 @@ +# Issue Generation Examples - MECE Analysis + +## Executive Summary + +The `/examples/issue-generation` directory has **good content coverage** but suffers from: +1. **Overlapping content** between files (not mutually exclusive) +2. **No clear learning path** (lacks progressive structure) +3. **README as dumping ground** (should be navigation hub) +4. **⚠️ CRITICAL: Outdated task sizing** - References 4-8 hour tasks, but AI-assisted development enables **<1 hour tasks** for much faster feedback cycles + +**Recommendation**: Restructure to create clear, non-overlapping files with a guided learning journey AND update task sizing guidance for AI-first development. + +--- + +## Current Structure Assessment + +### Files Inventory +``` +├── README.md (5.4KB) # Overview + examples + comparison +├── ai-prompts-for-epic-management.md (5.5KB) # AI prompts for epics +├── beads-example.md (3.1KB) # Beads tool guide +├── ci-integration-examples.md (9.0KB) # CI/CD patterns +├── detailed-kanban-workflow.md (7.2KB) # Kanban + epic examples +└── issue-generator.py (16KB) # Python script +``` + +--- + +## MECE Violations + +### ❌ NOT Mutually Exclusive + +#### Problem 1: Epic Management Duplication +**ai-prompts-for-epic-management.md** and **detailed-kanban-workflow.md** overlap significantly: + +| Topic | ai-prompts... | detailed-kanban... | +|-------|---------------|-------------------| +| Epic breakdown | ✅ Lines 5-29 | ✅ Lines 6-66 | +| Progress tracking | ✅ Lines 82-105 | ✅ Lines 143-180 | +| Dependency management | ✅ Lines 128-155 | ✅ Lines 216-233 | +| Epic-subissue linking | ✅ Lines 31-50 | ✅ Lines 69-141 | + +**Impact**: Users don't know which file to read, content is redundant. + +#### Problem 2: README Contains Deep Examples +**README.md** includes: +- Feature breakdown example (lines 48-57) +- Epic decomposition example (lines 59-72) +- Bug triage example (lines 74-81) + +These belong in dedicated example files, not the navigation hub. + +#### Problem 3: AI Prompts Scattered +AI prompt examples appear in: +- README.md (lines 38-45, 64-69) +- ai-prompts-for-epic-management.md (entire file) +- detailed-kanban-workflow.md (lines 13-34, 72-88, 145-162, 217-232) + +**Impact**: No single source of truth for prompt templates. + +### ✅ Collectively Exhaustive + +**Good news**: All necessary topics are covered: +- ✅ Tool selection (Beads vs traditional) +- ✅ AI prompt templates +- ✅ Epic management patterns +- ✅ Kanban workflow optimization +- ✅ CI/CD integration +- ✅ Programmatic generation (Python) +- ✅ Progress tracking +- ✅ Dependency validation + +**Gaps identified**: +1. Missing a "Basics/Getting Started" document explaining core concepts +2. **CRITICAL**: Task sizing guidance is outdated - examples reference 4-8 hours but AI-assisted development enables <1 hour tasks: + - AI can generate code in minutes, not hours + - Faster iteration cycles (prompt → code → test → deploy) + - Tighter feedback loops + - More frequent deployments + - Traditional Kanban was 4-8 hours for manual coding + - **AI-assisted Kanban should be <1 hour per task** + +--- + +## Logical Flow Issues + +### Current User Journey (Confusing) +``` +User lands on README → + Sees tool comparison immediately (premature) + Sees scattered examples + Unclear where to go next + Three files about epics (which one?) +``` + +### Ideal User Journey (Clear) +``` +User lands on README → + 1. Understand core concepts + 2. See decision tree (Beads vs traditional) + 3. Choose their path: + Path A: Traditional tools → AI prompts → Epic mgmt → CI integration + Path B: Beads → Beads guide → Best practices + 4. Advanced: Python script for automation +``` + +--- + +## CRITICAL: Task Sizing for AI-Assisted Development + +### Current Problem +All files reference **4-8 hour tasks** as the Kanban standard: +- README.md line 19: "4-8 hour tasks for continuous flow" +- README.md line 31: "Tasks deployable in <1 day (4-8 hours max)" +- ai-prompts-for-epic-management.md line 11: "4-8 hours max" +- detailed-kanban-workflow.md line 21: "Maximum 4-8 hours per task" +- ci-integration-examples.md references same sizing + +### Why This Is Wrong for AI Development + +**Traditional Kanban (Manual Coding)**: +``` +Planning (30 min) → Coding (6 hours) → Testing (1 hour) → Review (30 min) = 8 hours +``` + +**AI-Assisted Kanban**: +``` +Planning (5 min) → AI prompting (10 min) → Review/refine (20 min) → Testing (15 min) → Deploy (10 min) = 60 min +``` + +### AI Development Velocity +- **Code generation**: Minutes, not hours +- **Iteration cycles**: 5-15 minutes (prompt → review → refine) +- **Testing**: Automated, runs in parallel +- **Deployment**: Continuous, not batched +- **Feedback**: Immediate, not end-of-day + +### Recommended Task Sizing + +**AI-Assisted Development**: +- **Target**: <1 hour per task +- **Maximum**: 2 hours (if longer, split it) +- **Optimal**: 15-45 minutes for most tasks + +**Examples**: +``` +❌ Old (4-8 hours): "Implement user authentication system" +✅ New (<1 hour): "Add JWT token generation function" +✅ New (<1 hour): "Add token validation middleware" +✅ New (<1 hour): "Write integration tests for token flow" +✅ New (<1 hour): "Add password reset endpoint" +``` + +### Impact on All Files + +**Every file needs updating** to reflect AI-first task sizing: +1. README.md: Change "4-8 hours" to "<1 hour" +2. ai-prompts-for-epic-management.md: Update all examples +3. detailed-kanban-workflow.md: Revise cycle time targets +4. ci-integration-examples.md: Update timing expectations +5. beads-example.md: Already mentions "4-8 hours" in best practices + +### Benefits of <1 Hour Tasks +1. **Faster feedback**: Deploy multiple times per day +2. **Reduced risk**: Smaller changes = easier to debug +3. **Better flow**: No work sits "in progress" for hours +4. **Higher quality**: More frequent testing and validation +5. **AI advantage**: Leverages AI's speed, not constrained by human typing speed + +--- + +## Detailed File Analysis + +### README.md (❌ Needs Restructuring) +**Current problems:** +- Mixes overview with deep examples +- Comparison table appears too early +- No clear "what next?" guidance + +**Should contain:** +- Brief overview (3-4 sentences) +- Learning path navigation +- File descriptions with "read this if..." +- Quick decision tree + +**Should NOT contain:** +- Detailed code examples +- Long AI prompts +- Deep technical content + +### ai-prompts-for-epic-management.md (⚠️ Overlaps with detailed-kanban-workflow.md) +**Content:** +- Epic creation prompts ✅ +- Universal linking ✅ +- RED/GREEN/REFACTOR ✅ +- Progress tracking ✅ +- CI/CD prompts ✅ +- Dependency prompts ✅ + +**Recommendation:** This should be THE authoritative prompt library. Remove duplicate content from other files and point here. + +### detailed-kanban-workflow.md (⚠️ Overlaps with ai-prompts...) +**Content:** +- Kanban epic breakdown example +- Generated work items JSON +- Epic-subissue relationships +- Progress tracking examples +- Dependency validation + +**Recommendation:** Rename to `workflow-examples.md`. Focus on OUTPUT examples (JSON structures, relationship graphs) rather than INPUT (AI prompts). Cross-reference ai-prompts file for the prompts themselves. + +### ci-integration-examples.md (✅ Well Scoped) +**Content:** +- CI integration patterns +- Traceability structures +- File validation +- Coverage enforcement +- GitHub Actions examples + +**Recommendation:** Keep as-is. This is well-scoped and doesn't overlap significantly with other files. + +### beads-example.md (✅ Well Scoped) +**Content:** +- Beads installation +- Quick start commands +- AI agent workflow +- Python integration +- Best practices + +**Recommendation:** Keep as-is. Tool-specific guide is appropriately separated. + +### issue-generator.py (✅ Well Scoped) +**Content:** +- Python implementation for programmatic generation + +**Recommendation:** Keep as-is. Consider adding a companion `issue-generator-guide.md` if usage becomes complex. + +--- + +## Recommended Restructuring + +### Option A: Consolidate by Learning Path (RECOMMENDED) + +``` +examples/issue-generation/ +├── README.md # Navigation hub (2KB max) +├── 01-getting-started.md # NEW: Core concepts, 4-8 hour tasks, Kanban principles +├── 02-choosing-tools.md # NEW: Decision tree, comparison table, when to use what +├── 03-ai-prompts.md # RENAME: ai-prompts-for-epic-management.md (consolidated prompts) +├── 04-workflow-examples.md # RENAME: detailed-kanban-workflow.md (output examples) +├── 05-ci-integration.md # KEEP: ci-integration-examples.md +├── beads-guide.md # RENAME: beads-example.md (parallel track for Beads users) +└── issue-generator.py # KEEP: Python script +``` + +**Flow:** +1. README → "Start at 01-getting-started.md" +2. 01 → Understand principles +3. 02 → Choose traditional or Beads +4. Traditional path: 03 → 04 → 05 +5. Beads path: beads-guide.md +6. Advanced: issue-generator.py + +### Option B: Reorganize by Topic (Alternative) + +``` +examples/issue-generation/ +├── README.md # Navigation hub +├── concepts/ +│ └── kanban-principles.md # Core concepts +├── tools/ +│ ├── tool-comparison.md # Decision framework +│ └── beads-guide.md # Beads-specific +├── workflows/ +│ ├── ai-prompts.md # All prompts +│ ├── epic-management.md # Epic patterns +│ └── ci-integration.md # CI/CD patterns +└── automation/ + └── issue-generator.py # Script +``` + +--- + +## Specific Changes Required + +### 1. Merge Duplicate Epic Content + +**Action:** Consolidate into single authoritative file + +**From ai-prompts-for-epic-management.md:** +- Keep: All AI prompt templates (these are the INPUT) + +**From detailed-kanban-workflow.md:** +- Keep: JSON output examples, relationship structures (these are the OUTPUT) + +**Result:** Clear separation between "what to ask AI" vs "what you get back" + +### 2. Slim Down README.md + +**Remove:** +- Detailed code examples (lines 48-81) +- Long AI prompts (lines 38-45, 64-69) +- Deep technical content + +**Add:** +- Learning path guide: "New to issue generation? Start here..." +- File descriptions: "Read ai-prompts.md if you want to..." +- Decision tree: "Use Beads if... Use GitHub/JIRA if..." + +**Keep:** +- Directory structure overview +- Key features (high-level only) +- Comparison table (it's useful here for quick reference) + +### 3. Create Missing "Getting Started" + +**New file: 01-getting-started.md** + +Content: +```markdown +# Getting Started with AI Issue Generation + +## What Are Kanban-Optimized Issues? +- Work items sized for 4-8 hours +- Independently deployable +- Continuous flow over batching + +## Why 4-8 Hours? +- Rapid feedback cycles +- Reduced work-in-progress +- Earlier detection of problems + +## Core Principles +1. Flow over estimates +2. Independent deployment +3. RED/GREEN/REFACTOR +4. CI/CD for every task + +## Next Steps +- Choosing tools: See 02-choosing-tools.md +- AI prompts: See 03-ai-prompts.md +``` + +### 4. Rename Files for Clarity + +| Current | Proposed | Reason | +|---------|----------|--------| +| ai-prompts-for-epic-management.md | 03-ai-prompts.md | Clearer name, numbered sequence | +| detailed-kanban-workflow.md | 04-workflow-examples.md | More accurate description | +| ci-integration-examples.md | 05-ci-integration.md | Consistent naming | +| beads-example.md | beads-guide.md | "Guide" is more descriptive than "example" | + +### 5. Add Cross-References + +Each file should clearly point to related files: + +```markdown +# ai-prompts.md + +See [workflow-examples.md](04-workflow-examples.md) for examples of the JSON structures these prompts generate. + +See [ci-integration.md](05-ci-integration.md) for CI/CD integration patterns. +``` + +--- + +## Implementation Plan + +### Phase 1: Create New Structure (No Breaking Changes) +1. Create `01-getting-started.md` +2. Create `02-choosing-tools.md` (extract from README) +3. Keep existing files unchanged + +### Phase 2: Consolidate Content +1. Merge duplicate epic content between ai-prompts and detailed-kanban +2. Update README to be navigation hub only +3. Add cross-references between files + +### Phase 3: Rename (Breaking Changes) +1. Rename files with numbered prefixes +2. Update all internal links +3. Update main README.md references + +### Phase 4: Validate +1. Check all internal links work +2. Test user journey from README → 01 → 02 → etc. +3. Verify no orphaned content + +--- + +## Success Metrics + +✅ **Mutually Exclusive**: Each file has a clear, non-overlapping purpose +✅ **Collectively Exhaustive**: All topics covered, no gaps +✅ **Logical Flow**: Clear learning path from basics → advanced +✅ **Easy Navigation**: README acts as effective hub +✅ **No Duplication**: Single source of truth for each topic + +--- + +## Priority Recommendations + +### 🔴 CRITICAL Priority (Do Immediately) +1. **Update task sizing everywhere** - Change "4-8 hours" to "<1 hour" across all files + - This is a fundamental conceptual error for AI-assisted development + - Affects: README.md, ai-prompts-for-epic-management.md, detailed-kanban-workflow.md, ci-integration-examples.md, beads-example.md + - Impact: Changes user expectations and workflow design + +### 🔴 High Priority (Do First) +2. **Slim down README.md** - Make it a navigation hub +3. **Merge epic content** - Consolidate ai-prompts and detailed-kanban +4. **Create getting-started.md** - Fill the conceptual gap, emphasize AI-first approach + +### 🟡 Medium Priority +5. **Add cross-references** - Link related files +6. **Rename files** - Numbered sequence for clarity + +### 🟢 Low Priority +7. **Create tool-comparison.md** - Separate if README gets too long +8. **Add diagrams** - Visual learning path with AI-assisted timing + +--- + +## Conclusion + +The current structure has **good content** but **poor organization**. The recommended restructuring will: +- Eliminate duplication (MECE compliance) +- Create clear learning path (logical flow) +- Make README an effective navigation hub +- Improve discoverability and user experience + +**Next step:** Implement Phase 1 (create new files without breaking existing structure). diff --git a/examples/issue-generation/README.md b/examples/issue-generation/README.md index 33cace0..b89db53 100644 --- a/examples/issue-generation/README.md +++ b/examples/issue-generation/README.md @@ -1,82 +1,146 @@ -# AI Issue Generation Example +# AI Issue Generation Examples -This directory demonstrates the AI Issue Generation pattern focusing on practical AI prompts for creating Kanban-optimized work items with proper epic-subissue relationships. +Learn how to generate Kanban-optimized issues for AI-assisted development with <1 hour cycle times. + +## 🚀 Quick Start + +**New to AI issue generation?** Follow this learning path: + +1. **[Getting Started](01-getting-started.md)** - Core concepts, why <1 hour tasks, AI development velocity +2. **[Choosing Tools](02-choosing-tools.md)** - Decision framework: Beads vs GitHub/JIRA/Linear +3. **[AI Prompts](03-ai-prompts.md)** - Templates for epic breakdown, progress tracking, dependencies +4. **[Workflow Examples](04-workflow-examples.md)** - Real-world epic management and relationship patterns +5. **[CI Integration](05-ci-integration.md)** - Traceability, file validation, automated reporting + +**For Beads users**: See [beads-guide.md](beads-guide.md) for git-native, AI-first issue tracking ## Directory Structure ``` -ai-issue-generation/ -├── README.md # This file -├── issue-generator.py # Basic issue generation example -└── ai-prompts-for-epic-management.md # Practical AI prompts for epic-subissue management +├── README.md # You are here - navigation hub +├── 01-getting-started.md # Core concepts and AI-first principles +├── 02-choosing-tools.md # Tool comparison and decision framework +├── 03-ai-prompts.md # AI prompt templates for issue generation +├── 04-workflow-examples.md # Epic breakdown and relationship patterns +├── 05-ci-integration.md # CI/CD integration and traceability +├── beads-guide.md # Beads setup and usage guide +├── issue-generator.py # Python script for automated generation +└── ANALYSIS.md # MECE analysis and restructuring notes ``` -## Key Features +## Key Concepts + +### Why <1 Hour Tasks? + +AI-assisted development is fundamentally faster than manual coding: + +| Activity | Manual | AI-Assisted | +|----------|--------|-------------| +| Code generation | Hours | Minutes | +| Iteration cycle | Hours | 5-15 minutes | +| Deployment | 1-2x/day | Multiple times/hour | +| **Total task time** | **4-8 hours** | **<1 hour** | + +**Traditional**: `Planning (30min) + Coding (6hrs) + Testing (1hr) + Review (30min) = 8 hours` + +**AI-Assisted**: `Planning (5min) + AI prompting (10min) + Review (20min) + Testing (15min) = 50 minutes` + +See [01-getting-started.md](01-getting-started.md) for detailed velocity comparisons. + +### Core Principles -- **Kanban-Optimized Work Items**: 4-8 hour tasks for continuous flow -- **Epic-Subissue Relationship Management**: Bidirectional linking and progress tracking -- **Multi-Platform Integration**: GitHub Issues, JIRA, Azure DevOps with native relationship support -- **Template-Based Generation**: Consistent issue formatting with relationship metadata -- **Dependency Mapping**: Automatic task dependency detection and validation -- **Automated Progress Tracking**: Real-time epic status updates based on subissue completion -- **Workflow Automation**: CI/CD integration for epic lifecycle management -- **Cross-Platform Compatibility**: Universal linking strategies that work across tools +1. **Flow over estimates**: Split work until each task is <1 hour +2. **Independent deployment**: Every task ships without waiting +3. **RED/GREEN/REFACTOR**: Test-first, minimal implementation, then clean +4. **CI/CD always**: Every task runs through the pipeline -## Quick Start +## Tool Decision Framework -The most effective approach is using AI prompts directly with your issue tracking system. See `ai-prompts-for-epic-management.md` for comprehensive prompt templates that ensure: -- Tasks deployable in <1 day (4-8 hours max) -- Independent deployment capability -- Epic-subissue cross-linking -- RED/GREEN/REFACTOR development cycle -- CI/CD integration for each task +### Choose Beads if: +- AI-assisted development is your primary workflow +- Solo developer or small technical team +- Want git-native issues versioned with code +- Work offline frequently +- Need <50ms query speed for AI agents + +### Choose GitHub/JIRA/Linear if: +- Team includes non-technical stakeholders +- Need rich collaboration (comments, mentions, web UI) +- Open source with external contributors +- Enterprise requirements (SSO, compliance) + +See [02-choosing-tools.md](02-choosing-tools.md) for complete comparison and decision tree. + +## Comparison Table + +| Feature | Beads | GitHub Issues | JIRA | Linear | +|---------|-------|---------------|------|--------| +| **AI Agent Access** | ✅ Native CLI | ⚠️ API + token | ⚠️ Complex API | ⚠️ API + token | +| **Offline Work** | ✅ Full | ❌ Limited | ❌ None | ❌ None | +| **Git Integration** | ✅ Native | ⚠️ External | ❌ Separate | ❌ Separate | +| **Setup Time** | ✅ Instant | ⚠️ Minutes | ❌ Hours/Days | ⚠️ Minutes | +| **Query Speed** | ✅ <50ms | ⚠️ 100-500ms | ⚠️ 200-1000ms | ⚠️ 100-300ms | +| **Non-tech Users** | ❌ CLI only | ✅ Web UI | ✅ Web UI | ✅ Web UI | +| **Collaboration** | ⚠️ Basic | ✅ Rich | ✅ Enterprise | ✅ Modern | +| **Integrations** | ❌ Minimal | ✅ Extensive | ✅ Enterprise | ✅ Modern | +| **Cost** | ✅ Free | ✅ Free | ❌ Paid | ⚠️ Paid | + +**Key Insights**: +- **Beads excels** for AI agent workflows, offline development, and git-native issue tracking +- **GitHub/JIRA/Linear excel** for team collaboration, rich features, and stakeholder visibility +- **Consider a hybrid approach**: Use Beads for internal tech work, traditional tools for external visibility + +## Quick Examples + +### Create Epic with <1 Hour Tasks -Example: ```bash ai "Create epic for User Authentication with subissues that are: -1. Deployable in <8 hours each +1. Deployable in <1 hour each (AI-assisted development) 2. Independently deployable 3. Cross-linked to parent epic 4. Include RED/GREEN/REFACTOR acceptance criteria 5. Have CI/CD pipeline hooks" ``` -## Usage Examples - -### Feature Breakdown -```bash -# Input: High-level feature request -python issue-generator.py \ - --feature "Password reset via email" \ - --platform github \ - --max-hours 8 \ - --output password-reset-issues.json -``` - -### Epic Decomposition with Relationship Management - -Use AI prompts to create properly structured epics: +### Break Down Feature ```bash ai "Break down 'User Dashboard' epic following these rules: -- Each subissue must be deployable same day (4-8 hours) +- Each subissue must be deployable in <1 hour (AI-assisted development) - Create bidirectional epic-subissue links - Use RED/GREEN/REFACTOR for development tasks - Include CI/CD pipeline triggers for each subissue - Auto-update epic progress when subissues complete" ``` -See `ai-prompts-for-epic-management.md` for complete prompt templates. +See [03-ai-prompts.md](03-ai-prompts.md) for complete prompt library. + +### Beads Workflow (CLI) -### Bug Triage ```bash -# Input: Bug report -python issue-generator.py \ - --bug "Login fails with 500 error" \ - --priority high \ - --assign-team backend +# Create epic +bd create --title "Epic: User Auth System" + +# Create subtask with RED/GREEN/REFACTOR +bd create --title "Add JWT validation" \ + --body "RED: Write failing test +GREEN: Implement validation +REFACTOR: Extract key management" \ + --parent issue-generation-7c9 + +# Query ready work (<50ms) +bd ready + +# Update status +bd update issue-generation-7c9.1 --status done + +# Sync via git +git add .beads/ && git commit -m "beads: complete JWT validation" ``` +See [beads-guide.md](beads-guide.md) for complete Beads tutorial. + ## Integration Philosophy Rather than complex API scripts, use AI prompts that work with your existing issue tracking tools: @@ -85,5 +149,50 @@ Rather than complex API scripts, use AI prompts that work with your existing iss - **Platform-Agnostic Prompts**: Same prompt structure works across GitHub, JIRA, Azure DevOps - **Focus on Requirements**: Specify what you need (timing, dependencies, CI/CD), not how to implement - **Automation Through Simplicity**: Use platform's built-in automation rather than custom scripts +- **Git-Native Option**: For AI-first workflows, consider Beads for CLI-native, offline-capable issue tracking + +## Learning Path + +### Beginners +1. Start: [01-getting-started.md](01-getting-started.md) +2. Choose: [02-choosing-tools.md](02-choosing-tools.md) +3. Try: Pick one AI prompt from [03-ai-prompts.md](03-ai-prompts.md) + +### Intermediate +1. Review: [04-workflow-examples.md](04-workflow-examples.md) +2. Implement: [05-ci-integration.md](05-ci-integration.md) +3. Automate: Use [issue-generator.py](issue-generator.py) + +### Advanced +1. Customize: Modify prompts for your workflow +2. Integrate: Build CI/CD automation +3. Scale: Implement hybrid Beads + traditional tools + +## Common Questions + +**Q: Why <1 hour instead of 4-8 hours?** +A: AI generates code in minutes, not hours. See [01-getting-started.md#why-1-hour-tasks](01-getting-started.md#why-1-hour-tasks-for-ai-development) + +**Q: Which tool should I use?** +A: See the decision tree in [02-choosing-tools.md#quick-decision-tree](02-choosing-tools.md#quick-decision-tree) + +**Q: How do I break down large epics?** +A: Use AI prompts from [03-ai-prompts.md#epic-creation](03-ai-prompts.md#epic-creation-with-subissue-breakdown) + +**Q: Can I use Beads with GitHub?** +A: Yes! See hybrid approach in [02-choosing-tools.md#hybrid-approach](02-choosing-tools.md#hybrid-approach) + +## Resources + +- **Python Script**: [issue-generator.py](issue-generator.py) - Automated issue generation +- **Analysis**: [ANALYSIS.md](ANALYSIS.md) - MECE analysis of this directory structure +- **Main Pattern**: [../../README.md#issue-generation](../../README.md#issue-generation) - Pattern documentation + +## Getting Help + +- **Beads Issues**: [GitHub - steveyegge/beads](https://github.com/steveyegge/beads) +- **Pattern Issues**: [GitHub - PaulDuvall/ai-development-patterns](https://github.com/PaulDuvall/ai-development-patterns) + +--- -The key is providing clear, specific instructions to AI that result in properly structured, deployable work items. \ No newline at end of file +**Start here**: [01-getting-started.md](01-getting-started.md) to learn AI-first issue generation principles. diff --git a/examples/issue-generation/beads-guide.md b/examples/issue-generation/beads-guide.md new file mode 100644 index 0000000..d0d5908 --- /dev/null +++ b/examples/issue-generation/beads-guide.md @@ -0,0 +1,115 @@ +# Beads: Git-Based Issue Tracking for AI Agents + +Beads is a lightweight, git-based issue tracking system designed for AI coding agents. It provides persistent memory across sessions with zero setup. + +**Source**: [github.com/steveyegge/beads](https://github.com/steveyegge/beads) + +## Quick Start + +```bash +# Install +pip install beads-project + +# Initialize in your project +cd your-project +bd init + +# Create issues +bd create --title "Epic: User Authentication System" +# Output: Created bd-a1b2 + +bd create --title "Implement JWT token generation" \ + --body "RED: Test JWT.generate() +GREEN: Implement with exp/iat claims +REFACTOR: Extract key management" \ + --parent bd-a1b2 +# Output: Created bd-c3d4 + +# Query ready work +bd ready +# bd-c3d4: Implement JWT token generation + +# Start and complete work +bd start bd-c3d4 +bd done bd-c3d4 + +# Sync via git +git add .beads/ +git commit -m "beads: add auth tasks" +git push +``` + +## AI Agent Workflow + +```bash +# AI agent discovers new work during implementation +bd create --title "Add JWT key rotation" \ + --body "Discovered need for security - scheduled key rotation" \ + --discovered-from bd-c3d4 \ + --blocks bd-c3d4 + +# Agent queries what's unblocked and ready +bd ready + +# Agent shows epic progress +bd show bd-a1b2 --tree +# bd-a1b2: Epic: User Authentication [open] +# ├─ bd-c3d4: JWT generation [done] +# └─ bd-e5f6: Password reset [in progress] +# Progress: 1/2 complete (50%) +``` + +## Python Integration + +```python +import subprocess +import json + +def create_beads_issue(title, body, parent=None): + cmd = ['bd', 'create', '--title', title, '--body', body, '--format', 'json'] + if parent: + cmd.extend(['--parent', parent]) + result = subprocess.run(cmd, capture_output=True, text=True) + return json.loads(result.stdout)['id'] + +# Generate epic with tasks +epic_id = create_beads_issue("Epic: User Auth", "Complete auth system") +create_beads_issue("Setup database schema", "RED/GREEN/REFACTOR", parent=epic_id) +create_beads_issue("Implement login endpoint", "RED/GREEN/REFACTOR", parent=epic_id) +``` + +## Why Beads? + +Beads is optimized for AI agent workflows with: +- **Native CLI access**: No API tokens or authentication complexity +- **Offline-first**: Create/update without internet, sync via git +- **Git-native**: Issues version with code in `.beads/issues.jsonl` +- **Fast queries**: <50ms (local SQLite) vs 100-500ms API calls +- **Zero dependencies**: No accounts, tokens, or external services + +For a detailed comparison with GitHub/JIRA/Linear, see the [comparison table in README.md](README.md#comparison-table). + +## Best Practices + +**Keep tasks atomic (<1 hour for AI development)**: +```bash +✅ bd create --title "Implement JWT token generation" +❌ bd create --title "Build entire authentication system" +``` + +**Use dependency types correctly**: +```bash +--blocks # Must be done before dependent task +--parent # Organizational hierarchy (epic/subissue) +--related # Related but not blocking +--discovered-from # Found during implementation +``` + +**Commit Beads changes regularly**: +```bash +git add .beads/ +git commit -m "beads: add authentication tasks" +git push +``` + +For more details, see the [Beads documentation](https://github.com/steveyegge/beads).