Skip to main content

Analytical preflight for omegaprompt calibration: deterministic classifier over seven calibration trap patterns (self-agreement bias, small-sample KC-4 power, variant homogeneity, rubric concentration, judge budget, empty reference, missing held-out slice). Emits AnalyticalFinding records the omegaprompt pipeline consumes via derive_adaptation_plan.

Project description

mini-antemortem-cli

Analytical preflight for omegaprompt calibration. Reads run config, classifies seven calibration-specific trap patterns against deterministic rules. No API calls, no network — reasoning is deterministic given inputs. Emits AnalyticalFinding records that feed omegaprompt's derive_adaptation_plan.

CI PyPI License: Apache 2.0 Python Tests Parent

Part of the omegaprompt toolkitomegaprompt (calibration engine) · omega-lock (audit framework) · antemortem-cli (pre-implementation recon CLI) · mini-omega-lock (empirical preflight) · mini-antemortem-cli (analytical preflight, this repo) · Antemortem (methodology). Cross-toolkit cookbook: AGENT_TRIGGERS.md.

pip install omegaprompt mini-antemortem-cli

MCP server. This package also exposes its analytical classifier as agent-callable MCP tools (analytical_preflight, list_traps). Run pip install "mini-antemortem-cli[mcp]" then python -m mini_antemortem_cli.mcp (stdio, default for Claude Code). Deterministic, zero LLM cost. See AGENT_TRIGGERS.md scenario 2.


TL;DR

omegaprompt ships a plugin interface for preflight (omegaprompt.preflight.contracts + omegaprompt.preflight.adaptation) but no classifier code. This package fills that gap with seven deterministic trap classifiers — fully offline, fully reproducible:

  • self_agreement_bias — target and judge share a vendor; judge biases overlap with target.
  • small_sample_kc4_power — dataset too small for Pearson correlation to carry statistical power.
  • variants_homogeneous — system-prompt variants too similar for sensitivity to have signal.
  • rubric_weight_concentration — single rubric dimension carries most of the weight.
  • judge_budget_too_small — judge output budget is SMALL but rubric has many dimensions + gates.
  • empty_reference_with_strict_rubric — no dataset item has a reference; rubric implies ground-truth comparison.
  • no_held_out_slice — no --test slice; walk-forward cannot run.

Each pattern returns REAL / GHOST / NEW / UNRESOLVED with a severity (blocker / high / medium / low) and a remediation hint.

Looking for the empirical (LLM-probe) preflight? See sibling tool mini-omega-lock — same plugin interface, runs actual provider calls instead of static analysis.


Quick start (1-minute, fully offline)

from omegaprompt.domain.dataset import Dataset, DatasetItem
from omegaprompt.domain.judge import Dimension, HardGate, JudgeRubric
from omegaprompt.domain.params import PromptVariants
from omegaprompt.preflight import PreflightReport, derive_adaptation_plan
from mini_antemortem_cli import analytical_preflight

# Your run config
rubric = JudgeRubric(
    dimensions=[Dimension(name="accuracy", description="x", weight=1.0)],
    hard_gates=[HardGate(name="no_violation", description="y", evaluator="judge")],
)
train = Dataset(items=[DatasetItem(id="ex1", input="2+2", reference="4")])
test  = Dataset(items=[DatasetItem(id="ex2", input="3+3", reference="6")])
variants = PromptVariants(system_prompts=["You are an assistant."], few_shot_examples=[])

# Run all seven trap classifiers — fully offline, fully deterministic.
# (Every keyword is required — analytical_preflight does not infer
# target_provider / judge_provider from the dataset.)
findings = analytical_preflight(
    target_provider="anthropic",
    target_model="claude-opus-4-7",
    judge_provider="openai",
    judge_model="gpt-4.1",
    train_dataset=train,
    test_dataset=test,                  # optional but strongly recommended
    rubric=rubric,
    variants=variants,
    judge_output_budget="small",        # "small" | "medium" | "large"
)

for f in findings:
    print(f"{f.trap_id}: {f.label} / {f.severity}")

# Feed into omegaprompt's adaptation layer
report = PreflightReport(analytical_findings=findings)
plan = derive_adaptation_plan(report)
print(plan.recommendations)

No API keys, no network, no LLM calls — output is fully reproducible given inputs.

👋 Simpler intro: EASY_README.md (English) · EASY_README_KR.md


Why this is separate from omegaprompt

omegaprompt ships a plugin interface (omegaprompt.preflight.contracts + omegaprompt.preflight.adaptation) but no classifier code. Standalone users do not need analytical preflight — the main pipeline runs with declared defaults. Users who want analytical risk assessment over their configuration install this package alongside:

