Repository is archived
No release in over 3 years
Metamorphic identity transformation for LegionIO agents — structured dissolution and reformation cycles
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

 Project Readme

lex-cognitive-chrysalis

Metamorphic identity transformation for LegionIO agents. Models structured dissolution and reformation cycles for the cognitive architecture.

What It Does

Some ideas and identity facets require deep transformation before they are useful — not incremental improvement, but dissolution and reformation into something qualitatively different. This extension models that metamorphic process: a larva enters a protective chrysalis, incubates through multiple transformation stages, and emerges as a butterfly. Emergence quality (beauty) depends on whether the transformation ran to completion or was forced prematurely.

Five chrysalis types provide different protection levels: silk (0.6), leaf (protected), bark (0.7), paper, and underground (highest). External disturbances can degrade cocoon protection and trigger premature emergence with a beauty penalty.

Usage

client = Legion::Extensions::CognitiveChrysalis::Client.new

cocoon = client.create_cocoon(environment: 'quiet_space', temperature: 0.6, humidity: 0.5)

chrysalis = client.create_chrysalis(
  chrysalis_type: :silk,
  content: 'core identity belief under revision'
)

client.spin(chrysalis_id: chrysalis[:chrysalis][:id])
client.enclose(chrysalis_id: chrysalis[:chrysalis][:id],
               cocoon_id: cocoon[:cocoon][:id])

10.times { client.incubate(chrysalis_id: chrysalis[:chrysalis][:id]) }

client.emerge(chrysalis_id: chrysalis[:chrysalis][:id])

Development

bundle install
bundle exec rspec
bundle exec rubocop

License

MIT