aepkit 0.6.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.
Files changed (44) hide show
  1. aepkit-0.6.0/CHANGELOG.md +286 -0
  2. aepkit-0.6.0/LICENSE +21 -0
  3. aepkit-0.6.0/MANIFEST.in +6 -0
  4. aepkit-0.6.0/PKG-INFO +223 -0
  5. aepkit-0.6.0/README.md +186 -0
  6. aepkit-0.6.0/SKILL.md +448 -0
  7. aepkit-0.6.0/pyproject.toml +103 -0
  8. aepkit-0.6.0/references/autonomous-mode.md +144 -0
  9. aepkit-0.6.0/references/failure-modes-and-example.md +103 -0
  10. aepkit-0.6.0/references/handoffs.md +133 -0
  11. aepkit-0.6.0/references/tasks-and-gates.md +84 -0
  12. aepkit-0.6.0/setup.cfg +4 -0
  13. aepkit-0.6.0/src/aepkit/__init__.py +1 -0
  14. aepkit-0.6.0/src/aepkit/__main__.py +7 -0
  15. aepkit-0.6.0/src/aepkit/cli.py +151 -0
  16. aepkit-0.6.0/src/aepkit/install_skill.py +126 -0
  17. aepkit-0.6.0/src/aepkit/lint.py +549 -0
  18. aepkit-0.6.0/src/aepkit/negcontrol.py +234 -0
  19. aepkit-0.6.0/src/aepkit/py.typed +0 -0
  20. aepkit-0.6.0/src/aepkit/scaffold.py +40 -0
  21. aepkit-0.6.0/src/aepkit/skill/SKILL.md +448 -0
  22. aepkit-0.6.0/src/aepkit/skill/references/autonomous-mode.md +144 -0
  23. aepkit-0.6.0/src/aepkit/skill/references/failure-modes-and-example.md +103 -0
  24. aepkit-0.6.0/src/aepkit/skill/references/handoffs.md +133 -0
  25. aepkit-0.6.0/src/aepkit/skill/references/tasks-and-gates.md +84 -0
  26. aepkit-0.6.0/src/aepkit/status.py +122 -0
  27. aepkit-0.6.0/src/aepkit/templates/compliance-log.md +37 -0
  28. aepkit-0.6.0/src/aepkit/templates/execution-guide.md +75 -0
  29. aepkit-0.6.0/src/aepkit/templates/plan-of-record.md +79 -0
  30. aepkit-0.6.0/src/aepkit.egg-info/PKG-INFO +223 -0
  31. aepkit-0.6.0/src/aepkit.egg-info/SOURCES.txt +42 -0
  32. aepkit-0.6.0/src/aepkit.egg-info/dependency_links.txt +1 -0
  33. aepkit-0.6.0/src/aepkit.egg-info/entry_points.txt +2 -0
  34. aepkit-0.6.0/src/aepkit.egg-info/requires.txt +11 -0
  35. aepkit-0.6.0/src/aepkit.egg-info/top_level.txt +1 -0
  36. aepkit-0.6.0/tests/run.py +87 -0
  37. aepkit-0.6.0/tests/test_cli.py +101 -0
  38. aepkit-0.6.0/tests/test_install_skill.py +174 -0
  39. aepkit-0.6.0/tests/test_lint.py +701 -0
  40. aepkit-0.6.0/tests/test_negcontrol.py +252 -0
  41. aepkit-0.6.0/tests/test_readme_claims.py +195 -0
  42. aepkit-0.6.0/tests/test_scaffold.py +41 -0
  43. aepkit-0.6.0/tests/test_skill_sync.py +25 -0
  44. aepkit-0.6.0/tests/test_status.py +112 -0
