Skip to content

[#529] Aspirations system: stored long-term goals#758

Merged
milkyskies merged 1 commit into
mainfrom
feature/#529.aspirations
May 10, 2026
Merged

[#529] Aspirations system: stored long-term goals#758
milkyskies merged 1 commit into
mainfrom
feature/#529.aspirations

Conversation

@milkyskies

Copy link
Copy Markdown
Owner

closes #529

Adds an Aspirations component (SmallVec<[Aspiration; 3]>) and a 10-kind catalog (BecomeGreatAt, FindPerson, Protect, Avenge, BuildHome, GainStatus, EscapeFate, Understand, FindBelonging, ProveSelf). Seeded at character creation from specific Big Five facets — feeds future ideal-self (#530), desirability appraisal (#538), and goal arbitration (#740).

What changed

  • New src/agent/psyche/aspirations.rs: Aspirations component (SmallVec, capped at 3), Aspiration struct (kind, optional target, progress, formed_at, intensity), AspirationKind enum + ASPIRATION_META lookup table.
  • Aspirations::from_personality(traits, formed_at, rng) reads specific facets — achievement_striving, competence, order (Conscientiousness); altruism, tender_mindedness (Agreeableness); ideas (Openness); assertiveness (Extraversion) — and seeds matching aspiration kinds when each facet exceeds 0.65.
  • develop_phenotype_system constructs Aspirations alongside Personality/Values using the same genome-seeded RNG — same genome → same starter aspirations.
  • Character sheet's Personality tab now shows an "Aspirations" section with each goal's label and a progress bar (X%).
  • Aspirations derives Reflect (with #[reflect(ignore)] on the SmallVec, mirroring Skills's HashMap pattern); registered in agent/mod.rs.
  • Aspiration::advance(delta) returns true on the 1.0-crossing transition exactly once — future Satisfaction-firing systems hook there without double-firing.

AspirationTarget only has the variants something currently constructs (Skill, Entity); future seeders will add typed variants (Concept, Group reference) when #527 (Background) and #532 (social identity) land — no stringly-typed scaffolding committed.

Test plan

New unit tests in aspirations.rs:

  • caps_at_three_aspirations — saturated personality still yields ≤ 3
  • neutral_personality_seeds_no_aspirations — every facet at 0.5 → no candidates pass threshold
  • high_achievement_striving_seeds_become_great_at — facet → kind mapping
  • high_altruism_seeds_protect
  • high_openness_ideas_seeds_understand
  • same_personality_and_seed_produces_same_aspirations — determinism
  • advance_clamps_and_signals_fulfilment_once — progress + crossing-edge semantics
  • label_includes_target_when_present
  • aspiration_meta_table_aligns_with_enum — guards against table/enum drift

⊘ "exile → FindBelonging / warrior → ProveSelf" background-driven test from the issue body — depends on #527 (Background system) which is still blocked. Constructor signature already takes rng so the future hook can layer in modifiers without API churn.

🤖 Generated with Claude Code

Adds an Aspirations component (SmallVec of up to 3) and an Aspiration kind
catalog (BecomeGreatAt, FindPerson, Protect, Avenge, BuildHome, GainStatus,
EscapeFate, Understand, FindBelonging, ProveSelf). Seeded at character
creation by reading specific Big Five facets — high Achievement-Striving
seeds BecomeGreatAt, high Altruism seeds Protect, high Ideas seeds
Understand, etc. Wired into develop_phenotype_system using the existing
genome-seeded RNG.

Each aspiration tracks progress 0..1; advance() returns true exactly on the
1.0-crossing tick so future Satisfaction firing (T2.6) can hook in.
Character sheet renders the aspirations with progress bars under the
existing personality tab.

Background-tag-driven seeding (warrior → ProveSelf, exile → FindBelonging)
will be added when the Background system (#527) lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@milkyskies
milkyskies marked this pull request as ready for review May 10, 2026 04:02
@milkyskies
milkyskies merged commit a90da34 into main May 10, 2026
2 checks passed
@milkyskies
milkyskies deleted the feature/#529.aspirations branch May 10, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aspirations system: stored long-term goals

1 participant