Parent spec: INTENT_PROMPT.md (Project FORGE)
Status: FORGE was declared complete and merged to main. However, an audit on 2026-03-10 found several items from the original spec that were not completed during the FORGE execution waves.
Validation command (unchanged):
rust-script scripts/verify_parity.rs /Users/rnio/uffs_data D --regenerateOriginal spec reference: INTENT_PROMPT.md § "Root Directory & Repo Structure Cleanup" and § "Dead Weight in the Workspace"
What FORGE said: Remove vendor/ entirely or move to .gitignore-d location. Vendor patches are disabled in Cargo.toml (commented out [patch.crates-io]).
Current state: vendor/ still exists with 5 subdirectories:
vendor/errno/vendor/fs4/vendor/mft-reader-rs/vendor/stacker/vendor/winapi-util/
The [patch.crates-io] section in root Cargo.toml is already commented out (lines 534-538), confirming these are dead.
Steps:
- Copy the entire
vendor/directory to_trash/vendor/for local reference:cp -r vendor/ _trash/vendor/
- Remove
vendor/from git tracking:git rm -r vendor/
- Verify the workspace
excludelist inCargo.tomlline 32 still referencesvendor/mft-reader-rs— remove that exclude entry since the directory is gone:# BEFORE exclude = [ "vendor/mft-reader-rs", ] # AFTER exclude = []
- Remove the commented-out
[patch.crates-io]block at lines 526-538 ofCargo.toml(it references vendor paths that no longer exist). - Verify build still works:
cargo check --workspace --all-targets
- Commit:
forge-followup: remove dead vendor/ directory
Risk: None — patches are already disabled.
Original spec reference: INTENT_PROMPT_V2.md § "Workspace Structure — Dead Weight & Placeholder Crates"
What FORGE/ANVIL said: uffs-gui is a 159-line placeholder that prints a banner and exits. It should NOT be a workspace member — it pulls uffs-polars, uffs-mft, uffs-core as dependencies for zero functionality.
Current state: uffs-gui is still listed in Cargo.toml line 27:
"crates/uffs-gui", # 🪟 Graphical UI (future)Steps:
- Move
"crates/uffs-gui"frommemberstoexcludein rootCargo.toml:# In [workspace] exclude = [ "crates/uffs-gui", ]
- Remove the line from
members(line 27). - Verify workspace builds:
cargo check --workspace --all-targets
- Commit:
forge-followup: exclude uffs-gui placeholder from workspace
Risk: None — uffs-gui has zero functionality and no other crate depends on it.
Original spec reference: INTENT_PROMPT.md § "Documentation Sprawl" — listed 17 C++ files to move to _trash/.
Current state: Most were moved, but these remain:
docs/CPP_MFT_EXTENT_DIAGNOSTIC_TOOL_SPEC.md
cpp_tree_improved_1.rscpp_tree_improved_2.rscpp_tree_improved_3.rscpp_tree_improved_4.rscpp_tree_org.rsindex_improved_1.rsindex_improved_2.rsindex_improved_3.rsindex_improved_4.rsindex_org.rs
Steps:
- Copy each file to
_trash/preserving directory structure:mkdir -p _trash/docs/trial_runs/old_code_currently_not_used cp docs/CPP_MFT_EXTENT_DIAGNOSTIC_TOOL_SPEC.md _trash/docs/ cp docs/trial_runs/old_code_currently_not_used/*.rs _trash/docs/trial_runs/old_code_currently_not_used/ - Remove from git:
git rm docs/CPP_MFT_EXTENT_DIAGNOSTIC_TOOL_SPEC.md git rm -r docs/trial_runs/old_code_currently_not_used/
- If
docs/trial_runs/is now empty, remove it:rmdir docs/trial_runs/ 2>/dev/null # only if empty
- Commit:
forge-followup: archive remaining C++ doc remnants to _trash/
Risk: None — these are historical reference files with no code dependencies.
Original spec reference: INTENT_PROMPT.md § "Documentation Sprawl" — target structure was:
docs/
├── architecture/ — ADRs, design decisions, module diagrams
├── dev/ — Developer guides (build, test, CI, cross-compile)
├── user/ — End-user guides (CLI usage, TUI, installation)
├── performance/ — Benchmarks, optimization notes, profiling
└── reference/ — NTFS/MFT technical reference (protocol-level docs)
Current state — problems:
-
docs/Augment Instructions/— Space in dirname (bad practice). Contains 1 file.- Rename to
docs/augment-instructions/or move contents todocs/dev/
mv "docs/Augment Instructions" docs/augment-instructions - Rename to
-
docs/profiles/— Empty directory. Delete:git rm -r docs/profiles/ # or just rmdir if untracked -
docs/Competition/— 6 files about competitor analysis. Move to_trash/docs/Competition/:cp -r docs/Competition/ _trash/docs/Competition/ git rm -r docs/Competition/
-
docs/PHASE7_*.md(4 files) — Investigation artifacts, not documentation:docs/PHASE7_MAC_INSTRUCTIONS.mddocs/PHASE7_PERFORMANCE_ANALYSIS.mddocs/PHASE7_QUICK_START.mddocs/PHASE7_WINDOWS_TESTING.md
Move to
_trash/:cp docs/PHASE7_*.md _trash/docs/ git rm docs/PHASE7_*.md
-
Loose files at
docs/root — Evaluate each and move to appropriate subdirectory or_trash/:docs/CLI_FEATURE_PARITY.md→docs/dev/docs/CROSS_PLATFORM_RAW_MFT_LOADING.md→docs/dev/docs/IMPLEMENTATION_PLAN.md→_trash/docs/(superseded by FORGE/ANVIL)docs/MFTINDEX_OPTIMIZATION_PLAN.md→docs/performance/docs/MFT_FEATURE_PARITY.md→docs/dev/docs/MFT_INVESTIGATION_F_DRIVE.md→_trash/docs/(investigation note)docs/MILESTONES.md→docs/dev/docs/UFFS_PERFORMANCE_OPTIMIZATION_PHASE2.md→docs/performance/docs/uffs-mft-optimization-plan.md→docs/performance/docs/uffs_mft_optimization_plan_review.md→docs/performance/docs/windows_profiling_to_mac_plan.md→docs/dev/docs/xwin-msvc-rlib-size-root-cause-and-workarounds.md→docs/dev/
-
Commit:
forge-followup: reorganize docs/ into target structure
Risk: Low — file moves only, no code changes.
Original spec reference: INTENT_PROMPT.md § "Toolchain & Dependency Hygiene" and INTENT_PROMPT_V2.md § "Dependency Modernization"
Current state: num_cpus is used in these locations:
crates/uffs-mft/src/io/readers/parallel/to_index_parallel.rs:83—num_cpus::get()crates/uffs-mft/src/commands/windows/bench.rs:391—num_cpus::get()crates/uffs-mft/benches/mft_read.rs:23—use num_cpus as _;(unused dep marker)crates/uffs-mft/src/lib.rs:84—num_cpus as _,(unused dep marker)crates/uffs-mft/src/main.rs:74—use {... num_cpus as _};crates/uffs-mft/src/reader.rs:174,387— doc comments referencingnum_cpus
Steps:
-
In each file where
num_cpus::get()is called, replace with:std::thread::available_parallelism() .map_or(4, std::num::NonZero::get)
The
map_or(4, ...)fallback handles the rare case where the OS can't determine CPU count. -
Remove the
use num_cpus as _;lines fromlib.rs,main.rs, andbenches/mft_read.rs. -
Remove
num_cpusfromcrates/uffs-mft/Cargo.tomldependencies. -
Remove
num_cpusfrom workspace[workspace.dependencies]in rootCargo.toml(line 146). -
Update doc comments in
reader.rsthat say "num_cpus" to say "available CPU count". -
Verify:
cargo check -p uffs-mft --all-targets cargo test -p uffs-mft --lib -- --nocapture -
Commit:
forge-followup: replace num_cpus with std::thread::available_parallelism()
Risk: Low — available_parallelism() is stable since Rust 1.59, and UFFS requires 1.85+.
Original spec reference: INTENT_PROMPT.md § "Monolithic Files" and INTENT_PROMPT_V2.md § "JUSTFILE — 2,450 Lines, Monolithic"
Current state: justfile is 2,450 lines — a single monolithic file.
Steps:
- Create a
just/directory at repo root. - Split the justfile into logical modules using
just'simportormodfeature:just/ ├── build.just — Build recipes (build, release, dist, cross-compile) ├── test.just — Test recipes (test, nextest, coverage, fuzz) ├── lint.just — Lint recipes (fmt, clippy, doc) ├── ci.just — CI pipeline recipes ├── dev.just — Dev workflow recipes (go, watch, clean) └── windows.just — Windows-specific recipes - Keep the root
justfileas a thin orchestrator that imports modules:import 'just/build.just' import 'just/test.just' import 'just/lint.just' import 'just/ci.just' import 'just/dev.just' import 'just/windows.just' # Core workflow default: go
- Remove dead/obsolete recipes during the split.
- Target: root
justfile≤50 lines, each module ≤300 lines. - Verify
just gostill works (this is the developer's primary workflow). - Commit:
forge-followup: decompose justfile into modular imports
Risk: Medium — just module imports are relatively new. Test that all recipes resolve correctly. The just --list command should still show all available recipes.
Original spec reference: INTENT_PROMPT.md § "Root Directory & Repo Structure Cleanup" — target:
scripts/
├── ci/ — CI pipeline scripts
├── dev/ — Developer utility scripts
└── windows/ — Windows-specific scripts (.ps1 files)
Current state: All scripts are flat in scripts/.
Steps:
- List all scripts and categorize:
ls scripts/
- Create subdirectories:
mkdir -p scripts/ci scripts/dev scripts/windows
- Move scripts to appropriate locations. Examples:
scripts/ci-pipeline.rs→scripts/ci/scripts/build-cross-all.rs,scripts/build-local.rs→scripts/ci/scripts/condense*.rs→scripts/dev/scripts/*.ps1→scripts/windows/scripts/check_file_size_policy.sh→scripts/ci/scripts/verify_parity.rs→ Keep atscripts/verify_parity.rs(stability anchor per spec)
- Update any references in
justfile, CI workflows, or docs that point to moved scripts. - Verify:
rust-script scripts/verify_parity.rs /Users/rnio/uffs_data D --regenerate
- Commit:
forge-followup: reorganize scripts/ into ci/dev/windows structure
Risk: Medium — must update all references to moved scripts. Search for script paths in:
justfile.github/workflows/*.ymlCLAUDE.mddocs/**/*.md
After completing all F-A through F-G tasks, run:
# Structural checks
test ! -d vendor # F-A: vendor/ gone
! grep -q 'uffs-gui' Cargo.toml | grep members # F-B: uffs-gui excluded
test ! -f docs/CPP_MFT_EXTENT_DIAGNOSTIC_TOOL_SPEC.md # F-C: C++ doc gone
test ! -d "docs/Augment Instructions" # F-D: space-dirname gone
test ! -d docs/profiles # F-D: empty dir gone
! grep -q 'num_cpus' Cargo.toml # F-E: num_cpus removed
wc -l justfile | awk '$1 < 100' # F-F: justfile thin
test -d scripts/ci # F-G: scripts reorganized
# Full validation
cargo check --workspace --all-targets
cargo test --workspace --lib --bins --tests
rust-script scripts/verify_parity.rs /Users/rnio/uffs_data D --regenerate