Add personality aliases and derived affinity spheres #112

Closed
opened 2026-07-27 21:13:51 +00:00 by coilyco-ops · 1 comment
Member

Personality definitions already contain synonym-like prose. For example, grounded mentions calm, steady, practical, and unhurried behavior. Those words are not declared lookup vocabulary, and incidental prose can make one cue appear under several personalities without an intentional selection rule.

After #111 resolves the effective person profile plus personality-library graph, agent-compose should expose intentional cue matching and derive each personality's role and meld neighborhood from that graph.

Goal

A directly steered user can ask for a quality such as calm, the agent can resolve that cue to one or more catalog personalities, inspect their compatible role melds, and propose an appropriate temporary personality adaptation without changing its assigned role or authority.

Library-owned aliases

  • Every personality library may declare an ordered set of normalized aliases or cues for each personality.
  • The field has one canonical owner in the library and is projected into generated surfaces. Do not duplicate it between manifest data and skill prose.
  • Canonical personality slug matches rank before declared aliases.
  • An alias may map to multiple personalities. Resolution preserves all candidates rather than forcing global uniqueness.
  • External libraries choose their own vocabulary. The engine does not hardcode canonical aliases or require a fixed alias count.

Default catalog sweep

  • Review all 16 shipped personality definitions and add a useful spread of ordinary adjectives, nouns, and phrases people are likely to request.
  • Treat aliases as intentional selectors, not every descriptive word found in the body.
  • Include calm as an explicit cue for grounded while keeping incidental calm language elsewhere from silently becoming an equivalent selector.
  • Keep definitions behaviorally distinct and avoid aliases that collapse meaningful neighboring personalities.

Derived affinity spheres

  • Derive personality to roles to complete ordered melds from the effective selected profile after library resolution.
  • Do not store role membership inside personality skills.
  • Do not depend on the shipped default's role names, personality names, counts, or meld sizes.
  • Personalities unused by a role remain valid catalog entries with an empty role-affinity set.
  • Record resolved library provenance for every personality.

Generated surfaces

  • Extend the next person-snapshot schema with aliases, provenance, role affinities, and complete associated melds.
  • Generate a compact human-readable personality index that native agents can consult on demand without loading every inactive definition at startup.
  • Keep bundle and roster output deterministic.
  • Preserve the existing native-swap confirmation and lifetime rules. A cue request does not silently change the assigned role, obligations, permissions, or authority.

Selection behavior

  • Exact slug wins over an alias match.
  • Alias matches return an ordered candidate set.
  • Current role and task fit may rank candidates or suggest a meld, but a role-bound session keeps its role fixed.
  • Ambiguous candidates remain visible to the agent instead of being hidden behind an arbitrary global default.

Acceptance

  • calm resolves through declared aliases without scraping personality prose.
  • A fixture alias shared by two personalities returns both candidates deterministically.
  • A corporate fixture from #111 combines one unique manager personality with shared-library personalities, and its generated affinities contain only its effective profile graph.
  • A catalog personality unused by any role appears with no affinities and remains available for an eligible native swap.
  • Snapshot and human-readable index validation reject malformed aliases, missing provenance, and inconsistent derived melds.
  • Documentation explains cue matching, ambiguity, package-relative affinity derivation, and the fixed-role boundary.
  • ward exec test and ward exec smoke pass.

Depends on #111. Related content ownership work: #110.

Execution contract for Terra medium

Dependency and engine boundary

The goal agent starts this issue only after issue 111 supplies the resolved profile-plus-libraries graph. The engine performs deterministic cue lookup only. The engine does not inspect the current task, infer intent, or hide candidates behind task-fit ranking. A directly steered native agent uses the visible candidates, current fixed role, and task context to propose a swap under the existing confirmation policy.

Alias schema and normalization

A personality entry owns zero or more ordered alias "<cue>" child nodes in its library KDL. The alias does not appear in SKILL.md prose.

The shared normalization function:

  • applies Unicode NFKC normalization
  • trims surrounding Unicode whitespace
  • lowercases the cue
  • treats runs of whitespace, underscore, and hyphen as one hyphen
  • rejects an empty result, control characters, leading separators, and trailing separators

The loader rejects duplicate normalized aliases within one personality. The loader permits one normalized alias to name several personalities.

An exact normalized canonical slug returns that personality and does not consult aliases. Otherwise alias resolution returns every matching personality in effective catalogue order. The engine never selects one ambiguous alias candidate automatically.

Default alias seed