@@ -0,0 +1,286 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.6.0] - 2026-10-24
11
+
12
+ ### Added
13
+ - `plan-of-record.md` template and `SKILL.md`: Opportunity & Shaping gate (`Target outcome`,
14
+ `Problem / friction`, `Cost of doing nothing`, three-option set-based comparison with
15
+ `Selected option & rationale`, `Riskiest assumption & first-phase validation`, `Explicit
16
+ non-goals`, and the `Deferred items ledger` table), plus a fast-track bypass
17
+ (`N/A (Deterministic Fix/Compliance)`) for bugfixes, security patches, migrations, and
18
+ strict compliance work.
19
+ - `aepkit lint` flags `[unfilled plan]` when `plan-of-record.md` is present and work has
20
+ been reported `DONE` or given a verdict while required opportunity, shaping, riskiest-assumption,
21
+ or non-goal fields remain empty, deferred, or placeholders (unless the shaping/assumption
22
+ fields declare `N/A (Deterministic Fix/Compliance)`).
23
+ - `aepkit lint` flags `[open deferred item]` when a row in the deferred items ledger of
24
+ `plan-of-record.md` references a closing task ID that does not exist in `execution-guide.md`
25
+ or remains open when its target phase is being closed.
26
+
27
+ ### Changed
28
+ - **Breaking:** Renamed the PyPI distribution, Python package, and CLI binary to `aepkit`
29
+ (`pipx install aepkit`, `aepkit`, `python -m aepkit`) to eliminate naming collisions with
30
+ external `auditkit` packages and binaries.
31
+
32
+ ## [0.5.0] - 2026-10-02
33
+
34
+ ### Added
35
+ - `auditkit negcontrol --expect REGEX`: the failing run's output must match the expression, so
36
+ a test that fails for an unrelated reason (a syntax error, a missing import, a mistyped
37
+ command) fails the control instead of passing it.
38
+ - Without `--expect`, `negcontrol` adds a `WARNING` to its verdict when the failing output looks
39
+ like a syntax, import, collection, timeout or command-not-found error, rather than the
40
+ protection being caught.
41
+
42
+ ### Changed
43
+ - **Breaking (Python API only):** `auditkit.negcontrol.run()` takes every argument after
44
+ `test_cmd` by keyword. The `auditkit negcontrol` command is unchanged.
45
+
46
+ ## [0.4.0] - 2026-10-01
47
+
48
+ ### Added
49
+ - `python -m auditkit` runs the CLI.
50
+ - A release workflow publishes to PyPI through trusted publishing when a `v*` tag is pushed,
51
+ then creates the GitHub release from this changelog.
52
+ - `CODE_OF_CONDUCT.md`, and an issue chooser that routes vulnerability reports to private
53
+ disclosure.
54
+ - `auditkit lint` flags `[phase order]`: work reported in a phase before every earlier phase is
55
+ `APPROVED`.
56
+ - Tests that check the README's CLI reference, exit codes, `install-skill` destinations,
57
+ `negcontrol` behavior, and its promises: unevidenced `DONE`, waived controls, unplanned
58
+ reports, and tests that cannot fail are caught.
59
+
60
+ ### Changed
61
+ - The distribution is named `auditor-executor-protocol`, because `auditkit` on PyPI belongs to
62
+ an unrelated project. The command and the import package are still `auditkit`. The README
63
+ installs it from PyPI.
64
+ - **Breaking:** `auditkit lint` counts verify output only inside a fenced code block, so prose
65
+ such as "all tests pass" or "looks correct" is reported as `DONE` without evidence. Logs that
66
+ pasted output without a fence fail until it is wrapped in a ``` block; the lint message says
67
+ how.
68
+ - `auditkit lint` rejects hypothetical negative controls ("could", "should", "may") and ones
69
+ whose action removes nothing.
70
+ - README states that the Auditor re-runs every check in its own session and that `lint` checks
71
+ the form of evidence, not whether it is genuine.
72
+ - Errors and warnings go to stderr; stdout carries only results and transcripts.
73
+ - Every `auditkit` option has help text. Each subcommand module no longer carries its own copy
74
+ of the argument parser, so `auditkit <command> --help` is the single, complete reference.
75
+ - Dependabot only raises a pip minimum when it no longer admits the latest release.
76
+ - CI pins every action to a commit SHA, cancels superseded runs, and checks the built
77
+ distributions with `twine check --strict`.
78
+ - Package metadata lists supported Python versions, `Development Status`, and `Typing :: Typed`;
79
+ the version is defined once, in `auditkit.__version__`.
80
+ - `.gitignore` covers common virtualenv, coverage, tox/nox, and editor files; the PR template
81
+ matches the CONTRIBUTING checklist.
82
+
83
+ ### Removed
84
+ - Python 3.9 and 3.10 support (end of life in October 2025 and October 2026). `auditkit` now
85
+ requires Python 3.11+.
86
+
87
+ ### Fixed
88
+ - `AGENTS.md` imported itself and said nothing, because `GEMINI.md` was a symlink to it. It is
89
+ now a short, generic agent guide that points to `CONTRIBUTING.md`; tool-specific instruction
90
+ files (`CLAUDE.md`, `GEMINI.md`) are no longer tracked.
91
+ - README: the compliance log template, `install-skill` detection and `--global`/`--dest`, every
92
+ command's options, exit codes, and the BSD-only `sed -i ''` in the `negcontrol` example now match
93
+ the CLI.
94
+
95
+ ## [0.3.9] - 2026-09-26
96
+
97
+ ### Fixed
98
+ - `auditkit lint` accepted hypothetical, waived, and action-negated negative controls.
99
+ - `auditkit lint` rejected some valid negative controls.
100
+
101
+ ## [0.3.8] - 2026-09-26
102
+
103
+ ### Changed
104
+ - `auditkit lint` recognizes a stated negative control by what it says, not by a list of
105
+ excuses to reject: it must name the action that removes the protection (or feeds the input it
106
+ must stop) and the failure that follows, with no deferral and no negated failure. Waivers and
107
+ refusals in any wording ("waived by the tech lead", "out of scope", "does not apply") no longer
108
+ pass.
109
+
110
+ ## [0.3.7] - 2026-09-26
111
+
112
+ ### Fixed
113
+ - `auditkit lint` accepted refusals written as the negative control ("No control; ...",
114
+ "deliberately omitted", "could not break it", "nothing to show").
115
+
116
+ ## [0.3.6] - 2026-09-25
117
+
118
+ ### Fixed
119
+ - `auditkit lint` accepted passive or scheduled deferrals as a negative control ("will be added
120
+ in P1", "TBC", "to follow", "coming soon", "planned for the next release").
121
+
122
+ ## [0.3.5] - 2026-09-25
123
+
124
+ ### Fixed
125
+ - `auditkit lint` accepted a negative control that only deferred or pointed elsewhere
126
+ ("will add later", "TBA", "see above"). A stated control now needs at least a short sentence
127
+ (four words) with no deferral in it.
128
+
129
+ ## [0.3.4] - 2026-09-25
130
+
131
+ ### Fixed
132
+ - `auditkit lint` accepted deferred controls written in the plural ("Negative controls: none").
133
+ - The scaffolded gate stated a generic negative control ("A negative control — remove the
134
+ protection, ..."), so a gate reported `DONE` without ever writing one passed lint. The
135
+ template now has a `**Negative control:**` placeholder, and a gate still exactly as scaffolded
136
+ is skipped only until it is reported `DONE`.
137
+
138
+ ## [0.3.3] - 2026-09-25
139
+
140
+ ### Fixed
141
+ - `auditkit lint` counted any mention of "negative control" as a stated one, so an empty label
142
+ (`**Negative control:**`), a dash, a template placeholder, "to be written", or "N.A." passed.
143
+ A mention now needs text after it (on the same line or the next ones) that is not a
144
+ placeholder, punctuation, or a deferral.
145
+ - `auditkit lint` accepted `DONE` reports whose verify output was only punctuation ("-", "…") or
146
+ "None yet".
147
+
148
+ ## [0.3.2] - 2026-09-25
149
+
150
+ Fixes from a second independent review.
151
+
152
+ ### Fixed
153
+ - `auditkit lint` accepted a deferred negative control written as a bold field
154
+ (`**Negative control:** n/a`, `**Negative control**: none`); only up to three punctuation
155
+ characters were allowed between the label and the deferral.
156
+ - `auditkit lint` counted a `DONE` report whose verify output was only a deferral ("n/a", "TBD",
157
+ "pending") as pasted output.
158
+ - `auditkit negcontrol --timeout` killed only the shell; processes the command started kept
159
+ running and could change the file after the restore check. Each command now runs in its own
160
+ process group, which is killed as a whole on timeout.
161
+
162
+ ## [0.3.1] - 2026-09-25
163
+
164
+ Fixes from an independent review of 0.3.0.
165
+
166
+ ### Fixed
167
+ - `auditkit lint` reported "clean" for an execution guide with no tasks, or with tasks that have no
168
+ `**Report:**` line, so empty documents passed. Both are now reported.
169
+ - `auditkit lint` accepted deferred negative controls ("Negative control: TBD", "skipped",
170
+ "the negative control step was not done") as stated ones.
171
+ - `auditkit negcontrol --file` crashed and deleted the backup when the break command deleted or
172
+ moved the file. The file is now recreated from the backup, and the backup is kept unless the
173
+ file is verified byte-identical.
174
+ - `auditkit status` let a status board verdict silently override a later, different report-header
175
+ verdict. Such items are now listed as `CONFLICT` and stay open.
176
+ - `auditkit install-skill --dest <directory>` skipped, crashed with `--force`, or wrote a file
177
+ named after the directory. A directory destination now receives `SKILL.md` and `references/`.
178
+ - The sdist now includes `SKILL.md` and `references/`, so its own test suite passes.
179
+
180
+ ### Changed
181
+ - `.gitattributes` normalizes line endings to LF, so checkouts on Windows match other platforms
182
+ byte for byte (the framework vendors `SKILL.md`, `references/`, and the templates).
183
+ - Build requirement raised to `setuptools>=77`, which supports the SPDX `license` string.
184
+ - `SKILL.md` states that lint checks that evidence is present, not that it is authentic.
185
+
186
+ ## [0.3.0] - 2026-09-25
187
+
188
+ ### Added
189
+ - `auditkit lint` reports compliance-log entries with no matching task or gate in the
190
+ execution guide.
191
+ - `auditkit negcontrol --timeout` bounds each command.
192
+ - `auditkit lint` flags `DONE` reports in `compliance-log.md` whose `**Verify output:**`
193
+ field is missing, empty, or only a template placeholder. The protocol already records
194
+ these as `FAILED`; the check makes that mechanical.
195
+ - README: install `auditkit` without cloning via `pipx install git+https://github.com/tBeltty/auditor-executor-protocol`.
196
+ - Conventional Commits specification documented in `CONTRIBUTING.md` and enforced in `AGENTS.md`.
197
+ - `SKILL.md`: optional Guided/Autonomous operating mode, with the autonomy charter, per-task
198
+ model-tier assignment, the per-task cycle, and an Auditor-brief template for starting an
199
+ autonomous run.
200
+ - `SKILL.md`: a deferred items ledger in the plan of record and a reserved-to-Auditor steps
201
+ list in the execution guide, so cross-phase promises and recurring sandbox blocks are
202
+ tracked as structured document state instead of prose an Auditor has to remember.
203
+ - `SKILL.md`: a `Blast radius` field on the task template covering both meaning-changing
204
+ edits to a shared field and steps that empty/delete/replace shared code a later task
205
+ still depends on.
206
+ - `SKILL.md`: gate-writing rules for compound gates (re-run every check, never cite a
207
+ partial prior pass), realistic test fixtures (a minimal fixture shape hides bugs a
208
+ realistic one would catch), and channel-crossing checks (a restriction proven on one
209
+ transport/channel is not proven on all of them).
210
+ - `SKILL.md`: a "Worked example" section showing a filled-in, fictional Autonomous-mode
211
+ run end to end.
212
+
213
+ ### Changed
214
+ - `SKILL.md` split into a core file (24 KB, down from 47 KB) and four on-demand files in
215
+ `references/`: `tasks-and-gates.md`, `handoffs.md`, `autonomous-mode.md`, and
216
+ `failure-modes-and-example.md`. The core indexes each file with the step that needs it,
217
+ so an agent that triggers the skill loads about half the tokens it did before.
218
+ - `auditkit install-skill` copies `references/` beside `SKILL.md`. Destinations that hold a
219
+ single file (Cursor `.mdc`, or a `--dest` not named `SKILL.md`) get one bundled file.
220
+ - The packaged skill moved from `src/auditkit/templates/SKILL.md` to `src/auditkit/skill/`.
221
+ - `GEMINI.md` imports `AGENTS.md` instead of duplicating it, so the agent rules have one
222
+ source of truth.
223
+ - Bumped `actions/checkout` and `actions/setup-python` to v7 in GitHub Actions CI workflow.
224
+ - Configured grouped updates in `.github/dependabot.yml` to bundle action and pip dependency bumps.
225
+
226
+ ### Fixed
227
+ - `auditkit install-skill` shipped a stale 500-line copy of the protocol that predated the
228
+ Autonomous mode, deferred items ledger, and gate-writing rules. `tests/test_skill_sync.py`
229
+ now fails whenever the packaged copy differs from the repository root.
230
+ - `auditkit lint` returned "clean" (exit 0) for a missing directory or missing documents.
231
+ It now exits 2 and names the missing file; linting nothing proves nothing.
232
+ - `auditkit status` ignored the Verdict column of the status board and counted a `DONE`
233
+ self-report as closed, so a `REJECTED` task could appear closed. It now combines board
234
+ verdicts with the latest report per ID; only `APPROVED` closes an item and `DONE` without
235
+ a verdict is listed as awaiting audit.
236
+ - `auditkit negcontrol --file ... --restore-cmd ...` deleted the backup even when the
237
+ restore command failed, leaving the file broken. With `--file`, the file must end
238
+ byte-identical to the backup or it is restored from it, and the backup is kept if that
239
+ still fails. The restore exit code is recorded.
240
+ - `auditkit lint` accepted a negated mention ("negative control: n/a") as a stated negative
241
+ control.
242
+ - CLI help: `init` described four documents (it writes three plus `annexes/`), and
243
+ `install-skill --dest` described a file path only.
244
+
245
+ ## [0.2.0] - 2026-09-19
246
+
247
+ ### Added
248
+ - PEP 561 marker (`src/auditkit/py.typed`) for inline static typing support.
249
+ - Complete test suite for `auditkit.cli` entry point (`tests/test_cli.py`).
250
+ - 90%+ test coverage enforcement across the repository.
251
+ - GitHub Actions CI workflow hardening: explicit token permissions, dedicated lint/format/typecheck job, package distribution verification, and weekly Dependabot configuration.
252
+ - Open-source governance files: `SECURITY.md`, `CONTRIBUTING.md`, `CHANGELOG.md`, PR and issue templates.
253
+ - Agent rule specifications (`AGENTS.md`, `GEMINI.md`) establishing mandatory changelog updates and test verification gates on every task.
254
+
255
+ ### Changed
256
+ - Conformed all Python code to Ruff formatting and PEP 8 import conventions.
257
+ - Annotated all CLI runner entry points with strict parameter types (`argv: list[str] | None = None`).
258
+ - Standardized `pyproject.toml` metadata (SPDX license expression, project URLs, and keywords).
259
+ - Updated maintainer contact email to `jhonatan@tbelt.online` in `SECURITY.md` and `pyproject.toml`.
260
+
261
+ ### Fixed
262
+ - Fixed cross-platform Windows newline and whitespace handling in negative control tests.
263
+
264
+ ## [0.1.0] - 2026-08-30
265
+
266
+ ### Added
267
+ - Initial release of Auditor/Executor Protocol specification (`SKILL.md`).
268
+ - `auditkit` CLI tool featuring `init`, `lint`, `negcontrol`, `status`, and `install-skill` subcommands.
269
+ - Multi-framework agent installation support for Antigravity, Claude Code, and Cursor.
270
+ - Zero-dependency test runner (`tests/run.py`).
271
+
272
+ [Unreleased]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.6.0...HEAD
273
+ [0.6.0]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.5.0...v0.6.0
274
+ [0.5.0]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.4.0...v0.5.0
275
+ [0.4.0]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.9...v0.4.0
276
+ [0.3.9]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.8...v0.3.9
277
+ [0.3.8]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.7...v0.3.8
278
+ [0.3.7]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.6...v0.3.7
279
+ [0.3.6]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.5...v0.3.6
280
+ [0.3.5]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.4...v0.3.5
281
+ [0.3.4]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.3...v0.3.4
282
+ [0.3.3]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.2...v0.3.3
283
+ [0.3.2]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.1...v0.3.2
284
+ [0.3.1]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.3.0...v0.3.1
285
+ [0.3.0]: https://github.com/tBeltty/auditor-executor-protocol/compare/v0.2.0...v0.3.0
286
+ [0.2.0]: https://github.com/tBeltty/auditor-executor-protocol/releases/tag/v0.2.0
aepkit-0.6.0/LICENSE ADDED
@@ -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,6 @@
1
+ # The sdist ships the canonical skill so tests/test_skill_sync.py can run from it.
2
+ include SKILL.md
3
+ recursive-include references *.md
4
+ # README tells sdist users to run tests/run.py; setuptools only picks up test_*.py on its own.
5
+ include tests/run.py
6
+ include CHANGELOG.md
aepkit-0.6.0/PKG-INFO ADDED
@@ -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).