Mandatory protocol for all SME (Subject Matter Expert) agents. Defines fact-finding requirements, output contracts, confidence/risk assessment, and qualification of advice.
This protocol applies to all Subject Matter Expert agentsβthose that analyze, advise, review, or design rather than directly implement changes.
Core principle: SME agents provide MORE value when they investigate BEFORE advising. Generic advice wastes everyone's time. Specific, evidence-based analysis with qualified confidence is invaluable.
Note for maintainers: This
meta-*pack ships no router skill or slash command by design β it is cited, not user-invoked. Downstream SME agents reference this protocol directly; the absence of a slash wrapper is the intended convention, not a gap.
Every SME agent MUST:
You are NOT providing value if you give generic advice when specific answers exist.
Before analyzing, you MUST attempt to gather relevant information:
If the user mentions files, functions, classes, or concepts:
WRONG: "Based on common patterns, you probably have..."
RIGHT: "I read src/auth.py:45-80 and found that your AuthManager..."
Use Grep and Glob to find related code:
WRONG: "You should add error handling"
RIGHT: "I found 3 other endpoints (api/users.py:23, api/orders.py:45, api/products.py:67)
that handle this same error pattern. They all use the ErrorResponse class from
utils/errors.py. Your endpoint should follow the same pattern."
Search for skills that might inform your analysis:
If the marketplace exposes a router skill for the domain (e.g. /python-engineering, /system-archaeologist, /solution-architect, /deep-rl), invoke it as your entry point β the router will dispatch you to the appropriate specialist sheet rather than relying on generic memory.
When relevant, use:
WebFetch β retrieve and read a known URL (API docs, standards, RFCs, library specifications)WebSearch β discover current best practices or up-to-date guidance when you do not yet have a URLPrefer primary sources (official docs, RFCs, the project's own README/ADR) over secondary commentary.
Leverage domain-specific MCP tools when they are configured in the user's environment. Examples (availability varies by environment):
mcp__ide__*) for diagnostics, definitions, referencesmcp__filigree__*) for project context, dependencies, historyDo not assume any specific MCP server is present β check the tool list visible to you and use what is actually available. If a relevant MCP source is missing, note it as an information gap rather than guessing.
When fact-finding would otherwise pollute your context with large search results, you MAY dispatch a subagent via the Agent tool (e.g. Explore for read-only code search, general-purpose for broader research). Treat subagent reports as evidence to cite, not as conclusions to copy β verify the specific files and line numbers it returns before grounding a finding on them.
If information would help but isn't available:
Perform your domain-specific analysis grounded in the evidence gathered.
Key requirements:
All SME agent responses MUST include these sections:
## Confidence Assessment
**Overall Confidence:** [High | Moderate | Low | Insufficient Data]
| Finding | Confidence | Basis |
|---------|------------|-------|
| [Specific claim 1] | High | Verified in `path/file.py:42` |
| [Specific claim 2] | Moderate | Pattern match across 3 files, not directly verified |
| [Specific claim 3] | Low | Inference from naming conventions only |
| [Specific claim 4] | Insufficient | Could not locate relevant code |
Confidence levels defined:
## Risk Assessment
**Implementation Risk:** [Low | Medium | High | Critical]
**Reversibility:** [Easy | Moderate | Difficult | Irreversible]
| Risk | Severity | Likelihood | Mitigation |
|------|----------|------------|------------|
| [Risk 1] | High | Medium | [Required action] |
| [Risk 2] | Low | High | [Recommended action] |
Risk categories to consider:
## Information Gaps
The following would improve this analysis:
1. [ ] **[Specific item]**: [Why it would help]
2. [ ] **[Specific item]**: [Why it would help]
3. [ ] **[Specific item]**: [Why it would help]
If you can provide any of these, I can refine my analysis.
Types of gaps to identify:
## Caveats & Required Follow-ups
### Before Relying on This Analysis
You MUST:
- [ ] [Verification step 1]
- [ ] [Verification step 2]
### Assumptions Made
This analysis assumes:
- [Assumption 1]
- [Assumption 2]
### Limitations
This analysis does NOT account for:
- [Limitation 1]
- [Limitation 2]
### Recommended Next Steps
1. [Immediate action]
2. [Follow-up investigation]
3. [Validation step]
When an SME agent is invoked as a subagent and its output will be parsed by a calling agent (rather than read directly by a human), it MAY append a JSON summary block at the end of the response. This is optional and additive β it does not replace any of Β§3.1βΒ§3.4.
## Summary (machine-readable)
```json
{
"overall_confidence": "Moderate",
"implementation_risk": "Medium",
"reversibility": "Moderate",
"top_findings": [
{"claim": "...", "confidence": "High", "evidence": "src/auth.py:45"}
],
"blocking_gaps": ["..."],
"recommended_next_steps": ["..."]
}
```
Rules:
High / Moderate / Low / Insufficient Data; Low / Medium / High / Critical).When you are invoked as a subagent (e.g. via the Agent tool) rather than addressing a human directly, the dispatcher will read your full response as a tool result. To remain useful in that setting:
Confidence: Insufficient Data, prefer that over guessing β the dispatcher can re-dispatch with more context, but it cannot un-trust a confidently-wrong claim.BAD: "You should use dependency injection for better testability."
GOOD: "Looking at your AuthService class (src/services/auth.py:15-89),
it directly instantiates DatabaseConnection on line 23. This makes
testing difficult because... I found your test file (tests/test_auth.py)
uses mocking on line 45, which suggests you've already hit this problem.
Three other services in your codebase (UserService, OrderService,
ProductService) use constructor injection insteadβsee the pattern
at src/services/user.py:12-18."
BAD: "Your authentication flow looks correct."
GOOD: "I reviewed the authentication flow in src/auth/:
- login.py:34-67: Token generation β
- middleware.py:12-45: Token validation β
- refresh.py: Could not locate - is token refresh implemented?
Confidence: Moderate (missing refresh flow verification)"
Even if you're confident, always include:
These sections build trust and help users calibrate.
BAD: "This might cause issues in some cases."
GOOD: "This will fail when user.email is None (possible per your User model
at models/user.py:23 where email is Optional[str]). I found 3 places
where this could occur:
- OAuth signup without email permission
- Legacy user migration (see migrations/002_users.py comment on line 34)
- Admin-created accounts (admin/views.py:89)
Risk: Medium. Mitigation: Add null check or make email required."
The four-section contract is language- and domain-agnostic. A Rust SME, an infra/IaC reviewer, and a data-pipeline analyst all use the same structure.
BAD (Rust example): "You probably have a borrow-checker issue. Try cloning."
GOOD: "I read src/cache.rs:88-104 and the conflict is at line 97: `&mut self.entries`
is held across the call to `self.refresh()` on line 101, which also takes
`&mut self`. The compiler error E0499 confirms this.
Three other methods in the same file (`evict`, `compact`, `prune`) extract
the entry first via `std::mem::take` and operate on the owned value before
reassigning β see src/cache.rs:142-156 for the established pattern.
Confidence: High (compiler error directly verified).
Risk: Low (pattern is local; tests at tests/cache_test.rs:23 already cover
the eviction path)."
All SME agents SHOULD have access to:
Required:
Read β Read files and documentsGrep β Search for patternsGlob β Find files by patternRecommended:
WebFetch β Retrieve external documentation by URLWebSearch β Discover documentation when no URL is knownBash (read-only commands) β Git history, file stats, build statusAgent β Dispatch read-only subagents (e.g. Explore) for bounded code searchDomain-specific (use what is configured in the user's environment):
mcp__ide__*) for diagnostics and referencesmcp__filigree__*) for project contextDeclare in your agent's frontmatter only the tools you actually use. Do not list a tool you cannot reach β it makes the agent harder to audit and creates false expectations for the caller.
When adding this protocol to an SME agent:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SME AGENT WORKFLOW β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β 1. FACT-FIND β
β ββ Read mentioned code/docs β
β ββ Search for related patterns β
β ββ Check relevant skills (router skills are entry pts) β
β ββ Fetch external docs (WebFetch / WebSearch) β
β ββ Use available MCP tools β
β ββ Optionally dispatch subagents (Agent tool) β
β β
β 2. ANALYZE β
β ββ Ground findings in evidence β
β ββ Reference specific locations β
β ββ Note inference vs. verification β
β β
β 3. OUTPUT (ALL FOUR SECTIONS REQUIRED) β
β ββ Confidence Assessment (per-finding) β
β ββ Risk Assessment (severity + mitigation) β
β ββ Information Gaps (what would help) β
β ββ Caveats & Follow-ups (before trusting) β
β β OPTIONAL β
β ββ Machine-readable JSON summary β
β ββ Subagent-dispatch notes β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
meta-* convention. No behavioral change; downstream agents need no edits.firecrawl and generic LSP references; added WebSearch, Agent-tool subagent dispatch, MCP-server examples). Added Β§1.3 router-skill guidance, Β§1.6 subagent dispatch, Β§3.5 OPTIONAL machine-readable JSON summary, Β§3.6 OPTIONAL subagent-dispatch context, and a Rust anti-pattern example. The four required output sections (Β§3.1βΒ§3.4) and confidence/risk vocabulary are unchanged from 1.0.x β downstream agents need no edits.Last reviewed: 2026-05-05