# Output Schema

## Contents

- Common evidence
- Team evidence
- Team review
- Ecosystem evidence
- Ecosystem review
- Final report

## Common Evidence

Evidence objects contain a stable `ref`, `kind`, source `url` or `tweet_id`, text, and timestamp when available. Refs must be unambiguous within each member or candidate bundle. Review files cite conclusions through `evidence_refs`; finalization resolves them within that subject's bundle and rejects missing or conflicting refs.

## Team Evidence

`team-evidence.json` contains:

- `official_account`: normalized root profile.
- `coverage`: expected/discovered counts, completeness, pages, stop reasons, fallbacks, warnings.
- `direct_members[]`: normalized user, membership proof, proposed role, and supplemental timeline/search bundles.
- `unresolved[]`: role gaps that need review.
- `review_template`: initial direct-team review shape.

## Team Review

Each `members[]` row requires:

```json
{
  "user_id": "...",
  "screen_name": "...",
  "membership_status": "confirmed",
  "reviewed": true,
  "account_type": "person",
  "role_title": "...",
  "role_confidence": "high",
  "evidence_refs": ["profile:..."],
  "notes": null
}
```

Every affiliate must be present before Stage 2. The template also pins the team-evidence generation timestamp, official account, coverage scope, and exact member rows; stale reviews are rejected.

## Ecosystem Evidence

`ecosystem-evidence.json` contains confirmed direct members, per-member pagination metadata, all `interaction_edges`, ranked/enriched `candidates`, unresolved relationship/role gaps, scoring metadata, and a review template.

An interaction edge retains separate reply/quote/mention/retweet counts, total, weighted score, distinct source-member count, tweet IDs, first/last dates, and evidence.

## Ecosystem Review

Each candidate requires `decision: "include"`, `"exclude"`, or `"unresolved"`.

Included rows require `relationship_type`, `role_title`, `confidence`, and evidence refs. Excluded rows require `exclusion_reason`. Unresolved rows require `unresolved_reason`; add any evidence refs that establish what is known so far.

The review template snapshots the ecosystem evidence generation timestamp, official account, interaction cap/truncation, raw and profile-resolution attempted/succeeded/failed edge counts, limits, both candidate truncation flags, and eligible/investigated counts. Finalization rejects stale scope values or extra/missing candidate rows. Set top-level `candidate_pool_acknowledged: true` only after reviewing that exact scope.

## Final Report

`report.json` contains:

- `official_account`
- `coverage`
- `direct_members`
- `ecosystem_members`
- `interaction_edges`
- `excluded_candidates`
- `unresolved`
- `run_metadata`

Final `run_metadata.ecosystem_candidate_selection` preserves interaction collection state, score threshold, profile-resolution and candidate limits, raw/attempted/succeeded/failed/resolved/eligible/investigated/deduplicated counts, truncation flags, and reviewer acknowledgment. `report.md` renders this scope plus the same decisions as compact tables with profile/tweet links.
