Skip to content

AG10 Function floors: one floor per function, lit while the agent works on it #413

Done

Description

@aMonteSl

As a developer watching an AI agent work in Agent Flow,
I want every building split into one floor per function, with the floor the agent works on lit and a new floor built when it writes a new function,
so that I can see exactly which functions the agent reads and changes, not just which files.

Part of epic #319. Proposed by Adrián (1-dec). Siblings explored in parallel: see-through neighbours and an accordion that spreads the floors apart; this story exposes the hooks they build on.

Design

  • Floors: the functions of the file as it is now (backend --mode functions), bottom to top in source order, height split evenly between the floors standing at the playhead. Nested functions belong to their parent's floor; an anonymous wrapper (IIFE) is opened up.
  • Colours: two tones of the current palette per pair of floors; dark grey while untouched; a soft tint of what was done to a floor (read, written); the floors of the current step in the verb's colour with an outline.
  • Lines per step: Claude Code structuredPatch / created content / read window; IDE (ACP) created diffs and tool location lines. Carried forward through later edits to the file's current numbering.
  • New function: its signature line was added by a write whose removed lines do not name it. The floor appears at that step, growing in.
  • Shared code in core/agent-flow (agentFlowFloors.ts, lineTouches.ts) and the server wiring in core/server, used by both hosts; runtime parts floorModel.js and cityFloors.js.

Acceptance criteria

  • VS Code extension and Code-XR IDE: buildings of code files show one floor per function after a session opens; files without functions stay one block.
  • A partial Read lights only the floors of the functions in its window.
  • An Edit inside a function lights exactly that floor; the rest of the building keeps its tint.
  • An Edit that adds a function builds a new floor at that step; seeking before it removes the floor.
  • Live: after the save is re-analysed, a new function's floor is built on its building.
  • Hovering a floor shows the function name, its lines, floor number and reads/writes.
  • Heat and Blast radius keep working (floors only two-tone the building colour).
  • Hooks for the other experiments: getFloorRects, setFloorOffsets, floorInstances, hasFloors.
  • Unit tests (core) and harness checks with screenshots; docs docs/agent-flow/floors.md and test guide section.

Generated by Claude Code

Activity

  1. added
    tfm
    user-story
    area: ide
    area: extension
    on Dec 1, 2026
  2. aMonteSl commented on Dec 2, 2026

    @aMonteSl
    CollaboratorAuthor

    Manually tested by Adrián on 2-Dec in the Code-XR IDE scene: floors per function, partial reads light only their floors, the new function's floor appears. Follow-up (replaying the build of a new floor when seeking back) is tracked separately.


    Generated by Claude Code

  3. aMonteSl commented on Dec 2, 2026

    @aMonteSl
    CollaboratorAuthor

    Follow-ups #440/#441 (replayed floor growth) and #443/#444 (full time travel: created, deleted and moved files at their step) manually tested OK by Adrián on 2-Dec.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: extensionarea: idestream: agent-flowtfmuser-story

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions