Skip to content

feat: product requirement driven workflow system - #34

Merged
RevCBH merged 19 commits into
mainfrom
RevCBH/prd-workflow-system
Jan 21, 2026
Merged

feat: product requirement driven workflow system#34
RevCBH merged 19 commits into
mainfrom
RevCBH/prd-workflow-system

Conversation

@RevCBH

@RevCBH RevCBH commented Jan 21, 2026

Copy link
Copy Markdown
Owner

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:

  • Feature discovery, prioritization, and state management
  • CLI for starting, resuming, and monitoring feature implementations
  • Spec review system with AI-powered feedback
  • Unit dependency management with local merge workflow
  • Drift detection and automatic rebase handling

Test Plan

  • All existing tests pass
  • 6 feature-cli unit tasks completed with full test coverage
  • Local merge workflow tested with dependent units
  • Orchestrator handles all unit lifecycle states correctly
  • Backwards compatibility with old PR status values verified

Test User and others added 16 commits January 20, 2026 14:01
* 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>
* 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>
- 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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

workerCfg := worker.WorkerConfig{
RepoRoot: o.cfg.RepoRoot,
TargetBranch: o.cfg.TargetBranch,
WorktreeBase: o.cfg.WorktreeBase,

P1 Badge Route feature runs to the feature branch, not TargetBranch

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".

Comment on lines +88 to +91
func (c *CompletionChecker) allUnitsComplete() (bool, error) {
// Find all task spec files for this PRD
specsDir := filepath.Join("specs/tasks", c.prd.Body)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Test User and others added 3 commits January 20, 2026 19:51
- 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>
@RevCBH
RevCBH merged commit f0417fa into main Jan 21, 2026
2 checks passed
@RevCBH
RevCBH deleted the RevCBH/prd-workflow-system branch January 21, 2026 01:26
RevCBH added a commit that referenced this pull request Jan 21, 2026
* 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>
RevCBH added a commit that referenced this pull request Jan 21, 2026
* 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>
RevCBH added a commit that referenced this pull request Jan 21, 2026
* 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>
RevCBH added a commit that referenced this pull request Jan 21, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant