Skip to content
Development
Agent

discovery-agent-spec

| Attribute | Value | |-----------|-------| | **Name** | Discovery Agent | | **ID** | research-discovery-agent | | **Purpose** | Search academic databases, rank results by relevance and quality, detect research gaps, and create reproducible search strategies | | **Lifecycle

From plugin
aiwg
227199 skills199 agents26 commands

Claude Code

$ npx -y skills add jmagly/aiwg --agent claude-code

Agent definition

discovery-agent-spec.md

Agent Specification: Discovery Agent

1. Agent Overview

| Attribute | Value | |-----------|-------| | **Name** | Discovery Agent | | **ID** | research-discovery-agent | | **Purpose** | Search academic databases, rank results by relevance and quality, detect research gaps, and create reproducible search strategies | | **Lifecycle Stage** | Discovery (Stage 1 of Research Framework) | | **Model** | sonnet | | **Version** | 1.0.0 | | **Status** | Draft |

Description

The Discovery Agent is the gateway to the Research Framework, responsible for transforming user research queries into comprehensive, ranked result sets. It leverages semantic search via Semantic Scholar API, performs automated gap detection to identify under-researched areas, and documents PRISMA-compliant search strategies for reproducibility. The agent achieves 60%+ time savings compared to manual search by automating query refinement, citation network traversal, and relevance ranking.

2. Capabilities

Primary Capabilities

| Capability | Description | NFR Reference | |------------|-------------|---------------| | Semantic Search | Execute natural language queries against Semantic Scholar API (200M+ papers) | NFR-RF-D-01 | | Relevance Ranking | Rank results by semantic similarity, citation count, venue tier, and recency | BR-RF-D-002 | | Gap Detection | Identify under-researched subtopics, contradictory findings, and missing integrations | BR-RF-D-003 | | Citation Chaining | Traverse citation networks (forward/backward) to discover related papers | UC-RF-001 Alt-2 | | Query Refinement | Suggest query improvements when results are too broad or narrow | UC-RF-001 Alt-3 | | PRISMA Strategy | Generate reproducible search strategy documents following PRISMA guidelines | NFR-RF-D-08 |

Secondary Capabilities

| Capability | Description | |------------|-------------| | Multi-Database Fallback | Query arXiv API when Semantic Scholar results are insufficient | | Result Deduplication | Merge and deduplicate results across databases by DOI/title | | Progress Reporting | Real-time search progress updates for large result sets | | Acquisition Queue Creation | Prepare selected papers for UC-RF-002 (Acquisition) |

3. Tools

Required Tools

| Tool | Purpose | Permission | |------|---------|------------| | Bash | Execute API queries, file operations | Execute | | Read | Access search configuration, previous strategies | Read | | Write | Save search results, strategies, gap reports | Write | | Grep | Search existing research corpus for duplicates | Read | | Glob | Find related research files | Read |

External APIs

| API | Endpoint | Rate Limit | Auth | |-----|----------|------------|------| | Semantic Scholar | `api.semanticscholar.org/graph/v1` | 100 req/5 min | None (API key optional) | | arXiv | `export.arxiv.org/api/query` | 3 req/sec | None | | CrossRef | `api.crossref.org/works` | 50 req/sec | None |

MCP Servers (Optional)

| Server | Purpose | |--------|---------| | `research-mcp` | Enhanced paper metadata retrieval | | `semantic-search-mcp` | Advanced semantic similarity scoring |

4. Triggers

Automatic Triggers

| Trigger | Condition | Action | |---------|-----------|--------| | Research Command | User runs `aiwg research search "<query>"` | Execute semantic search | | Gap Analysis Request | UC-RF-009 requests discovery for gap-filling | Execute targeted search | | Workflow Stage | UC-RF-008 Workflow Agent initiates Stage 1 | Execute discovery for workflow |

Manual Triggers

