mini-antemortem-cli 0.2.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mini_antemortem_cli-0.4.0/AUTHORS.md +42 -0
- mini_antemortem_cli-0.4.0/NOTICE +11 -0
- {mini_antemortem_cli-0.2.0 → mini_antemortem_cli-0.4.0}/PKG-INFO +81 -5
- mini_antemortem_cli-0.4.0/PRE_EXISTING_IP.md +109 -0
- mini_antemortem_cli-0.4.0/README.md +170 -0
- {mini_antemortem_cli-0.2.0 → mini_antemortem_cli-0.4.0}/pyproject.toml +71 -63
- {mini_antemortem_cli-0.2.0 → mini_antemortem_cli-0.4.0}/src/mini_antemortem_cli/__init__.py +5 -1
- mini_antemortem_cli-0.4.0/src/mini_antemortem_cli/cli.py +280 -0
- mini_antemortem_cli-0.4.0/src/mini_antemortem_cli/mcp/__init__.py +25 -0
- mini_antemortem_cli-0.4.0/src/mini_antemortem_cli/mcp/__main__.py +33 -0
- mini_antemortem_cli-0.4.0/src/mini_antemortem_cli/mcp/server.py +211 -0
- mini_antemortem_cli-0.4.0/src/mini_antemortem_cli/traps.py +890 -0
- mini_antemortem_cli-0.2.0/NOTICE +0 -6
- mini_antemortem_cli-0.2.0/README.md +0 -97
- mini_antemortem_cli-0.2.0/src/mini_antemortem_cli/traps.py +0 -356
- {mini_antemortem_cli-0.2.0 → mini_antemortem_cli-0.4.0}/.gitignore +0 -0
- {mini_antemortem_cli-0.2.0 → mini_antemortem_cli-0.4.0}/LICENSE +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Authors
|
|
2
|
+
|
|
3
|
+
This project was conceived, designed, and authored by:
|
|
4
|
+
|
|
5
|
+
**Primary Author**: Kyunghoon Gwak (곽경훈) *(see [PRE_EXISTING_IP.md](PRE_EXISTING_IP.md) for full IP binding)*
|
|
6
|
+
**GitHub Handle**: [@hibou04-ops](https://github.com/hibou04-ops)
|
|
7
|
+
**Primary Email**: `hibouaile04@gmail.com` — Primary, Verified, Connected to Google on the GitHub account. **The Primary Author's only verified personal email.**
|
|
8
|
+
|
|
9
|
+
> **Note on commit-author email misconfiguration.** Some commits in the git history before 2026-04-29 carry `hibou04@gmail.com` in the *email* field of the author. This was an unintended local git client misconfiguration on the Primary Author's machine; `hibou04@gmail.com` is **not** an email account belonging to the Primary Author. That address was added to the Primary Author's GitHub account by mistake at some point, was never verified, and was removed on 2026-04-29. The author *name* on every commit is `Hibou04-ops`, the Primary Author's GitHub handle, which is the unambiguous identifier across the repository's history. From 2026-04-29 onwards every repository in this toolkit has its local git configuration set to `hibouaile04@gmail.com`, so all subsequent commits carry the verified primary email. All work in this repository is the Primary Author's regardless of the email value recorded in any specific commit.
|
|
10
|
+
|
|
11
|
+
The GitHub handle [@hibou04-ops](https://github.com/hibou04-ops) is operated by the Primary Author throughout.
|
|
12
|
+
|
|
13
|
+
## Authorship Scope
|
|
14
|
+
|
|
15
|
+
The following work in this repository is the personal intellectual property of
|
|
16
|
+
the Primary Author, developed independently using personal time, equipment, and
|
|
17
|
+
resources:
|
|
18
|
+
|
|
19
|
+
- The mini-antemortem-cli analytical preflight classifier — deterministic
|
|
20
|
+
rule-based classification of seven calibration trap patterns
|
|
21
|
+
(self-agreement bias, small-sample KC-4 power, variant homogeneity,
|
|
22
|
+
rubric concentration, judge budget, empty reference, missing held-out slice)
|
|
23
|
+
- All source code under `src/mini_antemortem_cli/`
|
|
24
|
+
- Test suite under `tests/`
|
|
25
|
+
- Documentation (README, EASY_README, EASY_README_KR)
|
|
26
|
+
- Adapter plumbing mapping classifier outputs to omegaprompt's `AnalyticalFinding` contract
|
|
27
|
+
|
|
28
|
+
This project is a sub-tool of the [omegaprompt](https://github.com/hibou04-ops/omegaprompt)
|
|
29
|
+
calibration framework, authored by the same Primary Author, and applies the
|
|
30
|
+
[Antemortem](https://github.com/hibou04-ops/Antemortem) methodology authored by
|
|
31
|
+
the same Primary Author. See [PRE_EXISTING_IP.md](PRE_EXISTING_IP.md) for the
|
|
32
|
+
full toolkit binding.
|
|
33
|
+
|
|
34
|
+
## Contributors
|
|
35
|
+
|
|
36
|
+
External contributions are accepted under the terms of the Apache License 2.0.
|
|
37
|
+
Contributors retain copyright in their own contributions and grant the project
|
|
38
|
+
a license under Apache 2.0 §5.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
See [LICENSE](LICENSE), [NOTICE](NOTICE), and [PRE_EXISTING_IP.md](PRE_EXISTING_IP.md).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
mini-antemortem-cli
|
|
2
|
+
Copyright 2026 Kyunghoon Gwak (곽경훈)
|
|
3
|
+
|
|
4
|
+
This product includes software developed by Kyunghoon Gwak (곽경훈),
|
|
5
|
+
operating under the GitHub handle @hibou04-ops.
|
|
6
|
+
|
|
7
|
+
For author binding and pre-existing IP declaration, see AUTHORS.md and
|
|
8
|
+
PRE_EXISTING_IP.md in this repository.
|
|
9
|
+
|
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
see LICENSE file for the full license text.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mini-antemortem-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: 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.
|
|
5
5
|
Project-URL: Homepage, https://github.com/hibou04-ops/mini-antemortem-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/hibou04-ops/mini-antemortem-cli
|
|
@@ -208,6 +208,7 @@ License: Apache License
|
|
|
208
208
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
209
209
|
See the License for the specific language governing permissions and
|
|
210
210
|
limitations under the License.
|
|
211
|
+
License-File: AUTHORS.md
|
|
211
212
|
License-File: LICENSE
|
|
212
213
|
License-File: NOTICE
|
|
213
214
|
Keywords: analytical-audit,antemortem,omega-lock,omegaprompt,preflight,prompt-calibration
|
|
@@ -224,22 +225,97 @@ Requires-Dist: omegaprompt>=1.1.0
|
|
|
224
225
|
Requires-Dist: pydantic>=2.6.0
|
|
225
226
|
Provides-Extra: dev
|
|
226
227
|
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
228
|
+
Provides-Extra: mcp
|
|
229
|
+
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
|
|
227
230
|
Description-Content-Type: text/markdown
|
|
228
231
|
|
|
229
232
|
# mini-antemortem-cli
|
|
230
233
|
|
|
231
|
-
> **
|
|
234
|
+
> **Analytical preflight for [omegaprompt](https://pypi.org/project/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`.
|
|
232
235
|
|
|
236
|
+
[](https://github.com/hibou04-ops/mini-antemortem-cli/actions/workflows/ci.yml)
|
|
237
|
+
[](https://pypi.org/project/mini-antemortem-cli/)
|
|
233
238
|
[](LICENSE)
|
|
234
239
|
[](https://www.python.org)
|
|
235
|
-
[](tests/)
|
|
241
|
+
[](https://pypi.org/project/omegaprompt/)
|
|
236
242
|
|
|
237
|
-
> **
|
|
243
|
+
> **Part of the omegaprompt toolkit** — [omegaprompt](https://github.com/hibou04-ops/omegaprompt) (calibration engine) · [omega-lock](https://github.com/hibou04-ops/omega-lock) (audit framework) · [antemortem-cli](https://github.com/hibou04-ops/antemortem-cli) (pre-implementation recon CLI) · [mini-omega-lock](https://github.com/hibou04-ops/mini-omega-lock) (empirical preflight) · [mini-antemortem-cli](https://github.com/hibou04-ops/mini-antemortem-cli) (analytical preflight, this repo) · [Antemortem](https://github.com/hibou04-ops/Antemortem) (methodology). Cross-toolkit cookbook: [AGENT_TRIGGERS.md](https://github.com/hibou04-ops/omegaprompt/blob/main/AGENT_TRIGGERS.md).
|
|
238
244
|
|
|
239
245
|
```bash
|
|
240
|
-
pip install mini-antemortem-cli
|
|
246
|
+
pip install omegaprompt mini-antemortem-cli
|
|
241
247
|
```
|
|
242
248
|
|
|
249
|
+
**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](https://github.com/hibou04-ops/omegaprompt/blob/main/AGENT_TRIGGERS.md#scenario-2--pre-calibration-sanity-check).
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## TL;DR
|
|
254
|
+
|
|
255
|
+
`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:
|
|
256
|
+
|
|
257
|
+
- **`self_agreement_bias`** — target and judge share a vendor; judge biases overlap with target.
|
|
258
|
+
- **`small_sample_kc4_power`** — dataset too small for Pearson correlation to carry statistical power.
|
|
259
|
+
- **`variants_homogeneous`** — system-prompt variants too similar for sensitivity to have signal.
|
|
260
|
+
- **`rubric_weight_concentration`** — single rubric dimension carries most of the weight.
|
|
261
|
+
- **`judge_budget_too_small`** — judge output budget is SMALL but rubric has many dimensions + gates.
|
|
262
|
+
- **`empty_reference_with_strict_rubric`** — no dataset item has a reference; rubric implies ground-truth comparison.
|
|
263
|
+
- **`no_held_out_slice`** — no `--test` slice; walk-forward cannot run.
|
|
264
|
+
|
|
265
|
+
Each pattern returns `REAL` / `GHOST` / `NEW` / `UNRESOLVED` with a severity (`blocker` / `high` / `medium` / `low`) and a remediation hint.
|
|
266
|
+
|
|
267
|
+
> **Looking for the empirical (LLM-probe) preflight?** See sibling tool [`mini-omega-lock`](https://pypi.org/project/mini-omega-lock/) — same plugin interface, runs actual provider calls instead of static analysis.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Quick start (1-minute, fully offline)
|
|
272
|
+
|
|
273
|
+
```python
|
|
274
|
+
from omegaprompt.domain.dataset import Dataset, DatasetItem
|
|
275
|
+
from omegaprompt.domain.judge import Dimension, HardGate, JudgeRubric
|
|
276
|
+
from omegaprompt.domain.params import PromptVariants
|
|
277
|
+
from omegaprompt.preflight import PreflightReport, derive_adaptation_plan
|
|
278
|
+
from mini_antemortem_cli import analytical_preflight
|
|
279
|
+
|
|
280
|
+
# Your run config
|
|
281
|
+
rubric = JudgeRubric(
|
|
282
|
+
dimensions=[Dimension(name="accuracy", description="x", weight=1.0)],
|
|
283
|
+
hard_gates=[HardGate(name="no_violation", description="y", evaluator="judge")],
|
|
284
|
+
)
|
|
285
|
+
train = Dataset(items=[DatasetItem(id="ex1", input="2+2", reference="4")])
|
|
286
|
+
test = Dataset(items=[DatasetItem(id="ex2", input="3+3", reference="6")])
|
|
287
|
+
variants = PromptVariants(system_prompts=["You are an assistant."], few_shot_examples=[])
|
|
288
|
+
|
|
289
|
+
# Run all seven trap classifiers — fully offline, fully deterministic.
|
|
290
|
+
# (Every keyword is required — analytical_preflight does not infer
|
|
291
|
+
# target_provider / judge_provider from the dataset.)
|
|
292
|
+
findings = analytical_preflight(
|
|
293
|
+
target_provider="anthropic",
|
|
294
|
+
target_model="claude-opus-4-7",
|
|
295
|
+
judge_provider="openai",
|
|
296
|
+
judge_model="gpt-4.1",
|
|
297
|
+
train_dataset=train,
|
|
298
|
+
test_dataset=test, # optional but strongly recommended
|
|
299
|
+
rubric=rubric,
|
|
300
|
+
variants=variants,
|
|
301
|
+
judge_output_budget="small", # "small" | "medium" | "large"
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
for f in findings:
|
|
305
|
+
print(f"{f.trap_id}: {f.label} / {f.severity}")
|
|
306
|
+
|
|
307
|
+
# Feed into omegaprompt's adaptation layer
|
|
308
|
+
report = PreflightReport(analytical_findings=findings)
|
|
309
|
+
plan = derive_adaptation_plan(report)
|
|
310
|
+
print(plan.recommendations)
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
No API keys, no network, no LLM calls — output is fully reproducible given inputs.
|
|
314
|
+
|
|
315
|
+
> 👋 Simpler intro: [EASY_README.md](EASY_README.md) (English) · [EASY_README_KR.md](EASY_README_KR.md)
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
243
319
|
## Why this is separate from omegaprompt
|
|
244
320
|
|
|
245
321
|
`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:
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Pre-existing Intellectual Property Declaration
|
|
2
|
+
|
|
3
|
+
> **Purpose**: This document is a tamper-evident timestamped declaration that the
|
|
4
|
+
> work in this repository constitutes pre-existing personal intellectual property
|
|
5
|
+
> of the Primary Author, authored prior to and independent of any current or
|
|
6
|
+
> future employment relationship.
|
|
7
|
+
|
|
8
|
+
## Repository Identification
|
|
9
|
+
|
|
10
|
+
- **Repository**: [hibou04-ops/mini-antemortem-cli](https://github.com/hibou04-ops/mini-antemortem-cli)
|
|
11
|
+
- **License**: Apache License 2.0
|
|
12
|
+
- **Primary Author**: **Kyunghoon Gwak (곽경훈)** — operating as [@hibou04-ops](https://github.com/hibou04-ops)
|
|
13
|
+
- Primary email: `hibouaile04@gmail.com` (verified, primary on the GitHub account; the Primary Author's only personal email)
|
|
14
|
+
- Note: some commits in the git history before 2026-04-29 carry `hibou04@gmail.com` in the author email field. That address is **not** an account belonging to the Primary Author — it was an unintended local git client misconfiguration. The author *name* `Hibou04-ops` is the unambiguous identifier across the entire history. From 2026-04-29 onwards every repository in this toolkit is configured to commit under `hibouaile04@gmail.com`.
|
|
15
|
+
|
|
16
|
+
## Authorship Timeline (Tamper-Evident)
|
|
17
|
+
|
|
18
|
+
The following git artifacts establish the authorship timeline. The git commit graph
|
|
19
|
+
and the public GitHub remote (`github.com/hibou04-ops/mini-antemortem-cli`) provide
|
|
20
|
+
independent timestamp witnesses.
|
|
21
|
+
|
|
22
|
+
| Anchor | Commit Hash | Date (KST) | Description |
|
|
23
|
+
|---|---|---|---|
|
|
24
|
+
| First commit | `032d0a1` | 2026-04-22 | feat: initial release v0.1.0 — analytical preflight for omegaprompt |
|
|
25
|
+
| Apache 2.0 relicense | `d2d7eb7` | 2026-04-22 | MIT → Apache 2.0 for patent grant + trademark preservation |
|
|
26
|
+
| 0.2.0 release | `e72935e` | 2026-04-28 | License MIT->Apache 2.0 PyPI distribution alignment |
|
|
27
|
+
| Pre-employment snapshot | (tagged on commit) | 2026-04-29 | This declaration committed; tagged `pre-employment-ip-snapshot-2026-04-29` |
|
|
28
|
+
|
|
29
|
+
## Scope of Pre-existing IP
|
|
30
|
+
|
|
31
|
+
The following work product is declared as pre-existing personal intellectual property:
|
|
32
|
+
|
|
33
|
+
1. **Analytical Preflight Classifier**: A deterministic rule-based classifier
|
|
34
|
+
over seven calibration trap patterns:
|
|
35
|
+
- Self-agreement bias (target and judge from the same vendor)
|
|
36
|
+
- Small-sample KC-4 power
|
|
37
|
+
- Variant homogeneity
|
|
38
|
+
- Rubric concentration (single-dimension dominance)
|
|
39
|
+
- Judge budget (insufficient max_tokens for grading)
|
|
40
|
+
- Empty reference (held-out items missing reference outputs)
|
|
41
|
+
- Missing held-out slice (no walk-forward dataset)
|
|
42
|
+
2. **Adapter Plumbing**: All code under `src/mini_antemortem_cli/` mapping
|
|
43
|
+
classifier outputs to omegaprompt's `AnalyticalFinding` contract.
|
|
44
|
+
3. **Test Suite**: All materials under `tests/`.
|
|
45
|
+
4. **Documentation**: README, EASY_README, EASY_README_KR, NOTICE.
|
|
46
|
+
5. **Specific Terminology and Application**: The compound term "mini-antemortem-cli"
|
|
47
|
+
as a sub-tool name within the omegaprompt toolkit, applying the Antemortem
|
|
48
|
+
methodology authored by the same Primary Author in the companion repository.
|
|
49
|
+
*No claim is made to the generic word "antemortem" in isolation; the claim
|
|
50
|
+
is to the specific compound and its application within this corpus.*
|
|
51
|
+
|
|
52
|
+
## Companion Repositories
|
|
53
|
+
|
|
54
|
+
This repository is part of a multi-repo IP defense package authored by the same
|
|
55
|
+
Primary Author:
|
|
56
|
+
|
|
57
|
+
- [omegaprompt](https://github.com/hibou04-ops/omegaprompt) — parent calibration framework
|
|
58
|
+
- [omega-lock](https://github.com/hibou04-ops/omega-lock) — sensitivity-driven coordinate descent calibration framework
|
|
59
|
+
- [Antemortem](https://github.com/hibou04-ops/Antemortem) — pre-implementation reconnaissance methodology
|
|
60
|
+
- [antemortem-cli](https://github.com/hibou04-ops/antemortem-cli) — CLI for the Antemortem methodology
|
|
61
|
+
- [mini-omega-lock](https://github.com/hibou04-ops/mini-omega-lock) — empirical sibling preflight tool
|
|
62
|
+
|
|
63
|
+
See each repository's `PRE_EXISTING_IP.md` for its own authorship binding.
|
|
64
|
+
|
|
65
|
+
## Development Conditions
|
|
66
|
+
|
|
67
|
+
This work was developed:
|
|
68
|
+
|
|
69
|
+
- Using **personal time** (outside of any third-party working hours)
|
|
70
|
+
- Using **personal equipment** (no employer-issued hardware)
|
|
71
|
+
- Using **personal accounts** (no employer-issued cloud, LLM, or API credentials)
|
|
72
|
+
- **Without reference** to any third party's confidential or proprietary information
|
|
73
|
+
|
|
74
|
+
## Use in Future Employment Agreements
|
|
75
|
+
|
|
76
|
+
This declaration is intended to be attached as a Schedule / Exhibit (commonly
|
|
77
|
+
"Schedule A: Pre-existing IP") to any future employment, contractor, or
|
|
78
|
+
consulting agreement, to clarify that:
|
|
79
|
+
|
|
80
|
+
- The work in this repository remains the personal property of the Primary Author.
|
|
81
|
+
- Future development on this codebase, conducted on personal time and outside the
|
|
82
|
+
scope of any employment, continues to be the Primary Author's personal IP.
|
|
83
|
+
- Any contributions from a future employer's domain, made on employer time using
|
|
84
|
+
employer resources, would be governed by the relevant employment agreement —
|
|
85
|
+
the boundary is preserved by maintaining a separate repository, fork, or
|
|
86
|
+
branch for any such employer-domain contributions.
|
|
87
|
+
|
|
88
|
+
## Verification
|
|
89
|
+
|
|
90
|
+
To independently verify this declaration:
|
|
91
|
+
|
|
92
|
+
1. Inspect git log:
|
|
93
|
+
```
|
|
94
|
+
git log --format="%H | %ai | %an <%ae>" | grep "Hibou04-ops"
|
|
95
|
+
```
|
|
96
|
+
2. Confirm tag (when committed):
|
|
97
|
+
```
|
|
98
|
+
git tag -l "pre-employment-ip-snapshot-*"
|
|
99
|
+
git show pre-employment-ip-snapshot-2026-04-29
|
|
100
|
+
```
|
|
101
|
+
3. Cross-reference with public GitHub timestamps:
|
|
102
|
+
- https://github.com/hibou04-ops/mini-antemortem-cli/commit/032d0a1
|
|
103
|
+
- https://github.com/hibou04-ops/mini-antemortem-cli/releases
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
**Declaration date**: 2026-04-29
|
|
108
|
+
**License**: Apache License 2.0
|
|
109
|
+
**Document version**: 1.0
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# mini-antemortem-cli
|
|
2
|
+
|
|
3
|
+
> **Analytical preflight for [omegaprompt](https://pypi.org/project/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`.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/hibou04-ops/mini-antemortem-cli/actions/workflows/ci.yml)
|
|
6
|
+
[](https://pypi.org/project/mini-antemortem-cli/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](https://www.python.org)
|
|
9
|
+
[](tests/)
|
|
10
|
+
[](https://pypi.org/project/omegaprompt/)
|
|
11
|
+
|
|
12
|
+
> **Part of the omegaprompt toolkit** — [omegaprompt](https://github.com/hibou04-ops/omegaprompt) (calibration engine) · [omega-lock](https://github.com/hibou04-ops/omega-lock) (audit framework) · [antemortem-cli](https://github.com/hibou04-ops/antemortem-cli) (pre-implementation recon CLI) · [mini-omega-lock](https://github.com/hibou04-ops/mini-omega-lock) (empirical preflight) · [mini-antemortem-cli](https://github.com/hibou04-ops/mini-antemortem-cli) (analytical preflight, this repo) · [Antemortem](https://github.com/hibou04-ops/Antemortem) (methodology). Cross-toolkit cookbook: [AGENT_TRIGGERS.md](https://github.com/hibou04-ops/omegaprompt/blob/main/AGENT_TRIGGERS.md).
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install omegaprompt mini-antemortem-cli
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**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](https://github.com/hibou04-ops/omegaprompt/blob/main/AGENT_TRIGGERS.md#scenario-2--pre-calibration-sanity-check).
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## TL;DR
|
|
23
|
+
|
|
24
|
+
`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:
|
|
25
|
+
|
|
26
|
+
- **`self_agreement_bias`** — target and judge share a vendor; judge biases overlap with target.
|
|
27
|
+
- **`small_sample_kc4_power`** — dataset too small for Pearson correlation to carry statistical power.
|
|
28
|
+
- **`variants_homogeneous`** — system-prompt variants too similar for sensitivity to have signal.
|
|
29
|
+
- **`rubric_weight_concentration`** — single rubric dimension carries most of the weight.
|
|
30
|
+
- **`judge_budget_too_small`** — judge output budget is SMALL but rubric has many dimensions + gates.
|
|
31
|
+
- **`empty_reference_with_strict_rubric`** — no dataset item has a reference; rubric implies ground-truth comparison.
|
|
32
|
+
- **`no_held_out_slice`** — no `--test` slice; walk-forward cannot run.
|
|
33
|
+
|
|
34
|
+
Each pattern returns `REAL` / `GHOST` / `NEW` / `UNRESOLVED` with a severity (`blocker` / `high` / `medium` / `low`) and a remediation hint.
|
|
35
|
+
|
|
36
|
+
> **Looking for the empirical (LLM-probe) preflight?** See sibling tool [`mini-omega-lock`](https://pypi.org/project/mini-omega-lock/) — same plugin interface, runs actual provider calls instead of static analysis.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Quick start (1-minute, fully offline)
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from omegaprompt.domain.dataset import Dataset, DatasetItem
|
|
44
|
+
from omegaprompt.domain.judge import Dimension, HardGate, JudgeRubric
|
|
45
|
+
from omegaprompt.domain.params import PromptVariants
|
|
46
|
+
from omegaprompt.preflight import PreflightReport, derive_adaptation_plan
|
|
47
|
+
from mini_antemortem_cli import analytical_preflight
|
|
48
|
+
|
|
49
|
+
# Your run config
|
|
50
|
+
rubric = JudgeRubric(
|
|
51
|
+
dimensions=[Dimension(name="accuracy", description="x", weight=1.0)],
|
|
52
|
+
hard_gates=[HardGate(name="no_violation", description="y", evaluator="judge")],
|
|
53
|
+
)
|
|
54
|
+
train = Dataset(items=[DatasetItem(id="ex1", input="2+2", reference="4")])
|
|
55
|
+
test = Dataset(items=[DatasetItem(id="ex2", input="3+3", reference="6")])
|
|
56
|
+
variants = PromptVariants(system_prompts=["You are an assistant."], few_shot_examples=[])
|
|
57
|
+
|
|
58
|
+
# Run all seven trap classifiers — fully offline, fully deterministic.
|
|
59
|
+
# (Every keyword is required — analytical_preflight does not infer
|
|
60
|
+
# target_provider / judge_provider from the dataset.)
|
|
61
|
+
findings = analytical_preflight(
|
|
62
|
+
target_provider="anthropic",
|
|
63
|
+
target_model="claude-opus-4-7",
|
|
64
|
+
judge_provider="openai",
|
|
65
|
+
judge_model="gpt-4.1",
|
|
66
|
+
train_dataset=train,
|
|
67
|
+
test_dataset=test, # optional but strongly recommended
|
|
68
|
+
rubric=rubric,
|
|
69
|
+
variants=variants,
|
|
70
|
+
judge_output_budget="small", # "small" | "medium" | "large"
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
for f in findings:
|
|
74
|
+
print(f"{f.trap_id}: {f.label} / {f.severity}")
|
|
75
|
+
|
|
76
|
+
# Feed into omegaprompt's adaptation layer
|
|
77
|
+
report = PreflightReport(analytical_findings=findings)
|
|
78
|
+
plan = derive_adaptation_plan(report)
|
|
79
|
+
print(plan.recommendations)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
No API keys, no network, no LLM calls — output is fully reproducible given inputs.
|
|
83
|
+
|
|
84
|
+
> 👋 Simpler intro: [EASY_README.md](EASY_README.md) (English) · [EASY_README_KR.md](EASY_README_KR.md)
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Why this is separate from omegaprompt
|
|
89
|
+
|
|
90
|
+
`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:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pip install omegaprompt mini-antemortem-cli
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Trap patterns
|
|
97
|
+
|
|
98
|
+
Seven deterministic classifications run against the run config:
|
|
99
|
+
|
|
100
|
+
| Trap id | Hypothesis |
|
|
101
|
+
|---|---|
|
|
102
|
+
| `self_agreement_bias` | Target and judge share a vendor; judge's biases overlap with target. |
|
|
103
|
+
| `small_sample_kc4_power` | Dataset too small for Pearson correlation to carry statistical power. |
|
|
104
|
+
| `variants_homogeneous` | System-prompt variants are too similar for sensitivity to have signal. |
|
|
105
|
+
| `rubric_weight_concentration` | A single rubric dimension carries most of the weight. |
|
|
106
|
+
| `judge_budget_too_small` | Judge output budget is SMALL but rubric has many dimensions + gates. |
|
|
107
|
+
| `empty_reference_with_strict_rubric` | No dataset item has a reference; rubric implies ground-truth comparison. |
|
|
108
|
+
| `no_held_out_slice` | No `--test` slice; walk-forward cannot run. |
|
|
109
|
+
|
|
110
|
+
Each pattern returns one of `REAL` / `GHOST` / `NEW` / `UNRESOLVED` with a severity (`blocker` / `high` / `medium` / `low`) and a remediation hint.
|
|
111
|
+
|
|
112
|
+
## Usage
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from omegaprompt.domain.dataset import Dataset, DatasetItem
|
|
116
|
+
from omegaprompt.domain.judge import Dimension, HardGate, JudgeRubric
|
|
117
|
+
from omegaprompt.domain.params import PromptVariants
|
|
118
|
+
from omegaprompt.preflight import PreflightReport, derive_adaptation_plan
|
|
119
|
+
from mini_antemortem_cli import analytical_preflight
|
|
120
|
+
|
|
121
|
+
rubric = JudgeRubric(
|
|
122
|
+
dimensions=[
|
|
123
|
+
Dimension(name="accuracy", description="correct", weight=0.85),
|
|
124
|
+
Dimension(name="clarity", description="readable", weight=0.15),
|
|
125
|
+
],
|
|
126
|
+
hard_gates=[HardGate(name="no_refusal", description="x", evaluator="judge")],
|
|
127
|
+
)
|
|
128
|
+
variants = PromptVariants(system_prompts=["You are an assistant."], few_shot_examples=[])
|
|
129
|
+
train = Dataset(items=[DatasetItem(id=f"t{i}", input=f"task {i}") for i in range(5)])
|
|
130
|
+
test = Dataset(items=[DatasetItem(id=f"v{i}", input=f"val {i}") for i in range(3)])
|
|
131
|
+
|
|
132
|
+
findings = analytical_preflight(
|
|
133
|
+
target_provider="openai",
|
|
134
|
+
target_model="gpt-4o-mini",
|
|
135
|
+
judge_provider="openai",
|
|
136
|
+
judge_model="gpt-4o-mini",
|
|
137
|
+
train_dataset=train,
|
|
138
|
+
test_dataset=test,
|
|
139
|
+
rubric=rubric,
|
|
140
|
+
variants=variants,
|
|
141
|
+
judge_output_budget="small",
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
report = PreflightReport(analytical_findings=findings)
|
|
145
|
+
plan = derive_adaptation_plan(report=report)
|
|
146
|
+
# plan.skip_axes, plan.max_gap_override, etc.
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Design principles
|
|
150
|
+
|
|
151
|
+
- **Deterministic.** Same config in, same findings out. No LLM calls; no sampling noise.
|
|
152
|
+
- **Source-level citations.** Each finding carries a `note` describing the rule that fired and a `remediation` hint. No hand-wave.
|
|
153
|
+
- **Severity discipline.** `high` severity findings drive `AdaptationPlan` overrides that *only strengthen* the discipline (per `apply_adaptation_plan` invariants).
|
|
154
|
+
- **Extensible.** Add your own `TrapPattern` and classifier function; compose with the built-in seven.
|
|
155
|
+
|
|
156
|
+
## Validation
|
|
157
|
+
|
|
158
|
+
Every trap pattern has positive + negative test cases. No API calls, fully offline. Run with `pytest -q`.
|
|
159
|
+
|
|
160
|
+
## Relation to the family
|
|
161
|
+
|
|
162
|
+
- **[Antemortem](https://github.com/hibou04-ops/Antemortem)** / **[antemortem-cli](https://pypi.org/project/antemortem/)** — pre-implementation reconnaissance discipline for code changes. The naming "mini-antemortem-cli" echoes this family; the *enumerate-then-classify* pattern comes from there.
|
|
163
|
+
- **[omegaprompt](https://pypi.org/project/omegaprompt/)** — prompt calibration engine. This package feeds its preflight plugin interface.
|
|
164
|
+
- **[mini-omega-lock](https://pypi.org/project/mini-omega-lock/)** — empirical sibling. Runs live probes to measure judge consistency and endpoint reliability.
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
Apache 2.0. See [LICENSE](LICENSE).
|
|
169
|
+
|
|
170
|
+
**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.
|
|
@@ -1,63 +1,71 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["hatchling"]
|
|
3
|
-
build-backend = "hatchling.build"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "mini-antemortem-cli"
|
|
7
|
-
version = "0.
|
|
8
|
-
description = "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."
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.11"
|
|
11
|
-
license = { file = "LICENSE" }
|
|
12
|
-
authors = [
|
|
13
|
-
{ name = "hibou04-ops" },
|
|
14
|
-
]
|
|
15
|
-
keywords = [
|
|
16
|
-
"prompt-calibration",
|
|
17
|
-
"preflight",
|
|
18
|
-
"antemortem",
|
|
19
|
-
"analytical-audit",
|
|
20
|
-
"omegaprompt",
|
|
21
|
-
"omega-lock",
|
|
22
|
-
]
|
|
23
|
-
classifiers = [
|
|
24
|
-
"Development Status :: 3 - Alpha",
|
|
25
|
-
"Intended Audience :: Developers",
|
|
26
|
-
"License :: OSI Approved :: Apache Software License",
|
|
27
|
-
"Operating System :: OS Independent",
|
|
28
|
-
"Programming Language :: Python :: 3",
|
|
29
|
-
"Programming Language :: Python :: 3.11",
|
|
30
|
-
"Programming Language :: Python :: 3.12",
|
|
31
|
-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
32
|
-
]
|
|
33
|
-
dependencies = [
|
|
34
|
-
"omegaprompt>=1.1.0",
|
|
35
|
-
"pydantic>=2.6.0",
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
[project.optional-dependencies]
|
|
39
|
-
dev = [
|
|
40
|
-
"pytest>=8.0.0",
|
|
41
|
-
]
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mini-antemortem-cli"
|
|
7
|
+
version = "0.4.0"
|
|
8
|
+
description = "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."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "hibou04-ops" },
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"prompt-calibration",
|
|
17
|
+
"preflight",
|
|
18
|
+
"antemortem",
|
|
19
|
+
"analytical-audit",
|
|
20
|
+
"omegaprompt",
|
|
21
|
+
"omega-lock",
|
|
22
|
+
]
|
|
23
|
+
classifiers = [
|
|
24
|
+
"Development Status :: 3 - Alpha",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"License :: OSI Approved :: Apache Software License",
|
|
27
|
+
"Operating System :: OS Independent",
|
|
28
|
+
"Programming Language :: Python :: 3",
|
|
29
|
+
"Programming Language :: Python :: 3.11",
|
|
30
|
+
"Programming Language :: Python :: 3.12",
|
|
31
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
32
|
+
]
|
|
33
|
+
dependencies = [
|
|
34
|
+
"omegaprompt>=1.1.0",
|
|
35
|
+
"pydantic>=2.6.0",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.optional-dependencies]
|
|
39
|
+
dev = [
|
|
40
|
+
"pytest>=8.0.0",
|
|
41
|
+
]
|
|
42
|
+
mcp = ["mcp>=1.0.0"]
|
|
43
|
+
|
|
44
|
+
[project.scripts]
|
|
45
|
+
mini-antemortem-cli = "mini_antemortem_cli.cli:main"
|
|
46
|
+
mini-antemortem-cli-mcp = "mini_antemortem_cli.mcp.__main__:main"
|
|
47
|
+
|
|
48
|
+
[project.urls]
|
|
49
|
+
Homepage = "https://github.com/hibou04-ops/mini-antemortem-cli"
|
|
50
|
+
Repository = "https://github.com/hibou04-ops/mini-antemortem-cli"
|
|
51
|
+
"Parent package" = "https://github.com/hibou04-ops/omegaprompt"
|
|
52
|
+
Issues = "https://github.com/hibou04-ops/mini-antemortem-cli/issues"
|
|
53
|
+
|
|
54
|
+
[tool.hatch.build.targets.wheel]
|
|
55
|
+
packages = ["src/mini_antemortem_cli"]
|
|
56
|
+
|
|
57
|
+
[tool.hatch.build.targets.sdist]
|
|
58
|
+
include = [
|
|
59
|
+
"src/mini_antemortem_cli",
|
|
60
|
+
"README.md",
|
|
61
|
+
"LICENSE",
|
|
62
|
+
"NOTICE",
|
|
63
|
+
"AUTHORS.md",
|
|
64
|
+
"PRE_EXISTING_IP.md",
|
|
65
|
+
"pyproject.toml",
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
[tool.pytest.ini_options]
|
|
69
|
+
testpaths = ["tests"]
|
|
70
|
+
python_files = ["test_*.py"]
|
|
71
|
+
addopts = "-ra -q"
|
|
@@ -33,16 +33,20 @@ used alone; both compose into the same ``PreflightReport``.
|
|
|
33
33
|
from mini_antemortem_cli.traps import (
|
|
34
34
|
CALIBRATION_TRAPS,
|
|
35
35
|
TrapPattern,
|
|
36
|
+
TrapPolicy,
|
|
36
37
|
analytical_preflight,
|
|
37
38
|
analytical_traps,
|
|
39
|
+
summarize_findings,
|
|
38
40
|
)
|
|
39
41
|
|
|
40
|
-
__version__ = "0.
|
|
42
|
+
__version__ = "0.4.0"
|
|
41
43
|
|
|
42
44
|
__all__ = [
|
|
43
45
|
"CALIBRATION_TRAPS",
|
|
44
46
|
"TrapPattern",
|
|
47
|
+
"TrapPolicy",
|
|
45
48
|
"analytical_preflight",
|
|
46
49
|
"analytical_traps",
|
|
50
|
+
"summarize_findings",
|
|
47
51
|
"__version__",
|
|
48
52
|
]
|