Working Protocol
Purpose: HARD GATE - Execute agents BEFORE responding to user requests
Applies to: All product repositories
Token Budget: ~800 tokens
Core Principle
Your FIRST action on ANY request must be to invoke the appropriate agent. Do NOT write a response first. Execute agents, wait for results, then respond with findings.
REQUIRED: Protocol Declaration
Before ANY other output, you MUST emit this declaration:
[PROTOCOL: <TYPE> | Agent: @agent-<name> | Action: <INVOKING|ASKING|RESPONDING>]
Examples:
[PROTOCOL: DEFECT | Agent: @agent-qa | Action: INVOKING]
[PROTOCOL: DEFECT | Agent: none | Action: ASKING] (when you need info first)
[PROTOCOL: EXPERIENCE | Agent: @agent-sd, @agent-uxd | Action: INVOKING]
[PROTOCOL: TECHNICAL | Agent: @agent-ta | Action: INVOKING]
[PROTOCOL: QUESTION | Agent: none | Action: RESPONDING]
If your response does not start with [PROTOCOL: ...], you are violating the protocol.
Request Classification
| Type |
Indicators |
First Agent |
| Defect/Bug |
"broken", "not working", "error", unexpected behavior |
@agent-qa |
| Experience |
UI, UX, feature, user-facing change |
@agent-sd + @agent-uxd |
| Technical |
Architecture, backend, refactor, performance |
@agent-ta |
| Question |
"How does...", "Where is...", "Explain..." |
None (respond directly) |
Phase 1: Execute Understanding Agent (BEFORE RESPONDING)
Defect/Bug
1. If no reproduction info → ASK for screenshot/URL/steps
2. Once you have info → INVOKE @agent-qa to reproduce
3. WAIT for results
4. THEN respond with findings
Experience Request
1. INVOKE @agent-sd (map user journey)
2. INVOKE @agent-uxd (interaction design) - parallel
3. WAIT for results
4. THEN respond with recommendations/questions
Technical Request
1. INVOKE @agent-ta (assess approach)
2. WAIT for results
3. THEN respond with plan
Phase 2: Present Findings + Plan (AFTER agent completes)
Your response MUST include:
- Summary: "Based on @agent-X's investigation..."
- Root cause/Recommendation: Specific file:line or approach
- Proposed plan: Files to modify, agents to use
- Pre-Execution Checklist: Filled with real data
- Ask: "Shall I proceed with this plan?"
Pre-Execution Checklist
## Pre-Execution Checklist
### Understanding
- [x] Request type: [Defect / Experience / Technical]
- [x] Agent used: @agent-___
- [x] Finding: [what agent discovered at file:line]
### Planning
- [ ] Files to modify: [list with line numbers]
- [ ] Execution agents: @agent-___ for [task]
### Approval
- [ ] User approved: AWAITING
Do NOT proceed until user confirms.
Phase 3: Execute (with specialized agents)
- Use Task Copilot CLI to track work:
- Create tasks with
tc task create --title "..." --prd <id> --json
- Update status with
tc task update <id> --status in_progress --json
- Store outputs with
tc wp store --task <id> --type <t> --title "..." --content "..." --json for details over 500 chars
- Launch specialized agents:
- Stack-specific agents for implementation (see Agent Reference below)
@agent-qa for testing
- Track progress, don't batch completions
Phase 4: Verify (NEVER SKIP)
- Use
@agent-qa to verify changes work as expected
- If visual verification needed, ask user to test specific URL
- Do NOT declare "done" until user confirms it works
Anti-Patterns (NEVER DO THESE)
| Anti-Pattern |
Why It's Wrong |
| "Let me investigate..." then reading files yourself |
You're not the investigator, agents are |
| "I'll use @agent-qa" without invoking it |
Saying ≠ Doing |
| Writing a plan before running understanding agent |
Plan should be based on agent findings |
| Skipping to code changes |
No understanding = wrong fix |
| Declaring "done" after build success |
Build passing ≠ bug fixed |
Agent Reference (Quick Lookup)
Understanding Phase
| Task |
Agent |
Purpose |
| Reproduce bugs |
@agent-qa |
Confirm issue exists, document steps |
| Map user journey |
@agent-sd |
Service design, experience mapping |
| Assess approach |
@agent-ta |
Architecture, technical feasibility |
Execution Phase
| Task |
Agent |
Purpose |
| Code implementation |
@agent-me |
Features, bug fixes, refactoring |
| DevOps/Infrastructure |
@agent-do |
Deployment, Docker, CI/CD |
| Documentation |
@agent-doc |
Technical writing, API docs |
Design Phase
| Task |
Agent |
Purpose |
| UX/Interaction |
@agent-uxd |
Task flows, wireframes, usability |
| Visual Design |
@agent-uids |
Colors, typography, visual hierarchy |
| UI Implementation |
@agent-uid |
CSS, Tailwind, component styling |
| Content/Copy |
@agent-cw |
Microcopy, error messages, UI text |
Verification Phase
| Task |
Agent |
Purpose |
| Test writing |
@agent-qa |
Unit, integration, E2E tests |
| Security review |
@agent-sec |
Vulnerability assessment |
Project-Specific Overrides
Projects may extend this protocol with custom agents or rules via the extension system. See EXTENSION-SPEC.md for details.
Last Updated: December 2025
1---2name: working-protocol3description: Projects may extend this protocol with custom agents or rules via the extension system. See EXTENSION-SPEC.md for details.4---5# Working Protocol67> **Purpose:** HARD GATE - Execute agents BEFORE responding to user requests8> **Applies to:** All product repositories9> **Token Budget:** ~800 tokens1011## Core Principle1213**Your FIRST action on ANY request must be to invoke the appropriate agent. Do NOT write a response first. Execute agents, wait for results, then respond with findings.**1415---1617## REQUIRED: Protocol Declaration1819**Before ANY other output, you MUST emit this declaration:**2021```22[PROTOCOL: <TYPE> | Agent: @agent-<name> | Action: <INVOKING|ASKING|RESPONDING>]23```2425**Examples:**26- `[PROTOCOL: DEFECT | Agent: @agent-qa | Action: INVOKING]`27- `[PROTOCOL: DEFECT | Agent: none | Action: ASKING]` (when you need info first)28- `[PROTOCOL: EXPERIENCE | Agent: @agent-sd, @agent-uxd | Action: INVOKING]`29- `[PROTOCOL: TECHNICAL | Agent: @agent-ta | Action: INVOKING]`30- `[PROTOCOL: QUESTION | Agent: none | Action: RESPONDING]`3132**If your response does not start with `[PROTOCOL: ...]`, you are violating the protocol.**3334---3536## Request Classification3738| Type | Indicators | First Agent |39|------|------------|-------------|40| **Defect/Bug** | "broken", "not working", "error", unexpected behavior | `@agent-qa` |41| **Experience** | UI, UX, feature, user-facing change | `@agent-sd` + `@agent-uxd` |42| **Technical** | Architecture, backend, refactor, performance | `@agent-ta` |43| **Question** | "How does...", "Where is...", "Explain..." | None (respond directly) |4445---4647## Phase 1: Execute Understanding Agent (BEFORE RESPONDING)4849### Defect/Bug50```511. If no reproduction info → ASK for screenshot/URL/steps522. Once you have info → INVOKE @agent-qa to reproduce533. WAIT for results544. THEN respond with findings55```5657### Experience Request58```591. INVOKE @agent-sd (map user journey)602. INVOKE @agent-uxd (interaction design) - parallel613. WAIT for results624. THEN respond with recommendations/questions63```6465### Technical Request66```671. INVOKE @agent-ta (assess approach)682. WAIT for results693. THEN respond with plan70```7172---7374## Phase 2: Present Findings + Plan (AFTER agent completes)7576Your response MUST include:771. **Summary**: "Based on @agent-X's investigation..."782. **Root cause/Recommendation**: Specific file:line or approach793. **Proposed plan**: Files to modify, agents to use804. **Pre-Execution Checklist**: Filled with real data815. **Ask**: "Shall I proceed with this plan?"8283### Pre-Execution Checklist8485```86## Pre-Execution Checklist8788### Understanding89- [x] Request type: [Defect / Experience / Technical]90- [x] Agent used: @agent-___91- [x] Finding: [what agent discovered at file:line]9293### Planning94- [ ] Files to modify: [list with line numbers]95- [ ] Execution agents: @agent-___ for [task]9697### Approval98- [ ] User approved: AWAITING99```100101**Do NOT proceed until user confirms.**102103---104105## Phase 3: Execute (with specialized agents)1061071. Use Task Copilot CLI to track work:108 - Create tasks with `tc task create --title "..." --prd <id> --json`109 - Update status with `tc task update <id> --status in_progress --json`110 - Store outputs with `tc wp store --task <id> --type <t> --title "..." --content "..." --json` for details over 500 chars1112. Launch specialized agents:112 - Stack-specific agents for implementation (see Agent Reference below)113 - `@agent-qa` for testing1143. Track progress, don't batch completions115116---117118## Phase 4: Verify (NEVER SKIP)1191201. Use `@agent-qa` to verify changes work as expected1212. If visual verification needed, ask user to test specific URL1223. **Do NOT declare "done" until user confirms it works**123124---125126## Anti-Patterns (NEVER DO THESE)127128| Anti-Pattern | Why It's Wrong |129|--------------|----------------|130| "Let me investigate..." then reading files yourself | You're not the investigator, agents are |131| "I'll use @agent-qa" without invoking it | Saying ≠ Doing |132| Writing a plan before running understanding agent | Plan should be based on agent findings |133| Skipping to code changes | No understanding = wrong fix |134| Declaring "done" after build success | Build passing ≠ bug fixed |135136---137138## Agent Reference (Quick Lookup)139140### Understanding Phase141142| Task | Agent | Purpose |143|------|-------|---------|144| Reproduce bugs | `@agent-qa` | Confirm issue exists, document steps |145| Map user journey | `@agent-sd` | Service design, experience mapping |146| Assess approach | `@agent-ta` | Architecture, technical feasibility |147148### Execution Phase149150| Task | Agent | Purpose |151|------|-------|---------|152| Code implementation | `@agent-me` | Features, bug fixes, refactoring |153| DevOps/Infrastructure | `@agent-do` | Deployment, Docker, CI/CD |154| Documentation | `@agent-doc` | Technical writing, API docs |155156### Design Phase157158| Task | Agent | Purpose |159|------|-------|---------|160| UX/Interaction | `@agent-uxd` | Task flows, wireframes, usability |161| Visual Design | `@agent-uids` | Colors, typography, visual hierarchy |162| UI Implementation | `@agent-uid` | CSS, Tailwind, component styling |163| Content/Copy | `@agent-cw` | Microcopy, error messages, UI text |164165### Verification Phase166167| Task | Agent | Purpose |168|------|-------|---------|169| Test writing | `@agent-qa` | Unit, integration, E2E tests |170| Security review | `@agent-sec` | Vulnerability assessment |171172---173174## Project-Specific Overrides175176Projects may extend this protocol with custom agents or rules via the extension system. See [EXTENSION-SPEC.md](../EXTENSION-SPEC.md) for details.177178---179180_Last Updated: December 2025_