feat(agents): add learnings-researcher for institutional knowledge (#106)

* fix(compound-docs): correct severity enum in validation example

The example error message referenced [critical, moderate, minor] but
the yaml-schema.md defines severity as [critical, high, medium, low].

* refactor(agents): standardize search tool recommendations

- Update repo-research-analyst to recommend built-in Grep tool instead
  of CLI rg (Grep uses ripgrep under the hood)
- Add TypeScript example for ast-grep alongside Ruby
- Update pattern-recognition-specialist to use built-in Grep tool
- Keep ast-grep for AST-based structural matching (language-specific)

* feat(agents): add learnings-researcher for institutional knowledge

Add new research agent that efficiently searches docs/solutions/ for
relevant past solutions before implementing features or fixing bugs.

Key features:
- Grep-first filtering strategy for efficiency with 100+ files
- Category-based narrowing to reduce search scope
- Parallel Grep calls with synonym support (OR patterns)
- Frontmatter-only reads before full document reads
- Always checks critical patterns file
- Uses haiku model for speed (structured task, recipe-based)

Integrates with /workflows:plan to run in parallel with
repo-research-analyst during local research phase.

Closes the loop on compound engineering: solutions documented via
/workflows:compound are now discoverable during planning.
This commit is contained in:
Trevin Chow
2026-01-21 20:01:34 -08:00
committed by GitHub
parent ad1a72ae66
commit ebbf43db62
5 changed files with 260 additions and 10 deletions

View File

@@ -96,10 +96,11 @@ Structure your findings as:
**Search Strategies:**
When using search tools:
- For Ruby code patterns: `ast-grep --lang ruby -p 'pattern'`
- For general text search: `rg -i 'search term' --type md`
- For file discovery: `find . -name 'pattern' -type f`
Use the built-in tools for efficient searching:
- **Grep tool**: For text/code pattern searches with regex support (uses ripgrep under the hood)
- **Glob tool**: For file discovery by pattern (e.g., `**/*.md`, `**/CLAUDE.md`)
- **Read tool**: For reading file contents once located
- For AST-based code patterns: `ast-grep --lang ruby -p 'pattern'` or `ast-grep --lang typescript -p 'pattern'`
- Check multiple variations of common file names
**Important Considerations:**