Product: Potato Figure Audit
Skill name: potato-figure-audit
Version: v0.4.3-alpha
Packaging revision: R6.1
Your figure is finished. Is it actually defensible?
An independent audit layer for biomedical scientific figures.
Checks:
✓ statistical units ✓ pseudoreplication ✓ pairing ✓ claim–evidence alignment ✓ panel redundancy ✓ global coherence ✓ visual integrity ✓ color system ✓ Source Data & reproducibility
Works with figures generated by:
R · Python · GraphPad Prism · Nature-Figure · Illustrator · AI tools · any other workflow
Potato Figure Audit does not draw, render, or beautify figures. It reviews figures that already exist and tells you whether they are scientifically sound, internally consistent, visually usable, reproducible, and ready for manuscript submission.
# Inspect the Skill exposed by this repository
npx skills add Potato-AI0815/Potato_Figure --list
# Install Potato Figure Audit
npx skills add Potato-AI0815/Potato_Figure \
--skill potato-figure-audit \
--global --yes --copyRepository name: Potato_Figure
Skill name: potato-figure-audit
Then ask your compatible Agent to use potato-figure-audit, or invoke the
included R entry point directly as shown below.
# audit a figure delivery directory
Rscript scripts/audit_figure.R <figure_dir>
# machine-readable JSON (R6.1 tiered contract + audited_artifacts sha256 binding)
Rscript scripts/audit_figure.R <figure_dir> --json
# custom report path
Rscript scripts/audit_figure.R <figure_dir> --report my_audit.md
# explicit enforcement mode (exit code reflects the publication gate)
Rscript scripts/audit_figure.R <figure_dir> --mode PUBLICATION_READY --jsonOutputs:
figure_audit_report.md— human-readable reviewfigure_audit.json— machine-readable findings (R6.1 tiered contract; includesaudited_artifacts, a SHA-256 manifest of every audited input so downstream orchestrators can detect stale audits)
Exit code contract (all modes):
0— success. InPUBLICATION_READYmode: the publication gate passed.2— ran successfully, gate not satisfied (PUBLICATION_READYmode only).3— invalid input / contract error (missing directory, invalid--mode).4— internal error (never masquerades as a FAIL verdict).
Fail-closed readiness — a critical domain that is NOT_EVALUABLE can never
produce PUBLICATION_READY = TRUE:
SCIENTIFIC PASS
STATISTICAL NOT_EVALUABLE
CLAIM_EVIDENCE NOT_EVALUABLE
PANEL_ARCHITECTURE PASS
GLOBAL_COHERENCE PASS
VISUAL PASS
COLOR PASS
DELIVERY PASS
FIGURE_INTEGRITY PASS_WITH_LIMITED_EVIDENCE
PUBLICATION_PACKAGE PASS
PUBLICATION_READY FALSE
NEXT_ACTION HUMAN_REVIEW_REQUIRED
Fully-evidenced delivery:
SCIENTIFIC PASS
STATISTICAL PASS
CLAIM_EVIDENCE PASS
PANEL_ARCHITECTURE PASS
GLOBAL_COHERENCE PASS
VISUAL PASS
COLOR PASS
DELIVERY PASS
FIGURE_INTEGRITY PASS
PUBLICATION_PACKAGE PASS
PUBLICATION_READY TRUE
NEXT_ACTION NONE
INPUT: a scientific figure + available supporting evidence
OUTPUT: an independent, auditable figure review
1. What materials are supplied? (Input Audit)
2. Is the figure scientifically sound? (Scientific Integrity)
3. Do the statistics match the design? (Statistical Consistency)
4. Does the figure support the claim? (Claim–Evidence)
5. Is every panel necessary? (Panel Architecture)
6. Did a local fix break the figure? (Global Coherence)
7. Is the visual presentation sound? (Visual Integrity + Color System)
8. Are Source Data & delivery complete?(Delivery & Reproducibility)
9. Is it ready for the manuscript? (Publication Readiness Gate, fail-closed)
Every finding carries a severity (BLOCKER / MAJOR / MINOR / INFO) and a repair recommendation with an upstream owner (STATISTICS / ANALYSIS / FIGURE_GENERATOR / MANUSCRIPT / DELIVERY / MANUAL_REVIEW). Potato Figure Audit never auto-modifies your data or silently redraws your figure.
PUBLICATION_READY is computed exactly once per run by
compute_publication_ready() (single computation point, fail-closed) and the
same value is written to the report, the JSON, the terminal summary, and the
exit code. Any critical domain
(SCIENTIFIC / STATISTICAL / CLAIM_EVIDENCE / PANEL_ARCHITECTURE / VISUAL /
COLOR / GLOBAL_COHERENCE / DELIVERY) in NOT_EVALUABLE blocks readiness.
v0.4.3-alpha — Fail-closed readiness enforcement, R6.1 machine contract, freshness binding.
- Readiness is fail-closed and computed once (
compute_publication_ready()); report / JSON / terminal / exit code share the same result. - R6.1 tiered machine contract in
figure_audit.json:contract_version,figure_integrity.status,publication_package.status,publication_ready,repair_routes.NEXT_ACTION,domain_status,audited_artifacts. The legacy flatverdictfield is retained for backward compatibility only; orchestrators must consume the tiered contract. audited_artifactsSHA-256 binding: every audited input file is hashed; consumers can detect tampered/changed inputs and treat stale audits as non-consumable (AUDIT_STALE).- JSON serialization hardened: full escaping of backslashes, quotes, control characters and non-ASCII (jsonlite primary, fully-escaping pure-R fallback).
- Exit code contract:
0/2/3/4as documented above. - Regression (release validation, single source
validation/latest_validation.json): R1 16/16, R4 4/4, audit core 10/10, color system 14/14, R6 gate semantics 24/24, R6 real-figure 19/19, warning semantics 16/16, raster security 7/7, main entry 34/34, visual correction 10/10, binding & serializer 23/23, packaging validator PASS.
scripts/
audit_figure.R # main audit entry
run_release_validation.R # release evidence runner (single source of truth)
generate_validation_report.R# renders TEST_MATRIX.tsv / RUNTIME_VALIDATION_REPORT.md
validate_skill_package.py # static packaging validator
lib/audit_core.R # severity system, inventory, report render, JSON contract
lib/sha256.R # SHA-256 (digest/openssl fast path, pure-R fallback)
lib/global_coherence_core.R # R4 global coherence (preserved)
lib/scientific_audit_core.R # R4 scientific audit (preserved)
lib/delivery_qa_core.R # R4 delivery QA (preserved)
lib/color_system_core.R / lib/color_integration.R
lib/qa_common.R
tests/
run_tests.R # R1 regression (16 fixtures)
run_r4_tests.R # R4 regression (4 fixtures)
run_audit_tests.R # v0.3 audit tests (10 fixtures)
run_binding_serializer_tests.R # sha256/serializer/binding adversarial tests
generate_audit_fixtures.R
validation/
latest_validation.json # single machine source of release evidence
TEST_MATRIX.tsv / RUNTIME_VALIDATION_REPORT.md (auto-generated)
schemas/
figure_manifest.example.tsv / figure_contract.example.yaml
global_figure_state.example.yaml / local_change_log.example.tsv
impact_dependency_map.tsv / global_coherence_qa_template.tsv
references/ (audit + legacy)
profiles/ (potato-user-v1 + a4/high-impact/journal)
themes/ (legacy optional rendering helpers)
MIT — see LICENSE.