Add Feature Ideation workflow as standard for BMAD-enabled repos#81
Add Feature Ideation workflow as standard for BMAD-enabled repos#81
Conversation
Promotes the BMAD Analyst (Mary) feature ideation workflow piloted in
petry-projects/TalkTerm to an org-wide standard for any repo with BMAD
Method installed.
Adds:
- standards/workflows/feature-ideation.yml — the canonical template,
generalised from TalkTerm. Customisation surface is a single
PROJECT_CONTEXT env var that describes the project and its market.
- standards/ci-standards.md §8 rewrite — documents the multi-skill
ideation pipeline (Market Research → Brainstorming → Party Mode →
Adversarial), the Opus 4.6 model requirement, the github_token
permissions gotcha, and the show_full_output secrets hazard.
- standards/agent-standards.md — adds a "BMAD Method Workflows"
section linking the standard from the agent ecosystem docs.
The four critical gotchas baked into the template were each discovered
empirically during the TalkTerm pilot and would silently regress without
the inline comments. Most importantly: the action's auto-generated
claude[bot] App token lacks discussions:write, so the workflow MUST
pass github_token: ${{ secrets.GITHUB_TOKEN }} explicitly or every
Discussion mutation fails silently while the run reports success.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 19 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds an org-hosted reusable GitHub Actions workflow that gathers repository signals, runs a multi‑phase Claude Code ideation pipeline, and creates/updates up to five GitHub Discussions; also adds a scheduled caller stub, updates CI/agent standards to require the workflow, and broadens BMAD detection in the compliance script. Changes
Sequence DiagramsequenceDiagram
actor Schedule as Scheduled Trigger
participant Caller as Workflow Caller
participant Reusable as Reusable Workflow
participant Gather as gather-signals Job
participant Analyze as analyze Job
participant Claude as Claude Code Action
participant GH as GitHub API
Schedule->>Caller: trigger (cron / manual)
Caller->>Reusable: workflow_call(inputs, secrets)
Reusable->>Gather: start gather-signals
Gather->>GH: query issues, PRs, releases, discussions
Gather->>Gather: compile signals.json, write step summary
Gather-->>Reusable: upload signals.json artifact
Reusable->>Analyze: start analyze (download artifact)
Analyze->>Claude: run ideation pipeline (research→ideate→validate→plan→publish)
Claude->>GH: create/update Discussions & post comments (using GITHUB_TOKEN)
GH-->>Claude: mutation confirmations
Claude-->>Analyze: structured results & summary
Analyze-->>Reusable: write step summary / outputs
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Introduces an org-standard “Feature Research & Ideation” GitHub Actions workflow for BMAD Method-enabled repositories, and documents it as a conditional CI standard alongside agent ecosystem guidance.
Changes:
- Adds
standards/workflows/feature-ideation.ymltemplate implementing a two-job (signals + analysis) BMAD Analyst (Mary) weekly ideation pipeline that posts to Discussions. - Expands CI Standards §8 to fully describe the multi-skill pipeline, Opus 4.6 requirement, gotchas, cost expectations, and adoption instructions.
- Updates agent standards to require the workflow for BMAD Method repos and link to the CI standard + template.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| standards/workflows/feature-ideation.yml | New canonical workflow template to gather repo signals and run BMAD Analyst ideation, posting proposals to Discussions. |
| standards/ci-standards.md | Documents Feature Ideation as a conditional standard for BMAD repos, including required configuration details and adoption guidance. |
| standards/agent-standards.md | Adds a BMAD Method Workflows section requiring and linking to the Feature Ideation standard/template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… stub Avoids ~600 lines of prompt duplication across every BMAD-enabled repo and makes the multi-skill ideation pipeline tunable in one place — changes here propagate to every adopter on next scheduled run. - .github/workflows/feature-ideation-reusable.yml — the actual reusable workflow (workflow_call). Contains both jobs (signal collection + analyst), the full Phase 1-8 prompt, and the four critical gotchas (Opus 4.6 model, github_token override, no show_full_output, structural Phase 2-5 sequence) hard-coded so they cannot regress. - standards/workflows/feature-ideation.yml — replaced the 600-line copy with a ~60-line caller stub that only defines the schedule, the workflow_dispatch inputs, and a single required parameter: project_context. - standards/ci-standards.md §8 — documents the reusable + caller stub architecture, the inputs/secrets contract, and updated adoption steps. Reference implementation pointer updated to note that TalkTerm is now also a thin caller stub. Inputs exposed by the reusable workflow: - project_context (required) — project description for Mary - focus_area (default '') — typically wired to workflow_dispatch - research_depth (default 'standard') - model (default 'claude-opus-4-6') — escape hatch only - timeout_minutes (default 60) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The gh api graphql queries use $repo / $owner / $categoryId as GraphQL variables (not shell expansions), which must remain in single quotes. shellcheck SC2016 fires anyway — disable it for this script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
actionlint runs shellcheck on the entire run script as one unit and ignores inline disable directives. Rewriting the gh api graphql calls to use cat <<'GRAPHQL' heredocs makes the GraphQL variable references ($repo, $owner, $categoryId) shell-inert without depending on single-quoted string literals — eliminating the SC2016 false positive. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/feature-ideation-reusable.yml:
- Around line 214-223: The prompt input is using shell-style variables and a
subshell date (e.g., $PROJECT_CONTEXT, $FOCUS_AREA, $RESEARCH_DEPTH, $(date
...)) which are not expanded when the workflow is parsed; replace those with
GitHub Actions expressions and/or outputs: reference the env values as ${{
env.PROJECT_CONTEXT }}, ${{ env.FOCUS_AREA }}, ${{ env.RESEARCH_DEPTH }} inside
the prompt: field for the anthropics/claude-code-action step, and replace the
subshell date by computing the date in a prior step (e.g., add a step with id
set-prompt-date that runs date and sets an output like DATE) and then use ${{
steps.set-prompt-date.outputs.DATE }} in the prompt; ensure you update the
prompt: inputs that currently contain $... or $(...) to use these ${{ ... }}
expressions instead.
In `@standards/ci-standards.md`:
- Around line 310-311: The BMAD detection text is broader than the audit logic:
update the audit in scripts/compliance-audit.sh so the bmad-method detection
also checks for the `_bmad-output/planning-artifacts/` marker (in addition to
`_bmad/`) and treat repos containing either `_bmad/` or
`_bmad-output/planning-artifacts/` as `bmad-method` so they get the missing
`feature-ideation.yml` check; alternatively, if you prefer to avoid changing the
script, narrow the standards text to only list the concrete markers the script
currently checks (`_bmad/`) and mention that `_bmad-output/planning-artifacts/`
is not yet audited until the script is updated.
In `@standards/workflows/feature-ideation.yml`:
- Around line 49-56: Add a validation guard that rejects the default placeholder
in the reusable workflow by checking the project_context input before any
posting step; specifically detect common placeholder markers (e.g., strings
starting with "TODO:", containing "ProjectX" or "Example:") and fail the job or
skip the post with a clear error message. Locate the project_context input in
the feature-ideation workflow and add the check as an early step (before the
discussion/posting step) so the workflow exits with a non-zero status or skips
publishing if the value matches the placeholder patterns. Ensure the check runs
for both direct runs and when the workflow is called as a reusable workflow.
- Around line 39-47: The caller workflow currently sets global permissions: {}
which gives the reusable workflow no token scopes; update the ideate job that
calls
petry-projects/.github/.github/workflows/feature-ideation-reusable.yml@main to
declare job-level permissions that match the reusable workflow needs (at minimum
contents: read, issues: read, pull-requests: read, discussions: read for signal
gathering and contents: read, discussions: write, id-token: write for analysis);
add a permissions block under the ideate job (not at top-level) granting those
scopes so the GITHUB_TOKEN passed into the reusable workflow has the required
access.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8826f8c3-e265-4d01-97d2-1baf455c2924
📒 Files selected for processing (4)
.github/workflows/feature-ideation-reusable.ymlstandards/agent-standards.mdstandards/ci-standards.mdstandards/workflows/feature-ideation.yml
… guard
CodeRabbit caught a critical latent bug inherited from the original TalkTerm
prompt: shell-style $VAR and $(date) syntax inside the action's `prompt:`
input is NOT expanded — the action receives literal text. This silently
broke variable substitution in every prior run, but mattered most for the
new reusable workflow because PROJECT_CONTEXT is now load-bearing.
Changes:
- Replace $PROJECT_CONTEXT, $FOCUS_AREA, $RESEARCH_DEPTH, and $(date ...)
with ${{ inputs.* }} and ${{ github.run_started_at }} expressions, which
ARE evaluated by GitHub before passing the prompt to the action.
- Add a "Validate project_context is customised" pre-step that fails fast
if an adopter copied the caller stub without replacing the TODO
placeholder. Prevents wasted Opus runs producing generic Discussions.
- scripts/compliance-audit.sh: detect BMAD repos via `_bmad-output/` as
well as `_bmad/`, matching the broader detection rule documented in
ci-standards.md §8 (TalkTerm only has `_bmad-output/`).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The agent can read scan_date from signals.json instead — added a hint in the Environment section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CodeRabbit caught: the caller stub had `permissions: {}` at workflow
level and no permissions block on the calling job. Reusable workflows
inherit permissions from the calling job — without an explicit grant,
the reusable workflow's `discussions: write` declaration would have
nothing to apply, and Discussion mutations would fail with FORBIDDEN
just like the original bug we fixed in TalkTerm.
The reusable workflow's job-level permissions are documentation of
what it needs; the caller is what actually grants them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
.github/workflows/feature-ideation-reusable.yml (1)
266-276:⚠️ Potential issue | 🟠 MajorThis prompt-expansion bug is still unresolved.
prompt:is workflow metadata, not arun:script.$PROJECT_CONTEXT,$FOCUS_AREA,$RESEARCH_DEPTH, and$(date ...)are passed verbatim here, so the only required caller input never reaches Mary as intended. Use GitHub expressions in the prompt and capture the date in a prior step/output. (docs.github.com)🛠️ Suggested fix
+ - name: Capture prompt date + id: prompt-date + run: echo "utc_date=$(date -u +%Y-%m-%d)" >> "$GITHUB_OUTPUT" + - name: Run Claude Code — BMAD Analyst env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ ## Project Context - $PROJECT_CONTEXT + ${{ inputs.project_context }} ## Environment - Repository: ${{ github.repository }} - Workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - - Date: $(date -u +%Y-%m-%d) - - Focus area: $FOCUS_AREA (empty = open-ended exploration) - - Research depth: $RESEARCH_DEPTH + - Date: ${{ steps.prompt-date.outputs.utc_date }} + - Focus area: ${{ inputs.focus_area || 'open-ended exploration' }} + - Research depth: ${{ inputs.research_depth }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/feature-ideation-reusable.yml around lines 266 - 276, The workflow is inserting shell/placeholder text verbatim into the prompt block; replace the inline variables with GitHub expression syntax and a precomputed date output: use ${{ inputs.PROJECT_CONTEXT }}, ${{ inputs.FOCUS_AREA }}, and ${{ inputs.RESEARCH_DEPTH }} (or the appropriate context/vars/inputs you expect) instead of $PROJECT_CONTEXT, $FOCUS_AREA, and $RESEARCH_DEPTH, and replace $(date -u +%Y-%m-%d) with a step output (e.g., steps.set-date.outputs.date) by adding a prior step (e.g., id: set-date) that runs the date command and exposes it via outputs; ensure this prompt text remains under the workflow metadata field (prompt:) not inside a run: script.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/feature-ideation-reusable.yml:
- Around line 93-138: The current logic only queries the "Ideas" category once
and fetches up to 100 discussions (IDEAS_CAT_QUERY, IDEAS_CAT_ID,
IDEAS_DISC_QUERY, IDEAS_DISCUSSIONS), which can miss the effective target
category or overflow the 100-item page and cause duplicates; update the workflow
to either (A) determine the effective target category name ("Ideas" or fallback
"General") then paginate through that category's discussions using GraphQL
cursor-based pagination to collect all pages before making decisions, or (B)
keep a lightweight paginated re-query of the chosen category immediately before
any create operation so Mary always checks the current discussion list;
implement the change around IDEAS_CAT_QUERY/IDEAS_CAT_ID and
IDEAS_DISC_QUERY/IDEAS_DISCUSSIONS so the code handles multiple pages (use
endCursor/hasNextPage) or re-fetches the category before each create.
- Around line 230-234: The workflow currently sets ANTHROPIC_MODEL: ${{
inputs.model }} but the v1 anthropics/claude-code-action expects model selection
via the claude_args input; update the action invocation so you stop relying on
ANTHROPIC_MODEL and instead pass the model through claude_args (e.g. include
--model ${ { inputs.model } } in claude_args) and remove or stop setting
ANTHROPIC_MODEL to ensure the action uses the documented v1 model-selection
interface (refer to the action usage line and the claude_args/ANTHROPIC_MODEL
symbols to locate the change).
---
Duplicate comments:
In @.github/workflows/feature-ideation-reusable.yml:
- Around line 266-276: The workflow is inserting shell/placeholder text verbatim
into the prompt block; replace the inline variables with GitHub expression
syntax and a precomputed date output: use ${{ inputs.PROJECT_CONTEXT }}, ${{
inputs.FOCUS_AREA }}, and ${{ inputs.RESEARCH_DEPTH }} (or the appropriate
context/vars/inputs you expect) instead of $PROJECT_CONTEXT, $FOCUS_AREA, and
$RESEARCH_DEPTH, and replace $(date -u +%Y-%m-%d) with a step output (e.g.,
steps.set-date.outputs.date) by adding a prior step (e.g., id: set-date) that
runs the date command and exposes it via outputs; ensure this prompt text
remains under the workflow metadata field (prompt:) not inside a run: script.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 71f05ea2-6757-4696-8240-97bace8d5d4a
📒 Files selected for processing (1)
.github/workflows/feature-ideation-reusable.yml
Two more fixes from CodeRabbit review: 1. Model selection via claude_args (the documented v1 interface) instead of ANTHROPIC_MODEL env var. claude_args takes precedence over the env var per the action's docs, so depending on the env var was relying on undocumented behavior. The pinned v1.0.89 happens to honor ANTHROPIC_MODEL too (verified in TalkTerm run #3 logs), but the documented path is more robust against future action upgrades. 2. Re-query existing Ideas discussions before each create. The signals snapshot only fetches the first page of discussions (GraphQL caps connections at 100 per page) and only covers the Ideas category, not the General fallback. Mary now does a fresh query before each create to avoid duplicates in repos with >100 idea threads or where Ideas doesn't exist. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/feature-ideation-reusable.yml (1)
246-261:⚠️ Potential issue | 🔴 CriticalMove model selection to
claude_argsusing the--modelflag—theANTHROPIC_MODELenv var approach won't work.The workflow sets
ANTHROPIC_MODEL: ${{ inputs.model }}(line 252), butanthropics/claude-code-actionv1 does not forward theANTHROPIC_MODELenvironment variable into its runtime. Per the official Anthropic docs, model selection must be done via--modelinclaude_args.The current setup silently ignores the Opus 4.6 requirement stated in lines 249–251 and will use whatever model the CLI defaults to instead. Update
claude_argsto include--model opus-4-1-20250805(or the relevant Opus 4.6 identifier) to enforce the correct model.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/feature-ideation-reusable.yml around lines 246 - 261, The workflow currently sets the ANTHROPIC_MODEL env var which anthropics/claude-code-action v1 does not forward; instead update the claude_args input to include the model flag (e.g., add "--model opus-4-1-20250805") so the action uses the intended Opus model; modify the claude_args value in the Run Claude Code — BMAD Analyst step (the claude_args input for anthropics/claude-code-action) to append the --model argument while keeping existing allowedTools.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/feature-ideation-reusable.yml:
- Around line 246-261: The workflow currently sets the ANTHROPIC_MODEL env var
which anthropics/claude-code-action v1 does not forward; instead update the
claude_args input to include the model flag (e.g., add "--model
opus-4-1-20250805") so the action uses the intended Opus model; modify the
claude_args value in the Run Claude Code — BMAD Analyst step (the claude_args
input for anthropics/claude-code-action) to append the --model argument while
keeping existing allowedTools.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 82347204-72ba-4e0a-b1fc-a3102b52ca46
📒 Files selected for processing (3)
.github/workflows/feature-ideation-reusable.ymlscripts/compliance-audit.shstandards/workflows/feature-ideation.yml



Summary
Promotes the BMAD Analyst (Mary) feature ideation workflow piloted in petry-projects/TalkTerm (see petry-projects/TalkTerm#60) to an org-wide standard for any repo with BMAD Method installed.
What's added
standards/workflows/feature-ideation.yml— the canonical template, generalised from the TalkTerm pilot. Customisation surface is a single `PROJECT_CONTEXT` env var (3-5 sentence project description) on the analyst step. Everything else is universal.The pipeline (the reason this workflow exists)
The adversarial pass is the load-bearing part: every surviving idea has a documented rebuttal to its strongest objection.
Critical gotchas baked into the template
Each was discovered empirically during the TalkTerm pilot and would silently regress without the inline comments:
Pilot results from TalkTerm
The pilot run on Opus 4.6 (run #3 after the gotchas were fixed) produced 3 Discussions in 8m 26s for ~$2.35:
Each proposal cited specific FR numbers from the planning artifacts and named specific extension points in the codebase.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit