Investigation Review Hub Skill
Overview
The Investigation Review Hub exposes a fixed set of REST endpoints for legal-review
data: matters, subpoena/request categories, productions, custodian sources,
documents, privilege logs, QC findings, retention events, and remediation actions.
Every task requires a single structured JSON answer that strictly conforms to an
answer template provided in input/payloads/answer_template.json. The template
dictates the top-level keys, field names, enum values, ordering rules, and numeric
precision; the hub endpoints supply the evidence.
The Four-Step Core Workflow
Execute these steps in order for every task:
Read the template. Read input/payloads/answer_template.json first. Note
every required key, every enum, every ordering rule, and every field type. Do
not guess at the schema later.
Discover the hub. Call GET / and GET /api/schema to confirm the live
endpoints and their response shapes. Read references/hub-schema.md for the
standard schemas; cross-check with what /api/schema returns.
Pull evidence. Call every endpoint that the answer template implies. Pull
all data before computing anything. When raw GET endpoints are insufficient, use
POST /api/query with SQL.
Build the answer. Cross-reference IDs across endpoints, compute metrics,
assign severity/status from the evidence, populate every template field, apply
all ordering rules, then emit exactly one JSON object with no prose outside it.
API Endpoints
The base URL is always <TASK_ENV_BASE_URL>. Every request uses header
X-API-Key: review-key-017.
Read endpoints (GET)
| Endpoint |
Returns |
Key fields |
GET / |
Health / available endpoints |
Confirms the live API surface |
GET /api/schema |
Table schemas |
Column names and types for SQL queries |
GET /api/matters |
Matter record |
matter_id, client, hold_date, agency, case_type |
GET /api/subpoena-categories |
Request categories |
category_code, title, description, matter_id |
GET /api/productions |
Production batches |
production_id, category_code, status, doc_count |
GET /api/custodian-sources |
Custodian data sources |
source_id, custodian, source_type, collection_status, notes |
GET /api/documents/search |
Document records |
doc_id, category_code, coding, produced_status, privilege_status |
GET /api/privilege-log |
Privilege log entries |
privilege_id, doc_count, withheld_count, logged_count, third_party, notes |
GET /api/qc-findings |
QC finding records |
finding_id, category_code, finding_type, severity, doc_count, status |
GET /api/retention-events |
Retention/preservation events |
event_id, record_type, status, event_date, hold_date, volume_count, volume_unit, policy_section |
GET /api/remediation-actions |
Remediation action records |
action_id, target_id, action_type, owner, priority |
SQL query endpoint
POST /api/query
Header: X-API-Key: review-key-017
Body: {"sql": "SELECT ... FROM ..."}
Call GET /api/schema before writing SQL to confirm table and column names. The
query endpoint is read-only. Prefer it when you need counts, aggregates, joins, or
filtered subsets that the raw GET endpoints do not return directly.
Common query patterns:
- Aggregate counts:
SELECT category_code, COUNT(*) FROM documents GROUP BY category_code
- Filter by status:
SELECT * FROM custodian_sources WHERE collection_status = 'not_collected'
- Join for gaps: Cross-reference production status against subpoena categories to find categories with zero documents produced.
- QC-verified defects:
SELECT * FROM qc_findings WHERE status = 'confirmed' ORDER BY severity
Answer Template Compliance
Every template uses these structural rules. Violating any one will produce a
malformed answer.
Required keys and ordering
The required_top_level_keys list is authoritative -- every key must appear at the
top level, even if its value would be an empty list or zero. Lists must be sorted
per ordering_rules. Within each list item, list-valued fields (category codes,
source refs) must be sorted ascending.
Enums
Every field marked enum: may only contain values from the corresponding enum list
in the template. If the evidence does not exactly match an enum, choose the closest
applicable value. Never invent a new enum value.
Numeric precision
All counts are whole integers. Zero is the default when a count does not apply. The
template may name specific metric keys like unlogged_privilege_docs or
destroyed_lab_archive_box_count -- compute these from the hub data, do not
hard-code them.
Boolean fields
Fields like rolling_production_ready or production_ready are set to true only
when zero categories have open gaps or blockers. Any open gap means false.
Cross-Referencing Data
Hub records are linked by stable IDs. The critical cross-reference chains:
matter_id ties everything together. Always filter by the matter_id from the
task prompt and the context payload file.
category_code links subpoena_categories to productions, documents,
qc_findings, and privilege_log. To assess category-level status, pull all records
that reference a given category_code and count open issues.
source_id links custodian_sources to retention_events to
remediation_actions. When a source has collection_status: 'not_collected' or
'lost', every category that source should cover is affected.
document IDs (doc_id, privilege_id, finding_id) anchor individual defects.
When a QC finding references a document, the document's category_code tells you
which categories are impacted.
event_id links retention_events to communication_gaps to
remediation_actions. The same event_id may appear in multiple endpoints with
different facets.
When the template asks for source_refs, issue_refs, blocking_refs, or
target_refs, use the stable hub record IDs (not invented labels) and sort them
ascending.
Metric Computation Rules
Compute every metric from the hub data; do not estimate or copy from training
answers.
Counting gaps
A category has an open gap when any of: zero productions for that category, any
document with a confirmed QC finding, any custodian source not collected, any
retention event with post_hold_loss or should_exist_missing status, or any
privilege log gap (unlogged > 0).
Privilege metrics
withheld_privileged_docs / withheld_privilege_doc_count: sum of
withheld_count from privilege-log records with an open gap (where logged_count
< withheld_count, or where unlogged_count > 0).
logged_privilege_docs / logged_privilege_doc_count: sum of logged_count from
those same incomplete-log records.
unlogged_privilege_docs / unlogged_privilege_doc_count: withheld minus
logged for those same records. Can also be pulled directly if the hub stores
unlogged_count.
QC and miscoding metrics
miscoded_responsive_doc_count: sum of document_count from QC findings where
finding_type indicates a responsiveness miscode (e.g., "responsiveness_miscode"
or a zero-claim contradiction pattern).
miscoded_privileged_doc_count: sum of document_count from QC findings
indicating privilege miscoding.
Retention metrics
destroyed_box_count / destroyed_lab_archive_box_count: sum volume_count
where volume_unit is "boxes" and status is a destruction/loss status.
post_hold_loss_event_count: count retention events with status =
"post_hold_loss" AND hold_date <= event_date.
pre_hold_policy_destroyed_event_count: count retention events with status =
"policy_destroyed_pre_hold".
available_archive_count: count sources or archives with availability status
"available_archive".
Source counts
uncollected_personal_source_count: count custodian_sources where
collection_status is "not_collected" and source_type is a personal device
type (personal_phone, personal_email, personal_messaging, personal_device).
lost_personal_device_count: count sources with collection_status: "lost".
uncollected_board_source_count: count sources with collection_status =
"not_collected" and type indicating a board or shared drive source.
Category counts
categories_with_open_gaps / affected_category_count: count distinct
category_codes that appear in any open issue, gap, or non-ready status.
categories_with_any_gap_or_loss: the sorted list of those category codes.
nonready_category_count: count categories whose readiness_status is not
"ready".
Boolean readiness
rolling_production_ready / production_ready: true only when zero categories
have an open gap. Any open gap means false.
Risk and Issue Identification
Severity assignment
Assign severity by combining evidence signals from the hub:
- critical: post-hold destruction, any source loss that cannot be remediated
from an available archive, or a combination of uncollected sources with no available
archive for key categories.
- high: uncollected sources, incomplete privilege logs, confirmed QC miscodes,
third-party waiver exposure, missing required records.
- medium: system auto-purge gaps with available archives, over-designation of
privilege without production impact, policy-compliant pre-hold destruction.
- low: pre-hold policy-compliant destruction that no longer affects producible
material.
Issue types (cross-template mapping)
Templates use different enum names for the same underlying concepts. Map evidence to
the template's enum:
| Evidence pattern |
Common enum values across templates |
| Post-hold data loss |
preservation_failure, post_hold_loss |
| Source never collected |
collection_gap, personal_source_gap |
| Archive exists but not searched |
archive_available |
| Document coded non-responsive but is responsive |
responsiveness_miscode |
| Withheld docs with incomplete log |
privilege_log_gap |
| Third party on privilege comms |
third_party_waiver, privilege_waiver |
| Privilege coded but shouldn't be |
privilege_miscoding, over_designation |
| Record should exist but doesn't |
missing_required_record |
Building the risk/issue objects
For each material defect found in the hub data:
- Pick a stable hub record ID as the anchor (
finding_id, risk_id, issue_id).
- Map the evidence to the correct template enum for
issue_type, severity,
status, source_status, and production_impact.
- Trace
category_impacts by following the category_code chain from the anchor
record through documents, productions, and sources.
- Collect
source_refs / record_refs -- every hub record ID that supports the
finding, sorted ascending.
- Pull numeric counts (
document_count, withheld_count, logged_count,
unlogged_count) from the hub record itself or from aggregate queries on related
records.
- Assign
recommended_action based on the defect type and available remediation
paths.
Action Plan Construction
Every answer template includes a prioritized action list. Build it by:
- Collect every
recommended_action from findings/risks/issues.
- Group by action type and owner so related work is bundled.
- Assign
priority_rank starting at 1 for the most urgent (critical severity +
disclosure obligations), then descending through high, medium, low.
- Use
P0 for disclosure and critical-loss actions, P1 for collection and
privilege remediation, P2 for QC and over-designation cleanup, P3 for
monitoring-only items.
- Set
due_days when the template requires it: 3 for P0 disclosures, 5 for
privilege/recode work, 7-10 for collections and archive searches.
- Populate
target_refs with the hub record IDs the action addresses, sorted
ascending.
- Populate
category_impacts / affected_categories with the category codes
benefited, sorted ascending.
Template-Specific Patterns
The five review types share the same hub API but differ in answer structure. When
you read the template, identify which review type you have:
Gap analysis style
Top-level keys: matter_id, critical_findings, category_statuses, metrics,
priority_actions.
Key enumerations: issue_type includes preservation_failure, collection_gap,
responsiveness_miscode, privilege_log_gap, retention_loss. finding_status
includes open, remediation_pending, protocol_noncompliant.
Retention review style
Top-level keys: matter_id, retention_events, communication_gaps,
available_archives, metrics, recommended_actions.
One event_id may appear in both retention_events and communication_gaps when the
loss has both a retention and a comms-system facet. The available_archives list
includes only sources that can still be collected and whose archive_status is
"available_archive".
Remediation dashboard style
Top-level keys: matter_id, top_risks, category_coverage,
retained_or_available_sources, metrics, action_plan.
top_risks items use risk_id instead of finding_id. category_coverage
summarizes each non-clean category. retained_or_available_sources lists sources
that provide a remediation path; it can be empty when nothing is available.
action_plan includes due_days.
Production readiness style
Top-level keys: matter_id, readiness_statuses, issue_ledger,
privilege_corrections, metrics, priority_actions.
readiness_statuses are per-category and use blocking_refs. issue_ledger is the
most detailed issue format with current_coding, produced_status,
corrected_disposition, missing_component, and third_party fields.
privilege_corrections is a separate privilege-specific list with
correction_type.
Validation Before Emitting
Before writing the final answer:
- Verify every
required_top_level_key from the template is present.
- Verify every list is sorted per
ordering_rules.
- Verify every list-valued field within each object is sorted ascending.
- Verify every enum field uses only values from the template's enum lists.
- Verify all counts are whole integers (no decimals, no null where 0 is correct).
- Verify all IDs (source_refs, target_refs, record_refs, blocking_refs, issue_refs)
come from the hub, not invented.
- Verify the
matter_id matches the task's matter.
- Verify boolean readiness fields are
false when any gap exists.
- Emit exactly one JSON object with no surrounding text, markdown fences, or
commentary.
Reference
See references/hub-schema.md for the standard endpoint
response schemas, table column definitions, and common SQL query patterns.
1---2name: investigation-review-hub-83description: |4 Structured legal investigation review using the Investigation Review Hub REST API.5 Use this skill when the task involves any of these review types for an identified6 matter and the task environment provides a `<TASK_ENV_BASE_URL>` to the7 Investigation Review Hub:89 - Rolling production gap analysis10 - Retention and litigation-hold gap review11 - Cross-system remediation dashboard12 - Production-readiness review13 - Privilege and QC remediation review1415 The skill covers API discovery, SQL-style querying via `POST /api/query`, answer16 template compliance (ordering rules, enums, numeric precision), cross-referencing17 data across hub endpoints, metric computation, and risk/issue identification.18metadata:19 source: https://skillmd.com/skills/prism-shadow/investigation-review-hub-820---2122# Investigation Review Hub Skill2324## Overview2526The Investigation Review Hub exposes a fixed set of REST endpoints for legal-review27data: matters, subpoena/request categories, productions, custodian sources,28documents, privilege logs, QC findings, retention events, and remediation actions.29Every task requires a single structured JSON answer that strictly conforms to an30answer template provided in `input/payloads/answer_template.json`. The template31dictates the top-level keys, field names, enum values, ordering rules, and numeric32precision; the hub endpoints supply the evidence.3334## The Four-Step Core Workflow3536Execute these steps in order for every task:37381. **Read the template.** Read `input/payloads/answer_template.json` first. Note39 every required key, every enum, every ordering rule, and every field type. Do40 not guess at the schema later.41422. **Discover the hub.** Call `GET /` and `GET /api/schema` to confirm the live43 endpoints and their response shapes. Read `references/hub-schema.md` for the44 standard schemas; cross-check with what `/api/schema` returns.45463. **Pull evidence.** Call every endpoint that the answer template implies. Pull47 all data before computing anything. When raw GET endpoints are insufficient, use48 `POST /api/query` with SQL.49504. **Build the answer.** Cross-reference IDs across endpoints, compute metrics,51 assign severity/status from the evidence, populate every template field, apply52 all ordering rules, then emit exactly one JSON object with no prose outside it.5354## API Endpoints5556The base URL is always `<TASK_ENV_BASE_URL>`. Every request uses header57`X-API-Key: review-key-017`.5859### Read endpoints (GET)6061| Endpoint | Returns | Key fields |62|---|---|---|63| `GET /` | Health / available endpoints | Confirms the live API surface |64| `GET /api/schema` | Table schemas | Column names and types for SQL queries |65| `GET /api/matters` | Matter record | `matter_id`, `client`, `hold_date`, `agency`, `case_type` |66| `GET /api/subpoena-categories` | Request categories | `category_code`, `title`, `description`, `matter_id` |67| `GET /api/productions` | Production batches | `production_id`, `category_code`, `status`, `doc_count` |68| `GET /api/custodian-sources` | Custodian data sources | `source_id`, `custodian`, `source_type`, `collection_status`, `notes` |69| `GET /api/documents/search` | Document records | `doc_id`, `category_code`, `coding`, `produced_status`, `privilege_status` |70| `GET /api/privilege-log` | Privilege log entries | `privilege_id`, `doc_count`, `withheld_count`, `logged_count`, `third_party`, `notes` |71| `GET /api/qc-findings` | QC finding records | `finding_id`, `category_code`, `finding_type`, `severity`, `doc_count`, `status` |72| `GET /api/retention-events` | Retention/preservation events | `event_id`, `record_type`, `status`, `event_date`, `hold_date`, `volume_count`, `volume_unit`, `policy_section` |73| `GET /api/remediation-actions` | Remediation action records | `action_id`, `target_id`, `action_type`, `owner`, `priority` |7475### SQL query endpoint7677```78POST /api/query79Header: X-API-Key: review-key-01780Body: {"sql": "SELECT ... FROM ..."}81```8283Call `GET /api/schema` before writing SQL to confirm table and column names. The84query endpoint is read-only. Prefer it when you need counts, aggregates, joins, or85filtered subsets that the raw GET endpoints do not return directly.8687Common query patterns:8889- **Aggregate counts:** `SELECT category_code, COUNT(*) FROM documents GROUP BY category_code`90- **Filter by status:** `SELECT * FROM custodian_sources WHERE collection_status = 'not_collected'`91- **Join for gaps:** Cross-reference production status against subpoena categories to find categories with zero documents produced.92- **QC-verified defects:** `SELECT * FROM qc_findings WHERE status = 'confirmed' ORDER BY severity`9394## Answer Template Compliance9596Every template uses these structural rules. Violating any one will produce a97malformed answer.9899### Required keys and ordering100101The `required_top_level_keys` list is authoritative -- every key must appear at the102top level, even if its value would be an empty list or zero. Lists must be sorted103per `ordering_rules`. Within each list item, list-valued fields (category codes,104source refs) must be sorted ascending.105106### Enums107108Every field marked `enum:` may only contain values from the corresponding enum list109in the template. If the evidence does not exactly match an enum, choose the closest110applicable value. Never invent a new enum value.111112### Numeric precision113114All counts are whole integers. Zero is the default when a count does not apply. The115template may name specific metric keys like `unlogged_privilege_docs` or116`destroyed_lab_archive_box_count` -- compute these from the hub data, do not117hard-code them.118119### Boolean fields120121Fields like `rolling_production_ready` or `production_ready` are set to `true` only122when zero categories have open gaps or blockers. Any open gap means `false`.123124## Cross-Referencing Data125126Hub records are linked by stable IDs. The critical cross-reference chains:1271281. **matter_id** ties everything together. Always filter by the matter_id from the129 task prompt and the context payload file.1301312. **category_code** links subpoena_categories to productions, documents,132 qc_findings, and privilege_log. To assess category-level status, pull all records133 that reference a given category_code and count open issues.1341353. **source_id** links custodian_sources to retention_events to136 remediation_actions. When a source has `collection_status: 'not_collected'` or137 `'lost'`, every category that source should cover is affected.1381394. **document IDs** (doc_id, privilege_id, finding_id) anchor individual defects.140 When a QC finding references a document, the document's category_code tells you141 which categories are impacted.1421435. **event_id** links retention_events to communication_gaps to144 remediation_actions. The same event_id may appear in multiple endpoints with145 different facets.146147When the template asks for `source_refs`, `issue_refs`, `blocking_refs`, or148`target_refs`, use the stable hub record IDs (not invented labels) and sort them149ascending.150151## Metric Computation Rules152153Compute every metric from the hub data; do not estimate or copy from training154answers.155156### Counting gaps157158A category has an open gap when any of: zero productions for that category, any159document with a confirmed QC finding, any custodian source not collected, any160retention event with `post_hold_loss` or `should_exist_missing` status, or any161privilege log gap (unlogged > 0).162163### Privilege metrics164165- `withheld_privileged_docs` / `withheld_privilege_doc_count`: sum of166 `withheld_count` from privilege-log records with an open gap (where `logged_count`167 < `withheld_count`, or where `unlogged_count` > 0).168- `logged_privilege_docs` / `logged_privilege_doc_count`: sum of `logged_count` from169 those same incomplete-log records.170- `unlogged_privilege_docs` / `unlogged_privilege_doc_count`: `withheld` minus171 `logged` for those same records. Can also be pulled directly if the hub stores172 `unlogged_count`.173174### QC and miscoding metrics175176- `miscoded_responsive_doc_count`: sum of `document_count` from QC findings where177 `finding_type` indicates a responsiveness miscode (e.g., `"responsiveness_miscode"`178 or a zero-claim contradiction pattern).179- `miscoded_privileged_doc_count`: sum of `document_count` from QC findings180 indicating privilege miscoding.181182### Retention metrics183184- `destroyed_box_count` / `destroyed_lab_archive_box_count`: sum `volume_count`185 where `volume_unit` is `"boxes"` and `status` is a destruction/loss status.186- `post_hold_loss_event_count`: count retention events with `status` =187 `"post_hold_loss"` AND `hold_date` <= `event_date`.188- `pre_hold_policy_destroyed_event_count`: count retention events with `status` =189 `"policy_destroyed_pre_hold"`.190- `available_archive_count`: count sources or archives with availability status191 `"available_archive"`.192193### Source counts194195- `uncollected_personal_source_count`: count custodian_sources where196 `collection_status` is `"not_collected"` and `source_type` is a personal device197 type (`personal_phone`, `personal_email`, `personal_messaging`, `personal_device`).198- `lost_personal_device_count`: count sources with `collection_status: "lost"`.199- `uncollected_board_source_count`: count sources with `collection_status` =200 `"not_collected"` and type indicating a board or shared drive source.201202### Category counts203204- `categories_with_open_gaps` / `affected_category_count`: count distinct205 category_codes that appear in any open issue, gap, or non-ready status.206- `categories_with_any_gap_or_loss`: the sorted list of those category codes.207- `nonready_category_count`: count categories whose readiness_status is not208 `"ready"`.209210### Boolean readiness211212- `rolling_production_ready` / `production_ready`: `true` only when zero categories213 have an open gap. Any open gap means `false`.214215## Risk and Issue Identification216217### Severity assignment218219Assign severity by combining evidence signals from the hub:220221- **critical:** post-hold destruction, any source loss that cannot be remediated222 from an available archive, or a combination of uncollected sources with no available223 archive for key categories.224- **high:** uncollected sources, incomplete privilege logs, confirmed QC miscodes,225 third-party waiver exposure, missing required records.226- **medium:** system auto-purge gaps with available archives, over-designation of227 privilege without production impact, policy-compliant pre-hold destruction.228- **low:** pre-hold policy-compliant destruction that no longer affects producible229 material.230231### Issue types (cross-template mapping)232233Templates use different enum names for the same underlying concepts. Map evidence to234the template's enum:235236| Evidence pattern | Common enum values across templates |237|---|---|238| Post-hold data loss | `preservation_failure`, `post_hold_loss` |239| Source never collected | `collection_gap`, `personal_source_gap` |240| Archive exists but not searched | `archive_available` |241| Document coded non-responsive but is responsive | `responsiveness_miscode` |242| Withheld docs with incomplete log | `privilege_log_gap` |243| Third party on privilege comms | `third_party_waiver`, `privilege_waiver` |244| Privilege coded but shouldn't be | `privilege_miscoding`, `over_designation` |245| Record should exist but doesn't | `missing_required_record` |246247### Building the risk/issue objects248249For each material defect found in the hub data:2502511. Pick a stable hub record ID as the anchor (`finding_id`, `risk_id`, `issue_id`).2522. Map the evidence to the correct template enum for `issue_type`, `severity`,253 `status`, `source_status`, and `production_impact`.2543. Trace `category_impacts` by following the category_code chain from the anchor255 record through documents, productions, and sources.2564. Collect `source_refs` / `record_refs` -- every hub record ID that supports the257 finding, sorted ascending.2585. Pull numeric counts (`document_count`, `withheld_count`, `logged_count`,259 `unlogged_count`) from the hub record itself or from aggregate queries on related260 records.2616. Assign `recommended_action` based on the defect type and available remediation262 paths.263264## Action Plan Construction265266Every answer template includes a prioritized action list. Build it by:2672681. Collect every `recommended_action` from findings/risks/issues.2692. Group by action type and owner so related work is bundled.2703. Assign `priority_rank` starting at 1 for the most urgent (critical severity +271 disclosure obligations), then descending through high, medium, low.2724. Use `P0` for disclosure and critical-loss actions, `P1` for collection and273 privilege remediation, `P2` for QC and over-designation cleanup, `P3` for274 monitoring-only items.2755. Set `due_days` when the template requires it: 3 for P0 disclosures, 5 for276 privilege/recode work, 7-10 for collections and archive searches.2776. Populate `target_refs` with the hub record IDs the action addresses, sorted278 ascending.2797. Populate `category_impacts` / `affected_categories` with the category codes280 benefited, sorted ascending.281282## Template-Specific Patterns283284The five review types share the same hub API but differ in answer structure. When285you read the template, identify which review type you have:286287### Gap analysis style288289Top-level keys: `matter_id`, `critical_findings`, `category_statuses`, `metrics`,290`priority_actions`.291292Key enumerations: `issue_type` includes `preservation_failure`, `collection_gap`,293`responsiveness_miscode`, `privilege_log_gap`, `retention_loss`. `finding_status`294includes `open`, `remediation_pending`, `protocol_noncompliant`.295296### Retention review style297298Top-level keys: `matter_id`, `retention_events`, `communication_gaps`,299`available_archives`, `metrics`, `recommended_actions`.300301One event_id may appear in both `retention_events` and `communication_gaps` when the302loss has both a retention and a comms-system facet. The `available_archives` list303includes only sources that can still be collected and whose `archive_status` is304`"available_archive"`.305306### Remediation dashboard style307308Top-level keys: `matter_id`, `top_risks`, `category_coverage`,309`retained_or_available_sources`, `metrics`, `action_plan`.310311`top_risks` items use `risk_id` instead of `finding_id`. `category_coverage`312summarizes each non-clean category. `retained_or_available_sources` lists sources313that provide a remediation path; it can be empty when nothing is available.314`action_plan` includes `due_days`.315316### Production readiness style317318Top-level keys: `matter_id`, `readiness_statuses`, `issue_ledger`,319`privilege_corrections`, `metrics`, `priority_actions`.320321`readiness_statuses` are per-category and use `blocking_refs`. `issue_ledger` is the322most detailed issue format with `current_coding`, `produced_status`,323`corrected_disposition`, `missing_component`, and `third_party` fields.324`privilege_corrections` is a separate privilege-specific list with325`correction_type`.326327## Validation Before Emitting328329Before writing the final answer:3303311. Verify every `required_top_level_key` from the template is present.3322. Verify every list is sorted per `ordering_rules`.3333. Verify every list-valued field within each object is sorted ascending.3344. Verify every enum field uses only values from the template's enum lists.3355. Verify all counts are whole integers (no decimals, no null where 0 is correct).3366. Verify all IDs (source_refs, target_refs, record_refs, blocking_refs, issue_refs)337 come from the hub, not invented.3387. Verify the `matter_id` matches the task's matter.3398. Verify boolean readiness fields are `false` when any gap exists.3409. Emit exactly one JSON object with no surrounding text, markdown fences, or341 commentary.342343## Reference344345See [references/hub-schema.md](references/hub-schema.md) for the standard endpoint346response schemas, table column definitions, and common SQL query patterns.