Xia
Xia is the anti-reinvention scout. Use it before unfamiliar, ambiguous, version-sensitive, or high-risk implementation work when a research brief should come before planning or code.
Hard Gate
Do not write code or edit files until the research brief is complete, unless the user explicitly waives research or directly asks for immediate implementation.
If two viable paths differ materially in behavior, risk, or migration cost, finish the brief and ask one targeted question instead of guessing.
Depth
Quick: low-risk questions with an obvious local seam.Standard: default; map repo, search local reuse, check upstream patterns, check current official docs.Deep: cross-cutting, version-sensitive, or architecture-heavy work.
If unsure, use Standard.
Required Flow
- Confirm whether research was waived.
- Read repo contracts and map the stack from real artifacts.
- Search locally for existing functionality and extension points.
- Check upstream patterns only after local evidence is clear.
- Check current official docs with version awareness.
- Return a concise research brief using
references/research-brief-template.md.
Load references/xia-protocol.md for stack-ledger guidance, local reuse targets, DeepWiki/Exa roles, recommendation rules, follow-up question criteria, and red flags.
Evidence Labels
Every non-trivial claim in the brief must be labeled:
Localfor findings from this repositoryUpstreamfor public GitHub repository patternsDocsfor official documentationInferencefor conclusions drawn from evidence
Do not blur these categories.
Recommendation Rule
Choose the lightest credible path:
- Reuse existing local functionality.
- Use built-in framework or library capabilities that fit the repo version.
- Adapt an upstream pattern that fits the repo.
- Build from scratch only when the other options are insufficient.
Explain why the chosen path beats the next-best alternative.
Reference Files
| File | When to Load |
|---|---|
references/xia-protocol.md |
Detailed research flow, tool roles, guardrails |
references/research-brief-template.md |
Required brief structure |
references/pressure-scenarios.md |
RED/GREEN validation scenarios |