PBC Package Assembly
Maps a "prepared by client" (PBC) audit request list to a folder of support files, identifies gaps, drafts responses to the auditor. Best run in Cowork — folder of files is the natural input.
Required inputs
- PBC request list — XLSX, CSV, or PDF. Must include request number, description, period, owner (ideally), and priority/due date (ideally).
- Support folder — path to a folder containing supporting files (PDF, XLSX, CSV, DOCX, etc.). Subfolders allowed.
Workflow
- Parse the PBC list. Normalize into one record per request:
- requestid, description, period, requestedformat (document/spreadsheet/narrative), owner, priority, due_date
- Inventory the support folder. Run
scripts/file_inventory.py. For each file:
- path, name, extension, size_bytes, modified - summary — 1-line description of contents (filename + first meaningful text snippet from the file)
- Match files to requests. Run
scripts/match_pbc.py. Confidence-scored matching using:
- filename similarity to request description - content summary similarity to request description - period match (if files have datestamps in name/content) - file type match (a "schedule" request should match a spreadsheet, not a PDF narrative)
Each potential match has a 0.0–1.0 confidence score.
- Classify each request. Apply
materiality.pbcmatchconfidence_threshold (default 0.70):
- COMPLETE — at least one match ≥ threshold - PARTIAL — has matches below threshold, or has one match where the request appears to want multiple items - MISSING — no candidate files - MANAGEMENTRESPONSEREQUIRED — request is for narrative or explanation, not a document (detected by keywords: "explain", "describe", "narrative", "memo", "policy")
- Identify orphaned files and duplicates.
- Orphans — files in the folder that didn't match any request. List them — they may be misnamed, extras, or from prior periods. - Duplicates — multiple files claiming to satisfy the same request. List for preparer to choose the right one.
- Draft auditor responses for
COMPLETE requests. Single sentence:
- "Item #{requestid} ({description}) provided in {filename} (see Tab {sheetname} if applicable)."
- Generate controller gap list. Sorted by
priority then due_date. Each MISSING and PARTIAL request gets:
- what's missing or partial - who owns the request - what the preparer needs to find or create
- Output workbook tabs:
- Cover — period, audit firm, status, totals - PBCSource — raw request list - FileInventory — files in the support folder with summaries - Matches — every request with matched files, confidences, status - OrphanFiles — folder files that matched nothing - Duplicates — multiple files for the same request - GapList — sorted action list for the controller - DraftResponses — one row per COMPLETE request with a draft response - Evidence — every match's source path and how the match was scored - ReviewNotes
Invariants
- Never claim a file supports a request unless the match confidence exceeds threshold. Below threshold is
PARTIAL with a reviewer note, not COMPLETE.
- Never invent a file location. If you didn't see a file, don't reference it.
- Orphans and duplicates are surfaced, never hidden. The point is to make the package auditable, not impressive.
When to say "I don't know"
- Support folder appears to be from a different period than the PBC list → stop and ask.
- More than 50% of files cannot be content-summarized (binary blobs, password-protected PDFs) → flag the inventory step as incomplete.
- Multiple files seem equally likely to satisfy a request and no metadata distinguishes them → list as
DUPLICATE, ask the preparer to choose.