From waterfall
Resumes an interrupted waterfall workflow — preflight, need lookup, Agent Teams team re-creation, OR handoff with resume brief.
How this skill is triggered — by the user, by Claude, or both
Slash command
/waterfall:wf-resumeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill is the entry point to resume a paused or interrupted `waterfall` need. It is invoked by the `/waterfall:resume` command.
This skill is the entry point to resume a paused or interrupted waterfall need. It is invoked by the /waterfall:resume command.
bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-check-bash.sh
If not running under bash (Git Bash on Windows) → the script fails with an explicit message. STOP.
bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-check-teams.sh
If the CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS flag is missing → the script fails with an explicit message. STOP.
jq verification (used by all wf scripts to parse .wf-state.json, ack-registry.json, etc.):
INSTALL_CMD=$(bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-check-jq.sh) || JQ_RC=$?
jq missing. If $INSTALL_CMD non-empty, AskUserQuestion: "jq is required. Install it via ${INSTALL_CMD}?" (Yes / No). On Yes: bash -c "$INSTALL_CMD" then re-run the check. On No or if command empty: display stderr and stop.Critical for statusline (INV-002): on resume, $CLAUDE_SESSION_ID is a fresh sid (new Claude Code window) that does not match the session_id stored in .wf-state.json. We must force WF_SID to the current HO sid so the --reactivate migration takes place.
export WF_SID="${CLAUDE_SESSION_ID}"
Without this, the statusline (which filters on state.session_id == $CLAUDE_SESSION_ID) will not display the resumed need.
Note: when resuming in a new window,
WF_SIDis a fresh sid that won't match any state. This step is effectively a no-op on resume; it remains useful if/waterfall:resumeis invoked in the same window as a workflow that was just abandoned.
If WF_SID is set and no <name> is provided as argument:
# Count needs whose session_id == $WF_SID
matches=()
for state in C:/projets/waterfall/wf/needs/*/.wf-state.json; do
[[ -f "$state" ]] || continue
state_sid=$(jq -r '.session_id // ""' "$state" 2>/dev/null)
[[ "$state_sid" == "$WF_SID" ]] && matches+=("$(dirname "$state" | xargs basename)")
done
if [[ ${#matches[@]} -ge 2 ]]; then
# AskUserQuestion: pick among the needs (one option per need)
fi
source ${CLAUDE_PLUGIN_ROOT}/scripts/wf-read-config.sh
# No template copy (need directory already exists)
# watchdog and agent_mode apply normally
if [[ "$WF_WATCHDOG_INTERVAL" != "off" ]]; then
DELAY_MIN="${WF_WATCHDOG_INTERVAL//min/}" # "3min" → "3"
CronCreate(cron: "*/${DELAY_MIN} * * * *", prompt: "watchdog tick wf-<name>", recurring: true)
# Belt-and-suspenders: touch the marker that OR checks
echo "<cron_job_id>" > wf/needs/<name>/.watchdog-cron-active
# HO message: "Watchdog active (${WF_WATCHDOG_INTERVAL})"
fi
bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-orchestrate.sh --list
Returns a JSON array of needs with {name, phase, step, status, last_updated}.
Cases:
<name>AskUserQuestion to HO to pick (one option per need, label = name, description = <phase>:<step> [status])git worktree list --porcelain
Identify worktree-dv* entries whose directory no longer exists. If orphans detected, propose cleanup to HO via AskUserQuestion. If approved: git worktree prune.
Read bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-orchestrate.sh <name> --query to know the current_phase.
| Resume phase | Agents to re-spawn |
|---|---|
| BOOTSTRAP | OR alone (restart bootstrap) |
| REQUIREMENTS / FUNCTIONAL_SPECS | OR + PO |
| TECHNICAL_DESIGN | OR + TL (+ DS if has_ui: true in PRD.md) |
| REVIEW | OR + RV + relevant authors (PO/TL/DS depending on phase) |
| PLANNING | OR + TL |
| IMPLEMENTATION | OR + TL + DV pool (1-3 DV depending on remaining load) |
| VALIDATION | OR + QA |
| CLOTURE | OR (PM handles alone) |
wf-pm skill via Skill({name: "wf-pm"}). The main conversation thus adopts PM responsibilities — PM is never spawned as a separate agent (aligned with wf-new step 3). The team-lead created by TeamCreate IS the main.agent_mode:
if [[ "$WF_AGENT_MODE" == "team" ]]; then
TeamCreate wf-<name>
else
# Subagent mode: spawn OR via Agent tool, no TeamCreate
fi
bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-registry.sh clear <name>
DEC-001: traceability only — enforcement uses
agent_typefrom the harness payload. Skipping this step does not prevent teammates from completing their steps.
Agent (subagent_type=waterfall:wf-or, name=or, team_name=wf-<name>). For traceability (optional):
bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-registry.sh add <name> <or_agent_id> or
SendMessage:<brief>
<task_id>BRIEF-RESUME-<timestamp></task_id>
<phase>RESUME</phase>
<besoin><name></besoin>
<besoin_dir>wf/needs/<name>/</besoin_dir>
<action>resume</action>
<current_phase><phase read from --query></current_phase>
<context>
<note>Session interrupted. Read .sdd-state.json via --query and or.log to reconstruct the state.</note>
</context>
</brief>
bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-orchestrate.sh <name> --reactivate --session "${CLAUDE_SESSION_ID}" → migrates state.session_id to the current HO sid (INV-002), recreates the wf-session-active.<sid> markers, opens a new session_segment in .wf-state.json (auto-heal if previous segment left open — ADR-008). Always pass $CLAUDE_SESSION_ID, never raw $WF_SID: when resuming in a new window, WF_SID may be inherited from a previous session.
b. bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-orchestrate.sh <name> --query → read .sdd-state.json
c. Read or.log to understand the last successful action
d. Re-validate state ↔ on-disk artifacts consistency
e. Re-spawn the teammates per the lookup table (via spawn_request to PM). For traceability, PM may register each teammate in the registry (bash ${CLAUDE_PLUGIN_ROOT}/scripts/wf-registry.sh add <name> <uuid> <role>) — optional since DEC-001.
f. Send <resume_context> resume briefs to each re-spawned agent
g. Return STATUS_REPORT to PM describing where the workflow standsIdentical to wf-new step 5. PM handles the workflow reactively from the resume point.
Before resuming, OR MUST verify:
FUNCTIONAL_SPECS done, then specs.md must exist)tasks.md is in an impossible state (e.g. DONE without TL Review = APPROVED)review.md matches the state fileIf disagreement detected → OR returns NEED_PM_DECISION with details, PM asks HO what to do (manual fix, rollback, or abort).
TeamCreate + SendMessage exclusively.IMPORTANT — SendMessage plain text obligatoire : le paramètre
messagedeSendMessagen'accepte questring. Utiliser le format plain textclé: valeur— jamais d'objet{...}, jamaisJSON.stringify().
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub mgallet92i/waterfall --plugin waterfall