---
description: "Load relevant context before starting focused work so Claude is ready before the first question."
allowed-tools: Read, Glob, Grep, Bash
model: sonnet
argument-hint: "[--scope <topic>]"
---

# Context Prewarm

Prepare Claude for focused work by front-loading the context it needs — either by reading
relevant repo files scoped to a topic, or by organizing material the user dumps in (links,
docs, conversations). Ends with a checklist so nothing critical is missed.

## Behavior Constraints

<output_contract>

Produce a **Context Brief** containing:

- **Scope** — what topic or area this session is prepped for (or "General" if none)
- **Loaded context** — a short list of what was read or received: file paths, doc titles, or
  pasted material summaries. One line each.
- **Key facts** — 3-6 things Claude should keep in mind going into this session, drawn from
  the loaded context
- **Coverage checklist** — a short list of questions the user can mentally confirm before
  starting: "Have you shared X?", "Is Y still current?", etc. Tailored to what was loaded.

</output_contract>

<completeness_contract>

The task is complete when the Context Brief is produced and the coverage checklist is present.
If no material was provided and no --scope was given, ask what the user is preparing for before
proceeding.

</completeness_contract>

<tool_usage_rules>

In scope mode (--scope provided):
- Use Glob and Grep to find files relevant to the scope topic
- Use Bash to run `git log --oneline -20 -- <relevant paths>` for recent history on those files
- Use Read to load the contents of relevant files
- Do not read the entire repo — stay within the scope boundary

In dump mode (no --scope, user provides material):
- Do not use file tools unless the user references a specific path
- Organize what was provided; do not go looking for more

</tool_usage_rules>

<empty_result_recovery>

If --scope is provided but no relevant files are found, say so explicitly and fall back to
asking the user to paste the material they want Claude to work with.

</empty_result_recovery>

## Workflow

1. Check if --scope was provided.
   - If yes: search for files, recent git history, and docs relevant to that topic. Read them.
   - If no: ask the user what they are preparing for, then determine whether to run scope mode
     or wait for them to paste material.
2. In dump mode: accept pasted links, documents, and conversations. Summarize each briefly.
3. Produce the Context Brief and coverage checklist.
