Audit a directory or listing database for dead entries: stratified sampling with finite population math, tool-neutral verification checks for any sector, ghost rate calculation with Wilson intervals, one evidence record per listing, a missing-entry reverse check, and a risk-based recheck cadence. Triggers when someone asks how accurate a directory is, wants ghost or dead listings found, needs an audit sample size, or needs a defensible accuracy report for a provider, business, service, or member directory.
./install.sh directory-accuracy-auditname: directory_accuracy_audit description: >- Audit a directory or listing database for dead entries: stratified sampling with finite population math, tool-neutral verification checks for any sector, ghost rate calculation with Wilson intervals, one evidence record per listing, a missing-entry reverse check, and a risk-based recheck cadence. Triggers when someone asks how accurate a directory is, wants ghost or dead listings found, needs an audit sample size, or needs a defensible accuracy report for a provider, business, service, or member directory.
Directories rot quietly. Entities close, move, leave a network, or change a phone number, and the listing stays up, sending users to closed doors. A ghost listing is worse than a missing one in one specific way: the user trusts it, acts on it, and only learns the truth at the door, the dial tone, or the rejection letter.
This skill audits any directory, in any sector, with any verification tools available. It does not depend on one calling platform or one industry database. The method is the product: a random stratified sample, the same verification protocol applied to every sampled listing, one evidence record per listing, and rates reported with confidence intervals so a reader can tell a measured problem from a guess.
Two failure directions exist and both get measured. Ghosts and errors are listings that should not be there, or not like that. Missing entries are eligible entities that are not listed at all. A sample drawn from the directory cannot find the second kind, so the workflow includes a reverse check from an independent frame.
references/verification-and-evidence.md: verified, field_error, ghost (with subtype), duplicate, unverified. Write down which fields are critical for this directory: identity, existence, location, contact, status or inclusion claim, category and attributes. A listing that fails a critical field is not verified, even if everything else checks out.scripts/audit_calc.py sample-size with the population, a margin, and a confidence level. The script uses the Cochran proportion formula n0 = Z squared times p times (1 minus p), divided by margin squared, with p set to 0.5 by default for the conservative maximum, then applies the finite population correction n = n0 divided by (1 plus (n0 minus 1) divided by N). Defaults worth using: 95 percent confidence, margin 0.05 for a routine cycle, 0.03 when the result will drive removals or a public claim. If the required sample is most of the population, audit the lot and call it a census.scripts/audit_calc.py allocate for proportional allocation across strata. Draw randomly inside each stratum with a recorded seed, and save the selected listing IDs before any checking starts. Hand-picked samples do not carry the confidence the math promises. Oversampled strata are fine, the scoring step weights them back by population.assets/example-results.csv (stratum, population, sampled, verified, ghost, field_error, unverified, duplicate, with the counts summing to sampled) and run scripts/audit_calc.py score. See Output Contract for how the rates are defined.The audit report contains:
scripts/audit_calc.py score. Unverified listings are excluded from that denominator and reported on their own line. Counting unverified as ghost inflates the rate and punishes listings for the audit team's failure to reach them.Worked example, run and verified with the bundled script: a directory of 12,000 listings in three strata (north 5,000, south 4,000, west 3,000). At 95 percent confidence and margin 0.03, sample-size returns n = 981 (unadjusted 1,067.11). Proportional allocation gives north 409, south 327, west 245. Scoring the tallies in assets/example-results.csv gives a weighted ghost rate of 11.32 percent, an estimated 1,357.8 ghosts in the population, and per-stratum ghost rates of 9.09 percent for north (Wilson 6.64 to 12.33 percent), 14.60 percent for south (11.13 to 18.93 percent), and 10.64 percent for west (7.31 to 15.23 percent). Read that report as: south is the problem stratum, the overall ghost problem is roughly one listing in nine, and the unverified rates near 3 to 4 percent are small enough that they do not change the story.
bash
python3 scripts/audit_calc.py sample-size --population 12000 --margin 0.03
python3 scripts/audit_calc.py allocate --population 12000 --sample 981 --strata "north=5000,south=4000,west=3000"
# do the fieldwork, tally per stratum into the shape of assets/example-results.csv
python3 scripts/audit_calc.py score --results assets/example-results.csv
For the verdict taxonomy, field checks by type, attempt protocol, evidence record fields, reverse check, and cadence rules, read references/verification-and-evidence.md.
publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
No ratings yet — be the first to rate it.