mycothree-tier-config-architecturelisted
Install: claude install-skill goondocks-co/myco
# Three-Tier Configuration Architecture and Management
Myco's configuration system implements a three-tier hierarchy: Machine (global), Grove (shared across projects), and Project (local overrides). This architecture enables flexible configuration management with clear scope boundaries and inheritance patterns, now enhanced with portable project identity via `.myco/project.toml`.
## Prerequisites
- Understanding of Myco's Machine/Grove/Project identity model with portable project.toml
- Familiarity with TypeScript type system for compile-time validation
- Access to the codebase at `packages/myco/src/config/` and `packages/myco/ui/src/pages/`
- Knowledge of the settings schema format and validation patterns
- Understanding of Grove identity architecture and binding_id patterns
## Procedure A: Implementing Three-Tier Config Storage Design
### 1. Understand the Flat-Function API
All config I/O flows through flat functions in `packages/myco/src/config/loader.ts`. There are no storage classes — use the exported functions directly:
```typescript
// packages/myco/src/config/loader.ts — read functions
loadMachineConfig() // reads ~/.myco/config.yaml
loadGroveConfig() // reads the grove-level config.yaml
loadLocalConfig(vaultDir) // reads .myco/local.yaml (personal, not committed)
loadConfig(filePath) // reads any config file by absolute path
loadMergedConfig({ projectPath }) // reads all tiers, returns merged result
// packag