Skip to content

plan

fialr plan <target> [options]

Scan, classify, and produce a reorganization plan. No files are touched. Review the plan before executing.


ArgumentDescription
targetDirectory to plan for (required)
OptionDescription
-o, --output-dir PATHOutput directory for plan artifacts
--sensitivity-rules PATHPath to sensitivity.yaml (default: config/sensitivity.yaml)
--schema PATHPath to schema.yaml (default: config/schema.yaml)

plan runs three phases in sequence:

  1. Scan — inventory the target directory (same as fialr scan)
  2. Classify — assign sensitivity tiers and categories (same as fialr classify)
  3. Plan — generate a plan.csv mapping each file from its current location to a proposed destination

The planner reads schema.yaml to determine destination directories. Each file’s category (from classification) maps to a directory in the schema. The planner applies the naming convention to generate a proposed filename.

When --output-dir is specified, the plan command writes:

FileContents
plan.csvMachine-readable plan: source path, destination path, proposed name, operation type, confidence, reason
plan_preview.mdHuman-readable summary for review
manifest.jsonPre-execution file state snapshot

The planner detects and flags:

  • Naming collisions — two files that would receive the same destination name
  • Path collisions — two files that would be placed at the same destination path
  • Tier 1 restrictions — Tier 1 files are marked as manual-only and excluded from automated operations

Conflicts are reported in the plan preview. They do not prevent plan generation, but they must be resolved before execution.


To stderr:

plan ~/Documents
SCAN 847 files (2.3s)
CLASSIFY 847 files (0.1s)
PLAN 847 operations (0.3s)
────────────────────────────────────────────────────────
moves 812
renames 743
conflicts 3
tier 1 12 (manual only)
total 2.7s

Terminal window
# Generate a plan
fialr plan ~/Documents -o ./plan
# Use custom schema
fialr plan ~/Documents -o ./plan --schema ./my-schema.yaml

The generated plan_preview.md is the primary review artifact. Read it before proceeding to execution.