# Configuration System (v2.0.0)\n\n## ⚠️ Migration Completed (2025-09-23)\n\nThe system has been migrated from ENV-based to config-driven architecture.\n\n- **65+ files migrated** across entire codebase\n- **200+ ENV variables replaced** with 476 config accessors\n- **16 token-efficient agents** used for systematic migration\n- **92% token efficiency** achieved vs monolithic approach\n\n## Configuration Files\n\n- **Primary Config**: `config.defaults.toml` (system defaults)\n- **User Config**: `config.user.toml` (user preferences)\n- **Environment Configs**: `config.{dev,test,prod}.toml.example`\n- **Hierarchical Loading**: defaults → user → project → infra → env → runtime\n- **Interpolation**: `{{paths.base}}`, `{{env.HOME}}`, `{{now.date}}`, `{{git.branch}}`\n\n## Essential Commands\n\n- `provisioning validate config` - Validate configuration\n- `provisioning env` - Show environment variables\n- `provisioning allenv` - Show all config and environment\n- `PROVISIONING_ENV=prod provisioning` - Use specific environment\n\n## Configuration Architecture\n\nSee [ADR-010: Configuration Format Strategy](../architecture/adr/adr-010-configuration-format-strategy.md) for complete rationale and design patterns.\n\n### Configuration Loading Hierarchy (Priority)\n\nWhen loading configuration, precedence is (highest to lowest):\n\n1. **Runtime Arguments** - CLI flags and direct user input\n2. **Environment Variables** - `PROVISIONING_*` overrides\n3. **User Configuration** - `~/.config/provisioning/user_config.yaml`\n4. **Infrastructure Configuration** - Nickel schemas, extensions, provider configs\n5. **System Defaults** - `provisioning/config/config.defaults.toml`\n\n### File Type Guidelines\n\n**For new configuration**:\n\n- Infrastructure/schemas → **Use Nickel** (type-safe, schema-validated)\n- Application settings → **Use TOML** (hierarchical, supports interpolation)\n- Kubernetes/CI-CD → **Use YAML** (standard, ecosystem-compatible)\n\n**For existing workspace configs**:\n\n- Nickel is the primary configuration language\n- All new workspaces use Nickel exclusively
