Galaxy Shell / docs
Docs / Decisões e planos

Handoff - Galaxy Shell

openspec/changes/archive/2026-10-25-specification/design.md · Editar no GitHub ↗

Esta página ainda não tem tradução em português. O conteúdo abaixo está em inglês.

Este documento registra decisões, planejamento ou evidências de uma etapa do projeto. Não implica que todos os itens estejam implementados ou validados na versão atual.

Nesta página

Handoff - Galaxy Shell

Doc status: history. Initial handoff of 2026-10-25, superseded by openspec/changes/archive/2026-10-26-concept/design.md, docs/web-shell-development.md and AGENTS.md; its Flutter and Hyprland parts are historical. Checked 2026-11-10.

Later direction: customizable web shell, with River chosen and the current implementation. References below to Flutter as the main UI and to Mutter as a priority are historical.

Concept update

Read the conclusions of 2026-10-26 first. They prevail over the initial proposals below regarding the conversation as the center of the experience, the composition of conversation and applications in tiling, the lifecycle of environments, manual control and the Flutter/Dart direction. The Rust/Iced implementation remains a prototype; real integration and the final choice of compositor still need validation.

Product direction

Galaxy Shell is an agent-driven shell and window manager. The user chooses the external applications for development, terminal, browsing and notes; these applications stay responsible for their own content and workflows. The product organizes windows and workspaces, and presents intents, progress and approvals. It is not an IDE and not an application that embeds these tools.

In the POC, rectangles identified by role represent external windows, with no embedded editor, terminal or browser. The choice of executables and the real launch/control through Hyprland are not implemented yet. This decision prevails over earlier references to simulated content.

1. Context and goal

We are creating an AI-native and agent-first desktop experiment, now called Galaxy Shell.

The idea is not to develop an operating system from scratch, nor simply to add a chatbot to the traditional desktop.

We want to explore a new paradigm of interaction with computers in which:

  • The user expresses intents, instead of navigating applications manually.
  • Autonomous agents run tasks and coordinate system resources.
  • The desktop transforms dynamically to represent activities, contexts, agents and results.
  • Windows and applications still exist, but are no longer the central unit of the experience.
  • The AI can open, organize, move, resize and control windows without manual intervention.
  • The interface can present temporary components and surfaces according to the needs of the agents.
  • The user keeps the ability to interact directly with applications when desired.

Central vision:

A desktop that visually represents the work done on behalf of the user, instead of simply presenting a collection of applications for them to operate.

The project is experimental, initially for fun and UX exploration. We prioritize creative freedom, a relatively simple architecture and fast iteration.

2. Architecture decisions already made

Stack

  • Main language: Rust.
  • Interface framework: Iced.
  • GPU rendering: wgpu.
  • Shaders: WGSL, when needed.
  • Linux: Hyprland as the initial compositor.
  • Window control: Hyprland IPC.
  • Wayland: consider Smithay Client Toolkit for integration with specific surfaces, when needed.
  • Harness/LLM: headless OpenCode from POC 1, integrated into the Rust shell over HTTP/SSE; provider and model configurable in OpenCode.
  • Cross-platform: Linux, macOS and Windows as an architectural goal.

Negative decisions

We do not want:

  • Qt or QML.
  • Electron.
  • GTK as a central dependency.
  • To create an own Wayland compositor at this time.
  • To create a kernel or a Linux distribution.
  • To build another traditional dashboard with AI on the side.
  • To have the LLM generate and compile Rust code for each interface presented.
  • To spend the start of the project implementing operating system infrastructure.

Qt was rejected for architectural preference and for the intent of experimenting with a more controlled visual engine. This does not imply that Qt is technically obsolete.

Important principle

Separate clearly:

  1. Interface and rendering.
  2. Agent orchestration.
  3. Window management.
  4. Application integrations.
  5. Intent interpretation.
  6. Activity and workspace state.

The interface must not depend directly on Hyprland.

3. Development strategy

Start with the functional design POC, not with the full integration with the operating system.

The main risk of the project is discovering a convincing interaction model, not implementing IPC.

First build a real visual experience, with simulated windows and a real agent through OpenCode, using the chosen stack.

Then connect the behavior to real desktop resources.

Phases

POC 1 - Functional design

  • Minimalist empty state.
  • Central intent field.
  • Multiple workspaces.
  • Simulated windows.
  • Automatic window organization.
  • Transitions and animations.
  • Visual presence of the agents.
  • Intents interpreted by an LLM via OpenCode, with real tool calls on the simulator.
  • Native executable integrated with the local OpenCode server, with execution events and errors visible.

POC 2 - Evolution of the intelligence

  • Evolve the OpenCode integration already present in POC 1.
  • Refine intent interpretation and tool choice.
  • Expand planning and action execution.
  • Declarative interface composition.
  • Persistent workspace state.
  • Agents able to act on the simulator.

