Skip to content

[FEATURE]: Selective Agent Sync — Choose Which Coding Agents to Enable #4

@MaksimSkorobogatov

Description

@MaksimSkorobogatov

Background / Motivation

As an agentMemory user who works primarily with a single AI coding agent (e.g., KiloCode or OpenCode), I find the current behavior of automatically configuring all supported agents problematic. When I initialize agentMemory in a project, it unconditionally creates directories and configuration files for all agents — KiloCode, Cline, RooCode, and OpenCode — even though I only use one or two of them.

This leads to:

  1. Cluttered project directories with unused .clinerules/, .roo/, .opencode/, etc.
  2. Noisy git diffs when these directories get accidentally committed
  3. Confusion for team members who see files for agents they don't use

Proposed Solution

Introduce a user-configurable agent selection step before the memory bank is initialized. The user should explicitly choose which agents to sync with, and agentMemory should only create files and directories for the selected agents.

The selection should be persisted in .agentMemory/agents.json and treated as the single source of truth for all sync operations.

Desired Behavior

User chooses: KiloCode + OpenCode
Result:
  ✅ .kilocode/rules/memory-bank/    (created)
  ✅ .opencode/memory-bank/          (created)
  ❌ .clinerules/memory-bank/        (NOT created)
  ❌ .roo/memory-bank/               (NOT created)

Proposed User Flows

Context How agent selection should work
VS Code Extension Show showQuickPick with canPickMany during ensureSetup(), pre-selecting installed agents
CLI (npm run start-server) Accept --agents=kilocode,opencode flag and write to agents.json
Terminal / SKILL.md setup Interactive readline prompt during project_init (when TTY is available)
Later reconfiguration New MCP tool configure_agents({ agents: "kilocode,roocode" }) to change selection anytime

Testing Scenarios

  1. Fresh project, VS Code Extension: Activate extension → QuickPick appears → select only 2 agents → verify only those directories are created
  2. CLI with --agents flag: run server.js --agents=opencode → verify agents.json contains ["opencode"] → memory writes sync only to .opencode/
  3. MCP reconfiguration: call configure_agents({ agents: "kilocode,cline" }) → verify subsequent writes go to those two agents only
  4. Backward compatibility: start server without --agents and without agents.json → verify auto-detection and graceful initialization

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions