Skip to content

Add ralph-orch MVP design and workflow tools - #1

Merged
RevCBH merged 4 commits into
mainfrom
RevCBH/ralph-orch-spec-prep
Jan 18, 2026
Merged

Add ralph-orch MVP design and workflow tools#1
RevCBH merged 4 commits into
mainfrom
RevCBH/ralph-orch-spec-prep

Conversation

@RevCBH

@RevCBH RevCBH commented Jan 18, 2026

Copy link
Copy Markdown
Owner

Adds comprehensive design specification and supporting tools for Ralph Orchestrator MVP.

Key additions:

  • MVP DESIGN SPEC with full architecture, workflows, and implementation plan
  • Updated ralph workflow skills (spec, ralph-prep) with Go support and agent-driven task selection
  • New spec-validate skill and spec-validator agent for parallel spec validation
  • HOW-TO-RALPH documentation with task selection semantics
  • Example specs showing ralph workflow structure

Enables parallel spec generation, automatic validation, and flexible task ordering within units.

🤖 Generated with Claude Code

Updates skills and agents to support parallel spec generation with validation,
agent-driven task selection within units, and baseline checks. Adds context
briefs for multi-agent workflows. Includes ralph-orch MVP design spec and
supporting documentation.

Co-Authored-By: Claude Haiku 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

Here are some automated review suggestions for this pull request.

Reviewed commit: be35d4258d

ℹ️ 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 thread ralph.sh Outdated
Comment on lines +87 to +91
local file="$1"
local field="$2"
local fm
fm=$(get_frontmatter "$file")
echo "$fm" | grep "^${field}:" | sed "s/^${field}:[[:space:]]*//" | tr -d '"'

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 Strip inline comments from frontmatter values

The frontmatter parser returns the entire line after the colon without removing inline comments. The provided task template in .claude/skills/ralph-prep.md includes inline comments like status: pending # ... and depends_on: [] # ...; with the current parsing, status becomes pending # ... (so find_next_task never matches complete) and depends_on ends up containing words from the comment, which can break dependency checks. This will cause Ralph to re-run completed tasks or refuse to schedule tasks if users copy the template. Consider stripping #... comments before comparisons/parsing.

Useful? React with 👍 / 👎.

RevCBH and others added 2 commits January 18, 2026 14:55
- Generate 8 unit specs: CLI, CONFIG, DISCOVERY, EVENTS, GIT,
  GITHUB, SCHEDULER, WORKER
- Add spec-generator agent definition for parallel spec generation
  (writes directly to files to avoid context compaction)
- Rename config file from .ralph-orch.yaml to .choo.yaml
- Standardize EventBus -> Bus naming across specs

Each spec follows consistent structure: Overview, Requirements,
Design (types, API), Implementation Notes, Testing Strategy,
Design Decisions, References.

Validation identified 13 errors and 6 warnings to address in
follow-up: UnitStatus enum alignment, constructor signature
mismatches, missing CLAUDE.md spec.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Renaming:
- Binary/project: ralph-orch → choo
- Config file references updated throughout

Documentation:
- AGENTS.md: Project guidelines, worktree awareness note, design decisions
- task-generator.md: Agent definition for parallel task generation

Task Specs (55 files across 8 units):
- cli: 9 tasks (root, display, signals, version, status, run, resume, cleanup, wire)
- config: 6 tasks (types, defaults, env, validation, github detection, load)
- discovery: 4 tasks (types, frontmatter, file discovery, validation)
- events: 3 tasks (event types, bus, handlers)
- git: 6 tasks (exec, worktree, branch, commit, merge, conflict)
- github: 5 tasks (types, client, review polling, PR ops, comments)
- scheduler: 6 tasks (graph, state machine, queue, core, dispatch, failure)
- worker: 8 tasks (types, prompt, backpressure, baseline, loop, worker, pool, execute)

Each task spec has:
- YAML frontmatter (task number, status, backpressure command, depends_on)
- Clear objective and deliverables
- Explicit test assertions
- CI compatibility checklist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@RevCBH

RevCBH commented Jan 18, 2026

Copy link
Copy Markdown
Owner Author

@codex please review additional changes

@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

Here are some automated review suggestions for this pull request.

Reviewed commit: 3aa7ec9ae3

