plugins/swiz-core/skills/swiz-task-governance/SKILL.md
Understand and comply with swiz task governance enforcement
npx skillsauth add mherod/swiz plugins/swiz-core/skills/swiz-task-governanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Note on task tools: This skill uses canonical task tool names (
TaskCreate,TaskUpdate,TaskList,TaskGet). If your environment uses different names, consult the Tool Equivalence table in CLAUDE.md. If no task tool is available, maintain an internal numbered checklist and skip task status calls.
Invoke this skill when:
!swiz tasks list 2>/dev/null || echo "swiz tasks unavailable"
Tasks follow a strict one-way state machine:
pending → in_progress → completed
in_progress. pending → completed is blocked by the pretooluse-task-transition-validator hook.deleted only to remove tasks that are genuinely obsolete — never to clean up governance violations.pretooluse-require-tasks)The hook blocks Bash, Edit, Write, and Skill tool calls unless:
in_progressMaintain the buffer proactively — do not wait for a block to appear:
TaskCreate for the next logical unit of work.in_progress task covers the action you are about to take.1. TaskList — read current state
2. TaskUpdate pending→in_progress — claim a task that covers your next action
3. Proceed with Bash/Edit/Write
1. Check: is there an in_progress task? (last TaskList < 10 min ago)
2. If no in_progress: TaskUpdate a pending task → in_progress
3. If no pending tasks exist: TaskCreate at least 2 pending tasks first
4. Proceed
If your last TaskList call was more than 10 minutes ago, run TaskList again before any Bash/Edit/Write to refresh canonical state. The hook enforces this.
Subject rules (enforced by pretooluse-task-subject-validation):
Description: Describe the outcome and approach, not a transcript of your plan.
activeForm: Present continuous shown in the spinner — e.g., "Fixing auth bug".
TaskCreate
subject: "Fix authentication token expiry"
description: "Token validation doesn't handle clock skew..."
activeForm: "Fixing auth token expiry"
Every TaskUpdate status:completed must include evidence in the description field.
Use these prefixes:
| Prefix | Example |
|--------|---------|
| commit:<sha> | commit:abc1234 |
| file:<path> | file:src/skill-utils.ts |
| test:<result> | test:74 passed |
| pr:<url> | pr:https://github.com/... |
| note:<text> | note:no code change needed, config updated |
Combine as needed: commit:abc1234 test:74 passed
The pretooluse-task-completion-rate-limit hook allows a maximum of 2 completions per 5 seconds.
If you need to close several tasks, pause briefly between the second and third completion.
pretooluse-no-phantom-task-completion blocks completing a task that has no substantive tool calls (Edit/Write/Bash/Read) since it was set in_progress. You must do real work before completing.
You cannot complete the last remaining in_progress task if no pending tasks exist to replace it.
Before completing your final task: TaskCreate at least one new pending task (or confirm the session is genuinely wrapping up).
These Bash commands are exempt from the pretooluse-require-tasks gate — you can run them without an in_progress task:
git log, git status, git diff, git show, git branch, git remote, git rev-parsegit push, git pull, git fetchgh commandsls, rg, grepswiz issue close, swiz issue commentcurl, wgetNon-exempt examples (always need in_progress): git commit, any file edit, bun test, bun run, pnpm ...
/commit before git commitThe pretooluse-skill-invocation-gate requires /commit to have been invoked in the current session before any git commit shell command runs. After invoking /commit, a recent TaskList is also required before the actual commit.
/push before git pushSimilarly, /push must be invoked before git push.
| Command | Required skill |
|---------|---------------|
| gh pr create | /pr-open |
| gh issue edit (label changes) | /refine-issue |
| gh issue edit (adding triaged) | /triage-issues |
| Dismiss PR review | /pr-comments-address |
The stop-incomplete-tasks hook blocks session stop if any tasks are pending or in_progress.
Before stopping:
in_progress tasks with evidence.pending tasks (or ensure they are genuine carry-forward items handled by /end-of-day)./end-of-day if there are unpushed commits.1. TaskList — see what exists
2. TaskUpdate <id> status:in_progress — pick a relevant pending task
3. Retry your tool call
1. TaskCreate <next logical task> — add pending work
2. TaskCreate <follow-on task> — add a second if needed
3. TaskUpdate <one of them> in_progress
4. Retry your tool call
1. TaskList — refresh canonical state
2. Verify in_progress task exists
3. Retry your tool call
You tried to complete a task without any tool calls since setting it in_progress. Do the actual work first, then complete with evidence.
Your task subject contains "and", "then", or multiple verbs. Use TaskUpdate to rewrite the subject as a single imperative phrase.
Tasks are stored as JSON files in ~/.claude/tasks/<session_id>/. Completed tasks have their JSON files deleted — readSessionTasksFresh returns [] for a fully clean session. Do not treat an empty task list as "no tasks were ever created"; it may mean all tasks completed cleanly.
Session start: TaskList → TaskUpdate pending→in_progress → work
Mid-session: keep ≥2 incomplete, ≥1 in_progress at all times
Before commit: /commit skill → TaskList → git commit
Completing: TaskUpdate status:completed description:"commit:<sha>"
Stopping: all tasks complete + /end-of-day if unpushed commits
data-ai
Run swiz continue to resume the agent's self-directed loop. Picks up the next task from the backlog or generates a new one based on ambition mode. Use when resuming autonomous work, continuing after a pause, or triggering the next iteration of the agent loop.
data-ai
Configure swiz settings with presets or individual changes. Supports workflow presets (backlog, creative, quiet), collaboration modes (solo, team), and safety presets (lockdown, relaxed). Use when changing agent behavior, switching workflow modes, or adjusting safety gates.
tools
Run swiz cleanup to remove stale hook configurations, orphaned dispatch entries, and temporary files. Use when hooks are out of sync, after uninstalling plugins, or when swiz state needs a reset.
testing
Enable swiz auto-continue globally or for a specific session. Allows the agent to automatically continue working after task completion. Use when starting autonomous workflows, enabling backlog processing, or scoping auto-continue to a specific session.