catchuplisted
Install: claude install-skill aimsise/simple-workflow
Recover context and detect next action for the current working session.
User arguments: $ARGUMENTS
Current branch:
!`git branch --show-current`
Recent history:
!`git log --oneline -5`
Default branch:
!`git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' | grep . || echo main`
Changes from default branch:
!`git diff --shortstat $(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' | grep . || echo main)`
Working tree:
!`git status --short`
## Instructions
**Note**: Throughout this skill, `<default-branch>` denotes the repository's default branch, taken from the `Default branch:` value in the pre-computed context above (which resolves `git symbolic-ref refs/remotes/origin/HEAD` and falls back to `main` when `origin/HEAD` is not set). Use this resolved value wherever the rules below mention `<default-branch>` — never hardcode `main`.
### 0. Argument Parsing
If `$ARGUMENTS` specifies a phase name (investigate, plan, implement, test, review, or commit), skip directly to **Step 4** and use the specified phase for guidance.
If `$ARGUMENTS` is empty, proceed with full recovery (Steps 1-pre and 1-4).
### 1-pre. phase-state.yaml primary state read
`phase-state.yaml` is the **primary** lifecycle source, read before compact-state / session-log in Step 1. Glob both `.simple-workflow/backlog/active/**/phase-state.yaml` and `.simple-workflow/backlog/product_backlog/**/phase-state.yaml` (depth-agnostic), dedu