ℹ️ 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 thread ralph.sh
Comment on lines +252 to +254
3. Run the backpressure validation command from the frontmatter
4. Also run baseline checks: \`cargo fmt --check\` and \`cargo clippy -- -D warnings\`
5. If any validation fails, fix the issues and re-run until all pass

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 project-appropriate baseline checks in agent prompt

The agent prompt hard-codes Rust baseline checks (cargo fmt/cargo clippy). In this repo the task specs and backpressure commands are Go-based, so an agent following these instructions will fail on a typical Go-only setup where Cargo isn’t installed, preventing tasks from ever reaching status: complete. This blocks the ralph loop in the common case; the baseline checks should be derived from project config (e.g., go fmt/go vet) or omitted when not applicable.

Useful? React with 👍 / 👎.

Comment thread ralph.sh Outdated
RALPH_BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
RALPH_LOG_DIR="$RALPH_BASE_DIR/.ralph"
RALPH_LOG_FILE="$RALPH_LOG_DIR/ralph.log"
RALPH_AGENT_CMD="${RALPH_AGENT_CMD:-claude}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor documented RALPH_CLAUDE_CMD env var

Specs and docs in this commit define RALPH_CLAUDE_CMD as the environment variable for selecting the Claude CLI path, but the script only reads RALPH_AGENT_CMD. Users following the documented variable will still invoke the default claude, which breaks when a custom path is needed (e.g., local installations). Consider reading RALPH_CLAUDE_CMD or supporting both names to match the documented interface.

Useful? React with 👍 / 👎.

Address Codex review comments:

1. Strip inline comments from frontmatter values (P1)
   - Added `sed 's/#.*//'` to get_frontmatter_field
   - Prevents "status: pending # comment" from breaking status detection

2. Use Go baseline checks instead of Rust (P1)
   - Changed agent prompt from cargo fmt/clippy to go fmt/vet
   - Updated run_baseline_checks() to detect go.mod and run Go tools
   - Removes hardcoded koe/src-tauri paths

3. Rename RALPH_AGENT_CMD to RALPH_CLAUDE_CMD (P2)
   - Aligns script with documented env var name in AGENTS.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@RevCBH

RevCBH commented Jan 18, 2026

Copy link
Copy Markdown
Owner Author

Addressed all 3 review comments in commit 6ca339a:

  1. P1 - Strip inline comments: Added sed 's/#.*//' to get_frontmatter_field so status: pending # comment parses correctly as pending

  2. P1 - Go baseline checks: Changed from cargo fmt/clippy to go fmt/vet in both the agent prompt and run_baseline_checks()

  3. P2 - RALPH_CLAUDE_CMD: Renamed env var from RALPH_AGENT_CMD to match documented name in AGENTS.md

@RevCBH
RevCBH merged commit e7e7a2c into main Jan 18, 2026
RevCBH added a commit that referenced this pull request Jan 18, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 18, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 18, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 18, 2026
* ralph: cli/#1 - Root Command and App Struct

Automated commit by ralph.sh

* ralph: cli/#2 - Display Formatting

Automated commit by ralph.sh

* ralph: cli/#3 - Signal Handling

Automated commit by ralph.sh

* ralph: cli/#4 - Version Command

Automated commit by ralph.sh

* ralph: cli/#5 - Status Command

Automated commit by ralph.sh

* ralph: cli/#6 - Run Command

Automated commit by ralph.sh

* ralph: cli/#7 - Resume Command

Automated commit by ralph.sh

* ralph: cli/#8 - Cleanup Command

Automated commit by ralph.sh

* ralph: cli/#9 - Component Wiring

Automated commit by ralph.sh

* ralph: config/#1 - Core Config Types

Automated commit by ralph.sh

* ralph: config/#2 - Config Defaults

Automated commit by ralph.sh

* ralph: config/#3 - Environment Variable Overrides

Automated commit by ralph.sh

* ralph: config/#4 - Config Validation

Automated commit by ralph.sh

* ralph: config/#5 - GitHub Auto-Detection

Automated commit by ralph.sh

* ralph: config/#6 - LoadConfig Function

Automated commit by ralph.sh

* ralph: events/#1 - Event Types

Automated commit by ralph.sh

* ralph: events/#2 - Event Bus

Automated commit by ralph.sh

* ralph: events/#3 - Built-in Handlers

Automated commit by ralph.sh

* ralph: config - Update ralph.log with iteration 4 completion

* Fix PR review feedback: cleanup config and bus data race

- cleanup.go: Load config and use cfg.Worktree.BasePath instead of
  hardcoded .ralph/worktrees path. Repos with custom worktree.base_path
  in .choo.yaml will now be cleaned properly.
- bus.go: Copy handlers slice in dispatch() to prevent data race when
  Subscribe is called concurrently during event dispatch.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
RevCBH added a commit that referenced this pull request Jan 18, 2026
* ralph: cli/#1 - Root Command and App Struct

Automated commit by ralph.sh

* ralph: cli/#2 - Display Formatting

Automated commit by ralph.sh

* ralph: cli/#3 - Signal Handling

Automated commit by ralph.sh

* ralph: cli/#4 - Version Command

Automated commit by ralph.sh

* ralph: cli/#5 - Status Command

Automated commit by ralph.sh

* ralph: cli/#6 - Run Command

Automated commit by ralph.sh

* ralph: cli/#7 - Resume Command

Automated commit by ralph.sh

* ralph: cli/#8 - Cleanup Command

Automated commit by ralph.sh

* ralph: cli/#9 - Component Wiring

Automated commit by ralph.sh

* ralph: config/#1 - Core Config Types

Automated commit by ralph.sh

* ralph: config/#2 - Config Defaults

Automated commit by ralph.sh

* ralph: config/#3 - Environment Variable Overrides

Automated commit by ralph.sh

* ralph: config/#4 - Config Validation

Automated commit by ralph.sh

* ralph: config/#5 - GitHub Auto-Detection

Automated commit by ralph.sh

* ralph: config/#6 - LoadConfig Function

Automated commit by ralph.sh

* ralph: github/#2 - PR Client

Automated commit by ralph.sh

* ralph: github/#3 - Review Polling

Automated commit by ralph.sh

* ralph: github/#4 - PR Operations

Automated commit by ralph.sh

* ralph: github/#5 - PR Comments

Automated commit by ralph.sh

* ralph: Update logs from task execution

Automated commit by ralph.sh

* fix: address PR review feedback

- resume.go: Load state from filesystem before validation instead of
  creating empty discovery that always fails validation
- client.go: Create fresh bytes.Reader inside retry loop to avoid EOF
  on retried requests
- wire.go: Properly wire GitHub PRClient with correct config mapping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
RevCBH added a commit that referenced this pull request Jan 18, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 18, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 18, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 18, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 18, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 18, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 19, 2026
* ralph: cli/#1 - Root Command and App Struct

Automated commit by ralph.sh

* ralph: cli/#2 - Display Formatting

Automated commit by ralph.sh

* ralph: cli/#3 - Signal Handling

Automated commit by ralph.sh

* ralph: cli/#4 - Version Command

Automated commit by ralph.sh

* ralph: cli/#5 - Status Command

Automated commit by ralph.sh

* ralph: cli/#6 - Run Command

Automated commit by ralph.sh

* ralph: cli/#7 - Resume Command

Automated commit by ralph.sh

* ralph: cli/#8 - Cleanup Command

Automated commit by ralph.sh

* ralph: cli/#9 - Component Wiring

Automated commit by ralph.sh

* ralph: config/#1 - Core Config Types

Automated commit by ralph.sh

* ralph: config/#2 - Config Defaults

Automated commit by ralph.sh

* ralph: config/#3 - Environment Variable Overrides

Automated commit by ralph.sh

* ralph: config/#4 - Config Validation

Automated commit by ralph.sh

* ralph: config/#5 - GitHub Auto-Detection

Automated commit by ralph.sh

* ralph: config/#6 - LoadConfig Function

Automated commit by ralph.sh

* ralph: discovery/#1 - Core Types

Automated commit by ralph.sh

* ralph: discovery/#2 - Frontmatter Parsing

Automated commit by ralph.sh

* ralph: discovery/#3 - File Discovery

Automated commit by ralph.sh

* ralph: discovery/#4 - Validation

Automated commit by ralph.sh

* Clean up task state and formatting after rebase

- Clear task_6.log after rebase
- Update git/06-conflict.md status to complete and fix formatting

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Address PR feedback: improve conflict resolution robustness

- Add nil check for Claude client before invoking conflict resolution
- Handle subsequent conflicts when continueRebase hits another conflicting commit
- Add isConflictError helper to detect conflict-related errors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
RevCBH added a commit that referenced this pull request Jan 19, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 19, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 19, 2026
Automated commit by ralph.sh
RevCBH added a commit that referenced this pull request Jan 19, 2026
* ralph: cli/#1 - Root Command and App Struct

Automated commit by ralph.sh

* ralph: cli/#2 - Display Formatting

Automated commit by ralph.sh

* ralph: cli/#3 - Signal Handling

Automated commit by ralph.sh

* ralph: cli/#4 - Version Command

Automated commit by ralph.sh

* ralph: cli/#5 - Status Command

Automated commit by ralph.sh

* ralph: cli/#6 - Run Command

Automated commit by ralph.sh

* ralph: cli/#7 - Resume Command

Automated commit by ralph.sh

* ralph: cli/#8 - Cleanup Command

Automated commit by ralph.sh

* ralph: cli/#9 - Component Wiring

Automated commit by ralph.sh

* ralph: config/#1 - Core Config Types

Automated commit by ralph.sh

* ralph: config/#2 - Config Defaults

Automated commit by ralph.sh

* ralph: config/#3 - Environment Variable Overrides

Automated commit by ralph.sh

* ralph: config/#4 - Config Validation

Automated commit by ralph.sh

* ralph: config/#5 - GitHub Auto-Detection

Automated commit by ralph.sh

* ralph: config/#6 - LoadConfig Function

Automated commit by ralph.sh

* ralph: git/#1 - Git Command Execution Utilities

Automated commit by ralph.sh

* ralph: git/#2 - Worktree Management

Automated commit by ralph.sh

* ralph: git/#3 - Branch Naming via Claude

Automated commit by ralph.sh

* ralph: git/#4 - Commit Operations

Automated commit by ralph.sh

* ralph: git/#5 - Merge Serialization

Automated commit by ralph.sh

* ralph: git/#6 - Conflict Resolution with Claude

Implement conflict resolution using Claude CLI with up to 3 retry attempts. Includes ResolveConflicts method on MergeManager, comprehensive test suite covering success, retry, max attempts, and no-conflict scenarios.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* fix: address PR review feedback

- Remove merge conflict markers from internal/events/bus.go
- Add Worktree field to Branch struct
- Implement full merge flow in Merge() function including rebase,
  conflict resolution, force push, and branch deletion scheduling

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* chore: remove .ralph logs from git tracking

These files are gitignored and should not be tracked.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
RevCBH added a commit that referenced this pull request Jan 19, 2026
RevCBH added a commit that referenced this pull request Jan 19, 2026
RevCBH added a commit that referenced this pull request Jan 19, 2026
)

* ralph: scheduler/#1 - Graph Types and Construction

Automated commit by ralph.sh

* ralph: scheduler/#2 - State Machine and Transitions

Automated commit by ralph.sh

* ralph: scheduler/#3 - Ready Queue Implementation

Automated commit by ralph.sh

* ralph: scheduler/#4 - Scheduler Core and Schedule Method

Automated commit by ralph.sh

* ralph: scheduler/#5 - Dispatch Logic and Parallelism Control

Automated commit by ralph.sh

* ralph: scheduler/#6 - Failure Propagation and Completion

Automated commit by ralph.sh

* Fix PR feedback: remove failed units from ready queue, persist blocked status

- Fail() now removes unit from ready queue before dispatch can grab it
- Add UnitStatusBlocked to discovery.UnitStatus enum
- StateHandler now persists blocked status on UnitBlocked events

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 19, 2026
* ralph: worker/#1 - Worker Types and Configuration

Automated commit by ralph.sh

* ralph: worker/#2 - Task Prompt Construction

Automated commit by ralph.sh

* ralph: worker/#3 - Backpressure Command Runner

Automated commit by ralph.sh

* ralph: worker/#4 - Baseline Checks Runner

Automated commit by ralph.sh

* ralph: worker/#5 - Ralph Loop Implementation

Automated commit by ralph.sh

* ralph: worker/#6 - Single Unit Worker

Automated commit by ralph.sh

* ralph: worker/#7 - Worker Pool Management

Automated commit by ralph.sh

* ralph: worker/#8 - Public Execute Entry Point

Automated commit by ralph.sh

* fix: address PR review feedback

- Fix verifyTaskComplete to read task files from worktree instead of
  main repo, ensuring status changes made by Claude are properly detected

- Implement updateUnitStatus to actually persist status changes to
  IMPLEMENTATION_PLAN.md frontmatter (was previously a no-op)

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 pushed a commit that referenced this pull request Jan 19, 2026
Automated commit by ralph.sh
RevCBH pushed a commit that referenced this pull request Jan 20, 2026
RevCBH pushed a commit that referenced this pull request Jan 20, 2026
RevCBH pushed a commit that referenced this pull request Jan 20, 2026
RevCBH pushed a commit that referenced this pull request Jan 20, 2026
RevCBH added a commit that referenced this pull request Jan 20, 2026
* 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>
RevCBH added a commit that referenced this pull request Jan 20, 2026
* 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>
RevCBH added a commit that referenced this pull request Jan 20, 2026
* 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>
RevCBH added a commit that referenced this pull request Jan 20, 2026
* 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>
RevCBH pushed a commit that referenced this pull request Jan 20, 2026
RevCBH added a commit that referenced this pull request Jan 20, 2026
* 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>
RevCBH pushed a commit that referenced this pull request Jan 21, 2026
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>
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 pushed a commit that referenced this pull request Jan 21, 2026
RevCBH pushed a commit that referenced this pull request Jan 21, 2026
RevCBH pushed a commit that referenced this pull request Jan 21, 2026
RevCBH pushed a commit that referenced this pull request Jan 21, 2026
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