sandgardenhq/sgai/set-workflow-state
Claude Code and agent skill by sandgardenhq/sgai
- community
Checking that the SKILL.md file is still in the repository.
Coordinator and retrospective workflow-state protocol. Use only when the current agent has permission to call sgai_update_workflow_state; Task subagents should return STATUS or REVIEW_STATUS envelopes instead.
Install
npx vskill@latest install sandgardenhq/sgai/set-workflow-stateSKILL.md
Set Workflow State
State File Protocol
CRITICAL: Use sgai_update_workflow_state only from agents that have permission to call it, primarily coordinator and retrospective. Developer, reviewer, verifier, deployer, writer, and hidden role subagents should return their STATUS or REVIEW_STATUS envelopes to the caller instead.
State Schema
Field Meanings
`status` - Overall workflow status
"working"- Actively working, may need another iteration"agent-done"- Current primary workflow agent finished its turn and SGAI should return control to coordinator or the next workflow phase."complete"- Work is done successfully
`message` - Status message
- Brief description of current state
- When complete, provide a summary of what was accomplished
- Be clear and specific
`task` - Current task being worked on (required)
- Set to describe your current task: "Writing tests for login endpoint"
- Set to empty string (
"") when no specific task or when complete - Helps human understand your progress in real-time
`progress` - Progress log (array of strings)
- Append entries as you work - this is your audit trail
- Document major steps completed
- Note decisions made and why
- Track issues encountered and how you resolved them
- This helps humans understand your thought process
How to Update State File
IMPORTANT: Use the sgai_update_workflow_state tool to update the state file. Do NOT use bash/jq commands directly.
Tool: sgai_update_workflow_state
Available parameters:
status(required): "working" | "agent-done" | "complete"task(required): Current task being worked on. Use empty string to clear.addProgress(required): Add a progress note (appended to progress array). Document your steps frequently.
Examples:
Update frequency:
- After completing each major step
- When changing tasks
- Before requesting another iteration
- Before marking complete
- At least every few turns of work
Human Communication
Use ask_user_question to present structured multi-choice questions to the human partner. This is the sole channel for human communication.
Coordinator Handoffs
Workflow handoffs are driven by durable notes in .sgai/PROJECT_MANAGEMENT.md plus sgai_update_workflow_state({status: "agent-done"}) to yield control when the current agent is a workflow owner. Task subagent handoffs are driven by their final envelope response.
How Handoffs Work
- Record the handoff: Append the work request, blocker, or decision to
.sgai/PROJECT_MANAGEMENT.mdonly if the current agent has permission and the prompt explicitly owns that ledger write.
- Yield control when done: Set
status: "agent-done"after recording durable handoff notes in.sgai/PROJECT_MANAGEMENT.md.
- Default to coordinator: When no messages are pending, control returns to the coordinator.
- Default handoff target: If no explicit next agent is requested, control returns to the coordinator to inspect the ledger and decide the next delegation.
Key Points
.sgai/PROJECT_MANAGEMENT.mdis the durable coordination ledger- Only coordinator can set
status: "complete"to end the entire workflow - The current handoff and available-agent list provide context for coordinator delegation
- Agents never route to themselves
- The coordinator should record its own status with
sgai_update_workflow_stateor.sgai/PROJECT_MANAGEMENT.md
Task Subagent Return Protocol
If you are a Task subagent, do not call sgai_update_workflow_state unless your prompt explicitly permits it. Load and follow subagent-return-protocol skill; implementation, deployment, writing, and cleanup agents return its Execution Envelope, while reviewer, verifier, safety-review, and project-critic agents return its Review Envelope.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcmd/sgai/skel/.sgai/skills/set-workflow-state/SKILL.md
Popularity
- Repository stars
- 124
- Repository forks
- 7
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sandgardenhq/sgai/set-workflow-state)