Dynamic mission domain configuration — remove hardcoded signal lists #78

Closed
opened 2026-04-10 22:37:11 -07:00 by pyr0ball · 0 comments
Owner

Currently, mission alignment detection in scripts/generate_cover_letter.py hardcodes both the domain keys (music, animal_welfare, education, social_impact) and their signal keyword lists (_MISSION_SIGNALS) in Python source. Adding a new domain requires a code change and redeploy.

Problem

  • Domain list is not extensible without a code change
  • Users with niche mission interests (privacy advocacy, retrofitting/repair culture, accessibility tech, open-source infrastructure, marginal community support) cannot self-configure detection
  • user.yaml mission_preferences already accepts arbitrary keys but they are silently ignored if not in _MISSION_SIGNALS

Proposed solution
Move signal configuration to config/mission_domains.yaml (committed with sensible defaults, overridable per-user via config/ mount). Schema:

domains:
  music:
    signals: [music, spotify, tidal, soundcloud, bandcamp, ...]
    default_note: "..."
  animal_welfare:
    signals: [animal, shelter, rescue, humane society, ...]
    default_note: "..."
  # user-defined domains follow the same schema
  privacy:
    signals: [privacy, data rights, surveillance, GDPR, anonymity, ...]
    default_note: "..."
  retrofitting:
    signals: [repair, right to repair, refurbish, vintage, retrocomputing, ...]
    default_note: "..."

generate_cover_letter.py loads this file at startup and merges user-defined domains from mission_preferences keys not already present in the config file.

Acceptance criteria

  • config/mission_domains.yaml committed with current 4 domains + at least 3 new ones (privacy, accessibility, open_source)
  • generate_cover_letter.py loads domains from YAML; no hardcoded signal lists remain in source
  • Any key present in user.yaml mission_preferences that is not in the YAML config is treated as a user-defined domain with no signal detection (custom note only, triggered manually or skipped)
  • Existing behavior for the 4 current domains is unchanged
  • Unit tests cover domain loading and signal detection
Currently, mission alignment detection in `scripts/generate_cover_letter.py` hardcodes both the domain keys (`music`, `animal_welfare`, `education`, `social_impact`) and their signal keyword lists (`_MISSION_SIGNALS`) in Python source. Adding a new domain requires a code change and redeploy. **Problem** - Domain list is not extensible without a code change - Users with niche mission interests (privacy advocacy, retrofitting/repair culture, accessibility tech, open-source infrastructure, marginal community support) cannot self-configure detection - `user.yaml` `mission_preferences` already accepts arbitrary keys but they are silently ignored if not in `_MISSION_SIGNALS` **Proposed solution** Move signal configuration to `config/mission_domains.yaml` (committed with sensible defaults, overridable per-user via `config/` mount). Schema: ```yaml domains: music: signals: [music, spotify, tidal, soundcloud, bandcamp, ...] default_note: "..." animal_welfare: signals: [animal, shelter, rescue, humane society, ...] default_note: "..." # user-defined domains follow the same schema privacy: signals: [privacy, data rights, surveillance, GDPR, anonymity, ...] default_note: "..." retrofitting: signals: [repair, right to repair, refurbish, vintage, retrocomputing, ...] default_note: "..." ``` `generate_cover_letter.py` loads this file at startup and merges user-defined domains from `mission_preferences` keys not already present in the config file. **Acceptance criteria** - [ ] `config/mission_domains.yaml` committed with current 4 domains + at least 3 new ones (privacy, accessibility, open_source) - [ ] `generate_cover_letter.py` loads domains from YAML; no hardcoded signal lists remain in source - [ ] Any key present in `user.yaml` `mission_preferences` that is not in the YAML config is treated as a user-defined domain with no signal detection (custom note only, triggered manually or skipped) - [ ] Existing behavior for the 4 current domains is unchanged - [ ] Unit tests cover domain loading and signal detection
pyr0ball added the
enhancement
label 2026-04-10 22:37:11 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#78
No description provided.