Legacy Atlantis is the behavioral reference, not the new module layout.
The rewrite should extract durable logic from:
/Users/home/dev/atlantis
and place it behind instrument-agnostic contracts.
Migration Principle
Extract behavior, not file structure.
When a legacy function mixes core domain logic with venue lookup, persistence, live process state, and dashboard shaping, split those concerns instead of moving the function wholesale.
Current Legacy Parity Fixture
The first parity fixture targets outcome labels from:
/Users/home/dev/atlantis/process/execution/lifecycle/outcome_record.py
It proves that AtlantisV2 preserves these legacy semantics:
winneris path-based target hit behaviorloseris path-based stop hit behaviorexpiredcan still be economically profitablescratchis not an economic outcome even if a return field is presentoption_return_pct > 0drives economic profitability when an economic outcome exists
Why Outcome Parity First
Outcome semantics are foundational for research.
If path labels and economic labels collapse into one field, then:
- win rate becomes misleading
- time-stop profitable trades are incorrectly penalized
- pattern feedback learns from the wrong denominator
- live and research drift
This was a known legacy lesson and is now encoded in tests.
Migration Workflow
Every extraction should follow this sequence:
- Locate the legacy source behavior.
- Classify what belongs to core, adapter, persistence, runtime, or presentation.
- Define the smallest new contract.
- Write a failing test or parity fixture.
- Implement the thin slice.
- Run verification.
- Update task logs and durable lessons.
Legacy Source Map
| Behavior | Legacy starting point | New home |
|---|---|---|
| Feature extraction | process/move_intelligence/feature_engine.py | feature kernel and capability definitions |
| Pattern definitions | process/move_intelligence/pattern_library.py | pattern registry and definitions |
| Pattern detection | process/move_intelligence/pattern_detector.py | pattern engine |
| Signal generation | process/move_intelligence/signal_generator.py | signal intent engine |
| Permission | process/move_intelligence/trade_permission.py | permission engine |
| Lifecycle | process/execution/lifecycle/position_lifecycle.py | lifecycle engine and transitions |
| Outcomes | process/move_intelligence/outcome_tracker.py and execution/lifecycle/outcome_record.py | outcome records and research labels |
| Delta data | process/move_intelligence/delta_greeks_loader.py | market data adapters and capability blocks |
Expected Differences
Some differences are intentional:
- Core uses typed enums instead of string bags.
- Core uses capability blocks instead of hardcoded snapshot fields.
- Core uses
EventEnvelopeinstead of venue payload dictionaries. - Core records explicit availability instead of default numeric values.
- Core separates
SignalIntentfrom expression. - Core uses
MarkRecordfor observations andLifecycleTransitionfor state changes.
When a difference fixes a known legacy bug or coupling, document it in the parity test or migration notes.
Next Parity Targets
Good next slices:
- one strict legacy pattern from
pattern_library.py - permission status and reason parity for a narrow TPE scenario
- feature parity for price velocity, VWAP distance, volume z-score, OI velocity, or realized volatility
- signal identity and direction parity around legacy
EntrySignal