Loading...
Loading...
Full discovery phase orchestrator. Brainstorm + ao search + research + plan + pre-mortem gate. Produces epic-id and execution-packet for /crank. Triggers: "discovery", "discover", "explore and plan", "research and plan", "discovery phase".
npx skill4agent add boshu2/agentops discoveryQuick Ref: Brainstorm → search history → research → plan → pre-mortem. Produces an epic-id and execution-packet ready for./crank
/discovery "add user authentication" # full discovery
/discovery --interactive "refactor payment module" # human gates in research + plan
/discovery --skip-brainstorm "fix login bug" # skip brainstorm for specific goals
/discovery --complexity=full "migrate to v2 API" # force full council ceremony/discovery <goal> [--interactive] [--complexity=<fast|standard|full>] [--skip-brainstorm]
│
├── Step 1: Brainstorm (optional)
│ └── /brainstorm <goal> — clarify WHAT before HOW
│
├── Step 2: Search History
│ └── ao search "<goal keywords>" — surface prior learnings
│
├── Step 3: Research
│ └── /research <goal> — deep codebase exploration
│
├── Step 4: Plan
│ └── /plan <goal> — decompose into epic + issues
│
└── Step 5: Pre-mortem (gate)
└── /pre-mortem — council validates the plan
PASS/WARN → output epic-id + execution-packet
FAIL → re-plan with findings, max 3 attemptsmkdir -p .agents/rpidiscovery_state = {
goal: "<goal string>",
interactive: <true if --interactive>,
complexity: <fast|standard|full or null for auto-detect>,
skip_brainstorm: <true if --skip-brainstorm or goal is >50 chars and specific>,
epic_id: null,
attempt: 1,
verdict: null
}# Tracking mode
if command -v bd &>/dev/null; then TRACKING_MODE="beads"; else TRACKING_MODE="tasklist"; fi
# Knowledge flywheel
if command -v ao &>/dev/null; then AO_AVAILABLE=true; else AO_AVAILABLE=false; fi--skip-brainstorm.agents/brainstorm//brainstormSkill(skill="brainstorm", args="<goal>")aoao search "<goal keywords>" 2>/dev/null || true
ao lookup --query "<goal keywords>" --limit 5 2>/dev/null || true.agents/findings/*.md.agents/rpi/next-work.jsonl/researchSkill(skill="research", args="<goal> [--auto]")--auto--interactive.agents/research/test-pyramid.mddiscovery_state.test_levels/plan/planSkill(skill="plan", args="<goal> [--auto]")--auto--interactive.agents/plans/bdbd list --type epic --status opendiscovery_state.epic_idbd children <epic-id> | wc -lfaststandardfull/pre-mortemSkill(skill="pre-mortem", args="[--quick]")--quick--quick--deepdiscovery_state.verdictls -t .agents/council/*pre-mortem*.md | head -1"Pre-mortem: FAIL (attempt N/3) -- retrying plan with feedback"/planSkill(skill="plan", args="<goal> --auto --context 'Pre-mortem FAIL: <findings>'")/pre-mortem"Pre-mortem failed 3 times. Last report: <path>. Manual intervention needed."<promise>BLOCKED</promise>references/output-templates.md<promise>DONE</promise>/crank <epic-id>test_levels/crank| Flag | Default | Description |
|---|---|---|
| off | Human gates in research and plan |
| auto | Skip brainstorm step |
| auto | Force complexity level (fast/standard/full) |
| off | Disable phase time budgets |
<promise>DONE</promise> # Discovery complete, epic-id + execution-packet ready
<promise>BLOCKED</promise> # Pre-mortem failed 3x, manual intervention needed/discovery "add user authentication" # full discovery
/discovery --interactive "refactor payment module" # human gates
/discovery --skip-brainstorm "fix login bug" # skip brainstormreferences/troubleshooting.md