---
name: idea-creator
description: "Generate and rank research ideas. GPT-5.4 + Claude dual independent brainstorming. Trigger phrases: find ideas, brainstorm ideas, generate research ideas."
argument-hint: [research-direction]
---

# Research Idea Generator
Research direction: $ARGUMENTS

## Constants
- `OUTPUT_DIR = idea-stage/`

## Workflow

### Phase 0: Load Wiki Context
If `research-wiki/query_pack.md` exists and was updated less than 7 days ago:
- Read it
- Treat failed ideas as a banlist
- Treat gaps as seeds
- Treat top papers as known prior work

### Phase 1: Domain Survey
If there is no `query_pack`, do a quick WebSearch first to build a broad domain context.

### Phase 2: Dual Independent Brainstorming
**Critical requirement: brainstorm independently on two tracks first, then synthesize.**

GPT brainstorming (via Codex):
- Use `/codex:rescue --fresh --background`
- The prompt must ask GPT to generate 8-12 ideas
- The prompt must include: the domain overview, known gaps, and resource constraints
- Poll with `/codex:status`
- Use `/codex:result` to collect the output

Claude brainstorming (via Agent):
- Dispatch a subagent through the Agent tool with `subagent_type="general-purpose"`
- Provide the same domain overview context
- Require it to independently generate 8-12 ideas

### Phase 3: Claude Synthesis
- Merge both idea sets and deduplicate by similarity
- Cross-check: Claude challenges GPT ideas, GPT challenges Claude ideas
- Score and rank everything in a single pass
- Label each idea with its source: `GPT` / `Claude` / `consensus`

### Phase 4: First Filtering Pass
Filtering criteria:
- Feasibility: compute, data, and implementation cost
- Fast novelty check: run 2-3 WebSearch passes for each idea
- Impact: answer "so what?"
- Remove ideas that are infeasible or too vague

### Phase 5: Deep Verification
For the top ideas, call the `/novelty-check` skill.

### Phase 7: Output Report
Write `idea-stage/IDEA_REPORT.md` in Chinese, with the following format:

```md
# Research Idea Report
**Direction**: ...
**Date**: YYYY-MM-DD
**Evaluation Result**: X generated -> Y survived -> W recommended

## Domain Overview Summary
## Recommended Ideas (Ranked)
### Idea 1: <title>
- Hypothesis / minimal experiment / novelty / feasibility / risk / source

## Rejected Ideas
```

### Phase 8: Wiki Integration
- Check whether `research-wiki/` exists
- For each idea:
  - `.claude/tools/research_wiki.py add_entity research-wiki/ --type idea --id <id> --title "..."`
- Add edges:
  - `inspired_by`
  - `addresses_gap`
- Rebuild `query_pack` and the index

## Key Rules
- If the direction is too broad, STOP and ask the user to narrow it
- Failed ideas must also be written into the wiki
- Empirical signals matter more than theoretical attractiveness
- `"Apply X to Y"` is the lowest-level research idea
- If `research-wiki/` does not exist, still finish the report output but skip all wiki writes
- First independent, then synthesize; first evidence, then judgment; first filter, then dig deeper

## Output Requirements
When the task is complete, you must provide at least:
- A domain overview summary
- 8-12 raw ideas
- A deduplicated candidate list
- Filtering results and reasons
- Deep verification results for the top ideas
- `idea-stage/IDEA_REPORT.md`
- Wiki write results, if applicable

## Completion Criteria
Only finish when all of the following are complete:
1. Wiki context loading or domain survey is complete
2. Both independent brainstorming tracks are complete
3. Merge, deduplication, and ranking are complete
4. The first filtering pass is complete
5. Deep verification of top ideas is complete
6. `idea-stage/IDEA_REPORT.md` has been written
7. `research-wiki/` integration is complete, if applicable
