Skip to main content

Module overlap

Module overlap 

Source
Expand description

Overlap notes, the pure half (docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md §3.3, file half): when an agent edits a file, which other agents have the same (repository, repository-relative path) uncommitted or edited it in the last EDITED_WINDOW_MS; the note that says so; and the rate limits that keep those notes rare. The runtime half (when to check, fetching facts, delivering) is overlap_notes.

Structs§

ClaimRef
Another agent’s live claim on the file or a folder above it (ClaimWork, super::claims).
EditedFile
The file an agent just edited, placed in a repository.
Overlap
Another agent working on the same file.
PrOverlap
How another agent works on files of a PR being opened: one clause per way, e.g. has uncommitted changes in a.rs, changes b.rs on its branch x.
RateLimiter
Remembers what each agent has been told, so notes stay rare: one per (agent, other agent, repository, path) per PAIR_QUIET_MS, at most WINDOW_NOTES per agent per WINDOW_MS, then one summary and quiet until that window ends. Agents are keyed by name, case-insensitively.
Window 🔒

Enums§

Decision
What to tell an agent about one overlapping file.
OverlapKind
How another agent is working on the same file.

Constants§

EDITED_WINDOW_MS
Another agent’s edit counts for this long.
FILES_NAMED 🔒
PAIR_QUIET_MS
At most one note per (agent, other agent, repository, path) this often.
PR_NOTE_AGENTS 🔒
Agents named in a PR note; the rest are counted.
RECHECK_MS
The same agent’s edits of the same file are checked at most this often.
WINDOW_MS
At most WINDOW_NOTES notes per agent in this window; the next one is a summary, then nothing until the window ends.
WINDOW_NOTES

Functions§

ago 🔒
“just now”, “1 minute ago”, “25 minutes ago”.
claimed 🔒
The claim, as a clause: claimed crates/srv in o/r 40 minutes ago ("presence work").
doing 🔒
What another agent did to the file: “has uncommitted changes in it”, “edited it 5 minutes ago”.
files_phrase
Up to FILES_NAMED files, then a count: a.rs, b.rs, c.rs and 2 more.
locate
Where path (absolute, as the edit tool named it) is: the editor’s own clone first, then any other known clone. None when it is in no known repository, so there is nothing to compare across clones.
note_text
The note for one file. One other agent: [AgentMux] Agent4 also has uncommitted changes in crates/srv/src/main.rs (repo o/r, branch agent4/x). Message them before changing it. or ... Agent5 also edited crates/srv/src/main.rs 12 minutes ago (...). Several are listed in one note.
overlaps
Every other agent with file uncommitted, or edited in the last EDITED_WINDOW_MS. The editor itself (me_agent, by name in any channel, so its own other clones and instances too) is left out. One entry per agent, uncommitted first.
pr_note_text
The note for a PR being opened from branch whose files other agents are working on: [AgentMux] The PR you are opening from agenty/x changes files other agents are working on: Agent4 has uncommitted changes in a.rs; Agent5 changes b.rs on its branch agent5/y. Message them ….
summary_text
The note that ends an agent’s window: this file’s overlap, how many files overlapped in the window, and that nothing more comes until it ends.
system_note 🔒
One [AgentMux] note around body. The body carries text srv did not write (other agents’ names, branches and paths, a claim’s note and topic), so all of it is quoted (quote_in_system_note): only this prefix can be a marker, and the note stays one line.
with_claims
Add the live claims that cover file (super::claims::covering) to found: to the claimer’s entry when it also changed the file, else as a OverlapKind::Claimed entry of its own. One claim per agent, the narrowest (longest path).