Legacy code archaeology — multi-phase discovery that reads the codebase, git history, and optionally Jira to reconstruct WHY code exists. Produces discovery notes, ADR candidates, and PRD candidates for human review. Activated when user says 'descobrir módulo', 'arqueologia de código', 'entender legado', 'contexto do módulo', 'por que esse código', 'legacy context', '/discover', or when starting work on an unfamiliar legacy module.
Legacy code archaeology and context bootstrap. Activated when the user mentions "legacy code", "código legado", "sistema antigo", "código sem documentação", "discover module", "entender módulo", "arqueologia de código", "código que ninguém entende", or runs /discover. Populates the empty upper layers of tiered lookup (memory and docs) before context-engineering techniques can be effective. Read-only for source code: outputs discovery notes, ADR candidates, and suggested intent markers. Remote discovery supports GitHub (via gh CLI) and Azure DevOps (via az CLI plus REST).
Context engineering — proactive context window management. Activated when working on large tasks, long sessions, multi-file changes, or when context is getting bloated. Keywords: "context", "too much code", "split this task", "focus", "scope down", "token budget", "keep it small". Complements the reactive context-guard hook with proactive techniques.
Reconcile a Claude Design handoff bundle (PROMPT.md) with the project's PRD and conventions. Activated when the PRD references a Claude Design handoff, when a PROMPT.md exists in docs/design/, or when the user mentions "Claude Design", "design handoff", or "PROMPT.md".
Pattern learner. Activated when the user says "learn from this", "what patterns", "improve skills", "retrospective", "session review", or wants to extract reusable patterns from recent work to improve the project's skills and conventions.
Long-term memory via vector DB. Activated when the user asks about past decisions, previous solutions, project history, "how did we do X", "last time", "we already solved", or when the agent needs historical context before planning an implementation.
PRD authoring and refinement. Activated when the user says "write PRD", "draft PRD", "break down feature", "scope this", "requirements for", "define feature", or wants to turn a rough idea into a structured product document.
Source-driven development. Activated when the user mentions a framework, library, or SDK decision, or when implementing features with external dependencies. Keywords: "official docs", "documentation", "how does X work", "what API", "which method", "framework", "library", "SDK". Ensures every framework-specific decision is backed by official documentation, not training data.