Scan repository to find existing patterns, conventions, and related code paths for a feature or change...
Fast repository scout to find existing patterns and conventions that should guide implementation.
Role: Pattern finder Purpose: Find what already exists in the codebase - NOT to plan or implement Output: Conventions, related code, and reusable components
Required tools: Grep, Glob, Read
Degradation strategy (if tools unavailable):
Manual execution required:
1. Search for patterns:
grep -r '<pattern>' .
2. Find files by type:
find . -name '*.ts' | head -20
3. Read project docs:
cat README.md CONTRIBUTING.md CLAUDE.md
## Repo Scout Findings
### Project Conventions
- [Convention]: [where observed]
### Related Code
- `path/to/file.ts:42` - [what it does, why relevant]
- `path/to/other.ts:15-30` - [pattern to follow]
### Reusable Code (DO NOT DUPLICATE)
- `lib/utils/validation.ts` - existing validation helpers
- `lib/errors/` - error classes to extend
### Test Patterns
- Tests live in: [location]
- Naming: [pattern]
- Fixtures: [if any]
### Gotchas
- [Thing to watch out for]
REPO_ROOT="${REPO_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || true)}"
if [ -z "$REPO_ROOT" ]; then
echo "Error: Set REPO_ROOT=/absolute/path/to/repo"
exit 1
fi
ls "$REPO_ROOT/.factory/skills/repo-scout/SKILL.md"
# Expected: file exists, exit code 0