The default catalogue sweep starts from these intentional cues and adjusts only when the definition text shows a behavioral collision:

  • curious - inquisitive, exploratory, investigative, questioning
  • grounded - calm, practical, steady, reality-based
  • meticulous - precise, thorough, detail-oriented, careful
  • bold - daring, decisive, courageous, audacious
  • diplomatic - tactful, consensus-seeking, bridge-building, measured
  • candid - frank, honest, forthright, truth-telling
  • playful - whimsical, lighthearted, fun, mischievous
  • reflective - contemplative, introspective, thoughtful, considered
  • protective - safeguarding, risk-aware, watchful, defensive
  • warm - kind, welcoming, friendly, empathetic
  • imaginative - creative, inventive, visionary, speculative
  • quirky - unconventional, eccentric, offbeat, idiosyncratic
  • optimistic - hopeful, positive, possibility-focused, encouraging
  • charming - charismatic, persuasive, engaging, magnetic
  • energetic - lively, enthusiastic, high-energy, animated
  • nurturing - supportive, caring, developmental, encouraging

The repeated encouraging cue deliberately proves that a real default alias collision remains visible. The engine imposes no alias-count rule on external libraries.

Affinity derivation

For every resolved personality, the engine derives:

  • the ordered roles in the selected profile that reference it
  • each role's complete ordered meld
  • the personality's resolved library ID and content digest

An unused personality remains in the catalogue with an empty affinity list. Affinities derive only from the selected effective profile. The engine does not persist role membership inside library definitions.

Generated surfaces

  • The v1.x compatibility artifact person.json schema v3 remains available unchanged.
  • The roster projection adds person.v4.json with aliases, logical provenance, digests, role affinities, and complete associated melds.
  • The roster projection adds a compact personality-index.md that lists each slug, aliases, source library, roles, and melds without embedding full inactive definitions.
  • The catalogue CLI from issue 114 reads the same resolved data and supports text plus JSON cue lookup.
  • Validation rejects missing provenance, malformed aliases, invalid digests, unknown roles, and affinities that do not reproduce from the effective graph.

Done condition

  • calm resolves exactly to grounded without scanning prose.
  • encouraging returns optimistic and nurturing in deterministic catalogue order.
  • A fixture shared alias returns every candidate.
  • A fixture unused personality has an empty affinity list and remains eligible for a confirmed native swap.
  • The issue 111 corporate fixture exposes only affinities from its selected profile and admitted libraries.
  • Existing fixed-role, authority, slash-goal, confirmation, and swap-lifetime rules remain unchanged.
  • ward exec test and ward exec smoke pass.
  • The implementation lands on canonical main and closes this issue.
