-
Notifications
You must be signed in to change notification settings - Fork 0
Composition
GhostFrame edited this page May 25, 2026
·
2 revisions
Personas can extend a base and mix in overlays. This lets you build focused personas and compose them into specialized variants without duplicating content.
In persona.toml:
extends = "base-persona@^1"
mixin = ["company-style@2.x", "safety-overlay@1.x"]-
extends-- A single base persona. The root persona inherits everything from the base. -
mixin-- An ordered list of overlays applied after the base.
base (extends) → mixin[0] → mixin[1] → ... → root persona
Each layer adds or overrides content from the previous layer. The root persona always wins.
When two layers declare a rule or skill with the same id, the composer detects the collision and emits a Conflict record. The last-write-wins policy applies (later layers override earlier ones), but the conflict is logged for audit.
Conflicts surface at install time, not at render time. You see them before anything activates.
The frameshift-compose crate implements the merge:
- Load the root persona source.
- Resolve
extendsto a local path (viaLocalResolver). - Resolve each
mixinto a local path. - Merge layers in order: base -> mixins -> root.
- Detect and report conflicts.
- Return the
ComposedPersonawith the merged source and conflict log.
-
Company overlay. A
company-stylemixin that adds your team's naming conventions, commit message format, and CI requirements to any persona. -
Safety overlay. A
safety-overlaymixin that adds L1 hard constraints across all personas. -
Specialization. A
rust-cryptopersona that extendsrustand mixes incryptographicfor Rust projects with crypto code.
- Composition is resolved at install time, not at runtime.
- Circular extends chains are rejected.
- Mixin order matters -- later mixins override earlier ones on ID collision.
Frameshift -- Same model. Different frame.
Getting started
Using Frameshift
Personas
Systems