Research Protocol
Version: 1.0.0 Type: Conditional Protocol Max Active: 3 protocols (including base)Trigger Conditions
This protocol activates when the task involves:| Trigger | Keywords | Context |
|---|---|---|
| Investigation | ”research”, “investigate”, “explore”, “study” | Information gathering |
| Analysis | ”analyze”, “compare”, “evaluate”, “assess” | Data synthesis |
| Discovery | ”find out”, “discover”, “learn about” | New information |
| Documentation | ”document findings”, “report on” | Structured output |
--protocol research flag on task creation.
Requirements (RFC 2119)
MUST
| Requirement | Description |
|---|---|
| RSCH-001 | MUST NOT implement code or make changes to codebase |
| RSCH-002 | MUST document all sources with citations |
| RSCH-003 | MUST write findings to claudedocs/agent-outputs/ |
| RSCH-004 | MUST append entry to MANIFEST.jsonl |
| RSCH-005 | MUST return only completion message (no content in response) |
| RSCH-006 | MUST include 3-7 key findings in manifest entry |
| RSCH-007 | MUST set agent_type: "research" in manifest |
SHOULD
| Requirement | Description |
|---|---|
| RSCH-010 | SHOULD use multiple independent sources |
| RSCH-011 | SHOULD cross-reference findings for accuracy |
| RSCH-012 | SHOULD include confidence levels for claims |
| RSCH-013 | SHOULD identify gaps or areas needing further research |
| RSCH-014 | SHOULD link research to relevant tasks |
MAY
| Requirement | Description |
|---|---|
| RSCH-020 | MAY propose follow-up research tasks |
| RSCH-021 | MAY include visual diagrams or tables |
| RSCH-022 | MAY compare multiple approaches or solutions |
Output Format
File Output
Manifest Entry
Integration Points
Base Protocol
- Inherits task lifecycle (focus, execute, complete)
- Inherits manifest append requirement
- Inherits error handling patterns
Protocol Interactions
| Combined With | Behavior |
|---|---|
| specification | Research informs spec decisions |
| decomposition | Research identifies task structure |
| consensus | Research provides evidence for voting |
Handoff Patterns
| Scenario | Handoff Target |
|---|---|
| Research identifies implementation need | implementation protocol |
| Research reveals design decisions needed | specification protocol |
| Research requires expert validation | consensus protocol |
Example
Task: Research authentication patterns for CLEO plugin system Manifest Entry:Enforcement
Tool Allowlist
Allowed Tools (Read-only operations):Read- File readingGrep- Content searchGlob- File pattern matchingBash- Read-only commands only (ls, cat, grep, find, etc.)
Write- File writingEdit- File modification- Any code compilation or execution
Validation Command
Command (planned):cleo research validate [--task TASK_ID]
Current State: Available via validate_research_protocol() in lib/protocol-validation.sh
- RSCH-001: No code changes in git diff
- RSCH-004: Manifest entry appended
- RSCH-006: 3-7 key findings
- RSCH-007: agent_type = “research”
Orchestrator Integration
Pre-Spawn Validation:- Git diff analysis detects code modifications
- Manifest parsing validates key_findings count
- Agent type verification
Exit Codes
EXIT_PROTOCOL_RESEARCH(60) - Research protocol violation- Common violations: Code changes detected, wrong agent_type, insufficient findings
Anti-Patterns
| Pattern | Why Avoid |
|---|---|
| Implementing code during research | Pollutes research context, mixes concerns |
| Returning findings in response | Wastes orchestrator context |
| Single-source conclusions | Risk of bias or error |
| Vague findings without evidence | Not actionable |
| Skipping manifest entry | Breaks orchestrator workflow |
Protocol Version 1.0.0 - Research Protocol
