pre-dev-research

Gate 0 research phase for pre-dev workflow. Dispatches 3 parallel research agentsto gather codebase patterns, external best practices, and framework documentationBEFORE creating PRD/TRD. Outputs research.md with file:line references.

⭐25stars🔀1forks📁View on GitHub🕐Updated Dec 31, 2025⬇️2downloads

When & Why to Use This Skill

The Pre-Dev Research skill automates the critical 'Gate 0' phase of the software development lifecycle by dispatching parallel agents to analyze codebase patterns, external best practices, and framework documentation. By generating a structured research.md file with precise file-line references before PRD or TRD creation, it ensures that technical planning is grounded in architectural reality, significantly reducing technical debt and implementation friction.

Use Cases

  • Greenfield Development: Researching industry best practices and framework patterns for entirely new features to establish a solid architectural foundation.
  • Codebase Modification: Analyzing existing repository conventions and internal patterns to ensure new functional extensions remain consistent with the current codebase.
  • System Integration: Investigating external API documentation, SDK version constraints, and integration patterns to plan seamless connections with third-party services.
  • Technical Debt Prevention: Identifying prior solutions within the internal knowledge base to avoid reinventing the wheel and ensure compliance with established engineering standards.
namering:pre-dev-research
description"Connecting systems or adding external dependencies"
BEFORE creating PRD/TRD. Outputs research.md with fileline references.
trigger|
- Invoked by /ringpre-dev-full and /ring:pre-dev-feature
skip_when|
before[ring:pre-dev-prd-creation, ring:pre-dev-feature-map]
complementary[ring:pre-dev-prd-creation, ring:pre-dev-trd-creation]
primary_agents[ring:framework-docs-researcher, ring:best-practices-researcher, ring:repo-research-analyst]
focus"API documentation and integration patterns"

Pre-Dev Research Skill (Gate 0)

Purpose: Gather comprehensive research BEFORE writing planning documents, ensuring PRDs and TRDs are grounded in codebase reality and industry best practices.

The Research-First Principle

Traditional:  Request → PRD → Discover problems during implementation
Research-First:  Request → Research → Informed PRD → Smoother implementation

Research prevents: Reinventing existing patterns, ignoring conventions, missing framework constraints, repeating solved problems

Step 1: Determine Research Mode

BLOCKING GATE: Before dispatching agents, determine the research mode.

Mode When to Use Example
greenfield No existing patterns "Add GraphQL API" (when project has none)
modification Extending existing functionality "Add pagination to user list API"
integration Connecting external systems "Integrate Stripe payments"

If unclear, ask:

Before starting research: Is this (1) Greenfield - new capability, (2) Modification - extends existing, or (3) Integration - connects external systems?

Mode affects agent priority:

  • Greenfield → Web research primary (best-practices, framework-docs)
  • Modification → Codebase research primary (repo-research)
  • Integration → All agents equally weighted

Step 2: Dispatch Research Agents

Run 3 agents in PARALLEL (single message, 3 Task calls):

Agent Prompt Focus
ring:repo-research-analyst Codebase patterns for [feature]. Search docs/solutions/ knowledge base. Return file:line references. If modification mode: PRIMARY focus.
ring:best-practices-researcher External best practices for [feature]. Use Context7 + WebSearch. Return URLs. If greenfield mode: PRIMARY focus.
ring:framework-docs-researcher Tech stack docs for [feature]. Detect versions from manifests. Use Context7. Return version constraints. If integration mode: focus on SDK/API docs.

Step 3: Aggregate Research Findings

Output: docs/pre-dev/{feature-name}/research.md

Section Content
Metadata date, feature, research_mode, agents_dispatched
Executive Summary 2-3 sentences synthesizing key findings
Research Mode Why selected, what it means for focus
Codebase Research Agent output (file:line references)
Best Practices Research Agent output (URLs)
Framework Documentation Agent output (version constraints)
Synthesis Key patterns to follow (file:line, URL, doc ref); Constraints identified; Prior solutions from docs/solutions/; Open questions for PRD

Step 4: Gate 0 Validation

BLOCKING CHECKLIST:

Check Required For
Research mode documented All modes
All 3 agents returned All modes
research.md created All modes
At least one file:line reference modification, integration
At least one external URL greenfield, integration
docs/solutions/ searched All modes
Tech stack versions documented All modes
Synthesis section complete All modes

If validation fails:

  • Missing agent output → Re-run that agent
  • No codebase patterns (modification) → May need mode change
  • No external docs (greenfield) → Try different search terms

Integration with Pre-Dev Workflow

ring:pre-dev-full (9-gate): Gate 0 Research → Gate 1 PRD (reads research.md) → ... → Gate 3 TRD (reads research.md)

ring:pre-dev-feature (4-gate): Gate 0 Research → Gate 1 PRD → Gate 2 TRD → Gate 3 Tasks

Research Document Usage

In Gate 1 (PRD): Reference existing patterns with file:line; cite docs/solutions/; include external URLs; note framework constraints

In Gate 3 (TRD): Reference implementation patterns; use version constraints; cite similar implementations

Anti-Patterns

  1. Skipping research for "simple" features - Even simple features benefit from convention checks
  2. Wrong research mode - Greenfield with heavy codebase research wastes time; modification without codebase research misses patterns
  3. Ignoring docs/solutions/ - Prior solutions are gold; prevents repeating mistakes
  4. Vague references without file:line - "There's a pattern somewhere" is not useful; exact locations enable quick reference