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:
request_id,description,period,requested_format(document/spreadsheet/narrative),owner,priority,due_date
Inventory the support folder. Run
scripts/file_inventory.py. For each file:path,name,extension,size_bytes,modifiedsummary— 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.pbc_match_confidence_threshold(default 0.70):COMPLETE— at least one match ≥ thresholdPARTIAL— has matches below threshold, or has one match where the request appears to want multiple itemsMISSING— no candidate filesMANAGEMENT_RESPONSE_REQUIRED— 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
COMPLETErequests. Single sentence:- "Item #{request_id} ({description}) provided in
{filename}(see Tab{sheet_name}if applicable)."
- "Item #{request_id} ({description}) provided in
Generate controller gap list. Sorted by
prioritythendue_date. EachMISSINGandPARTIALrequest 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, totalsPBC_Source— raw request listFile_Inventory— files in the support folder with summariesMatches— every request with matched files, confidences, statusOrphan_Files— folder files that matched nothingDuplicates— multiple files for the same requestGap_List— sorted action list for the controllerDraft_Responses— one row perCOMPLETErequest with a draft responseEvidence— every match's source path and how the match was scoredReview_Notes
Invariants
- Never claim a file supports a request unless the match confidence exceeds threshold. Below threshold is
PARTIALwith a reviewer note, notCOMPLETE. - 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.