Skip to content

Commit 3c5f3a1

Browse files
2-meancursoragent
andcommitted
docs: full docs audit — structure detail, stale fixes
Expand structure.md with scripts, tests, launchers, and capability checklist. Sync docs index, rename-inventory, project-prompt, research notes, and archive entry path; clarify README vs structure roles. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent cbab16d commit 3c5f3a1

8 files changed

Lines changed: 195 additions & 49 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ Guide: [docs/framework/extension-guide.md](docs/framework/extension-guide.md)
176176
└── run_graph_ablation.py thin launcher → Cora graph ablation
177177
```
178178

179-
Edit routing: [docs/structure.md](docs/structure.md)
179+
**Detailed map** (per-file trees, scripts, tests, capability checklist):
180+
[docs/structure.md](docs/structure.md). **Docs index:**
181+
[docs/README.md](docs/README.md).
180182

181183
## Documents
182184

docs/README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
# Docs Index
22

3-
Use `framework/` for current work. Use `research/` for background notes. Use `archive/` only for prior direction or migration history.
3+
Use `framework/` for current work. Use `research/` for background notes. Use
4+
`archive/` only for prior direction or migration history.
5+
6+
| Document | Role |
7+
|---|---|
8+
| [README.md](README.md) (this file) | docs index and run-path checklist |
9+
| [structure.md](structure.md) | **detailed** repo map, scripts, tests, edit routing |
10+
| [removed-materials.md](removed-materials.md) | Gate 6 removals and read-only aliases |
11+
| [../README.md](../README.md) | install, quick start, **abbreviated** repo layout |
12+
13+
Post-Gate-6 rename/cleanup is **complete** on `main` (2026-05-22). Active policy:
14+
[naming-and-compatibility.md](framework/naming-and-compatibility.md).
415

516
## Layout
617

718
```text
819
docs/
920
├── README.md this index
10-
├── structure.md where to edit code; source and config maps
21+
├── structure.md detailed repository map (files + scripts + tests)
1122
├── removed-materials.md Gate 6 removals and remaining read-only aliases
1223
├── framework/ active framework documentation
1324
│ ├── claim.md project claim and non-goals
@@ -24,11 +35,11 @@ docs/
2435
│ └── experiment-results.md how to store and cite experiment outputs
2536
├── maintenance/ gate checks and rename inventory (cleanup closed)
2637
│ ├── cleanup-status.md Gate 6 execution log (closed)
27-
│ ├── gate-6-prep.md Gate 6 checklist
28-
│ ├── rename-inventory.md legacy name inventory
38+
│ ├── gate-6-prep.md Gate 6 checklist (all done)
39+
│ ├── rename-inventory.md legacy name inventory (historical + post-Gate-6 note)
2940
│ └── last_gate_check.json latest gate-check record
3041
├── research/ literature and design notes (non-normative)
31-
└── archive/ superseded direction and migration phases
42+
└── archive/ superseded direction and migration phases (historical)
3243
```
3344

3445
## First Read
@@ -39,11 +50,12 @@ docs/
3950
| experimental design | [framework/graph_fl_experimental_design.md](framework/graph_fl_experimental_design.md) |
4051
| metric definitions | [framework/graph_fl_experimental_design_appendix.md](framework/graph_fl_experimental_design_appendix.md) |
4152
| install and run | [../README.md](../README.md) |
42-
| edit routing | [structure.md](structure.md) |
53+
| **file-level map** | [structure.md](structure.md) |
54+
| edit routing | [structure.md](structure.md) (Change Routing) |
4355
| add graph algorithm | [framework/interfaces.md](framework/interfaces.md), [framework/extension-guide.md](framework/extension-guide.md) |
4456
| prior-work proxy boundary | [framework/prior-work-mapping.md](framework/prior-work-mapping.md) |
4557
| diagnostic interpretation | [framework/diagnostics.md](framework/diagnostics.md) |
46-
| compatibility names | [framework/naming-and-compatibility.md](framework/naming-and-compatibility.md), [framework/cleanup-plan.md](framework/cleanup-plan.md) |
58+
| compatibility / removals | [framework/naming-and-compatibility.md](framework/naming-and-compatibility.md), [removed-materials.md](removed-materials.md) |
4759
| handoff prompt | [framework/project-prompt.md](framework/project-prompt.md) |
4860

4961
## Current Run Path
@@ -62,6 +74,7 @@ docs/
6274
| Area | Rule |
6375
|---|---|
6476
| `framework/` | active claim, experiment design, interface docs |
65-
| `research/` | literature review and design notes |
66-
| `archive/` | previous direction and migration phases |
67-
| root `README.md` | install, run, repository map |
77+
| `research/` | literature review and design notes; may mention legacy names historically |
78+
| `archive/` | frozen migration/previous direction; **not** current run policy |
79+
| `maintenance/` | gate inventory and closed cleanup log |
80+
| root `README.md` | install, run, abbreviated layout → detail in `structure.md` |

docs/archive/migration-phases/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This directory is now a completed migration archive. Do not treat it as the
44
default entry point for new project work. For day-to-day project execution,
55
start from the run path in the repository `README.md`, the docs index in
6-
`docs/README.md`, and the current diagnostic configs under `configs/general/diagnostic/`.
6+
`docs/README.md`, and the current diagnostic configs under `configs/vision/diagnostic/`.
77

88
## Agent Entry Point
99

docs/framework/project-prompt.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ Goal:
1313
state_store, diagnostics.
1414
- Prioritize composability, diagnostics, controls, and claim boundaries over leaderboard accuracy.
1515
16-
Naming:
17-
- Prefer canonical vision paths for new vision FL work.
18-
- Keep general paths only as compatibility wrappers or artifact/config aliases.
19-
- Treat spectral as an operator/backend word, not project identity.
16+
Naming (post-Gate-6 on main):
17+
- Package and imports: graphfl_lab (not spectral_fl).
18+
- Runners: run_vision_* (not run_general_*).
19+
- Outputs: result_vision_*, vision_suite_* (not general_* / result_general_*).
20+
- Read-only aliases only: configs/general/ JSON path, spectral_filter_strength key,
21+
spectral_filtered_* aggregation inputs, ours_spectral_filtered_* in reporting tags.
22+
- Treat spectral as operator/math naming in diagnostics, not public project identity.
2023
- Prefer graph_filtered_*, graph_filter_strength, ours_graph_filtered_*, _graph_filter_only.
2124
2225
Interfaces:

docs/maintenance/last_gate_check.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"gate": "0",
33
"pass": true,
44
"failed_checks": [],
5-
"verified_at": "2026-05-22T14:00:27.949871+00:00",
6-
"commit_sha": "09bf920d2966b8fdd368b324ae68d57985c29173"
5+
"verified_at": "2026-05-22T14:13:05.233012+00:00",
6+
"commit_sha": "cbab16d98431aa21ff843e2eec998c68a31863ba"
77
}

docs/maintenance/rename-inventory.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,27 @@ policy is in [`docs/removed-materials.md`](../removed-materials.md) and
1616
| `graphfl_lab`, `run_vision_*`, `vision_suite_*`, `graph_filter_strength` | **canonical** |
1717
| `configs/general/...`, `spectral_filter_strength`, `spectral_filtered_*` inputs | **read-only alias** only |
1818

19-
## Gate 1 Inventory Scope
20-
21-
| Pattern | Category | Current action |
22-
|---|---|---|
23-
| `spectral_fl` | package identity | Gate 3 canonical package, Gate 6 removal |
24-
| `graphfl_lab` | target package identity | planned canonical name |
25-
| `run_general_*` | old public runner | keep compatibility until Gate 6 |
26-
| `run_vision_*` | current vision runner | rewire through unified path in Gate 4b |
27-
| `run_graph_ablation.py` | Cora graph ablation runner | keep thin wrapper, rewire carefully |
28-
| `configs/general/...` | old config path | keep resolver alias until Gate 6 |
29-
| `result_general_*` | old result filename | compatibility mirror; new writes also emit `result_vision_*`; readers resolve either until Gate 6 |
30-
| `general_suite_*` | old suite artifact filename | compatibility mirror; new writes emit `vision_suite_*` first via `write_suite_summary_artifacts()` until Gate 6 |
31-
| `result_vision_*`, `vision_suite_*` | canonical output filenames | prefer in new docs, scripts, and directory listings |
32-
| `graphfl_lab/experiments/suites/vision/artifacts.py` | artifact discovery helper | canonical-first readers for plots/smoke/sweeps |
33-
| `graph_filter_strength` | canonical config/result key | prefer in new writes; JSON may still alias `spectral_filter_strength` via `config_io` |
34-
| `spectral_filter_strength` | old config/result key | JSON alias only after Gate 6 phase 2; not written to new traces |
35-
| `spectral_filtered_*` | old aggregation target/result spelling | internal migration in Gate 3, removal in Gate 6 |
36-
| `ours_spectral_filtered_*` | old suite token | keep through deprecation |
37-
| `_spectral_only`, `_speconly` | old suite suffixes | keep through deprecation |
19+
## Gate 1 Inventory Scope (historical snapshot)
20+
21+
The **Current action** column records Gate 0–1 intent. For live policy after
22+
Gate 6 + Phase 2, use the Post-Gate-6 table at the top of this file.
23+
24+
| Pattern | Category | Gate 1 action (historical) | Status on `main` now |
25+
|---|---|---|---|
26+
| `spectral_fl` | package identity | shim until Gate 6 | **removed** |
27+
| `graphfl_lab` | package identity | planned canonical | **canonical** |
28+
| `run_general_*` | old public runner | keep until Gate 6 | **removed**`run_vision_*` |
29+
| `run_vision_*` | vision runner | Gate 4b rewire | **canonical** |
30+
| `run_graph_ablation.py` | Cora ablation | thin wrapper | **canonical** |
31+
| `configs/general/...` | old config path | alias until Gate 6 | **read-only alias** |
32+
| `result_general_*` | old result filename | mirror + readers | **removed** from readers |
33+
| `general_suite_*` | old suite artifact | mirror + readers | **removed** from readers |
34+
| `result_vision_*`, `vision_suite_*` | canonical outputs | prefer in new work | **canonical** |
35+
| `graph_filter_strength` | canonical key | prefer in new writes | **canonical** |
36+
| `spectral_filter_strength` | old key | schema policy | **JSON read alias only** |
37+
| `spectral_filtered_*` | old target spelling | Gate 3/6 migration | **input alias only** |
38+
| `ours_spectral_filtered_*` | old suite token | deprecation | **reporting tags only** |
39+
| `_spectral_only`, `_speconly` | old suffixes | deprecation | parsed as legacy suffix aliases |
3840

3941
## Gate 1 Pattern Summary
4042

docs/research/framework-design-notes.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,20 @@ diagnostics and controls
3333
| Vision suite/reporting | `graphfl_lab/experiments/suites/vision/` |
3434
| Configs | `configs/vision/` |
3535

36-
Compatibility paths:
36+
Read-only compatibility (post-Gate-6; see `docs/removed-materials.md`):
3737

3838
```text
39-
run_general_*.py
40-
configs/general/...
41-
result_general_*
42-
general_suite_summary.*
43-
graphfl_lab/strategies/spectral/
39+
configs/general/... path alias → configs/vision/...
40+
spectral_filter_strength JSON key alias → graph_filter_strength
41+
spectral_filtered_* aggregation input alias → graph_filtered_*
42+
ours_spectral_filtered_* reporting result-tag pairing only
43+
```
44+
45+
Removed from active code (use canonical replacements in naming-and-compatibility.md):
46+
47+
```text
48+
run_general_*, result_general_*, general_suite_* readers
49+
graphfl_lab/strategies/spectral/ facades, spectral_fl package shim
4450
```
4551

4652
## Runtime Flow

docs/structure.md

Lines changed: 126 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Repository Structure
22

3-
Source code is organized by responsibility, not experiment name. Use the narrowest module that owns the requested change.
3+
Source code is organized by responsibility, not experiment name. Use the narrowest
4+
module that owns the requested change.
5+
6+
The root [README.md](../README.md) shows an **abbreviated** layout tree. This file
7+
is the **detailed** map: package modules, scripts, tests, configs, and which
8+
capabilities remain after Gate 6 (see [removed-materials.md](removed-materials.md)).
49

510
## Change Routing
611

@@ -55,18 +60,133 @@ graphfl_lab/
5560
│ │ ├── filtering.py Laplacian / graph filter on client matrices
5661
│ │ ├── aggregation.py weighted combine and dominance hooks
5762
│ │ ├── targets.py aggregation_target dispatch
58-
│ │ └── diagnostics.py per-round graph/control metrics
59-
│ └── baselines/ non-graph and proxy baselines
63+
│ │ ├── diagnostics.py per-round graph/control metrics
64+
│ │ ├── tracing.py round trace hooks
65+
│ │ ├── momentum.py server optimizer / FedAvgM interaction
66+
│ │ ├── config_context.py per-round config snapshot for filtering
67+
│ │ └── … round_*, ema, projection, artifact_rows, …
68+
│ └── baselines/ fedavgm, fedsim, graph_smooth, dominance_aware, …
69+
├── flower_app.py Flower App entry
70+
├── flower_runner.py subprocess / engine dispatch for experiments
71+
├── config_io.py JSON load; legacy key aliases
6072
└── experiments/
61-
├── vision/ single_run, suite, stress_grid, sweeps
62-
├── cora/ single_run, graph_ablation helpers
73+
├── vision/
74+
│ ├── single_run.py one vision experiment + result JSON
75+
│ ├── suite.py multi-variant suite orchestration
76+
│ ├── stress_grid.py stress-grid runner
77+
│ └── client_count_sweep.py client-count sweep runner
78+
├── cora/
79+
│ ├── single_run.py Cora single run
80+
│ └── graph_ablation.py graph ablation orchestration
6381
└── suites/vision/
64-
├── variants.py suite token grammar
82+
├── variants.py suite token grammar entry
83+
├── variant_core.py core variant parsing
84+
├── variant_targets.py graph_filtered target tokens
85+
├── variant_sources.py graph_source tokens
86+
├── variant_families.py family grouping for reporting
87+
├── variant_commands.py CLI flag emission per variant
88+
├── variant_suffixes.py _graph_filter_only and legacy suffixes
89+
├── variant_diagnostics.py diagnostic variant tokens
90+
├── variant_legacy.py historical token spellings (read/parse)
6591
├── artifacts.py result/suite path discovery
6692
├── reporting.py summaries, dashboard, interpretation
93+
├── summary.py suite summary row aggregation
94+
├── features.py suite feature columns for CSV/summary
95+
├── metadata.py suite-level metadata helpers
6796
└── variant_helpers.py per-variant result path resolution
6897
```
6998

99+
## Scripts Layout
100+
101+
```text
102+
scripts/
103+
├── checks/
104+
│ ├── diagnostic_suite_preflight.py suite variant sanity before long runs
105+
│ ├── result_evidence_bundle.py validate single-run result JSON bundle
106+
│ └── prior_work_proxy_parity.py prior-work proxy summary parity check
107+
├── smoke/
108+
│ └── prior_work_proxy.py short prior-work proxy smoke workflow
109+
├── reports/
110+
│ ├── plot_vision_convergence.py suite convergence plots (canonical)
111+
│ ├── generate_dashboard_mockup.py dashboard mockup from suite dir
112+
│ ├── generate_diagnostic_plots.py diagnostic plot helpers
113+
│ ├── graph_label_alignment_report.py label–graph alignment report
114+
│ └── spectral_decomposition_report.py spectral decomposition analysis (math)
115+
├── analysis/
116+
│ ├── deep_dive_vision.py per-variant deep dive (canonical)
117+
│ ├── merge_vision_fedavg_ours.py merge fedavg/ours tables
118+
│ ├── deep_dive_seed.py seed-level deep dive helper
119+
│ └── aggregate_graph_ablation.py Cora graph ablation aggregation
120+
├── dev/
121+
│ ├── run.py gate-check and dev orchestration
122+
│ ├── golden.py golden / regression helpers
123+
│ └── migrate_serialized_objects.py pickle module-path migration utility
124+
├── util/
125+
│ └── print_round_table.py print round table from result JSON
126+
└── archive/legacy-analysis/ frozen phase-1/2/3 analysis scripts (historical)
127+
```
128+
129+
Removed script names (Gate 6): `plot_general_convergence.py`, `deep_dive_general.py`,
130+
`merge_general_fedavg_ours.py` — use vision-named scripts above.
131+
132+
## Tests Layout
133+
134+
```text
135+
tests/
136+
├── structure/ import boundaries, facade thinness
137+
├── graph/ graph builders, sources, registry
138+
├── strategies/graphfl/ filtering, targets, rounds, diagnostics
139+
├── strategies/baselines/ baseline strategies
140+
├── lifecycle/ aggregation, counterfactuals, contracts
141+
├── designs/ GraphFLDesign presets
142+
├── diagnostics/ result schema and evidence
143+
├── experiments/vision/ suite variants, single-run helpers
144+
├── experiments/cora/ Cora experiment helpers
145+
├── experiments/suites/vision/ artifact discovery, reporting
146+
├── cli/ CLI parsing and choices
147+
├── clients/ Flower client behavior
148+
├── core/ config_io, package imports, runner
149+
├── scripts/ report script smoke tests
150+
├── dev/ gate-check entrypoint tests
151+
└── golden/ golden-file comparisons
152+
```
153+
154+
## Root Launchers
155+
156+
```text
157+
run_vision_experiment.py vision single run
158+
run_vision_suite.py vision suite
159+
run_vision_client_count_sweep.py client-count sweep
160+
run_vision_stress_grid.py stress grid
161+
run_graph_ablation.py Cora graph ablation
162+
run_experiment.py unified dispatcher (track argument)
163+
```
164+
165+
## Capability Checklist (post-Gate-6)
166+
167+
All rows are **present** on `main` unless marked removed. Verification:
168+
`python -m unittest discover -s tests`, `diagnostic_suite_preflight.py`.
169+
170+
| Capability | Entry / module | Status |
171+
|---|---|---|
172+
| Vision single run | `run_vision_experiment.py``experiments/vision/single_run.py` | active |
173+
| Vision suite | `run_vision_suite.py``experiments/vision/suite.py` | active |
174+
| Stress grid | `run_vision_stress_grid.py` | active |
175+
| Client-count sweep | `run_vision_client_count_sweep.py` | active |
176+
| Cora graph ablation | `run_graph_ablation.py` | active |
177+
| Graph-FL strategy | `strategies/graphfl/strategy.py` | active |
178+
| Baselines (FedAvgM, FedSim, …) | `strategies/baselines/` | active |
179+
| Graph builders / sources | `graph/builders.py`, `graph/sources/` | active |
180+
| Aggregation targets `graph_filtered_*` | `strategies/graphfl/targets.py` | active |
181+
| Legacy target JSON alias `spectral_filtered_*` | `canonical_aggregation_target()` | read-only input |
182+
| Diagnostic suite preflight | `scripts/checks/diagnostic_suite_preflight.py` | active |
183+
| Suite reporting / artifacts | `suites/vision/reporting.py`, `artifacts.py` | active |
184+
| Convergence plots | `scripts/reports/plot_vision_convergence.py` | active |
185+
| `run_general_*` launchers || **removed** |
186+
| `result_general_*` / `general_suite_*` readers || **removed** |
187+
| `spectral_fl` import shim || **removed** |
188+
| Suite launch `ours_spectral_filtered_*` || **removed** (reporting tag pairing retained) |
189+
70190
## Compatibility Facades
71191

72192
Keep these thin. Add new logic in scoped modules, then re-export only if a stable import path requires it.

0 commit comments

Comments
 (0)