Skip to content

Reference: multi-agent collaboration & external ACP integration customization (PR #2139) #2140

Description

@1688mengdie

Overview

This issue accompanies PR #2139, which is a reference submission rather than a request for a blind merge. It presents a complete, final-state snapshot of customizations built on BitFun's latest \main, focusing on multi-agent collaboration and connecting BitFun to external AI agents through the ACP protocol.

Motivation

BitFun already supports single-agent coding workflows well. This work explores two extensions that we believe are valuable directions for the project:

  1. External agent integration via ACP — letting BitFun drive real external agent processes (CodeBuddy, Claude Code, OpenCode, etc.) as first-class sessions.
  2. Structured multi-agent collaboration — a three-branch (decision / execution / review) coordination model with quality gates, giving large agent runs auditability and determinism.

What the PR contains

  • A 370-file final-state code snapshot relative to upstream \main\ (no intermediate steps, no scratch files, no internal records).
  • CUSTOMIZATIONS.md, an academic-style report: Abstract, Introduction, Related Work, Design (Three-Branch Separation-of-Powers coordination model), Implementation 1-8, Evaluation, Conclusion & Future Work, References.

Domains covered

  1. ACP channel (session-level direct connection to external ACP agents)
  2. SessionControl / SessionMessage tools (create, talk to, compact, delete sessions)
  3. Warden guard system (governance: repeated-failure detection, challenges, violation records)
  4. RBAC subagent roles (role templates controlling subagent tool access)
  5. Engine & context injection (per-round runtime facts, once-per-generation user context)
  6. Legion / Task / Plan toolchain (orchestration topology, task dual lifecycle, plan tools)
  7. CodeBuddy provider adapter (OpenAI-compatible cloud API adapter)
  8. Web UI (flow-chat display, legion pages, model switching)

How to review

  • The PR is intentionally large (370 files) because the purpose is to present the final state of a coherent effort for reference.
  • Maintainers may review as a whole, cherry-pick per domain, or ask to split into smaller PRs.
  • Every file reference in CUSTOMIZATIONS.md was cross-checked against the final state (13/13 verified); no proprietary or internal information is included (17-pattern scan clean).

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions