Skip to content

Refactor config struct design #68

Closed

Description

@David-Noble-at-work

Summary

After consolidating config (#67), revisit the struct design for better clarity and correctness.

Important: No Legacy

We have no legacy. We do not need aliases or any concern for backwards compatibility. We are in a period of rapid change. It is dangerous to leave anything that smacks of preserving legacy.

  • Rename types freely
  • Restructure freely
  • Delete and recreate as needed

Issues to Address

1. Preferences should be shared

Preferences likely applies to both writ and lore since both have model-driven commands. Consider moving to shared section or duplicating appropriately.

2. Sources naming is unclear

Sources with corporate, trusted_domains, blocked_domains could be clearer:

  • Rename to TrustedSources or similar
  • Corporate sources are a type of trusted source
  • Clarify the hierarchy

3. Secrets are SOPS-based, not age

Current design assumes age encryption. In reality:

  • We use SOPS for encryption
  • We look for .sops.yaml config
  • We don't configure encryption ourselves - users bring their own .sops.yaml

The SecretsConfig struct may not be needed, or should be renamed/restructured to reflect that we're just reading existing SOPS config, not configuring encryption.

Blocked By

Related

Activity

  1. David-Noble-at-work commented on Mar 18, 2026

    @David-Noble-at-work
    ContributorAuthor

    Resolved — Config struct cleanly separated into shared root fields (Verbosity, DryRun) + shared resources (Model, Registry) + tool-specific sections (Lore, Writ). Covered by 9+ tests in internal/config/config_test.go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions