AMPR-169 #498: add :ampere-phosphor bridge for Lumos atmospheres and glyphs#519
Merged
wow-miley merged 1 commit intoMay 31, 2026
Conversation
…glyphs I added a new KMP module (`:ampere-phosphor`, JVM + iOS) that translates AMPERE's cognitive event stream into Phosphor Lumos atmosphere targets and queued glyphs. Consumers wire `EventSerialBus → AmperePhosphorBridge → CognitiveSceneRuntime` (plus a `VoxelFrameBuilder`) and get a visually rich representation of agent cognition for free — no CLI, terminal, or renderer code. Translation is pluggable via `PropelToAtmosphereStrategy`; ships `DefaultPropelStrategy` with the canonical six-phase mapping (LISTENING / THINKING / LISTENING / THINKING / READY / THINKING) and the five glyph signals (CHECK, QUESTION, EXCLAIM ×2 sources, STAR). Atmosphere targets coalesce behind a `Mutex`-guarded `pendingAtmosphere`; `EscalationFired` bypasses the queue, drives `UNCERTAIN` immediately, and queues a QUESTION glyph. Glyphs do not coalesce — every signalled event is queued in arrival order on the renderer's `VoxelFrameBuilder`. The bridge does not own a frame loop. Since `AtmosphereChoreographer` exposes `activeTransition` as a property (not a callback), consumers call `onFrameTick()` once per frame after `runtime.update(dt)` to flush a pending atmosphere when the in-flight transition completes. 16 commonTest tests cover the canonical mapping, the never-UNCERTAIN invariant, single transitions, coalescing under in-flight transitions, escalation override clearing pending, all five glyph signals (plus the success=true no-glyph case), custom strategy substitution, and a concurrent-publish stress test against the mutex. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Concept staleness check — clean. No tracked-source changes need a concept update. |
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 #498.
I added a new KMP module
:ampere-phosphor(JVM + iOS) that translates AMPERE's cognitive event stream into Phosphor Lumos atmosphere targets and queued glyphs, withDefaultPropelStrategycovering the canonical six-phase mapping (LISTENING / THINKING / LISTENING / THINKING / READY / THINKING) and five glyph signals (CHECK, QUESTION, EXCLAIM ×2 sources, STAR), pluggable viaPropelToAtmosphereStrategy. Atmosphere targets coalesce behind aMutex-guardedpendingAtmosphere;EscalationFiredbypasses the queue, drivesUNCERTAINimmediately, and queues a QUESTION glyph; glyphs do not coalesce. The bridge does not own a frame loop — sinceAtmosphereChoreographerexposesactiveTransitionas a property rather than a callback, consumers callonFrameTick()once per frame afterruntime.update(dt)to flush pending atmospheres when the in-flight transition completes. 16 commonTest tests cover the canonical mapping, the never-UNCERTAIN invariant, single transitions, coalescing under in-flight transitions, escalation override clearing pending, all five glyph signals (plus success=true no-glyph), custom strategy substitution, and a concurrent-publish stress test.Test plan
./gradlew :ampere-phosphor:jvmTest— 16 / 16 passing./gradlew :ampere-phosphor:assemble— JVM + iOS targets compile./gradlew :ampere-phosphor:ktlintCheck— clean./gradlew jvmTest— full project test suite still green🤖 Generated with Claude Code