pushback 0.1.1__tar.gz → 0.1.3__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.
- {pushback-0.1.1/src/pushback.egg-info → pushback-0.1.3}/PKG-INFO +38 -9
- {pushback-0.1.1 → pushback-0.1.3}/README.md +37 -8
- {pushback-0.1.1 → pushback-0.1.3}/pyproject.toml +1 -1
- pushback-0.1.3/src/pushback/__init__.py +1 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback/cli.py +276 -231
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback/extract.py +1 -0
- pushback-0.1.3/src/pushback/label.py +232 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback/rules.py +215 -154
- {pushback-0.1.1 → pushback-0.1.3/src/pushback.egg-info}/PKG-INFO +38 -9
- {pushback-0.1.1 → pushback-0.1.3}/tests/test_pushback.py +143 -2
- pushback-0.1.1/src/pushback/__init__.py +0 -1
- pushback-0.1.1/src/pushback/label.py +0 -122
- {pushback-0.1.1 → pushback-0.1.3}/LICENSE +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/setup.cfg +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback/audit.py +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback/export.py +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback/prompt.py +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback/report.py +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback/stats.py +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback.egg-info/SOURCES.txt +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback.egg-info/dependency_links.txt +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback.egg-info/entry_points.txt +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback.egg-info/requires.txt +0 -0
- {pushback-0.1.1 → pushback-0.1.3}/src/pushback.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pushback
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: How often do you correct your coding agent, and at what kind of work? Measured from your own Claude Code transcripts.
|
|
5
5
|
Author: Intikhab Azam
|
|
6
6
|
License: MIT
|
|
@@ -54,7 +54,7 @@ shows what you use your AI coding agent for, how often you correct it on each
|
|
|
54
54
|
kind of work (code, writing, media, research, ops, meta), and how often a
|
|
55
55
|
correction needs correcting again. It drafts
|
|
56
56
|
**CLAUDE.md rules** from the corrections you keep repeating, shows which of
|
|
57
|
-
your existing rules
|
|
57
|
+
your existing rules those corrections run into, and exports your corrections as
|
|
58
58
|
**preference pairs** (prompt / chosen / rejected). A hand-audit step tells you
|
|
59
59
|
how far to trust every number.
|
|
60
60
|
|
|
@@ -67,7 +67,7 @@ pip install pushback
|
|
|
67
67
|
The author's own 1,633 messages to Claude Code:
|
|
68
68
|
|
|
69
69
|
<p align="center">
|
|
70
|
-
<img src="assets/rates.svg" width="100%" alt="Correction rate by task: media 43.0%, writing 24.7%, research 6.9%, code 5.9%, meta 4.7%, ops 4.5%. One in three corrections needed a second correction.
|
|
70
|
+
<img src="assets/rates.svg" width="100%" alt="Correction rate by task: media 43.0%, writing 24.7%, research 6.9%, code 5.9%, meta 4.7%, ops 4.5%. One in three corrections needed a second correction. One existing rule kept getting broken after it was written.">
|
|
71
71
|
</p>
|
|
72
72
|
|
|
73
73
|
| task | messages | share of use | corrections | rate | 95% CI | corrected again |
|
|
@@ -94,7 +94,7 @@ Most corrected topics (at least 5 messages each):
|
|
|
94
94
|
|
|
95
95
|
- Against 91 hand-checked messages the correction labels had **precision 0.97 and recall 0.80**. Topic labels were spot-checked, not audited.
|
|
96
96
|
- **1 in 3 corrections needed a second one.** 70 of 201 fixes got corrected again (35%), 41% on writing and 44% on images.
|
|
97
|
-
- **
|
|
97
|
+
- **1 rule the author had already written kept getting broken**: "images must not look AI-generated" was corrected 3 more times after it was written. Two other matching rules turned out to be written *because of* the corrections, which is why every rule now shows its evidence dates.
|
|
98
98
|
|
|
99
99
|
> [!NOTE]
|
|
100
100
|
> These rates describe a workflow, not a model. The author's code work runs
|
|
@@ -121,10 +121,20 @@ pushback export # your corrections as prompt/chosen/rejected pairs
|
|
|
121
121
|
`ant auth login` profile. It defaults to `claude-opus-5` at low effort; change
|
|
122
122
|
it with `--model`. To send through a gateway, set `ANTHROPIC_BASE_URL`.
|
|
123
123
|
|
|
124
|
+
> [!TIP]
|
|
125
|
+
> **No API key?** Every step works without one:
|
|
126
|
+
> ```bash
|
|
127
|
+
> pushback label --prompt-file # writes the labelling job as batch files
|
|
128
|
+
> # in Claude Code: "read <path it prints>/INSTRUCTIONS.md and follow it"
|
|
129
|
+
> pushback label --from-responses # reads the answers back, with the same checks as the API path
|
|
130
|
+
> ```
|
|
131
|
+
> Your messages are still read by Claude, through Claude Code on your
|
|
132
|
+
> subscription. Unanswered or broken batches are listed and stay unlabelled.
|
|
133
|
+
|
|
124
134
|
| command | what it does | leaves your machine? |
|
|
125
135
|
|---|---|---|
|
|
126
136
|
| `extract` | pulls the messages you typed, plus full agent turns, out of transcripts | no |
|
|
127
|
-
| `label` | tags each message with a task
|
|
137
|
+
| `label` | tags each message with a task, a topic and whether it's a correction | yes: to the API after asking, or through Claude Code with `--prompt-file` |
|
|
128
138
|
| `audit` | shows you a stratified sample to judge by hand | no |
|
|
129
139
|
| `report` | what you use the agent for, how often you correct it per task and per topic (frontend, cli-tool, social-post, ...), how often a fix gets corrected again, with 95% intervals | no |
|
|
130
140
|
| `rules` | groups recurring corrections into CLAUDE.md rules | yes, or no with `--prompt-file` |
|
|
@@ -167,22 +177,35 @@ pushback rules # drafts rules into pushback-dat
|
|
|
167
177
|
pushback rules --existing CLAUDE.md notes/*.md # also check against the rules you already have
|
|
168
178
|
pushback rules --prompt-file # no API key? writes the request to a file instead
|
|
169
179
|
pushback rules --from-response reply.json # ...and reads Claude's answer back
|
|
180
|
+
pushback rules --runs 3 # ask 3 times, keep only the rules that keep coming back
|
|
170
181
|
```
|
|
171
182
|
|
|
172
183
|
The model groups corrections that share a cause and drafts one CLAUDE.md
|
|
173
184
|
instruction per group. Support is counted from the correction ids it cites,
|
|
174
185
|
not from its own numbers, and a rule needs at least 3 real corrections.
|
|
175
186
|
|
|
187
|
+
**Stable rules.** A model won't write the same rules twice. With `--runs 3`
|
|
188
|
+
(or three replies passed to `--from-response`), pushback matches rules across
|
|
189
|
+
runs by the corrections they cite, not by their wording, and keeps only the
|
|
190
|
+
ones that come back in at least 2 of 3 runs. Each rule shows how many runs it
|
|
191
|
+
appeared in, and the unstable ones are listed separately instead of vanishing.
|
|
192
|
+
|
|
193
|
+
On the author's 214 corrections, three independent runs wrote 12, 10 and 7
|
|
194
|
+
rules: 16 distinct rules in total. 5 came back in all three runs, 3 in two,
|
|
195
|
+
and **8 showed up only once**. A single run mixes real rules with one-offs.
|
|
196
|
+
|
|
176
197
|
When you pass your existing rule files, the output splits in two:
|
|
177
198
|
|
|
178
|
-
- **Rules you already have that
|
|
179
|
-
|
|
180
|
-
|
|
199
|
+
- **Rules you already have that these corrections hit.** If the corrections
|
|
200
|
+
came after you wrote the rule, the rule isn't working: it's too vague, or the
|
|
201
|
+
agent doesn't read it at the right moment. pushback can't know when you wrote
|
|
202
|
+
a rule, so check the evidence dates.
|
|
181
203
|
- **New rules to consider.** Recurring corrections with no rule behind them.
|
|
182
204
|
|
|
183
205
|
> [!TIP]
|
|
184
206
|
> No API key? `--prompt-file` writes the whole request to `rules-prompt.md`.
|
|
185
207
|
> Ask Claude Code to answer it, save the JSON reply, then run `--from-response`.
|
|
208
|
+
> `label` has the same option, so the whole pipeline runs without a key.
|
|
186
209
|
|
|
187
210
|
## Export your corrections as preference pairs
|
|
188
211
|
|
|
@@ -224,7 +247,8 @@ answer to pair with.
|
|
|
224
247
|
- `extract`, `audit`, `report` and `export` never leave your machine. `report` prints counts only.
|
|
225
248
|
- `label` and `rules` send each message, plus the end of the agent reply before
|
|
226
249
|
it, to the model provider. If your logs contain client work, check that
|
|
227
|
-
provider's data policy first. Both ask before they send anything.
|
|
250
|
+
provider's data policy first. Both ask before they send anything. With
|
|
251
|
+
`--prompt-file` nothing is sent by pushback; Claude Code reads the files instead.
|
|
228
252
|
- `pushback-data/` holds your raw messages. It's in `.gitignore`. Keep it there.
|
|
229
253
|
- Your transcripts probably contain other people's information. Keep exports
|
|
230
254
|
local unless every conversation in them is yours to share.
|
|
@@ -251,6 +275,11 @@ answer to pair with.
|
|
|
251
275
|
- Claude Code transcripts only, for now. Codex and Cursor logs are not read yet.
|
|
252
276
|
- Task type is judged from the last agent reply and your message, not the whole session.
|
|
253
277
|
- The rubric was tuned on one person's logs.
|
|
278
|
+
- Labels aren't perfectly stable between runs. Two independent runs on the same
|
|
279
|
+
60 messages agreed on **correction 93%** of the time, on **task 70%**, and on
|
|
280
|
+
**topic 76%** when the task matched. Disagreements sit at fuzzy edges
|
|
281
|
+
(writing vs meta, code vs ops), mostly short "ok do that" messages. Treat
|
|
282
|
+
small differences between topics as noise.
|
|
254
283
|
|
|
255
284
|
## Contributing
|
|
256
285
|
|
|
@@ -27,7 +27,7 @@ shows what you use your AI coding agent for, how often you correct it on each
|
|
|
27
27
|
kind of work (code, writing, media, research, ops, meta), and how often a
|
|
28
28
|
correction needs correcting again. It drafts
|
|
29
29
|
**CLAUDE.md rules** from the corrections you keep repeating, shows which of
|
|
30
|
-
your existing rules
|
|
30
|
+
your existing rules those corrections run into, and exports your corrections as
|
|
31
31
|
**preference pairs** (prompt / chosen / rejected). A hand-audit step tells you
|
|
32
32
|
how far to trust every number.
|
|
33
33
|
|
|
@@ -40,7 +40,7 @@ pip install pushback
|
|
|
40
40
|
The author's own 1,633 messages to Claude Code:
|
|
41
41
|
|
|
42
42
|
<p align="center">
|
|
43
|
-
<img src="assets/rates.svg" width="100%" alt="Correction rate by task: media 43.0%, writing 24.7%, research 6.9%, code 5.9%, meta 4.7%, ops 4.5%. One in three corrections needed a second correction.
|
|
43
|
+
<img src="assets/rates.svg" width="100%" alt="Correction rate by task: media 43.0%, writing 24.7%, research 6.9%, code 5.9%, meta 4.7%, ops 4.5%. One in three corrections needed a second correction. One existing rule kept getting broken after it was written.">
|
|
44
44
|
</p>
|
|
45
45
|
|
|
46
46
|
| task | messages | share of use | corrections | rate | 95% CI | corrected again |
|
|
@@ -67,7 +67,7 @@ Most corrected topics (at least 5 messages each):
|
|
|
67
67
|
|
|
68
68
|
- Against 91 hand-checked messages the correction labels had **precision 0.97 and recall 0.80**. Topic labels were spot-checked, not audited.
|
|
69
69
|
- **1 in 3 corrections needed a second one.** 70 of 201 fixes got corrected again (35%), 41% on writing and 44% on images.
|
|
70
|
-
- **
|
|
70
|
+
- **1 rule the author had already written kept getting broken**: "images must not look AI-generated" was corrected 3 more times after it was written. Two other matching rules turned out to be written *because of* the corrections, which is why every rule now shows its evidence dates.
|
|
71
71
|
|
|
72
72
|
> [!NOTE]
|
|
73
73
|
> These rates describe a workflow, not a model. The author's code work runs
|
|
@@ -94,10 +94,20 @@ pushback export # your corrections as prompt/chosen/rejected pairs
|
|
|
94
94
|
`ant auth login` profile. It defaults to `claude-opus-5` at low effort; change
|
|
95
95
|
it with `--model`. To send through a gateway, set `ANTHROPIC_BASE_URL`.
|
|
96
96
|
|
|
97
|
+
> [!TIP]
|
|
98
|
+
> **No API key?** Every step works without one:
|
|
99
|
+
> ```bash
|
|
100
|
+
> pushback label --prompt-file # writes the labelling job as batch files
|
|
101
|
+
> # in Claude Code: "read <path it prints>/INSTRUCTIONS.md and follow it"
|
|
102
|
+
> pushback label --from-responses # reads the answers back, with the same checks as the API path
|
|
103
|
+
> ```
|
|
104
|
+
> Your messages are still read by Claude, through Claude Code on your
|
|
105
|
+
> subscription. Unanswered or broken batches are listed and stay unlabelled.
|
|
106
|
+
|
|
97
107
|
| command | what it does | leaves your machine? |
|
|
98
108
|
|---|---|---|
|
|
99
109
|
| `extract` | pulls the messages you typed, plus full agent turns, out of transcripts | no |
|
|
100
|
-
| `label` | tags each message with a task
|
|
110
|
+
| `label` | tags each message with a task, a topic and whether it's a correction | yes: to the API after asking, or through Claude Code with `--prompt-file` |
|
|
101
111
|
| `audit` | shows you a stratified sample to judge by hand | no |
|
|
102
112
|
| `report` | what you use the agent for, how often you correct it per task and per topic (frontend, cli-tool, social-post, ...), how often a fix gets corrected again, with 95% intervals | no |
|
|
103
113
|
| `rules` | groups recurring corrections into CLAUDE.md rules | yes, or no with `--prompt-file` |
|
|
@@ -140,22 +150,35 @@ pushback rules # drafts rules into pushback-dat
|
|
|
140
150
|
pushback rules --existing CLAUDE.md notes/*.md # also check against the rules you already have
|
|
141
151
|
pushback rules --prompt-file # no API key? writes the request to a file instead
|
|
142
152
|
pushback rules --from-response reply.json # ...and reads Claude's answer back
|
|
153
|
+
pushback rules --runs 3 # ask 3 times, keep only the rules that keep coming back
|
|
143
154
|
```
|
|
144
155
|
|
|
145
156
|
The model groups corrections that share a cause and drafts one CLAUDE.md
|
|
146
157
|
instruction per group. Support is counted from the correction ids it cites,
|
|
147
158
|
not from its own numbers, and a rule needs at least 3 real corrections.
|
|
148
159
|
|
|
160
|
+
**Stable rules.** A model won't write the same rules twice. With `--runs 3`
|
|
161
|
+
(or three replies passed to `--from-response`), pushback matches rules across
|
|
162
|
+
runs by the corrections they cite, not by their wording, and keeps only the
|
|
163
|
+
ones that come back in at least 2 of 3 runs. Each rule shows how many runs it
|
|
164
|
+
appeared in, and the unstable ones are listed separately instead of vanishing.
|
|
165
|
+
|
|
166
|
+
On the author's 214 corrections, three independent runs wrote 12, 10 and 7
|
|
167
|
+
rules: 16 distinct rules in total. 5 came back in all three runs, 3 in two,
|
|
168
|
+
and **8 showed up only once**. A single run mixes real rules with one-offs.
|
|
169
|
+
|
|
149
170
|
When you pass your existing rule files, the output splits in two:
|
|
150
171
|
|
|
151
|
-
- **Rules you already have that
|
|
152
|
-
|
|
153
|
-
|
|
172
|
+
- **Rules you already have that these corrections hit.** If the corrections
|
|
173
|
+
came after you wrote the rule, the rule isn't working: it's too vague, or the
|
|
174
|
+
agent doesn't read it at the right moment. pushback can't know when you wrote
|
|
175
|
+
a rule, so check the evidence dates.
|
|
154
176
|
- **New rules to consider.** Recurring corrections with no rule behind them.
|
|
155
177
|
|
|
156
178
|
> [!TIP]
|
|
157
179
|
> No API key? `--prompt-file` writes the whole request to `rules-prompt.md`.
|
|
158
180
|
> Ask Claude Code to answer it, save the JSON reply, then run `--from-response`.
|
|
181
|
+
> `label` has the same option, so the whole pipeline runs without a key.
|
|
159
182
|
|
|
160
183
|
## Export your corrections as preference pairs
|
|
161
184
|
|
|
@@ -197,7 +220,8 @@ answer to pair with.
|
|
|
197
220
|
- `extract`, `audit`, `report` and `export` never leave your machine. `report` prints counts only.
|
|
198
221
|
- `label` and `rules` send each message, plus the end of the agent reply before
|
|
199
222
|
it, to the model provider. If your logs contain client work, check that
|
|
200
|
-
provider's data policy first. Both ask before they send anything.
|
|
223
|
+
provider's data policy first. Both ask before they send anything. With
|
|
224
|
+
`--prompt-file` nothing is sent by pushback; Claude Code reads the files instead.
|
|
201
225
|
- `pushback-data/` holds your raw messages. It's in `.gitignore`. Keep it there.
|
|
202
226
|
- Your transcripts probably contain other people's information. Keep exports
|
|
203
227
|
local unless every conversation in them is yours to share.
|
|
@@ -224,6 +248,11 @@ answer to pair with.
|
|
|
224
248
|
- Claude Code transcripts only, for now. Codex and Cursor logs are not read yet.
|
|
225
249
|
- Task type is judged from the last agent reply and your message, not the whole session.
|
|
226
250
|
- The rubric was tuned on one person's logs.
|
|
251
|
+
- Labels aren't perfectly stable between runs. Two independent runs on the same
|
|
252
|
+
60 messages agreed on **correction 93%** of the time, on **task 70%**, and on
|
|
253
|
+
**topic 76%** when the task matched. Disagreements sit at fuzzy edges
|
|
254
|
+
(writing vs meta, code vs ops), mostly short "ok do that" messages. Treat
|
|
255
|
+
small differences between topics as noise.
|
|
227
256
|
|
|
228
257
|
## Contributing
|
|
229
258
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pushback"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.3"
|
|
8
8
|
description = "How often do you correct your coding agent, and at what kind of work? Measured from your own Claude Code transcripts."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.3"
|