balaur

Balaur Pi terminal design

The Pi terminal is Balaur’s owned daily surface. It should feel like an old-school fantasy RPG command interface, but still be compact, truthful, and useful.

Goals

Current implemented pieces

RPG nameplate rules

Nameplates use a fixed-width gutter across all roles, so messages align vertically.

Good:

[ cico   ] | ask
[ Balaur ] | answer

Rules:

Sprite rules

Mode/backend source of truth: ../pi/lib/ui/sprites.ts. Canonical role sprite source of truth: ../pi/lib/ui/pixel-avatar.ts.

Current internal sprite catalog:

@  user/player
B  Balaur idle
?  Balaur thinking
T  tool work
M  memory/life tracking
+  doctor/health check
*  self-evolution/new capability

Only @ and B are currently rendered in message nameplates. The other states are reserved so the interface can evolve without inventing new visual language each time.

Working state

The working state should be portable and quiet.

Rules:

Message borders

Messages use a quiet ASCII RPG dialog panel: a small avatar/nameplate box on the left, message body on the right, connected by a shared border.

Short message:

+----------+----------------+
|          | answer         |
| avatar   |                |
| avatar   |                |
|          |                |
+----------+----------------+

Long message:

+----------+----------------+
|          | answer         |
| avatar   | more           |
| avatar   | more           |
|          | more           |
+----------+ more           |
           | more           |
           +----------------+

Rules:

Tool-call panels

Tool execution uses the same panel language as chat turns:

 +----------+----------------+
 |          | read file      |
 | hammer   |                |
 | hammer   | result/preview |
 |          |                |
 +----------+----------------+

Rules:

Input editor

The text input should use the same restrained ASCII panel language as chat turns, including the user’s avatar/nameplate on the left so it visually becomes the next user message when submitted:

 +----------+-- input -----------+
 |          | > draft message    |
 | avatar   |                    |
 | avatar   |                    |
 |          |                    |
 +----------+--------------------+

Rules:

Header should be compact, width-aware, and ASCII pixel-framed. Target shape:

+-- B A L A U R ----------------+
| local-first | private | yours | FOSS |
+--------------------------------+

The header may truncate to terminal width, but must not exceed three lines. On wide terminals it may use the third line for the Basm motto: woven, not rendered.

Footer should be one line:

Balaur                         local/private | qwen/... | git:main* | 12 tools | ctx [===---] 42%

Rules:

Color rules

Use Basm palette:

Avatar layers

See avatars.md.

Implementation notes

Pi currently exposes custom renderers only for custom messages, not built-in user/assistant role messages. Balaur decorates Pi’s exported UserMessageComponent and AssistantMessageComponent in ../pi/lib/ui/avatars.ts. Keep this patch small, idempotent, and easy to remove if Pi adds official role-rendering hooks.