POC 3 - Real desktop

  • Integration with Hyprland IPC.
  • Discovery and control of real windows.
  • Compositor events.
  • Application execution.
  • Wayland surfaces, if needed.
  • Verification of the result of operations.

POC 4 - Cross-platform

  • Windows adapters.
  • macOS adapters.
  • Evaluation of permission differences.
  • Gradual feature compatibility.

Do not anticipate work from later phases without need.

4. Approved interface concept

The first design we approved represents the empty state.

Visual direction

  • Dark theme.
  • Minimalism.
  • Discreet translucent surfaces.
  • Subtle visual depth.
  • Ambient lighting.
  • Soft gradients.
  • Very few elements on the screen.
  • Clear and refined typography.
  • Fluid animations.
  • Artistic visual language, but not overly futuristic.

Avoid a generic SaaS dashboard aesthetic or a heavy cyberpunk interface.

The desktop must convey calm, control and intelligence.

Empty state

An almost empty screen, with a large central intent field.

Example:

What do you want to do?

Prepare my Laravel development workspace

The field has conceptual support for text, voice and send.

Around it, secondary elements present:

  • Development agent available.
  • Calendar agent on standby.
  • Inactive workspace.
  • Quick intent suggestions.
  • Extremely discreet system bar.

Examples of suggestions:

  • Open Example Project context.
  • Review critical bugs.
  • Organize my morning.

Important: the intent field is the main visual element, not an open chat with endless messages.

This design was already generated and approved in the original conversation. If the image is available in the Codex environment, use it as a reference. Otherwise, reproduce the description above, without blocking the work while waiting for the file.

5. Next design: desktop with activity

We also need to implement the state in which there are multiple workspaces and several windows in the active workspace.

The empty state is only the first state of the system.

Active workspace

When an intent starts an activity:

  1. The intent field shrinks and repositions.
  2. The main space starts to show the work context.
  3. Windows appear or are reorganized.
  4. Agents go from the idle state to operational states.
  5. The user watches the transformation visually.

Workspaces

Workspaces must represent work contexts, not just numbered desktops.

Examples:

  • Development.
  • Example Project.
  • Research.
  • Personal.
  • Finance.

Each workspace has:

  • Identifier.
  • Name.
  • Context.
  • State.
  • Associated windows.
  • Associated agents.
  • Running activities.

The active workspace has a visual highlight.

We need to experiment with a discreet way to navigate between them, such as a spatial bar or a compact trail.

Do not assume that the traditional GNOME bar is the ideal model.

Windows

In the POC, windows are simulated surfaces, but they must reasonably represent the behavior of real windows.

Allow:

  • Create.
  • Close.
  • Focus.
  • Move.
  • Resize.
  • Organize.
  • Associate with workspaces.
  • Switch between layouts.

Windows must reorganize with animations.

The user can also interact with them manually.

Agents

Agents can have states such as:

  • Idle.
  • Planning.
  • Executing.
  • Waiting for input.
  • Completed.
  • Failed.

Their visual presence must be discreet.

We do not want a chat window for each agent.

An agent must become more visible when there is something relevant, such as an action in progress, a decision needed or a result ready.

6. Conceptual model

Four main concepts:

Intention

Represents the goal expressed by the user.

Agent

Runs tasks, uses tools and coordinates operations.

Workspace

Groups activities, context, windows, agents and results.

Surface

Represents a dynamic visual unit of information or interaction.

A Surface can be:

  • Application window.
  • Temporary panel.
  • Result of a tool.
  • Code diff.
  • Chart.
  • Visualization of agents.
  • Action confirmation.
  • Editor.
  • Status component.

A Surface does not need to be a conventional window.

This will be important when we introduce interfaces generated dynamically by the AI.

7. Proposed architecture

Split the modules roughly like this:

galaxy-shell/
├── crates/
│   ├── core/
│   │   ├── intention/
│   │   ├── workspace/
│   │   ├── activity/
│   │   ├── agent/
│   │   └── surface/
│   │
│   ├── window-manager/
│   │   ├── traits/
│   │   ├── simulator/
│   │   └── hyprland/
│   │
│   ├── agent-runtime/
│   │   ├── providers/
│   │   ├── tools/
│   │   └── orchestration/
│   │
│   └── ui/
│       ├── components/
│       ├── animation/
│       ├── theme/
│       └── shaders/
│
└── apps/
    └── desktop/

This structure is a suggestion, not an obligation for the first commit.

For the initial POC, prioritize the simplest structure that keeps clear limits between responsibilities.

Avoid premature abstractions and multiple crates without concrete need.

Window management abstraction

We need a contract independent of the operating system.

Conceptual example:

trait WindowManager {
    fn list_windows(&self) -> Vec<WindowInfo>;

