con un clic
build-automation
Build coordination wrapper for VCV Rack modules using Makefile
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Build coordination wrapper for VCV Rack modules using Makefile
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
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
Manage complete module lifecycle - install, uninstall, reset, destroy
| name | build-automation |
| description | Build coordination wrapper for VCV Rack modules using Makefile |
| allowed-tools | ["Bash","Read","Task"] |
| preconditions | ["Module must exist","RACK_DIR must be set"] |
Purpose: Orchestrates VCV Rack module builds using Makefile-based build system with comprehensive failure handling.
This skill is invoked by:
This skill invokes:
When invoked, the build-automation skill follows this workflow:
test -d "modules/$MODULE_NAME"test -f "modules/$MODULE_NAME/Makefile"Context-aware target selection:
make clean && make)make dist)make dist)# Check RACK_DIR is set
if [[ -z "$RACK_DIR" ]]; then
echo "⚠️ RACK_DIR environment variable not set"
echo ""
echo "RACK_DIR must point to your VCV Rack SDK directory."
echo ""
echo "What would you like to do?"
echo "1. Run /setup to configure environment"
echo "2. Set RACK_DIR manually"
echo "3. Exit"
echo ""
read -p "Choose (1-3): " choice
case "$choice" in
1)
# Invoke system-setup skill
exit 2 # Signal to orchestrator to run /setup
;;
2)
echo "Enter RACK_DIR path:"
read -p "> " RACK_DIR_PATH
export RACK_DIR="$RACK_DIR_PATH"
;;
3)
exit 1
;;
esac
fi
# Verify RACK_DIR exists and contains SDK
if [[ ! -f "$RACK_DIR/include/rack.hpp" ]]; then
echo "⚠️ RACK_DIR doesn't contain VCV Rack SDK"
echo "Expected: $RACK_DIR/include/rack.hpp"
echo ""
echo "Run /setup to configure environment"
exit 1
fi
# Determine platform for build target
PLATFORM=$(uname -s)
ARCH=$(uname -m)
case "$PLATFORM" in
Darwin)
if [[ "$ARCH" == "arm64" ]]; then
RACK_PLATFORM="mac-arm64"
else
RACK_PLATFORM="mac-x64"
fi
;;
Linux)
RACK_PLATFORM="linux-x64"
;;
MINGW*|MSYS*|CYGWIN*)
RACK_PLATFORM="win-x64"
;;
*)
echo "Unknown platform: $PLATFORM"
exit 1
;;
esac
echo "Building for platform: $RACK_PLATFORM"
Execute build with appropriate target:
cd "modules/$MODULE_NAME"
# Create logs directory
mkdir -p "../../logs/$MODULE_NAME"
LOG_FILE="../../logs/$MODULE_NAME/build_$(date +%Y%m%d_%H%M%S).log"
# Run make with logging
make $BUILD_TARGET 2>&1 | tee "$LOG_FILE"
BUILD_EXIT_CODE=${PIPESTATUS[0]}
# Return to root directory
cd ../..
# Check exit code
if [[ $BUILD_EXIT_CODE -eq 0 ]]; then
echo "✓ Build successful"
else
echo "✗ Build failed (exit code: $BUILD_EXIT_CODE)"
fi
Build targets:
make clean - Clean build artifactsmake or make all - Compile module (creates plugin.so/.dylib/.dll)make dist - Create distributable plugin archive (.vcvplugin)make install - Copy plugin to VCV Rack plugins directorymake clean all - Clean build from scratchCheck build exit code:
Always show log file path after build attempt:
Build log: logs/[ModuleName]/build_TIMESTAMP.log
User can review full build output from log file if needed.
When build fails (non-zero exit code), present this structured decision menu:
⚠️ Build failed
What would you like to do?
1. Investigate - Run troubleshooter agent to research the error (recommended)
2. Show me the build log - Display full build output for manual review
3. Show me the code - Open relevant source files where error occurred
4. Wait - I'll fix it manually and tell you to resume
5. Other
Choose (1-5): _
Purpose: Automated diagnosis using troubleshooter agent
Implementation:
Extract error from build log (last 50 lines or first error indicator)
Parse error for key information:
Invoke troubleshooter agent via Task tool:
Invoke troubleshooter agent to research this build error:
Error: [extracted error message]
Context: Building VCV Rack module "[ModuleName]" with Make
VCV Rack SDK: [RACK_DIR path]
Platform: [mac-arm64 | mac-x64 | linux-x64 | win-x64]
File: [file path:line number if available]
Please investigate using the graduated depth protocol and provide a structured report.
Wait for troubleshooter report (structured markdown)
Display report to user with findings and recommended solution
Ask: "Should I apply this solution?" (Yes/No/Modify)
IMPORTANT: NEVER auto-retry without explicit user confirmation.
Purpose: Display full build output for manual analysis
Implementation:
logs/[ModuleName]/build_TIMESTAMP.logPurpose: Display source files where error occurred
Implementation:
Purpose: User will fix issue manually outside workflow
Implementation:
Display exit message:
Pausing workflow. Please fix the issue manually.
When ready to retry the build, say:
- "resume build" or "retry build" - Retry build with same target
- "continue workflow" - Skip build and continue to next stage (not recommended)
Build log: logs/[ModuleName]/build_TIMESTAMP.log
Module directory: modules/[ModuleName]/
Exit skill, return control to invoking skill/workflow
Await user continuation command
Purpose: Accept free-form user input for custom actions
Implementation:
When build succeeds (exit code 0), follow this workflow:
Expected artifacts by target:
make all: build/plugin.so (macOS), build/plugin.dll (Windows), build/plugin.so (Linux)make dist: dist/[ModuleName]-[version]-[platform].vcvpluginUse this template:
For Stage 2 (compilation verification):
✓ Build successful (compilation verified)
Module: [ModuleName]
Platform: [mac-arm64 | mac-x64 | linux-x64 | win-x64]
Output: build/plugin.[so|dylib|dll]
Build time: [duration]
Log: logs/[ModuleName]/build_TIMESTAMP.log
For full dist build (Stages 3-6, module-improve):
✓ Build successful
Module: [ModuleName]
Platform: [mac-arm64 | mac-x64 | linux-x64 | win-x64]
Plugin: dist/[ModuleName]-[version]-[platform].vcvplugin
Build time: [duration]
Log: logs/[ModuleName]/build_TIMESTAMP.log
Ready to install to VCV Rack.
Present menu based on invoking context:
Foundation verified. What's next?
1. Continue to Stage 3 (Shell/Parameters)
2. Review generated code
3. Pause workflow
Shell built successfully. What's next?
1. Continue to Stage 4 (DSP)
2. Test in VCV Rack now
3. Review parameter code
4. Pause workflow
DSP built successfully. What's next?
1. Run manual tests (recommended)
2. Continue to Stage 5 (GUI)
3. Test in VCV Rack now
4. Pause workflow
GUI built successfully. What's next?
1. Run manual tests (recommended)
2. Continue to Stage 6 (Validation)
3. Test in VCV Rack now
4. Pause workflow
Module complete! What's next?
1. Test in VCV Rack (recommended)
2. Install to VCV Rack (/install-module)
3. Make improvements (/improve)
Update built successfully. What's next?
1. Test changes in VCV Rack
2. Continue improving
3. Done (commit changes)
After user makes decision, return control to the skill that invoked build-automation:
IMPORTANT: Always return control to invoking skill after success. Don't continue workflow autonomously.
Scenario: foundation-agent completes, module-workflow needs to verify compilation
Invocation:
Success Path:
make clean && make in modules/[ModuleName]/Failure Path:
Scenario: dsp-agent completes Phase 4.2, module-workflow needs full dist build
Invocation:
Success Path:
make dist in modules/[ModuleName]/Failure Path:
Scenario: module-improve applies bug fix to existing module, needs to rebuild
Invocation:
Success Path:
make dist in modules/[ModuleName]/Failure Path:
Build fails (regression from bug fix)
Error: "modules/MyModule/src/MyModule.cpp:142: error: cannot convert 'int' to 'float' in assignment"
build-automation presents 4-option failure menu
User chooses "Investigate"
troubleshooter agent invoked:
Error: cannot convert 'int' to 'float' in assignment
Context: Building VCV Rack module "MyModule" after bug fix
File: src/MyModule.cpp:142
troubleshooter returns report:
## Research Report: Type Conversion Error
### Problem Identified
- **Error:** cannot convert 'int' to 'float' in assignment
- **Context:** Line 142 attempts to assign integer result to float voltage output
- **Root Cause:** Changed return type of helper function but didn't update assignment
### Research Path
Level 0 (Quick Assessment)
### Confidence Assessment
- **Confidence Level:** HIGH
- **Reasoning:** Error message is explicit, solution straightforward
### Recommended Solution
Cast result to float: `outputs[OUTPUT_ID].setVoltage(static_cast<float>(calculateValue()));`
Or change calculateValue() return type to float.
**Why This Works:** Explicit type conversion satisfies compiler type checker.
User reviews report: "Apply solution"
Code updated with cast
User confirms: "Retry build"
Build succeeds
Returns to module-improve with status: SUCCESS
CRITICAL: build-automation must NEVER automatically retry a failed build without explicit user decision. Always present failure menu and await user choice.
Bad (DON'T DO):
Build failed. Retrying with different flags...
Good (DO THIS):
⚠️ Build failed
What would you like to do?
1. Investigate...
When user says "retry build" after manual fixes:
If build fails with dependency errors (RACK_DIR not set, SDK not found):
Extract meaningful error information for troubleshooter:
Pass full context to troubleshooter, not just error message.
Always display build duration in success/failure messages:
logs/[ModuleName]/build_20251112_143022.logMakefile can use parallel compilation:
# Use all available cores
make -j$(nproc)
# Or specify core count
make -j4
build-automation can pass -j flag to make for faster builds.
Cause: Environment variable missing
Solution: Run /setup to configure environment
Cause: RACK_DIR points to wrong location or SDK not installed
Solution: Verify RACK_DIR points to VCV Rack SDK directory containing include/rack.hpp
Cause: Module directory structure incorrect
Solution: Verify plugin.json exists in module root
Cause: Missing VCV Rack API symbols
Solution: Verify Makefile includes proper LDFLAGS from RACK_DIR
Cause: Make not installed
Solution: Install build tools (macOS: Xcode CLI tools, Linux: build-essential, Windows: MinGW)
VCV Rack modules use standardized Makefile:
# Standard Rack plugin Makefile
RACK_DIR ?= ../.. # Path to VCV Rack SDK
FLAGS +=
SOURCES += src/plugin.cpp
SOURCES += src/ModuleName.cpp
DISTRIBUTABLES += res
include $(RACK_DIR)/plugin.mk
make clean - Remove build artifactsmake dep - Build dependenciesmake - Compile module (default target)make dist - Create distributable .vcvplugin archivemake install - Copy to VCV Rack plugins directorybuild/plugin.dylibbuild/plugin.sobuild/plugin.dllmake dist creates platform-specific archive:
dist/[ModuleName]-[version]-[platform].vcvpluginmac-arm64, mac-x64, linux-x64, win-x64Skill can be invoked manually for testing:
Please invoke the build-automation skill to build TestModule.
Context: Manual test of build system.
Expected: Full dist build.
To test failure protocol:
To test workflow integration:
/implement TestModuleSkill Status: Ready for integration Last Updated: 2025-11-12 Dependencies: Makefile (per module), RACK_DIR environment, .claude/agents/troubleshooter.md