discovery
Create dense execution packets. Fold target for brainstorm + design (goal clarification, product-fit pressure testing). Triggers: "run discovery", "shape intent as BDD", "scope a feature into an execution packet".
How do I install this agent skill?
npx skills add https://github.com/boshu2/agentops --skill discoveryIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The 'discovery' skill is an orchestration tool designed to manage the initial phases of an agentic workflow, including research, planning, and pre-mortem analysis. It delegates tasks to specialized sub-skills and uses local CLI utilities for history retrieval and state tracking. The analysis found no evidence of malicious patterns, data exfiltration, or safety bypasses.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerpass
1/6 files flagged
- ZeroLeakspass
Score: 93/100 · 2 sections analyzed
What does this agent skill do?
/discovery - Dense Discovery Phase Adapter
Absorbed skills (ag-s43tg)
brainstorm (goal-vs-implementation clarification) + design (product-fit pressure test) — trigger detail in the Folded-In section below.
YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
Constraints
- Delegate research and plan separately; delegate premortem only for MVP-slice mode because the fanout duel is already its premortem verdict.
- Prove a capability is absent before scoping new construction to prevent duplicate machinery and false net-new estimates.
- Route only fanout/one-way-door decisions through the duel; keep routine MVP slices inside the bounded quick path.
- After three MVP premortem failures, run exactly one bounded plan-pawl helper round; resume on
UNSTUCKand ask the human only onESCALATE.
Loop position: move 1 (shape intent as BDD) plus the seed for move 3 (slice candidates) of the operating loop. Discovery turns a goal plus delegated child artifacts into one dense execution packet for
/crankand/validate. It is also the re-plan engine for/rpi's Agile Re-Plan Loop: after the initial plan, it runs only from an explicit orchestrator re-plan request carrying a cited Learn plan-impact packet. Seed slice candidates small: one Given/When/Then behavior each, refactor candidates kept separate from feature candidates — small batches + refactor-after-green are the load-bearing quality moves, not test-first ordering (Finster 2026,skills/standards/references/agentic-workflow-evidence.md); binding decomposition discipline is/plan(PR-010/PR-011).
Folded-In Trigger Surface (brainstorm, design)
Discovery is the fold target for the retired standalone brainstorm and design
skills (skill-prune phase 2). Fire /discovery for their use-cases:
- Brainstorm — Separate goals from implementation. Clarify goals before
planning: separate WHAT from HOW, explore the problem space before committing
to a solution, and capture Given/When/Then acceptance examples. The full
intent → Gherkin → executed-red → bead-DAG contract is owned by
behavior-first-planning— cite it when the beads must carry runnable done-criteria. Open-ended ideation (generate-winnow,--ideate) is the Open-Ended Path below. - Design — Validate product fit before discovery. Use when framing a
problem, checking product/market fit, or pressure-testing user value before
writing a discovery packet or any code. The product-validation gate
(PRODUCT.md alignment, council
--preset=product) runs as discovery's conditional design delegation step.
Strict Delegation Contract (default)
Discovery runs brainstorm and design as internal modes (absorbed, ag-s43tg) and delegates to /research, /plan, and /premortem as separate skill invocations. Strict delegation is the default.
Anti-pattern to reject: inlining /research work (grep + read + synthesize), collapsing /plan into an inline decomposition, skipping /premortem. See ../shared/references/strict-delegation-contract.md for the full contract, supported compression escapes (--quick, --skip-brainstorm, --interactive/--auto, --no-scaffold), and the Premortem Anti-Rationalization Clause (what does NOT count as a premortem: an inline risk section you wrote, a prior adversarial pass on an input/premise rather than this plan, or "a related council already ran").
Re-baseline before you scope (mandatory for "improve X" / "build the missing Y"): /research MUST confirm a capability doesn't already exist before scoping new construction. The --auto trap is author-as-researcher scoping "what's unbuilt" from memory without grepping — existing machinery gets re-estimated as net-new. Every "X is missing" claim carries the search that proved it; no search → /premortem's re-baseline check (2.4–2.8) WARN/FAILs it. Run that existence search as ms search "<capability phrase>" first (fast path when ms is available — command -v ms, or the mcp__ms__search tool is attached; else grep skills/**/SKILL.md + docs/SKILLS.md) and cite the hits in the packet's overlap/prior-art section.
See references/isolation-contract.md for the mechanical four-lever model and the compression patterns flagged by scripts/check-skill-isolation.sh. See references/best-practices.md for the lifecycle principle + anti-pattern citation table.
Narrow Waist
Discovery does not carry raw child-skill output forward. It records artifact
paths, verdicts, the hexagon: boundary block from
docs/architecture/intent-to-loop-hexagon.md,
and the six Context Density Rule fields:
| Field | Meaning |
|---|---|
intent | Behavior or capability to produce |
boundary | Bounded context, non-goals, write scope |
evidence | Acceptance examples, tests, gates, verdicts |
decision | Why this plan shape was chosen |
constraint | Safety, runtime, token, and process limits |
next_action | Exact /crank or follow-up command |
Everything else stays in child artifacts and is linked by path.
Discovery To Plan Port
Use the Skill Ports and Adapters vocabulary and the Intent-to-Loop Hexagon for the boundary between Discovery and Plan:
| Boundary piece | Discovery contract |
|---|---|
| Inbound port | shape_intent from operator goal or BDD intent |
| Outbound port | plan_slices into /plan |
| Driving adapter | /discovery skill invocation |
| Driven adapter | /plan skill invocation plus br/file persistence |
| Context packet | density block, artifact links, acceptance examples, non-goals, constraints |
| Guard adapter | plan-pawl duel verdict (fanout) or /premortem verdict (MVP-slice) before packet handoff |
Executable acceptance: references/discovery.feature — Discovery hands dense intent across the plan_slices port (promoted from inline; soc-qk4b.2).
Goal-design packet inputs (intent.md + driver.md) use references/goal-design-packet-input.md: run the checker before research; failure blocks; checked packets feed density fields and candidate slice seeds, not a /plan replacement.
Plan-Pawl Duel Gate
Risk-class routing: MVP vertical slice vs fanout (decide FIRST)
The duel is for one-way doors, not every slice. Route first:
- Fanout class (architecture forks, one-way-door decisions, cross-agent
coordination contracts, product decisions): run the plan-pawl duel below — the
multi-modelpawl over the PLAN artifact (docs/contracts/pawls.md). It SUBSUMES the old single-judge Codex fanout approval AND the/premortemcouncil into one cross-family gate (--duel, auto-on for fanout/--complexity=full). - MVP vertical slice (default for routine runtime/CLI work): skip the duel
(
--no-duel). Run the discovery DAG under a hard time-box — ~15 min discovery, ~90 min slice — then stop; the slice gets only the inline--quickpremortem. Work surfaced mid-slice becomes follow-up beads, never absorbed into the active bead.
The plan-pawl gates plan SHAPE, never behavior: the 2026-06-12 runtime review found a coherent fanout+approval set that still missed an auth bypass one adversarial test would have caught (learning).
The gate (fanout-class work only)
Insert the duel before /plan creates beads. The two-judge ApprovalEdge shape is
docs/contracts/codex-fanout-approval-packet.md;
the DAG step is STEP 3.5 in references/dag.md.
- Write at least three independent
PerspectivePlanartifacts with different lenses (product/user value, architecture/gate integrity, operations/migration). - Winnow those into one
SynthesisPacket(selected plan, rejected alternatives, rationale, open questions, risks). - Run the cross-family DUEL: two distinct-family judge panes (e.g. Claude + Codex
via
agent-nativewithntm,--no-user, fresh-context by construction) each write one judge verdict to.agents/duel/<run-id>/. - Decide deterministically — never read the panes yourself:
ao plan-pawl decide --dir .agents/duel/<run-id> --round <N> --max-rounds <duel-rounds>. exit 0PASS(quorum: no FAIL, >=2 distinct families) ->/plan; exit 3REDO-> auto-redo (a FAIL re-synthesizes; a mechanical WARN auto-applies + re-judges; a judgment WARN is surfaced, non-blocking); exit 4BLOCKED-> breaker tripped (round > max / judgment flag / oscillation), stop (the andon). - Persist a duel
ApprovalEdge(both judge panes, theduel_verdict_dir, the decision). For fanout this verdict IS the premortem verdict — do not run a second council.
Approval evidence must survive the worktree: before the gated bead/epic closes, mirror
the council/duel artifacts (or a compact proof packet) to a tracked durable surface
(see codex-exec) — .agents/ in a temp worktree is ignored.
Open-Ended Path (generate-winnow → operationalize → refine)
Additive to the default flow — it does not replace the strict-delegation contract or the artifact-first DAG. This path activates for open-ended "improve the project"-style goals (
"improve the project","what should we build next","make X more robust") OR when--ideateis passed. For a specific goal, the default flow (brainstorm-clarify → research → plan → premortem) is unchanged.
On the open-ended path, Discovery prepends the generate-winnow methodology before research/plan and adds two steps after planning. Full detail lives in references/bead-operationalization.md and references/ideation-mode.md.
- Ideate (delegate to
brainstorm --ideate). Invokebrainstormin ideation mode (a real skill invocation — strict delegation still applies; do NOT inline the 30-idea generation). It returns a ranked portfolio of 15 ideas (top 5 + next 10) with how/perceive/implement notes, rubric scores, and red-team findings. - Research + plan-pawl duel + Plan. Run research over the selected portfolio. Open-ended/high-risk work is fanout class: produce
PerspectivePlanartifacts and aSynthesisPacket, then run the STEP 3.5 plan-pawl duel (two distinct families,ao plan-pawl decide) before/plancreates tracker rows — that duel verdict subsumes the premortem. Then run the normal artifact-first DAG over the approved packet rather than a single goal. - Operationalize. Turn the ranked portfolio into a comprehensive, granular set of self-documenting beads — tasks, subtasks, dependency structure (
ao beads exec dep add), and explicit test tasks (unit + e2e with detailed logging). Each bead carries what/why/how/risks/success so the original plan markdown never needs to be consulted again. Overlap-check against existing beads (ao beads exec list --json) before creating — merge, don't duplicate. - Refine in plan space (4-5 passes). Before handing the packet to
/crank, run 4-5 refinement passes over the bead set. Each pass: re-read AGENTS.md (especially after compaction), check every bead for sense and optimality, and DO NOT OVERSIMPLIFY / DO NOT LOSE FEATURES OR FUNCTIONALITY. Validate between passes (no dependency cycles; every leaf actionable viaao beads exec ready).
Tracking is
brwithbvtriage — this is AgentOps. The operationalize and refine steps consumebrainstorm's ideation output; seereferences/bead-operationalization.md.
Executable acceptance for this path: references/discovery.feature (ideation/operationalize/refine scenarios, ag-yw0).
Execution
Run the artifact-first DAG in references/dag.md. That file owns the executable workflow, state shape, gate detail, per-step detail, and the acceptance-criteria YAML contract.
Flags
| Flag | Default | Description |
|---|---|---|
--auto | on | Fully autonomous (no human gates). Inverse of --interactive. Passed through to /research and /plan. |
--interactive | off | Human gates in research and plan (STEP 3, STEP 4). Does NOT affect premortem gate. |
--skip-brainstorm | auto | Skip STEP 1 brainstorm when goal is already specific |
--ideate | auto | Force the open-ended generate-winnow path: delegate to brainstorm --ideate (30→5→15), then operationalize into self-documenting br beads and refine 4-5x in plan space. Auto-on for open-ended goals. See Open-Ended Path. |
--complexity=<level> | auto | Force complexity level (fast / standard / full) |
--no-budget | off | Disable phase time budgets |
--no-scaffold | off | Skip scaffold auto-invocation in STEP 4.5 |
--duel | auto | Run the plan-pawl cross-family duel at STEP 3.5. Auto-on for fanout class and --complexity=full; opt-in elsewhere. Subsumes the single-judge fanout approval + premortem council. |
--no-duel | off | Skip the duel (MVP-slice class): single-Fable ApprovalEdge if approval is needed, plus the inline --quick premortem at STEP 5. |
--duel-rounds=<N> | 3 | Max duel rounds before the max-attempts breaker trips (ao plan-pawl decide --max-rounds). |
Quick Start
/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
Output Specification
- Path: child artifacts under
.agents/research/,.agents/plans/, and.agents/council/; dense packets and summaries under.agents/rpi/; load-bearing slices in the resolved tracker. - Filename:
execution-packet.jsonfor latest/per-run packets andphase-1-summary-YYYY-MM-DD-<goal-slug>.mdfor the compact summary; preserve child artifact names returned by their skills. - Format: compact markdown summary to stdout plus schema-valid JSON packet containing density fields, artifact links, acceptance examples, constraints, optional epic ID, tracker mode, and next action.
- Exit code: run
bash skills/discovery/scripts/validate.shand require zero; for beads requireao beads exec show <epic_id>to resolve Gherkin slices, while tasklist mode requires.agents/rpi/tasklist.mdwith epic, slice, and Given/When/Then markers. - Downstream handoff: pass the dense packet and mode-appropriate tracker evidence to
/crankand/validate; raw child output remains linked in its own artifact.
Quality Checklist
- Every capability-gap claim cites the search that distinguishes missing work from existing machinery.
- The packet preserves testable Given/When/Then behavior, non-goals, evidence, constraints, and one exact next action without embedding raw child transcripts.
- Risk classification matches the gate used, and
DONEis impossible until the planned slices exist in the active tracker.
Completion Markers
<promise>DONE</promise> # Discovery complete AND persisted: beads mode requires a resolvable epic_id plus Gherkin-bearing child slices; tasklist mode requires .agents/rpi/tasklist.md with epic, slice, and Given/When/Then markers.
<promise>BLOCKED</promise> # Report the actual class: fanout/hard gates may block directly; an ordinary MVP breaker blocks only after its bounded helper returns ESCALATE.
Troubleshooting
Read references/troubleshooting.md for common problems and solutions.
Reference Documents
- references/goal-clarification-brainstorm.md — absorbed brainstorm body (four-phase clarification + ideation funnel)
- references/idea-rubric.md — absorbed brainstorm idea rubric
- references/brainstorm.feature — absorbed brainstorm executable spec
- references/red-team-checklist.md — absorbed brainstorm red-team checklist
- references/dag.md — executable workflow, state shape, gate detail, per-step detail, acceptance-criteria YAML contract
- references/complexity-auto-detect.md — precedence contract for keyword vs issue-count classification
- references/idempotency-and-resume.md — re-run safety and resume behavior
- references/phase-budgets.md — time budgets per complexity level
- references/troubleshooting.md — common problems and solutions
- references/output-templates.md — execution packet and phase summary formats
- references/phase-data-contracts.md — phase artifact data contracts (cited from references/isolation-contract.md) See also: research, plan, premortem, crank, rpi, scaffold
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/boshu2/agentops/discovery">View discovery on skillZs</a>