pip install omegaprompt mini-antemortem-cli

Trap patterns

Seven deterministic classifications run against the run config:

Trap id Hypothesis
self_agreement_bias Target and judge share a vendor; judge's biases overlap with target.
small_sample_kc4_power Dataset too small for Pearson correlation to carry statistical power.
variants_homogeneous System-prompt variants are too similar for sensitivity to have signal.
rubric_weight_concentration A single rubric dimension carries most of the weight.
judge_budget_too_small Judge output budget is SMALL but rubric has many dimensions + gates.
empty_reference_with_strict_rubric No dataset item has a reference; rubric implies ground-truth comparison.
no_held_out_slice No --test slice; walk-forward cannot run.

Each pattern returns one of REAL / GHOST / NEW / UNRESOLVED with a severity (blocker / high / medium / low) and a remediation hint.

Usage

from omegaprompt.domain.dataset import Dataset, DatasetItem
from omegaprompt.domain.judge import Dimension, HardGate, JudgeRubric
from omegaprompt.domain.params import PromptVariants
from omegaprompt.preflight import PreflightReport, derive_adaptation_plan
from mini_antemortem_cli import analytical_preflight

rubric = JudgeRubric(
    dimensions=[
        Dimension(name="accuracy", description="correct", weight=0.85),
        Dimension(name="clarity",  description="readable", weight=0.15),
    ],
    hard_gates=[HardGate(name="no_refusal", description="x", evaluator="judge")],
)
variants = PromptVariants(system_prompts=["You are an assistant."], few_shot_examples=[])
train = Dataset(items=[DatasetItem(id=f"t{i}", input=f"task {i}") for i in range(5)])
test = Dataset(items=[DatasetItem(id=f"v{i}", input=f"val {i}") for i in range(3)])

findings = analytical_preflight(
    target_provider="openai",
    target_model="gpt-4o-mini",
    judge_provider="openai",
    judge_model="gpt-4o-mini",
    train_dataset=train,
    test_dataset=test,
    rubric=rubric,
    variants=variants,
    judge_output_budget="small",
)

report = PreflightReport(analytical_findings=findings)
plan = derive_adaptation_plan(report=report)
# plan.skip_axes, plan.max_gap_override, etc.

Design principles

  • Deterministic. Same config in, same findings out. No LLM calls; no sampling noise.
  • Source-level citations. Each finding carries a note describing the rule that fired and a remediation hint. No hand-wave.
  • Severity discipline. high severity findings drive AdaptationPlan overrides that only strengthen the discipline (per apply_adaptation_plan invariants).
  • Extensible. Add your own TrapPattern and classifier function; compose with the built-in seven.

Validation

Every trap pattern has positive + negative test cases. No API calls, fully offline. Run with pytest -q.

Relation to the family

  • Antemortem / antemortem-cli — pre-implementation reconnaissance discipline for code changes. The naming "mini-antemortem-cli" echoes this family; the enumerate-then-classify pattern comes from there.
  • omegaprompt — prompt calibration engine. This package feeds its preflight plugin interface.
  • mini-omega-lock — empirical sibling. Runs live probes to measure judge consistency and endpoint reliability.

License

Apache 2.0. See LICENSE.

License history. PyPI distributions of version 0.1.0 were shipped with an MIT LICENSE file. The repository was relicensed to Apache 2.0 on 2026-04-22 (commit d2d7eb7); 0.2.0 (2026-04-28) and all later versions ship under Apache 2.0. Anyone who installed 0.1.0 holds an MIT license to that copy — license changes do not apply retroactively.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mini_antemortem_cli-0.4.0.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mini_antemortem_cli-0.4.0-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file mini_antemortem_cli-0.4.0.tar.gz.

File metadata

  • Download URL: mini_antemortem_cli-0.4.0.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for mini_antemortem_cli-0.4.0.tar.gz
Algorithm Hash digest
SHA256 8833f6dd8c4bbaf2724d99c5fa2d8be6cf9e8db6afce11e2d42709c82976509a
MD5 3b80eed748f3304ca046a34f303c1c36
BLAKE2b-256 f4fcd8179fe73f4479b8a92f4e0e2f0bae3b3a9b01ff2950fddb97d42b0d0e07

See more details on using hashes here.

File details

Details for the file mini_antemortem_cli-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mini_antemortem_cli-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98ce987dc2285ed1560c2eb8382f88d1e18ec45ff8769bd6522eb66a3a6d5aa8
MD5 919ee74065e61d1f208371a0a7ad94f2
BLAKE2b-256 988f4cd1025e52a4bb6f7bfec9ebb4c189204e3f2c3e3ee08337cfdcfa83961f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page