git-paoding 0.1.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.
- git_paoding-0.1.0/PKG-INFO +351 -0
- git_paoding-0.1.0/README.md +335 -0
- git_paoding-0.1.0/pyproject.toml +73 -0
- git_paoding-0.1.0/pyproject.toml.orig +58 -0
- git_paoding-0.1.0/src/git_paoding/__init__.py +32 -0
- git_paoding-0.1.0/src/git_paoding/_agent_plugins/__init__.py +1 -0
- git_paoding-0.1.0/src/git_paoding/_agent_plugins/git-paoding/.claude-plugin/plugin.json +12 -0
- git_paoding-0.1.0/src/git_paoding/_agent_plugins/git-paoding/.codex-plugin/plugin.json +22 -0
- git_paoding-0.1.0/src/git_paoding/_agent_plugins/git-paoding/skills/git-paoding/SKILL.md +206 -0
- git_paoding-0.1.0/src/git_paoding/agent_install.py +113 -0
- git_paoding-0.1.0/src/git_paoding/api.py +383 -0
- git_paoding-0.1.0/src/git_paoding/cli/__init__.py +1 -0
- git_paoding-0.1.0/src/git_paoding/cli/facade.py +133 -0
- git_paoding-0.1.0/src/git_paoding/cli/main.py +277 -0
- git_paoding-0.1.0/src/git_paoding/cli/render.py +205 -0
- git_paoding-0.1.0/src/git_paoding/core/__init__.py +1 -0
- git_paoding-0.1.0/src/git_paoding/core/diffatoms.py +208 -0
- git_paoding-0.1.0/src/git_paoding/core/model.py +292 -0
- git_paoding-0.1.0/src/git_paoding/core/projection.py +376 -0
- git_paoding-0.1.0/src/git_paoding/core/publish.py +644 -0
- git_paoding-0.1.0/src/git_paoding/core/reconcile.py +220 -0
- git_paoding-0.1.0/src/git_paoding/core/selectors.py +279 -0
- git_paoding-0.1.0/src/git_paoding/github/__init__.py +1 -0
- git_paoding-0.1.0/src/git_paoding/github/backend.py +53 -0
- git_paoding-0.1.0/src/git_paoding/github/gh_cli.py +339 -0
- git_paoding-0.1.0/src/git_paoding/github/lifecycle.py +123 -0
- git_paoding-0.1.0/src/git_paoding/github/prbody.py +281 -0
- git_paoding-0.1.0/src/git_paoding/gitio/__init__.py +49 -0
- git_paoding-0.1.0/src/git_paoding/gitio/diffparse.py +273 -0
- git_paoding-0.1.0/src/git_paoding/gitio/plumbing.py +170 -0
- git_paoding-0.1.0/src/git_paoding/gitio/refs.py +145 -0
- git_paoding-0.1.0/src/git_paoding/gitio/runner.py +133 -0
- git_paoding-0.1.0/src/git_paoding/py.typed +1 -0
- git_paoding-0.1.0/src/git_paoding/store/__init__.py +6 -0
- git_paoding-0.1.0/src/git_paoding/store/jsonstore.py +142 -0
- git_paoding-0.1.0/src/git_paoding/store/lock.py +165 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: git-paoding
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Semantic review slicing for large agent-generated changes
|
|
5
|
+
Requires-Dist: click>=8.1
|
|
6
|
+
Requires-Dist: pydantic>=2
|
|
7
|
+
Requires-Dist: hypothesis>=6 ; extra == 'dev'
|
|
8
|
+
Requires-Dist: mypy>=1.15 ; extra == 'dev'
|
|
9
|
+
Requires-Dist: pre-commit>=4 ; extra == 'dev'
|
|
10
|
+
Requires-Dist: pytest>=8 ; extra == 'dev'
|
|
11
|
+
Requires-Dist: pytest-cov>=6 ; extra == 'dev'
|
|
12
|
+
Requires-Dist: ruff>=0.11 ; extra == 'dev'
|
|
13
|
+
Requires-Python: >=3.11
|
|
14
|
+
Provides-Extra: dev
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# git-paoding
|
|
18
|
+
|
|
19
|
+
<!-- cspell:words paoding pipx PAODING -->
|
|
20
|
+
|
|
21
|
+
Agent writes globally. Humans review locally.
|
|
22
|
+
|
|
23
|
+
`git-paoding` lets a coding agent keep one coherent implementation on one
|
|
24
|
+
canonical integration branch while presenting the final change as several small,
|
|
25
|
+
semantic Draft GitHub pull requests. Those slice PRs are review projections:
|
|
26
|
+
they help people understand one concern at a time, but they are not development
|
|
27
|
+
branches or merge targets.
|
|
28
|
+
|
|
29
|
+
The canonical integration PR remains authoritative. It contains the complete
|
|
30
|
+
change, runs CI, receives final approval, and merges. Review feedback goes back
|
|
31
|
+
into the canonical branch; a later `git-paoding publish` refreshes the
|
|
32
|
+
projections without creating a branch stack to restack.
|
|
33
|
+
|
|
34
|
+
The name comes from 庖丁解牛 (_Chef Ding carves the ox_): cutting along the
|
|
35
|
+
natural joints.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Install the CLI and agent workflow
|
|
39
|
+
|
|
40
|
+
`git-paoding` is designed for coding agents rather than as a human-operated UI.
|
|
41
|
+
A complete installation has two parts:
|
|
42
|
+
|
|
43
|
+
1. The Python package provides the deterministic `git-paoding` executable.
|
|
44
|
+
2. The agent skill or plugin teaches Codex or Claude Code when and how to use it.
|
|
45
|
+
|
|
46
|
+
Installing only the Python package does not make an agent discover the workflow.
|
|
47
|
+
Install the CLI and one agent integration together.
|
|
48
|
+
|
|
49
|
+
### Give this page to an agent
|
|
50
|
+
|
|
51
|
+
You can send an agent this repository URL and the following request:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
Install git-paoding by following the repository README. Install the Python CLI
|
|
55
|
+
and the integration for the agent you are running as, verify both, and then
|
|
56
|
+
explain the workflow. Do not initialize a session, push, publish, or change any
|
|
57
|
+
repository until I give you a specific review-slicing task.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 1. Install the CLI
|
|
61
|
+
|
|
62
|
+
`git-paoding` requires Python 3.11 or newer, Git, and
|
|
63
|
+
[GitHub CLI](https://cli.github.com/) 2.45.0 or newer. GitHub operations reuse
|
|
64
|
+
the account and credentials configured by `gh`; authenticate before initializing
|
|
65
|
+
a session:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
gh auth login
|
|
69
|
+
gh auth status
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Install the released package with one of these methods. `uv tool` or `pipx` is
|
|
73
|
+
recommended because it keeps the agent-facing command isolated:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
uv tool install git-paoding
|
|
77
|
+
pipx install git-paoding
|
|
78
|
+
python -m pip install git-paoding
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Choose one installation method, not all three. Confirm the explicit command and
|
|
82
|
+
Git's external-subcommand form resolve to the same release:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
git-paoding --version
|
|
86
|
+
git paoding --version
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
If the first PyPI release is not available yet, install the current GitHub
|
|
90
|
+
version directly:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
uv tool install "git+https://github.com/NagisaVon/git-paoding.git"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
To install from a source checkout instead:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
git clone https://github.com/NagisaVon/git-paoding.git
|
|
100
|
+
cd git-paoding
|
|
101
|
+
uv sync --extra dev --locked
|
|
102
|
+
uv run git-paoding --help
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 2. Install the agent integration
|
|
106
|
+
|
|
107
|
+
Choose one of the following installation methods for each agent. The bundled
|
|
108
|
+
standalone skill and the marketplace plugin provide the same instructions, so
|
|
109
|
+
installing both for the same agent is unnecessary.
|
|
110
|
+
|
|
111
|
+
#### Option A: install the bundled standalone skill
|
|
112
|
+
|
|
113
|
+
The Python distribution carries the same `SKILL.md` used by both plugins. The
|
|
114
|
+
following commands copy that bundled skill into the official personal skill
|
|
115
|
+
directory and work without a plugin UI:
|
|
116
|
+
|
|
117
|
+
For Codex:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
git-paoding agent install --target codex --scope user
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
For Claude Code:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
git-paoding agent install --target claude --scope user
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
To install both, repeat `--target` in one command:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
git-paoding agent install --target codex --target claude --scope user
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Use `--scope project` to install into the current repository instead of the
|
|
136
|
+
current user's global skill directory. Re-run with `--force` after upgrading if
|
|
137
|
+
the installed skill was modified locally. Codex installs to
|
|
138
|
+
`.agents/skills/git-paoding`; Claude Code installs to
|
|
139
|
+
`.claude/skills/git-paoding` (under the home directory for user scope).
|
|
140
|
+
|
|
141
|
+
Verify the skill appears in Codex with `/skills`. In Claude Code, run `/skills`
|
|
142
|
+
or invoke `/git-paoding` directly. Restart the agent only if a newly created
|
|
143
|
+
top-level skill directory is not detected in the current session.
|
|
144
|
+
|
|
145
|
+
#### Option B: install through the plugin marketplace
|
|
146
|
+
|
|
147
|
+
This repository is also a marketplace for a skill-only `git-paoding` plugin.
|
|
148
|
+
The Codex and Claude Code manifests share one packaged skill, so their behavior
|
|
149
|
+
does not drift.
|
|
150
|
+
|
|
151
|
+
For Codex, add the GitHub marketplace:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
codex plugin marketplace add NagisaVon/git-paoding
|
|
155
|
+
codex plugin add git-paoding@git-paoding
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The same plugin then appears in the Plugins Directory in the ChatGPT desktop
|
|
159
|
+
app. Invoke its skill as `$git-paoding`.
|
|
160
|
+
|
|
161
|
+
For Claude Code, the complete installation is available from the CLI:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
claude plugin marketplace add NagisaVon/git-paoding
|
|
165
|
+
claude plugin install git-paoding@git-paoding --scope user
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Run `/reload-plugins` if Claude Code asks for it, then invoke the plugin skill as
|
|
169
|
+
`/git-paoding:git-paoding`.
|
|
170
|
+
|
|
171
|
+
### 3. Ask the agent to prepare review slices
|
|
172
|
+
|
|
173
|
+
For Codex:
|
|
174
|
+
|
|
175
|
+
```text
|
|
176
|
+
$git-paoding Prepare semantic review slices for the complete committed change
|
|
177
|
+
on my current branch, using origin/main as the base. Inspect and propose the
|
|
178
|
+
slice assignments first. Do not push or publish until I approve the plan.
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
For the Claude Code plugin:
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
/git-paoding:git-paoding Prepare semantic review slices for the complete
|
|
185
|
+
committed change on my current branch, using origin/main as the base. Inspect
|
|
186
|
+
and propose the slice assignments first. Do not push or publish until I approve
|
|
187
|
+
the plan.
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Run a review-slicing session
|
|
191
|
+
|
|
192
|
+
After installation, Codex and Claude Code follow the same operational workflow
|
|
193
|
+
below. Their invocation syntax differs (`$git-paoding` in Codex and
|
|
194
|
+
`/git-paoding:git-paoding` for the Claude Code plugin), but both use the same
|
|
195
|
+
`git-paoding` CLI and repository state.
|
|
196
|
+
|
|
197
|
+
Start from the branch that contains the complete, committed implementation. The
|
|
198
|
+
base is pinned when the session is initialized; moving `origin/main` later does
|
|
199
|
+
not silently move that pin.
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
git-paoding init --base origin/main --slice-prefix ABC-123
|
|
203
|
+
git-paoding slice add storage --title "Storage boundary"
|
|
204
|
+
git-paoding slice add tests --title "Storage behavior tests"
|
|
205
|
+
git-paoding status --json
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
`status` is local and read-only. Exit code `2` is expected while it reports
|
|
209
|
+
unassigned or ambiguous atoms. Its JSON includes each atom's ID, path, Base and
|
|
210
|
+
Final ranges, owner, state, and short preview. Use `git-paoding status --full`
|
|
211
|
+
when complete changed-hunk previews are useful.
|
|
212
|
+
|
|
213
|
+
`--slice-prefix` is optional and defaults to `slice`. It changes only generated
|
|
214
|
+
slice PR titles, such as `[ABC-123] Storage boundary`; slice IDs and generated
|
|
215
|
+
refs remain stable. The integration PR title is the canonical branch name.
|
|
216
|
+
|
|
217
|
+
Assign interactively by an atom ID, path, directory, glob, or Final-coordinate
|
|
218
|
+
line range. Broad selectors preserve already-owned atoms unless `--force` is
|
|
219
|
+
passed; explicit atom IDs may reassign their exact atom without it. Every
|
|
220
|
+
selected atom is echoed as assigned or skipped:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
git-paoding assign storage src/storage.py
|
|
224
|
+
git-paoding assign tests tests/test_storage.py
|
|
225
|
+
git-paoding status --json
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
When no action is needed, publish the review projections:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
git-paoding publish
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
`publish` is idempotent. It reconciles first and stops with exit code `2` and no
|
|
235
|
+
remote effects if attribution still needs attention. A clean publish pushes
|
|
236
|
+
generated projection refs, creates or refreshes stable Draft slice PRs, and
|
|
237
|
+
creates or updates the Draft integration PR and its slice index. Operational
|
|
238
|
+
failures use exit code `1`; success uses `0`.
|
|
239
|
+
|
|
240
|
+
Keep the canonical branch available on the selected Git remote before
|
|
241
|
+
publishing. If it has not been pushed, obtain the change owner's approval before
|
|
242
|
+
doing so:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
git push -u origin HEAD
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Three-step agent flow
|
|
249
|
+
|
|
250
|
+
The intended agent loop is:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
git-paoding status --json
|
|
254
|
+
git-paoding assign --batch paoding-assignments.json
|
|
255
|
+
git-paoding publish
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
The batch request uses the frozen versioned contract:
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
{
|
|
262
|
+
"contract_version": 0,
|
|
263
|
+
"assignments": {
|
|
264
|
+
"storage": ["src/storage.py"],
|
|
265
|
+
"tests": ["tests/test_storage.py"]
|
|
266
|
+
},
|
|
267
|
+
"force": false
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Batch assignment is all-or-nothing: an unknown slice, invalid selector, or
|
|
272
|
+
cross-slice conflict rejects the entire request. Set the JSON `force` field to
|
|
273
|
+
`true` when a batch is intentionally repartitioning already-owned atoms; do not
|
|
274
|
+
combine the interactive `--force` option with `--batch`. The batch plan is an
|
|
275
|
+
ordinary local input file rather than session metadata; keep it untracked or
|
|
276
|
+
manage it according to the repository's own policy.
|
|
277
|
+
|
|
278
|
+
For targeted review feedback, focus may provide a default owner for genuinely
|
|
279
|
+
new atoms without overwriting confidently matched ownership:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
git-paoding focus storage
|
|
283
|
+
git-paoding status --json
|
|
284
|
+
git-paoding focus --clear
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
## What reviewers should know
|
|
288
|
+
|
|
289
|
+
A slice PR is a view onto one semantic part of the final integrated change.
|
|
290
|
+
Different slices may touch different regions of the same file, and one slice may
|
|
291
|
+
rely on code shown by another. A slice is not required to build or test by
|
|
292
|
+
itself.
|
|
293
|
+
|
|
294
|
+
Every slice PR is Draft and carries a
|
|
295
|
+
**DO NOT MERGE — review projection only** warning because:
|
|
296
|
+
|
|
297
|
+
- Its generated base and head refs are disposable projections.
|
|
298
|
+
- It is not the branch where implementation work happens.
|
|
299
|
+
- Its review is for comprehension, not authoritative approval.
|
|
300
|
+
- Only the integration PR represents the complete change and real merge target.
|
|
301
|
+
|
|
302
|
+
Use normal GitHub review features on a slice PR: read its narrative, inspect
|
|
303
|
+
Files changed, and leave inline comments. After feedback, update the canonical
|
|
304
|
+
branch and refresh the same slice PR. GitHub may mark comments
|
|
305
|
+
outdated when their lines change; the discussion history and stable PR identity
|
|
306
|
+
remain useful.
|
|
307
|
+
|
|
308
|
+
## Suppress CI for slice PRs
|
|
309
|
+
|
|
310
|
+
Slice projections are review units, not integration units. In consumer
|
|
311
|
+
repositories, filter the `pull_request` workflow to real target branches so
|
|
312
|
+
generated `paoding/.../base` refs do not start authoritative CI. For a
|
|
313
|
+
repository that merges into `main`:
|
|
314
|
+
|
|
315
|
+
```yaml
|
|
316
|
+
name: CI
|
|
317
|
+
|
|
318
|
+
on:
|
|
319
|
+
pull_request:
|
|
320
|
+
branches: [main]
|
|
321
|
+
push:
|
|
322
|
+
branches: [main]
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
GitHub evaluates the `pull_request.branches` filter against the PR's base
|
|
326
|
+
branch. Keep the normal CI and branch-protection requirements on the integration
|
|
327
|
+
PR.
|
|
328
|
+
|
|
329
|
+
## Safety and recovery
|
|
330
|
+
|
|
331
|
+
- Work only on the canonical integration branch. Never check out or edit
|
|
332
|
+
generated `paoding/...` branches.
|
|
333
|
+
- Never merge a slice PR. Close/archive it after the integration PR merges.
|
|
334
|
+
- Do not expect a slice projection to build, test, or pass CI independently.
|
|
335
|
+
- Unassigned or ambiguous atoms are normal recovery states, not metadata
|
|
336
|
+
corruption. Rerun `status`, classify what remains, and publish again.
|
|
337
|
+
- Slice metadata lives in the repository's common Git directory and is not
|
|
338
|
+
committed. Do not delete it as a routine reset.
|
|
339
|
+
- If session metadata is lost, recreate the session and the same stable slice
|
|
340
|
+
IDs. Attribution returns as unassigned, while existing open slice PRs can be
|
|
341
|
+
adopted by their machine markers on the next clean publish.
|
|
342
|
+
- New PR bodies contain only their machine-managed region; the tool does not
|
|
343
|
+
seed a narrative template. Human narrative added outside those delimiters is
|
|
344
|
+
preserved byte-for-byte on refresh.
|
|
345
|
+
|
|
346
|
+
After GitHub reports the integration PR as merged, archive the generated review
|
|
347
|
+
surface without merging any slice PR:
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
git-paoding archive
|
|
351
|
+
```
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
# git-paoding
|
|
2
|
+
|
|
3
|
+
<!-- cspell:words paoding pipx PAODING -->
|
|
4
|
+
|
|
5
|
+
Agent writes globally. Humans review locally.
|
|
6
|
+
|
|
7
|
+
`git-paoding` lets a coding agent keep one coherent implementation on one
|
|
8
|
+
canonical integration branch while presenting the final change as several small,
|
|
9
|
+
semantic Draft GitHub pull requests. Those slice PRs are review projections:
|
|
10
|
+
they help people understand one concern at a time, but they are not development
|
|
11
|
+
branches or merge targets.
|
|
12
|
+
|
|
13
|
+
The canonical integration PR remains authoritative. It contains the complete
|
|
14
|
+
change, runs CI, receives final approval, and merges. Review feedback goes back
|
|
15
|
+
into the canonical branch; a later `git-paoding publish` refreshes the
|
|
16
|
+
projections without creating a branch stack to restack.
|
|
17
|
+
|
|
18
|
+
The name comes from 庖丁解牛 (_Chef Ding carves the ox_): cutting along the
|
|
19
|
+
natural joints.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Install the CLI and agent workflow
|
|
23
|
+
|
|
24
|
+
`git-paoding` is designed for coding agents rather than as a human-operated UI.
|
|
25
|
+
A complete installation has two parts:
|
|
26
|
+
|
|
27
|
+
1. The Python package provides the deterministic `git-paoding` executable.
|
|
28
|
+
2. The agent skill or plugin teaches Codex or Claude Code when and how to use it.
|
|
29
|
+
|
|
30
|
+
Installing only the Python package does not make an agent discover the workflow.
|
|
31
|
+
Install the CLI and one agent integration together.
|
|
32
|
+
|
|
33
|
+
### Give this page to an agent
|
|
34
|
+
|
|
35
|
+
You can send an agent this repository URL and the following request:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
Install git-paoding by following the repository README. Install the Python CLI
|
|
39
|
+
and the integration for the agent you are running as, verify both, and then
|
|
40
|
+
explain the workflow. Do not initialize a session, push, publish, or change any
|
|
41
|
+
repository until I give you a specific review-slicing task.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 1. Install the CLI
|
|
45
|
+
|
|
46
|
+
`git-paoding` requires Python 3.11 or newer, Git, and
|
|
47
|
+
[GitHub CLI](https://cli.github.com/) 2.45.0 or newer. GitHub operations reuse
|
|
48
|
+
the account and credentials configured by `gh`; authenticate before initializing
|
|
49
|
+
a session:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
gh auth login
|
|
53
|
+
gh auth status
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Install the released package with one of these methods. `uv tool` or `pipx` is
|
|
57
|
+
recommended because it keeps the agent-facing command isolated:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
uv tool install git-paoding
|
|
61
|
+
pipx install git-paoding
|
|
62
|
+
python -m pip install git-paoding
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Choose one installation method, not all three. Confirm the explicit command and
|
|
66
|
+
Git's external-subcommand form resolve to the same release:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
git-paoding --version
|
|
70
|
+
git paoding --version
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
If the first PyPI release is not available yet, install the current GitHub
|
|
74
|
+
version directly:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
uv tool install "git+https://github.com/NagisaVon/git-paoding.git"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
To install from a source checkout instead:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
git clone https://github.com/NagisaVon/git-paoding.git
|
|
84
|
+
cd git-paoding
|
|
85
|
+
uv sync --extra dev --locked
|
|
86
|
+
uv run git-paoding --help
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 2. Install the agent integration
|
|
90
|
+
|
|
91
|
+
Choose one of the following installation methods for each agent. The bundled
|
|
92
|
+
standalone skill and the marketplace plugin provide the same instructions, so
|
|
93
|
+
installing both for the same agent is unnecessary.
|
|
94
|
+
|
|
95
|
+
#### Option A: install the bundled standalone skill
|
|
96
|
+
|
|
97
|
+
The Python distribution carries the same `SKILL.md` used by both plugins. The
|
|
98
|
+
following commands copy that bundled skill into the official personal skill
|
|
99
|
+
directory and work without a plugin UI:
|
|
100
|
+
|
|
101
|
+
For Codex:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
git-paoding agent install --target codex --scope user
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
For Claude Code:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
git-paoding agent install --target claude --scope user
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
To install both, repeat `--target` in one command:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
git-paoding agent install --target codex --target claude --scope user
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Use `--scope project` to install into the current repository instead of the
|
|
120
|
+
current user's global skill directory. Re-run with `--force` after upgrading if
|
|
121
|
+
the installed skill was modified locally. Codex installs to
|
|
122
|
+
`.agents/skills/git-paoding`; Claude Code installs to
|
|
123
|
+
`.claude/skills/git-paoding` (under the home directory for user scope).
|
|
124
|
+
|
|
125
|
+
Verify the skill appears in Codex with `/skills`. In Claude Code, run `/skills`
|
|
126
|
+
or invoke `/git-paoding` directly. Restart the agent only if a newly created
|
|
127
|
+
top-level skill directory is not detected in the current session.
|
|
128
|
+
|
|
129
|
+
#### Option B: install through the plugin marketplace
|
|
130
|
+
|
|
131
|
+
This repository is also a marketplace for a skill-only `git-paoding` plugin.
|
|
132
|
+
The Codex and Claude Code manifests share one packaged skill, so their behavior
|
|
133
|
+
does not drift.
|
|
134
|
+
|
|
135
|
+
For Codex, add the GitHub marketplace:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
codex plugin marketplace add NagisaVon/git-paoding
|
|
139
|
+
codex plugin add git-paoding@git-paoding
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The same plugin then appears in the Plugins Directory in the ChatGPT desktop
|
|
143
|
+
app. Invoke its skill as `$git-paoding`.
|
|
144
|
+
|
|
145
|
+
For Claude Code, the complete installation is available from the CLI:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
claude plugin marketplace add NagisaVon/git-paoding
|
|
149
|
+
claude plugin install git-paoding@git-paoding --scope user
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Run `/reload-plugins` if Claude Code asks for it, then invoke the plugin skill as
|
|
153
|
+
`/git-paoding:git-paoding`.
|
|
154
|
+
|
|
155
|
+
### 3. Ask the agent to prepare review slices
|
|
156
|
+
|
|
157
|
+
For Codex:
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
$git-paoding Prepare semantic review slices for the complete committed change
|
|
161
|
+
on my current branch, using origin/main as the base. Inspect and propose the
|
|
162
|
+
slice assignments first. Do not push or publish until I approve the plan.
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
For the Claude Code plugin:
|
|
166
|
+
|
|
167
|
+
```text
|
|
168
|
+
/git-paoding:git-paoding Prepare semantic review slices for the complete
|
|
169
|
+
committed change on my current branch, using origin/main as the base. Inspect
|
|
170
|
+
and propose the slice assignments first. Do not push or publish until I approve
|
|
171
|
+
the plan.
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Run a review-slicing session
|
|
175
|
+
|
|
176
|
+
After installation, Codex and Claude Code follow the same operational workflow
|
|
177
|
+
below. Their invocation syntax differs (`$git-paoding` in Codex and
|
|
178
|
+
`/git-paoding:git-paoding` for the Claude Code plugin), but both use the same
|
|
179
|
+
`git-paoding` CLI and repository state.
|
|
180
|
+
|
|
181
|
+
Start from the branch that contains the complete, committed implementation. The
|
|
182
|
+
base is pinned when the session is initialized; moving `origin/main` later does
|
|
183
|
+
not silently move that pin.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
git-paoding init --base origin/main --slice-prefix ABC-123
|
|
187
|
+
git-paoding slice add storage --title "Storage boundary"
|
|
188
|
+
git-paoding slice add tests --title "Storage behavior tests"
|
|
189
|
+
git-paoding status --json
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
`status` is local and read-only. Exit code `2` is expected while it reports
|
|
193
|
+
unassigned or ambiguous atoms. Its JSON includes each atom's ID, path, Base and
|
|
194
|
+
Final ranges, owner, state, and short preview. Use `git-paoding status --full`
|
|
195
|
+
when complete changed-hunk previews are useful.
|
|
196
|
+
|
|
197
|
+
`--slice-prefix` is optional and defaults to `slice`. It changes only generated
|
|
198
|
+
slice PR titles, such as `[ABC-123] Storage boundary`; slice IDs and generated
|
|
199
|
+
refs remain stable. The integration PR title is the canonical branch name.
|
|
200
|
+
|
|
201
|
+
Assign interactively by an atom ID, path, directory, glob, or Final-coordinate
|
|
202
|
+
line range. Broad selectors preserve already-owned atoms unless `--force` is
|
|
203
|
+
passed; explicit atom IDs may reassign their exact atom without it. Every
|
|
204
|
+
selected atom is echoed as assigned or skipped:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
git-paoding assign storage src/storage.py
|
|
208
|
+
git-paoding assign tests tests/test_storage.py
|
|
209
|
+
git-paoding status --json
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
When no action is needed, publish the review projections:
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
git-paoding publish
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
`publish` is idempotent. It reconciles first and stops with exit code `2` and no
|
|
219
|
+
remote effects if attribution still needs attention. A clean publish pushes
|
|
220
|
+
generated projection refs, creates or refreshes stable Draft slice PRs, and
|
|
221
|
+
creates or updates the Draft integration PR and its slice index. Operational
|
|
222
|
+
failures use exit code `1`; success uses `0`.
|
|
223
|
+
|
|
224
|
+
Keep the canonical branch available on the selected Git remote before
|
|
225
|
+
publishing. If it has not been pushed, obtain the change owner's approval before
|
|
226
|
+
doing so:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
git push -u origin HEAD
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Three-step agent flow
|
|
233
|
+
|
|
234
|
+
The intended agent loop is:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
git-paoding status --json
|
|
238
|
+
git-paoding assign --batch paoding-assignments.json
|
|
239
|
+
git-paoding publish
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
The batch request uses the frozen versioned contract:
|
|
243
|
+
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"contract_version": 0,
|
|
247
|
+
"assignments": {
|
|
248
|
+
"storage": ["src/storage.py"],
|
|
249
|
+
"tests": ["tests/test_storage.py"]
|
|
250
|
+
},
|
|
251
|
+
"force": false
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Batch assignment is all-or-nothing: an unknown slice, invalid selector, or
|
|
256
|
+
cross-slice conflict rejects the entire request. Set the JSON `force` field to
|
|
257
|
+
`true` when a batch is intentionally repartitioning already-owned atoms; do not
|
|
258
|
+
combine the interactive `--force` option with `--batch`. The batch plan is an
|
|
259
|
+
ordinary local input file rather than session metadata; keep it untracked or
|
|
260
|
+
manage it according to the repository's own policy.
|
|
261
|
+
|
|
262
|
+
For targeted review feedback, focus may provide a default owner for genuinely
|
|
263
|
+
new atoms without overwriting confidently matched ownership:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
git-paoding focus storage
|
|
267
|
+
git-paoding status --json
|
|
268
|
+
git-paoding focus --clear
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
## What reviewers should know
|
|
272
|
+
|
|
273
|
+
A slice PR is a view onto one semantic part of the final integrated change.
|
|
274
|
+
Different slices may touch different regions of the same file, and one slice may
|
|
275
|
+
rely on code shown by another. A slice is not required to build or test by
|
|
276
|
+
itself.
|
|
277
|
+
|
|
278
|
+
Every slice PR is Draft and carries a
|
|
279
|
+
**DO NOT MERGE — review projection only** warning because:
|
|
280
|
+
|
|
281
|
+
- Its generated base and head refs are disposable projections.
|
|
282
|
+
- It is not the branch where implementation work happens.
|
|
283
|
+
- Its review is for comprehension, not authoritative approval.
|
|
284
|
+
- Only the integration PR represents the complete change and real merge target.
|
|
285
|
+
|
|
286
|
+
Use normal GitHub review features on a slice PR: read its narrative, inspect
|
|
287
|
+
Files changed, and leave inline comments. After feedback, update the canonical
|
|
288
|
+
branch and refresh the same slice PR. GitHub may mark comments
|
|
289
|
+
outdated when their lines change; the discussion history and stable PR identity
|
|
290
|
+
remain useful.
|
|
291
|
+
|
|
292
|
+
## Suppress CI for slice PRs
|
|
293
|
+
|
|
294
|
+
Slice projections are review units, not integration units. In consumer
|
|
295
|
+
repositories, filter the `pull_request` workflow to real target branches so
|
|
296
|
+
generated `paoding/.../base` refs do not start authoritative CI. For a
|
|
297
|
+
repository that merges into `main`:
|
|
298
|
+
|
|
299
|
+
```yaml
|
|
300
|
+
name: CI
|
|
301
|
+
|
|
302
|
+
on:
|
|
303
|
+
pull_request:
|
|
304
|
+
branches: [main]
|
|
305
|
+
push:
|
|
306
|
+
branches: [main]
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
GitHub evaluates the `pull_request.branches` filter against the PR's base
|
|
310
|
+
branch. Keep the normal CI and branch-protection requirements on the integration
|
|
311
|
+
PR.
|
|
312
|
+
|
|
313
|
+
## Safety and recovery
|
|
314
|
+
|
|
315
|
+
- Work only on the canonical integration branch. Never check out or edit
|
|
316
|
+
generated `paoding/...` branches.
|
|
317
|
+
- Never merge a slice PR. Close/archive it after the integration PR merges.
|
|
318
|
+
- Do not expect a slice projection to build, test, or pass CI independently.
|
|
319
|
+
- Unassigned or ambiguous atoms are normal recovery states, not metadata
|
|
320
|
+
corruption. Rerun `status`, classify what remains, and publish again.
|
|
321
|
+
- Slice metadata lives in the repository's common Git directory and is not
|
|
322
|
+
committed. Do not delete it as a routine reset.
|
|
323
|
+
- If session metadata is lost, recreate the session and the same stable slice
|
|
324
|
+
IDs. Attribution returns as unassigned, while existing open slice PRs can be
|
|
325
|
+
adopted by their machine markers on the next clean publish.
|
|
326
|
+
- New PR bodies contain only their machine-managed region; the tool does not
|
|
327
|
+
seed a narrative template. Human narrative added outside those delimiters is
|
|
328
|
+
preserved byte-for-byte on refresh.
|
|
329
|
+
|
|
330
|
+
After GitHub reports the integration PR as merged, archive the generated review
|
|
331
|
+
surface without merging any slice PR:
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
git-paoding archive
|
|
335
|
+
```
|