What's New
Cross-Mission Memory Store (#94)
- Persistent pattern library (
.nelson/memory/patterns.json): accumulates adopt/avoid patterns from every mission - Standing order stats (
.nelson/memory/standing-order-stats.json): tracks violation frequency and correlations across missions - Pattern capture:
stand-downnow accepts--adoptand--avoidflags to record reusable patterns - Intelligence brief (
briefcommand): pre-mission command that surfaces relevant patterns, win rate, standing order hot spots, and context-matched precedents - Cross-mission analytics (
analyticscommand): focused metric queries (success-rate, standing-orders, efficiency) with text and JSON output - Index sync: running
indexbackfills the memory store for missions completed before this feature existed
Modular Architecture
- Split monolithic
nelson-data.py(2500+ lines) into 5 focused modules:nelson-data.py— thin CLI entry point (340 lines)nelson_data_utils.py— shared I/O, validation, constantsnelson_data_memory.py— cross-mission memory storenelson_data_lifecycle.py— mission lifecycle commandsnelson_data_fleet.py— fleet intelligence and analytics
- Test suite split into 3 files with shared
conftest.py
Bug Fixes
- Replaced bare
open()+try/finallylock pattern with_file_lock()context manager across all lock sites - Fixed mid-file import and replaced
time.sleepwith deterministic mission IDs in tests - Fixed duplicate record-building code in
cmd_index()that ran outside the file lock
Test Coverage
- 234 total tests (182 scripts + 52 hooks), all passing
- 21 new tests for memory store, brief, analytics, and index sync