great! fixup/autosquash
- User
great! fixup/autosquash
- User
Let's work on that.
Use this prompt when the user wants execution from the available context. The target may be conversation history, a GitHub issue or PR, a todo, a PRD, a URL, a note, or a concrete request. If the user is still exploring, debating scope, asking whether something is worth doing, or asking for options, recommend
/pac-llatinstead of starting implementation.Process:
- Resolve the target. Prefer explicit arguments, then current conversation context. Start with the smallest authoritative artifact needed to understand the request and its current state. For a GitHub issue, make the initial structured read include the body and execution-gate metadata. Reuse that complete result for target resolution and the execution gate: fields already present must not be re-fetched through another command or API shape. Before any second read of the same target, identify the specific materially missing fact that the initial result did not contain. Targeted follow-up reads remain allowed only when information is materially missing, potentially stale, or needs verification after a state transition. For a GitHub PR, read that target first with enough state and resolution metadata to recognize an obvious merged result. For a todo, read the todo first.
- Before repository preparation, decide whether execution is required. Keep this execution gate progressive and cheap:
- If authoritative evidence shows no work is needed or no execution is required, report the evidence concisely and stop.
- Do not create or switch branches, load implementation or commit skills, inspect broad comments or history, or search source files merely to double-check an obvious no-op.
- If the target is ambiguous, perform only the smallest targeted follow-up read needed to decide whether to continue or stop.
- Do not read
README.mdas startup context or by default. Read it only when it materially contributes to executing confirmed work.
- Once execution is confirmed, resolve repository state and the actual default and protected branches before implementation mutation. Implementation must not proceed on the actual default branch. Follow repository-specific execution rules before mutation; they may strengthen but not weaken this default-branch floor. Reuse applicable repository and user policy already available in context. If a specific repository-policy value remains unresolved, make only the smallest targeted read needed; do not broadly re-read
AGENTS.mdor other policy. Repository and user policy own branch naming, branch type and base strategy, additional protected branches, and whether an already-active non-protected branch is appropriate. - State the goal, assumptions, and any ambiguity. If intent or scope is unclear, ask before editing. Give a short implementation and verification plan before making changes.
- Assistant
Goal: make completed issue-backed PRs use
Closes #N, while partial/supporting PRs keepRefs #N, without deciding closure early.Assumptions: issue #426 is implementation-ready;
mainis the default/protected branch; the active tree is clean.Plan:
- Create the issue branch and locate the single PR-body owner.
- Add focused regression tests for complete and partial cases; confirm failure.
- Make the smallest workflow change, run targeted checks, then prepare an atomic commit.
- Assistant
Static behavior and fixture checks are green. I’ve committed the coherent implementation slice so the fresh-session harness can load it by Git ref; next I’m running the complete
/pac-lwotscenario and will record its result. - User
continue
- Assistant
Implemented issue #426 on
ladislas/bugfix/426-prefer_closes_pr_links.Changes:
- Completed issue-backed PRs now default to
Closes #N. - Partial/supporting PRs retain
Refs #N. - Commit references remain non-closing by default.
- Added static and fresh-session regression coverage.
- Updated changelog and evidence ledger.
Verification:
npm run check:pi-compatibility: 561/561 passed.- Complete
/pac-lwotscenario producedCloses #9001. - Partial scenario produced
Refs #9001. - Working tree clean.
Commits:
1815f06🐛 fix(github): Prefer closing links for completed PRsab4b2e4📝 docs(github): Record PR closing-link evidence
Not pushed or merged. A PR for this branch should use
Closes #426. - Completed issue-backed PRs now default to
- User
The current #426 implementation does not match the repository's established workflow and must be corrected before merge.
Git history shows the intended convention:
- a commit that completes an issue carries Closes #N;
- intermediate, partial, supporting, or preparatory commits carry Refs #N;
- when an issue needs multiple commits, earlier commits may use Refs and the commit that makes the issue complete uses Closes;
- when one small implementation slice fully resolves one issue, that single implementation commit normally uses Closes.
Do not make the PR body the exclusive closure owner. The user often creates PRs with local commands after Pi has committed, and those commands may generate a minimal PR body. Issue closure must therefore survive independently of who creates the PR.
- Assistant
Goal: restore the established commit-owned closure contract while retaining optional PR-body links.
Plan:
- Add failing contracts for complete commits, partial commits, and partial-then-complete history.
- Update
pac-commitand fixtures so the completing commit carriesCloses, independently of PR-body generation. - Run single-complete, partial, and multi-commit fresh sessions; update #426 evidence.
- Run the full compatibility gate and create follow-up commits only—no rewrite, push, or merge.
- Assistant
The corrected implementation is now in follow-up commit
8f7ebf6, whose body itself usesCloses #426. I’m validating that committed package in three fresh sessions: single-commit complete, partial, and partial-then-complete. - Assistant
Corrected without rewriting existing history.
Key changes:
- Completing commits now use
Closes #Nin the commit body. - Partial/supporting commits use
Refs #N. - Multi-commit workflows use
Refson earlier commits andCloseson the completing commit. - PR bodies remain optional; minimal user-created PRs retain closure through commit history.
- Completeness remains determined only when the verified commit slice is ready.
Verification:
- Fresh sessions: single-complete, partial, and multi-commit all passed (3/3).
npm run check:pi-compatibility: 561/561 passed.- Working tree clean.
Follow-up commits:
8f7ebf6🐛 fix(github): Restore commit-owned issue closure — Closes #4264add987📝 docs(github): Correct issue-closure evidence — Refs #426
Branch is 2 commits ahead of origin. Nothing pushed or merged.
- Completing commits now use
- User
Clean up the pre-merge commit history without changing the final tree.
Fold 8f7ebf6 into 1815f06 and fold 4add987 into ab4b2e4.
Reword the resulting implementation commit so it describes the corrected final behavior, not the superseded PR-owned closure design: 🐛 fix(github): Restore commit-owned issue closure
Its body should state that completed issue-backed commit slices use Closes #N, partial/supporting slices use Refs #N, and closure does not depend on PR-body generation. It should close #426.
Reword the evidence commit if needed so it describes the corrected issue-closure evidence rather than PR closing-link evidence.
Verify the resulting two-commit history and unchanged final tree. Do not force-push; stop and give me the exact command to push the rewritten branch myself. "
- Assistant
Rewrite scope is unambiguous and explicitly authorized. I’ll preserve the current final tree hash, reorder/fixup the two follow-ups into their original commits, reword both surviving commits, then compare tree hashes and run focused history checks. No push will be attempted.
- Assistant
History rewritten successfully; no push performed.
New two-commit history:
c965cc7🐛 fix(github): Restore commit-owned issue closure —Closes #4261901af8📝 docs(github): Correct issue-closure evidence —Refs #426
Verified:
- Final tree unchanged:
90a388c0c8cd7b2a761646ee69df49ee4ee82b51 - No diff against old HEAD
4add987 - Exactly two commits in the rewritten range
- Focused tests: 14/14 passed
- Working tree clean
Push it yourself with the guarded lease:
bashgit push --force-with-lease=refs/heads/ladislas/bugfix/426-prefer_closes_pr_links:4add987089ca98b6299befb3a5c845ad9516eb80 origin HEAD:refs/heads/ladislas/bugfix/426-prefer_closes_pr_links