Personality definitions already contain synonym-like prose. For example, `grounded` mentions calm, steady, practical, and unhurried behavior. Those words are not declared lookup vocabulary, and incidental prose can make one cue appear under several personalities without an intentional selection rule. After #111 resolves the effective person profile plus personality-library graph, agent-compose should expose intentional cue matching and derive each personality's role and meld neighborhood from that graph. ## Goal A directly steered user can ask for a quality such as `calm`, the agent can resolve that cue to one or more catalog personalities, inspect their compatible role melds, and propose an appropriate temporary personality adaptation without changing its assigned role or authority. ## Library-owned aliases * Every personality library may declare an ordered set of normalized aliases or cues for each personality. * The field has one canonical owner in the library and is projected into generated surfaces. Do not duplicate it between manifest data and skill prose. * Canonical personality slug matches rank before declared aliases. * An alias may map to multiple personalities. Resolution preserves all candidates rather than forcing global uniqueness. * External libraries choose their own vocabulary. The engine does not hardcode canonical aliases or require a fixed alias count. ## Default catalog sweep * Review all 16 shipped personality definitions and add a useful spread of ordinary adjectives, nouns, and phrases people are likely to request. * Treat aliases as intentional selectors, not every descriptive word found in the body. * Include `calm` as an explicit cue for `grounded` while keeping incidental calm language elsewhere from silently becoming an equivalent selector. * Keep definitions behaviorally distinct and avoid aliases that collapse meaningful neighboring personalities. ## Derived affinity spheres * Derive personality to roles to complete ordered melds from the effective selected profile after library resolution. * Do not store role membership inside personality skills. * Do not depend on the shipped default's role names, personality names, counts, or meld sizes. * Personalities unused by a role remain valid catalog entries with an empty role-affinity set. * Record resolved library provenance for every personality. ## Generated surfaces * Extend the next person-snapshot schema with aliases, provenance, role affinities, and complete associated melds. * Generate a compact human-readable personality index that native agents can consult on demand without loading every inactive definition at startup. * Keep bundle and roster output deterministic. * Preserve the existing native-swap confirmation and lifetime rules. A cue request does not silently change the assigned role, obligations, permissions, or authority. ## Selection behavior * Exact slug wins over an alias match. * Alias matches return an ordered candidate set. * Current role and task fit may rank candidates or suggest a meld, but a role-bound session keeps its role fixed. * Ambiguous candidates remain visible to the agent instead of being hidden behind an arbitrary global default. ## Acceptance * `calm` resolves through declared aliases without scraping personality prose. * A fixture alias shared by two personalities returns both candidates deterministically. * A corporate fixture from #111 combines one unique manager personality with shared-library personalities, and its generated affinities contain only its effective profile graph. * A catalog personality unused by any role appears with no affinities and remains available for an eligible native swap. * Snapshot and human-readable index validation reject malformed aliases, missing provenance, and inconsistent derived melds. * Documentation explains cue matching, ambiguity, package-relative affinity derivation, and the fixed-role boundary. * `ward exec test` and `ward exec smoke` pass. Depends on #111. Related content ownership work: #110. ## Execution contract for Terra medium ### Dependency and engine boundary The goal agent starts this issue only after [issue 111](https://forgejo.coilysiren.me/coilyco-flight-deck/agent-compose/issues/111) supplies the resolved profile-plus-libraries graph. The engine performs deterministic cue lookup only. The engine does not inspect the current task, infer intent, or hide candidates behind task-fit ranking. A directly steered native agent uses the visible candidates, current fixed role, and task context to propose a swap under the existing confirmation policy. ### Alias schema and normalization A personality entry owns zero or more ordered `alias "<cue>"` child nodes in its library KDL. The alias does not appear in `SKILL.md` prose. The shared normalization function: * applies Unicode NFKC normalization * trims surrounding Unicode whitespace * lowercases the cue * treats runs of whitespace, underscore, and hyphen as one hyphen * rejects an empty result, control characters, leading separators, and trailing separators The loader rejects duplicate normalized aliases within one personality. The loader permits one normalized alias to name several personalities. An exact normalized canonical slug returns that personality and does not consult aliases. Otherwise alias resolution returns every matching personality in effective catalogue order. The engine never selects one ambiguous alias candidate automatically. ### Default alias seed The default catalogue sweep starts from these intentional cues and adjusts only when the definition text shows a behavioral collision: * `curious` - inquisitive, exploratory, investigative, questioning * `grounded` - calm, practical, steady, reality-based * `meticulous` - precise, thorough, detail-oriented, careful * `bold` - daring, decisive, courageous, audacious * `diplomatic` - tactful, consensus-seeking, bridge-building, measured * `candid` - frank, honest, forthright, truth-telling * `playful` - whimsical, lighthearted, fun, mischievous * `reflective` - contemplative, introspective, thoughtful, considered * `protective` - safeguarding, risk-aware, watchful, defensive * `warm` - kind, welcoming, friendly, empathetic * `imaginative` - creative, inventive, visionary, speculative * `quirky` - unconventional, eccentric, offbeat, idiosyncratic * `optimistic` - hopeful, positive, possibility-focused, encouraging * `charming` - charismatic, persuasive, engaging, magnetic * `energetic` - lively, enthusiastic, high-energy, animated * `nurturing` - supportive, caring, developmental, encouraging The repeated `encouraging` cue deliberately proves that a real default alias collision remains visible. The engine imposes no alias-count rule on external libraries. ### Affinity derivation For every resolved personality, the engine derives: * the ordered roles in the selected profile that reference it * each role's complete ordered meld * the personality's resolved library ID and content digest An unused personality remains in the catalogue with an empty affinity list. Affinities derive only from the selected effective profile. The engine does not persist role membership inside library definitions. ### Generated surfaces * The v1.x compatibility artifact `person.json` schema v3 remains available unchanged. * The roster projection adds `person.v4.json` with aliases, logical provenance, digests, role affinities, and complete associated melds. * The roster projection adds a compact `personality-index.md` that lists each slug, aliases, source library, roles, and melds without embedding full inactive definitions. * The catalogue CLI from issue 114 reads the same resolved data and supports text plus JSON cue lookup. * Validation rejects missing provenance, malformed aliases, invalid digests, unknown roles, and affinities that do not reproduce from the effective graph. ### Done condition * `calm` resolves exactly to `grounded` without scanning prose. * `encouraging` returns `optimistic` and `nurturing` in deterministic catalogue order. * A fixture shared alias returns every candidate. * A fixture unused personality has an empty affinity list and remains eligible for a confirmed native swap. * The issue 111 corporate fixture exposes only affinities from its selected profile and admitted libraries. * Existing fixed-role, authority, slash-goal, confirmation, and swap-lifetime rules remain unchanged. * `ward exec test` and `ward exec smoke` pass. * The implementation lands on canonical `main` and closes this issue.
Author
Member

Landed on canonical main through daa9996. All shipped personalities carry intentional aliases, exact slugs win, ambiguous aliases remain ordered and visible, and NFKC normalization rejects malformed cues. person.v4.json and personality-index.md derive source provenance, aliases, role affinities, and complete melds from the effective graph. Validation rejects invalid provenance and inconsistent affinities. The external fixture includes an admitted unused personality with an empty affinity set. ward exec test and ward exec smoke passed.

Landed on canonical main through daa9996. All shipped personalities carry intentional aliases, exact slugs win, ambiguous aliases remain ordered and visible, and NFKC normalization rejects malformed cues. person.v4.json and personality-index.md derive source provenance, aliases, role affinities, and complete melds from the effective graph. Validation rejects invalid provenance and inconsistent affinities. The external fixture includes an admitted unused personality with an empty affinity set. ward exec test and ward exec smoke passed.
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
coilyco-flight-deck/agent-compose#112
No description provided.