aepkit 0.6.0__py3-none-any.whl

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.
@@ -0,0 +1,223 @@
1
+ Metadata-Version: 2.4
2
+ Name: aepkit
3
+ Version: 0.6.0
4
+ Summary: Mechanical support for the Auditor/Executor protocol: scaffold, lint, and negative-control the document set for a multi-phase, multi-agent execution.
5
+ Author-email: tBeltty <jhonatan@tbelt.online>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/tBeltty/auditor-executor-protocol
8
+ Project-URL: Repository, https://github.com/tBeltty/auditor-executor-protocol
9
+ Project-URL: Issues, https://github.com/tBeltty/auditor-executor-protocol/issues
10
+ Project-URL: Changelog, https://github.com/tBeltty/auditor-executor-protocol/blob/main/CHANGELOG.md
11
+ Keywords: audit,executor,ai-agents,llm-protocols,quality-assurance,verification,compliance
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Environment :: Console
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.11
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Provides-Extra: test
28
+ Requires-Dist: pytest>=7.0; extra == "test"
29
+ Requires-Dist: pytest-cov>=4.0; extra == "test"
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest>=7.0; extra == "dev"
32
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
33
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
34
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
35
+ Requires-Dist: build>=1.0.0; extra == "dev"
36
+ Dynamic: license-file
37
+
38
+ # Auditor/Executor Protocol
39
+
40
+ [![CI](https://github.com/tBeltty/auditor-executor-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/tBeltty/auditor-executor-protocol/actions/workflows/ci.yml)
41
+ [![PyPI](https://img.shields.io/pypi/v/aepkit)](https://pypi.org/project/aepkit/)
42
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
43
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
44
+ [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff)
45
+ [![Checked with mypy](https://img.shields.io/badge/mypy-strict-blue)](https://mypy-lang.org/)
46
+ [![Zero Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen)](pyproject.toml)
47
+
48
+ A two-role protocol for running multi-phase work through AI agents without the plan drifting into open-ended discussion and without "all tests pass" masquerading as verification.
49
+
50
+ The **Auditor** defines what "done" means and proves it independently. The **Executor** implements one numbered task at a time and logs command output. Neither role crosses into the other.
51
+
52
+ [`SKILL.md`](SKILL.md) specifies the protocol core; [`references/`](references/) holds the parts an agent loads only when it reaches that step (task and gate writing, handoff templates, Autonomous mode, failure modes and a worked example). `aepkit` is a zero-dependency Python CLI that automates scaffolding, drift linting, negative controls, status tallies, and installing the skill into your agent.
53
+
54
+ ---
55
+
56
+ ## When to Reach for This
57
+
58
+ Prompting an agent, scanning a diff, and shipping when it looks right works well for exploratory scripts and prototypes.
59
+
60
+ That approach fails when late mistakes carry real costs:
61
+ * Financial calculations and balance transfers
62
+ * Authorization, tenant isolation, and permission boundaries
63
+ * Destructive database schema migrations
64
+ * Automated background workers that run without human supervision
65
+
66
+ In these environments, plausible diffs are not evidence. Two failure modes break multi-session work:
67
+
68
+ 1. **Silent Plan Drift:** Implementing agents quietly resolve ambiguities with assumptions instead of stopping to ask.
69
+ 2. **Superficial Verification:** Reports like "reviewed and looks correct" mask unexecuted checks. Suites stay green because test fixtures bypass the assertion, not because the boundary holds.
70
+
71
+ The Auditor/Executor Protocol prevents both using a strict four-document paper trail and mandatory negative controls: a security check is not verified until you watch it fail with the protection removed.
72
+
73
+ ---
74
+
75
+ ## The Two Roles
76
+
77
+ | Role | Owns | Never | Output |
78
+ |---|---|---|---|
79
+ | **Auditor** | Instructions, gates, verdicts | Writes feature code | Task expansions, verdicts, remediation orders |
80
+ | **Executor** | Implementation, terminal evidence | Redesigns architecture, expands scope | Working code, unedited terminal output |
81
+
82
+ The Auditor never takes the Executor's word for a result: it re-runs every verify command and gate itself before giving a verdict. That is what stops a pasted "tested and working" from closing a task.
83
+
84
+ One person can run this workflow alone by switching hats between two isolated agent sessions. Keep them isolated, so the Auditor is never checking its own work.
85
+
86
+ ---
87
+
88
+ ## The Four-Document Paper Trail
89
+
90
+ `aepkit init` generates the first three documents and an empty `annexes/` directory for the fourth. Keeping them separate prevents instructions from turning back into a discussion:
91
+
92
+ 1. **Plan of Record (`plan-of-record.md`):** Explains the *what* and the *why*. Opportunity framing (target outcome, problem/friction, cost of doing nothing), set-based shaping (three evaluated options or an explicit `N/A (Deterministic Fix/Compliance)` bypass), riskiest-assumption prioritization for the first phase, architecture decisions, explicit non-goals, phase roadmaps, and the deferred items ledger. Nobody implements directly from this file.
93
+ 2. **Execution Guide (`execution-guide.md`):** Explains the *how*. Numbered tasks (`P0-T1`) with target files, steps, literal verify commands, and phase gates (`P0-G1`).
94
+ 3. **Compliance Log (`compliance-log.md`):** Records evidence. Holds a status board and one report entry per task and gate ID; the template starts with `P0-T1` and `P0-G1`, and you add an entry for each task you write. The Executor pastes verbatim command output here.
95
+ 4. **Remediation Annexes (`annexes/`):** When an audit yields `CONDITIONAL` or `REJECTED`, the Auditor issues a standalone annex instead of editing tasks in flight. Rapid annex growth signals an under-planned phase.
96
+
97
+ ---
98
+
99
+ ## Quickstart
100
+
101
+ ### 1. Install `aepkit`
102
+
103
+ Requires Python 3.11+ with zero third-party dependencies:
104
+
105
+ ```bash
106
+ pipx install aepkit
107
+ ```
108
+
109
+ To run the latest `main` instead, use `pipx install git+https://github.com/tBeltty/auditor-executor-protocol`.
110
+
111
+ Or from a clone, for development:
112
+
113
+ ```bash
114
+ git clone https://github.com/tBeltty/auditor-executor-protocol.git
115
+ cd auditor-executor-protocol
116
+ pip install -e .
117
+ ```
118
+
119
+ ### 2. Install the Protocol into Your Agent
120
+
121
+ Provision `SKILL.md` and its `references/` directory into your workspace or global environment. Cursor rules hold a single file, so Cursor receives one bundled `.mdc` with the references appended:
122
+
123
+ ```bash
124
+ aepkit install-skill # auto-detects Antigravity, Claude Code, or Cursor
125
+ aepkit install-skill --agent antigravity # writes to .agents/skills/auditor-executor-protocol/
126
+ aepkit install-skill --agent claude # writes to .claude/skills/auditor-executor-protocol/
127
+ aepkit install-skill --agent cursor # writes to .cursor/rules/auditor-executor-protocol.mdc
128
+ aepkit install-skill --global # user-level install (Antigravity unless --agent is given)
129
+ aepkit install-skill --dest <path> # explicit destination; a non-SKILL.md file name gets one bundled file
130
+ ```
131
+
132
+ Auto-detection checks the target directory for `.agents/` or `.gemini/`, `.claude/`, and `.cursor/`, then agent environment variables, and falls back to Antigravity. With `--global`, the skill goes to `~/.gemini/config/skills/`, `~/.claude/skills/`, or `~/.cursor/rules/`. An existing install is skipped unless you pass `--force`.
133
+
134
+ ### 3. Scaffold a Phased Project
135
+
136
+ ```bash
137
+ aepkit init docs/<task-name> --name "<Task Name>"
138
+ ```
139
+
140
+ Creates `plan-of-record.md`, `execution-guide.md`, `compliance-log.md`, and `annexes/`. `--name` defaults to the directory name; existing documents are kept unless you pass `--force`.
141
+
142
+ ### 4. Track Status and Lint Drift
143
+
144
+ Inspect open tasks and tallied verdicts:
145
+
146
+ ```bash
147
+ aepkit status docs/<task-name>
148
+ ```
149
+
150
+ Cross-check document consistency:
151
+
152
+ ```bash
153
+ aepkit lint docs/<task-name>
154
+ ```
155
+
156
+ `aepkit lint` catches an empty guide, tasks without a report line, missing report entries, log entries with no matching task, `DONE` reports whose verify output is not pasted in a code block, gates without a stated negative control (hypothetical or waived ones do not count), work reported in a phase before every earlier phase is `APPROVED`, unfilled opportunity/shaping/non-goal fields in `plan-of-record.md` once work is reported `DONE` or audited, open rows in the deferred items ledger for a phase being closed, duplicated log paragraphs, and annex buildup past `--annex-threshold` (default 6, overall or per phase). It checks that evidence is present and in the right form, not that it is genuine; the Auditor's re-run does that.
157
+
158
+ ### 5. Run a Negative Control
159
+
160
+ When validating an authorization, tenant, or schema boundary:
161
+
162
+ ```bash
163
+ aepkit negcontrol \
164
+ --file server/middleware/auth.js \
165
+ --break-cmd "sed -i '' 's/requireAuth/\/\/requireAuth/' server/middleware/auth.js" \
166
+ --test-cmd "npm test -- auth.test.js" \
167
+ --expect "401|Unauthorized"
168
+ ```
169
+
170
+ The `sed -i ''` form above is BSD/macOS sed; on GNU/Linux use `sed -i 's/.../.../' file`.
171
+
172
+ `negcontrol` backs up the target file, applies the break mutation, confirms the test fails, restores the file with byte-level verification, confirms the test passes, and outputs a transcript ready for `compliance-log.md`. Without `--file`, pass `--restore-cmd` to undo the break yourself; with both, the backup still wins if the file is not byte-identical afterwards. `--timeout` limits each command in seconds.
173
+
174
+ A failure only proves something if it is the failure you meant. A syntax error, a missing import or a mistyped test command also makes the test exit non-zero. `--expect` takes a regular expression that the failing run's output must match, and the control fails if it does not. Without `--expect`, output that looks like a syntax, import, collection, timeout or command-not-found error is flagged with a `WARNING` next to the `OK`, and you need to read the transcript to confirm the reason.
175
+
176
+ ---
177
+
178
+ ## CLI Reference
179
+
180
+ | Command | Options | Description |
181
+ |---|---|---|
182
+ | `aepkit init <dir>` | `--name`, `--force` | Scaffold the three documents and `annexes/` from templates |
183
+ | `aepkit install-skill [dir]` | `--agent`, `--global`, `--dest`, `--force` | Provision `SKILL.md` and `references/` into Antigravity, Claude Code, or Cursor |
184
+ | `aepkit lint <dir>` | `--annex-threshold` | Cross-check IDs both ways, flag `DONE` without evidence, detect missing negative controls, and flag log rot |
185
+ | `aepkit negcontrol` | `--test-cmd` (required), `--file`, `--break-cmd`, `--restore-cmd`, `--expect`, `--timeout` | Run automated backup, break, fail, restore, and pass cycle |
186
+ | `aepkit status <dir>` | | Combine status board verdicts with reports; list everything not `APPROVED` |
187
+
188
+ `python -m aepkit` works the same as `aepkit`. Errors go to stderr.
189
+
190
+ Exit codes: `lint` and `negcontrol` return `0` when clean, `1` when they find a problem, and `2` on a usage error or missing document, so both can gate CI. `status` is informational and returns `0` whenever the compliance log exists.
191
+
192
+ `aepkit` reads and writes local Markdown files only: no external databases, daemons, or network calls. `negcontrol` runs the shell commands you pass it.
193
+
194
+ ---
195
+
196
+ ## Running Tests
197
+
198
+ Run the test suite using the standard library runner:
199
+
200
+ ```bash
201
+ python3 tests/run.py
202
+ ```
203
+
204
+ Or run with `pytest` by installing test extras:
205
+
206
+ ```bash
207
+ pip install -e ".[test]"
208
+ pytest
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Contributing
214
+
215
+ Contributions are welcome. [`CONTRIBUTING.md`](CONTRIBUTING.md) covers the development setup, the quality gates, and the PR checklist; participation follows the [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md). Report vulnerabilities privately as described in [`SECURITY.md`](SECURITY.md). Changes are listed in [`CHANGELOG.md`](CHANGELOG.md).
216
+
217
+ ## License
218
+
219
+ MIT (see [`LICENSE`](LICENSE)).
220
+
221
+ ---
222
+
223
+ Made with ♥️ by [tBelt](https://github.com/tBeltty).
@@ -0,0 +1,23 @@
1
+ aepkit/__init__.py,sha256=cID1jLnC_vj48GgMN6Yb1FA3JsQ95zNmCHmRYE8TFhY,22
2
+ aepkit/__main__.py,sha256=_wq3Lf03Y14NLlgHiwKqQb0v2VypXPnzCewUSKl04QI,87
3
+ aepkit/cli.py,sha256=84_KSQm-acfNjKbaU7keIevthzHbCHjR5lTVzyKMD9M,5032
4
+ aepkit/install_skill.py,sha256=LKXqWvH00SgJR3BRm0amwpa32XtrUvIm3_sfX_GjDUM,4216
5
+ aepkit/lint.py,sha256=BYvjfDvXYEHniNqFfeDwd9hT1OrJc2hHjUsRzyrblDM,24500
6
+ aepkit/negcontrol.py,sha256=v42L3k0vXLFdNDL-6vnPr54yHSuBVUWNkJXcwKaOXsI,9035
7
+ aepkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ aepkit/scaffold.py,sha256=T_P8OcHvAdfNZgVjSxP_ogQKJjTIQFLysPKCGxqIhYY,1287
9
+ aepkit/status.py,sha256=gum6hmQjm_y7wfa2Ir1t5jmgFEiiYuq_zA-NCkeSC90,4421
10
+ aepkit/skill/SKILL.md,sha256=Sv5Uy1l0oLuEZ3qOmgLNeW7IqDCly46IIP8KozZJ5Ps,28230
11
+ aepkit/skill/references/autonomous-mode.md,sha256=4KxUoLmJVeJ800eJaoX95AC2l24Co_bwan9I9dFEE3o,8007
12
+ aepkit/skill/references/failure-modes-and-example.md,sha256=iK2jYDjBdaJ8E-HDIKrCFAiTgMRAZVwH5NUowVg68s8,5608
13
+ aepkit/skill/references/handoffs.md,sha256=vMokSiRXhsf_we9Dotb1jtLghr5LRolY4AMesJff_ek,6611
14
+ aepkit/skill/references/tasks-and-gates.md,sha256=3ViWt6BPxdtCD2tPapJMOmgl0WtEqUpxyQSwGUSqIpk,5199
15
+ aepkit/templates/compliance-log.md,sha256=xTmvSAjb-_S6ZBNb_JjtlNHiV28-JusEj_8hfQ-KfrQ,730
16
+ aepkit/templates/execution-guide.md,sha256=njGvCRDLMtVu71dmtjksNtzSmh-82jKzHXDEkJ8-fxk,2323
17
+ aepkit/templates/plan-of-record.md,sha256=vR7A7rS0yUhTtSg7DBTSCYmhCEPux3a-a0LPTsJheV4,3278
18
+ aepkit-0.6.0.dist-info/licenses/LICENSE,sha256=502xuJPh3Afdx3kE4pZcYLAO59VoDcrbx_Vv2pTWtR0,1064
19
+ aepkit-0.6.0.dist-info/METADATA,sha256=c8vUYyHuDP9vZIKFobzBz41FEDqN4ZlknX91jVJzy6c,12419
20
+ aepkit-0.6.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
21
+ aepkit-0.6.0.dist-info/entry_points.txt,sha256=DtXHN4n3ecUvpQ9UnwAh--mca5LO2z8heoFMaY-GG0c,43
22
+ aepkit-0.6.0.dist-info/top_level.txt,sha256=ZFYVzwFoP9sxxSOCyuGrF5xh78aO1l17MlDKqe1o8OE,7
23
+ aepkit-0.6.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ aepkit = aepkit.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tBeltty
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ aepkit