# Goal statement — research/mining sweep (read-only)
## Mission
Sweep <corpus: e.g. the last 72 h of run transcripts / all open PRs across <org> / index=*
logs for <window>> and produce a ranked, evidence-backed report answering: <the 1-3
questions the sweep must answer>. Read-only: this run mutates nothing.
## Hard conditions
1. READ-ONLY toward every system under investigation: no writes, no converges, no PR
mutations, no state changes. The only writes allowed anywhere: report files in <run-dir>,
or commits to the dedicated report branch <report-branch>.
2. Every claim in the report is backed by a tool call or command run THIS session. Memory
may say where to look; only a fresh probe makes a claim reportable.
3. Bounded queries only: every search carries a time window, index/scope filter, and result
cap. An unbounded query is a defect, not a finding.
4. Budget (hard): <N> tool calls / <N> minutes. At budget, stop and publish what is
complete; mark the rest NOT-CHECKED (budget). Never retry a failing source more than
twice.
## Failure protocol
A source that errors twice is recorded as UNAVAILABLE with the exact error, and the sweep
continues. Three consecutive probes yielding no new evidence -> stop that thread and write
up what exists. If the subagent substrate fails, degrade to serial sweeping — the mission
degrades, it does not abort.
## End state (definition of done)
1. Report delivered at <path> with one evidence row per claim:
claim | supporting evidence | contradicting evidence | confidence | cheapest test that
would falsify it | owner | safe next action.
2. Ranked top-<N> findings, each naming the exact object (PR #, service, file:line), the
recommended action, and the justification.
3. Coverage statement: what was swept, what was skipped, and why — gaps declared, never
papered over.
## Operating rules
Plan the sweep before the first query: list sources, order, and per-source budget. One
source at a time; summarize each before opening the next. Prefer counting queries before
detail queries. No conclusions from a single source when a second source is in scope —
correlate or mark unconfirmed.
## Verification contract
Spot-checkable by a grader: every cited object must exist and match its description.
Fabricated citations score the whole report zero. Dead ends are documented with the query
that produced them — they are evidence too.
## Delegation contract
Probe one trivial subagent first. Healthy -> fan out per-source readers (<= 4 in flight),
each returning: outcome, evidence, inspected paths, risks, next action. Merge and rank in
the orchestrator. Broken -> serial sweep in priority order <order>.