2.2 KiB
2026-02-27 Session Notes
Research Prompt Chain - Planning & Architecture
Session focused on designing a 5-step research automation chain for a freelance client project. The chain takes a biological mechanism + ingredient list as input, runs through sequential research prompts using MCP-based search (PubMed + Brave Search), and produces a formatted markdown evidence report. Key architectural decision: each of 5 agents processes one step, reading/writing to tmp/step-N.md for inter-step handoffs, with final output to output/[mechanism-slug].md.
Architecture Overview
The chain flows: step1-resolver (placeholder resolution) → step2-mechanism (PubMed search) → step3-ingredients (PubMed search) → step4-scorer (ranking, no search) → step5-formatter (compilation, no search). Client provided raw prompt templates, sample inputs, and reference output; implementation wires existing prompts together rather than creating new ones.
Critical Design Decisions
- MCP Search Integration: Agents 2-3 use PubMed MCP tools for real study retrieval; no training-data hallucination. Brave Search as fallback when PubMed insufficient.
- Citation Standards: Global rule enforced across all agents—never cite without real DOI, never fabricate quotes, always verify statistical significance.
- Tool Assignments: Step1 (reasoning only), Steps2-3 (search-enabled), Step4 (Brave fallback only), Step5 (compilation only).
- Output Format: Step agents write full intermediate outputs; orchestrator skill reads previous steps sequentially and maintains clean context.
File Structure
Project layout organized as: .claude/ (skills, agents, rules), prompts/ (5 client-provided templates split into individual files), samples.md (input data), sample-output.md (reference), tmp/ (inter-step handoffs, gitignored), output/ (final reports), plus HANDOFF.md (non-technical user guide) and CLAUDE.md (project instructions).
Open Threads
Implementation not yet started—plan phase complete. Next: create 5 agent files, orchestrator skill, split prompts into separate files, configure MCP servers, write rules and handoff docs, then end-to-end test with sample mechanism.