repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

update pi git workflows for jj

1604373fdca3373c6d7c9f6653f4fa14f4574680

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (5)

+54 / −36 text lines

Diff layout

pi/agent/AGENTS.md

Modified

+7 / −0 text lines

55DEATH TO LEGACY/COMPAT/HEDGING!
66DEATH TO EDGE CASES! FOUND SOME? TELL ME.
7
8BENCH HARNESS LAW:
9- Prompts MUST be fair and profile-neutral.
10- Never add task instructions that name, require, forbid, or steer toward/away from an extension/tool under test.
11- Do not ban normal baseline strategies just to force extension usage.
12- If an extension needs evaluation, design neutral workloads where its natural behavior can help.
13- Extension-specific forcing belongs only in explicit debug experiments, not benchmark prompts.

pi/agent/prompts/ci.md

Modified

+10 / −7 text lines

11---
2description: Commit current git changes
2description: Commit current git/jj changes
33argument-hint: "[hint]"
44---
66Commit current repo changes. Hint: $ARGUMENTS
8If `jj root` succeeds, use jj; otherwise use git.
9
8101. Inspect:
9 - `git status --short --branch`
10 - `git diff --stat && git diff`
11 - `git diff --cached --stat && git diff --cached` if staged
12 - read untracked files before staging
11 - jj: `jj status`, `jj diff --stat && jj diff`
12 - git: `git status --short --branch`, `git diff --stat && git diff`, `git diff --cached --stat && git diff --cached` if staged
13 - read untracked files before committing/staging
13142. Stop if clean.
14153. Exclude generated/cache/secret files. Ask only if ambiguous.
15164. Split unrelated changes into focused commits when safe; otherwise ask.
16175. Run obvious fast checks if available. Skip expensive/unclear checks with reason.
176. Stage relevant files. Commit. If hooks change files, inspect, restage, retry once.
186. Commit:
19 - jj: `jj commit -m "subject"` (no staging)
20 - git: stage relevant files, then commit. If hooks change files, inspect, restage, retry once.
18217. Do not push.
198. Report hash, subject, checks.
228. Report hash/change id, subject, checks.
2124Message style:

pi/agent/prompts/ff.md

Modified

+16 / −3 text lines

11---
2description: Sync current branch into trunk via rebase + fast-forward
2description: Sync current git/jj branch into trunk via rebase + fast-forward
33argument-hint: "[trunk] [test-command]"
44---
6Sync current branch into trunk. Linear history only. No merge commits. Never force-push trunk.
6Sync current branch/bookmark into trunk. Linear history only. No merge commits. Never force-push trunk.
8Args: if `$1` is branch/ref → trunk, `${@:2}` → tests. Else infer trunk, `$ARGUMENTS` → tests.
8Args: if `$1` is branch/ref/bookmark → trunk, `${@:2}` → tests. Else infer trunk, `$ARGUMENTS` → tests.
9
10If `jj root` succeeds, use jj:
121. Inspect: `jj status`, `jj bookmark list`, `jj git remote list`, `jj log -r '<trunk>..@'`.
132. Stop on conflicts, dirty unrelated working-copy change, ambiguous trunk/bookmark, or non-git-backed jj repo when push is needed.
143. Fetch/update: `jj git fetch --remote <remote>`.
154. Rebase current stack if needed: `jj rebase -b @ -o <trunk>`.
165. Test as below.
176. Fast-forward trunk bookmark: `jj bookmark move <trunk> --to @` (never `--allow-backwards`).
187. Push: `jj git push --remote <remote> --bookmark <trunk>`. On reject: fetch, re-evaluate, rebase once if safe, retest, retry.
198. Report: trunk/remote, change old→new, rebase yes/no, tests, pushed change, follow-up.
21Otherwise use git:
10231. Inspect
1124 - Run: `git status --short --branch`, `git branch --show-current`, `git remote -v`, `git worktree list --porcelain`, `git branch -vv`.

pi/agent/prompts/pr.md

Modified

+15 / −15 text lines

