repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

update pi git workflows for jj

7ab05ccd90bce166a8fbda1e77054530161a5733

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (5)

pi/agent/AGENTS.md

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

pi/agent/prompts/ci.md

Modified
2 -description: Commit current git changes
2 +description: Commit current git/jj changes
3 3 argument-hint: "[hint]"
6 6 Commit current repo changes. Hint: $ARGUMENTS
8 +If `jj root` succeeds, use jj; otherwise use git.
8 10 1. 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
13 14 2. Stop if clean.
14 15 3. Exclude generated/cache/secret files. Ask only if ambiguous.
15 16 4. Split unrelated changes into focused commits when safe; otherwise ask.
16 17 5. Run obvious fast checks if available. Skip expensive/unclear checks with reason.
17 -6. Stage relevant files. Commit. If hooks change files, inspect, restage, retry once.
18 +6. Commit:
19 + - jj: `jj commit -m "subject"` (no staging)
20 + - git: stage relevant files, then commit. If hooks change files, inspect, restage, retry once.
18 21 7. Do not push.
19 -8. Report hash, subject, checks.
22 +8. Report hash/change id, subject, checks.
21 24 Message style:

pi/agent/prompts/ff.md

Modified
2 -description: Sync current branch into trunk via rebase + fast-forward
2 +description: Sync current git/jj branch into trunk via rebase + fast-forward
3 3 argument-hint: "[trunk] [test-command]"
6 -Sync current branch into trunk. Linear history only. No merge commits. Never force-push trunk.
6 +Sync current branch/bookmark into trunk. Linear history only. No merge commits. Never force-push trunk.
8 -Args: if `$1` is branch/ref → trunk, `${@:2}` → tests. Else infer trunk, `$ARGUMENTS` → tests.
8 +Args: if `$1` is branch/ref/bookmark → trunk, `${@:2}` → tests. Else infer trunk, `$ARGUMENTS` → tests.
10 +If `jj root` succeeds, use jj:
12 +1. Inspect: `jj status`, `jj bookmark list`, `jj git remote list`, `jj log -r '<trunk>..@'`.
13 +2. Stop on conflicts, dirty unrelated working-copy change, ambiguous trunk/bookmark, or non-git-backed jj repo when push is needed.
14 +3. Fetch/update: `jj git fetch --remote <remote>`.
15 +4. Rebase current stack if needed: `jj rebase -b @ -o <trunk>`.
16 +5. Test as below.
17 +6. Fast-forward trunk bookmark: `jj bookmark move <trunk> --to @` (never `--allow-backwards`).
18 +7. Push: `jj git push --remote <remote> --bookmark <trunk>`. On reject: fetch, re-evaluate, rebase once if safe, retest, retry.
19 +8. Report: trunk/remote, change old→new, rebase yes/no, tests, pushed change, follow-up.
21 +Otherwise use git:
10 23 1. Inspect
11 24 - 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
2 -description: Review, checkout, test, and prepare PR merge
2 +description: Review, checkout, test, and prepare PR merge for git/jj repos
3 3 argument-hint: "<pr-url|number|branch|ref> [test-command]"
6 -Review PR end-to-end and prepare merge. Do **not** merge until explicit user OK.
6 +Review 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.
8 8 **PR**: $1
9 9 **Test command override**: ${@:2}
11 11 Workflow:
13 13 1. **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.
15 15 - 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.
18 18 2. **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`.
23 23 3. **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.
29 29 4. **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>`.
31 31 - Read relevant files, tests, docs, configs.
32 32 - Check correctness, security, perf, API compat, migrations, UX, error handling.
33 33 - Verify PR matches issue/description.
42 42 6. **Report**
43 43 - Produce structured report:
44 44 - PR summary
45 - - Checkout location + base/head SHAs
45 + - Checkout location + base/head SHAs/change IDs
46 46 - Review findings: blockers / warnings / notes with file:line refs
47 47 - Tests run: command → pass/fail
48 48 - Merge readiness: READY | NOT READY
52 52 7. **Wait**
53 53 - Stop after report.
54 54 - 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
2 - "lastChangelogVersion": "0.74.0",
3 - "packages": [],
2 + "lastChangelogVersion": "0.75.4",
4 3 "theme": "terminal",
5 4 "enabledModels": [
6 5 "openai-codex/gpt-5.5",
18 17 "editorPaddingX": 1,
19 18 "sessionDir": "~/.local/state/pi/sessions",
20 19 "hideThinkingBlock": false,
21 - "compaction": {
22 - "enabled": true,
23 - "reserveTokens": 32768,
24 - "keepRecentTokens": 8000
25 - },
26 20 "devil": {
27 21 "model": "zai/glm-5.1"
36 30 "executor": "minimax/MiniMax-M2.7-highspeed",
37 31 "advisor": "zai/glm-5.1"
32 + },
33 + {
34 + "executor": "zai/glm-5.1",
35 + "advisor": "kimi-coding/kimi-for-coding"
47 45 "sessionRecap": {
48 46 "model": "minimax/MiniMax-M2.5-highspeed"
50 - "remember": {
51 - "model": "minimax/MiniMax-M2.7-highspeed"
52 - },
53 48 "neko": {
54 49 "enabled": true
56 - "flowModelConfig": "mimo",
57 51 "npmCommand": [
58 52 "npm",
59 53 "--prefix",
60 54 "/home/me/.local"