oncebitten 0.1.0__py3-none-win_amd64.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.
- oncebitten-0.1.0.data/scripts/oncebitten-checker.exe +0 -0
- oncebitten-0.1.0.data/scripts/oncebitten.exe +0 -0
- oncebitten-0.1.0.dist-info/METADATA +168 -0
- oncebitten-0.1.0.dist-info/RECORD +6 -0
- oncebitten-0.1.0.dist-info/WHEEL +4 -0
- oncebitten-0.1.0.dist-info/sboms/oncebitten.cyclonedx.json +4877 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: oncebitten
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
5
|
+
Classifier: Environment :: Console
|
|
6
|
+
Classifier: Programming Language :: Rust
|
|
7
|
+
Summary: Turns repeated agent mistakes into git-enforced rules
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
11
|
+
Project-URL: Homepage, https://bcmyguest.github.io/oncebitten/
|
|
12
|
+
Project-URL: Repository, https://github.com/bcmyguest/oncebitten
|
|
13
|
+
|
|
14
|
+
# <img src="docs/media/icon.svg" alt="" width="36" align="absmiddle"> oncebitten
|
|
15
|
+
|
|
16
|
+
**oncebitten turns repeated agent mistakes into rules that git enforces.** When the same mistake shows up in two sessions, or you state a rule once, it proposes a check. You approve it, and the check then runs at pre-push and in CI.
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<picture>
|
|
20
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/media/oncebitten-dark.svg" />
|
|
21
|
+
<img src="docs/media/oncebitten.svg" alt="Caught: a Claude correction, a Codex revert and a failing Cursor test each count as evidence. Rule: oncebitten proposes the strongest rule that fits (a check, then an instruction, then nothing) and you approve it. Enforced: git push, CI and pull requests stop on py-utcnow: use datetime.now(UTC)." width="720" />
|
|
22
|
+
</picture>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
Docs: https://bcmyguest.github.io/oncebitten/
|
|
26
|
+
|
|
27
|
+
Status: pre-alpha. Capture, evidence clustering, `check`, `replay`, the gate, steer rules, exceptions, retire, rollback and `doctor` work; triage is implemented for claude, codex and opencode ([docs/triage.md](docs/triage.md)), with fake-host tests only; triage drafts proposed rules that wait for review in `oncebitten proposals` ([docs/proposals.md](docs/proposals.md)); delivery to pull requests is not started ([PLAN.md](PLAN.md)).
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
Pick the host you use; each section is copy-pasteable. The plugins download the release binary on first use and check its SHA-256. For the command line (gate, `evidence`, `check`) see [Command line](#command-line).
|
|
32
|
+
|
|
33
|
+
### Claude Code
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
/plugin marketplace add bcmyguest/oncebitten
|
|
37
|
+
/plugin install oncebitten@oncebitten
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Codex
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
codex plugin marketplace add bcmyguest/oncebitten
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then install `oncebitten` from `/plugins`.
|
|
47
|
+
|
|
48
|
+
### Copilot CLI
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
copilot plugin marketplace add bcmyguest/oncebitten
|
|
52
|
+
copilot plugin install oncebitten@oncebitten
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Cursor
|
|
56
|
+
|
|
57
|
+
Import `https://github.com/bcmyguest/oncebitten` as a team marketplace (Dashboard, Settings, Plugins).
|
|
58
|
+
|
|
59
|
+
### pi
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
pi install git:github.com/bcmyguest/oncebitten
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### opencode
|
|
66
|
+
|
|
67
|
+
opencode loads plugins from npm or local files only, so install the command line below, then:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
oncebitten hooks install --host opencode --scope user
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Do not run `hooks install` for a host whose plugin is installed: each event would be captured twice.
|
|
74
|
+
|
|
75
|
+
### Command line
|
|
76
|
+
|
|
77
|
+
Any one of these puts `oncebitten` and `oncebitten-checker` on your `PATH`. None needs a Rust toolchain except the last.
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
uvx oncebitten --version # run once, no install (PyPI)
|
|
81
|
+
uv tool install oncebitten # install (PyPI)
|
|
82
|
+
npx oncebitten --version # run once (npm)
|
|
83
|
+
npm install -g oncebitten # install (npm)
|
|
84
|
+
curl -fsSL https://raw.githubusercontent.com/bcmyguest/oncebitten/main/install.sh | sh # macOS, Linux
|
|
85
|
+
irm https://raw.githubusercontent.com/bcmyguest/oncebitten/main/install.ps1 | iex # Windows PowerShell
|
|
86
|
+
cargo install --locked --git https://github.com/bcmyguest/oncebitten oncebitten # from source; needs a C compiler
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`install.sh` and `install.ps1` verify the release's SHA-256 before installing. Pinning, mirrors and variables: [docs/install.md](docs/install.md).
|
|
90
|
+
|
|
91
|
+
### Teams
|
|
92
|
+
|
|
93
|
+
Pin one version for everyone so the gate behaves the same on every machine and in CI.
|
|
94
|
+
|
|
95
|
+
```toml
|
|
96
|
+
# pyproject.toml
|
|
97
|
+
[dependency-groups]
|
|
98
|
+
dev = ["oncebitten==0.1.0"]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{ "devDependencies": { "oncebitten": "0.1.0" } }
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
# .pre-commit-config.yaml: prebuilt binary from PyPI, no Rust toolchain
|
|
107
|
+
repos:
|
|
108
|
+
- repo: https://github.com/bcmyguest/oncebitten
|
|
109
|
+
rev: v0.1.0
|
|
110
|
+
hooks:
|
|
111
|
+
- id: oncebitten-gate-python
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Usage
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
oncebitten config show # merged configuration as TOML
|
|
118
|
+
oncebitten config show --origin # annotate each value with its layer
|
|
119
|
+
oncebitten config path # configuration files it reads
|
|
120
|
+
oncebitten check # run active rules against changes since HEAD
|
|
121
|
+
oncebitten replay <rule-id> # prove a rule in an OpenShell sandbox; writes proof.json
|
|
122
|
+
oncebitten gate pr --base origin/main # CI gate: new violations of active block rules
|
|
123
|
+
oncebitten baseline update # accept today's violations in .oncebitten/baseline.json
|
|
124
|
+
oncebitten hooks install --host claude --scope user # capture and steer hooks; also codex, cursor, copilot, opencode, pi
|
|
125
|
+
oncebitten hooks uninstall --host claude --scope user
|
|
126
|
+
oncebitten evidence list # mistake clusters seen in 2+ sessions, or stated once
|
|
127
|
+
oncebitten evidence reject <id> --reason "one-off"
|
|
128
|
+
oncebitten stats [--since <days>] [--json] # read-only funnel: signals to clusters to drafts to decisions
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Rules: [docs/rules.md](docs/rules.md). Example rules: [examples/](examples/README.md). Gate, proofs and baseline: [docs/gate.md](docs/gate.md). Agent-facing summary: [llms.txt](llms.txt).
|
|
132
|
+
|
|
133
|
+
Funnel counts per mistake class: [docs/stats.md](docs/stats.md).
|
|
134
|
+
|
|
135
|
+
Hooks record prompts and tool outcomes locally: [docs/capture.md](docs/capture.md) lists what each host reports and how each was verified. [docs/evidence.md](docs/evidence.md) covers clustering and rejections.
|
|
136
|
+
|
|
137
|
+
Steer rules cover lessons git cannot see, such as running `sudo`: they inform or deny the agent at the tool call. [docs/steer.md](docs/steer.md) lists what each host supports.
|
|
138
|
+
|
|
139
|
+
Settings and their precedence: [docs/configuration.md](docs/configuration.md).
|
|
140
|
+
|
|
141
|
+
## Gate
|
|
142
|
+
|
|
143
|
+
```yaml
|
|
144
|
+
# .pre-commit-config.yaml
|
|
145
|
+
repos:
|
|
146
|
+
- repo: https://github.com/bcmyguest/oncebitten
|
|
147
|
+
rev: <commit or tag>
|
|
148
|
+
hooks:
|
|
149
|
+
- id: oncebitten-gate-python # prebuilt wheel; or oncebitten-gate (builds from source), oncebitten-gate-system (installed binary)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
pre-commit install --hook-type pre-push
|
|
154
|
+
oncebitten rules sync # writes .oncebitten/rules.lock; commit it
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
The gate needs [pre-commit](https://pre-commit.com) 3.2.0 or later, [prek](https://github.com/j178/prek) 0.1.5 or later, or [uv](https://docs.astral.sh/uv/)'s `uvx` to run either. CI templates for GitHub Actions, GitLab CI and Azure Pipelines: [templates/](templates/). In CI, run `oncebitten rules sync --frozen` before the gate.
|
|
158
|
+
|
|
159
|
+
## Development
|
|
160
|
+
|
|
161
|
+
Build and test with `cargo test`; CI also runs `cargo fmt --check` and `cargo clippy --all-targets -- -D warnings` on Linux, macOS and Windows. The build order and open steps live in [PLAN.md](PLAN.md).
|
|
162
|
+
|
|
163
|
+
This repository gates itself with the shipped `rust-no-unwrap` example, enabled in [`.oncebitten/config.toml`](.oncebitten/config.toml). It has no baseline: the gate fails on any non-test `.unwrap()` in the crate, and test code is exempt.
|
|
164
|
+
|
|
165
|
+
## License
|
|
166
|
+
|
|
167
|
+
Apache-2.0. See [LICENSE](LICENSE).
|
|
168
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
oncebitten-0.1.0.data/scripts/oncebitten-checker.exe,sha256=_ItoFJ9R1PsihdjYb-Xnv6mKF4J5DuPPUpUrXWGv0Ls,11376128
|
|
2
|
+
oncebitten-0.1.0.data/scripts/oncebitten.exe,sha256=74TzqD2x-MjQ26h5r72Wfs57xppsAGhoEjPJhhSbrw0,15183360
|
|
3
|
+
oncebitten-0.1.0.dist-info/METADATA,sha256=TK6rx_x9eFALLSJyzq2Xv0iEjETFJobeYcduYjp8wPM,7100
|
|
4
|
+
oncebitten-0.1.0.dist-info/WHEEL,sha256=Uvw7WSmy7Kj2FBk8Va4L_dq4MDW8X5Ynby-pOX3ZNS0,94
|
|
5
|
+
oncebitten-0.1.0.dist-info/sboms/oncebitten.cyclonedx.json,sha256=aRyaKAXFgxDVzoRFwoP7W-qYOPhfZFpxIHHIcyq_PKU,154409
|
|
6
|
+
oncebitten-0.1.0.dist-info/RECORD,,
|