Skip to content

Tree self-organization follow-ups: memory handoff on merge, model-based clustering, chat notice #450

Open

Description

@Birfy

Follow-up to #446 (PR #448) and input for #447. The owner decision of 2026-10-19 21:27 Asia/Shanghai (#446 comment) is implemented in #448 as a first version inside plugins/tree/ (no core change). These parts are left for later:

  1. Move conversation / memory references on a merge. Today a merge moves the old Bot's children to the kept Bot, records mergedFrom on it and tells it in its prompt; the old Bot is archived with its own chat and memory untouched. A real handoff (a memory or handoff note carried into the kept Bot, links from the old chat) needs a core API for plugins, e.g. on top of the part handoff in core/src/host/parts.js.
  2. Model-based clustering. Role matching is deterministic (plugins/tree/src/roles.js: name, role label, description, own prompt, recent tool names, a small English / Chinese domain vocabulary). config.classify(profile) is the hook. A classifier that asks a model needs a sanctioned way for a plugin to make a short model call; the codebase has no such pattern yet.
  3. A notice in the Main Bot's chat. The owner is told in the tree view (sidebar notice with Undo / Dismiss) and through the Main Bot's prompt. A notice line in Chief's own chat, without a model turn, needs a core API (today postToRoom notices exist only for rooms).
  4. Archived Bots in the sidebar. Archived Bots leave the tree but the core sidebar draws every non-tree Bot under Chief; the tree tags them "archived". A collapsed "Archived" group, or hiding them from the main list, needs a core sidebar change.
  5. Richer activity. The activity feed has no text, so "recent activity" is when a Bot last worked and which tools it used. Topic-level summaries would improve grouping.
  6. Bursts. Bots created in parallel are placed one at a time, so related Bots arriving together may first join a broader group (e.g. a Dev Lead with an existing Programmer) before their own project group forms; the daily tidy groups them later. Placing a burst as one group would follow Tree: smarter sub-Bot allocation (lead+children, reuse, deeper placement) maintained by auto-prune/merge #447's plan-card allocation.
  7. Small limits. With a small maxChildren, a Bot that fits no group while every level it matches is full stays outside (logged, tagged "outside the tree", retried on every attempt). Only the owner can raise the limit.

Related: #446, #447, #448.

Activity

  1. Birfy commented on Oct 19, 2026

    @Birfy
    CollaboratorAuthor

    Maintenance triage (2026-10-19 21:58 Asia/Shanghai)

    Status. Follow-ups deferred from #448 (Fixes #446). Spec of each item is clear enough to park; none can start until #448 lands, and items 1–4 need core APIs (memory/handoff, short model call for plugins, Main-Bot chat notice, sidebar archive group) that are not in this plugin-only PR.

    Design check. Matches the owner decision on #446 (role groups, archive-not-delete, undo, no least-loaded fallback). No conflict with grants / approvals / English UI rules.

    What is blocked.

    1. Memory handoff on merge → needs a plugin-facing core handoff API.
    2. Model-based clustering → needs a sanctioned short model call for plugins (config.classify stays the hook until then).
    3. Notice in Chief's chat → needs a non-room notice API (today only rooms have postToRoom).
    4. Archived Bots sidebar treatment → needs a core sidebar change.
      5–7. Richer activity / burst placement / small-limit edge → can stay in tree once Tree organizes itself by role: groups under leads, merge, daily tidy, undo #448+Tree: smarter sub-Bot allocation (lead+children, reuse, deeper placement) maintained by auto-prune/merge #447 land; lower urgency.

    Labels. Leaving needs-human until the owner picks priority after #448 merges. Not applying agent-ready (needs confirmation). Bugs #304/#261/#182 are still needs-info, so this planning ask is not pushed in this run's confirmation card.

    Recommendation when asked: after #448 merges, do 4 (archived sidebar) first if core sidebar work is cheap, else hold all seven until a dedicated core-API RFC; do not start #447 until #448 is on main (same tree files).

  2. added
    needs-humanThe agent loop stopped; a person must decide (reason in the last comment)
    on Oct 19, 2026
  3. Birfy commented on Oct 19, 2026

    @Birfy
    CollaboratorAuthor

    Maintenance (2026-10-19 23:06 Asia/Shanghai): #448 and #453 are on main (84a95a6). Item 4 (archived Bots in the sidebar) is covered by #453: archive is now a hidden flag and the sidebar hides archived Bots. Items 1-3 still need core APIs and 5-7 are tree-only polish; #447 (allocation) starts now. Still needs-human for the owner to pick what comes next.

  4. Birfy commented on Oct 20, 2026

    @Birfy
    CollaboratorAuthor

    Maintenance progress note (2026-10-20 16:05 Asia/Shanghai): item 2 (model-based clustering) now has HugoXK proposals:

    Both are labeled and waiting on owner confirmation before we treat them as accepted (not agent-ready). Items 1 / 3+ unchanged. Not pushing RFC ahead of open bugs (#261 still needs-info).

  5. Birfy commented on Oct 23, 2026

    @Birfy
    CollaboratorAuthor

    Split on the owner's call this round.

    For the record on item 2 (model-based clustering): it is shipped — #518 (f3ec72f6) and #520 (7a7844d9) were both merged into main, so the "waiting on owner confirmation" note in the earlier comment is stale.

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:automationScheduled tasks and automationenhancementNew feature or requestneeds-humanThe agent loop stopped; a person must decide (reason in the last comment)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions