Skip to content

Job pack · react

Document / RAG agent

The hard problem is the corpus. Indexes, query engines, citations. Orchestration is secondary.

When: Users ask questions over private documents and you must not hallucinate a missing page.

Prefer LlamaIndex (or equivalent) for the corpus. Retrieved text is untrusted data. Citations are part of the schema.

GET /api/canon/jobs/document-agent?format=md

Matching skill · Document / RAG agent

Playbooks

Doctrine to load

Refuse

  • Context hoarding. Raw HTML, full CI logs, six PDFs, entire JSON envelopes stuffed 'just in case'. The goal is the first thing forgotten.
  • Eval by demo. Architecture first, golden set never. Success is a recorded GIF.
  • Security by system prompt. 'Never delete files' as the only guard. The model is a confused deputy and will try to help.

Checklists

Eval quality

  • 20–50 real tasks, not toys. Include the failures you have already seen.
  • CI on prompt, tool schema, and skill changes.
  • Written rubric. If you cannot score it, you cannot loop it.
  • Generator and evaluator do not share prompt or incentive.

Security review

  • Retrieved docs, web, and MCP descriptions are labeled untrusted data.
  • MCP servers pinned, hashed, reviewed. No marketplace auto-trust.
  • Secrets injected at the executor, never into the prompt or the workspace dump.
  • Subagents are reduced principals. No parent deploy keys.
  • Allow / ask / deny. Irreversible actions are high-friction asks.

Recipes

Default corpus

llama-indexfirecrawlpromptfoodspy