Produce a single, conformant JSON assessment for a legal investigation matter by
querying the shared Investigation Review Hub REST and SQL endpoints. The hub is
the sole source of record for matter metadata, subpoena/request categories,
production status, custodian sources, review documents, privilege-log data, QC
findings, retention events, and remediation actions.
Environment Access
Read the task-provided environment_access.md (or equivalent) for:
base_url — the root URL of the Investigation Review Hub (e.g.
http://task-env:9017/). Use this for every endpoint call.
credentials.sql_endpoint_header — the HTTP header name required for
POST /api/query (typically X-API-Key).
credentials.sql_endpoint_api_key — the header value.
If the prompt or payload references <TASK_ENV_BASE_URL>, substitute
base_url from environment_access.md.
Available Endpoints
Method
Path
Purpose
GET
/
Hub health / root
GET
/api/schema
Full relational schema (tables, columns, types)
GET
/api/matters
Matter metadata (name, type, dates, status)
GET
/api/subpoena-categories
Request/subpoena category codes and descriptions
GET
/api/productions
Production rounds and per-category volumes
GET
/api/custodian-sources
Custodian data sources and collection status
GET
/api/documents/search
Search documents by matter, coding, or status
GET
/api/privilege-log
Privilege assertions, log entries, gaps
GET
/api/qc-findings
QC review issues, miscodes, discrepancies
GET
/api/retention-events
Retention / preservation events and losses
GET
/api/remediation-actions
Existing or recommended remediation steps
POST
/api/query
Read-only SQL queries (requires auth header)
The POST /api/query endpoint accepts a JSON body with a "query" field
containing a read-only SQL SELECT statement. Send the API key header from
environment_access.md. Use SQL for cross-entity joins, aggregations, or
filtered lookups that single-entity GET endpoints cannot express.
General Workflow
1. Read All Task-Local Inputs
prompt.txt — the natural-language task description identifying the
matter ID, workstream type, and deliverable shape.
Query documents for responsiveness miscodes, zero-claim contradictions, and
production blockers.
Query privilege-log for incomplete logs (where withheld > logged),
third-party waiver risks, and over-designation.
Query custodian sources for lost, destroyed, uncollected, or partial sources.
Query QC findings for confirmed miscoding defects.
Join across tables to associate each finding with affected request categories.
For retention/preservation reviews (like train 002):
Query retention events for pre-hold policy destructions, post-hold losses,
active-system losses, auto-purges, and missing-required-record events.
Separate pre-hold policy-compliant destructions from post-hold preservation
failures.
Identify communication gaps (e.g., purged collaboration-platform messages,
auto-deleted voicemail) and their purge windows.
Query available archives that can limit irretrievable loss for affected
categories.
For cross-system remediation dashboards (like train 003, 005):
Rank material risks by severity (critical > high > medium > low).
For each risk, identify: issue type, status, source status, production
impact, affected categories, supporting record IDs, document/volume counts,
withheld/logged/unlogged splits, third-party exposure, and recommended action.
Build per-category coverage: status, production impact, supporting issue
refs, recommended action, and open-issue count.
List retained or available sources (archives, retained devices, cloud backups)
with availability status, active-system issues, affected categories, and
which categories the source can still remediate.
Roll up metrics: counts for top risks, destroyed sources, post-hold losses,
uncollected personal sources, available archives, miscoded docs, privilege
gaps, waiver exposures, missing records, affected categories, and the set of
categories with open risk.
Build a ranked action plan with owners, priorities, target refs, affected
categories, and due-days.
4. Build the Answer JSON
Construct a single JSON object whose top-level keys exactly match
answer_template.json's required_top_level_keys.
For every list:
Sort according to the template's ordering_rules.
Use only stable hub record IDs for *_id, *_refs, source_refs,
issue_refs, target_refs, blocking_refs, record_refs fields.
Match everyitem_required_keys list per object.
For every enum field:
Use only values from the template's enums block. Do not invent new
enum values.
For every count field:
Use whole integers. Use 0 when not applicable (unless the field description
says otherwise). Never use null for a count field that expects an integer.
For boolean fields:
Use JSON true or false (not strings).
5. Validate Before Returning
Top-level keys: present and matching the template exactly.
Sort order: every list sorted per the template's ordering_rules.
Enums: every enum field draws from the template's allowed values.
Stable IDs: all references use hub record IDs, not synthesized keys
(unless the template instructs otherwise for action IDs like ACT-*-*).
Numeric precision: all counts are whole integers.
No prose: return only the JSON object; no explanatory text.
No local-source contamination: every factual assertion traces to a hub
endpoint response. Never use local files, seeds, manifests, or answer files
as data sources.
Common Enum Families (Conceptual)
The templates across tasks share recurring conceptual categories. The exact
allowed values are always in the task-local answer_template.json; the
summaries below are for orientation only.
When using POST /api/query, structure queries to answer specific questions:
Cross-entity joins: Join documents ↔ privilege-log ↔ QC-findings ↔
custodian-sources on matter ID and stable record IDs.
Aggregation: COUNT, SUM for document counts, withheld/logged/unlogged
splits, source counts, box counts.
Filtering: By matter_id, category_code, status, severity, date
ranges, coding values.
Grouping: By category, issue type, severity, or owner for roll-up metrics.
Keep queries read-only (SELECT only). Parameterize the matter ID rather than
hard-coding it.
Anti-Patterns (Do Not Do)
Never inspect local environment source files, database files, seed data,
generation manifests, hidden notes, or task answer/evaluation files for
business evidence.
Never use localhost, 127.0.0.1, or env/setup.sh URLs — always use
the base_url from environment_access.md.
Never return prose outside the JSON object unless the prompt explicitly
asks for a narrative memo.
Never invent enum values — if a situation doesn't match any allowed enum,
choose the closest fit (or other / unknown if available).
Never use null for integer count fields that expect 0 when not
applicable.
Never skip a required top-level key or a required per-item key.
Never output lists in arbitrary order — always follow the template's
ordering_rules.
Quick-Start Checklist
Read environment_access.md → note base_url and API key.
Read prompt.txt → identify matter ID and workstream type.
Read all files in payloads/ → note the answer template schema, any
category synopses, and matter-specific constraints.
Call GET /api/schema → map tables to the evidence needed.
Call relevant GET endpoints for the matter (/api/matters,
/api/subpoena-categories, etc.) filtering by matter ID.
Use POST /api/query for cross-entity joins and aggregations.
Build the JSON answer matching the template's structure, enums, ordering,
and numeric precision.
1---2name: fewshot-attempt-01-443description: Investigation Review Hub — Structured Assessment Skill4---5# Investigation Review Hub — Structured Assessment Skill67## Purpose89Produce a single, conformant JSON assessment for a legal investigation matter by10querying the shared Investigation Review Hub REST and SQL endpoints. The hub is11the **sole source of record** for matter metadata, subpoena/request categories,12production status, custodian sources, review documents, privilege-log data, QC13findings, retention events, and remediation actions.1415## Environment Access1617Read the task-provided `environment_access.md` (or equivalent) for:1819- **`base_url`** — the root URL of the Investigation Review Hub (e.g.20 `http://task-env:9017/`). Use this for **every** endpoint call.21- **`credentials.sql_endpoint_header`** — the HTTP header name required for22 `POST /api/query` (typically `X-API-Key`).23- **`credentials.sql_endpoint_api_key`** — the header value.2425If the prompt or payload references `<TASK_ENV_BASE_URL>`, substitute26`base_url` from `environment_access.md`.2728## Available Endpoints2930| Method | Path | Purpose |31|--------|-----------------------------|-------------------------------------------------|32| GET | `/` | Hub health / root |33| GET | `/api/schema` | Full relational schema (tables, columns, types) |34| GET | `/api/matters` | Matter metadata (name, type, dates, status) |35| GET | `/api/subpoena-categories` | Request/subpoena category codes and descriptions|36| GET | `/api/productions` | Production rounds and per-category volumes |37| GET | `/api/custodian-sources` | Custodian data sources and collection status |38| GET | `/api/documents/search` | Search documents by matter, coding, or status |39| GET | `/api/privilege-log` | Privilege assertions, log entries, gaps |40| GET | `/api/qc-findings` | QC review issues, miscodes, discrepancies |41| GET | `/api/retention-events` | Retention / preservation events and losses |42| GET | `/api/remediation-actions` | Existing or recommended remediation steps |43| POST | `/api/query` | Read-only SQL queries (requires auth header) |4445The `POST /api/query` endpoint accepts a JSON body with a `"query"` field46containing a read-only SQL `SELECT` statement. Send the API key header from47`environment_access.md`. Use SQL for cross-entity joins, aggregations, or48filtered lookups that single-entity GET endpoints cannot express.4950## General Workflow5152### 1. Read All Task-Local Inputs5354- **`prompt.txt`** — the natural-language task description identifying the55 matter ID, workstream type, and deliverable shape.56- **`payloads/answer_template.json`** — the required output JSON schema57 (top-level keys, per-item required keys, enum choices, ordering rules,58 numeric precision).59- **`payloads/request_context.json`** (if present) — client name,60 workstream label, matter ID, requesting role, cutoff date.61- **`payloads/review_scope.json`** (if present) — request category synopsis,62 category codes and their human-readable titles.63- **`payloads/matter_context.json`** (if present) — matter-specific64 environment overrides, endpoint lists, output contract notes.6566### 2. Explore the Hub Schema6768Call `GET /api/schema` early to understand the relational model. Identify which69tables hold:7071- Matters and their attributes72- Subpoena/request categories per matter73- Custodian sources and collection statuses74- Documents (coding, production status, privilege assertions)75- Privilege log entries (withheld/logged/unlogged counts)76- QC findings (miscoding, zero-claim contradictions, privilege defects)77- Retention events (dates, policy sections, volumes, risk levels)78- Remediation actions (owners, priorities, targets)7980### 3. Gather Matter-Specific Evidence8182#### For gap/readiness analyses (like train 001, 004):8384- Query documents for responsiveness miscodes, zero-claim contradictions, and85 production blockers.86- Query privilege-log for incomplete logs (where `withheld > logged`),87 third-party waiver risks, and over-designation.88- Query custodian sources for lost, destroyed, uncollected, or partial sources.89- Query QC findings for confirmed miscoding defects.90- Join across tables to associate each finding with affected request categories.9192#### For retention/preservation reviews (like train 002):9394- Query retention events for pre-hold policy destructions, post-hold losses,95 active-system losses, auto-purges, and missing-required-record events.96- Separate pre-hold policy-compliant destructions from post-hold preservation97 failures.98- Identify communication gaps (e.g., purged collaboration-platform messages,99 auto-deleted voicemail) and their purge windows.100- Query available archives that can limit irretrievable loss for affected101 categories.102103#### For cross-system remediation dashboards (like train 003, 005):104105- Rank material risks by severity (critical > high > medium > low).106- For each risk, identify: issue type, status, source status, production107 impact, affected categories, supporting record IDs, document/volume counts,108 withheld/logged/unlogged splits, third-party exposure, and recommended action.109- Build per-category coverage: status, production impact, supporting issue110 refs, recommended action, and open-issue count.111- List retained or available sources (archives, retained devices, cloud backups)112 with availability status, active-system issues, affected categories, and113 which categories the source can still remediate.114- Roll up metrics: counts for top risks, destroyed sources, post-hold losses,115 uncollected personal sources, available archives, miscoded docs, privilege116 gaps, waiver exposures, missing records, affected categories, and the set of117 categories with open risk.118- Build a ranked action plan with owners, priorities, target refs, affected119 categories, and due-days.120121### 4. Build the Answer JSON122123Construct a single JSON object whose top-level keys **exactly** match124`answer_template.json`'s `required_top_level_keys`.125126#### For every list:127128- **Sort** according to the template's `ordering_rules`.129- Use only **stable hub record IDs** for `*_id`, `*_refs`, `source_refs`,130 `issue_refs`, `target_refs`, `blocking_refs`, `record_refs` fields.131- Match **every** `item_required_keys` list per object.132133#### For every enum field:134135- Use **only** values from the template's `enums` block. Do not invent new136 enum values.137138#### For every count field:139140- Use whole integers. Use `0` when not applicable (unless the field description141 says otherwise). Never use `null` for a count field that expects an integer.142143#### For boolean fields:144145- Use JSON `true` or `false` (not strings).146147### 5. Validate Before Returning148149- **Top-level keys**: present and matching the template exactly.150- **Sort order**: every list sorted per the template's `ordering_rules`.151- **Enums**: every enum field draws from the template's allowed values.152- **Stable IDs**: all references use hub record IDs, not synthesized keys153 (unless the template instructs otherwise for action IDs like `ACT-*-*`).154- **Numeric precision**: all counts are whole integers.155- **No prose**: return only the JSON object; no explanatory text.156- **No local-source contamination**: every factual assertion traces to a hub157 endpoint response. Never use local files, seeds, manifests, or answer files158 as data sources.159160## Common Enum Families (Conceptual)161162The templates across tasks share recurring conceptual categories. The **exact**163allowed values are always in the task-local `answer_template.json`; the164summaries below are for orientation only.165166### Issue / Risk Types167168- **Preservation / retention failures**: `preservation_failure`,169 `post_hold_loss`, `retention_loss`, `collection_gap`, `auto_purge`,170 `active_system_loss`, `should_exist_missing`, `missing_required_record`.171- **Privilege defects**: `privilege_log_gap`, `privilege_waiver`,172 `third_party_waiver`, `over_designation`, `miscoded_privilege`,173 `privilege_miscoding`.174- **Review / coding defects**: `responsiveness_miscode`,175 `zero_claim_contradiction`, `responsive_miscoding`.176- **Source gaps**: `personal_source_gap`, `personal_email_gap`,177 `personal_phone_gap`, `archive_available`.178179### Severity / Risk Levels180181Typically `critical`, `high`, `medium`, `low`.182183### Status Families184185- **Finding status**: `open`, `confirmed`, `remediation_pending`,186 `protocol_noncompliant`, `ready`, `no_gap`.187- **Source status**: `lost`, `destroyed`, `not_collected`, `partial`,188 `collected`, `pending`, `not_applicable`, `available_archive`,189 `should_exist_missing`, `unknown`.190- **Category status**: varies by template — `complete`, `incomplete`,191 `preservation_loss`, `collection_gap`, `privilege_log_gap`,192 `responsiveness_gap`, `source_gap_with_archive_available`, `archive_available`,193 `underproduced_privilege_corrections`, `mixed_preservation_and_missing_record`,194 `no_open_gap`.195196### Production Impact197198`source_lost`, `source_missing`, `source_available`, `not_produced`,199`underproduced`, `withheld_unlogged`, `privilege_exposure`, `recode_needed`,200`missing_record`, `no_production_impact`, `multiple_impacts`.201202### Action Types203204- **Disclosure / escalation**: `disclose_to_government`,205 `disclose_preservation_issue`, `waiver_assessment_and_disclosure`,206 `escalate_to_counsel`.207- **Collection / recovery**: `collect_source`, `collect_personal_device`,208 `collect_personal_email`, `collect_signal_messages`, `collect_archive`,209 `forensic_recovery`, `search_archive`, `restore_from_backup`.210- **Review / recoding**: `recode_and_produce`, `qc_remediation`,211 `privilege_re_review`, `privilege_recode_and_log`, `quality_control_review`.212- **Log remediation**: `supplement_privilege_log`.213- **Investigation**: `investigate`, `locate_missing_record`,214 `custodian_followup`.215- **Documentation**: `document_system_gap`, `no_action_policy_loss`.216- **Passive**: `monitor_only`, `no_action`.217218### Owners / Responsible Roles219220`outside_counsel`, `client_legal`, `client_it`, `ediscovery_vendor`,221`review_vendor`, `review_qc`, `privilege_team`, `privilege_counsel`,222`records_vendor`, `records_management`, `investigation_team`, `forensics`,223`it_messaging`, `compliance_audit`, `legal_operations`, `litigation_counsel`,224`review_operations`.225226### Priority Levels227228`P0` (highest), `P1`, `P2`, `P3` (lowest).229230## SQL Query Patterns231232When using `POST /api/query`, structure queries to answer specific questions:233234- **Cross-entity joins**: Join documents ↔ privilege-log ↔ QC-findings ↔235 custodian-sources on matter ID and stable record IDs.236- **Aggregation**: `COUNT`, `SUM` for document counts, withheld/logged/unlogged237 splits, source counts, box counts.238- **Filtering**: By `matter_id`, `category_code`, `status`, `severity`, date239 ranges, coding values.240- **Grouping**: By category, issue type, severity, or owner for roll-up metrics.241242Keep queries read-only (`SELECT` only). Parameterize the matter ID rather than243hard-coding it.244245## Anti-Patterns (Do Not Do)246247- **Never** inspect local environment source files, database files, seed data,248 generation manifests, hidden notes, or task answer/evaluation files for249 business evidence.250- **Never** use `localhost`, `127.0.0.1`, or `env/setup.sh` URLs — always use251 the `base_url` from `environment_access.md`.252- **Never** return prose outside the JSON object unless the prompt explicitly253 asks for a narrative memo.254- **Never** invent enum values — if a situation doesn't match any allowed enum,255 choose the closest fit (or `other` / `unknown` if available).256- **Never** use `null` for integer count fields that expect `0` when not257 applicable.258- **Never** skip a required top-level key or a required per-item key.259- **Never** output lists in arbitrary order — always follow the template's260 `ordering_rules`.261262## Quick-Start Checklist2632641. [ ] Read `environment_access.md` → note `base_url` and API key.2652. [ ] Read `prompt.txt` → identify matter ID and workstream type.2663. [ ] Read all files in `payloads/` → note the answer template schema, any267 category synopses, and matter-specific constraints.2684. [ ] Call `GET /api/schema` → map tables to the evidence needed.2695. [ ] Call relevant GET endpoints for the matter (`/api/matters`,270 `/api/subpoena-categories`, etc.) filtering by matter ID.2716. [ ] Use `POST /api/query` for cross-entity joins and aggregations.2727. [ ] Build the JSON answer matching the template's structure, enums, ordering,273 and numeric precision.2748. [ ] Validate: stable IDs, sort order, required keys, integer counts, no prose.2759. [ ] Return the single JSON object.
Run npx skillmds@latest add prism-shadow/fewshot-attempt-01-44 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Investigation Review Hub — Structured Assessment Skill It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
prism-shadow (@prism-shadow) published this skill. Their other Agent Skills are listed on their SkillMD profile.