Skip to content

extraction-plan.json

extraction-plan.json defines the ordered sequence in which modules should be extracted from the legacy system. It captures dependencies between modules, risk levels, duration estimates, and acceptance criteria for each phase.

{
"phases": [
{
"phase": 1,
"name": "Core Accounting",
"duration_weeks": 13,
"contexts": ["Accounts", "Tax"],
"risk": "medium",
"dependencies": [],
"acceptance": "68 parity tests passing, <5% behavior deviation"
},
{
"phase": 2,
"name": "Stock Management",
"duration_weeks": 10,
"contexts": ["Stock", "Warehouse"],
"risk": "high",
"dependencies": ["Accounts"],
"acceptance": "Stock valuation parity verified, batch/serial tracking functional"
},
{
"phase": 3,
"name": "Transaction Layer",
"duration_weeks": 8,
"contexts": ["Selling", "Buying"],
"risk": "medium",
"dependencies": ["Accounts", "Stock"],
"acceptance": "Order-to-invoice lifecycle functional with parity tests"
}
],
"sequencing": [
{
"extract": "Mode of Payment",
"before": "Payment Entry",
"reason": "No external dependencies"
},
{
"extract": "Tax Calculator",
"before": "GL Entry",
"reason": "GL depends on tax computation"
},
{
"extract": "Account Master",
"before": "Journal Entry",
"reason": "Journal Entry references account chart"
},
{
"extract": "GL Entry",
"before": "Sales Invoice",
"reason": "Invoice posting creates GL entries"
}
]
}

Each entry defines a migration phase:

FieldTypeRequiredDescription
phasenumberYesPhase sequence number (1-based)
namestringYesHuman-readable phase name
duration_weeksnumberYesEstimated duration in weeks
contextsstring[]YesBounded contexts to extract in this phase
riskstringYesRisk level: "low", "medium", "high"
dependenciesstring[]YesPhases/contexts that must be completed first
acceptancestringYesCriteria that must be met to consider this phase done

Fine-grained ordering constraints within or across phases:

FieldTypeRequiredDescription
extractstringYesModule to extract
beforestringYesModule that depends on the extracted module
reasonstringYesWhy this ordering is required

Each phase should cover one bounded concern. Guidelines:

DurationTypical Scope
2-4 weeksSingle small context (5-15 entities)
6-10 weeksSingle medium context (15-40 entities)
10-16 weeksLarge context or multiple small contexts
Risk LevelCharacteristics
LowWell-isolated module, few dependencies, strong existing tests
MediumSome cross-module dependencies, needs ACL, moderate test coverage
HighDeep framework coupling, shared controllers, many implicit dependencies

Acceptance should be measurable and specific:

  • Parity test counts with pass rates
  • Behavior deviation thresholds
  • Performance benchmarks if relevant
  • Integration test requirements

Avoid vague criteria like “migration complete” or “works correctly.”

The sequencing array captures dependency ordering at the module level. An agent checking whether it can extract a module should:

  1. Find the module in sequencing
  2. Check if all entries where this module appears in before have their extract module completed
  3. If any dependency is incomplete, the module cannot be safely extracted yet

Before extracting any module:

  1. Check extraction-plan.json for the current phase
  2. Verify all dependencies for that phase are complete
  3. Check sequencing for module-level constraints
  4. Refer to parity-tests.json for the acceptance criteria
  5. After extraction, update migration-state.json with progress