Codex plugin

Journal Sampling

Turn variable accounting journals into reproducible audit samples.

Codex handles format ambiguity, column mapping and review questions. Deterministic Python scripts extract, normalize, sample and preserve the audit trail.

What it does

From mixed journals to a sample with diagnostics

Use it when a journal is readable but not standardized: good Excel, CSV, print-style Excel exported from PDF, or text PDF. Codex guides only the uncertain parts.

input/
  journal.xlsx
  print_export_from_pdf.xlsx
  general_journal.pdf
out/
  inspection.json
  suggested_recipe.json
  normalized_journal.csv
  normalization_diagnostics.json
  sample/
    journal_sample.csv
    journal_sample.xlsx
    sampling_audit.json

Inputs

What it reads

The plugin works with local files already available to the firm. OCR-only scanned PDFs are not a v1 target.

Outputs

What it produces

The result is a reviewable work folder: mapped recipe, normalized population, sample files, diagnostics and audit trail.

Codex is the adaptive layer, not the sampling engine

Codex inspects the customer format, proposes a mapping and asks only the smallest unresolved question: header row, account column, debit/credit convention or sample assumptions.

The scripts remain responsible for extraction, normalization, filtering, sampling and exports. If a parser misses a pattern, the improvement is a new deterministic rule or script, not a silent model correction.

At the end of a run Codex can write a short improvement note and ask before emailing it to the maintainer.

Use

How it runs in Codex

Open the work folder in Codex, call the plugin, and let Codex inspect the journal before running the deterministic scripts.

Prompts

Starter prompts for beta users

Start from one of these prompts and replace the folder path, language, method and sample size. Codex will ask before resolving essential ambiguities.

Download

Download the plugin

Requires Codex desktop. The same ZIP installs Plugins4Accountants.

Installation

Official download: Codex desktop.

    /Users/name/Documents/CodexPlugins/mp-codex-plugins

    First use

    In a Codex chat, provide the journal folder, language, sampling method and target size.

    Use Journal Sampling on /path/input.
    Language: en. Document language: auto.
    Inspect the files, ask only for essential mapping ambiguities, then generate sample, diagnostics and audit trail.
    Method: random. Size: 25.