Investigation Review Hub Analysis
Overview
The Investigation Review Hub is a REST API that serves as the single source of
record for e-discovery matters. It exposes structured data about matters,
subpoena categories, productions, custodians, document review, privilege logs,
QC findings, retention events, and remediation actions, plus a read-only SQL
query endpoint for cross-entity joins.
Every task provides two critical inputs:
<TASK_ENV_BASE_URL> — the hub base URL, resolved from the prompt or
payload files. It is never a literal string to type; always resolve it from
the task input.
answer_template.json — a payload file that defines the exact output
schema: required top-level keys, field types, allowed enum values, ordering
rules, and numeric precision. This template is the single source of truth
for the output shape.
Your job is to query the hub systematically, map the evidence into the
template, and return exactly one JSON object with no prose outside it.
Endpoints
All endpoints return JSON. The base URL is <TASK_ENV_BASE_URL>.
| Method |
Path |
Purpose |
Auth |
| GET |
/ |
Health / connectivity check |
none |
| GET |
/api/schema |
Full data model (tables, columns, relationships) |
none |
| GET |
/api/matters |
Matter metadata (name, hold dates, status) |
none |
| GET |
/api/subpoena-categories |
Request categories with codes and descriptions |
none |
| GET |
/api/productions |
Rolling production status by category |
none |
| GET |
/api/custodian-sources |
Custodian data sources (collected, not collected, lost) |
none |
| GET |
/api/documents/search |
Reviewed documents with coding decisions |
none |
| GET |
/api/privilege-log |
Privilege log entries (withheld, logged, unlogged) |
none |
| GET |
/api/qc-findings |
QC findings (miscodes, contradictions, gaps) |
none |
| GET |
/api/retention-events |
Retention events (destruction, purge, loss, missing) |
none |
| GET |
/api/remediation-actions |
Remediation candidates and actions |
none |
| POST |
/api/query |
Read-only SQL queries |
X-API-Key: review-key-017 |
The POST /api/query endpoint accepts a JSON body with a "query" field
containing a SQL SELECT statement. Always include the header
X-API-Key: review-key-017. Use this endpoint whenever you need to join
entities that the REST endpoints keep separate — for example, cross-referencing
QC findings with documents, retention events with categories, or computing
aggregate counts across multiple tables.
Workflow
Phase 1 — Orient
Read the prompt and every file under input/payloads/. Identify:
- The matter ID (always present in the prompt or payloads).
- The report type: gap analysis, retention review, remediation dashboard,
or production readiness.
- The answer template file (
answer_template.json).
Read the answer template thoroughly. Note these four structural
properties before touching the hub:
required_top_level_keys — the sections your output must contain.
ordering_rules — how to sort every list (by ID, by rank, by category
code, or a combination).
enums — the exact allowed values for every coded field. A value not in
the enum list is invalid no matter how well it describes the evidence.
fields — the required keys inside each list item and nested object.
Every key listed as required_keys or item_required_keys is mandatory.
Verify hub connectivity with GET /. If the hub is unreachable, report
the error; do not fall back to local files.
Phase 2 — Discover
Get the data model: GET /api/schema. This tells you what entities
exist, what columns they carry, and how they relate. Use this to plan which
endpoints to query and what SQL joins are possible through
POST /api/query.
Confirm the matter: GET /api/matters. Verify the matter ID from the
prompt exists. Note its hold date (hold_date) and status — these anchor
every retention timeline and preservation-risk assessment.
Get request categories: GET /api/subpoena-categories. Every finding,
risk, or status entry must reference category codes from this endpoint.
Use the exact codes (uppercase, as returned by the hub). The prompt or
payloads may also carry a category_synopsis or similar block with
human-readable descriptions; treat the hub codes as authoritative.
Phase 3 — Gather Evidence
Query every endpoint relevant to the report type. The template's
required_top_level_keys and field-level schemas signal which entities matter.
At minimum, cover the endpoints listed below for each report type:
Gap analysis and production readiness:
/api/productions — what has and has not been produced per category.
/api/documents/search — reviewed documents, their coding decisions, and
production status.
/api/privilege-log — withheld and logged privilege documents.
/api/qc-findings — miscodes, contradictions, and coding defects.
/api/custodian-sources — collected, uncollected, and lost sources.
Retention reviews:
/api/retention-events — every destruction, purge, system-loss, and
missing-record event.
/api/custodian-sources — communication systems (Teams, voicemail, email
archives) whose retention windows or purge behavior create gaps.
- Cross-reference event dates against the matter hold date from
/api/matters to classify each event as pre-hold or post-hold.
Remediation dashboards:
/api/retention-events, /api/privilege-log, /api/qc-findings,
/api/custodian-sources, /api/remediation-actions,
/api/documents/search.
When REST endpoints return flat lists that need filtering or cross-joining,
use POST /api/query with a SQL query. Common use cases:
- Join QC findings to documents to confirm miscoded responsive documents and
get exact document IDs and category assignments.
- Join retention events to subpoena categories to compute per-category loss
and identify which categories are affected by each event.
- Count unlogged privilege documents: compare withheld totals from
/api/privilege-log against logged entries. The hub often surfaces this as a
dedicated aggregate record.
Phase 4 — Synthesize
Map hub evidence into the answer template. Apply the following rules
universally, regardless of report type.
Stable Record IDs
Every finding, risk, issue, event, or action entry should be anchored by a
stable hub record ID. Use IDs exactly as returned by the hub — never
invent identifiers. Common ID prefixes:
DOC-* — documents
PRIV-* — privilege log entries or aggregate gap records
QC-* — QC findings
SRC-* — custodian sources
RET-* — retention events
For the priority action plan, create stable action IDs following the
convention ACT-<MATTER>-<NNN> where <MATTER> is a short segment from the
matter ID (e.g., SENT from MTR-SENTINEL-GJ) and <NNN> is a zero-padded
sequence number matching the priority rank order.
Enum Values
Use only values from the template's enums section. When the evidence
suggests a concept that is not an exact enum value, find the closest match
that is present in the template. Common enum domains across report types:
- Severity / risk level:
critical > high > medium > low
- Priority:
P0 > P1 > P2 > P3
- Source status:
lost, not_collected, partial, collected,
destroyed, available_archive, not_applicable
- Production impact:
source_lost, source_missing, not_produced,
withheld_unlogged, privilege_exposure, underproduced
Counts
All counts are whole integers. Use 0 when a count is zero or not applicable
— never use null or omit a count field. Every numeric field listed in the
template's field definitions must be present with an integer value.
Where the template defines withheld_count, logged_count, and
unlogged_count together, enforce the arithmetic relationship:
unlogged_count = withheld_count - logged_count.
Sorting and Ordering
Follow the template's ordering_rules exactly:
- Lists of findings, risks, or issues: sort by the key specified (commonly
finding_id, priority_rank, issue_id, event_id, or rank).
- Lists of categories: sort by
category_code ascending (lexicographic).
- Source ref and record ref lists within a single item: sort ascending.
- Category code lists within a single item: sort ascending.
Nullable Fields
Some string fields allow null — e.g., third_party, event_date,
policy_section, cutoff_date, missing_component. Use JSON null when the
value is genuinely absent or not applicable. Do not use an empty string ""
unless the template explicitly lists it as an enum or permitted value.
Phase 5 — Output
Return exactly one JSON object and nothing else — no markdown fences, no
explanatory prose, no trailing text. The JSON must satisfy every constraint:
- Contains every key listed in
required_top_level_keys.
- Contains every required sub-key for each list item and nested object as
defined in the template's
fields section.
- Uses only values from the template's
enums for every coded field.
- Applies the template's
ordering_rules to every list.
- Uses whole integers for all count fields.
- Uses stable hub record IDs throughout.
If the task prompt names a specific output file (e.g., "Return only a JSON
object that conforms to..."), write the JSON directly in your response; do not
write it to a local file unless the prompt explicitly asks for a file write.
Common Evidence Patterns
Privilege Log Gaps
When the privilege log shows withheld documents that are not logged:
issue_type: privilege_log_gap
severity / risk_level: high (unlogged withholdings are a serious
production defect)
production_impact: withheld_unlogged
recommended_action: supplement_privilege_log
unlogged_count = withheld_count - logged_count
The hub typically surfaces this as a dedicated privilege-log record whose ID
contains LOG-GAP. Use that record's aggregate counts directly.
Third-Party Waiver
When privilege-log or QC data shows communications shared with someone outside
the attorney-client relationship, privilege may be waived:
issue_type: third_party_waiver
severity: high
recommended_action: waiver_assessment_and_disclosure
third_party: the name from the hub record (not null)
Responsiveness Miscodes
When QC findings or document review shows a responsive document coded as
non-responsive:
issue_type: responsiveness_miscode
severity: high (responsive material not produced)
production_impact: not_produced
recommended_action: recode_and_produce
source_refs: include both the document ID and the QC finding ID
Retention Events
Classify every retention event from /api/retention-events by comparing its
date against the matter hold date from /api/matters:
| Condition |
Status |
Risk |
Typical Action |
| Destroyed before hold, policy-compliant |
policy_destroyed_pre_hold |
low |
no_action_policy_loss |
| Destroyed or lost after hold |
post_hold_loss |
high or critical |
disclose_preservation_issue |
| System auto-purge (e.g., voicemail, Teams) |
auto_purged or active_system_loss |
medium |
document_system_gap |
| Record required by policy but not found |
should_exist_missing |
high |
locate_missing_record |
Custodian Sources
Map source status from /api/custodian-sources:
| Source Status |
Meaning |
Production Impact |
Typical Action |
lost or destroyed |
Irrecoverable |
source_lost |
disclose_to_government or disclose_preservation_issue |
not_collected |
Never collected |
source_missing |
collect_source or collect_personal_device |
partial |
Some data collected |
partial_source_missing or underproduced |
supplemental_collection |
available_archive |
Archive exists |
source_available |
search_archive or collect_archive |
QC Findings
QC findings from /api/qc-findings flag review defects. Cross-reference them
with /api/documents/search via POST /api/query to get exact document
counts and affected categories. Common patterns:
- Responsiveness miscode: a responsive document coded non-responsive.
- Privilege miscode: a document's privilege call was wrong in either
direction.
- Over-designation: a document logged as privileged that contains only
business content, not legal advice. Map as a
downgrade correction.
- Zero-claim contradiction: a production claim of completeness is
contradicted by QC sampling.
Available Archives
When a source endpoint surfaces an archive that can partially remediate a loss
(e.g., an email archive that covers some communication categories despite the
live system having purged data), list it under the template's archive or
retained-sources section. Always note which categories it limits loss for
(limits_irretrievable_loss_for_categories or equivalent field).
Pitfalls
- Do not use local files as evidence. The hub is the sole source of
record. Ignore local environment files, database files, seed data,
generation manifests, and hidden notes.
- Do not guess enum values. Check the template's
enums block for every
coded field assignment.
- Do not write prose outside the JSON. The output must be pure JSON.
No markdown fences, no summaries, no sign-offs.
- Do not omit required keys. The template's
required_top_level_keys and
item_required_keys are mandatory. Produce every one.
- Do not use
null for integer counts. Write 0 when the count is zero
or not applicable.
- Do not invent record IDs. Use IDs from hub responses. For action-plan
IDs, follow the
ACT-<MATTER>-<NNN> convention.
- Do not sort arbitrarily. Follow the template's
ordering_rules.
- Do not forget the
X-API-Key: review-key-017 header on
POST /api/query.
- Do not skip the schema endpoint.
GET /api/schema tells you what data
exists and how entities relate; queries written without it are guessing.
- Do not assume all categories have gaps. Only include categories in
status lists when the evidence shows a material non-ready or non-complete
condition. A category with no evidence of gaps should either be omitted
from the output or listed with an appropriate no-gap status as defined by
the template.
Report Type Quick Reference
| Report Type |
Template Top-Level Keys |
Primary Endpoints |
| Gap analysis |
matter_id, critical_findings, category_statuses, metrics, priority_actions |
productions, documents/search, privilege-log, qc-findings, custodian-sources |
| Retention review |
matter_id, retention_events, communication_gaps, available_archives, metrics, recommended_actions |
retention-events, custodian-sources, matters |
| Remediation dashboard |
matter_id, top_risks, category_coverage, retained_or_available_sources, metrics, action_plan |
retention-events, privilege-log, qc-findings, custodian-sources, remediation-actions, documents/search |
| Production readiness |
matter_id, readiness_statuses, issue_ledger, privilege_corrections, metrics, priority_actions |
productions, privilege-log, qc-findings, documents/search, custodian-sources |
1---2name: investigation-review-23description: >4 Produce structured JSON analysis reports for e-discovery matters using the5 Investigation Review Hub REST API. Use this skill whenever the task involves6 a matter ID, subpoena categories, production gaps, privilege logs, QC7 findings, retention events, remediation actions, custodian sources, or any8 structured gap, remediation, retention, or readiness review that references9 an answer_template.json and a <TASK_ENV_BASE_URL> placeholder. This10 applies to grand jury, SEC, DOJ, and any other investigation type served11 by the hub.12metadata:13 source: https://skillmd.com/skills/prism-shadow/investigation-review-214---1516# Investigation Review Hub Analysis1718## Overview1920The Investigation Review Hub is a REST API that serves as the single source of21record for e-discovery matters. It exposes structured data about matters,22subpoena categories, productions, custodians, document review, privilege logs,23QC findings, retention events, and remediation actions, plus a read-only SQL24query endpoint for cross-entity joins.2526Every task provides two critical inputs:2728- **`<TASK_ENV_BASE_URL>`** — the hub base URL, resolved from the prompt or29 payload files. It is never a literal string to type; always resolve it from30 the task input.31- **`answer_template.json`** — a payload file that defines the exact output32 schema: required top-level keys, field types, allowed enum values, ordering33 rules, and numeric precision. This template is the single source of truth34 for the output shape.3536Your job is to query the hub systematically, map the evidence into the37template, and return exactly one JSON object with no prose outside it.3839## Endpoints4041All endpoints return JSON. The base URL is `<TASK_ENV_BASE_URL>`.4243| Method | Path | Purpose | Auth |44|--------|------|---------|------|45| GET | `/` | Health / connectivity check | none |46| GET | `/api/schema` | Full data model (tables, columns, relationships) | none |47| GET | `/api/matters` | Matter metadata (name, hold dates, status) | none |48| GET | `/api/subpoena-categories` | Request categories with codes and descriptions | none |49| GET | `/api/productions` | Rolling production status by category | none |50| GET | `/api/custodian-sources` | Custodian data sources (collected, not collected, lost) | none |51| GET | `/api/documents/search` | Reviewed documents with coding decisions | none |52| GET | `/api/privilege-log` | Privilege log entries (withheld, logged, unlogged) | none |53| GET | `/api/qc-findings` | QC findings (miscodes, contradictions, gaps) | none |54| GET | `/api/retention-events` | Retention events (destruction, purge, loss, missing) | none |55| GET | `/api/remediation-actions` | Remediation candidates and actions | none |56| POST | `/api/query` | Read-only SQL queries | `X-API-Key: review-key-017` |5758The POST `/api/query` endpoint accepts a JSON body with a `"query"` field59containing a SQL `SELECT` statement. Always include the header60`X-API-Key: review-key-017`. Use this endpoint whenever you need to join61entities that the REST endpoints keep separate — for example, cross-referencing62QC findings with documents, retention events with categories, or computing63aggregate counts across multiple tables.6465## Workflow6667### Phase 1 — Orient68691. **Read the prompt** and every file under `input/payloads/`. Identify:70 - The matter ID (always present in the prompt or payloads).71 - The report type: gap analysis, retention review, remediation dashboard,72 or production readiness.73 - The answer template file (`answer_template.json`).74752. **Read the answer template thoroughly.** Note these four structural76 properties before touching the hub:77 - `required_top_level_keys` — the sections your output must contain.78 - `ordering_rules` — how to sort every list (by ID, by rank, by category79 code, or a combination).80 - `enums` — the exact allowed values for every coded field. A value not in81 the enum list is invalid no matter how well it describes the evidence.82 - `fields` — the required keys inside each list item and nested object.83 Every key listed as `required_keys` or `item_required_keys` is mandatory.84853. **Verify hub connectivity** with `GET /`. If the hub is unreachable, report86 the error; do not fall back to local files.8788### Phase 2 — Discover89904. **Get the data model**: `GET /api/schema`. This tells you what entities91 exist, what columns they carry, and how they relate. Use this to plan which92 endpoints to query and what SQL joins are possible through93 `POST /api/query`.94955. **Confirm the matter**: `GET /api/matters`. Verify the matter ID from the96 prompt exists. Note its hold date (`hold_date`) and status — these anchor97 every retention timeline and preservation-risk assessment.98996. **Get request categories**: `GET /api/subpoena-categories`. Every finding,100 risk, or status entry must reference category codes from this endpoint.101 Use the exact codes (uppercase, as returned by the hub). The prompt or102 payloads may also carry a `category_synopsis` or similar block with103 human-readable descriptions; treat the hub codes as authoritative.104105### Phase 3 — Gather Evidence106107Query every endpoint relevant to the report type. The template's108`required_top_level_keys` and field-level schemas signal which entities matter.109At minimum, cover the endpoints listed below for each report type:110111**Gap analysis and production readiness:**112- `/api/productions` — what has and has not been produced per category.113- `/api/documents/search` — reviewed documents, their coding decisions, and114 production status.115- `/api/privilege-log` — withheld and logged privilege documents.116- `/api/qc-findings` — miscodes, contradictions, and coding defects.117- `/api/custodian-sources` — collected, uncollected, and lost sources.118119**Retention reviews:**120- `/api/retention-events` — every destruction, purge, system-loss, and121 missing-record event.122- `/api/custodian-sources` — communication systems (Teams, voicemail, email123 archives) whose retention windows or purge behavior create gaps.124- Cross-reference event dates against the matter hold date from125 `/api/matters` to classify each event as pre-hold or post-hold.126127**Remediation dashboards:**128- `/api/retention-events`, `/api/privilege-log`, `/api/qc-findings`,129 `/api/custodian-sources`, `/api/remediation-actions`,130 `/api/documents/search`.131132When REST endpoints return flat lists that need filtering or cross-joining,133use `POST /api/query` with a SQL query. Common use cases:134135- Join QC findings to documents to confirm miscoded responsive documents and136 get exact document IDs and category assignments.137- Join retention events to subpoena categories to compute per-category loss138 and identify which categories are affected by each event.139- Count unlogged privilege documents: compare withheld totals from140 `/api/privilege-log` against logged entries. The hub often surfaces this as a141 dedicated aggregate record.142143### Phase 4 — Synthesize144145Map hub evidence into the answer template. Apply the following rules146universally, regardless of report type.147148#### Stable Record IDs149150Every finding, risk, issue, event, or action entry should be anchored by a151**stable hub record ID**. Use IDs exactly as returned by the hub — never152invent identifiers. Common ID prefixes:153154- `DOC-*` — documents155- `PRIV-*` — privilege log entries or aggregate gap records156- `QC-*` — QC findings157- `SRC-*` — custodian sources158- `RET-*` — retention events159160For the priority action plan, create stable action IDs following the161convention `ACT-<MATTER>-<NNN>` where `<MATTER>` is a short segment from the162matter ID (e.g., `SENT` from `MTR-SENTINEL-GJ`) and `<NNN>` is a zero-padded163sequence number matching the priority rank order.164165#### Enum Values166167Use only values from the template's `enums` section. When the evidence168suggests a concept that is not an exact enum value, find the closest match169that is present in the template. Common enum domains across report types:170171- **Severity / risk level**: `critical` > `high` > `medium` > `low`172- **Priority**: `P0` > `P1` > `P2` > `P3`173- **Source status**: `lost`, `not_collected`, `partial`, `collected`,174 `destroyed`, `available_archive`, `not_applicable`175- **Production impact**: `source_lost`, `source_missing`, `not_produced`,176 `withheld_unlogged`, `privilege_exposure`, `underproduced`177178#### Counts179180All counts are whole integers. Use `0` when a count is zero or not applicable181— never use `null` or omit a count field. Every numeric field listed in the182template's field definitions must be present with an integer value.183184Where the template defines `withheld_count`, `logged_count`, and185`unlogged_count` together, enforce the arithmetic relationship:186`unlogged_count = withheld_count - logged_count`.187188#### Sorting and Ordering189190Follow the template's `ordering_rules` exactly:191192- Lists of findings, risks, or issues: sort by the key specified (commonly193 `finding_id`, `priority_rank`, `issue_id`, `event_id`, or `rank`).194- Lists of categories: sort by `category_code` ascending (lexicographic).195- Source ref and record ref lists within a single item: sort ascending.196- Category code lists within a single item: sort ascending.197198#### Nullable Fields199200Some string fields allow `null` — e.g., `third_party`, `event_date`,201`policy_section`, `cutoff_date`, `missing_component`. Use JSON `null` when the202value is genuinely absent or not applicable. Do not use an empty string `""`203unless the template explicitly lists it as an enum or permitted value.204205### Phase 5 — Output206207Return **exactly one JSON object** and nothing else — no markdown fences, no208explanatory prose, no trailing text. The JSON must satisfy every constraint:209210- Contains every key listed in `required_top_level_keys`.211- Contains every required sub-key for each list item and nested object as212 defined in the template's `fields` section.213- Uses only values from the template's `enums` for every coded field.214- Applies the template's `ordering_rules` to every list.215- Uses whole integers for all count fields.216- Uses stable hub record IDs throughout.217218If the task prompt names a specific output file (e.g., "Return only a JSON219object that conforms to..."), write the JSON directly in your response; do not220write it to a local file unless the prompt explicitly asks for a file write.221222## Common Evidence Patterns223224### Privilege Log Gaps225226When the privilege log shows withheld documents that are not logged:227228- `issue_type`: `privilege_log_gap`229- `severity` / `risk_level`: `high` (unlogged withholdings are a serious230 production defect)231- `production_impact`: `withheld_unlogged`232- `recommended_action`: `supplement_privilege_log`233- `unlogged_count = withheld_count - logged_count`234235The hub typically surfaces this as a dedicated privilege-log record whose ID236contains `LOG-GAP`. Use that record's aggregate counts directly.237238### Third-Party Waiver239240When privilege-log or QC data shows communications shared with someone outside241the attorney-client relationship, privilege may be waived:242243- `issue_type`: `third_party_waiver`244- `severity`: `high`245- `recommended_action`: `waiver_assessment_and_disclosure`246- `third_party`: the name from the hub record (not `null`)247248### Responsiveness Miscodes249250When QC findings or document review shows a responsive document coded as251non-responsive:252253- `issue_type`: `responsiveness_miscode`254- `severity`: `high` (responsive material not produced)255- `production_impact`: `not_produced`256- `recommended_action`: `recode_and_produce`257- `source_refs`: include both the document ID and the QC finding ID258259### Retention Events260261Classify every retention event from `/api/retention-events` by comparing its262date against the matter hold date from `/api/matters`:263264| Condition | Status | Risk | Typical Action |265|---|---|---|---|266| Destroyed before hold, policy-compliant | `policy_destroyed_pre_hold` | `low` | `no_action_policy_loss` |267| Destroyed or lost after hold | `post_hold_loss` | `high` or `critical` | `disclose_preservation_issue` |268| System auto-purge (e.g., voicemail, Teams) | `auto_purged` or `active_system_loss` | `medium` | `document_system_gap` |269| Record required by policy but not found | `should_exist_missing` | `high` | `locate_missing_record` |270271### Custodian Sources272273Map source status from `/api/custodian-sources`:274275| Source Status | Meaning | Production Impact | Typical Action |276|---|---|---|---|277| `lost` or `destroyed` | Irrecoverable | `source_lost` | `disclose_to_government` or `disclose_preservation_issue` |278| `not_collected` | Never collected | `source_missing` | `collect_source` or `collect_personal_device` |279| `partial` | Some data collected | `partial_source_missing` or `underproduced` | `supplemental_collection` |280| `available_archive` | Archive exists | `source_available` | `search_archive` or `collect_archive` |281282### QC Findings283284QC findings from `/api/qc-findings` flag review defects. Cross-reference them285with `/api/documents/search` via `POST /api/query` to get exact document286counts and affected categories. Common patterns:287288- **Responsiveness miscode**: a responsive document coded non-responsive.289- **Privilege miscode**: a document's privilege call was wrong in either290 direction.291- **Over-designation**: a document logged as privileged that contains only292 business content, not legal advice. Map as a `downgrade` correction.293- **Zero-claim contradiction**: a production claim of completeness is294 contradicted by QC sampling.295296### Available Archives297298When a source endpoint surfaces an archive that can partially remediate a loss299(e.g., an email archive that covers some communication categories despite the300live system having purged data), list it under the template's archive or301retained-sources section. Always note which categories it limits loss for302(`limits_irretrievable_loss_for_categories` or equivalent field).303304## Pitfalls305306- **Do not use local files as evidence.** The hub is the sole source of307 record. Ignore local environment files, database files, seed data,308 generation manifests, and hidden notes.309- **Do not guess enum values.** Check the template's `enums` block for every310 coded field assignment.311- **Do not write prose outside the JSON.** The output must be pure JSON.312 No markdown fences, no summaries, no sign-offs.313- **Do not omit required keys.** The template's `required_top_level_keys` and314 `item_required_keys` are mandatory. Produce every one.315- **Do not use `null` for integer counts.** Write `0` when the count is zero316 or not applicable.317- **Do not invent record IDs.** Use IDs from hub responses. For action-plan318 IDs, follow the `ACT-<MATTER>-<NNN>` convention.319- **Do not sort arbitrarily.** Follow the template's `ordering_rules`.320- **Do not forget the `X-API-Key: review-key-017` header on321 `POST /api/query`.**322- **Do not skip the schema endpoint.** `GET /api/schema` tells you what data323 exists and how entities relate; queries written without it are guessing.324- **Do not assume all categories have gaps.** Only include categories in325 status lists when the evidence shows a material non-ready or non-complete326 condition. A category with no evidence of gaps should either be omitted327 from the output or listed with an appropriate no-gap status as defined by328 the template.329330## Report Type Quick Reference331332| Report Type | Template Top-Level Keys | Primary Endpoints |333|---|---|---|334| Gap analysis | `matter_id`, `critical_findings`, `category_statuses`, `metrics`, `priority_actions` | productions, documents/search, privilege-log, qc-findings, custodian-sources |335| Retention review | `matter_id`, `retention_events`, `communication_gaps`, `available_archives`, `metrics`, `recommended_actions` | retention-events, custodian-sources, matters |336| Remediation dashboard | `matter_id`, `top_risks`, `category_coverage`, `retained_or_available_sources`, `metrics`, `action_plan` | retention-events, privilege-log, qc-findings, custodian-sources, remediation-actions, documents/search |337| Production readiness | `matter_id`, `readiness_statuses`, `issue_ledger`, `privilege_corrections`, `metrics`, `priority_actions` | productions, privilege-log, qc-findings, documents/search, custodian-sources |