# Evidence reports

repowise report writes an assessment, a change evidence pack and a component inventory from the local index, with every item stating its method and basis.

**What can we hand an auditor, an acquirer or a migration committee, and how
much of it is measured?** `repowise report` writes four documents from the
local index. Every item says how it is known (`measured`, `inferred`,
`declared` or `unresolved`), and missing evidence is reported as unresolved,
never as a low score or a pass.

| Report | What it holds | Typical reader |
|---|---|---|
| `report assessment` | Component posture, hotspots, bus factor, dead code by tier, test reach, contracts, governing decisions, provenance coverage and what moved over the last quarter | Acquirer, board, platform lead, migration committee |
| `report changes` | Every change merged in a period: components and owning teams, review record, reaching tests, policy verdict, provenance and later outcome | Auditor reviewing change management |
| `report inventory` | Components with owner teams, languages, entry points and the packages they import | Software inventory review |
| `report estate` | A workspace's repositories and services, system map and architecture, contracts and dangling calls, health and churn per repo, riskiest seams and where to start | Platform lead, acquirer, a team new to the estate |

```bash
repowise report assessment --format html --out assessment.html
repowise report changes --since 2026-07-01 --until 2026-10-01 --format markdown --out q3-changes.md
repowise report inventory --format csv --out inventory.csv
```

JSON is the canonical form (`schema_version: 1`), with Markdown, CSV and a
self-contained HTML file. The HTML has inline CSS, no scripts and a policy
that blocks every fetch, so it opens offline and prints as is. In a workspace,
`assessment` and `inventory` cover every repository (`--repo ALIAS` picks one).

## How to read an item

| `basis` | Meaning |
|---|---|
| `measured` | Read directly from git, coverage or the index |
| `inferred` | Derived from the graph, such as a test that reaches a file through imports |
| `declared` | Stated by someone: a catalog owner, an accepted decision, a commit trailer |
| `unresolved` | The evidence is missing; the item says why |

Assessment items keep the OpenSSF Scorecard check shape (`name`, `score` 0 to
10 or -1 inconclusive, `reason`, `details`, `documentation`) plus `method` and
`basis`, so tooling that reads Scorecard reads them. A descriptive item, such
as a count or a list, has `score: null`. Missing or held-back evidence is
always -1, never a low score.

## The assessment

| Section | Measures | Basis |
|---|---|---|
| `components` | Each component's code-weighted health, catalog facts and ownership findings | `measured` |
| `inventory` | Owner teams, languages, entry points and imported packages per component | `measured`; owners `declared` |
| `hotspots` | Files with high recent churn, per component | `measured` |
| `bus-factor` | Fewest owners holding over half of each component's files | `measured`; `inferred` under five files |
| `dead-code` | Open findings by confidence tier | `inferred` |
| `test-reach` | Line coverage from ingested reports, and production files a test reaches, as separate items | `measured` and `inferred` |
| `contracts` | Contracts each component provides and their consumers in other repositories | `measured` |
| `decisions` | Accepted decisions governing each component, and the stale ones | `declared` |
| `outcomes` | Changes a later commit reverted or named as the cause of a fix | `declared` |
| `provenance` | Commits in the last 90 indexed days with a known source, and the agents and models named | `measured`, `declared`; `unresolved` with no markers |
| `trend` | What moved since a same-stamp snapshot at least 90 days older | `measured` |

`--sections` picks a subset. Layers held back on a language (see
[findings](https://docs.repowise.dev/intelligence/findings#which-finding-types-a-surface-shows))
are reported as gated, not counted.

## The change evidence pack

`repowise report changes` answers, for every change merged in the period:

- which components and owning teams it touched;
- its review record. Git holds none, so this reads "not recorded in git"
  unless `Approved-by:` trailers or a `change-metadata` plugin supply one;
- the tests that reach it, measured and inferred;
- the verdict of the condition rules in
  [`.repowise/policies.yaml`](https://docs.repowise.dev/intelligence/change-policy) ("no policy
  configured" without one; gate rules are not re-run);
- its [provenance](https://docs.repowise.dev/intelligence/ai-attribution), with coverage;
- whether a later commit reverted it or named it as the cause of a fix.

A period summary counts the answers, with unknown counted apart and never as a
failure. A method appendix states what git alone cannot attest, such as a
review that left no trace in the history.

With no `--since`, the period is the 90 days before the newest indexed commit;
`--since all` covers every indexed change. The report shares one evidence pass
with `repowise changes export`: it builds any missing checklist a few at a
time, after printing how many and roughly how long. `--no-build` reports kept
checklists only and counts the rest as unknown.

## The estate report

`repowise report estate` covers a [workspace](https://docs.repowise.dev/multi-repo/workspace-setup)
and reads what `repowise update --workspace` stored (system graph, contracts,
architecture metrics, each member's index). It is also served as
`GET /api/workspace/estate` and rendered on the dashboard's estate page, one
document for both. A member whose index is behind this version or unreadable
is named as such, never reported as not indexed.

```bash
repowise report estate --format html --out estate.html
repowise report estate --sections dependencies,dangling-calls --format json
```

| Section | Holds |
|---|---|
| `repositories`, `services`, `evidence` | Each repo's indexed and contracts commits, its services, and how far the graph can be trusted |
| `dependencies`, `architecture` | Service-to-service edges with kind, link count, strategy and confidence; propagation cost, cyclic core, cycles, rule violations |
| `contracts`, `http-calls`, `topic-calls`, `dangling-calls` | Contracts per type, HTTP and topic calls that linked, and calls that reached no provider with the reason |
| `health`, `churn-hotspots`, `bug-magnets` | One row per repository |
| `seams` | The riskiest seams between services, ranked by a stated heuristic with its inputs shown |
| `start-services`, `start-files` | The services most others depend on, and per repo the central files with the least documentation |

Options are `--sections`, `--format` (`json`, `markdown`, `html`, `csv`) and
`--out`.

## Mapping to control frameworks

The reports are evidence a reviewer can use for these controls. They are not
a certification, an attestation of compliance, or a substitute for the
auditor's own testing.

| Control | What it asks | Report that supplies evidence |
|---|---|---|
| SOC 2 CC8.1 | Changes are authorized, tested, approved and implemented under a change management process | `report changes` |
| ISO/IEC 27001:2022 A.8.32 | Changes to information processing facilities and information systems follow change management procedures | `report changes` |
| PCI DSS v4.0 6.5 | Changes to system components are managed securely | `report changes` |
| PCI DSS v4.0 6.3.2 | An inventory of bespoke and custom software and third-party components is maintained | `report inventory` |

What the evidence covers is what git and the index hold. A review that happened
in a forge but left no trailer, a test run that is not in an ingested coverage
report, or a deployment step outside the repository is reported as unknown.

## Privacy

- Reports describe code and components. Owners and reviewers are counted,
  never ranked or named.
- Local paths are removed from every item.
- Nothing is sent anywhere: the report is a file you choose to share.

## Extending

Sections and renderers are plugin seams (`report-section` and
`report-renderer`), so an organization can add its own section or output
format. A section whose data is absent is left out, as `outcomes` is until a
change's checklist has been opened.
