skills/work/SKILL.md
Execute an approved wish plan — orchestrate subagents per task group with fix loops, validation, and review handoff.
npx skillsauth add namastexlabs/automagik-genie workInstall 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.
The engineer's skill, invoked via genie work <agent> <ref> dispatch. Orchestrate execution of an approved wish from .genie/wishes/<slug>/WISH.md. The orchestrator never executes directly — always dispatch via subagent.
This skill receives its execution context from the dispatch layer:
.genie/wishes/<slug>/WISH.md in the shared worktreeIf context is injected, use it directly. Do not re-parse the wish for information already provided.
.genie/wishes/<slug>/WISH.md from the shared worktree, confirm scope.genie task checkout #<seq>
/refine on the task prompt (text mode) with WISH.md as context anchor. Read output from /tmp/prompts/<slug>.md. Fallback: proceed with original prompt if refiner fails (non-blocking).genie task comment #<seq> "Building group N..."
/review against the wish spec for this group's acceptance criteria before signaling done. On FIX-FIRST, dispatch fix subagent (max 2 loops).genie task move #<seq> --to review --comment "Group N complete"
genie agent send 'Group N complete — all criteria met' --to <leader>.genie task done #<parent-seq> --comment "All groups shipped"
All work tasks complete. Run /review./review returns SHIP on the planAll dispatch uses the genie agent spawn command. The orchestrator spawns subagents for each role — never executes work directly.
# Spawn an engineer for the task
genie agent spawn engineer
# Spawn a reviewer (always separate from engineer)
genie agent spawn reviewer
# Spawn a fixer for FIX-FIRST gaps
genie agent spawn fixer
| Need | Method |
|------|--------|
| Implementation task | genie agent spawn engineer |
| Review task | genie agent spawn reviewer (never same agent as engineer) |
| Fix task | genie agent spawn fixer (separate from reviewer) |
| Quick validation | Bash tool directly — no subagent needed |
Coordinate via genie agent send '<message>' --to <agent>. Use genie agent send '<message>' --broadcast for team-wide updates.
When dispatching an engineer for a group, the team-lead MUST extract the relevant context from WISH.md and paste it directly into the dispatch prompt. Do NOT tell the engineer to "read WISH.md" — curate the context for them.
Why: Reading WISH.md wastes engineer context window on metadata, other groups, and scope sections irrelevant to their task. Curated context = better focus, fewer hallucinations about scope, and faster execution.
What to extract and paste into the dispatch prompt:
bun run check)Example dispatch prompt structure:
Execute Group N of wish "<slug>".
Goal: <one sentence>
Deliverables:
1. <deliverable 1>
2. <deliverable 2>
Acceptance Criteria:
- [ ] <criterion 1>
- [ ] <criterion 2>
Validation: <command>
Depends-on: <group refs or "none">
Anti-pattern: "Implement Group 2. Read WISH.md for details." — this forces the engineer to parse an entire wish document, navigate to the right section, and risk being distracted by other groups' scope. The team-lead has already read the wish; don't make the engineer re-read it.
genie agent send to the leader when a group is done.genie wish status <slug> and marks groups complete via genie wish done <slug>#<group> (and, when PG tasks exist, genie task done #<seq>).genie task done — that is the leader's responsibility after verifying the work.genie wish reset <ref> to retry.When a subagent fails or fix loop limit (2) is exceeded:
When PG tasks exist for the wish, use genie task commands to track execution:
| Event | Command |
|-------|---------|
| Start working on group | genie task checkout #<seq> |
| Progress update | genie task comment #<seq> "<status>" |
| Group complete | genie task move #<seq> --to review --comment "Group N complete" |
| All groups done | genie task done #<parent-seq> --comment "All groups shipped" |
| Group blocked | genie task block #<seq> --reason "<reason>" |
Graceful degradation: If no PG task exists for the wish (e.g., PG unavailable or wish was created before v4), skip all genie task commands and fall back to current behavior. Task integration is optional — the core flow must never break due to missing tasks.
Wish fix-dispatch-initial-prompt has 1 execution group. The orchestrator runs /work:
# 1. Dispatch wave (spawns engineers automatically)
genie work fix-dispatch-initial-prompt
# Output: 🚀 Dispatching Wave 1 — 1 group(s)
# ✅ Group "1" set to in_progress
# 🔧 Dispatching work to engineer for "fix-dispatch-initial-prompt#1"
# 2. Monitor (ALWAYS sleep 60 between checks)
sleep 60 && genie wish status fix-dispatch-initial-prompt
# Output: Group 1: 🔄 in_progress
# 3. Check again
sleep 60 && genie wish status fix-dispatch-initial-prompt
# Output: Group 1: ✅ done — Progress: 1/1 done
# 4. All groups done → local review
genie agent spawn reviewer
genie agent send 'Review wish fix-dispatch-initial-prompt. Run bun test and check all 5 call sites.' --to reviewer
# Reviewer returns: SHIP
# 5. Create PR
git add -A && git commit -m "fix: pass initialPrompt to handleWorkerSpawn in all dispatch commands"
git push origin HEAD
gh pr create --base dev --title "fix: pass initialPrompt to dispatch" --body "Fixes #745. Wish: fix-dispatch-initial-prompt"
For multi-wave wishes, call genie work <slug> again after each wave completes — it dispatches the next wave automatically.
/review per group before signaling done — never skip the review gate.Every session MUST end by writing a terminal outcome to the turn-session contract. This is how the orchestrator reconciles executor state — skipping it leaves the row open and blocks auto-resume.
genie done — work completed, acceptance criteria metgenie blocked --reason "<why>" — stuck, needs human input or an unblocking signalgenie failed --reason "<why>" — aborted, irrecoverable error, or cannot proceedRules:
blocked / failed require --reason.genie done inside an agent session (GENIE_AGENT_NAME set) closes the current executor; it does not require a wish ref.data-ai
Dispatch trace subagent to investigate unknown issues — reproduces, traces, and reports root cause for /fix handoff.
data-ai
Investigate bugs comprehensively — cascade through /trace, capture browser evidence, extract observability data, and auto-create a GitHub issue with all findings.
testing
Wire a Genie agent to an Omni channel in one canonical flow — register the agent, bind to an instance, verify the round-trip. Replaces the 5+ command legacy chain.
data-ai
Full PM playbook — triage backlog, prioritize, assign, track, report, escalate. Copilot, autopilot, or pair modes.