← All specifications

Fugue

Programmatically-controllable UIs independent of modality.

Identifier
fugue
Repository
https://bitbucket.org/byredev/fugue
NPM
@byre/fugue
Latest version
1.0.0
Audiences
human, agent, cli

Specification

draft 1.0.0
  status candidate
  title Fugue Specification
  date 2026-05-05
  license All Rights Reserved

---

spec fugue

  section purpose
    title Purpose
    level 1

    prose
      value
        Fugue is the agent-surface layer of the @byre federation.
        Where Camber provides components for the visual modality,
        Fugue provides a parallel set of declarations for the
        agent modality: what an automated consumer can observe
        about a page, and what affordances it can invoke. Fugue is
        modality-neutral by design — the same surface declaration
        can drive visual, auditory, and tactile projections.

  section surface
    title Surface declaration
    level 2

    prose
      value
        A surface is a JSON declaration of what a page presents:
        attention-concepts (named regions of meaning), affordances
        (named actions the surface accepts), parameters and
        state-dimensions (named values the surface exposes or
        accepts).

    requirement F-001
      level MUST
      value
        Each web page MUST declare its surface via a
        script[type=application/fugue+json] element or via a
        fugue+json file referenced from a known endpoint.

    requirement F-002
      level MUST
      value
        Surface declarations MUST be discoverable by an agent
        without executing JavaScript. The declaration is data,
        not a runtime API.

  section runtime
    title Runtime
    level 3

    prose
      value
        The Fugue runtime is responsible for discovering surface
        declarations on a page and exposing them to agents through
        a uniform observe / invoke interface.

    requirement F-010
      level MUST
      value
        The runtime MUST register every surface declared on the
        active page. Multiple surfaces per page MUST be supported.

  section relationship-to-form
    title Relationship to Form
    level 4

    prose
      value
        Form is the structural source-of-truth — a form document
        declares the page's concepts and affordances independent
        of any modality. Fugue surfaces project from a form
        document, as do HTML/Camber projections. Names declared
        in fugue surfaces MUST be reachable in the form.