One-time setup for a workflow session. Prompts for terminal role, sets up logging context, checks folder structure, and guides next steps. Run this once per terminal at session start.
You are in init mode. Your job is to set up a terminal for the workflow session: establish its role, configure logging, and provide next-step guidance.
Display the 4-terminal pipeline:
T1: Intake T2: Planner T3: Builder T4: Validator
(/wf-status, (/wf-spec) (/wf-implement) (/wf-verify)
/wf-brainstorm, │ │ │
/wf-bug) └─→ [ready/] ←────────┘ │
│ │
└──────→ [verify/] ←────────────────────┘
Then say: "Run /wf-help anytime to see the full strategy."
Which terminal are you?
1) T1 — Intake (/wf-status, /wf-brainstorm, /wf-bug) [Sonnet]
2) T2 — Planner (/wf-spec) [Opus]
3) T3 — Builder (/wf-implement loop) [Opus]
4) T4 — Validator (/wf-verify loop) [Sonnet]
Wait for user input (1–4).
Based on selection, show:
✓ You are T2 (Builder)
✓ Model: Opus 4.6
✓ Command: /model opus
What you'll do:
• /loop 2m /wf-implement
• Auto-picks plans from plans/ready/
• Executes steps, writes tests, commits
• Moves completed plans to verify/
Set the terminal role for /wf-next:
export TERMINAL_ROLE="T2 — Builder"
(Replace with your role: "T1 — Intake", "T3 — Builder", or "T4 — Validator")
Then run:
/wf-next
This will automatically invoke the right skill for your role.
Create/read session files:
mkdir -p .logs
if [ ! -f ".logs/SESSION_TIMESTAMP" ]; then
date +%Y-%m-%d-%s > .logs/SESSION_TIMESTAMP
echo "📝 New session: $(cat .logs/SESSION_TIMESTAMP)"
else
echo "📝 Joining session: $(cat .logs/SESSION_TIMESTAMP)"
fi
# Derive terminal ID from TERM_SESSION_ID
export SESSION_ID="$(cat .logs/SESSION_TIMESTAMP)-T${ROLE_NUM}"
echo "📝 Your ID: $SESSION_ID"
Then show:
✓ Logging enabled to .logs/workflow.log
✓ SESSION_ID: 2026-04-02-1743868195-T2
✓ Queue metrics tracked automatically
Verify these exist (create if missing):
✓ plans/ready/
✓ plans/active/
✓ plans/verify/
✓ plans/complete/
✓ plans/rolled-back/
✓ bugs/open/
✓ bugs/triaged/
✓ bugs/closed/
Show:
✓ Folder structure: ready
Based on role:
T1 (Intake):
NEXT STEPS:
1. /model sonnet
2. /loop 10m /wf-status
3. /wf-brainstorm to capture new ideas
4. /wf-bug to file discovered issues
5. Keep T2 fed with decided briefs
Run /wf-help to understand the flow.
T2 (Planner):
NEXT STEPS:
1. /model opus
2. /wf-spec BRF-001 (or pick a brief)
3. Convert briefs to plans, move to ready/
4. Keep ready/ queue at 2–3 plans for T3
Run /wf-help to understand the flow.
T3 (Builder):
NEXT STEPS:
1. /model opus
2. /loop 2m /wf-implement
3. Wait for T2 to create ready plans
4. Auto-picks and executes them
If idle, alert T2 (plans/ready/ is empty).
Run /wf-help to understand the flow.
T4 (Validator):
NEXT STEPS:
1. /model sonnet
2. /loop 3m /wf-verify
3. Auto-validates plans from plans/verify/
4. Can manually /wf-debug if needed
Run /wf-help to understand the flow.
═══════════════════════════════════════════════════════════════════════════
Session: 2026-04-02-1743868195
Terminal: T2 (Builder)
Model: Opus 4.6
Logging: Enabled → .logs/workflow.log
Ready to go! Follow the NEXT STEPS above.
═══════════════════════════════════════════════════════════════════════════
.logs/SESSION_TIMESTAMP is created by first terminal, read by others/wf-help reference in outputprecmd hook to ~/.zshrc (see step 3)Other skills check:
if [ -n "$SESSION_ID" ] && [ -d ".logs" ]; then
log_start "skill_name" "metric"
# ... do work ...
log_done "skill_name" "outcome"
else
# Logging disabled, skill still runs
# ... do work ...
fi
If user runs a skill without /wf-init, it works but doesn't log. No friction.
Users will see this after init completes:
/model [opus|sonnet] (shown in NEXT STEPS)/wf-init in each/wf-status shows healthy queues/wf-help to review strategy anytime