--- name: attention-filters description: Use when spawning archetype agents to decide what context each agent receives. Reduces token waste and sharpens focus by passing only relevant artifacts. --- # Attention Filters Each archetype needs different context. Pass only what's relevant — not everything. | Archetype | Receives | Does NOT Receive | |-----------|----------|-----------------| | Explorer | Task description, codebase access | Prior proposals or reviews | | Creator | Explorer's research + task description | Implementation details | | Maker | Creator's proposal | Explorer's research, reviews | | Guardian | Maker's git diff + proposal risk section | Explorer's research | | Skeptic | Creator's proposal (focus: assumptions) | Git diff details | | Trickster | Maker's git diff only | Everything else | | Sage | Proposal + implementation + diff | Explorer's raw research | ## Why This Matters - **Token cost:** A Guardian reading the Explorer's 2000-word research wastes ~2600 tokens on irrelevant context - **Focus:** An agent with too much context drifts from its archetype's concern - **Shadow prevention:** Over-loading context encourages rabbit-holing (Explorer) and scope creep (Maker) ## In Practice When spawning a Check-phase agent, include only the filtered context in the prompt: ``` # Guardian receives: "Review these changes: The proposal identified these risks: Verdict: APPROVED or REJECTED with findings." # NOT: "Here is the full research, the full proposal, the full implementation, the full git log, and everything else we have..." ``` ## Prompt Construction Templates ### Explorer - **Receives:** Task description, file tree (max 200 lines), prior-cycle feedback (if cycle 2+) - **Excludes:** Creator proposals, Maker diffs, reviewer outputs - **Token target:** ~2000 tokens input ### Creator - **Receives:** Task description, Explorer research (if available), prior-cycle feedback (if cycle 2+) - **Excludes:** Maker diffs, reviewer outputs - **Token target:** ~3000 tokens input ### Maker - **Receives:** Creator's proposal (full), test strategy section, file list - **Excludes:** Explorer research, reviewer outputs, prior-cycle feedback - **Token target:** ~2500 tokens input ### Guardian - **Receives:** Maker's git diff, proposal risk section, test results - **Excludes:** Explorer research, Creator rationale, Skeptic/Sage outputs - **Token target:** ~2000 tokens input ### Skeptic - **Receives:** Creator's proposal (assumptions + architecture decision), confidence scores - **Excludes:** Git diff details, Explorer raw research, other reviewer outputs - **Token target:** ~1500 tokens input ### Trickster - **Receives:** Maker's git diff only, attack surface summary (file types + entry points) - **Excludes:** Proposal, research, other reviewer outputs - **Token target:** ~1500 tokens input ### Sage - **Receives:** Creator's proposal, Maker's implementation summary + diff, test results - **Excludes:** Explorer raw research, other reviewer verdicts - **Token target:** ~2500 tokens input ## Token Budget Targets | Archetype | Fast | Standard | Thorough | |-----------|------|----------|----------| | Explorer | skip | 2000 | 3000 | | Creator | 2000 | 3000 | 4000 | | Maker | 2000 | 2500 | 3000 | | Guardian | 1500 | 2000 | 2500 | | Skeptic | skip | 1500 | 2000 | | Trickster | skip | skip | 1500 | | Sage | skip | 2500 | 3000 | "skip" means the archetype is not spawned in that workflow tier. ## Cycle-Back Filtering When injecting prior-cycle feedback into cycle 2+: 1. **Summary only** — pass the structured feedback table (issue, source, severity), not full reviewer artifacts 2. **Strip resolved items** — if a finding was marked Fixed in the Act phase, exclude it 3. **Compress context** — prior proposal diffs reduce to "What Changed" section only (not full re-proposal) 4. **Cap at 500 tokens** — if feedback exceeds this, summarize by severity (CRITICAL first, then WARNING, drop INFO) ## Filter Verification Checklist Before spawning each agent, verify: - [ ] Prompt contains ONLY the artifacts listed in that archetype's "Receives" above - [ ] No cross-contamination from other reviewers' outputs - [ ] Token count is within 20% of the target for the current workflow tier - [ ] Prior-cycle feedback (if any) is summarized, not raw - [ ] Excluded artifacts are genuinely absent (search for keywords like file paths from excluded sources)