11---
2description: Review, checkout, test, and prepare PR merge
2description: Review, checkout, test, and prepare PR merge for git/jj repos
33argument-hint: "<pr-url|number|branch|ref> [test-command]"
44---
6Review PR end-to-end and prepare merge. Do **not** merge until explicit user OK.
6Review PR end-to-end and prepare merge. Do **not** merge until explicit user OK. If `jj root` succeeds, use jj-native status/diff/workspace commands; otherwise use git.
88**PR**: $1
99**Test command override**: ${@:2}
1111Workflow:
13131. **Identify**
14 - Detect host/tooling: GitHub `gh` if available; otherwise generic `git`.
14 - Detect VCS: `jj root` → jj, else git. Detect host/tooling: GitHub `gh` if available; otherwise generic git remote.
1515 - Resolve PR metadata: title, author, base, head, URL, status, CI, labels.
16 - Fetch latest base/head.
16 - Fetch latest base/head: jj `jj git fetch`; git `git fetch`/`gh pr checkout` path.
18182. **Protect local work**
19 - Check `git status --short`.
20 - If dirty unrelated work exists: do not overwrite. Prefer isolated worktree.
21 - Detect repo style via `git worktree list`, existing branch/worktree conventions.
19 - Check jj `jj status` or git `git status --short`.
20 - If dirty unrelated work exists: do not overwrite. Prefer isolated jj workspace or git worktree.
21 - Detect repo style via jj `jj workspace list` or git `git worktree list`.
23233. **Checkout**
24 - Prefer worktree when repo uses worktrees, current tree is dirty, or PR needs isolation.
25 - Use branch when repo convention/current state is clean and branch checkout is safe.
26 - GitHub path: `gh pr checkout <PR>` or fetch ref, then create branch/worktree.
27 - Generic path: fetch PR/head ref or remote branch, then create branch/worktree.
24 - jj: prefer isolated workspace: `jj workspace add <path> -r <head-rev>`; otherwise `jj new <head-rev>` only when safe.
25 - git: prefer worktree when repo uses worktrees, current tree is dirty, or PR needs isolation; otherwise branch checkout when clean.
26 - GitHub path: use `gh` for metadata/merge; use VCS-native fetch/checkout/workspace for files.
27 - Generic path: fetch PR/head ref or remote branch/bookmark, then create branch/worktree/workspace.
29294. **Review diff**
30 - Compare PR head vs base.
30 - Compare PR head vs base: jj `jj diff --from <base> --to <head>`; git `git diff <base>...<head>`.
3131 - Read relevant files, tests, docs, configs.
3232 - Check correctness, security, perf, API compat, migrations, UX, error handling.
3333 - Verify PR matches issue/description.
42426. **Report**
4343 - Produce structured report:
4444 - PR summary
45 - Checkout location + base/head SHAs
45 - Checkout location + base/head SHAs/change IDs
4646 - Review findings: blockers / warnings / notes with file:line refs
4747 - Tests run: command → pass/fail
4848 - Merge readiness: READY | NOT READY
52527. **Wait**
5353 - Stop after report.
5454 - Ask for explicit OK to merge only if READY.
55 - On OK: re-fetch, verify PR still current/mergeable, run critical checks if needed, then merge using repo convention (`gh pr merge`, platform tool, or local merge). Report final status.
56 - After successful merge: remove worktree/branch of PR
55 - On OK: re-fetch, verify PR still current/mergeable, run critical checks if needed, then merge using repo convention (`gh pr merge`, platform tool, jj bookmark move/push, or local git merge). Report final status.
56 - After successful merge: remove jj workspace or git worktree/branch of PR

pi/agent/settings.json

Modified

+6 / −11 text lines

11{
2 "lastChangelogVersion": "0.74.0",
3 "packages": [],
2 "lastChangelogVersion": "0.75.4",
43 "theme": "terminal",
54 "enabledModels": [
65 "openai-codex/gpt-5.5",
1817 "editorPaddingX": 1,
1918 "sessionDir": "~/.local/state/pi/sessions",
2019 "hideThinkingBlock": false,
21 "compaction": {
22 "enabled": true,
23 "reserveTokens": 32768,
24 "keepRecentTokens": 8000
25 },
2620 "devil": {
2721 "model": "zai/glm-5.1"
2822 },
3529 {
3630 "executor": "minimax/MiniMax-M2.7-highspeed",
3731 "advisor": "zai/glm-5.1"
32 },
33 {
34 "executor": "zai/glm-5.1",
35 "advisor": "kimi-coding/kimi-for-coding"
3836 }
3937 ]
4038 },
4745 "sessionRecap": {
4846 "model": "minimax/MiniMax-M2.5-highspeed"
4947 },
50 "remember": {
51 "model": "minimax/MiniMax-M2.7-highspeed"
52 },
5348 "neko": {
5449 "enabled": true
5550 },
56 "flowModelConfig": "mimo",
5751 "npmCommand": [
5852 "npm",
5953 "--prefix",
6054 "/home/me/.local"
6155 ]