-
-
Notifications
You must be signed in to change notification settings - Fork 6
Feature_Toggles
ClaudeAutoPM provides an interactive configuration system for managing features like Docker-first development and Kubernetes testing. This guide explains how to enable, disable, and configure these features through the toggle system.
The primary way to manage feature toggles is through the interactive configuration script:
bash .claude/scripts/config/toggle-features.shThis launches an interactive menu that guides you through configuration options.
Toggle Variable: docker_first_development
What it enables:
- Enforces all development happens inside Docker containers
- Blocks direct execution of package managers (npm, pip, etc.) on host
- Redirects commands to Docker containers automatically
- Ensures consistent development environment across team
When enabled:
{
"docker_first_development": true,
"docker_compose_required": true,
"local_execution_allowed": false
}Impact on workflow:
- Commands like
npm installmust run asdocker-compose run app npm install - Python commands execute in containers:
docker-compose run python pip install - Database operations happen in containers only
Toggle Variable: kubernetes_devops_testing
What it enables:
- Activates Kubernetes testing in CI/CD pipelines
- Spins up KIND (Kubernetes in Docker) clusters for testing
- Enables Helm chart validation
- Runs integration tests in K8s environment
When enabled:
{
"kubernetes_devops_testing": true,
"use_kind_clusters": true,
"helm_validation": true,
"k8s_integration_tests": true
}Impact on CI/CD:
- GitHub Actions workflows include K8s testing stages
- Pull requests validated against Kubernetes deployments
- Helm charts automatically tested on each commit
Toggle Variable: parallel_agent_execution
What it enables:
- Multiple AI agents can work simultaneously
- Improved performance for complex tasks
- Automatic task distribution across agents
When enabled:
{
"parallel_agent_execution": true,
"max_parallel_agents": 5,
"adaptive_scheduling": true
}Toggle Variable: auto_pr_creation
What it enables:
- Automatically creates PRs for completed work
- Generates PR descriptions from commit messages
- Links issues and work items automatically
When enabled:
{
"auto_pr_creation": true,
"auto_assign_reviewers": true,
"draft_pr_default": false
}$ bash .claude/scripts/config/toggle-features.sh
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ClaudeAutoPM Feature Configuration Manager
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Current Configuration:
├─ Docker-First Development: [ON]
├─ Kubernetes Testing: [OFF]
├─ Parallel Agents: [ON]
└─ Auto PR Creation: [OFF]
Select an option:
1) Toggle Docker-First Development
2) Toggle Kubernetes DevOps Testing
3) Configure Parallel Execution
4) Setup Auto PR Creation
5) Apply Configuration Preset
6) Show Current Configuration
7) Validate Configuration
8) Exit
Enter choice [1-8]:The script offers quick presets for common scenarios:
Select configuration preset:
1) Minimal - Basic features only
2) Docker Development - Docker-first with testing
3) Full DevOps - All features enabled
4) Performance - Optimized for speed
5) Custom - Configure each feature
Enter choice [1-5]:{
"docker_first_development": false,
"kubernetes_devops_testing": false,
"parallel_agent_execution": false,
"execution_strategy": "sequential"
}{
"docker_first_development": true,
"kubernetes_devops_testing": false,
"parallel_agent_execution": true,
"execution_strategy": "adaptive"
}{
"docker_first_development": true,
"kubernetes_devops_testing": true,
"parallel_agent_execution": true,
"execution_strategy": "adaptive",
"auto_pr_creation": true
}{
"docker_first_development": true,
"kubernetes_devops_testing": true,
"parallel_agent_execution": true,
"execution_strategy": "hybrid",
"max_parallel_agents": 10
}You can manually edit the configuration in .claude/config.json:
{
"project_name": "my-project",
"features": {
"docker_first_development": true,
"kubernetes_devops_testing": false,
"parallel_agent_execution": true,
"auto_pr_creation": false
},
"execution": {
"strategy": "adaptive",
"max_parallel": 5,
"timeout_seconds": 300
}
}Features can be overridden using environment variables:
# Enable Docker-first development
export FEATURE_DOCKER_FIRST=true
# Enable Kubernetes testing
export FEATURE_KUBERNETES=true
# Set parallel execution
export FEATURE_PARALLEL_AGENTS=trueSome features depend on others:
| Feature | Requires |
|---|---|
| Kubernetes Testing | Docker-First Development |
| Auto PR Creation | GitHub/Azure DevOps Integration |
| Parallel Agents | Docker-First (recommended) |
| Helm Validation | Kubernetes Testing |
After changing toggles, validate your configuration:
# Using the script
bash .claude/scripts/config/toggle-features.sh
# Select option 7 (Validate Configuration)
# Or directly
autopm validateValidation checks:
- Required dependencies are enabled
- Configuration files are valid JSON
- Required tools are installed (Docker, kubectl, etc.)
- Environment variables are set correctly
With Docker-First enabled:
# This will be blocked:
npm install express
# Use this instead:
docker-compose run app npm install expressWith Docker-First disabled:
# Direct execution allowed:
npm install express
python manage.py runserverWith Kubernetes Testing enabled:
# Added to GitHub Actions workflow:
jobs:
kubernetes-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create KIND cluster
run: kind create cluster
- name: Deploy to Kubernetes
run: kubectl apply -f k8s/
- name: Run K8s tests
run: npm run test:k8sWith Parallel Execution enabled:
# Agents work simultaneously:
@code-analyzer: Reviewing code for issues...
@test-runner: Running test suite...
@docker-expert: Building containers...
# All three execute in parallelWith Parallel Execution disabled:
# Agents work sequentially:
@code-analyzer: Reviewing code for issues...
# Waits for completion
@test-runner: Running test suite...
# Waits for completion
@docker-expert: Building containers...- Check configuration file:
cat .claude/config.json | jq '.features'- Verify environment variables:
env | grep FEATURE_- Restart Claude Code:
# Configuration is loaded on startupThe configurator will warn about conflicts:
⚠️ Warning: Kubernetes testing requires Docker-first development
Would you like to enable Docker-first as well? [Y/n]
# Reset all features to defaults
cp .claude/config.json.default .claude/config.json
# Or use the script
bash .claude/scripts/config/toggle-features.sh
# Select: Apply Configuration Preset > Minimal- Start with Minimal: Begin with minimal configuration and enable features as needed
- Use Presets: Leverage presets for common scenarios
- Validate Changes: Always validate after changing toggles
- Document Custom Settings: Add comments to config.json for custom configurations
- Team Consistency: Ensure all team members use the same feature toggles
| Command | Description |
|---|---|
toggle-features.sh |
Interactive configuration menu |
toggle-features.sh --show |
Display current configuration |
toggle-features.sh --preset full |
Apply Full DevOps preset |
toggle-features.sh --validate |
Validate current configuration |
toggle-features.sh --reset |
Reset to defaults |