Expand description
Work facts: per running agent, what srv can already see or cheaply derive about what it is working on, so agents can find out who else is working on the same file, branch or topic (docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md §3.1).
| Fact | Source |
|---|---|
| goal | block meta term:ambient_summary, else term:last_prompt |
| todos, current tool, recent files | the progress watcher (reactive::progress_watcher) |
| working folder | bashwrap’s cwd state file, else the start folder (cmd:cwd) |
| repo, branch, uncommitted files | git in that folder, cached (git) |
Files are compared across clones as (repository, repository-relative
path), since every agent has its own clone. Nothing here blocks anyone:
the facts only inform, through WhoIsWorkingOn (matching) and the
overlap notes an agent gets when it edits a file another agent is also
changing (overlap, overlap_notes).
What agents say they are working on (ClaimWork, claims) joins both.
Modules§
- claims
- Work claims, the pure half (docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md
§3.4): which claims touch a
WhoIsWorkingOnquestion or an edited file, and how a claim reads. Claims themselves are stored bystorage::work_claims;ClaimWorkandReleaseWorkareserver::work_facts_handlers. - cross_
channel - Other AgentMux channels’ agents’ work facts, on this computer: every other
channel’s srv in the host-global registry is asked for its own agents’
facts (
GET /api/v1/work-facts), concurrently, each with its own timeout, so one dead channel never stalls the caller (docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md §3.2, §3.3). Used byWhoIsWorkingOn,ListConversationsand the overlap notes. - git
- The git half of an agent’s work facts: repository, branch and uncommitted files in its working folder.
- matching
WhoIsWorkingOn: which other agents’ work facts touch a path, repository, branch or topic (docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md §3.2). Pure, so every rule is tested without a running srv.- overlap
- 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) isoverlap_notes. - overlap_
notes - Overlap notes, the runtime half (docs/specs/SPEC_AGENT_OVERLAP_AWARENESS_2026_10_10.md §3.3, file half).
- paths
- Path and repository-name handling for work facts: one spelling for every
path (forward slashes, no trailing slash), repository-relative paths so
two clones of the same repository compare equal,
owner/repofrom a remote URL, and where bashwrap keeps an agent’s live working folder.
Structs§
- Fact
File - One file an agent changed recently.
- Work
Facts - Everything known about one agent’s current work.
Constants§
- META_
LAST_ 🔒PROMPT - The block meta key the agent pane writes the latest prompt to
(
frontend/app/store/swarm-line.ts,META_LAST_PROMPT). - SUMMARY_
DIRTY 🔒 - How many uncommitted and recent files a
ListConversationsentry shows. - SUMMARY_
RECENT 🔒
Functions§
- build
- Assemble one agent’s facts from what each source said.
- collect_
local - The facts for every agent registered on this srv. Reads the store and the caches only, never git: call off the async workers.
- conversation_
summary - The facts as a
ListConversationsentry carries them (itsworkfield): the first few files of each list and a checklist summary. - folder_
of - The agent’s working folder (see
paths::working_folder), from its block row. Reads the store: call off the async workers. - folder_
of_ 🔒meta - goal_of
- The agent’s goal: its generated title, else its last prompt.
- status_
of 🔒