kwik-e-gate 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.
- kwik_e_gate-0.4.0/LICENSE +190 -0
- kwik_e_gate-0.4.0/PKG-INFO +163 -0
- kwik_e_gate-0.4.0/README.md +130 -0
- kwik_e_gate-0.4.0/pyproject.toml +73 -0
- kwik_e_gate-0.4.0/setup.cfg +4 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/__init__.py +3 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/adapters.py +325 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/binding.py +112 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/classification.py +36 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/claude_review.py +149 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/cli.py +179 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/codex_install.py +212 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/command_detection.py +208 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/config.py +231 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/delegate_judge.py +211 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/doctor.py +147 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/engine.py +807 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/execution.py +101 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/gate_result.py +141 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/gitstate.py +244 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/hooks.py +207 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/init_repo.py +646 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/providers.py +194 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/receipts.py +115 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/repo_runner.py +451 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/routing.py +77 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/schemas/__init__.py +1 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/schemas/gate-result-v1.schema.json +184 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/status.py +24 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate/workflow.py +183 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate.egg-info/PKG-INFO +163 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate.egg-info/SOURCES.txt +55 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate.egg-info/dependency_links.txt +1 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate.egg-info/entry_points.txt +4 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate.egg-info/requires.txt +6 -0
- kwik_e_gate-0.4.0/src/kwik_e_gate.egg-info/top_level.txt +1 -0
- kwik_e_gate-0.4.0/tests/test_action_default_guard.py +597 -0
- kwik_e_gate-0.4.0/tests/test_action_metadata.py +19 -0
- kwik_e_gate-0.4.0/tests/test_adapters.py +348 -0
- kwik_e_gate-0.4.0/tests/test_claude_jsonl_review.py +76 -0
- kwik_e_gate-0.4.0/tests/test_claude_plugin.py +190 -0
- kwik_e_gate-0.4.0/tests/test_codex_install.py +83 -0
- kwik_e_gate-0.4.0/tests/test_command_detection.py +115 -0
- kwik_e_gate-0.4.0/tests/test_core.py +1040 -0
- kwik_e_gate-0.4.0/tests/test_delegate_judge.py +377 -0
- kwik_e_gate-0.4.0/tests/test_doctor.py +113 -0
- kwik_e_gate-0.4.0/tests/test_gate_result.py +25 -0
- kwik_e_gate-0.4.0/tests/test_git_timeout.py +47 -0
- kwik_e_gate-0.4.0/tests/test_hooks.py +325 -0
- kwik_e_gate-0.4.0/tests/test_init_repo.py +748 -0
- kwik_e_gate-0.4.0/tests/test_providers.py +167 -0
- kwik_e_gate-0.4.0/tests/test_publish_version.py +48 -0
- kwik_e_gate-0.4.0/tests/test_release.py +342 -0
- kwik_e_gate-0.4.0/tests/test_routing.py +171 -0
- kwik_e_gate-0.4.0/tests/test_runner_regressions.py +562 -0
- kwik_e_gate-0.4.0/tests/test_source_action.py +285 -0
- kwik_e_gate-0.4.0/tests/test_workflow.py +335 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Hermes Labs
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kwik-e-gate
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: KWIK-E-GATE: fast local checks and content-bound receipts for coding agents
|
|
5
|
+
Author-email: Hermes Labs <roli@hermes-labs.ai>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://hermes-labs.ai/open-source
|
|
8
|
+
Project-URL: Documentation, https://github.com/hermes-labs-ai/kwik-e-gate#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/hermes-labs-ai/kwik-e-gate
|
|
10
|
+
Project-URL: Issues, https://github.com/hermes-labs-ai/kwik-e-gate/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/hermes-labs-ai/kwik-e-gate/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: ai-agents,coding-agent,completion-gate,ci,developer-tools,hermes-labs,quality-assurance,receipts,reproducibility
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
23
|
+
Classifier: Topic :: Software Development :: Testing
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Provides-Extra: test
|
|
28
|
+
Requires-Dist: pytest==9.1.1; extra == "test"
|
|
29
|
+
Requires-Dist: ruff==0.16.8; extra == "test"
|
|
30
|
+
Requires-Dist: build==1.6.1; extra == "test"
|
|
31
|
+
Requires-Dist: PyYAML==6.0.3; extra == "test"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
<h1 align="center">Kwik-E-Gate</h1>
|
|
35
|
+
|
|
36
|
+
> **Experimental / work in progress:** Kwik-E-Gate is under active development. Interfaces and behavior may change; evaluate it on your own repositories before relying on it.
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="docs/assets/kwik-e-gate-header.jpg" alt="Kwik-E-Gate — don't forget the receipt">
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<p align="center"><strong>Run the checks. Get PASS or FAIL. Keep the receipt.</strong></p>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<a href="#quickstart">Quickstart</a> · <a href="#how-it-works">How it works</a> · <a href="#real-example">Real example</a> · <a href="#github-action">GitHub Action</a>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
Use Kwik-E-Gate to choose fast or full checks from the changed files and run
|
|
49
|
+
the commands **your repository declares**. It produces a PASS/FAIL receipt you
|
|
50
|
+
can verify later. Local checks require Git and Python. Use
|
|
51
|
+
[Hermes Gate](https://github.com/hermes-labs-ai/hermes-gate) for a repository
|
|
52
|
+
that uses its explicit completion and Git boundary checks. The two Python
|
|
53
|
+
packages can share an environment. Choose one tool to manage a repository's
|
|
54
|
+
`.hermes/gate.toml`. [Migration and release](docs/MIGRATION.md)
|
|
55
|
+
|
|
56
|
+
## Quickstart
|
|
57
|
+
|
|
58
|
+
### Install
|
|
59
|
+
|
|
60
|
+
Requires Python 3.11+ and Git. The standalone 0.4.0 candidate is staged locally.
|
|
61
|
+
From the reviewed candidate checkout, install it into a virtual environment.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
python3 -m venv .venv
|
|
65
|
+
. .venv/bin/activate
|
|
66
|
+
python -m pip install .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The PyPI install command will be `python -m pip install kwik-e-gate` once the
|
|
70
|
+
standalone package is published.
|
|
71
|
+
|
|
72
|
+
### Run a local check
|
|
73
|
+
|
|
74
|
+
Try this in a disposable Git repository. `init` detects the Python project and
|
|
75
|
+
writes a profile, runner, and workflow.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
demo=$(mktemp -d)
|
|
79
|
+
cd "$demo"
|
|
80
|
+
git init -q
|
|
81
|
+
touch requirements.txt
|
|
82
|
+
printf 'answer = 42\n' > app.py
|
|
83
|
+
kwik-e-gate init
|
|
84
|
+
kwik-e-gate run --mode fast
|
|
85
|
+
kwik-e-gate verify
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
In the local replay, `python-parse` and `diff-check` passed. The `run` and
|
|
89
|
+
`verify` JSON each reported `"status": "PASS"`. Editing `app.py` made the
|
|
90
|
+
receipt stale. Run the checks again to verify the new bytes.
|
|
91
|
+
|
|
92
|
+
In your own repository, review `.hermes/gate.toml`, install the tools your
|
|
93
|
+
checks use, and use `kwik-e-gate plan` to preview the selected checks. To keep
|
|
94
|
+
a receipt outside the checkout, use `run --output <path>` and
|
|
95
|
+
`verify --receipt <path>`.
|
|
96
|
+
|
|
97
|
+
## How it works
|
|
98
|
+
|
|
99
|
+
1. **You choose the checks.** `.hermes/gate.toml` names the project's commands and the paths they cover. Kwik-E-Gate never installs ESLint, pytest, or other project tools for you.
|
|
100
|
+
2. **It picks a route.** Ordinary source edits use matching fast checks. Changes to tests, dependencies, CI, gate configuration, auth, schemas, or migrations escalate to full. `kwik-e-gate plan` shows the choice and why; `--mode fast` or `--mode full` selects one explicitly.
|
|
101
|
+
3. **It runs and receipts.** The result records checks, selected paths, outputs, tool versions, and an input/contract binding. Changing included code or gate configuration makes an earlier receipt stale. Run again to get fresh evidence.
|
|
102
|
+
|
|
103
|
+
The routing decision is local and deterministic. It does not read the code to infer intent or call an LLM. The actual check time depends on the commands your project declares. [`review`](docs/CONFIGURATION.md) is an optional separate step, not a prerequisite for local PASS/FAIL.
|
|
104
|
+
|
|
105
|
+
[Configuration reference](docs/CONFIGURATION.md) covers profiles, file globs, adapters, exclusions, and review policy.
|
|
106
|
+
|
|
107
|
+
## Real example
|
|
108
|
+
|
|
109
|
+
While building Kwik-E-Gate, we caught a scanner-scope bug in its own fast gate. The profile selected LintLang for `AGENTS.md`, but the old runner also sent `app.py` and `notes/SKILL.md` to that scanner. An out-of-scope warning failed the run. The fix passed only `AGENTS.md` to LintLang; the same changed inputs and diff digest then passed. Both runs produced receipts.
|
|
110
|
+
|
|
111
|
+
| | Before | After |
|
|
112
|
+
| --- | --- | --- |
|
|
113
|
+
| LintLang received | `AGENTS.md`, `app.py`, `notes/SKILL.md` | `AGENTS.md` |
|
|
114
|
+
| Gate result | **FAIL** | **PASS** |
|
|
115
|
+
| Input diff | `af58fb3b62b5…` | Same digest |
|
|
116
|
+
|
|
117
|
+
[Read the replay and both saved receipt payloads](docs/demo/SCANNER-SCOPE-BUG.md). This was a gate-wiring bug, not a defect in `app.py`; the before/after makes that distinction visible.
|
|
118
|
+
|
|
119
|
+
## GitHub Action
|
|
120
|
+
|
|
121
|
+
### Basic pull request example
|
|
122
|
+
|
|
123
|
+
Use this in a `pull_request` job after preparing the tools named in
|
|
124
|
+
`.hermes/gate.toml`. The example uses the existing public Action pin. The
|
|
125
|
+
Action executes the source at its pin. Use a candidate pin in release staging
|
|
126
|
+
only after its exact reviewed commit is publicly reachable.
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
130
|
+
with:
|
|
131
|
+
fetch-depth: 0
|
|
132
|
+
persist-credentials: false
|
|
133
|
+
- uses: hermes-labs-ai/kwik-e-gate/.github/actions/kwik-e-gate@266898a2b72a2bf92aa4608a6123999eb00b7f6b
|
|
134
|
+
id: gate
|
|
135
|
+
with:
|
|
136
|
+
mode: full
|
|
137
|
+
base: ${{ github.event.pull_request.base.sha }}
|
|
138
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
|
|
139
|
+
if: always() && steps.gate.outputs.receipt-path != ''
|
|
140
|
+
with:
|
|
141
|
+
name: kwik-e-gate-receipt
|
|
142
|
+
path: ${{ steps.gate.outputs.receipt-path }}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The Action reports `status` and `receipt-path`. The upload step preserves the
|
|
146
|
+
receipt after passing or failing checks when the runner exported one.
|
|
147
|
+
|
|
148
|
+
| Input | Default | Set it when |
|
|
149
|
+
| --- | --- | --- |
|
|
150
|
+
| `mode` | `auto` | Select `fast` or `full` explicitly. |
|
|
151
|
+
| `working-directory` | `.` | The checkout containing the gate profile is elsewhere. |
|
|
152
|
+
| `base` | Empty | Supply the comparison commit for a pull request or a detached merge checkout. |
|
|
153
|
+
| `python-version` | `3.11` | Choose a different Python version, 3.11 or newer. |
|
|
154
|
+
|
|
155
|
+
`kwik-e-gate init` generates a workflow with a public source pin. It uses the
|
|
156
|
+
PR base or previous push revision and falls back to the first parent on manual
|
|
157
|
+
runs or new branches. [CI examples](docs/CI-ADMISSION.md)
|
|
158
|
+
|
|
159
|
+
## What a receipt means
|
|
160
|
+
|
|
161
|
+
A PASS says the **declared checks** ran successfully on the bound local inputs. It is not a claim that the code is correct or that every dependency and external service was captured. Receipts are unsigned and local to the checkout; `verify` refuses missing, failed, stale, or incomplete evidence. If the code changes, run the gate again. If a repository also requires semantic review, run that separately.
|
|
162
|
+
|
|
163
|
+
Built by [Hermes Labs](https://hermes-labs.ai). [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [License](LICENSE) · [Changelog](CHANGELOG.md)
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<h1 align="center">Kwik-E-Gate</h1>
|
|
2
|
+
|
|
3
|
+
> **Experimental / work in progress:** Kwik-E-Gate is under active development. Interfaces and behavior may change; evaluate it on your own repositories before relying on it.
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img src="docs/assets/kwik-e-gate-header.jpg" alt="Kwik-E-Gate — don't forget the receipt">
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center"><strong>Run the checks. Get PASS or FAIL. Keep the receipt.</strong></p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="#quickstart">Quickstart</a> · <a href="#how-it-works">How it works</a> · <a href="#real-example">Real example</a> · <a href="#github-action">GitHub Action</a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
Use Kwik-E-Gate to choose fast or full checks from the changed files and run
|
|
16
|
+
the commands **your repository declares**. It produces a PASS/FAIL receipt you
|
|
17
|
+
can verify later. Local checks require Git and Python. Use
|
|
18
|
+
[Hermes Gate](https://github.com/hermes-labs-ai/hermes-gate) for a repository
|
|
19
|
+
that uses its explicit completion and Git boundary checks. The two Python
|
|
20
|
+
packages can share an environment. Choose one tool to manage a repository's
|
|
21
|
+
`.hermes/gate.toml`. [Migration and release](docs/MIGRATION.md)
|
|
22
|
+
|
|
23
|
+
## Quickstart
|
|
24
|
+
|
|
25
|
+
### Install
|
|
26
|
+
|
|
27
|
+
Requires Python 3.11+ and Git. The standalone 0.4.0 candidate is staged locally.
|
|
28
|
+
From the reviewed candidate checkout, install it into a virtual environment.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
python3 -m venv .venv
|
|
32
|
+
. .venv/bin/activate
|
|
33
|
+
python -m pip install .
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The PyPI install command will be `python -m pip install kwik-e-gate` once the
|
|
37
|
+
standalone package is published.
|
|
38
|
+
|
|
39
|
+
### Run a local check
|
|
40
|
+
|
|
41
|
+
Try this in a disposable Git repository. `init` detects the Python project and
|
|
42
|
+
writes a profile, runner, and workflow.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
demo=$(mktemp -d)
|
|
46
|
+
cd "$demo"
|
|
47
|
+
git init -q
|
|
48
|
+
touch requirements.txt
|
|
49
|
+
printf 'answer = 42\n' > app.py
|
|
50
|
+
kwik-e-gate init
|
|
51
|
+
kwik-e-gate run --mode fast
|
|
52
|
+
kwik-e-gate verify
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
In the local replay, `python-parse` and `diff-check` passed. The `run` and
|
|
56
|
+
`verify` JSON each reported `"status": "PASS"`. Editing `app.py` made the
|
|
57
|
+
receipt stale. Run the checks again to verify the new bytes.
|
|
58
|
+
|
|
59
|
+
In your own repository, review `.hermes/gate.toml`, install the tools your
|
|
60
|
+
checks use, and use `kwik-e-gate plan` to preview the selected checks. To keep
|
|
61
|
+
a receipt outside the checkout, use `run --output <path>` and
|
|
62
|
+
`verify --receipt <path>`.
|
|
63
|
+
|
|
64
|
+
## How it works
|
|
65
|
+
|
|
66
|
+
1. **You choose the checks.** `.hermes/gate.toml` names the project's commands and the paths they cover. Kwik-E-Gate never installs ESLint, pytest, or other project tools for you.
|
|
67
|
+
2. **It picks a route.** Ordinary source edits use matching fast checks. Changes to tests, dependencies, CI, gate configuration, auth, schemas, or migrations escalate to full. `kwik-e-gate plan` shows the choice and why; `--mode fast` or `--mode full` selects one explicitly.
|
|
68
|
+
3. **It runs and receipts.** The result records checks, selected paths, outputs, tool versions, and an input/contract binding. Changing included code or gate configuration makes an earlier receipt stale. Run again to get fresh evidence.
|
|
69
|
+
|
|
70
|
+
The routing decision is local and deterministic. It does not read the code to infer intent or call an LLM. The actual check time depends on the commands your project declares. [`review`](docs/CONFIGURATION.md) is an optional separate step, not a prerequisite for local PASS/FAIL.
|
|
71
|
+
|
|
72
|
+
[Configuration reference](docs/CONFIGURATION.md) covers profiles, file globs, adapters, exclusions, and review policy.
|
|
73
|
+
|
|
74
|
+
## Real example
|
|
75
|
+
|
|
76
|
+
While building Kwik-E-Gate, we caught a scanner-scope bug in its own fast gate. The profile selected LintLang for `AGENTS.md`, but the old runner also sent `app.py` and `notes/SKILL.md` to that scanner. An out-of-scope warning failed the run. The fix passed only `AGENTS.md` to LintLang; the same changed inputs and diff digest then passed. Both runs produced receipts.
|
|
77
|
+
|
|
78
|
+
| | Before | After |
|
|
79
|
+
| --- | --- | --- |
|
|
80
|
+
| LintLang received | `AGENTS.md`, `app.py`, `notes/SKILL.md` | `AGENTS.md` |
|
|
81
|
+
| Gate result | **FAIL** | **PASS** |
|
|
82
|
+
| Input diff | `af58fb3b62b5…` | Same digest |
|
|
83
|
+
|
|
84
|
+
[Read the replay and both saved receipt payloads](docs/demo/SCANNER-SCOPE-BUG.md). This was a gate-wiring bug, not a defect in `app.py`; the before/after makes that distinction visible.
|
|
85
|
+
|
|
86
|
+
## GitHub Action
|
|
87
|
+
|
|
88
|
+
### Basic pull request example
|
|
89
|
+
|
|
90
|
+
Use this in a `pull_request` job after preparing the tools named in
|
|
91
|
+
`.hermes/gate.toml`. The example uses the existing public Action pin. The
|
|
92
|
+
Action executes the source at its pin. Use a candidate pin in release staging
|
|
93
|
+
only after its exact reviewed commit is publicly reachable.
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
97
|
+
with:
|
|
98
|
+
fetch-depth: 0
|
|
99
|
+
persist-credentials: false
|
|
100
|
+
- uses: hermes-labs-ai/kwik-e-gate/.github/actions/kwik-e-gate@266898a2b72a2bf92aa4608a6123999eb00b7f6b
|
|
101
|
+
id: gate
|
|
102
|
+
with:
|
|
103
|
+
mode: full
|
|
104
|
+
base: ${{ github.event.pull_request.base.sha }}
|
|
105
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
|
|
106
|
+
if: always() && steps.gate.outputs.receipt-path != ''
|
|
107
|
+
with:
|
|
108
|
+
name: kwik-e-gate-receipt
|
|
109
|
+
path: ${{ steps.gate.outputs.receipt-path }}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The Action reports `status` and `receipt-path`. The upload step preserves the
|
|
113
|
+
receipt after passing or failing checks when the runner exported one.
|
|
114
|
+
|
|
115
|
+
| Input | Default | Set it when |
|
|
116
|
+
| --- | --- | --- |
|
|
117
|
+
| `mode` | `auto` | Select `fast` or `full` explicitly. |
|
|
118
|
+
| `working-directory` | `.` | The checkout containing the gate profile is elsewhere. |
|
|
119
|
+
| `base` | Empty | Supply the comparison commit for a pull request or a detached merge checkout. |
|
|
120
|
+
| `python-version` | `3.11` | Choose a different Python version, 3.11 or newer. |
|
|
121
|
+
|
|
122
|
+
`kwik-e-gate init` generates a workflow with a public source pin. It uses the
|
|
123
|
+
PR base or previous push revision and falls back to the first parent on manual
|
|
124
|
+
runs or new branches. [CI examples](docs/CI-ADMISSION.md)
|
|
125
|
+
|
|
126
|
+
## What a receipt means
|
|
127
|
+
|
|
128
|
+
A PASS says the **declared checks** ran successfully on the bound local inputs. It is not a claim that the code is correct or that every dependency and external service was captured. Receipts are unsigned and local to the checkout; `verify` refuses missing, failed, stale, or incomplete evidence. If the code changes, run the gate again. If a repository also requires semantic review, run that separately.
|
|
129
|
+
|
|
130
|
+
Built by [Hermes Labs](https://hermes-labs.ai). [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [License](LICENSE) · [Changelog](CHANGELOG.md)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=70"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "kwik-e-gate"
|
|
7
|
+
version = "0.4.0"
|
|
8
|
+
description = "KWIK-E-GATE: fast local checks and content-bound receipts for coding agents"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
dependencies = []
|
|
13
|
+
authors = [{ name = "Hermes Labs", email = "roli@hermes-labs.ai" }]
|
|
14
|
+
keywords = [
|
|
15
|
+
"ai-agents",
|
|
16
|
+
"coding-agent",
|
|
17
|
+
"completion-gate",
|
|
18
|
+
"ci",
|
|
19
|
+
"developer-tools",
|
|
20
|
+
"hermes-labs",
|
|
21
|
+
"quality-assurance",
|
|
22
|
+
"receipts",
|
|
23
|
+
"reproducibility",
|
|
24
|
+
]
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Development Status :: 3 - Alpha",
|
|
27
|
+
"Environment :: Console",
|
|
28
|
+
"Intended Audience :: Developers",
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
31
|
+
"Programming Language :: Python :: 3.11",
|
|
32
|
+
"Programming Language :: Python :: 3.12",
|
|
33
|
+
"Programming Language :: Python :: 3.13",
|
|
34
|
+
"Programming Language :: Python :: 3.14",
|
|
35
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
36
|
+
"Topic :: Software Development :: Testing",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[project.urls]
|
|
40
|
+
Homepage = "https://hermes-labs.ai/open-source"
|
|
41
|
+
Documentation = "https://github.com/hermes-labs-ai/kwik-e-gate#readme"
|
|
42
|
+
Repository = "https://github.com/hermes-labs-ai/kwik-e-gate"
|
|
43
|
+
Issues = "https://github.com/hermes-labs-ai/kwik-e-gate/issues"
|
|
44
|
+
Changelog = "https://github.com/hermes-labs-ai/kwik-e-gate/blob/main/CHANGELOG.md"
|
|
45
|
+
|
|
46
|
+
[project.optional-dependencies]
|
|
47
|
+
test = ["pytest==9.1.1", "ruff==0.16.8", "build==1.6.1", "PyYAML==6.0.3"]
|
|
48
|
+
|
|
49
|
+
[project.scripts]
|
|
50
|
+
kwik-gate = "kwik_e_gate.cli:kwik_main"
|
|
51
|
+
kwik-e-gate = "kwik_e_gate.cli:kwik_e_main"
|
|
52
|
+
kwik-e-gate-claude-review = "kwik_e_gate.claude_review:main"
|
|
53
|
+
|
|
54
|
+
[tool.setuptools.packages.find]
|
|
55
|
+
where = ["src"]
|
|
56
|
+
include = ["kwik_e_gate*"]
|
|
57
|
+
namespaces = false
|
|
58
|
+
|
|
59
|
+
[tool.setuptools.package-data]
|
|
60
|
+
kwik_e_gate = ["schemas/*.json"]
|
|
61
|
+
|
|
62
|
+
[tool.pytest.ini_options]
|
|
63
|
+
addopts = "-q"
|
|
64
|
+
pythonpath = ["src"]
|
|
65
|
+
testpaths = ["tests"]
|
|
66
|
+
|
|
67
|
+
[tool.ruff]
|
|
68
|
+
line-length = 100
|
|
69
|
+
target-version = "py311"
|
|
70
|
+
|
|
71
|
+
[tool.ruff.per-file-target-version]
|
|
72
|
+
# This bootstrap must run on Python 3.10 to receipt an unsupported core runtime.
|
|
73
|
+
".github/actions/kwik-e-gate/run.py" = "py310"
|