بنقرة واحدة
module-workflow
Implementation orchestrator for stages 2-6 (Foundation through Validation)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Implementation orchestrator for stages 2-6 (Foundation through Validation)
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Build coordination wrapper for VCV Rack modules using Makefile
Load module context from handoff files to resume work
Multi-agent parallel investigation for complex VCV Rack problems
Validate panel ↔ creative brief consistency, catch design drift
Adaptive brainstorming for VCV Rack module concepts and improvements
Version management, bug fixes, feature additions for VCV Rack modules
| name | module-workflow |
| description | Implementation orchestrator for stages 2-6 (Foundation through Validation) |
| allowed-tools | ["Task","Bash","Read","Write","Edit"] |
| preconditions | ["architecture.md must exist (from /plan)","plan.md must exist (from /plan)","Status must be 🚧 Stage 1 OR resuming from 🚧 Stage 2+","Module must NOT be ✅ Working or 📦 Installed (use /improve instead)"] |
Purpose: Pure orchestrator for stages 2-6 of VCV Rack module implementation. This skill NEVER implements directly - it always delegates to specialized subagents and presents decision menus after each stage completes.
This skill orchestrates module implementation stages 2-6. Stages 0-1 (Research & Planning) are handled by the module-planning skill.
Implementation Stages:
CRITICAL ORCHESTRATION RULES:
Stages 2-5 MUST use Task tool to invoke subagents - NEVER implement directly
After EVERY subagent return (whether full stage or phase completion), orchestrator MUST:
This applies to:
Note: Number of phases determined by plan.md - could be 4.1-4.2, or 4.1-4.3, or more depending on complexity
Stage 6 can run directly in orchestrator or via validator subagent
All subagents receive Required Reading (vcv-critical-patterns.md) to prevent repeat mistakes
Subagents NEVER commit - they only implement and return JSON report
Each stage is fully documented in its own reference file in references/ subdirectory.
Before starting, verify contracts from module-planning:
test -f "modules/$MODULE_NAME/.ideas/architecture.md"
test -f "modules/$MODULE_NAME/.ideas/plan.md"
test -f "modules/$MODULE_NAME/.ideas/creative-brief.md"
If any missing, BLOCK with message:
[ModuleName] is missing required planning documents.
Missing files will be listed here:
- architecture.md (from Stage 0)
- plan.md (from Stage 1)
- creative-brief.md (from ideation)
Run /plan [ModuleName] to complete planning stages 0-1.
grep "^### $MODULE_NAME$" MODULES.md
Verify status is appropriate:
[ModuleName] needs planning before implementation.
Run /plan [ModuleName] to complete stages 0-1.
[ModuleName] is already complete.
Use /improve [ModuleName] to make changes.
Purpose: Handle workflow resume from .continue-here.md handoff file.
When invoked via context-resume skill or /continue command:
Check if handoff file exists:
if [ ! -f "modules/${MODULE_NAME}/.continue-here.md" ]; then
echo "No handoff file found. Starting fresh at Stage 2."
CURRENT_STAGE=2
fi
Parse handoff metadata:
CURRENT_STAGE=$(grep "^stage:" modules/${MODULE_NAME}/.continue-here.md | awk '{print $2}')
NEXT_ACTION=$(grep "^next_action:" modules/${MODULE_NAME}/.continue-here.md | awk '{print $2}')
NEXT_PHASE=$(grep "^next_phase:" modules/${MODULE_NAME}/.continue-here.md | awk '{print $2}')
Determine resume behavior:
Always use orchestration pattern:
Purpose: Pure orchestration dispatcher that ONLY invokes subagents via Task tool.
Entry point: Called by /implement command or /continue command after module-planning completes.
This skill is a PURE ORCHESTRATOR:
# Check if handoff file exists (resuming)
if [ -f "modules/${MODULE_NAME}/.continue-here.md" ]; then
# Parse stage from handoff YAML frontmatter
CURRENT_STAGE=$(grep "^stage:" modules/${MODULE_NAME}/.continue-here.md | awk '{print $2}')
echo "Resuming from Stage ${CURRENT_STAGE}"
else
# Starting fresh after planning
CURRENT_STAGE=2
echo "Starting implementation at Stage 2"
fi
See references/state-management.md for checkStagePreconditions() function.
async function dispatchStage(moduleName, stageNumber) {
// Check preconditions
const preconditionCheck = checkStagePreconditions(moduleName, stageNumber)
if (!preconditionCheck.allowed) {
console.log(`✗ BLOCKED: ${preconditionCheck.reason}`)
console.log(`Action: ${preconditionCheck.action}`)
return { status: 'blocked', reason: preconditionCheck.reason }
}
// ALWAYS invoke subagents via Task tool for stages 2-5
switch(stageNumber) {
case 2:
// Invoke foundation-agent subagent
return await invokeSubagent('foundation-agent', {
moduleName,
contracts: loadContracts(moduleName),
requiredReading: 'vcv-critical-patterns.md'
})
case 3:
// Invoke shell-agent subagent
return await invokeSubagent('shell-agent', {
moduleName,
contracts: loadContracts(moduleName),
requiredReading: 'vcv-critical-patterns.md'
})
case 4:
// Invoke dsp-agent subagent
return await invokeSubagent('dsp-agent', {
moduleName,
contracts: loadContracts(moduleName),
requiredReading: 'vcv-critical-patterns.md'
})
case 5:
// Invoke gui-agent subagent
return await invokeSubagent('gui-agent', {
moduleName,
contracts: loadContracts(moduleName),
requiredReading: 'vcv-critical-patterns.md'
})
case 6:
// Can run directly or invoke validator subagent
return executeStage6Validation(moduleName) // See references/stage-6-validation.md
default:
return { status: 'error', reason: `Invalid stage: ${stageNumber}` }
}
}
async function runWorkflow(moduleName, startStage = 2) {
let currentStage = startStage
let shouldContinue = true
while (shouldContinue && currentStage <= 6) {
console.log(`\n━━━ Stage ${currentStage} ━━━\n`)
// ALWAYS invoke subagent (never implement directly)
const result = await dispatchStage(moduleName, currentStage)
if (result.status === 'blocked' || result.status === 'error') {
console.log(`\nWorkflow blocked: ${result.reason}`)
return result
}
// CHECKPOINT: Commit, update state, present menu
await commitStage(moduleName, currentStage, result.description)
await updateHandoff(moduleName, currentStage + 1, result.completed, result.nextSteps)
await updateModuleStatus(moduleName, `🚧 Stage ${currentStage}`)
await updateModuleTimeline(moduleName, currentStage, result.description)
// Present decision menu and WAIT for user
const choice = presentDecisionMenu({
stage: currentStage,
completionStatement: result.completionStatement,
moduleName: moduleName
})
// Handle user choice
if (choice === 'continue' || choice === 1) {
currentStage++
} else if (choice === 'pause') {
console.log("\n✓ Workflow paused. Resume anytime with /continue")
shouldContinue = false
} else {
// Handle other menu options (review, test, etc.)
handleMenuChoice(choice, moduleName, currentStage)
}
}
if (currentStage > 6) {
console.log("\n✓ All stages complete!")
await updateModuleStatus(moduleName, '✅ Working')
}
}
Usage:
// From /implement command (after planning complete):
runWorkflow(moduleName, 2)
// From /continue command:
const handoff = readHandoffFile(moduleName)
const resumeStage = handoff.stage
runWorkflow(moduleName, resumeStage)
Implementation stages reference files (Stages 0-1 removed, now in module-planning skill):
Note: Stage reference files contain subagent prompts and context. The orchestrator reads these files to construct Task tool invocations but never implements stage logic directly.
Invoked by:
/implement command (after module-planning completes)context-resume skill (when resuming implementation stages)/continue command (for stages 2-6)ALWAYS invokes (via Task tool):
foundation-agent subagent (Stage 2) - REQUIRED, never implement directlyshell-agent subagent (Stage 3) - REQUIRED, never implement directlydsp-agent subagent (Stage 4) - REQUIRED, never implement directlygui-agent subagent (Stage 5) - REQUIRED, never implement directlyvalidator subagent (Stage 6) - Optional, can run directlyAlso invokes:
build-automation skill (build coordination across stages)module-testing skill (validation after stages 4, 5, 6)module-lifecycle skill (if user chooses to install after Stage 6)Reads (contracts from module-planning):
architecture.md (DSP specification from Stage 0)plan.md (implementation strategy from Stage 1)creative-brief.md (vision from ideation)parameter-spec.md (parameter definitions)Creates:
.continue-here.md (handoff file for checkpoints)CHANGELOG.md (Stage 6)presets/ directory (Stage 6)Updates:
.continue-here.md (after each stage completes)If contract files missing before Stage 2:
Block and instruct user to run /plan [ModuleName] to complete stages 0-1.
If build fails during subagent execution: Subagent returns error. Orchestrator presents 4-option menu:
If tests fail: Present menu with investigation options. Do NOT auto-proceed to next stage.
If subagent fails to complete: Present menu allowing retry, manual intervention, or workflow pause.
If git staging fails: Continue anyway, log warning.
Workflow is successful when:
CRITICAL ORCHESTRATION REQUIREMENTS:
commitStage() from state-management.mdWhen executing this skill:
Common pitfalls to AVOID: