pi-pr-finalization-fallbacks
Fallbacks for finishing Aaron's pi coding workflow when commit-plan path matching or GitHub PR creation/check handling behaves unexpectedly.
- License 许可
- MIT
- 最近更新
- 2026-11-06
- Stars
- ★ 5
- Forks
- 4
01 前言 Front Matter
- name
- pi-pr-finalization-fallbacks
- author
- Hermes Agent
- license
- MIT
- version
- 1.0.0
- metadata
- { "hermes": { "tags": [ "pi", "github", "pull-request", "workflow", "fallback", "tmux" ], "related_skills": [ "pi-coding-workflow", "github-pr-workflow", "tmux-scoped-pi-control" ] } }
- description
- Fallbacks for finishing Aaron's pi coding workflow when commit-plan path matching or GitHub PR creation/check handling behaves unexpectedly.
02 资源文件 4
- 许可证LICENSE10.5 KB
- 参考文档references/chunked-upload.md10.6 KB
- 参考文档SOURCE.md330 B
- 参考文档TRUST.auto.yaml2.1 KB
03 SKILL.md 正文
Pi PR Finalization Fallbacks
Use this when running Aaron's pi-coding-workflow and the work is done, but plan commit / PR creation / post-PR follow-up hit orchestration quirks.
1. pi_workflow_ctl.py --stage commit-plan dirty-tree false positive
Symptom:
commit-planfails withrefusing commit-plan with unexpected dirty tree- repo status only shows the expected plan file
Cause:
- On Aaron's machine, the controller's allowlist compares against repo-relative
git statuspaths. - Passing
--planas an absolute path can mismatch the dirty-tree allowlist.
Fix:
- Retry
commit-planwith a repo-relative plan path, e.g.
python3 ~/.hermes/scripts/pi_workflow_ctl.py \
--pane %PANE \
--repo ~/code/<worktree> \
--plan thoughts/plans/<slug>.md \
--stage commit-plan
Do not assume the tree is actually dirty until you confirm with git status --short.
2. pm-plan / controller stage drift after forced commit-plan
Symptom:
- after a forced or out-of-band
commit-plan, controller says the next legal stage is wrong
Fix:
- ground truth from the pane tail and state file
- if the worker already completed PM plan review and is ready for execution, use:
python3 ~/.hermes/scripts/pi_workflow_ctl.py \
--pane %PANE \
--repo ~/code/<worktree> \
--plan thoughts/plans/<slug>.md \
--stage execute --force
Only do this when the pane clearly shows the preceding stage already happened.
3. gh pr create timeout fallback
Symptom:
gh pr createor controllercreate-prtimes out even though auth and branch state are fine- PR may still not exist afterward
Reliable fallback:
- Check whether a PR already exists:
gh pr list --head <branch> --json number,title,url,state
- If none exists, create via direct API with explicit owner-qualified head:
GH_DEBUG=api gh api -X POST repos/<owner>/<repo>/pulls \
--field title='...' \
--field head='<owner>:<branch>' \
--field base='main'
- If you used a minimal/debug body to get creation through, patch the PR afterward:
gh api -X PATCH repos/<owner>/<repo>/pulls/<number> --field title='...'
gh pr edit <number> --body-file <body-file>
Notes:
- In this environment, large body payloads can be the part that hangs.
- A minimal create followed by
gh pr edit --body-fileis safer than repeatedly retrying timed-out creates.
4. Post-PR check failures caused by billing, not code
Symptom:
- all Actions jobs fail almost instantly
gh pr checksshows every job failedgh run view <run-id>annotation says jobs were not started because payments failed or spending limit needs to be increased
Interpretation:
- this is an external GitHub billing blocker, not a code regression
Workflow:
- Confirm with:
gh run view <run-id>
- Leave a PR comment summarizing:
- checks did not start
- reason is billing/spending-limit block
- local validation for the scoped change is green
- no code-side CI fix is available until billing is restored
5. Keep local-only artifacts out of the commit
Before final commit/PR, explicitly verify whether these are local-only:
.pi/- ad hoc validation reports under
thoughts/validation/
If they are only workflow artifacts for the current run, do not include them unless the repo explicitly wants them.
Quick checklist
- [ ] Use repo-relative
--planforcommit-plan - [ ] If controller stage lags reality, confirm from pane then use
--forcecarefully - [ ] If
gh pr createhangs, check for existing PR first, then usegh apicreate +gh pr edit - [ ] Distinguish billing-blocked Actions from real CI failures
- [ ] Exclude
.pi/and ad hoc validation notes unless intentionally tracked
04 同仓库更多 Skills
blocked-page-recovery
Use when a fetch fails: 403/429, paywall, WAF, bot wall.
writing-plans
Use when creating or updating executable software plans. Keep plans as local files unless the user explicitly asks to register them in Doct.
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
spike
Throwaway experiments to validate an idea before build.
simplify-code
Parallel 3-agent cleanup of recent code changes.