    fn move_window(
        &mut self,
        id: WindowId,
        x: i32,
        y: i32,
    ) -> Result<(), WindowError>;

    fn resize_window(
        &mut self,
        id: WindowId,
        width: u32,
        height: u32,
    ) -> Result<(), WindowError>;

    fn focus_window(
        &mut self,
        id: WindowId,
    ) -> Result<(), WindowError>;
}

The final contract can be asynchronous and contain other methods.

The important point is to allow distinct implementations:

  • SimulatedWindowManager.
  • HyprlandWindowManager.
  • WindowsWindowManager.
  • MacOSWindowManager.

Initially implement only the simulator.

8. Future Hyprland integration

Hyprland provides IPC to query state and run commands.

Desired capabilities:

  • List windows.
  • List workspaces.
  • Discover the active workspace.
  • Open applications.
  • Move windows.
  • Resize.
  • Focus.
  • Change the active workspace.
  • Receive compositor events.

The adapter can use the Hyprland IPC sockets, or existing Rust libraries that implement these protocols.

Avoid shell commands when a structured integration is available.

Attention: window management and automation of application content are different problems.

To interact with content, study later:

  • Browser automation protocols.
  • Accessibility APIs.
  • Native integrations.
  • The applications' own APIs.
  • Input automation, when really needed.

9. Cross-platform

We want the experience to work on:

  • Linux.
  • macOS.
  • Windows.

The main logic of agents, workspaces, intents, activities and surfaces must be portable.

Integrations with the operating system can be specific.

Linux

Hyprland IPC as the first real control backend.

Windows

Win32 APIs, including management of window positions and states, and UI Automation for certain interactions.

macOS

Accessibility APIs and other integrations authorized by the system to observe and manipulate windows.

Important: do not assume full parity. Wayland, Windows and macOS have different models of permissions and desktop control.

The POC must have an explicit matrix of capabilities supported per backend.

10. LLM integration

The AI will be responsible for interpreting intents, deciding actions and coordinating tools.

It can have considerable autonomy.

The goal is not to artificially limit its ability to act on the computer.

However, the architecture must separate decision from execution.

The agent requests actions through typed tools, such as:

list_workspaces
create_workspace
switch_workspace
list_windows
move_window
resize_window
focus_window
launch_application
close_window
create_surface
update_surface
inspect_activity
execute_command

The executor applies the actions and returns their results.

This allows:

  • Use with different LLM providers.
  • Simulation of actions.
  • Logging and debugging.
  • Verification of results.
  • Configurable permission control.
  • Manual intervention.
  • Execution on different operating systems.

The agent can receive broad autonomy, as long as critical actions have explicit and auditable policies.

Integrate headless OpenCode from POC 1. The Rust shell sends intents over HTTP and consumes events over SSE. OpenCode drives the agent cycle; the application keeps activities, workspaces and the execution of the typed tools.

The provider/model and authentication will be configured in OpenCode. Do not build an own harness in this milestone. The tool bridge, approval requests and cancellation must be validated in the implementation. See the decision record.

11. Agent-generated interfaces

In the future, agents will be able to compose interfaces from components available in the shell.

Conceptual example:

{
  "type": "surface",
  "title": "Development",
  "components": [
    {
      "type": "status",
      "value": "Tests passed"
    },
    {
      "type": "diff",
      "source": "working-tree"
    },
    {
      "type": "action",
      "label": "Review changes",
      "action": "open_review"
    }
  ]
}

The final format has not been decided yet.

Study protocols such as A2UI, but do not assume its adoption.

The renderer must interpret declarative representations and produce native components.

Avoid arbitrary generation of executable code by the LLM for each visual update.

12. Motion design

Motion is a fundamental part of the concept.

Animations must communicate state changes, not just decorate the screen.

Examples:

  • Intent sent → the central field contracts.
  • Workspace created → a new visual region appears.
  • Application started → window appears and takes its place.
  • Environment organized → windows move smoothly.
  • Agent running → discreet activity indicators.
  • Result completed → surface turns into a persistent result.
  • Workspace closed → elements collapse.

Explore principles inspired by the work of Aristide Benoist:

  • Asset preprocessing.
  • SVGs and fonts prepared for GPU.
  • Signed Distance Fields.
  • WGSL shaders.
  • Morphing.
  • Precomputed geometry and effects.
  • On-demand rendering.

Do not implement a complete graphics engine for the POC.

Start with the animation system supported by Iced and add custom graphical components only where they add value.

13. Main flow of the first POC

Scenario: prepare the development environment.

Initial state:

  • No active workspace.
  • Central intent field.
  • Agents on standby.

The user says:

Prepare my Laravel development workspace.

