Skip to content

Agent Flow: the timeline replays every change to the city (#413) - #443

Merged
aMonteSl merged 1 commit into
v1.3.0from
claude/project-thread-31qlni
Dec 2, 2026
Merged

aMonteSl merged 1 commit into
v1.3.0from
claude/project-thread-31qlni

Conversation

@aMonteSl

@aMonteSl aMonteSl commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Requested by Adrián · project thread

Part of #413 (epic #319).

What changes

Seeking to any step of the Agent Flow timeline now shows the city exactly as it was at that point of the chat, for every kind of change, not only new floors:

  • Files created, deleted, moved or renamed appear and disappear in their own step. This works whatever tool made the change:
    • Write/Edit
    • Codex apply_patch, including Move to
    • shell commands: rm, git rm, mv, git mv, cp, touch, >/>>, tee, sed -i, and their PowerShell/cmd forms
    • the IDE's agent locations
  • Functions deleted keep their floor until that step, and then the floor shrinks away.
  • Deleting or moving a file no longer counts as a blind edit.

How

  • Core: agentFlowLifecycle.ts builds per-step created/deleted/moves and file.existed. The shell classifier collects file effects over every segment of a command.
  • Runtime: stateAt applies the lifecycle, so seek, step forward and step back all share one source of truth.
  • Harness: a new invariant check runs over every step. It asserts that seek(i) equals stepping forward from i-1, and equals stepping back from i+2. Any future action that forgets the timeline fails it.
  • Docs: docs/agent-flow/timeline.md gives the rules for adding a new action. test-guide.md has a new "Timeline" section for the manual test.

Git diff reconciliation at turn close (for changes no tool reported) is left for a follow-up.

Checks

  • npm test green
  • Agent Flow harness green, including the invariant over all steps
  • complexity.over10 stays at the baseline

Generated by Claude Code

Seeking to any step now shows the city exactly as it was then: buildings
appear when the agent creates them, disappear when it deletes them, move
when it renames them, and floors die when their function is removed.

- Core: per-step lifecycle (created, deleted, moves) and file.existed,
  built from Write/Edit, apply_patch and shell commands (rm, mv, cp,
  touch, redirects, sed -i, tee and their PowerShell forms).
- Floors record diedStep from the removed definitions of each hunk.
- Runtime: stateAt applies the lifecycle; dying floors shrink on replay.
- Harness: invariant check that seek(i) equals stepping forward from i-1
  and stepping back from i+2, over every step.
- docs/agent-flow/timeline.md lists the rules for future actions.
@aMonteSl aMonteSl self-assigned this Dec 2, 2026
@aMonteSl
aMonteSl merged commit 3130417 into v1.3.0 Dec 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants