feat(docs,repo): flow-pack E4 — /flow-epics command template + local install (#373)#374
Conversation
Reviewer's GuideAdds tracked command-spec docs for the flow-pack brainstorming, umbrella-issue, and epic-creation commands, and wires /flow-epics to create and link epic issues idempotently using GitHub REST/GraphQL with stricter label/milestone checks and local regenerable command copies. Sequence diagram for /flow-epics epic creation and linkingsequenceDiagram
actor User
participant flow_epics as flow_epics_command
participant gh as GitHub_CLI
participant api as GitHub_API
User->>flow_epics: run /flow-epics <umbrella-N>
flow_epics->>gh: gh issue view <N> --json number,title,body,labels,milestone
gh->>api: GET /repos/{owner}/{repo}/issues/<N>
api-->>gh: umbrella issue JSON
gh-->>flow_epics: umbrella_title, body, labels, milestone
flow_epics->>gh: gh api repos/{owner}/{repo}/labels --paginate
gh->>api: GET /repos/{owner}/{repo}/labels (paginated)
api-->>gh: label list
gh-->>flow_epics: labels (must include epic, flow, feat)
flow_epics->>gh: gh api graphql (issue.subIssues)
gh->>api: POST /graphql (subIssues query)
api-->>gh: subIssues nodes (existing epics)
gh-->>flow_epics: current sub-issues
loop for each non-SKIP epic
flow_epics->>gh: gh issue list --search "<exact epic title>"
gh->>api: GET /search/issues?q=<title>
api-->>gh: candidate issue
gh-->>flow_epics: EXISTS or NOT_FOUND, Linked?
end
User-->>flow_epics: review inventory table
loop for each epic needing create
flow_epics-->>User: echo gh issue create ... (dry-run)
User-->>flow_epics: type 'approve' or skip
alt approved create
flow_epics->>gh: gh issue create --title "..." --body "..." --label epic --label flow --label feat --milestone "flow-pack-suite"
gh->>api: POST /repos/{owner}/{repo}/issues
api-->>gh: created epic #M
gh-->>flow_epics: issue number M
flow_epics->>flow_epics: sleep 1
else skipped
flow_epics->>flow_epics: skip create
end
end
loop for each epic needing link
flow_epics-->>User: echo gh api .../issues/<N>/sub_issues -F sub_issue_id=<M> (dry-run)
User-->>flow_epics: type 'approve' or skip
alt approved link
flow_epics->>gh: gh api repos/{owner}/{repo}/issues/<N>/sub_issues -X POST -F sub_issue_id=<M> --header GitHub-Next-Preview: true
gh->>api: POST /repos/{owner}/{repo}/issues/<N>/sub_issues
api-->>gh: link created
gh-->>flow_epics: OK
flow_epics->>flow_epics: sleep 1
else skipped
flow_epics->>flow_epics: skip link
end
end
flow_epics->>gh: gh api graphql (issue.subIssues)
gh->>api: POST /graphql (subIssues query)
api-->>gh: final subIssues nodes
gh-->>flow_epics: updated sub-issues
flow_epics-->>User: print gate result + base_prp:prp-create handoffs
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In the
/flow-epicstemplate, the GraphQL query hard-codesownerandrepo(w7-mgfcode/ForecastLabAI); consider parameterizing these from the current git remote orghcontext so the command is reusable across repositories. - The epic label pre-flight in
/flow-epicschecks specifically forepic|flow|feat, but earlier you derive the type label from the umbrella (which might not befeat); aligning this check with the computed type label would avoid falsely failing when a non-feattype is used.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the `/flow-epics` template, the GraphQL query hard-codes `owner` and `repo` (`w7-mgfcode/ForecastLabAI`); consider parameterizing these from the current git remote or `gh` context so the command is reusable across repositories.
- The epic label pre-flight in `/flow-epics` checks specifically for `epic|flow|feat`, but earlier you derive the type label from the umbrella (which might not be `feat`); aligning this check with the computed type label would avoid falsely failing when a non-`feat` type is used.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
docs/flow-pack/commands/flow-epics.md— the tracked canonical template for the/flow-epicscommand (E4 of the flow-pack suite, closing feat(repo): flow-pack E4 — /flow-epics (epic decomposition, sub-issue linking, prp-create handoff) #373).claude/commands/flow/flow-epics.mdas a byte-copy of the tracked source (gitignored; regenerable viacp docs/flow-pack/commands/*.md .claude/commands/flow/)/flow-prime✅/flow-brainstorm✅/flow-umbrella✅/flow-epics✅What the command does
/flow-epics <umbrella-N>reads the umbrella issue's Decomposition section, idempotently creates phase-ordered epic issues (Foundation → Parallel → Release gate), links them as GitHub sub-issues via the REST API (gh api ... --header "GitHub-Next-Preview: true"), and prints per-epic handoffs tobase_prp:prp-create. E5 Release gate is always shown as ⏭️ SKIP (never auto-created per #373 scope).Key implementation decisions
gh label listtruncates at 30 items —epicandflowlabels live on page 2. Pre-flight check usesgh api repos/{owner}/{repo}/labels --paginateinstead.sleep 1) → confirm.docs/flow-pack/commands/flow-epics.mdis the committed contract;.claude/commands/flow/is gitignored and regenerable.Validation
cp docs/flow-pack/commands/*.md .claude/commands/flow/) ✅Test plan
flow:flow-epicsappears in available skills after local install/flow-epics 368shows correct inventory (E1–E4 linked, E5 deferred) with no writes until approvedSummary by Sourcery
Add documented command templates for the flow-pack brainstorming, umbrella, and epics commands to complete the documented flow-pack command suite.
Documentation: