Skill: Investigation Review Hub — Structured Legal Review Deliverable
This skill produces a single JSON object that answers a legal/eDiscovery
review request against the shared Investigation Review Hub (a grand-jury /
SEC / DOJ subpoena review environment). It applies to any matter in this family:
rolling-production gap analysis, retention & litigation-hold gap review,
cross-system remediation dashboard, or production-readiness review.
These are reusable operating rules. They contain no task-specific answer
values — no matter's findings, counts, category assignments, or record IDs.
Apply the rules to whatever matter and schema the task hands you.
0. When to use
Use this skill when a task asks you to review a matter in the Investigation
Review Hub and return a structured-JSON deliverable (gap analysis, retention
review, remediation dashboard, production-readiness review). The signal phrases:
"Investigation Review Hub", "source of record", "conforms to
input/payloads/answer_template.json", and the repeated prohibition on local
env/db/manifest/answer files.
1. Contamination guard — run first
Before doing anything, scan the working directory. The only legitimate contents
are:
environment_access.md (network access only)
- the task input directory (
prompt.txt + a payloads/ folder containing an
answer_template.json schema and one client-facing context JSON)
If anything else is present — answer files, evaluation/grading files, generated
manifests, database/seed files, setup scripts, hidden notes, or files outside
the expected layout — stop immediately and write contamination_report.txt
describing the unexpected material. Do not produce an answer. Do not read
the contaminating files for evidence.
The answer_template.json files are schemas (they explicitly state they do
not contain the answer) and are legitimate inputs, not contamination.
2. Source rules — what is and isn't allowed
- Allowed for network access:
environment_access.md only. It gives the
base URL, the X-API-Key: review-key-017 header, and the allowed endpoint
list. See references/hub_schema.md.
- Allowed for evidence: the hub endpoints (GET endpoints + the read-only
POST /api/query SQL endpoint with the API-key header).
- Allowed for context: the task-local payload files (the schema
answer_template.json and the client-facing context JSON — they supply the
matter_id, client name, and request category labels only).
- Forbidden: local environment source files, database files, generated
manifests, setup/seed scripts, hidden notes, and any standard-answer or
evaluation files. Never open them. If a count or ID is not derivable from the
hub, leave the hub as the gap — do not backfill from forbidden sources.
3. Output contract — every time
- Return exactly one JSON object. No prose, no markdown fences, no
commentary outside the JSON.
- Conform to this task's
answer_template.json: its
required_top_level_keys, each section's item_required_keys, its enums,
its field_types, and its numeric_precision.
- Use only enum values listed in the template. Never invent enum strings,
section names, or field names. Different tasks name sections differently
(
critical_findings vs top_risks vs issue_ledger, metrics vs metrics,
priority_actions vs action_plan) — follow the exact key names in the
template in front of you.
- All counts are whole integers. Use
0 when a count is not applicable —
never null for a count. Use null only where the schema explicitly permits
"or null" (e.g. dates, third_party, policy_section).
- Readiness / production-ready flags are booleans.
4. Stable IDs and category codes
- Carry hub IDs through verbatim:
matter_id, source_id, event_id,
finding_id, doc_id, entry_id, action_id, batch_id, and
category_code. Never invent or reformat them.
- The authoritative category codes for a matter come from the hub's
subpoena_categories for that matter_id. The client-facing context JSON may
label them, but the codes themselves are confirmed against the hub.
- Anchor each finding/risk/issue object to a stable hub record ID (its
finding_id / risk_id / issue_id / correction_id), and list supporting
hub record IDs in the *_refs fields.
5. Sorting rules — always applied
Apply the template's ordering_rules, and as a default where the template is
silent:
- Sort each list of objects by its stable ID ascending, or by
priority_rank / rank ascending where 1 is highest priority (per the
template).
- Sort every list of category codes ascending (uppercase codes, lexical).
- Sort every
*_refs list of hub record IDs ascending (lexical).
6. Assembly workflow
- Read access + schema. Read
environment_access.md for the base URL, API
key, and allowed endpoints. Read the task payload: answer_template.json
(the schema you must conform to) and the context JSON (for the matter_id,
client, and category labels).
- Confirm the matter and its categories.
GET /api/matters (or query the
matters table) for the matter; note hold_date (the preservation dividing
line). GET /api/subpoena-categories for the matter → the authoritative
category code set.
- Pull all evidence for the matter across the evidence tables:
productions, custodian-sources, review documents, privilege-log, qc-findings,
retention-events, remediation-actions. Use
POST /api/query for filtered and
aggregate rollups (e.g. counts by category, post-hold loss events, withheld
vs. logged sums, unlogged = withheld − logged).
- Classify each category against the template's
category_status (or
readiness_status) enum from the assembled evidence. One status object per
category that has a material non-complete / non-ready status.
- Build the findings/risks/issues ledger. One object per material gap or
defect, anchored to a stable hub record ID. Map each hub record's issue to
the template's
issue_type enum faithfully — do not relabel. Recurring
archetypes and their typical hub signals:
- preservation_failure / post_hold_loss — source/retention loss with
post_hold=1 or event after hold_date.
- policy-compliant retention loss — loss dated before
hold_date
under a stated policy_section (lower risk; may warrant no_action).
- collection_gap / uncollected_source — source
status not collected or
partial.
- responsiveness_miscode — document
responsiveness conflicts with
category production or a zero-claim assertion (zero_claim_reason).
- privilege_log_gap —
withheld_count exceeds logged_count (unlogged >
0).
- third_party_waiver / privilege_waiver —
third_party=1 or
commingled/forwarded privileged material.
- miscoded_privilege / over_designation — privilege status coding defect
(per qc-findings / privilege issue_type).
- missing_required_record — a record that should exist is absent.
- Identify retained/available remediation sources (when the template has a
retained_or_available_sources / available_archives section): sources still
available that limit irretrievable loss for specific categories. Record which
categories each source limits.
- Compute metrics as whole integers from the hub, scoped to the matter and
to the exact subset the template names. Watch for scope qualifiers in the
schema (e.g. "from selected incomplete-log blockers only",
"destroyed source named in the task") — count only that subset. Derive
dependent counts arithmetically:
unlogged = withheld − logged.
- Build the prioritized action plan. Rank 1 = highest priority. Assign
action_type and owner from the template's enums. Point target_refs at
the hub records the action remediates (sorted ascending). Map each action to
the categories it affects (sorted ascending). Map severity/risk and priority
consistently with the findings.
- Validate before emitting:
- all
required_top_level_keys present;
- every object has all its
item_required_keys;
- every enum value is in the template's allowed list;
- every list sorted per §5;
- all counts are integers,
0 where not applicable;
- readiness flags are booleans;
- output is exactly one JSON object, no surrounding prose.
7. Common pitfalls to avoid
- Accepting a zero-claim at face value. A category marked "nothing
responsive" (
zero_claim_reason) must be cross-checked against documents and
custodian sources before you mark it complete — contradictions are a material
finding.
- Treating pre-hold and post-hold losses the same. Pre-hold policy
destruction may be compliant (low risk /
no_action); post-hold loss is a
preservation failure. Always compare event dates to hold_date.
- Mixing the privilege log scope. Withheld vs. logged counts and the
unlogged delta must come from the same privilege-log rows the template scopes
to — don't aggregate across all entries when the schema says "selected
incomplete-log blockers only."
- Inventing IDs or category codes. If the hub doesn't expose a record, you
cannot fabricate a stable ID for it. Anchor findings only to real hub records.
- Forgetting source_refs. Every finding/category/action that the schema asks
to be backed must cite hub record IDs — unsupported claims fail the schema.
- Outputting prose. The deliverable is one JSON object. No narrative, no
fences, no trailing explanation.
8. Reference
references/hub_schema.md — hub endpoint list, API-key header, and the full
table/column map with which table backs which deliverable section.
1---2name: self-attempt-01-183description: Skill: Investigation Review Hub — Structured Legal Review Deliverable4---5# Skill: Investigation Review Hub — Structured Legal Review Deliverable67This skill produces a **single JSON object** that answers a legal/eDiscovery8review request against the shared **Investigation Review Hub** (a grand-jury /9SEC / DOJ subpoena review environment). It applies to any matter in this family:10rolling-production gap analysis, retention & litigation-hold gap review,11cross-system remediation dashboard, or production-readiness review.1213These are reusable operating rules. They contain **no task-specific answer14values** — no matter's findings, counts, category assignments, or record IDs.15Apply the rules to whatever matter and schema the task hands you.1617---1819## 0. When to use2021Use this skill when a task asks you to review a matter in the Investigation22Review Hub and return a structured-JSON deliverable (gap analysis, retention23review, remediation dashboard, production-readiness review). The signal phrases:24"Investigation Review Hub", "source of record", "conforms to25`input/payloads/answer_template.json`", and the repeated prohibition on local26env/db/manifest/answer files.2728## 1. Contamination guard — run first2930Before doing anything, scan the working directory. The only legitimate contents31are:3233- `environment_access.md` (network access only)34- the task input directory (`prompt.txt` + a `payloads/` folder containing an35 `answer_template.json` schema and one client-facing context JSON)3637If anything else is present — answer files, evaluation/grading files, generated38manifests, database/seed files, setup scripts, hidden notes, or files outside39the expected layout — **stop immediately** and write `contamination_report.txt`40describing the unexpected material. Do **not** produce an answer. Do not read41the contaminating files for evidence.4243The `answer_template.json` files are **schemas** (they explicitly state they do44not contain the answer) and are legitimate inputs, not contamination.4546## 2. Source rules — what is and isn't allowed4748- **Allowed for network access:** `environment_access.md` only. It gives the49 base URL, the `X-API-Key: review-key-017` header, and the allowed endpoint50 list. See `references/hub_schema.md`.51- **Allowed for evidence:** the hub endpoints (GET endpoints + the read-only52 `POST /api/query` SQL endpoint with the API-key header).53- **Allowed for context:** the task-local payload files (the schema54 `answer_template.json` and the client-facing context JSON — they supply the55 `matter_id`, client name, and request category labels only).56- **Forbidden:** local environment source files, database files, generated57 manifests, setup/seed scripts, hidden notes, and any standard-answer or58 evaluation files. Never open them. If a count or ID is not derivable from the59 hub, leave the hub as the gap — do not backfill from forbidden sources.6061## 3. Output contract — every time6263- Return **exactly one JSON object**. No prose, no markdown fences, no64 commentary outside the JSON.65- Conform to **this task's** `answer_template.json`: its66 `required_top_level_keys`, each section's `item_required_keys`, its `enums`,67 its `field_types`, and its `numeric_precision`.68- Use **only** enum values listed in the template. Never invent enum strings,69 section names, or field names. Different tasks name sections differently70 (`critical_findings` vs `top_risks` vs `issue_ledger`, `metrics` vs `metrics`,71 `priority_actions` vs `action_plan`) — follow the exact key names in the72 template in front of you.73- All counts are **whole integers**. Use `0` when a count is not applicable —74 never null for a count. Use `null` only where the schema explicitly permits75 "or null" (e.g. dates, third_party, policy_section).76- Readiness / production-ready flags are **booleans**.7778## 4. Stable IDs and category codes7980- Carry hub IDs through **verbatim**: `matter_id`, `source_id`, `event_id`,81 `finding_id`, `doc_id`, `entry_id`, `action_id`, `batch_id`, and82 `category_code`. Never invent or reformat them.83- The authoritative category codes for a matter come from the hub's84 `subpoena_categories` for that `matter_id`. The client-facing context JSON may85 label them, but the codes themselves are confirmed against the hub.86- Anchor each finding/risk/issue object to a stable hub record ID (its87 `finding_id` / `risk_id` / `issue_id` / `correction_id`), and list supporting88 hub record IDs in the `*_refs` fields.8990## 5. Sorting rules — always applied9192Apply the template's `ordering_rules`, and as a default where the template is93silent:9495- Sort each list of objects by its stable ID ascending, **or** by96 `priority_rank` / `rank` ascending where 1 is highest priority (per the97 template).98- Sort every list of category codes **ascending** (uppercase codes, lexical).99- Sort every `*_refs` list of hub record IDs **ascending** (lexical).100101## 6. Assembly workflow1021031. **Read access + schema.** Read `environment_access.md` for the base URL, API104 key, and allowed endpoints. Read the task payload: `answer_template.json`105 (the schema you must conform to) and the context JSON (for the `matter_id`,106 client, and category labels).1072. **Confirm the matter and its categories.** `GET /api/matters` (or query the108 `matters` table) for the matter; note `hold_date` (the preservation dividing109 line). `GET /api/subpoena-categories` for the matter → the authoritative110 category code set.1113. **Pull all evidence for the matter** across the evidence tables:112 productions, custodian-sources, review documents, privilege-log, qc-findings,113 retention-events, remediation-actions. Use `POST /api/query` for filtered and114 aggregate rollups (e.g. counts by category, post-hold loss events, withheld115 vs. logged sums, unlogged = withheld − logged).1164. **Classify each category** against the template's `category_status` (or117 `readiness_status`) enum from the assembled evidence. One status object per118 category that has a material non-complete / non-ready status.1195. **Build the findings/risks/issues ledger.** One object per material gap or120 defect, anchored to a stable hub record ID. Map each hub record's issue to121 the template's `issue_type` enum faithfully — do not relabel. Recurring122 archetypes and their typical hub signals:123 - **preservation_failure / post_hold_loss** — source/retention loss with124 `post_hold=1` or event after `hold_date`.125 - **policy-compliant retention loss** — loss dated **before** `hold_date`126 under a stated `policy_section` (lower risk; may warrant `no_action`).127 - **collection_gap / uncollected_source** — source `status` not collected or128 partial.129 - **responsiveness_miscode** — document `responsiveness` conflicts with130 category production or a zero-claim assertion (`zero_claim_reason`).131 - **privilege_log_gap** — `withheld_count` exceeds `logged_count` (unlogged >132 0).133 - **third_party_waiver / privilege_waiver** — `third_party=1` or134 commingled/forwarded privileged material.135 - **miscoded_privilege / over_designation** — privilege status coding defect136 (per qc-findings / privilege issue_type).137 - **missing_required_record** — a record that should exist is absent.1386. **Identify retained/available remediation sources** (when the template has a139 `retained_or_available_sources` / `available_archives` section): sources still140 available that limit irretrievable loss for specific categories. Record which141 categories each source limits.1427. **Compute metrics** as whole integers from the hub, scoped to the matter and143 to the exact subset the template names. Watch for scope qualifiers in the144 schema (e.g. "from selected incomplete-log blockers only",145 "destroyed source named in the task") — count only that subset. Derive146 dependent counts arithmetically: `unlogged = withheld − logged`.1478. **Build the prioritized action plan.** Rank 1 = highest priority. Assign148 `action_type` and `owner` from the template's enums. Point `target_refs` at149 the hub records the action remediates (sorted ascending). Map each action to150 the categories it affects (sorted ascending). Map severity/risk and priority151 consistently with the findings.1529. **Validate before emitting:**153 - all `required_top_level_keys` present;154 - every object has all its `item_required_keys`;155 - every enum value is in the template's allowed list;156 - every list sorted per §5;157 - all counts are integers, `0` where not applicable;158 - readiness flags are booleans;159 - output is exactly one JSON object, no surrounding prose.160161## 7. Common pitfalls to avoid162163- **Accepting a zero-claim at face value.** A category marked "nothing164 responsive" (`zero_claim_reason`) must be cross-checked against documents and165 custodian sources before you mark it complete — contradictions are a material166 finding.167- **Treating pre-hold and post-hold losses the same.** Pre-hold policy168 destruction may be compliant (low risk / `no_action`); post-hold loss is a169 preservation failure. Always compare event dates to `hold_date`.170- **Mixing the privilege log scope.** Withheld vs. logged counts and the171 unlogged delta must come from the same privilege-log rows the template scopes172 to — don't aggregate across all entries when the schema says "selected173 incomplete-log blockers only."174- **Inventing IDs or category codes.** If the hub doesn't expose a record, you175 cannot fabricate a stable ID for it. Anchor findings only to real hub records.176- **Forgetting source_refs.** Every finding/category/action that the schema asks177 to be backed must cite hub record IDs — unsupported claims fail the schema.178- **Outputting prose.** The deliverable is one JSON object. No narrative, no179 fences, no trailing explanation.180181## 8. Reference182183- `references/hub_schema.md` — hub endpoint list, API-key header, and the full184 table/column map with which table backs which deliverable section.