Files
nt8-sdk/docs/00-governance/CLEANUP_LOG.md

166 lines
4.9 KiB
Markdown

# Governance Cleanup Log
## 2026-04-05
- Established `docs/00-governance/` as canonical governance entry point.
- Added concise governance baseline documents:
- `executive_summary.md`
- `architecture.md`
- `current_status.md`
- `roadmap.md`
- `active_work.md`
- Updated onboarding guidance in `.kilocode/rules/project_context.md` to point new sessions to governance docs first.
- Reclassified `PROJECT_HANDOVER.md` and `DESIGNED_VS_IMPLEMENTED_GAP_ANALYSIS.md` as historical/contextual references, not primary truth.
- No code files modified and no file moves performed.
- Moved `docs/PHASE2_COMPLETION_REPORT.md` to `docs/archive/phase-history/PHASE2_COMPLETION_REPORT.md`.
- Added historical header + archival note block to:
- `docs/README.md`
- `PROJECT_HANDOVER.md`
- `DESIGNED_VS_IMPLEMENTED_GAP_ANALYSIS.md`
- `docs/INDEX.md`
- `docs/archive/phase-history/PHASE2_COMPLETION_REPORT.md`
- Added a softer revision note to `README.md` instead of a historical warning.
- Marked `docs/INDEX.md` historical in place because it currently misdirects navigation.
- Added follow-up debt: shared metrics vocabulary currently duplicated in `docs/02-runbooks/backtest_review_workflow.md` and `docs/02-runbooks/live_test_review_workflow.md`; later extract to shared governance doc `docs/00-governance/metrics_vocabulary.md`.
## Legacy Source Cleanup — Pass 1 (Non-Destructive)
**Date:** 2026-04-05
**Branch:** cleanup/legacy-source
**Type:** Non-destructive archive + tombstone cleanup
### Summary
Performed a conservative source cleanup to reduce ambiguity for AI agents and developers.
Focused on isolating legacy code paths and removing confirmed placeholder/tombstone artifacts without impacting the active runtime path.
---
### Actions Taken
#### 1. Legacy Orders System Archived
The `NT8.Core.Orders` namespace was explicitly marked as archived and superseded by `NT8.Core.OMS`.
Moved to:
- `src/_archive/legacy-orders/`
- `IOrderManager.cs`
- `OrderManager.cs`
- `OrderModels.cs`
Paired test moved with source:
- `tests/_archive/legacy-orders/OrderManagerTests.cs`
Rationale:
- Prevents compile/runtime confusion between legacy Orders and active OMS
- Prevents tests from referencing removed implementation paths
- Ensures AI agents do not target deprecated order management logic
---
#### 2. Placeholder Source Files Archived
Moved to:
- `src/_archive/placeholders/`
- `PlaceholderAdapter.cs`
- `PlaceholderContract.cs`
- `PlaceholderStrategy.cs`
Rationale:
- These files contain no meaningful implementation
- They create false signal for AI-assisted development
---
#### 3. Placeholder Test Files Archived
Moved to:
- `tests/_archive/placeholders/`
- `Integration_PlaceholderTests.cs`
- `Performance_PlaceholderTests.cs`
Deleted:
- `tests/NT8.Integration.Tests/UnitTest1.cs`
- `tests/NT8.Performance.Tests/UnitTest1.cs`
Rationale:
- Placeholder tests (`Assert.IsTrue(true)`) provide no coverage
- They distort test signal and can mislead analysis workflows
---
#### 4. Tombstone / Dead Files Removed
Deleted (confirmed comment-only or empty artifacts):
- `src/NT8.Adapters/Class1.cs.bak`
- `src/NT8.Contracts/Class1.cs`
- `src/NT8.Strategies/Class1.cs`
Rationale:
- Files contained no executable logic
- Safe removal reduces noise and ambiguity
---
### Deferred / Blocked Items
These files were intentionally **not modified** in this pass due to active references or ambiguity:
- `src/NT8.Adapters/Wrappers/BaseNT8StrategyWrapper.cs`
- `src/NT8.Adapters/Wrappers/SimpleORBNT8Wrapper.cs`
- `src/NT8.Core/Risk/RiskManager.cs`
- `src/NT8.Adapters/NinjaTrader/NT8Adapter.cs`
- `src/NT8.Core/Class1.cs.bak` (contains real code, not a tombstone)
Status:
- Blocked pending second cleanup pass
Reason:
- Wrapper layer has test dependencies that must be migrated or rewritten before archiving
- Some files contain real logic and require classification (active vs legacy) before removal
---
### Verification
- `verify-build.bat`: **PASS**
- All tests passing:
- Core: 393/393
- Integration: 78/78
- Performance: 10/10
No compile errors or regressions introduced.
---
### Impact
- Eliminated legacy order management ambiguity
- Reduced AI hallucination risk in source selection
- Removed non-functional placeholder code and tests
- Preserved full build and test integrity
---
### Follow-Up Actions
1. Second cleanup pass:
- Wrapper layer isolation or migration
- RiskManager classification
- NT8Adapter classification
- Resolve `Class1.cs.bak` ambiguity
2. Metrics vocabulary extraction:
- Duplicate metrics definitions exist in:
- `backtest_review_workflow.md`
- `live_test_review_workflow.md`
- Planned extraction target:
- `docs/00-governance/metrics_vocabulary.md`
3. Optional:
- Introduce `src/_archive/experimental/` if needed for future isolation
---
### Notes
- No protected runtime paths were modified
- No namespaces or interfaces were changed
- No `.csproj` files were modified
- All changes were reversible via archive structure