Skip to content

Directory Schema

The directory schema (config/schema.yaml) defines the target structure for an organized corpus. The planner reads it to determine destination paths. The schema is a versioned document — changes require a version bump and must be committed to version control before any files move.

The default schema defines five primary categories and four operational directories:

corpus/
├── 01_work/
├── 02_personal/
├── 03_reference/
├── 04_creative/
├── 05_archive/
├── _inbox/
├── _unsorted/
├── _dupes/
└── _pre-org/

Numeric prefixes force lexicographic sort order in file browsers and terminal listings. Underscore-prefixed directories are operational — they separate staging from content and sort to the top.


Each category in the schema defines a purpose, subdirectories, default sensitivity tier, and retention policy. The full default schema includes these categories:

CategoryDescriptionDefault TierSubdirectories
workProfessional and employment documents2projects, writing, presentations, reports, correspondence
financialTax returns, invoices, receipts, statements2tax, invoices, receipts, statements, budgets, investments, banking
legalContracts, agreements, NDAs2contracts, agreements, correspondence, court, property
medicalMedical records, prescriptions, lab results1records, insurance, prescriptions, lab-results
personalIdentity documents, certificates1identity, certificates, correspondence, education, household, family
mediaPhotos, videos, audio files3photos, videos, audio, screenshots
creativeCreative writing, design files3writing, design, projects
technicalDocumentation, specs, manuals3documentation, specs, manuals, guides, datasheets
referenceResearch, articles, standards3research, articles, standards, vendor, bookmarks
correspondenceEmail exports, letters, memos2email, letters, memos
archiveHistorical files, completed projects3
uncategorizedFiles that could not be classified3

The classifier assigns each file a category. The planner maps that category to a directory using schema.yaml’s prefix_map and structure sections.


Numeric prefixes (01_, 02_, etc.) are optional but recommended for top-level directories. They impose a stable sort order that does not depend on locale or filesystem.

Directories prefixed with _ are operational. They are managed by fialr, not by the user. They sort before numbered directories in most filesystems, which visually separates staging from content.

DirectoryPurposeBehavior
_inboxLanding zone for new files awaiting triageWatched by scheduled inventory. Files classified and routed.
_unsortedLow-confidence files fialr could not classifyRequires manual classification or schema expansion.
_dupesNon-canonical duplicate files staged for reviewPopulated by dedup. No auto-delete.
_pre-orgSnapshot of original directory structure before reorganizationCreated by organize --execute. Preserves original layout for reference.

The schema file carries a version field. The rules for changing the schema:

  1. Bump the version before any files move under the new schema
  2. Commit the schema change to version control before executing any operations against it
  3. Schema migration history is tracked in the schema_meta table in SQLite

This ensures that the schema version at any point in history is recoverable, and that no files are moved under an uncommitted schema.


fialr uses a four-layer exclusion system. Layers are evaluated in order; the first match excludes the file.

These directories are excluded unconditionally. No configuration can include them.

ExclusionReason
.git/Version control internals
node_modules/Package dependencies
.venv/Python virtual environment
__pycache__/Python bytecode cache
.ssh/SSH keys
.gnupg/GPG keys
.Trash/macOS trash
.Spotlight-V100/macOS search index
.fseventsd/macOS filesystem events
.DS_StoremacOS directory metadata
$RECYCLE.BIN/Windows recycle bin
System Volume Information/Windows system
Project rootsDetected by sentinel files

Project roots are detected by the presence of sentinel files: .git, package.json, Cargo.toml, go.mod, pyproject.toml, Makefile, CMakeLists.txt, .project, pom.xml, build.gradle.

Explicit paths listed in fialr.toml under [exclusions].directories:

[exclusions]
directories = ["backups/old", "vendor/legacy"]

Glob patterns listed in fialr.toml under [exclusions].patterns:

[exclusions]
patterns = ["*.tmp", "*.log", "~$*"]

Individual files or directories can be excluded by:

  • Setting the com.fialr.exclude extended attribute (macOS) or user.fialr.exclude (Linux):
Terminal window
xattr -w com.fialr.exclude true ~/Documents/skip-this-file.pdf
  • Placing a .fialr-exclude sentinel file in a directory:
Terminal window
touch ~/Documents/vendor-assets/.fialr-exclude

Any directory containing .fialr-exclude is excluded along with all its contents.


Every excluded file is recorded in the manifest with:

  • The file path
  • The exclusion reason
  • The layer that triggered the exclusion (hardcoded, config_dir, config_pattern, sentinel)

Nothing is silently skipped. The exclusion record is available in manifest.json and in the job report.