Skip to content

feat(feature-ideation): auto-enhance new Ideas Discussions on creation#448

Merged
don-petry merged 3 commits into
mainfrom
feat/feature-ideation-on-discussion
Jun 13, 2026
Merged

feat(feature-ideation): auto-enhance new Ideas Discussions on creation#448
don-petry merged 3 commits into
mainfrom
feat/feature-ideation-on-discussion

Conversation

@don-petry

@don-petry don-petry commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What

Make Feature Ideation trigger on a new Discussion so a freshly-opened idea gets researched + refined automatically (instead of waiting for the Friday scan). Requested to enhance ideas like .github-private#578 the moment they're posted.

How

  • Reusable — new optional target_discussion input. When set, the BMAD analyst runs single-idea enhancement mode: read that one Discussion, focused Phase 2–4 research at research_depth, and post one additive enhancement comment via the existing comment_on_discussion helper. No broad scan, no new threads. Idempotent via a <!-- feature-ideation:enhanced --> marker. Empty input = unchanged scheduled behaviour (backward-compatible).
  • Stub template — add on: discussion: types: [created]; a job-level if that limits it to new Ideas-category discussions and skips github-actions[bot] creations; pass target_discussion: ${{ github.event.discussion.number }}.
  • Loop-safe: enhancement posts a comment, which does not re-fire discussion: created; scheduled bot-created ideas are filtered out by the if.
  • Docs: ci-standards.md §9 updated.

Validation

  • YAML parses; stub triggers = schedule, workflow_dispatch, discussion; if + target_discussion present; reusable input present with default ''.
  • Compliance audit unaffected (feature-ideation stub check validates the @v1 pin, not trigger shape).

Rollout (after merge)

  1. Advance the reusable's @v1 (canonical tag) so callers get the new input.
  2. Adopt the updated stub (trigger + if + target_discussion) in consumer repos (e.g. .github-private) — follow-up PR; must come after the reusable accepts the new input.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Feature ideation workflow now auto-enhances newly created discussions in the Ideas category.
    • Workflow supports manual triggering to focus on a specific discussion.
  • Documentation

    • Updated CI standards documentation with new workflow triggers and execution conditions.

Add a 'discussion: created' trigger so a freshly-opened idea is researched and
refined automatically, instead of waiting for the weekly scan.

- reusable: new optional 'target_discussion' input. When set, the analyst runs
  SINGLE-IDEA ENHANCEMENT mode — read that one Discussion, do focused Phase 2-4
  research at the requested depth, and post ONE additive enhancement comment via
  the existing comment_on_discussion helper. No broad scan, no new threads.
  Idempotent via a '<!-- feature-ideation:enhanced -->' marker. Empty input =
  unchanged scheduled behaviour (fully backward-compatible).
- stub template: add the 'discussion: [created]' trigger, a job-level 'if' that
  restricts it to new Ideas-category discussions and skips github-actions[bot]
  creations (no trigger loop — enhancement is a comment, which doesn't re-fire
  'created'), and pass target_discussion from github.event.discussion.number.
- ci-standards.md Section 9: document the new trigger + single-idea mode.

Compliance audit unchanged (the feature-ideation stub check validates the @v1
pin, not trigger shape).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@don-petry don-petry requested a review from a team as a code owner June 11, 2026 23:27
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1d78dc9b-058e-484a-8117-5361df681492

📥 Commits

Reviewing files that changed from the base of the PR and between 73231f6 and 27f9075.

📒 Files selected for processing (3)
  • .github/workflows/feature-ideation-reusable.yml
  • standards/ci-standards.md
  • standards/workflows/feature-ideation.yml

📝 Walkthrough

Walkthrough

The PR extends the feature ideation workflow to support single-Discussion enhancement by adding a new target_discussion workflow input to the reusable workflow, updating the Claude prompt with conditional mode-selection logic, and wiring a discussion: created trigger in the caller workflow with guards to filter for non-bot-created Ideas-category discussions.

Changes

Single-Discussion Enhancement Mode

Layer / File(s) Summary
Reusable workflow single-discussion mode
.github/workflows/feature-ideation-reusable.yml
A new target_discussion workflow_call input is defined with an empty default, passed into the Claude Code step as TARGET_DISCUSSION. The Claude prompt adds a "Mode selection" section that conditionally executes single-Discussion enhancement logic (read one Discussion via GraphQL, perform focused research, post one enhancement comment with idempotency check) when TARGET_DISCUSSION is non-empty, otherwise delegates to the existing scheduled ideation pipeline.
Caller workflow trigger and integration
standards/workflows/feature-ideation.yml, standards/ci-standards.md
A new discussion: created trigger is introduced with a job-level guard that restricts execution to Ideas-category discussions created by non-bot users. The ideate job passes the created discussion number as target_discussion to activate single-Discussion mode. CI standards documentation describes the new trigger, job-level filtering, and the target_discussion wiring mechanism.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • petry-projects/.github#81: Introduces the reusable feature-ideation workflow that this PR extends with single-Discussion enhancement mode.

Suggested labels

needs-human-review

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding auto-enhancement of newly created Ideas Discussions, which is the primary feature introduced across all three modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/feature-ideation-on-discussion

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry don-petry enabled auto-merge (squash) June 11, 2026 23:28
@don-petry

