main
md 35 lines 1.16 KB
Rendered Raw
1 # Chat Branching Plugin DOX
2
3 ## Purpose
4
5 - Own branching a chat from any existing message.
6 - Keep log and history trimming behavior consistent when creating a branched conversation.
7
8 ## Ownership
9
10 - `plugin.yaml` and `README.md` own metadata and user-facing behavior notes.
11 - `api/branch_chat.py` owns branch creation, clone, trim, persist, and refresh behavior.
12 - `extensions/` owns WebUI button injection.
13 - `webui/` owns plugin thumbnail assets.
14
15 ## Local Contracts
16
17 - Preserve UUID-based linking between log entries and history messages.
18 - Branched chats must include history only up to the selected message.
19 - Detach inherited Responses continuation and response-ID ownership, while
20 retaining structured output metadata needed for local replay.
21 - Clear cached Context Window state after trimming each cloned agent.
22 - Do not mutate the source chat while creating a branch.
23
24 ## Work Guidance
25
26 - Coordinate UI button injection with message rendering extension points.
27
28 ## Verification
29
30 - Run `conda run -n a0 pytest plugins/_chat_branching/tests`.
31 - Smoke-test branching from several message positions and confirm source chat remains unchanged.
32
33 ## Child DOX Index
34
35 No child DOX files.