SKILL.md
/next-move
Predict the best next move, present it clearly, and — on approval — hand it to the real WinDAGs execution path.
Two operating rules are mandatory:
- Separate planning topology from runtime topology. Server execution is real for
dagandworkflow.team-loop,swarm,blackboard,team-builder, andrecurringfall back to generic DAG execution. Seereferences/runtime-honesty.md.
- Prefer live WinDAGs visualization over ASCII when execution is going to happen. ASCII is fallback only. See
references/live-execution-visualization.md.
Arguments: $ARGUMENTS
If the user passed --fresh, ignore conversation history and predict from project signals only.
Skill Layout
This skill is structured for on-demand loading. Don't bulk-load — pull only what the current stage needs.
| Need | Load |
|---|---|
| Decision tree, file map, top-level guidance | INDEX.md |
| Per-agent prompts (Sensemaker, Decomposer, etc.) | prompts/<agent>.md |
| Operational rules and judgment-call guidance | references/<topic>.md (see references/INDEX.md) |
| Worked end-to-end walkthroughs | examples/<NN>-<scenario>.md (only when shape recognition is needed) |
| Output schemas for validation | schemas/<output>.schema.json |
| Empty starting structures | templates/<output>.template.<ext> |
| Replay / validate / inspect-attribution utilities | scripts/<utility>.{sh,ts} |
| Direct invocation of a single meta-DAG stage | agents/<stage>.md (subagent for Task tool) |
Project Signals
These are preprocessed at skill-load time via !... shell calls. Treat them as ground truth.
Git State
!`git status --short 2>/dev/null || echo "Not a git repo"`
Branch: !git branch --show-current 2>/dev/null || echo "unknown"
Recent Commits
!`git log --oneline -8 2>/dev/null || echo "No commits"`
What Changed
!`git diff --stat 2>/dev/null || echo "No unstaged changes"`
Staged Changes
!`git diff --cached --stat 2>/dev/null || echo "Nothing staged"`
Recently Modified Files
!`git diff --name-only HEAD~3 2>/dev/null || echo "No recent file changes"`
CLAUDE.md
!`head -60 CLAUDE.md 2>/dev/null || echo "No CLAUDE.md found"`
Package / Project Info
!`cat package.json 2>/dev/null | head -40 || echo "No package.json"`
Port Daddy
!`pd find 2>/dev/null || echo "Port Daddy not installed. portdaddy.dev"`
!`pd notes 2>/dev/null || echo ""`
!`pd salvage 2>/dev/null || echo ""`
!`pd whoami 2>/dev/null || echo ""`
Prior WinDAGs Predictions
!`ls -1t .windags/triples/ 2>/dev/null | head -5 || echo "No prior predictions"`
Decision Flow
flowchart TD
A[Gather signals + conversation context] --> B[Sensemaker]
B --> C{Halt gate?}
C -->|trip| D[Halt: name the contradiction\nload templates/halt-gate-response.template.md]
C -->|pass| E[Decomposer]
E --> F[Skill narrowing via SkillSearchService]
F --> G[Skill Selector + PreMortem in parallel]
G --> H[Synthesizer: planning + runtime topology]
H --> I{Execution likely?}
I -->|yes| J[Open live WinDAGs surface]
I -->|no| K[Plan-only preview]
J --> L[Accept / Modify / Change topology / Reject]
K --> L
L -->|Accept| M[Build skillful nodes\nload references/skillful-node-execution.md]
L -->|Modify| N[Mutate vs restart\nload references/modify-vs-restart.md]
L -->|Change topology| O[Re-evaluate runtime honesty\nload references/runtime-honesty.md]
L -->|Reject| P[Record rejection in triple]
M --> Q[Execute through real runtime]
For depth on any decision point, load the matching reference. Don't try to derive judgment-call rules from the diagram alone.
Core Workflow (Compact)
The full workflow is in the references; this is the lookup version.
- Sensemaker → Load
prompts/sensemaker.md. Validate output againstschemas/sensemaker-output.schema.json. - Halt gate → Apply
references/halt-gate-discipline.md. If trips: rendertemplates/halt-gate-response.template.md, store no triple, stop. - Decomposer → Load
prompts/decomposer.md. 3-7 subtasks. Validate againstschemas/decomposer-output.schema.json. - Skill narrowing → Use
mcpwindagswindagsskillsearch(routes throughSkillSearchService). Seereferences/skill-narrowing-cascade.mdfor internals. - Skill Selector + PreMortem → Load
prompts/skill-selector.mdandprompts/premortem.md. Run in parallel. - Synthesize → Apply
references/topology-selection.mdandreferences/runtime-honesty.md. Validate againstschemas/predicted-dag.schema.json. - Present → Live WinDAGs UI preferred. See
references/live-execution-visualization.md. - Execute on accept → Build skillful nodes. See
references/skillful-node-execution.mdandprompts/execution-node.md. - Modify / restart → See
references/modify-vs-restart.md. - Store triple → Write to
.windags/triples/. Seereferences/triple-feedback-loop.md.
When to Refuse
/next-move halts on ambiguity. Halts are first-class output, not failure. See references/halt-gate-discipline.md. Worked example: examples/03-halt-gate-tripped.md.
When Things Look Wrong
Catalog of failure modes with detection signals and fixes: references/failure-modes.md.
Worked Examples
Load only when you need shape recognition end-to-end:
examples/01-feature-delivery-happy-path.md— clean signals, native DAGexamples/02-debugging-blackboard-shape.md— runtime honesty in practiceexamples/03-halt-gate-tripped.md— pipeline correctly refuses
Quality Gates
Before sending the prediction:
- Sensemaker, Decomposer, Skill Selector, PreMortem all returned valid structured output
- Halt gate enforced when ambiguity remained
- Planning topology and runtime topology both present and honest
- Every node has a primary skill, input contract, output contract, and
commitment_level - Approval steps modeled as real gates (
human-gate-designer), not prose - Live visualization attempted before falling back to ASCII
- Triple stored only on completion or user feedback (never on halt)
NOT-FOR Boundaries
- Creating skills → use
skill-creatororskill-architect - One-off bug debugging → use
fullstack-debugger - Promising native execution of unsupported topologies → see
references/runtime-honesty.md - ASCII theater when live UI is available → open the real surface
- Ad hoc subagent prompts → use
prompts/execution-node.mdandreferences/skillful-node-execution.md