Copy link
Copy Markdown
Contributor Author

@donpetry-bot please review — adds the discussion-created auto-enhance trigger to Feature Ideation; all required checks green and backward-compatible (empty target_discussion = unchanged scheduled behaviour).

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an automated single-idea enhancement mode to the feature ideation workflow. It adds a trigger for newly created discussions, restricts execution to the 'Ideas' category while ignoring bot-created discussions, and passes the discussion number to the reusable workflow. The documentation has also been updated to reflect these changes. The review feedback suggests improving the robustness of the bot-filtering logic by checking the user type instead of hardcoding the bot's username, and recommends a minor grammatical correction in the documentation.

Comment thread standards/workflows/feature-ideation.yml Outdated
Comment thread standards/ci-standards.md Outdated
@don-petry don-petry disabled auto-merge June 11, 2026 23:29
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 11, 2026
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #448
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-12T00:02:42Z

@don-petry

Copy link
Copy Markdown
Contributor Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-12T00:02:42Z

@don-petry don-petry enabled auto-merge (squash) June 11, 2026 23:32
@don-petry don-petry disabled auto-merge June 11, 2026 23:35
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
Addressed 0 threads:
Test verification: no test run required — no code changes made
Files changed: none
```

@don-petry don-petry enabled auto-merge (squash) June 11, 2026 23:36
@don-petry

Copy link
Copy Markdown
Contributor Author

@donpetry-bot all required checks are green now — please review for the org-leads approval.

@don-petry don-petry disabled auto-merge June 13, 2026 20:13
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry don-petry enabled auto-merge (squash) June 13, 2026 20:16

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: aa6c4c95c3e206207e3a974b47c92a697dd8b1aa
Review mode: triage-approved (single reviewer)

Summary

Adds a 'discussion: created' trigger to Feature Ideation so a newly-opened Ideas-category Discussion is auto-enhanced (single-idea mode) instead of waiting for the weekly scan. Additive, backward-compatible (+66/-0 across the reusable workflow, the caller stub template, and ci-standards docs).

Linked issue analysis

No linked issue (closingIssuesReferences is empty). The PR is motivated by a request to enhance ideas like discussion #578 the moment they are posted; the change delivers that via a new optional target_discussion input and a guarded discussion: created trigger. N/A for issue-closure verification.

Findings

  • Security (Actions): The only untrusted interpolation is github.event.discussion.number (an integer) flowing into the target_discussion input — no shell/eval injection surface. The prompt block interpolates only github.repository (trusted). Untrusted Discussion title/body is read via GraphQL inside the job, consistent with the workflow's existing scheduled-scan behaviour — no new class of risk.
  • Loop safety: Enhancement posts a comment (does not re-fire discussion: created), and the job-level if restricts execution to the ideas category and user.type != 'Bot', filtering the workflow's own scheduled output. No trigger loop.
  • Reviewer feedback resolved: gemini-code-assist suggested filtering by user type rather than a hardcoded bot username; the final code already uses github.event.discussion.user.type != 'Bot', so that concern is addressed. coderabbitai APPROVED at the head SHA.
  • Backward compatibility: Empty target_discussion (default) preserves unchanged scheduled/dispatch behaviour; reusable pin advance is a documented post-merge rollout step.
  • No blocking findings.

CI status

All required checks green at aa6c4c95c3e206207e3a974b47c92a697dd8b1aa: CI (Lint, ShellCheck, Agent Security Scan, Secret scan/gitleaks), CodeQL, SonarCloud, AgentShield, Feature Ideation Tests, Dependency audit (detect), pr-auto-review ready check, dev-lead — all SUCCESS; remaining checks SKIPPED (no applicable ecosystems). No failing or cancelled checks. mergeStateStatus is BLOCKED only on the pending org-leads review that this pass satisfies.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@don-petry don-petry merged commit f471b21 into main Jun 13, 2026
22 checks passed
@don-petry don-petry deleted the feat/feature-ideation-on-discussion branch June 13, 2026 20:19
don-petry added a commit that referenced this pull request Jun 15, 2026
…er + correct reusable pin (#457)

fix(feature-ideation): deploy discussion:created trigger to live caller + correct v1 pin

The auto-enhance-on-creation feature (#448) added an `on: discussion:
[created]` trigger and `target_discussion` single-idea mode, but only to the
canonical template in standards/workflows/. The live deployed caller was never
re-synced, so new Ideas Discussions never triggered the workflow.

Two fixes:

- .github/workflows/feature-ideation.yml: add the `discussion: [created]`
  trigger, the job `if:` guard (Ideas category + non-Bot author), and the
  `target_discussion: github.event.discussion.number` wiring. Bump the pinned
  reusable SHA from 7bf5a75 (2026-06-07, pre-feature) to 897e4de, which
  actually contains `target_discussion` support. The old pin could not run
  single-idea mode even if the trigger fired.

- standards/workflows/feature-ideation.yml: correct the template's stale pin
  from ee22b42 (also lacks target_discussion) to 897e4de so the source of
  truth matches the v1 tag.

The v1 tag is being bumped separately to 897e4de so `@... # v1` callers and
literal @v1 consumers both resolve to a reusable that supports the feature.

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants