HatmanStack commited on
Commit
2b804da
·
1 Parent(s): d653c49

chore(docs): mark Phase-5 tasks complete

Browse files
docs/plans/2026-03-25-audit-streamlit-nba/Phase-5.md ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Phase 5: [DOC-ENGINEER] Documentation Fixes
2
+
3
+ ## Phase Goal
4
+
5
+ Fix all documentation drift, fill documentation gaps, and update the README to accurately reflect the current codebase state after all prior remediation phases.
6
+
7
+ **Success criteria:** README accurately describes the project structure, features, installation, and data sources. No documentation drift remains. Training script prerequisites documented.
8
+
9
+ **Estimated tokens:** ~15k
10
+
11
+ ## Prerequisites
12
+
13
+ - Phases 1-4 complete (code changes finalized)
14
+ - All tests, lint, and type checks passing
15
+
16
+ ## Tasks
17
+
18
+ ### Task 1: Fix README feature descriptions and terminology
19
+
20
+ **Goal:** Correct the "Multi-page Interface" description and replace "database" language with "CSV data source." Addresses doc audit drift findings #2 and #4.
21
+
22
+ **Files to Modify:**
23
+ - `README.md` - Update feature descriptions
24
+
25
+ **Prerequisites:** None
26
+
27
+ **Implementation Steps:**
28
+ - Find the "Multi-page Interface" description (around line 19). Update to accurately describe the two pages plus landing: e.g., "Two-page Streamlit app with a team builder and game prediction simulator, plus a landing page."
29
+ - Find "comprehensive database of historical NBA stats" (around line 21-22). Replace "database" with "dataset" or "CSV data source." E.g., "Search for players from a dataset of historical NBA stats."
30
+ - Search the entire README for other uses of "database" that imply a live database connection. Update to reflect that data comes from a local CSV file.
31
+
32
+ **Verification Checklist:**
33
+ - [x] README does not describe three distinct pages
34
+ - [x] README does not use "database" to describe the CSV data source
35
+ - [x] Feature descriptions match actual app behavior
36
+
37
+ **Testing Instructions:** Read the README and verify accuracy against the app.
38
+
39
+ **Commit Message Template:**
40
+ ```text
41
+ docs(readme): fix feature descriptions and data source terminology
42
+ ```
43
+
44
+ ---
45
+
46
+ ### Task 2: Update README project structure tree
47
+
48
+ **Goal:** Make the project structure tree match the actual file layout after all remediation changes. Addresses doc audit drift finding #3.
49
+
50
+ **Files to Modify:**
51
+ - `README.md` - Update project structure section (around lines 37-50)
52
+
53
+ **Prerequisites:** Phases 1-4 complete
54
+
55
+ **Implementation Steps:**
56
+ - Update the project structure tree to include:
57
+ - `src/config.py` and `src/__init__.py`
58
+ - `snowflake_nba.csv` (the runtime data source)
59
+ - `.github/workflows/` directory
60
+ - `.pre-commit-config.yaml` (added in Phase 4)
61
+ - `.streamlit/config.toml` (if it exists)
62
+ - Remove from the tree:
63
+ - `requirements.txt` (deleted in Phase 4)
64
+ - Any files that no longer exist after cleanup
65
+ - Do NOT include: `winner_model/` (gitignored), `debug_streamlit.py` (gitignored), `__pycache__/`, `.coverage`
66
+ - Keep the tree concise. Show top-level files and one level of `src/` subdirectories.
67
+
68
+ **Verification Checklist:**
69
+ - [x] Tree includes `src/config.py`
70
+ - [x] Tree includes `snowflake_nba.csv`
71
+ - [x] Tree does not list deleted files
72
+ - [x] Tree matches actual `ls` output
73
+
74
+ **Testing Instructions:** Run `ls -la` and compare with the documented tree.
75
+
76
+ **Commit Message Template:**
77
+ ```text
78
+ docs(readme): update project structure tree to match codebase
79
+ ```
80
+
81
+ ---
82
+
83
+ ### Task 3: Fix installation instructions
84
+
85
+ **Goal:** Update installation instructions to use `pyproject.toml` and `uv`. Remove references to deleted `requirements.txt`. Addresses doc audit stale code example #1.
86
+
87
+ **Files to Modify:**
88
+ - `README.md` - Update installation/quickstart section
89
+
90
+ **Prerequisites:** Phase 4 Task 1 (requirements files deleted)
91
+
92
+ **Implementation Steps:**
93
+ - Find the installation section (around lines 56-66).
94
+ - Replace `pip install -r requirements.txt` with `uv pip install -e ".[dev]"` for development setup, or `uv pip install -e .` for runtime only.
95
+ - Update the "Quick Start with uv" section to include dev dependency installation.
96
+ - Ensure the linting command matches CI: `ruff check src/ tests/` (not `ruff check .`). Addresses doc audit stale code example #2.
97
+
98
+ **Verification Checklist:**
99
+ - [x] No reference to `requirements.txt` in README
100
+ - [x] Installation uses `pyproject.toml` via `uv pip install`
101
+ - [x] Lint command matches CI workflow
102
+
103
+ **Testing Instructions:** Follow the installation instructions on a clean checkout and verify they work.
104
+
105
+ **Commit Message Template:**
106
+ ```text
107
+ docs(readme): update installation to use pyproject.toml and uv
108
+ ```
109
+
110
+ ---
111
+
112
+ ### Task 4: Document training script prerequisites
113
+
114
+ **Goal:** Document that `player_stats.txt` and `schedule.txt` are required by the training script. Addresses doc audit config drift #2.
115
+
116
+ **Files to Modify:**
117
+ - `README.md` - Update training script section (around line 96)
118
+
119
+ **Prerequisites:** None
120
+
121
+ **Implementation Steps:**
122
+ - Find the training script documentation section.
123
+ - Add a note that `player_stats.txt` and `schedule.txt` must exist in the project root for the training script to work.
124
+ - Mention that `winner.keras` is the output of the training script and is required at runtime.
125
+
126
+ **Verification Checklist:**
127
+ - [x] Training script prerequisites listed
128
+ - [x] `player_stats.txt` and `schedule.txt` mentioned as inputs
129
+ - [x] `winner.keras` mentioned as output
130
+
131
+ **Testing Instructions:** Read the section and verify it matches `scripts/compile_model.py` input file paths.
132
+
133
+ **Commit Message Template:**
134
+ ```text
135
+ docs(readme): document training script prerequisites
136
+ ```
137
+
138
+ ---
139
+
140
+ ### Task 5: Add data file and model path documentation
141
+
142
+ **Goal:** Document the hardcoded paths for data files and model files so developers know what to change if the project structure changes. Addresses doc audit config drift #1 and health audit finding #20 (LOW).
143
+
144
+ **Files to Modify:**
145
+ - `README.md` - Add a "Data Files" or "Configuration" section
146
+
147
+ **Prerequisites:** None
148
+
149
+ **Implementation Steps:**
150
+ - Add a brief section to the README (or expand the existing architecture section) that describes:
151
+ - `snowflake_nba.csv`: loaded by `src/database/connection.py`, path resolved relative to the module location.
152
+ - `winner.keras`: loaded by `src/ml/model.py`, path resolved relative to the module location.
153
+ - `src/config.py`: central configuration for column names, team size, difficulty presets, and logging.
154
+ - Keep it concise. Two or three sentences per file.
155
+
156
+ **Verification Checklist:**
157
+ - [x] Data file paths documented
158
+ - [x] Model file path documented
159
+ - [x] Config module mentioned
160
+
161
+ **Testing Instructions:** Read the section for accuracy.
162
+
163
+ **Commit Message Template:**
164
+ ```text
165
+ docs(readme): document data file paths and configuration
166
+ ```
167
+
168
+ ## Phase Verification
169
+
170
+ 1. Read the entire README and verify every claim matches the current codebase.
171
+ 2. Verify the project structure tree matches `ls` output.
172
+ 3. Verify installation instructions work from scratch.
173
+ 4. Run `ruff check src/ tests/` (the README-documented command) and confirm it works.
174
+ 5. No documentation drift findings remain from the doc audit.