Skip to content

chore: remove legacy .kilocode migration helpers and update docs#9590

Open
Doondi-Ashlesh wants to merge 2 commits intoKilo-Org:mainfrom
Doondi-Ashlesh:fix/kilo-dir-migration-cleanup
Open

chore: remove legacy .kilocode migration helpers and update docs#9590
Doondi-Ashlesh wants to merge 2 commits intoKilo-Org:mainfrom
Doondi-Ashlesh:fix/kilo-dir-migration-cleanup

Conversation

@Doondi-Ashlesh
Copy link
Copy Markdown

Post-GA cleanup tracked in #6986.

Code changes

  • Remove migrateAgentManagerData, LEGACY_DIR, MigrationResult, and all helper functions from agent-manager/constants.ts
  • Remove ensureMigrated() method and migrated field from WorktreeManager.ts
  • Remove LEGACY_DIR fallback in readMetadata and legacy .kilocode entries from ensureGitExclude in WorktreeManager.ts
  • Remove migration call and git refresh logic from WorktreeStateManager.ts and AgentManagerProvider.ts; simplify load() return type to void
  • Remove stale .kilocode path rewrite from WorktreeStateManager.ts

Docs changes

  • Update .kilocode/ directory references to .kilo/ across skills, MCP, agent-manager, auto-launch, cloud-agent, analytics, and migration guides

Closes #6986

Post-GA cleanup tracked in Kilo-Org#6986.

Code changes:
- Remove migrateAgentManagerData, LEGACY_DIR, MigrationResult, and all
  helper functions from agent-manager/constants.ts
- Remove ensureMigrated() method and migrated field from WorktreeManager.ts
- Remove LEGACY_DIR fallback in readMetadata and legacy .kilocode entries
  from ensureGitExclude in WorktreeManager.ts
- Remove migration call and git refresh logic from WorktreeStateManager.ts
  and AgentManagerProvider.ts; simplify load() return type to void
- Remove stale .kilocode path rewrite from WorktreeStateManager.ts

Docs changes:
- Update .kilocode/ directory references to .kilo/ across skills, MCP,
  agent-manager, auto-launch, cloud-agent, analytics, and migration guides
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 28, 2026

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Fix these issues in Kilo Cloud

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-docs/pages/index.tsx 53 Homepage example creates .kilo/rules.md, which is not loaded by rule discovery.
packages/kilo-vscode/src/agent-manager/WorktreeManager.ts 495 Stale WorktreeManager unit tests still assert removed legacy .kilocode behavior.
packages/kilo-vscode/src/agent-manager/WorktreeStateManager.ts 519 Stale WorktreeStateManager unit tests still assert removed .kilocode path rewriting.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
packages/kilo-vscode/tests/unit/worktree-manager.test.ts 641 Test still expects stale gitdir refs to be repaired after migration helper removal.
packages/kilo-vscode/tests/unit/worktree-manager.test.ts 673 Test still expects legacy .kilocode exclude entries after they were removed.
packages/kilo-vscode/tests/unit/worktree-state-manager.test.ts 539 Test still expects Unix .kilocode worktree paths to be rewritten.
packages/kilo-vscode/tests/unit/worktree-state-manager.test.ts 561 Test still expects Windows .kilocode worktree paths to be rewritten.
Files Reviewed (14 files)
  • packages/kilo-docs/pages/automate/agent-manager.md - 0 issues
  • packages/kilo-docs/pages/automate/extending/auto-launch.md - 0 issues
  • packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md - 0 issues
  • packages/kilo-docs/pages/automate/tools/use-mcp-tool.md - 0 issues
  • packages/kilo-docs/pages/code-with-ai/platforms/cloud-agent.md - 0 issues
  • packages/kilo-docs/pages/collaborate/enterprise/migration.md - 0 issues
  • packages/kilo-docs/pages/collaborate/teams/analytics.md - 0 issues
  • packages/kilo-docs/pages/customize/custom-rules.md - 0 issues
  • packages/kilo-docs/pages/customize/skills.md - 0 issues
  • packages/kilo-docs/pages/index.tsx - 1 issue
  • packages/kilo-vscode/src/agent-manager/AgentManagerProvider.ts - 0 issues
  • packages/kilo-vscode/src/agent-manager/WorktreeManager.ts - 1 issue
  • packages/kilo-vscode/src/agent-manager/WorktreeStateManager.ts - 1 issue
  • packages/kilo-vscode/src/agent-manager/constants.ts - 0 issues

Reviewed by gpt-5.5-20260423 · 4,529,218 tokens

…omepage

- Update primary .kilo/rules/ path references in the VSCode (Legacy) tab
  of custom-rules.md (directory trees, step-by-step instructions, load
  order listing, and troubleshooting guide)
- Update homepage terminal example from .kilocode/rules.md to .kilo/rules.md
- Backward-compat callout notes (lines 64, 100, 210, 224) are left intact
  as they correctly document that .kilocode/rules/ still works
<span className="terminal-comment"># Create a custom rules file in your project</span>
{"\n"}
<span className="terminal-prompt">$</span> touch .kilocode/rules.md
<span className="terminal-prompt">$</span> touch .kilo/rules.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Homepage example creates an unloaded rules file

Rules are discovered from .kilo/rules/*.md (or explicit instructions entries), so .kilo/rules.md at the config directory root will not be picked up. Users following this command won't actually create an active custom rule.

Suggested change
<span className="terminal-prompt">$</span> touch .kilo/rules.md
<span className="terminal-prompt">$</span> mkdir -p .kilo/rules && touch .kilo/rules/rules.md

@@ -510,13 +495,6 @@ export class WorktreeManager {
[".kilo/setup-script.ps1", "Kilo Code worktree setup script"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Stale unit tests still assert removed legacy WorktreeManager behavior

With the legacy .kilocode exclude entries and gitdir repair helper removed, packages/kilo-vscode/tests/unit/worktree-manager.test.ts:641 and packages/kilo-vscode/tests/unit/worktree-manager.test.ts:673 still assert behavior that no longer exists. The unit suite will fail unless those tests are updated or removed with this cleanup.

return `${leadingSep}.kilo${trailingSep}`
}) ?? wt.path
this.worktrees.set(id, { id, ...wt, path: fixed })
this.worktrees.set(id, { id, ...wt })
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Stale unit tests still assert removed path rewriting

This now preserves the stored worktree path, but packages/kilo-vscode/tests/unit/worktree-state-manager.test.ts:539 and packages/kilo-vscode/tests/unit/worktree-state-manager.test.ts:561 still expect .kilocode paths to be rewritten to .kilo. The unit suite will fail unless those tests are updated or removed with this behavior change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post-GA cleanup for .kilo migration

1 participant