.kilo/plans/agent-manager-multi-project-implementation-handoff.md
Status: Implementation-ready handoff from the current branch
Date: 2026-07-22
This document tells the next implementation model exactly how to continue from branch abalone-bactrosaurus at commit 8f48da2278 plus the uncommitted plan files. It is the execution checklist. Detailed decisions live in:
agent-manager-multi-project-configuration.md for configuration ownership, bindings, revisions, indexing consent, and settings tests;agent-manager-multi-project-uniform-ui.md for runtime, routing, lifecycle, uniform sidebar UI, and acceptance criteria.If this handoff conflicts with either architecture document, stop and resolve the contradiction before coding.
Finish the current prototype into a safe, complete multi-project Agent Manager behind a default-off VS Code experimental flag.
The feature is done only when:
ProjectContext objects and per-project Agent Manager state files;/tmp aliases;ProjectRouteService integration and raw-session ambiguity rejection;commonGitDir, URI scheme/authority identity;ProjectContext.run();packages/opencode/package.json ordering/dependency drift;bun.lock ordering/version drift unless required by a retained change;experimental.multi_project from the CLI config schema and generated SDK once the VS Code flag is the sole source of truth;Do not reset or discard unrelated user changes. Inspect every cleanup diff before applying it.
AgentManagerProvider.ts or AgentManagerApp.tsx line caps.Complete slices in order. Do not start the next slice while the current slice's tests or checks fail.
Use one source of truth: VS Code application setting kilo-code.new.experimental.multiProject.
experimental.multi_project from:
packages/core/src/v1/config/config.ts;packages/sdk/js/src/v2/gen/types.gen.ts by regenerating the SDK after schema removal;packages/kilo-vscode/webview-ui/src/types/messages/config.ts../script/generate.ts from repository root after endpoint/schema changes.ExperimentalTab.tsx so the toggle reads the VS Code setting delivered in configLoaded.settings, not config().experimental.multiProject to the extension settings payload sent by KiloProvider.fetchAndSendConfig().updateSetting("experimental.multiProject", checked).VscodeHost.multiProject() and its change listener reading the same VS Code setting.experimental.multi_project.Run from packages/kilo-vscode/:
bun run format
bun run format:check
bun run typecheck
bun run lint
bun run test:unit
Do not continue if any command fails.
Indexing enablement is explicit machine-local consent keyed by canonical ProjectId, default false. Project config controls indexing rules but cannot enable indexing.
indexing.enabled to project config from webview-ui/src/utils/config-scope.ts.indexing.enabled from indexing-tab-state.ts.indexing.enabled: true must not enable indexing.src/indexing/ or src/agent-manager/;src/KiloProvider.ts only as a thin protocol adapter;webview-ui/src/components/settings/IndexingTab.tsx;webview-ui/src/components/settings/indexing-tab-state.ts;webview-ui/src/context/config.tsx only if necessary;Config reads return authoritative target descriptors and revisions. Writes use compare-and-swap and cannot overwrite external changes or a changed target.
packages/opencode/src/kilocode/config/overlay.ts;packages/opencode/src/kilocode/config/;packages/opencode/src/kilocode/server/httpapi/groups/config-console.ts;packages/opencode/src/kilocode/server/httpapi/handlers/config-console.ts.set, unset, and expected path/revision.packages/opencode/src/kilocode/. Shared upstream files get minimal marked delegation only when unavoidable.Add/extend:
packages/opencode/test/kilocode/server/config-overlay.test.ts;packages/opencode/test/kilocode/project-config-update.test.ts.Cover:
From packages/opencode/:
bun run typecheck
bun test test/kilocode/server/config-overlay.test.ts
bun test test/kilocode/project-config-update.test.ts
From repository root:
./script/generate.ts
bun run script/check-opencode-annotations.ts
bun run script/check-opencode-promise-facades.ts
Settings has explicit User | Project scope. Project scope requires an explicit trusted project selector. Drafts and saves never follow Agent Manager activation.
packages/kilo-vscode/src/kilo-provider/; keep KiloProvider.ts as a thin adapter.ProjectContext.root;getWorkspaceDirectory() after binding creation.splitConfigByScope() after all controls declare scope explicitly.ProjectRef, checks trust, and resolves the registered root.Use the table in agent-manager-multi-project-configuration.md. Do not invent another policy.
Every project is a canonical Git repository root with URI authority and common Git directory identity.
{
id,
uri,
scheme,
authority,
root,
commonGitDir,
label,
order,
trusted,
addedAt
}
git rev-parse --show-toplevel;git rev-parse --path-format=absolute --git-common-dir;commonGitDir.Every repository-bound operation is explicitly project-qualified once multiple projects are exposed.
ProjectRouteService into every existing-session operation:
ctx.run() and generation-check commits.Every initialized expanded project owns the same live-state services. Active selection changes cadence/detail only, not ownership.
ProjectContext; remove active singleton/background split.Single- and multi-project modes render the same full ProjectSidebarBody implementation.
renderBody() from AgentManagerApp.tsx intact.From packages/kilo-vscode/:
bun run format
bun run format:check
bun run typecheck
bun run lint
bun run test:unit
bun run knip
bun run check-kilocode-change
bun run compile
From repository root:
bun run script/check-opencode-annotations.ts
bun run script/check-opencode-promise-facades.ts
bun run script/check-md-table-padding.ts
apply_patch for manual edits.