feat: product requirement driven workflow system - #34
Conversation
* feat(feature-discovery): complete task #1 - Core Types * feat(feature-discovery): complete task #2 - Event Types * feat(feature-discovery): complete task #3 - Frontmatter Parser * feat(feature-discovery): complete task #4 - PRD Parser * feat(feature-discovery): complete task #5 - PRD Validator * feat(feature-discovery): complete task #6 - Discovery Functions * feat(feature-discovery): complete task #7 - PRD Repository --------- Co-authored-by: Test User <test@test.com>
* feat(spec-review): complete task #1 - Review Core Types * feat(spec-review): complete task #2 - Schema Validation * feat(spec-review): complete task #3 - Review Criteria Definitions * feat(spec-review): complete task #4 - Review Event Types * feat(spec-review): complete task #5 - Feedback Application * feat(spec-review): complete task #6 - Review Loop Orchestration --------- Co-authored-by: Test User <test@test.com>
* feat(feature-prioritizer): complete task #1 - Prioritization Types * feat(feature-prioritizer): complete task #2 - PRD Loader * feat(feature-prioritizer): complete task #4 - Response Parser * feat(feature-prioritizer): complete task #3 - Prioritizer Core * feat(feature-prioritizer): complete task #5 - CLI Command --------- Co-authored-by: Test User <test@test.com>
* feat(feature-workflow): complete task #1 - Feature Status States * feat(feature-workflow): complete task #2 - Spec Commit Operations * feat(feature-workflow): complete task #3 - Drift Detection * feat(feature-workflow): complete task #4 - Auto-Triggered Completion * feat(feature-workflow): complete task #5 - Review Cycle Management * feat(feature-workflow): complete task #6 - Workflow Orchestration --------- Co-authored-by: Test User <test@test.com>
- Add terminal state guard in scheduler.Complete() to prevent infinite loop when UnitCompleted events are re-emitted - Fix PR existence check to handle empty JSON array response from gh CLI - Add worktree-aware status refresh so `choo status` shows correct progress - Auto-detect current branch as default target (instead of always 'main') - Auto-push target branch if not on remote - Reorganize PRD docs into docs/prds/ directory Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove duplicate Client type from git/commit.go (use exec.go's Client) - Add WorktreePath alias to git.Client for worktree operations - Rename feature.Status to LifecycleStatus to avoid collision with states.go - Rename PRD in drift.go to DriftPRD to avoid collision with types.go - Add NewDriftDetectorFromPRD helper for type conversion - Remove placeholder BranchManager from workflow.go (use branch.go's impl) - Add Units field to canonical PRD type for completion tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update drift_test.go to use DriftPRD and DriftUnit types - Add SetBody method to DriftDetector for testing - Update workflow_test.go to use drift.SetBody() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This simplifies the orchestrator flow by merging unit branches directly to the feature branch locally instead of creating PRs. Key changes: - Remove PR-related states (pr_open, in_review, merging) from scheduler - Simplify unit lifecycle: pending -> in_progress -> complete - Replace createPR() with mergeToFeatureBranch() in worker - Merge happens locally in main repo (no remote push during execution) - Add backwards compatibility for old PR status values - Add UnitMerged event for tracking merge operations Benefits: - Dependent units immediately see predecessor code (no PR merge delay) - Faster execution (no network operations during merge) - User controls when to push feature branch to remote Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
choo/internal/orchestrator/orchestrator.go
Lines 315 to 318 in 7161b9e
When --feature is used, RunOrchestrator sets FeatureMode/FeatureBranch, but Run still passes o.cfg.TargetBranch into workerCfg. The worker uses TargetBranch for worktree creation, rebases, and local merges, so units will continue to merge into the non-feature branch (often main) instead of the feature branch. This breaks the feature workflow by polluting the wrong branch and prevents dependent units from seeing the intended integration branch. Use getTargetBranch() (or override TargetBranch when FeatureMode is true) so workers operate on the feature branch.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| func (c *CompletionChecker) allUnitsComplete() (bool, error) { | ||
| // Find all task spec files for this PRD | ||
| specsDir := filepath.Join("specs/tasks", c.prd.Body) | ||
|
|
There was a problem hiding this comment.
Use PRD ID for specs directory in completion check
allUnitsComplete builds specsDir from c.prd.Body, which is the full markdown content, not the PRD identifier. That path will never match the real specs/tasks/<prd-id> directory, so the check always returns false and feature completion (PR creation) never triggers for valid PRDs. Use c.prd.ID (or derive from FilePath) when constructing the specs directory.
Useful? React with 👍 / 👎.
- Rename docs/prds to docs/prd (singular) and update all references - Fix PRD ID usage: use prd.ID instead of prd.Body in completion.go and workflow.go - Fix spec commit scope: stage only specsDir instead of entire worktree - Add git.StagePath() for staging specific paths - Fix nil agent invoker: add agentInvoker field to App and return clear error - Add clarifying comment about RepoRoot branch checkout assumption in worker.go - Update all tests to use correct PRD ID field Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix errcheck: handle error returns in review.go - Remove unused functions: getTargetBranch, cleanup - Fix S1009: remove unnecessary nil check before len() - Fix SA5011: use t.Fatal for nil checks in tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mirror CI workflow checks (build, vet, lint, test) in the baseline configuration for local validation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* specs update * feat: feature-discovery (#27) * feat(feature-discovery): complete task #1 - Core Types * feat(feature-discovery): complete task #2 - Event Types * feat(feature-discovery): complete task #3 - Frontmatter Parser * feat(feature-discovery): complete task #4 - PRD Parser * feat(feature-discovery): complete task #5 - PRD Validator * feat(feature-discovery): complete task #6 - Discovery Functions * feat(feature-discovery): complete task #7 - PRD Repository --------- Co-authored-by: Test User <test@test.com> * feat: spec-review (#29) * feat(spec-review): complete task #1 - Review Core Types * feat(spec-review): complete task #2 - Schema Validation * feat(spec-review): complete task #3 - Review Criteria Definitions * feat(spec-review): complete task #4 - Review Event Types * feat(spec-review): complete task #5 - Feedback Application * feat(spec-review): complete task #6 - Review Loop Orchestration --------- Co-authored-by: Test User <test@test.com> * feat: feature-prioritizer (#31) * feat(feature-prioritizer): complete task #1 - Prioritization Types * feat(feature-prioritizer): complete task #2 - PRD Loader * feat(feature-prioritizer): complete task #4 - Response Parser * feat(feature-prioritizer): complete task #3 - Prioritizer Core * feat(feature-prioritizer): complete task #5 - CLI Command --------- Co-authored-by: Test User <test@test.com> * feat: feature-workflow (#32) * feat(feature-workflow): complete task #1 - Feature Status States * feat(feature-workflow): complete task #2 - Spec Commit Operations * feat(feature-workflow): complete task #3 - Drift Detection * feat(feature-workflow): complete task #4 - Auto-Triggered Completion * feat(feature-workflow): complete task #5 - Review Cycle Management * feat(feature-workflow): complete task #6 - Workflow Orchestration --------- Co-authored-by: Test User <test@test.com> * feat: feature-branch (#30) * feat(feature-branch): complete task #1 - Feature Types * feat(feature-branch): complete task #3 - Feature Config * feat(feature-branch): complete task #2 - Branch Manager * chore: update status frontmatter --------- Co-authored-by: Test User <test@test.com> * fix: orchestrator reliability and UX improvements - Add terminal state guard in scheduler.Complete() to prevent infinite loop when UnitCompleted events are re-emitted - Fix PR existence check to handle empty JSON array response from gh CLI - Add worktree-aware status refresh so `choo status` shows correct progress - Auto-detect current branch as default target (instead of always 'main') - Auto-push target branch if not on remote - Reorganize PRD docs into docs/prds/ directory Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve type conflicts from merged feature PRs - Remove duplicate Client type from git/commit.go (use exec.go's Client) - Add WorktreePath alias to git.Client for worktree operations - Rename feature.Status to LifecycleStatus to avoid collision with states.go - Rename PRD in drift.go to DriftPRD to avoid collision with types.go - Add NewDriftDetectorFromPRD helper for type conversion - Remove placeholder BranchManager from workflow.go (use branch.go's impl) - Add Units field to canonical PRD type for completion tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: update tests for DriftPRD type change - Update drift_test.go to use DriftPRD and DriftUnit types - Add SetBody method to DriftDetector for testing - Update workflow_test.go to use drift.SetBody() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(feature-cli): complete task #1 - Feature State Types * feat(feature-cli): complete task #2 - PRD Store * feat(feature-cli): complete task #3 - Feature Parent Command * feat(feature-cli): complete task #4 - Feature Start Command * feat(feature-cli): complete task #5 - Feature Status Command * feat(feature-cli): complete task #6 - Feature Resume Command * feat: replace PR workflow with local merge for unit branches This simplifies the orchestrator flow by merging unit branches directly to the feature branch locally instead of creating PRs. Key changes: - Remove PR-related states (pr_open, in_review, merging) from scheduler - Simplify unit lifecycle: pending -> in_progress -> complete - Replace createPR() with mergeToFeatureBranch() in worker - Merge happens locally in main repo (no remote push during execution) - Add backwards compatibility for old PR status values - Add UnitMerged event for tracking merge operations Benefits: - Dependent units immediately see predecessor code (no PR merge delay) - Faster execution (no network operations during merge) - User controls when to push feature branch to remote Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: address PR review feedback for feature workflow system - Rename docs/prds to docs/prd (singular) and update all references - Fix PRD ID usage: use prd.ID instead of prd.Body in completion.go and workflow.go - Fix spec commit scope: stage only specsDir instead of entire worktree - Add git.StagePath() for staging specific paths - Fix nil agent invoker: add agentInvoker field to App and return clear error - Add clarifying comment about RepoRoot branch checkout assumption in worker.go - Update all tests to use correct PRD ID field Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve golangci-lint issues - Fix errcheck: handle error returns in review.go - Remove unused functions: getTargetBranch, cleanup - Fix S1009: remove unnecessary nil check before len() - Fix SA5011: use t.Fatal for nil checks in tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: add baseline checks configuration to .choo.yaml Mirror CI workflow checks (build, vet, lint, test) in the baseline configuration for local validation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Test User <test@test.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* specs update * feat: feature-discovery (#27) * feat(feature-discovery): complete task #1 - Core Types * feat(feature-discovery): complete task #2 - Event Types * feat(feature-discovery): complete task #3 - Frontmatter Parser * feat(feature-discovery): complete task #4 - PRD Parser * feat(feature-discovery): complete task #5 - PRD Validator * feat(feature-discovery): complete task #6 - Discovery Functions * feat(feature-discovery): complete task #7 - PRD Repository --------- Co-authored-by: Test User <test@test.com> * feat: spec-review (#29) * feat(spec-review): complete task #1 - Review Core Types * feat(spec-review): complete task #2 - Schema Validation * feat(spec-review): complete task #3 - Review Criteria Definitions * feat(spec-review): complete task #4 - Review Event Types * feat(spec-review): complete task #5 - Feedback Application * feat(spec-review): complete task #6 - Review Loop Orchestration --------- Co-authored-by: Test User <test@test.com> * feat: feature-prioritizer (#31) * feat(feature-prioritizer): complete task #1 - Prioritization Types * feat(feature-prioritizer): complete task #2 - PRD Loader * feat(feature-prioritizer): complete task #4 - Response Parser * feat(feature-prioritizer): complete task #3 - Prioritizer Core * feat(feature-prioritizer): complete task #5 - CLI Command --------- Co-authored-by: Test User <test@test.com> * feat: feature-workflow (#32) * feat(feature-workflow): complete task #1 - Feature Status States * feat(feature-workflow): complete task #2 - Spec Commit Operations * feat(feature-workflow): complete task #3 - Drift Detection * feat(feature-workflow): complete task #4 - Auto-Triggered Completion * feat(feature-workflow): complete task #5 - Review Cycle Management * feat(feature-workflow): complete task #6 - Workflow Orchestration --------- Co-authored-by: Test User <test@test.com> * feat: feature-branch (#30) * feat(feature-branch): complete task #1 - Feature Types * feat(feature-branch): complete task #3 - Feature Config * feat(feature-branch): complete task #2 - Branch Manager * chore: update status frontmatter --------- Co-authored-by: Test User <test@test.com> * fix: orchestrator reliability and UX improvements - Add terminal state guard in scheduler.Complete() to prevent infinite loop when UnitCompleted events are re-emitted - Fix PR existence check to handle empty JSON array response from gh CLI - Add worktree-aware status refresh so `choo status` shows correct progress - Auto-detect current branch as default target (instead of always 'main') - Auto-push target branch if not on remote - Reorganize PRD docs into docs/prds/ directory Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve type conflicts from merged feature PRs - Remove duplicate Client type from git/commit.go (use exec.go's Client) - Add WorktreePath alias to git.Client for worktree operations - Rename feature.Status to LifecycleStatus to avoid collision with states.go - Rename PRD in drift.go to DriftPRD to avoid collision with types.go - Add NewDriftDetectorFromPRD helper for type conversion - Remove placeholder BranchManager from workflow.go (use branch.go's impl) - Add Units field to canonical PRD type for completion tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: update tests for DriftPRD type change - Update drift_test.go to use DriftPRD and DriftUnit types - Add SetBody method to DriftDetector for testing - Update workflow_test.go to use drift.SetBody() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(feature-cli): complete task #1 - Feature State Types * feat(feature-cli): complete task #2 - PRD Store * feat(feature-cli): complete task #3 - Feature Parent Command * feat(feature-cli): complete task #4 - Feature Start Command * feat(feature-cli): complete task #5 - Feature Status Command * feat(feature-cli): complete task #6 - Feature Resume Command * feat: replace PR workflow with local merge for unit branches This simplifies the orchestrator flow by merging unit branches directly to the feature branch locally instead of creating PRs. Key changes: - Remove PR-related states (pr_open, in_review, merging) from scheduler - Simplify unit lifecycle: pending -> in_progress -> complete - Replace createPR() with mergeToFeatureBranch() in worker - Merge happens locally in main repo (no remote push during execution) - Add backwards compatibility for old PR status values - Add UnitMerged event for tracking merge operations Benefits: - Dependent units immediately see predecessor code (no PR merge delay) - Faster execution (no network operations during merge) - User controls when to push feature branch to remote Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: address PR review feedback for feature workflow system - Rename docs/prds to docs/prd (singular) and update all references - Fix PRD ID usage: use prd.ID instead of prd.Body in completion.go and workflow.go - Fix spec commit scope: stage only specsDir instead of entire worktree - Add git.StagePath() for staging specific paths - Fix nil agent invoker: add agentInvoker field to App and return clear error - Add clarifying comment about RepoRoot branch checkout assumption in worker.go - Update all tests to use correct PRD ID field Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve golangci-lint issues - Fix errcheck: handle error returns in review.go - Remove unused functions: getTargetBranch, cleanup - Fix S1009: remove unnecessary nil check before len() - Fix SA5011: use t.Fatal for nil checks in tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: add baseline checks configuration to .choo.yaml Mirror CI workflow checks (build, vet, lint, test) in the baseline configuration for local validation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Test User <test@test.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* specs update * feat: feature-discovery (#27) * feat(feature-discovery): complete task #1 - Core Types * feat(feature-discovery): complete task #2 - Event Types * feat(feature-discovery): complete task #3 - Frontmatter Parser * feat(feature-discovery): complete task #4 - PRD Parser * feat(feature-discovery): complete task #5 - PRD Validator * feat(feature-discovery): complete task #6 - Discovery Functions * feat(feature-discovery): complete task #7 - PRD Repository --------- Co-authored-by: Test User <test@test.com> * feat: spec-review (#29) * feat(spec-review): complete task #1 - Review Core Types * feat(spec-review): complete task #2 - Schema Validation * feat(spec-review): complete task #3 - Review Criteria Definitions * feat(spec-review): complete task #4 - Review Event Types * feat(spec-review): complete task #5 - Feedback Application * feat(spec-review): complete task #6 - Review Loop Orchestration --------- Co-authored-by: Test User <test@test.com> * feat: feature-prioritizer (#31) * feat(feature-prioritizer): complete task #1 - Prioritization Types * feat(feature-prioritizer): complete task #2 - PRD Loader * feat(feature-prioritizer): complete task #4 - Response Parser * feat(feature-prioritizer): complete task #3 - Prioritizer Core * feat(feature-prioritizer): complete task #5 - CLI Command --------- Co-authored-by: Test User <test@test.com> * feat: feature-workflow (#32) * feat(feature-workflow): complete task #1 - Feature Status States * feat(feature-workflow): complete task #2 - Spec Commit Operations * feat(feature-workflow): complete task #3 - Drift Detection * feat(feature-workflow): complete task #4 - Auto-Triggered Completion * feat(feature-workflow): complete task #5 - Review Cycle Management * feat(feature-workflow): complete task #6 - Workflow Orchestration --------- Co-authored-by: Test User <test@test.com> * feat: feature-branch (#30) * feat(feature-branch): complete task #1 - Feature Types * feat(feature-branch): complete task #3 - Feature Config * feat(feature-branch): complete task #2 - Branch Manager * chore: update status frontmatter --------- Co-authored-by: Test User <test@test.com> * fix: orchestrator reliability and UX improvements - Add terminal state guard in scheduler.Complete() to prevent infinite loop when UnitCompleted events are re-emitted - Fix PR existence check to handle empty JSON array response from gh CLI - Add worktree-aware status refresh so `choo status` shows correct progress - Auto-detect current branch as default target (instead of always 'main') - Auto-push target branch if not on remote - Reorganize PRD docs into docs/prds/ directory Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve type conflicts from merged feature PRs - Remove duplicate Client type from git/commit.go (use exec.go's Client) - Add WorktreePath alias to git.Client for worktree operations - Rename feature.Status to LifecycleStatus to avoid collision with states.go - Rename PRD in drift.go to DriftPRD to avoid collision with types.go - Add NewDriftDetectorFromPRD helper for type conversion - Remove placeholder BranchManager from workflow.go (use branch.go's impl) - Add Units field to canonical PRD type for completion tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: update tests for DriftPRD type change - Update drift_test.go to use DriftPRD and DriftUnit types - Add SetBody method to DriftDetector for testing - Update workflow_test.go to use drift.SetBody() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(feature-cli): complete task #1 - Feature State Types * feat(feature-cli): complete task #2 - PRD Store * feat(feature-cli): complete task #3 - Feature Parent Command * feat(feature-cli): complete task #4 - Feature Start Command * feat(feature-cli): complete task #5 - Feature Status Command * feat(feature-cli): complete task #6 - Feature Resume Command * feat: replace PR workflow with local merge for unit branches This simplifies the orchestrator flow by merging unit branches directly to the feature branch locally instead of creating PRs. Key changes: - Remove PR-related states (pr_open, in_review, merging) from scheduler - Simplify unit lifecycle: pending -> in_progress -> complete - Replace createPR() with mergeToFeatureBranch() in worker - Merge happens locally in main repo (no remote push during execution) - Add backwards compatibility for old PR status values - Add UnitMerged event for tracking merge operations Benefits: - Dependent units immediately see predecessor code (no PR merge delay) - Faster execution (no network operations during merge) - User controls when to push feature branch to remote Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: address PR review feedback for feature workflow system - Rename docs/prds to docs/prd (singular) and update all references - Fix PRD ID usage: use prd.ID instead of prd.Body in completion.go and workflow.go - Fix spec commit scope: stage only specsDir instead of entire worktree - Add git.StagePath() for staging specific paths - Fix nil agent invoker: add agentInvoker field to App and return clear error - Add clarifying comment about RepoRoot branch checkout assumption in worker.go - Update all tests to use correct PRD ID field Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve golangci-lint issues - Fix errcheck: handle error returns in review.go - Remove unused functions: getTargetBranch, cleanup - Fix S1009: remove unnecessary nil check before len() - Fix SA5011: use t.Fatal for nil checks in tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: add baseline checks configuration to .choo.yaml Mirror CI workflow checks (build, vet, lint, test) in the baseline configuration for local validation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Test User <test@test.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* specs update * feat: feature-discovery (#27) * feat(feature-discovery): complete task #1 - Core Types * feat(feature-discovery): complete task #2 - Event Types * feat(feature-discovery): complete task #3 - Frontmatter Parser * feat(feature-discovery): complete task #4 - PRD Parser * feat(feature-discovery): complete task #5 - PRD Validator * feat(feature-discovery): complete task #6 - Discovery Functions * feat(feature-discovery): complete task #7 - PRD Repository --------- Co-authored-by: Test User <test@test.com> * feat: spec-review (#29) * feat(spec-review): complete task #1 - Review Core Types * feat(spec-review): complete task #2 - Schema Validation * feat(spec-review): complete task #3 - Review Criteria Definitions * feat(spec-review): complete task #4 - Review Event Types * feat(spec-review): complete task #5 - Feedback Application * feat(spec-review): complete task #6 - Review Loop Orchestration --------- Co-authored-by: Test User <test@test.com> * feat: feature-prioritizer (#31) * feat(feature-prioritizer): complete task #1 - Prioritization Types * feat(feature-prioritizer): complete task #2 - PRD Loader * feat(feature-prioritizer): complete task #4 - Response Parser * feat(feature-prioritizer): complete task #3 - Prioritizer Core * feat(feature-prioritizer): complete task #5 - CLI Command --------- Co-authored-by: Test User <test@test.com> * feat: feature-workflow (#32) * feat(feature-workflow): complete task #1 - Feature Status States * feat(feature-workflow): complete task #2 - Spec Commit Operations * feat(feature-workflow): complete task #3 - Drift Detection * feat(feature-workflow): complete task #4 - Auto-Triggered Completion * feat(feature-workflow): complete task #5 - Review Cycle Management * feat(feature-workflow): complete task #6 - Workflow Orchestration --------- Co-authored-by: Test User <test@test.com> * feat: feature-branch (#30) * feat(feature-branch): complete task #1 - Feature Types * feat(feature-branch): complete task #3 - Feature Config * feat(feature-branch): complete task #2 - Branch Manager * chore: update status frontmatter --------- Co-authored-by: Test User <test@test.com> * fix: orchestrator reliability and UX improvements - Add terminal state guard in scheduler.Complete() to prevent infinite loop when UnitCompleted events are re-emitted - Fix PR existence check to handle empty JSON array response from gh CLI - Add worktree-aware status refresh so `choo status` shows correct progress - Auto-detect current branch as default target (instead of always 'main') - Auto-push target branch if not on remote - Reorganize PRD docs into docs/prds/ directory Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve type conflicts from merged feature PRs - Remove duplicate Client type from git/commit.go (use exec.go's Client) - Add WorktreePath alias to git.Client for worktree operations - Rename feature.Status to LifecycleStatus to avoid collision with states.go - Rename PRD in drift.go to DriftPRD to avoid collision with types.go - Add NewDriftDetectorFromPRD helper for type conversion - Remove placeholder BranchManager from workflow.go (use branch.go's impl) - Add Units field to canonical PRD type for completion tracking Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: update tests for DriftPRD type change - Update drift_test.go to use DriftPRD and DriftUnit types - Add SetBody method to DriftDetector for testing - Update workflow_test.go to use drift.SetBody() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(feature-cli): complete task #1 - Feature State Types * feat(feature-cli): complete task #2 - PRD Store * feat(feature-cli): complete task #3 - Feature Parent Command * feat(feature-cli): complete task #4 - Feature Start Command * feat(feature-cli): complete task #5 - Feature Status Command * feat(feature-cli): complete task #6 - Feature Resume Command * feat: replace PR workflow with local merge for unit branches This simplifies the orchestrator flow by merging unit branches directly to the feature branch locally instead of creating PRs. Key changes: - Remove PR-related states (pr_open, in_review, merging) from scheduler - Simplify unit lifecycle: pending -> in_progress -> complete - Replace createPR() with mergeToFeatureBranch() in worker - Merge happens locally in main repo (no remote push during execution) - Add backwards compatibility for old PR status values - Add UnitMerged event for tracking merge operations Benefits: - Dependent units immediately see predecessor code (no PR merge delay) - Faster execution (no network operations during merge) - User controls when to push feature branch to remote Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: address PR review feedback for feature workflow system - Rename docs/prds to docs/prd (singular) and update all references - Fix PRD ID usage: use prd.ID instead of prd.Body in completion.go and workflow.go - Fix spec commit scope: stage only specsDir instead of entire worktree - Add git.StagePath() for staging specific paths - Fix nil agent invoker: add agentInvoker field to App and return clear error - Add clarifying comment about RepoRoot branch checkout assumption in worker.go - Update all tests to use correct PRD ID field Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: resolve golangci-lint issues - Fix errcheck: handle error returns in review.go - Remove unused functions: getTargetBranch, cleanup - Fix S1009: remove unnecessary nil check before len() - Fix SA5011: use t.Fatal for nil checks in tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: add baseline checks configuration to .choo.yaml Mirror CI workflow checks (build, vet, lint, test) in the baseline configuration for local validation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Test User <test@test.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Implement a complete product requirement driven (PRD) workflow system that enables multi-unit feature delivery with dependencies, review cycles, and drift detection. Replaces the PR-based workflow with direct local merges for faster, more reliable unit integration.
Key Components:
Test Plan