phase-task-verification
Shared branch creation and verification logic for sequential and parallel task execution - handles git operations, HEAD verification, and MODE-specific behavior
What this skill does
# Phase Task Verification
## When to Use
Invoked by `sequential-phase-task` and `parallel-phase-task` after task implementation to create and verify git-spice branch.
## Parameters
- **RUN_ID**: 6-char run ID (e.g., "8c8505")
- **TASK_ID**: Phase-task (e.g., "1-1")
- **TASK_NAME**: Short name (e.g., "create-verification-skill")
- **COMMIT_MESSAGE**: Full commit message
- **MODE**: "sequential" or "parallel"
## The Process
**Step 1: Stage and create branch**
```bash
git add .
gs branch create {RUN_ID}-task-{TASK_ID}-{TASK_NAME} -m "{COMMIT_MESSAGE}"
```
**Step 2: Verify based on MODE**
**MODE: sequential** - Verify HEAD points to expected branch:
```bash
CURRENT=$(git rev-parse --abbrev-ref HEAD)
EXPECTED="{RUN_ID}-task-{TASK_ID}-{TASK_NAME}"
[ "$CURRENT" = "$EXPECTED" ] || { echo "ERROR: HEAD=$CURRENT, expected $EXPECTED"; exit 1; }
```
**MODE: parallel** - Detach HEAD (makes branch accessible in parent repo):
```bash
git switch --detach
CURRENT=$(git rev-parse --abbrev-ref HEAD)
[ "$CURRENT" = "HEAD" ] || { echo "ERROR: HEAD not detached ($CURRENT)"; exit 1; }
```
## Rationalization Table
| Rationalization | Why It's Wrong |
|----------------|----------------|
| "Verification is optional" | Silent failures lose work |
| "Skip detach in parallel mode" | Breaks worktree cleanup |
| "Branch create errors are obvious" | Silent failures aren't detected until cleanup fails |
| "Detach can happen later" | Cleanup runs in parent repo - branch must be accessible |
| "HEAD verification adds overhead" | <100ms cost prevents hours of lost work debugging |
## Error Handling
**git add fails:**
- **No changes to stage**: Error is expected - task implementation failed or incomplete
- Check if task was actually implemented
- Verify files were modified in expected locations
- Do NOT continue with branch creation
- **Permission issues**: Git repository permissions corrupted
- Check file ownership: `ls -la .git`
- Verify worktree is accessible
- Escalate to orchestrator
**gs branch create fails:**
- **Duplicate branch name**: Branch already exists
- Check existing branches: `git branch | grep {RUN_ID}-task-{TASK_ID}`
- Verify task wasn't already completed
- May indicate resume scenario - escalate to orchestrator
- **Git-spice errors**: Repository state issues
- Run `gs repo sync` to fix state
- Verify git-spice initialized: `gs ls`
- Check for uncommitted changes blocking operation
- **Invalid branch name**: Name contains invalid characters
- Verify RUN_ID is 6-char alphanumeric
- Verify TASK_NAME contains only alphanumeric + hyphens
- Do NOT sanitize - escalate to orchestrator (indicates data corruption)
**HEAD verification fails (sequential mode):**
- **Expected**: `gs branch create` should checkout new branch automatically
- **Actual**: Still on previous branch or detached HEAD
- Indicates git-spice behavior change or bug
- Do NOT continue - task is not properly staged
- Escalate to orchestrator with exact HEAD state
**HEAD verification fails (parallel mode):**
- **Expected**: `git switch --detach` should detach HEAD
- **Actual**: Still on branch after detach command
- Indicates git version issue or repository corruption
- Do NOT continue - cleanup will fail to access branch
- Escalate to orchestrator with git version: `git --version`
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.