Skip to content

.cora.yaml config system (per-project, hierarchical) #3

Description

@ajianaz

Configuration System

Implement a hierarchical configuration system with .cora.yaml support.

Hierarchy (highest to lowest priority)

  1. CLI flags
  2. Environment variables (CORA_MODEL, CORA_OUTPUT, etc.)
  3. Project .cora.yaml
  4. User-level ~/.config/cora/config.yaml
  5. Built-in defaults

Config File Schema (.cora.yaml)

provider:
  name: openai
  api_key_env: OPENAI_API_KEY
  base_url: https://api.openai.com/v1
  model: gpt-4o
  temperature: 0.1

review:
  severity: warning
  include: ["src/**/*.rs"]
  exclude: ["src/vendor/**"]
  language: en
  focus: [security, performance, correctness, style]

scan:
  batch_size: 20
  chunk_lines: 500

output:
  format: pretty
  color: auto

Requirements

  • Parse YAML config using serde_yaml
  • Merge configs across hierarchy levels
  • Validate config values
  • cora init generates a starter .cora.yaml

Acceptance Criteria

  • Config loads and merges correctly from all levels
  • CLI flags override config file values
  • Invalid config gives clear error messages
  • cora init creates a documented template

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions