一键导入
task-loop-verify
Verify the current task and output a completion marker. Use this to check if a task is complete and signal the stop hook to allow session exit.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Verify the current task and output a completion marker. Use this to check if a task is complete and signal the stop hook to allow session exit.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
This skill should be used when the user asks to "generate tasks", "create implementation plan", "break down feature", "write agent prompts", "decompose into tasks", "create work items", or when creating agent-ready task descriptions from PRD and SDD documents.
This skill should be used when the user asks to "analyze the codebase", "understand the tech stack", "extract project patterns", "get codebase context", "what technologies are used", or when preparing context for planning documents, PRDs, or design documentation.
This skill should be used when the user asks to "create a PRD", "write requirements", "document a feature", "generate product spec", "define requirements", "write feature specifications", or when creating PRD documents from gathered requirements.
This skill should be used when the user asks to "research documentation", "find framework docs", "search for best practices", "look up API documentation", "find implementation patterns", "research how to implement", or when gathering external technical knowledge to inform planning or design decisions.
This skill should be used when the user asks to "create a design document", "write technical specs", "document architecture", "generate SDD", "design the system", "API design", or when creating technical design documents from approved PRDs.
| name | task-loop-verify |
| description | Verify the current task and output a completion marker. Use this to check if a task is complete and signal the stop hook to allow session exit. |
| version | 0.1.0 |
| allowed-tools | Read, Glob, Grep, Bash(rm:*), Bash(jq:*), Task |
Verify the current task in the loop and output a completion marker if successful. This skill wraps task-verifier and outputs the marker that the stop hook looks for.
Use this skill when:
First, check for the pointer file and get the state path:
if [[ -f .shipspec/active-loop.local.json ]]; then
LOOP_TYPE=$(jq -r '.loop_type // empty' .shipspec/active-loop.local.json)
if [[ "$LOOP_TYPE" == "task-loop" ]]; then
jq -r '.state_path // empty' .shipspec/active-loop.local.json
else
echo "WRONG_LOOP_TYPE"
fi
else
echo "NO_POINTER"
fi
If NO_POINTER or WRONG_LOOP_TYPE:
"No active task loop. Run
/implement-task <feature> <task-id>to start a task." Stop here.
If state_path found: Check the state file exists:
test -f [state_path] && echo "EXISTS" || echo "NO_STATE_FILE"
If NO_STATE_FILE: Clean up stale pointer and report:
rm -f .shipspec/active-loop.local.json
"No active task loop (stale pointer cleaned up). Run
/implement-task <feature> <task-id>to start a task." Stop here.
If found: Parse the JSON state file to extract:
jq -r '.feature // empty' [state_path]
jq -r '.task_id // empty' [state_path]
jq -r '.iteration // 0' [state_path]
jq -r '.max_iterations // 5' [state_path]
feature: The feature directory nametask_id: The task being implementediteration: Current attempt numbermax_iterations: Maximum allowed attemptsStore the state_path for cleanup later.
The task prompt is stored in TASKS.json, not in the state file.
Read the prompt from TASKS.json:
jq -r --arg id "[task_id]" '.tasks[$id].prompt // empty' .shipspec/planning/[feature]/TASKS.json
Delegate to the task-verifier agent with:
Based on task-verifier result:
All acceptance criteria passed.
Clean up state file:
rm -f [state_path] .shipspec/active-loop.local.json
Update TASKS.json: Use task-manager agent with update_status operation to set status to completed
Log completion to .claude/shipspec-debug.log:
$(date -u +%Y-%m-%dT%H:%M:%SZ) | [task_id] | LOOP_END | VERIFIED after [iteration] attempts
Output the completion marker:
<task-loop-complete>VERIFIED</task-loop-complete>
Tell user: "Task [task_id] verified! All acceptance criteria passed."
Some criteria failed. Manual intervention required.
Clean up state file:
rm -f [state_path] .shipspec/active-loop.local.json
Log the failure to .claude/shipspec-debug.log:
$(date -u +%Y-%m-%dT%H:%M:%SZ) | [task_id] | LOOP_END | INCOMPLETE | [brief failure reason]
Output the incomplete marker:
<task-loop-complete>INCOMPLETE</task-loop-complete>
Show the user what failed:
"## Verification Failed
The following criteria are not met:
- [List failed criteria]
Please fix these issues and run
/implement-task [feature]again."
Cannot verify due to infrastructure issues.
Clean up state file:
rm -f [state_path] .shipspec/active-loop.local.json
Log to .claude/shipspec-debug.log:
$(date -u +%Y-%m-%dT%H:%M:%SZ) | [task_id] | LOOP_END | BLOCKED | [reason]
Output the blocked marker:
<task-loop-complete>BLOCKED</task-loop-complete>
Tell user: "Task verification is blocked: [reason]. Manual intervention required."
/implement-task