feat: feature ideation framework — adversarial proposer/challenger/synthesizer

Closed
CO
6mo ago
+844-6

Adds a feature ideation agent to this repo, implementing the adversarial-review pattern from github.com/topics/adversarial-review.

Two modes are provided:

Interactive: Claude Code Skill (SKILL.md)

A single SKILL.md at the repo root implements the adversarial-review pattern as-is for feature ideation. Claude proposes a spec, Codex adversarially challenges it, Claude refines, and the loop repeats until approved (max 5 rounds).

/ideate-feature <description | issue URL | file path>
Claude (propose spec)
  └─ Codex (adversarial challenge)
       └─ Claude (refine spec)
            └─ Codex (re-review)
                 └─ ... → VERDICT: APPROVED

The skill follows the same structure as dementev-dev/adversarial-review: YAML frontmatter, XML-structured adversarial prompts (<role>, <operating_stance>, <attack_surface>, <finding_bar>, <scope_exclusions>, <calibration>, <output_format>), codex exec + resume-first iterative loop, and best-effort cleanup.

Attack surface adapted for feature specs: value, feasibility, scope, completeness, risk, alternatives, open questions.

Automated: GitHub Actions

When the feature-idea label is added to any GitHub issue, a three-stage pipeline runs and posts a refined spec as an issue comment.

feature-idea label added
  └─ Proposer (Sonnet): expand idea → /tmp/ideation/proposal.json
       └─ Challenger (Sonnet): adversarial critique → /tmp/ideation/challenges.json
            └─ Synthesizer (Opus): reconcile → post refined spec to issue
StageModelRole
ProposerSonnet 4.6Expands raw idea: problem, solution, implementation sketch, acceptance criteria, effort estimate, open questions
ChallengerSonnet 4.6Adversarially challenges across 7 dimensions: value, feasibility, scope, risk, completeness, alternatives, open questions
SynthesizerOpus 4.6Reconciles valid challenges, posts comment with refined spec + adds feature-spec-ready label

Idempotency — each posted comment is marked with <!-- feature-ideation-agent v1 issue=<num> cycle=<N> -->. Re-labeling triggers a new cycle.

Files changed

FileChange
SKILL.mdNew Claude Code skill — adversarial feature ideation following dementev-dev/adversarial-review pattern as-is
.github/workflows/feature-ideation.ymlNew workflow — triggers on feature-idea label or workflow_dispatch
scripts/ideate-feature.shNew orchestration script (proposer → challenger → synthesizer)
prompts/ideation/proposer.mdProposer prompt
prompts/ideation/challenger.mdChallenger prompt (7-dimension adversarial critique)
prompts/ideation/synthesize-idea.mdSynthesizer prompt (posts to GitHub issue)
AGENT.mdDocuments both modes; adds https://github.com/topics/adversarial-review as resource reference

Usage

Interactive (Claude Code):

# Install Codex CLI
npm install -g @openai/codex

# Symlink the skill
ln -s "$(pwd)" ~/.agents/skills/feature-ideation

# Then in Claude Code:
/ideate-feature https://github.com/owner/repo/issues/42

Automated (GitHub Actions):

# Automatically: label an issue
gh issue edit 42 --repo owner/repo --add-label feature-idea

# Manually (dry run):
gh workflow run feature-ideation.yml --repo don-petry/self \
  -f issue_url=https://github.com/owner/repo/issues/42 \
  -f dry_run=true

The same GH_PAT, CLAUDE_CODE_OAUTH_TOKEN, and LIVE_MODE variable used by the PR review agent also control the automated mode — no new secrets needed.