The feature and pattern layers turn normalized market state into evidence. They do not emit trades.
Feature Kernel
The feature kernel consumes MarketSnapshot and produces FeatureVector.
Core rules:
- feature computation is bounded by
ReferenceTime - feature definitions declare required capabilities
- missing or stale dependencies become explicit availability states
- features include provenance when useful
- schema version is surfaced downstream
Implemented Features
The current slice includes price-based features:
price_return_pct_1mprice_velocity_pct_1m
price_velocity_pct_1m uses windowed sample selection and rejects gaps that exceed the configured tolerance.
FeatureDefinition
A feature definition carries:
- feature id
- required capabilities
- safety flags
- schema version
- compute behavior
The registry is not decorative. The kernel reads required capabilities and checks the snapshot before computing.
FeatureVector
FeatureVector carries:
- feature values
- availability metadata
- provenance
- reference time
- cycle id
- schema version
The scoring layer later rejects mixed feature schema versions inside one hypothesis.
Pattern Engine
The pattern engine consumes FeatureVector and emits PatternHit[].
It owns:
- pattern availability
- evidence evaluation
- stage matching
- definition version
- definition hash
- hit id construction
It does not own long-term statistical updates. Scoring and research feedback are separate layers.
Pattern Availability
Pattern availability can be:
- eligible
- unavailable
- stale
- disabled
- retired
- cooling_down
This distinction matters. A retired pattern can still be used for historical comparison. A disabled pattern should not run live. A cooling-down pattern may be temporarily unavailable.
Evidence
Pattern evidence is structured:
- feature id
- operator
- threshold
- observed value
- feature status
Operators are typed to avoid typo-driven behavior.
Stage Matching
The engine chooses the strongest qualifying stage instead of first-match-wins. This avoids making registry order a hidden scoring rule.
Definition Hashes
PatternDefinition and PatternHit include definition hashes. If a definition changes without a version bump, the hash exposes the drift.
This is important for live-vs-replay comparisons and research reproducibility.
Current Pattern
The first implemented pattern is a price momentum bullish pattern. It exists to prove the contract, not to claim complete legacy parity with all historical pattern types.
The next pattern slice should migrate one strict legacy pattern with a parity fixture from:
/Users/home/dev/atlantis/process/move_intelligence/pattern_library.py
/Users/home/dev/atlantis/process/move_intelligence/pattern_detector.py