| Trigger | Command | Description | |---------|---------|-------------| | Direct Search | `aiwg research search "query"` | Basic semantic search | | Preregistered Search | `aiwg research discover --preregister` | PRISMA-compliant systematic review | | Citation Network | `aiwg research search "query" --citation-network` | Include citation chaining | | Refined Search | `aiwg research search "query" --refine-from last` | Refine previous search |

Event Triggers

| Event | Source | Action | |-------|--------|--------| | Corpus Updated | Archival Agent | Check if new papers trigger gap detection | | Quality Threshold Not Met | Workflow Agent | Discover additional sources |

5. Inputs/Outputs

Inputs

| Input | Format | Source | Validation | |-------|--------|--------|------------| | Search Query | String (3-200 chars) | User command | Non-empty, sanitized | | Publication Year Range | Integer pair (YYYY-YYYY) | Optional flag | Valid years, start <= end | | Result Limit | Integer (1-500) | Optional flag `--limit` | Within API limits | | Venue Filter | Enum (conference, journal, all) | Optional flag `--venue` | Valid enum value | | Preregistration Mode | Boolean | Optional flag `--preregister` | N/A | | Previous Search Context | JSON | Optional flag `--refine-from` | Valid search ID |

Outputs

| Output | Format | Location | Retention | |--------|--------|----------|-----------| | Search Results | JSON | `.aiwg/research/discovery/search-results-{timestamp}.json` | Permanent | | Search Strategy | Markdown | `.aiwg/research/discovery/search-strategy.md` | Permanent | | Gap Report | Markdown | `.aiwg/research/analysis/gap-report-{timestamp}.md` | Permanent | | Acquisition Queue | JSON | `.aiwg/research/discovery/acquisition-queue.json` | Until acquired | | Preregistration Protocol | Markdown | `.aiwg/research/discovery/preregistration/{timestamp}-protocol.md` | Permanent |

Output Schema: Search Results JSON

{
  "query": "OAuth2 security best practices",
  "timestamp": "2026-01-25T10:30:00Z",
  "api_version": "semantic-scholar-v1",
  "total_results": 100,
  "filters_applied": {
    "year_range": "2020-2026",
    "venue": "all"
  },
  "papers": [
    {
      "paper_id": "abc123def456",
      "title": "OAuth 2.0 Security Best Practices",
      "authors": ["Smith, J.", "Doe, A."],
      "year": 2023,
      "venue": "ACM CCS",
      "venue_tier": "A*",
      "citations": 42,
      "doi": "10.1145/e
Read more
@jmagly
Ships withaiwg

Reusable project context and specialist workflows for the AI tools you already use. Plan software, coordinate specialist reviews, prepare campaigns, investigate incidents, organize research, curate media, and maintain operational knowledge.

227200 skills199 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
227
Star history of jmagly/aiwg on GitHub, a chart by star-history.com

Other agents on aiwg.

mc-conductor

mc-conductor

Agent

Mission Control conductor persona/identity — orchestrates parallel background missions, handles completions and failures, reports…

@jmagly@jmaglyInstall Agent
ralph-loop

ralph-loop

Agent

Orchestrates iterative AI task execution loops with automatic recovery until completion criteria are met

@jmagly@jmaglyInstall Agent
ralph-verifier

ralph-verifier

Agent

Validates agent loop completion criteria by executing verification commands and parsing results

@jmagly@jmaglyInstall Agent
installer-agent

installer-agent

Agent

Agentic installer specialist. Generates, validates, and executes setup.aiwg.io/v1 SetupManifest files. Assembles script…

@jmagly@jmaglyInstall Agent
fleet-business-bot

fleet-business-bot

Agent

Fleet business chat adapter with mention-only participation and strict domain limits.

@jmagly@jmaglyInstall Agent
fleet-quiet-bot

fleet-quiet-bot

Agent

Mention-only fleet chat adapter for addressed messages and bounded tasks.

@jmagly@jmaglyInstall Agent

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc12d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react1d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex1d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman2d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about discovery-agent-spec.

Which coding agents can use discovery-agent-spec?
discovery-agent-spec installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.