> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentgg.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Output and state

> What a scan writes to its output directory, and why the state directory matters.

## The output directory

A scan writes every result under one output directory.

```
out/
├── summary.md            ← human report
├── findings/...          ← one .md per finding (GHSA-shaped)
└── state/                ← what `status` and `revalidate` read
    ├── scan.json         ← root path + timestamps
    ├── recon.json        ← the recon brief (phase 1)
    ├── plan.json         ← which agents queued / skipped + why (phase 2)
    ├── runs/<id>.json    ← one per scan / recon / revalidate / score / summary
    ├── agents/<slug>.json← per-agent resume sidecar
    └── files/<path>.json ← FileRecord per scanned source file
```

## summary.md

The human report for the scan.

## findings/

One markdown file per finding. See [Resume and reports](/cli/resume-and-reports) for the file shape.

## state/

| File                 | Purpose                                                                                  |
| -------------------- | ---------------------------------------------------------------------------------------- |
| `scan.json`          | The scan root path and its timestamps.                                                   |
| `recon.json`         | The recon brief from phase 1.                                                            |
| `plan.json`          | Which agents the plan queues or skips, and why. Phase 2 writes it before any agent runs. |
| `runs/<id>.json`     | One record for each scan, recon, revalidate, score, or summary run.                      |
| `agents/<slug>.json` | The resume record for one agent.                                                         |
| `files/<path>.json`  | The record for one scanned source file.                                                  |

## Why the state directory matters

Resume, `status`, and `revalidate` all read the `state/` directory. A re-run with the same `-o` skips files that did not change. A different `-o` starts a fresh scan. See [Resume and reports](/cli/resume-and-reports) for what makes a re-run reuse this state.
