2.0 KiB
2.0 KiB
core/config — AGENTS.md
Purpose
TOML configuration loading and live-reload: defines CorrexConfig (the top-level config shape), operator/project profiles, agent instructions, and read/write helpers.
Ownership
CORREX kernel team. Config schema changes affect all consumers — coordinate with apps/server and apps/cli.
Local Contracts
CorrexConfig— top-level@Serializableconfig data class.ConfigHolder— mutable live config reference, updated on reload.ConfigLoader— reads TOML from disk;CorrexConfigWriterwrites it back.EditableConfig— partial config for live patch operations (used by the TUI config editor).OperatorProfile— operator-level persona and behavior settings.ProjectProfile/ProjectProfileLoader/ProjectProfileWriter— project-scoped profile; loaded at session bind time.- Project-profile commands support flat aliases plus toolchain-specific TOML tables such as
[commands.node]; nested entries bind into replay-safe dotted keys (for examplenode.build). AgentInstructions/AgentInstructionsLoader— per-role prompt fragments loaded from config.
Work Guidance
- Config is read from disk; it is not event-sourced. Do not add event/state/reducer structures here.
ConfigHolderis the shared mutable reference injected into consumers. Never read the file directly in domain code — always go throughConfigHolder.CorrexConfigWriterregenerates TOML from the in-memory model; round-tripping loses comments by design.[git]is opt-in server transport configuration (enabled,remote,base_branch, optionalauthor); it is off by default.[orchestration].review_loop_max_cyclesbounds review→rework cycles before recovery escalation; default3.ModelConfig.contextSizedefaults to 24,576 tokens; explicitcontext_sizeremains the operator override for smaller local-model windows.
Verification
./gradlew :core:config:test --rerun-tasks
Child DOX Index
No child AGENTS.md (leaf module).