Agent skill
dream
Batch-execute SHIP-ready wishes overnight — pick wishes, orchestrate workers, review PRs, wake up to results.
Install this agent skill to your Project
npx add-skill https://github.com/automagik-dev/genie/tree/main/skills/dream
SKILL.md
/dream — Overnight Batch Execution
Pick SHIP-ready wishes, build a dependency-ordered execution plan, spawn parallel workers, review PRs, merge to dev, run QA loop, produce a wake-up report.
When to Use
- Human wants to queue multiple wishes for autonomous overnight execution
- Multiple SHIP-ready wishes exist in
.genie/brainstorm.mdunderPoured
Flow
- Pick wishes from
.genie/brainstorm.mdin the shared worktree. - Generate DREAM.md with dependency-ordered execution plan.
- Human confirms DREAM.md (may edit before run).
- Create dream task (v4): register the dream run in PG:
bash
genie task create "Dream run <date>" --type software --tags chore - Create child tasks (v4): one per wish in the dream:
bash
genie task create "<wish title>" --parent #<dream-seq> --type software - Phase 1 — Execute: dispatch workers per wish via
genie work, collect outcomes. - Phase 2 — Review + PR: review each group, create PRs, fix valid issues, CI green.
- Phase 3 — Merge + QA: merge to dev, spawn qa, QA loop until criteria proven.
- Phase 4 — Report: write DREAM-REPORT.md as the wake-up artifact, log to parent task.
Picker
- Read
.genie/brainstorm.md, locate thePouredsection. - Parse each SHIP-ready entry in listed order, extracting
slugand one-line description. - If no entries found, print
No SHIP-ready wishes found in .genie/brainstorm.mdand exit. - Display numbered list preserving original order:
1. <slug> — <one-line description> - Prompt human to choose by number(s) (
1 3 5) orall. Accept whitespace-separated numbers. - Emit selected set in order:
- <slug>: .genie/wishes/<slug>/WISH.md
DREAM.md Generation
- For each selected wish, read
depends_onfrom itsWISH.md. - Compute topological sort across selected wishes. Assign
merge_orderas integer layers1..N:- Layer 1: wishes with no selected dependencies.
- Increment layer when a wish depends on a lower layer.
- Same-layer wishes are parallel.
- Generate per-wish entry:
| Field | Value |
|---|---|
slug |
wish identifier |
branch |
feat/<slug> |
wish_path |
.genie/wishes/<slug>/WISH.md |
depends_on |
upstream slugs from WISH.md |
merge_order |
integer from topological layering |
- Write to
.genie/DREAM.mdin the shared worktree. - Present for human confirmation before execution.
Team Lifecycle
create dream team → hire agents → execute groups → review → PR to dev → merge → QA loop → disband
# Create a team for this dream session
genie team create dream-<date>
# Hire workers
genie team hire engineer # one per wish
genie team hire reviewer # one per PR
genie team hire fixer # for FIX-FIRST gaps
genie team hire qa # for QA loop on dev
Phase 1: Execute
- Create team:
genie team create dream-<date>. - For each wish in DREAM.md, ordered by
merge_orderlayer:- Same-layer wishes dispatch in parallel.
- Dispatch workers via
genie work <agent> <slug>#<group>— gets state tracking for free. - Parallel groups within a wish dispatched simultaneously.
- Monitor via
genie task status <slug>. Mark groups done viagenie task done <ref>. - Track progress (v4): as each wish starts execution, move its child task:
bash
genie task move #<wish-seq> --to build --comment "Execution started" - Workers signal completion via
genie agent send. - If a group gets stuck, use
genie reset <ref>to retry.
Worker Contract
Each worker executes independently:
- Read WISH.md from
wish_path. - Self-refine task prompt via
/refine(text mode). - Checkout branch:
git checkout -b <branch>. - Implement execution groups from WISH.md.
- Run local
/reviewper group against acceptance criteria. - CI check: run CI. If fail → fix and retry (max 3 retries). Poll CI status — do not sleep.
- After 3 failures: mark BLOCKED.
- Only after CI green:
gh pr create --base dev. - Report to lead via
genie agent send:- Success:
DONE: PR at <url>. CI: green. Groups: N/N. - Failure:
BLOCKED: <reason>. Groups: N/N.
- Success:
Phase 2: Review + PR
Trigger: all execute workers have reported DONE or BLOCKED.
- Leader creates PR to dev after all groups done for each wish.
- Read bot comments critically — do not blindly accept automated suggestions.
- Dispatch
/reviewagainst wish acceptance criteria per PR. - On
FIX-FIRST: dispatch/fixfor valid issues (max 2 loops per PR). - On architectural issue: escalate immediately (no fix attempt), record in report.
- CI must be green before proceeding. Poll CI status, do not sleep.
- On
SHIP: mark review-complete.
Phase 3: Merge + QA
Trigger: all PRs reviewed and marked SHIP.
- Merge PRs to dev in
merge_order. - Spawn qa on dev branch:
genie agent spawn qa. - QA loop: test against wish acceptance criteria → failures get
/report→/trace→/fix→ retest. - Each fix creates a new PR to dev, goes through review, merge, retest.
- Continue until all wish criteria are proven or blocked.
Phase 4: Report
Log report to parent task (v4):
genie task comment #<dream-seq> "Dream report: X wishes shipped, Y blocked. See DREAM-REPORT.md"
genie task done #<dream-seq> --comment "Dream run complete"
Write to .genie/DREAM-REPORT.md in the shared worktree:
# Dream Report — <date>
## Per-Wish Status
| merge_order | slug | PR link | CI | Review | Merged | QA |
|-------------|------|---------|----|--------|--------|----|
| 1 | slug-1 | #123 | green | SHIP | yes | verified |
| 2 | slug-2 | #124 | green | SHIP | yes | 2/3 criteria |
## Blocked Wishes
- `<slug>`: blocking reason.
## QA Findings
- `<slug>`: criteria X failed — traced to <root cause>, fix PR #125.
## Follow-ups
- Action items requiring human intervention.
After report is written:
genie team disband dream-<date>
Task Lifecycle Integration (v4)
When PG is available, the dream run is fully tracked in the task system:
| Event | Command |
|---|---|
| Dream run starts | genie task create "Dream run <date>" --type software --tags chore |
| Per-wish tracking | genie task create "<wish title>" --parent #<dream-seq> --type software |
| Wish execution starts | genie task move #<wish-seq> --to build --comment "Execution started" |
| Wish completes | genie task move #<wish-seq> --to done --comment "Shipped — PR #<num>" |
| Wish blocked | genie task block #<wish-seq> --reason "<reason>" |
| Dream report written | genie task comment #<dream-seq> "Dream report: X shipped, Y blocked" |
| Dream run complete | genie task done #<dream-seq> --comment "Dream run complete" |
Graceful degradation: If PG is unavailable or genie task commands fail, skip task tracking and fall back to current behavior. Task integration is optional — the dream flow must never break due to missing tasks. Log a warning and continue.
Rules
- Never early-stop: if a wish returns BLOCKED, record reason and continue with remaining wishes.
- Never skip Phase 2 — every DONE PR must be reviewed.
- Never skip Phase 3 — every merged PR must be QA-tested against wish criteria.
- Orchestrator never executes wish work directly — dispatch via
genie work. - Do not expand scope beyond what WISH.md defines.
- Always write DREAM-REPORT.md, even if all wishes BLOCKED.
- Poll CI status instead of sleeping — never use
sleepin CI retry loops. - Use
genie task done,genie task status, andgenie resetfor state tracking.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
genie
Single entry point for all genie operations — auto-routes natural language to the right skill, detects existing lifecycle state, and handles operational commands. Use when planning features, reporting bugs, managing teams, or asking about the system.
refine
Transform a brief or prompt into a structured, production-ready prompt via prompt-optimizer. File or text mode.
work
Execute an approved wish plan — orchestrate subagents per task group with fix loops, validation, and review handoff.
review
Validate plans, execution, or PRs against wish criteria — returns SHIP / FIX-FIRST / BLOCKED with severity-tagged gaps.
wish
Convert an idea into a structured wish plan with scope, acceptance criteria, and execution groups for /work.
learn
Diagnose and fix agent behavioral surfaces when the user corrects a mistake — connects to Claude native memory.
Didn't find tool you were looking for?