[#529] Aspirations system: stored long-term goals#758
Merged
Conversation
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
marked this pull request as ready for review
May 10, 2026 04:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #529
Adds an
Aspirationscomponent (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
src/agent/psyche/aspirations.rs:Aspirationscomponent (SmallVec, capped at 3),Aspirationstruct (kind, optional target, progress, formed_at, intensity),AspirationKindenum +ASPIRATION_METAlookup 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_systemconstructsAspirationsalongsidePersonality/Valuesusing the same genome-seeded RNG — same genome → same starter aspirations.X%).AspirationsderivesReflect(with#[reflect(ignore)]on the SmallVec, mirroringSkills's HashMap pattern); registered inagent/mod.rs.Aspiration::advance(delta)returnstrueon the 1.0-crossing transition exactly once — future Satisfaction-firing systems hook there without double-firing.AspirationTargetonly 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 ≤ 3neutral_personality_seeds_no_aspirations— every facet at 0.5 → no candidates pass thresholdhigh_achievement_striving_seeds_become_great_at— facet → kind mappinghigh_altruism_seeds_protecthigh_openness_ideas_seeds_understandsame_personality_and_seed_produces_same_aspirations— determinismadvance_clamps_and_signals_fulfilment_once— progress + crossing-edge semanticslabel_includes_target_when_presentaspiration_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
rngso the future hook can layer in modifiers without API churn.🤖 Generated with Claude Code