Skip to content

Core Model Migration Inventory (Archived)

Core Model migration completed in Phase 8. This document is retained as historical implementation context and is no longer an active engineering contract.

Every subsystem scheduled for migration into the structured Plan / Executor engine is documented below.

Migration Status Summary

Subsystem Status
Project Skills (copy + link) Migrated (Phase 2; converged in Phase 3)
Global Skills Migrated (Phase 4)
Global Instructions Migrated (Phase 5)
Project Instructions Migrated (Phase 5)
Project Memory Migrated (Phase 6)
sync_resource() Retired (Phase 6)
LegacySyncResult Retired (Phase 6)
MCP Engine Migrated (Phase 7)
Subagent Engine Migrated (Phase 7)
Unified Workspace Coordinator Migrated (Phase 8)
Adoption Engine Migrated (Phase 8)
Unified Diagnostics Migrated (Phase 8)
Public Python API Facade Migrated (Phase 8)
Web Console Application View Migrated (Phase 8)

Detailed Inventory

Subsystem / Entry Status Reads Writes Ownership Evidence State File Dry-run Behavior Recovery Boundary Target Engine Notes
cli.py::cmd_sync_all, workspace_sync.py Migrated (Phase 8) Workspace config, agents.toml, all projects, global resources, agent runtimes Runtime global symlinks, project checkouts, MCP configs, subagents Delegates ownership decisions to each resource Plan: SkillPlan / InstructionPlan / MemoryPlan / SubagentPlan / MCPPlan None (delegates to subsystem sync handlers) Pre-evaluates complete WorkspaceSyncPlan and GlobalSyncPlan strictly read-only; executes with structured result Partial failure leaves processed items intact; segmented results per subsystem Unified Coordinator (WorkspaceSyncPlan, execute_workspace_sync_plan) Fully migrated in Phase 8; eliminates stdout marker parsing for sync decisions (INV-APP-03)
cli.py::cmd_global_sync Migrated (Phase 4/5) Workspace skills/, global/AGENTS.md, agents.toml Agent runtime instruction symlinks and global skills Symlinks resolving to exact canonical paths (canonical_root / name); shared target deduplication via resolve_targets None (link-only, no baseline tracking) Read-only simulation (--dry-run); zero writes to home directory, workspace, or lock files Structured Plan/Executor validation; outermost SkillWriterLock Global Skill Plan/Executor (Phase 4) Global skills migrated in Phase 4; global instructions migrated in Phase 5
cli.py::cmd_project_sync Migrated (Phase 6) Project agent.toml, AGENTS.md, workspace skills, memory Project checkout .agents/skills/, .agents/memory/, instructions Delegates to SkillPlan, InstructionPlan, MemoryPlan within ProjectSyncBatch ~/.local/state/aikito/project-skills/ records Read-only preview ([DRY RUN CLEANUP], [DRY RUN LINK], [DRY RUN COPY]) Atomic compare-and-swap (CAS) plan preflight; rollback and crash recovery journals Project Plan/Executor Fully migrated; handles skills, instructions, and memory via unified ProjectSyncBatch
sync.py::sync_resource Retired (Phase 6) Source filesystem item, target filesystem item Target symlink or copied directory tree; unlinks stale entries is_symlink_pointing_to verifies exact canonical target path (canonical_root / name) None dry_run=True checks existence/paths and prints preview without filesystem mutation Direct filesystem operations Core Primitives (Project & Global) Retired in Phase 6. All skills, instructions, and project memory migrated to unified Target → Inspect → Plan → Execute engines; dead function removed. compat.py::safe_symlink remains active as a shared link/recovery primitive used by the new engines.
project.py::classify_project_skill_state Migrated (Phase 3) Canonical skill directory, runtime checkout skill entry, project skill state records None (pure query/classification functions, zero state mutation, no recovery pass) Exact canonical destination check via inspect_skill_target + plan_single_skill Reads ~/.local/state/aikito/project-skills/ documents via inspect_skill_target; writes nothing Purely functional / read-only Non-destructive query; exempt from recovery pass Thin Planner Wrapper (skill_plan.py) Legacy heuristic eliminated in Phase 3; delegates directly to inspect_skill_target and plan_single_skill with explicit state mapping table
project_runtime.py::Project.prepare, sync_project_path Migrated (Phase 6) Workspace config, agents.toml, project agent.toml, checkout directories Checkout instructions, skills, memory Symlink targets, copy directory comparisons None Supported via dry_run parameter in internal helpers Validates conflicts before modifying persistent resources; write failure raises ProjectPrepareConflictError Project Executor Fully migrated to unified ProjectSyncBatch (SkillPlan, InstructionPlan, MemoryPlan); legacy _resolve_project_sync_inputs helper retired in Phase 6.
mcp.py::build_mcp_plan, execute_mcp_plan, sync_mcp_configs, sync_remove_mcp_from_agents Migrated (Phase 7) Workspace mcps/*.toml, agent configuration files, .local/state/aikito/mcp-state.json Agent configuration files (chained merge blocks), .local/state/aikito/mcp-state.json, creates backup files Recorded server entries and fingerprints in .local/state/aikito/mcp-state.json .local/state/aikito/mcp-state.json (tracks applied server fingerprints per agent config) Pure build_mcp_plan() generates MCPPlan without writing files, state, backups, or locks Timestamped backups created prior to writing for non-sensitive targets; runtime rollback on write failure; atomic state promotion via temporary state file and os.replace; rollback failure retains backups with recovery_required=True Phase 7 (MCP Engine) Migrated to structured MCPPlan, MCPFilePlan, execute_mcp_plan(), same-file chained merge write-once, and unified Desired Absent removal
subagent.py::build_subagent_plan, execute_subagent_plan, sync_subagent_configs Migrated (Phase 7) Workspace subagents/<name>.md, subagents.toml, agent configuration files / subagent directories Agent subagent prompt files / configs, DSH cordis.patch.yml Aikito header banner / managed comment markers None Pure build_subagent_plan() generates SubagentPlan with physical file grouping without filesystem mutations Eligible backups created prior to write; atomic write via tempfile replace; DSH shared file merged in-memory and written once Phase 7 (Subagent Engine) Migrated to structured SubagentPlan, SubagentFilePlan, execute_subagent_plan(), and physical file aggregation. Subagent legacy PlanItem compatibility view retired in Phase 8.
adopt.py::build_adopt_plan, execute_adoption Migrated (Phase 8) Agent native configuration files, skills, MCP definitions Workspace definitions (skills/, mcps/, subagents/, projects/, config.toml) Native config presence; user approval via interactive/explicit plan Timestamped backup directory ~/.aikito/backups/adopt_<timestamp> Pure summarize_adopt_plan(plan) preview; AdoptFilePlan pre-image validation before any write; timestamped backups created Full preflight validation before any write; timestamped backups created; stale pre-image aborts with zero writes Phase 8 (Adoption Engine) Migrated to structured AdoptRequest, AdoptPlan, AdoptFilePlan, and AdoptExecutionResult (INV-ADOPT-01 through INV-ADOPT-08)
doctor.py::run_doctor, run_doctor_fixes Migrated (Phase 8) Host environment, workspace, checkouts, runtime links, orphaned configs, mcps/*.toml, .local/state/aikito/mcp-state.json Missing symlinks, repairs broken pointers (only when --fix is passed) Cross-references workspace definitions against runtime entries and MCP state Reads .local/state/aikito/mcp-state.json for drift checks; does not write state directly Read-only inspection by default; --fix required to apply changes Individual issue repairs; idempotent execution Phase 8 (Unified Diagnostics) Doctor rules updated to query unified Plan/Executor diagnostics (SubagentPlan, MCPPlan, WorkspaceSyncPlan)
Canonical Skill Mutators (add skill --from, global rm skill, bundled refresh, init refresh, SkillPlan apply) Migrated (Phase 3/4) Canonical workspace skills, bundled skills, import sources Canonical workspace/skills/<name>, state files, transaction journals Canonical workspace ownership ~/.local/state/aikito/ (writer.lock, state records, journal) --dry-run does not acquire or create writer.lock, leaves filesystem and state untouched Outermost re-entrant host writer lock (SkillWriterLock), automatic recovery pass on recovery_required Transactional Skill Engine (skill_runtime.py) All canonical skill mutating paths hold SkillWriterLock(home) at their outermost entrypoint (add.py:768/947, skill_runtime.py:1156, cli.py:291, init.py:190, skill_runtime.py:291)