The system:

  1. Recognizes the intent.
  2. Shows the agent planning.
  3. Creates a workspace named Development.
  4. Simulates opening a code editor.
  5. Simulates opening a terminal.
  6. Simulates opening a browser.
  7. Organizes the windows in a coherent layout.
  8. Shows the agent as completed.
  9. Keeps a compact intent field, allowing new instructions.

Then, the user says:

Focus on the editor and move the terminal to the right.

The system:

  1. Identifies the existing windows.
  2. Focuses the editor.
  3. Moves the terminal.
  4. Animates the changes.

The POC must run this flow with real intent interpretation and tool calls through OpenCode. The tools manipulate simulated windows, without replacing the agent with a deterministic interpreter.

14. Other demo scenarios

Example Project

Intent:

Open my Example Project context.

Expected behavior:

  • Create or activate the Example Project workspace.
  • Present simulated project interfaces.
  • Show associated activities and agents.
  • Organize the relevant surfaces.

Bug review

Intent:

Review critical bugs.

Expected behavior:

  • Create a bugs surface.
  • Show an agent performing analysis.
  • Present a list of simulated problems.
  • Offer investigation actions.

Context switching

Intent:

Switch back to Development.

Expected behavior:

  • Recover the previous layout.
  • Restore focus.
  • Preserve visual state.
  • Show the agents and activities of that context.

15. POC 1 requirements

Functional

  • The native application starts correctly.
  • Functional empty state.
  • The intent field accepts text.
  • Quick suggestions are clickable.
  • It is possible to create several workspaces.
  • It is possible to switch workspaces.
  • Workspaces preserve their own windows.
  • Windows can be reorganized.
  • Real tool calls through OpenCode produce visual changes in the simulated windows.
  • The UI presents agent execution, completion, error and approval requests.
  • There is a distinction between active and inactive agents.
  • The layout follows the resizing of the main window.

Visual

  • Design consistent with the reference.
  • Intent field visually dominant in the empty state.
  • Active interface makes use of the available space.
  • Smooth animations.
  • Clear visual hierarchy.
  • No excess of decorative elements.
  • Agent state understandable without taking much space.

Technical

  • Rust and Iced as the base.
  • wgpu when rendering requires it.
  • No real compositor integration in POC 1.
  • Simulated window manager, isolated by an abstraction.
  • Predictable state.
  • Reusable components.
  • Local headless OpenCode as a runtime dependency of the agent.
  • Provider/model and authentication configured in OpenCode; no secret versioned.
  • Connection or authentication failures must appear in the UI, with no silent fallback to a simulated agent.

16. What not to implement now

Do not implement:

  • Real management of system windows.
  • Wayland compositor.
  • Distributed multi-agent orchestration.
  • Complex persistence.
  • Database.
  • Cloud sync.
  • Tool marketplace.
  • Complete plugin system.
  • Complex permission manager.
  • Unrestricted application automation.
  • Integration with private GNOME APIs.
  • Full support for the three operating systems.

These features belong to future phases.

17. Engineering guidelines

  • Prioritize simple and readable code.
  • Avoid overengineering.
  • Validate current APIs and versions of dependencies before implementing them.
  • Use stable and compatible versions.
  • Do not invent Iced APIs.
  • Test compilation.
  • Organize states and messages in an idiomatic way for the framework.
  • Separate the domain from rendering code.
  • Create basic tests of the state transitions and of the simulator.
  • Document limitations.
  • Do not declare features ready without verifying them.
  • Avoid large dependencies without justification.

18. Immediate instructions for Codex

You are in the Galaxy Shell project.

First, inspect the existing structure of the repository, its local instructions and possible previous implementations. Preserve what already works and avoid overwriting work without need.

Then:

  1. Propose a minimal architecture for POC 1.
  2. Implement the foundation in Rust + Iced.
  3. Create the minimalist empty state.
  4. Implement the workspace model.
  5. Implement simulated windows.
  6. Add the active workspace state.
  7. Integrate headless OpenCode and connect real intents to the simulator tools.
  8. Implement visual transitions.
  9. Run the available checks and tests.
  10. Document how to start and try the POC.

The goal is not to do everything at once.

Top priority: quickly deliver a visually convincing and interactive application to experiment with the concept.

Before investing in complex architecture, we need to be able to observe the cycle:

Intent → Planning → Workspace → Windows → Organization → Result.

Completion criterion

The first milestone is ready when we can open the application, type a development intent and see the simulated desktop transform into a workspace with several organized windows, being able to switch workspaces and return to the empty state.


Final guiding principle

This project must not look like a GNOME with a chatbot added.

We want to discover what a computer would be like in which the system understands what the user wants, organizes tools and information to reach that goal and continuously adapts the visual experience to the work of the agents.

The interface must be a consequence of the activity, not the mandatory starting point of every task.

Reference shared later

File in the ChatGPT library.

Access through the automation browser redirected to login. The visual content has not yet been inspected or copied into the repository; the textual description remains the available reference.