stricter curation track

This commit is contained in:
2026-05-07 23:45:11 -04:00
parent e12c34b8fe
commit d04e33ea06
4 changed files with 46 additions and 3 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ This file tracks all major tracks for the project. Each track has its own detail
*Link: [./tracks/source_wide_redundancy_audit_20260507/](./tracks/source_wide_redundancy_audit_20260507/)* *Link: [./tracks/source_wide_redundancy_audit_20260507/](./tracks/source_wide_redundancy_audit_20260507/)*
*Goal: Deep file-by-file audit to identify unused methods, duplicate logic, and dead code.* *Goal: Deep file-by-file audit to identify unused methods, duplicate logic, and dead code.*
4. [ ] **Track: Comprehensive Codebase Curation & Style Alignment** 4. [~] **Track: Comprehensive Codebase Curation & Style Alignment**
*Link: [./tracks/codebase_curation_20260507/](./tracks/codebase_curation_20260507/)* *Link: [./tracks/codebase_curation_20260507/](./tracks/codebase_curation_20260507/)*
*Goal: Exhaustive review of all `.py` files. Remove redundancies, eliminate unnecessary code/data/processing, and strictly align with `product-guidelines.md` and the Python style guide. Focus on performance and maintainability.* *Goal: Exhaustive review of all `.py` files. Remove redundancies, eliminate unnecessary code/data/processing, and strictly align with `product-guidelines.md` and the Python style guide. Focus on performance and maintainability.*
@@ -0,0 +1,26 @@
# Granular Review Protocol: Codebase Curation
This protocol defines the mandatory procedure for auditing and modifying files during the Phase 5 Heavy Curation. It is designed to minimize entropy and prevent regression propagation.
## 1. File-by-File Audit Cycle
For every `.py` file identified for curation:
1. **Dependency Check:** Use `derive_code_path` and `py_get_imports` to identify all upstream and downstream dependencies.
2. **State Verification:** Consult the `MUTATION_MATRIX_PHASE5.md` to identify any global state modifications performed by the file.
3. **Redundancy Identification:** Cross-reference the file against `CULLING_CANDIDATES_PHASE5.md`.
4. **Proposed Change Log:** Before editing, document the specific lines/symbols to be removed or refactored and the technical justification (e.g., "Superseded by theme_2.py").
5. **Surgical Edit:** Use the `replace` tool for targeted deletions. Avoid bulk file overwrites.
6. **Style Verification:** Immediately run `scripts/ai_style_formatter.py` on the modified file to ensure indentation and formatting standards are maintained.
## 2. Regression Guardrails
- **Functional Parity:** After every major deletion (e.g., removing a redundant module), run the associated unit tests (if any).
- **Simulation Verification:** For changes to core pipelines (AI loop, Aggregation), run at least one relevant simulation (e.g., `simulation/ping_pong.py`) to verify end-to-end behavior.
- **Human-in-the-Loop:** Significant refactors (e.g., the `aggregate.py` rework) MUST be presented to the user with a detailed diff before final commitment.
## 3. Culling Justification Standards
- **"Unused"**: Symbol has 0 project-wide references in the audit.
- **"Redundant"**: Logic exists in a superior or more modern form elsewhere (e.g., `theme.py`).
- **"Slop"**: Code that adds complexity without contributing to performance, configuration, or a specified feature.
@@ -1,7 +1,12 @@
# Implementation Plan: Comprehensive Codebase Curation & Style Alignment (codebase_curation_20260507) # Implementation Plan: Comprehensive Codebase Curation & Style Alignment (codebase_curation_20260507)
## Phase 0: Context Integration & Strategy
- [x] Task: Review all Phase 5 analysis reports in `./docs` to internalize the curation roadmap.
- [x] Task: Define a "Granular Review Protocol" for file-by-file auditing and culling.
- [x] Task: Conductor - User Manual Verification 'Curation Strategy' (Protocol in workflow.md)
## Phase 1: Automated Standardization & Audit ## Phase 1: Automated Standardization & Audit
- [ ] Task: Run `scripts/ai_style_formatter.py` and `scripts/force_1space.py` on all files in `./src` and `./simulation`. - [~] Task: Run `scripts/ai_style_formatter.py` and `scripts/force_1space.py` on all files in `./src` and `./simulation`.
- [ ] Task: Conduct an automated entropy audit to identify potential redundancy "hotspots". - [ ] Task: Conduct an automated entropy audit to identify potential redundancy "hotspots".
- [ ] Task: Conductor - User Manual Verification 'Standardization' (Protocol in workflow.md) - [ ] Task: Conductor - User Manual Verification 'Standardization' (Protocol in workflow.md)
@@ -1,7 +1,19 @@
# Specification: Comprehensive Codebase Curation & Style Alignment (codebase_curation_20260507) # Specification: Comprehensive Codebase Curation & Style Alignment (codebase_curation_20260507)
## Overview ## Overview
Aggressive pruning, optimization, and standardization of the codebase. This track uses the findings from the Code Path Analysis to trim away non-essential logic, data, and processing while strictly enforcing the project's technical integrity standards. Aggressive pruning, optimization, and standardization of the codebase. This track uses the findings from the Code Path Analysis and other Phase 5 audits to trim away non-essential logic, data, and processing while strictly enforcing the project's technical integrity standards.
## Foundational Context (MANDATORY REVIEW)
All curation efforts MUST be informed by the following Phase 5 analysis reports:
- `docs/PIPELINE_ANALYSIS_PHASE5_INIT.md`: Processing route and pipeline mapping.
- `docs/STATE_INVENTORY_PHASE5.md`: Core data structure and property inventory.
- `docs/MUTATION_MATRIX_PHASE5.md`: Thread-safe state modification and lock map.
- `docs/CULLING_CANDIDATES_PHASE5.md`: Identified redundant symbols, modules, and structures.
## Granular Care & Regression Guardrails
- **Surgical Execution:** Changes must be applied file-by-file with extreme granularity. No bulk culling without individual justification.
- **Regression Monitoring:** Continuous verification of behavioral integrity. Any unintended entropy or performance degradation must trigger an immediate halt and review.
- **Traceability:** Every removed line must be cross-referenced against the culling audit or pipeline map.
## Scope ## Scope
- **Target Files:** All `.py` files in `./src` and `./simulation`. - **Target Files:** All `.py` files in `./src` and `./simulation`.