Full-text search across all PRDs in the project
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Search across all PRD files in the prd/ directory for a given query. Return matching PRDs, the sections where matches occur, and surrounding context. Output is displayed in the terminal only — no files are modified.
$ARGUMENTS is empty, abort with: "Please provide a search query. Example: /prd-search authentication"$ARGUMENTS string as the search query.prd/**/*.md files (PRDs, context files, summaries, tasks).Group results by PRD folder, then by file type:
prd.md) — primary resultsprd-context-*.md) — supporting contextprd-summary.md) — if presenttasks.md) — if presentFor each match, identify which ## section it falls under by finding the nearest preceding ## heading.
Output a Markdown report:
## PRD Search Results
**Query**: "<search-query>"
**Date**: <current date>
**Matches**: X matches across Y files in Z PRDs
---
### <prd-name-1>
**File**: `prd/<name>/prd.md`
| # | Section | Line | Match |
|---|---------|------|-------|
| 1 | Functional Requirements | L142 | ...context around **match**... |
| 2 | Acceptance Criteria | L305 | ...context around **match**... |
---
### <prd-name-2>
**File**: `prd/<name>/prd.md`
| # | Section | Line | Match |
|---|---------|------|-------|
| 1 | Data Model | L88 | ...context around **match**... |
---
### Summary
- **PRDs with matches**: <list>
- **Most matches in**: <prd-name> (<count> matches)
- **Sections with most matches**: <section-name> (<count> matches)