← ClaudeAtlas

mycothree-tier-config-architecturelisted

Comprehensive procedures for implementing and managing Myco's three-tier configuration architecture with Machine/Grove/Project scope hierarchy. Covers config storage design with scope enforcement patterns, TypeScript compile-time scope validation, multi-tier settings UI development, hierarchical config merging and override resolution strategies, and migration workflows for scope boundary evolution. Use this when implementing new configuration settings, refactoring config scope boundaries, building scope-aware editing interfaces, or migrating configuration data between tiers, even if the user doesn't explicitly ask for three-tier architecture guidance.
goondocks-co/myco · ★ 13 · AI & Automation · score 79
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