agentplane-task-closure-recoverylisted
Install: claude install-skill basilisk-labs/agentplane
# Agentplane Task Closure Recovery
## Use This Skill When
- `agentplane finish`, `integrate`, `task hosted-close`, or `task hosted-close-pr` fails.
- A `task-close/*` PR is duplicated, closed, obsolete, or still open after hosted closure.
- `pr open` fails because the remote branch already exists.
- A task is DONE locally but artifacts, branch state, or hosted closure disagree.
- Direct-mode finish is blocked by unrelated dirty task artifacts.
## First Classification
1. Read workflow mode:
```bash
agentplane config show
```
2. Identify the task state:
```bash
agentplane task show <task-id>
agentplane task verify-show <task-id>
git status --short --untracked-files=no
git rev-parse --abbrev-ref HEAD
```
3. Query incident advice:
```bash
agentplane incidents advise <task-id>
```
## Direct Mode
Expected close path:
```bash
agentplane verify <task-id> --ok --by CODER --note "..."
agentplane finish <task-id> --author CODER --body "Verified: ..." --result "..." --commit <git-rev>
```
If finish is blocked:
- Check whether dirty files belong to the active task or another active task.
- Check whether policy/incident mirrors were generated by finish and need allowed staging.
- Do not manually edit `.agentplane/tasks.json`.
- Do not use branch_pr close-tail commands in direct mode.
## Branch PR Mode
Classify before recovery:
- Implementation PR branch: `task/<task-id>/<slug>`
- Closure PR branch: `task-close/<task-id>/<sha>`
- Base-side closure already landed: task READM