Skip to content

feat: support PRD approval via GitHub PR (enhancement proposal flow)#83

Open
ItzikEzra-rh wants to merge 10 commits into
forge-sdlc:mainfrom
ItzikEzra-rh:feat/prd-via-github-pr
Open

feat: support PRD approval via GitHub PR (enhancement proposal flow)#83
ItzikEzra-rh wants to merge 10 commits into
forge-sdlc:mainfrom
ItzikEzra-rh:feat/prd-via-github-pr

Conversation

@ItzikEzra-rh

Copy link
Copy Markdown

Summary

Adds an opt-in mode where PRD review happens on a GitHub PR instead of Jira. Resolves #33.

  • Per-project opt-in via Jira project property forge.prd_proposals_repo
  • Projects without the property are completely unaffected (existing Jira flow unchanged)
  • Forge opens a PR in the configured proposals repo with the PRD as a markdown file
  • Reviewer feedback on the PR triggers PRD regeneration and a new commit (visible diff)
  • Merging the PR signals PRD approval, sets forge:prd-approved on Jira, proceeds to spec generation
  • Jira comments are ignored at PRD gates when PR mode is active (feedback comes from the PR only)
  • Global PRD_PROPOSALS_REPO env var serves as fallback when forge_require_project_config=false

Files changed

File Change
config.py Add prd_proposals_repo, prd_proposals_path settings
github/client.py Add create_branch, create_or_update_file, get_file_contents
jira/client.py Add get_prd_proposals_repo project property reader
feature/state.py Add prd_pr_url, prd_pr_number, prd_pr_repo, prd_pr_branch
prd_generation.py Add PR creation/update helpers, branch on per-project config
worker.py Add PRD PR event handling (merge, review, comment, self-comment filter)
comment_classifier.py Fix docstring (not Jira-specific)
CLAUDE.md Document new config and flow

Design decisions

  • No new graph nodes or edges — PR creation is a side-effect of generate_prd, gate routing is already source-agnostic
  • Content API over local clone — single-file commits via GitHub REST API, no workspace overhead
  • Merge-only approval — PR review approval is ignored, only merge triggers progression
  • Per-project opt-in — via forge.prd_proposals_repo Jira project property, matching the existing forge.repos pattern

Test plan

🤖 Generated with Claude Code

ItzikEzra-rh and others added 10 commits June 14, 2026 15:23
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add create_branch, create_or_update_file, and get_file_contents methods
to GitHubClient for PR-based PRD approval workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…roval

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… docstring

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace global PRD_APPROVAL_MODE env var with per-project Jira property
forge.prd_proposals_repo. When set on a project, enables PR-based PRD
approval for that project. Global PRD_PROPOSALS_REPO env var serves as
fallback when forge_require_project_config=false.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
In github-pr mode, feedback comes from the PR, not Jira. Jira comments
at PRD gates are now skipped when prd_pr_number exists in state. This
prevents random Jira comments from triggering unwanted PRD regeneration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Address code review findings:
- Move inline ForgeLabel import to module-level (issue forge-sdlc#2)
- Store prd_pr_file_path in state at PR creation time and use it
  directly in _update_prd_proposal_pr, eliminating the fragile
  directory listing approach (issue forge-sdlc#3)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@eshulman2 eshulman2 self-requested a review June 14, 2026 14:52
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.

feat: support PRD workflow via GitHub PR (enhancement proposal flow)

1 participant