Skip to content

Multiple PRD #67

@raphaelm22

Description

@raphaelm22

Describe the bug

When a project uses multiple PRD and epic files per feature (e.g., prd-login.md, prd-billing.md, epics-login.md, epics-billing.md), bmalph implement has three issues:

  1. PRD validation uses English-only regexvalidatePrd() searches for section headers like ## Executive Summary, ## Functional Requirements, ## Scope, etc. PRDs written in other languages (e.g., Portuguese ## Resumo Executivo, ## Requisitos Funcionais) trigger false-positive warnings even though all required content is present.

  2. Only the first PRD/epics file is selected — Discovery uses files.find(f => /prd/i.test(f)) which picks the first alphabetical match. In a multi-feature project, this means only one feature's PRD is validated and only one epic file feeds the fix plan. Stories from other features are silently ignored.

  3. Fix plan marks all stories as [x] (completed) — After running bmalph implement --force, the generated @fix_plan.md has all stories checked off, even though sprint-status.yaml shows most as backlog. Ralph then exits immediately on the first loop with plan_complete (0 API calls, all items "completed").

To reproduce

  1. Create a project with multiple feature PRDs:
    _bmad-output/planning-artifacts/
    ├── prd-feature-a.md          # Non-English headers
    ├── prd.md                    # English headers
    ├── epics-feature-a.md
    ├── epics-feature-b.md
    └── epics-feature-c.md
    
  2. Ensure sprint-status.yaml has stories in mixed backlog / done states
  3. Run bmalph implement --force
  4. Observe: 5 PRD validation warnings (false positives from language mismatch)
  5. Run bmalph run
  6. Ralph exits immediately — all items shown as 100% complete, 0 API calls, exit reason: plan_complete

Expected behavior

  • PRD validation should be language-agnostic or support i18n section headers (at minimum: Portuguese, Spanish, English).
  • Multi-file discovery should aggregate all PRD and epics files, not just the first match.
  • Fix plan generation should respect sprint-status.yaml statuses: only stories with status done should be [x], stories with backlog/ready-for-dev should be [ ].

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Node.js version: 25.7.0
  • bmalph version: 2.6.0
  • Shell: Git Bash

Additional context

bmalph implement --force output:

Pre-flight checks
  ! PRD missing Executive Summary or Vision section
  ! PRD missing Functional Requirements section
  ! PRD missing Non-Functional Requirements section
  ! PRD missing Scope section
  ! Architecture missing Tech Stack section

Transition complete: 6 stories (progress preserved)
  5 warning(s)

Ralph Monitor after bmalph run:

LOOP     === Starting Loop #1 ===
WARN     Exit condition: All @fix_plan.md items completed (6/6)
SUCCESS  Graceful exit triggered: plan_complete
INFO     - Total loops: 1
INFO     - API calls used: 0
INFO     - Exit reason: plan_complete

The generated @fix_plan.md had all stories as [x] regardless of their actual status:

- [x] Story 1.1: Setup project       ← sprint-status: done ✓
- [x] Story 1.2: Create logo SVG     ← sprint-status: backlog ✗
- [x] Story 1.3: Login page UI       ← sprint-status: backlog ✗
- [x] Story 2.1: Database migration  ← sprint-status: backlog ✗
- [x] Story 2.2: API endpoint        ← sprint-status: backlog ✗
- [x] Story 2.3: Full login flow     ← sprint-status: backlog ✗

Workaround: Manually edit @fix_plan.md to uncheck incomplete stories before running bmalph run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions