aip-pr-delivery
Skill24 starsChanged 16 days agoMITView on GitHub
Triage AIProxer PRs against current main, deliver sequential or stacked PRs through CI and merge, and clean up task-owned worktrees and branches.
In this repository56 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .kiro/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- aip-cordis-v4Skill
- codegraphSkill
- golang-benchmarkSkill
- golang-cliSkill
- golang-code-styleSkill
- golang-concurrencySkill
- golang-contextSkill
- golang-continuous-integrationSkill
- golang-databaseSkill
- golang-data-structuresSkill
- golang-dependency-injectionSkill
- golang-dependency-managementSkill
- golang-design-patternsSkill
- golang-documentationSkill
- golang-error-handlingSkill
- golang-grpcSkill
- golang-hexagonal-architectureSkill
- golang-lintSkill
- golang-modernizeSkill
- golang-namingSkill
- golang-observabilitySkill
- golang-performanceSkill
- golang-popular-librariesSkill
- golang-project-layoutSkill
- golang-safetySkill
- golang-securitySkill
- golang-simplifySkill
- golang-solid-principle-reviewSkill
- golang-stretchr-testifySkill
- golang-structs-interfacesSkill
- golang-testingSkill
- golang-thermonuclear-code-reviewSkill
- golang-troubleshootingSkill
- kiro-debugSkill
- kiro-discoverySkill
- kiro-implSkill
- kiro-review-panelSkill
- kiro-reviewSkill
- kiro-spec-approveSkill
- kiro-spec-archiveSkill
- kiro-spec-batchSkill
- kiro-spec-designSkill
- kiro-spec-initSkill
- kiro-spec-quickSkill
- kiro-spec-requirementsSkill
- kiro-spec-statusSkill
- kiro-spec-tasksSkill
- kiro-steering-customSkill
- kiro-steeringSkill
- kiro-validate-designSkill
- kiro-validate-gapSkill
- kiro-validate-implSkill
- kiro-verify-completionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 12 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Cleanup: remove the specified task resources.
- Distinctive: line 18
Follow only the applicable sections.
- Very specific: line 20
Before writing a PR or planning a repair, consult .kiro/steering/delivery.md for slice budgets and red-main handling.
- Distinctive: line 26
Read the changed behavior with its relevant callers and tests.
- Distinctive: line 27
Use focused reproduction or existing contract tests to assess the claimed defect and proposed remedy.
- Very specific: line 37
Start/link the explicit inventory from docs/agent-closeout.md before delivery.
- Distinctive: line 39
Before materially expanding a repair plan, adding further slices, or continuing repeated remediation that is not converging, explain the …
- Distinctive: line 47
Update a branch from main only when needed to merge, as specified by delivery steering.
- Distinctive: line 48
After a predecessor is squash-merged, fetch main and transplant only the successor's unique commits.
- Very specific: line 61
Use the existing concise reporter for status and blocking waits.
- Distinctive: line 77
Update the clean main receiver with a fast-forward and verify the merged revision using the repository's applicable checks.
- Distinctive: line 88
Check each worktree for staged, unstaged, and untracked changes and active users before removal.
- Very specific: line 89
Remove clean, unused worktrees with git worktree remove <absolute-path> without force.
- Distinctive: line 90
Delete local branches only after checking for unique work and other worktree users.
- Distinctive: line 91
Remove only task-owned, unused temporary refs, then verify the exact resources are absent from Git metadata and the filesystem.
- Distinctive: line 93
If an OS lock prevents removal, report the remaining path and registration rather than claiming cleanup succeeded.
- Very specific: line 102
Run go run ./tools/handoff -task=closeout -index=<execution-index> after authorized verification and cleanup, retaining its JSON report in …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AIProxer PR Workflow
Choose the operation
- Triage: decide whether the issue and proposed fix are valid against current main. A verdict does not authorize merging, closing, or patching the PR.
- Delivery: submit, repair CI, or merge within the user's requested scope and order.
- Cleanup: remove the specified task resources; a rejected PR can be cleaned up without a merge.
Follow only the applicable sections. Repository AGENTS.md and steering take precedence.
For verification, consult the root AGENTS.md Verification section and the workflows covering the changed paths.
Before writing a PR or planning a repair, consult .kiro/steering/delivery.md for slice budgets and red-main handling.
For local iteration, temp-storage requirements, and remote-only race coverage, use docs/development-iteration.md.
Triage
- Fetch current main and record its SHA, the PR head SHA, state, base, and changed paths. Check for dependencies on other PRs.
- Read the changed behavior with its relevant callers and tests. Compare against current main, not just the original PR base: distinguish a real issue, an already-fixed issue, and a false positive.
- Use focused reproduction or existing contract tests to assess the claimed defect and proposed remedy. Passing tests alone do not establish a benefit; label untested risks as inference.
- Recommend merge, reject, or a separate replacement patch. State dependency order and CI readiness separately from technical validity.
Triage is complete when the verdict is supported by current-source evidence and any verification gaps are explicit. Remote mutation is a separate operation.
Delivery
Closed set and completion
- Record the target PR numbers and completion condition before remote mutation. For "all currently open PRs", snapshot the initial list; newly arriving PRs are reported separately and enter the run only when the user expands scope.
- Start/link the explicit inventory from
docs/agent-closeout.mdbefore delivery. Include related issue/spec obligations and owned resources then; extend the same inventory as scope grows. Link it withhandoff -task=record -inventory=... -index=...rather than creating a replacement success file at the end. - Include only the smallest blocking repairs needed to deliver those targets, linked to the target and failing gate. Existing fixes on current main take precedence over new repair work.
- Before materially expanding a repair plan, adding further slices, or continuing repeated remediation that is not converging, explain the blocker and smallest next action and obtain the user's decision. Ordinary waiting for applicable CI is not scope expansion.
- Finish the authorized delivery phase when its targets and blocking repairs are merged and merged-main verification is complete. Full closeout additionally requires the inventory checker below; report new arrivals without adopting them and clean up only within authorized scope.
Sequence and history
- Establish predecessor order before submitting or merging dependent PRs.
- Measure each slice against its intended base using the delivery-report workflow in
docs/development-iteration.md; review budget signals, dependencies, immediate consumers and independent build evidence before submission. - When the PR implements Kiro spec tasks, flip the delivered tasks'
tasks.mdboxes in the PR. The kiro-impl controller owns this inside its loop; outside that loop the delivering PR owns it, or finished work stays invisible to the lifecycle gates (the archive gate additionally requires every box checked). - Update a branch from main only when needed to merge, as specified by delivery steering; avoid routine rebases that invalidate otherwise current evidence.
After a predecessor is squash-merged, fetch main and transplant only the successor's unique commits. Confirm the old predecessor tip before using:
git rebase --onto origin/main <old-predecessor-tip> <successor-branch>- Recheck the resulting diff and affected tests. If history was rewritten, push with
--force-with-leaseand obtain checks for the new head SHA.
CI and merge gate
- Inspect checks for the latest head SHA and newest applicable workflow runs. A push can briefly show no checks; absence is not success.
- Inspect failing job logs and reproduce where supported. Read the retained
detailJSON frompr-statusfirst: remotegh run viewlogs can lag behind the terminal verdict. Failures also present on main belong in separate repair PRs under delivery steering, not in the feature slice. - For skipped or bypassed jobs, inspect workflow scope detection. Accept a bypass only when that workflow intentionally permits it for these paths; failed scope detection is a blocker.
Use the existing concise reporter for status and blocking waits. It retains full JSON under
AIP_PR_LOG_DIRand distinguishes failed, blocked and stale evidence:make pr-status PR=<pr> make pr-watch PR=<pr>Exit 0 means an open PR is ready; exit 5 means merged delivery only, not CI or main verification. Exit 4 invalidates the observed revision: refresh and re-run deliberately for the new head. Missing required checks remain blocked even when a fresh head has only neutral/optional results.
If the reporter is unavailable or fails before observing checks, retain a
gh pr checks <pr> --watch --interval 20fallback log outside the repository. Its exit alone is not readiness: confirm the same head before/after and account for the base branch's complete required-check inventory. Report an unverified verdict if either cannot be established.- Immediately before merge, refresh the head SHA, mergeability, required checks, approvals, and unresolved review findings. Satisfy the actual branch-protection/ruleset requirements without bypasses;
mergeStateStatusalone is not a merge gate. Pending, stale, missing required checks or unknown requirements block merging. - Merge in the approved order using the repository's established method and bind the operation to the inspected head SHA (
gh pr merge --match-head-commit <sha>). If the head changes, revalidate before merging. Confirm the merged state and merge commit before proceeding to the successor.
Merged-main verification
Update the clean main receiver with a fast-forward and verify the merged revision using the repository's applicable checks.
For runtime-affecting changes, include the relevant runnable-distribution and full-path smoke evidence, not just unit tests or CLI help.
Name the smoke topology: in-process harness, independent emulators, or spawned distribution.
Report merged-but-unverified separately from verified delivery; a green feature branch is not merged-main evidence.
Capture the checks with handoff -task=run, assemble a validated Result from its
command receipts, record it in the linked index, and set the objective's
main_evidence to that Result. Do not replace this with handwritten pass flags.
Cleanup
- Identify exact worktree paths, local branches, and temporary refs created for this task or explicitly selected by the user. Similar names are not proof of ownership; leave other sessions' resources alone.
- Check each worktree for staged, unstaged, and untracked changes and active users before removal. Preserve dirty or in-use worktrees and report the blocker.
- Remove clean, unused worktrees with
git worktree remove <absolute-path>without force. Review-only cleanup needs no merge; delivery cleanup follows merged-main verification unless the user explicitly requests otherwise. - Delete local branches only after checking for unique work and other worktree users. Prefer
git branch -d; squash merges can fail its ancestry check, so verify equivalent delivered work before any explicitly authorized forced deletion. Preserve unmerged work without explicit discard authorization. - Remove only task-owned, unused temporary refs, then verify the exact resources are absent from Git metadata and the filesystem. Broad fetch/prune operations are not needed for ordinary task cleanup.
If an OS lock prevents removal, report the remaining path and registration rather than claiming cleanup succeeded.
Report
For approved-scope completion (including earlier workstreams and manually
dispatched required verification), apply docs/agent-closeout.md; PR status alone
does not reconcile issues/specs or owned resources. Report submission, merged,
verified and fully closed-out states separately within the user's authorization.
Run go run ./tools/handoff -task=closeout -index=<execution-index> after authorized
verification and cleanup, retaining its JSON report in scratch. Claim full
closeout only when it says complete: true; otherwise list the pending obligations.
For submission-only scope use -phase=submitted, which never claims completion.
State the outcome for the requested operation, the relevant SHAs, verification evidence and gaps, and any remaining resources or blockers. Separate recommendations from actions taken.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

