Phase 1 — Discovery

Analyzes your XP codebase and content architecture in parallel — producing the artifact foundation every downstream migration phase depends on.

Phase 1 is where migration analysis begins. The Discovery Orchestrator analyzes your source Sitecore XP site — codebase, content architecture, templates, and layout patterns — and produces the artifact foundation that every downstream phase depends on. Nothing else can start until Discovery is complete.

Duration: ~5–15 minutes | Orchestrator: Discovery Orchestrator


What Discovery does

Discovery runs two analysis streams in parallel:

Code analysis provisions a sandbox, checks out your source codebase, and produces a full component inventory with priority ordering, dependency graph, and style system analysis.

🔵

MVC source sites

Code analysis also produces an MVC source mapping — a per-rendering join of controller → view → view model. This is the map Code Migration uses to find the .cshtml, the controller action, and the view model type for each rendering. It also detects Glass Mapper patterns and flags controller-side data-shaping logic for Phase 5.

Content analysis connects to your source XP instance and produces:

  • Full template inventory
  • Item counts (used to calculate timeouts in Phase 3)
  • SXA readiness assessment
  • Layout pattern analysis
  • Serialization module configuration for Phase 3

Once both streams complete, the Discovery Orchestrator calls a third agent — Discovery Synthesis — which consolidates everything into a structured report and passes it to the workspace as artifacts.


Before you start

  • Phase 0 — Source Setup is complete and shows all applicable prerequisites green — this is a hard prerequisite. Use migration-workflow-status to confirm.
  • Source XP connection verified (green on all four services)
  • Target SitecoreAI connection verified
  • Source and target Git connections active
  • Source site name confirmed — this is the Sitecore site name, not the repo name
  • A project created inside your workspace
⚠️

If any connector is missing or misconfigured, Discovery will surface it immediately. Use migration-get-info to check connector status and migration-set-connectors to fix it before proceeding.


How to run Discovery

  1. Open your project in Kajoo Agentic and start a new chat session
  2. Type "Start Discovery" to invoke the Discovery Orchestrator
  3. The agent confirms Phase 0 prerequisites are green
  4. Review and approve the workspace configuration — connectors, site name, repo paths
  5. Optionally provide SitecoreAI environment details (Edge Context ID, Editing Secret) — or skip for now, these are only needed before Phase 5
  6. The agent kicks off parallel code and content analysis
  7. Review the discovery report when complete
📘

A workspace can have multiple projects, and each project can have multiple chat sessions. For this recipe, one project per migration is recommended. You can open additional chat sessions within the same project to run Phase 2 and Phase 3 in parallel.


What you'll decide

DecisionWhen
Reuse existing sandbox or start freshAt the start, if a prior sandbox exists
Approve workspace configurationBefore analysis begins — connectors, site name, repo paths
Provide SitecoreAI environment detailsOptional — skip if not ready, required before Phase 5
Code resume pathIf existing code is found in the target branch (see below)
Content / SXA bootstrapIf content or SXA structure is already present in the target (see below)

Resuming previous work

Discovery detects prior work automatically so you don’t repeat completed steps.

Code resume

If existing project code is found in the target branch, the agent asks how to proceed:

  • Use this code (resume migration) — reconciles source components against what’s already migrated, builds a migration-state with completed/pending lists. Phase 2 picks up from the first pending component.
  • Start fresh on new branch — creates a new branch and scaffolds from scratch.
  • Fix config — wrong repo/branch — go back and correct the configuration before proceeding.

Content bootstrap

If content is already serialized and present in SitecoreAI, Discovery will ask you to confirm. Confirming satisfies Phase 4’s dependency on content migration — Phase 3 can be skipped.

SXA bootstrap

If the target site already has headless SXA structure, Discovery will ask you to confirm. Confirming satisfies Phase 5’s dependency on SXA conversion — Phase 4 can be skipped.


What Discovery produces

Artifacts written to your workspace at the end of Discovery. Every downstream phase reads from these.

ArtifactWhat it containsApplies to
code-discovery-reportComponent count and priority list, dependency graph, style system analysis, resolver inventoryBoth
content-discovery-reportTemplate inventory, item counts, SXA readiness assessment, layout patternsBoth
serialization-config.jsonModule definitions used by Phase 3 to set up content serializationBoth
MVC source mappingPer-rendering join of controller → view → view model; Glass Mapper pattern detectionMVC only

Discovery also establishes the workspace migration config — migration type, connector IDs, source site name, repo paths. View it anytime with migration-get-info. Update it with migration-set-connectors.


Checking progress

Call migration-workflow-status at any time to see the pipeline state — which phases are complete, in progress, or blocked, and what needs to happen next.


Troubleshooting

IssueFix
"Phase 0 prerequisites not met"Run Phase 0 first and confirm all checks are green via migration-workflow-status
"Source/target connector not configured"Use migration-set-connectors to configure, migration-get-info to verify
"Source site name validation failed"Site name ≠ repo name. Use migration-set-connectors with source.siteName to correct
Discovery artifacts required (in a later phase)Run Discovery first — all downstream phases depend on its output

What’s next

Once Discovery is complete, Phases 2 and 3 can start — and they can run in parallel since they operate on independent systems.

Start code migrationContinue to Phase 2 — Code Migration
Start content migrationContinue to Phase 3 — Content Migration
Run both in parallelOpen a second chat session within the same project for Phase 3 while Phase 2 runs