Skip to main content

Semantic identity for filesystem folders — folders become conversation partners

Project description

folder-nature

Folders are not containers. They're ecosystems with collective memory, personality, and rules.

A directory becomes a conversation partner: it has identity, purpose, rules, and history, all captured in a hidden .folder-nature YAML file at the directory's root.

What problem this solves

Filesystems don't carry meaning. ~/Projects/old_v3_final/ could be anything. Search-by-filename doesn't help when you can't remember the filename. New team members start from zero. AI assistants scan everything.

folder-nature attaches a small piece of YAML to each directory that captures:

  • What this folder is for
  • What kind of folder it is (workspace, archive, configs, ...)
  • What tags apply
  • What rules govern it
  • When it was created and what notable things happened

Once attached, you can search by meaning, walk up to find the boss folder, validate the tree, and let AI tools query a folder's intent before they interact with its contents.

Install

pip install git+https://github.com/myfjin/folder-nature.git

Requires Python 3.10+. Single runtime dependency: PyYAML.

PyPI release planned for late July 2026. Once published, install will simplify to pip install folder-nature.

5-minute tour

# Create something to tag
mkdir demo && cd demo
mkdir -p Old_Stuff RANDOM new_new_final download untitled_folder

# Tag the root
folder-nature init . --template workspace --name "demo-workspace"

# Show what got created
folder-nature show .

# Reorganize + tag the new structure
mkdir -p projects/{active,archive} clients/{acme,startup-x} documents
folder-nature init projects/active --template workspace
folder-nature init projects/archive --template archive
folder-nature init clients --template client-project --name "my-clients"
folder-nature init documents --template documentation

# Search by meaning
folder-nature search . --tag client
folder-nature search . --being collector

# Validate the tree
folder-nature validate .

# Tree view
folder-nature list .

Templates (init --template)

Five archetypes ship with the package:

Template When to use
workspace Active project working directory
client-project Client-specific work folder
archive Historical / inactive storage
deployment Production-touching configs and scripts
documentation Docs, references, guides

Customize at init time with --name "your-name" or edit the resulting .folder-nature file directly afterward.

Commands

Command What it does
folder-nature init [PATH] [--template T] Create a new .folder-nature
folder-nature show [PATH] Print closest .folder-nature (walks up)
folder-nature query [PATH] Find the director: true ancestor
folder-nature search [ROOT] [--tag T] [--being B] [--name N] Filter folders by criteria
folder-nature validate [ROOT] Schema-check all .folder-nature files in tree
folder-nature list [ROOT] Tree view of every tagged folder
folder-nature version Print tool + schema versions

PATH and ROOT default to the current directory.

Schema v1.0

A .folder-nature file is YAML with this shape:

schema_version: "1.0"             # REQUIRED

identity:                         # REQUIRED
  name: "Projects"
  being: "director"
  purpose: "Canonical root for all work"

director: true                    # OPTIONAL (default false)

tags:                             # OPTIONAL
  - work
  - canonical
  - active

rules:                            # OPTIONAL
  - "Only deployed code lives here"

memory:                           # OPTIONAL
  created: "2026-05-09"
  last_significant_change: "2026-06-22"
  notable_events:
    - "2026-05-09: initial setup"

The identity.being field accepts a controlled vocabulary plus arbitrary custom values (extensibility hatch). Known types:

director · collector · workspace · assets · configs · documentation · ideas · external · legal · team-shared · private · system

Design principles

  1. Files, not databases. Each folder owns its own YAML. Git-friendly, editor-friendly, no central store.
  2. Self-hosted. Runs entirely local. No network calls. No telemetry.
  3. Schema-versioned. Future schema bumps migrate cleanly.
  4. AI-readable. Optional integration with LLM assistants — they query the folder's nature before interacting with its contents.
  5. Open from day one. MIT licensed. Code reviewable. Schema documented.

Roadmap

  • v0.1 (this release): core MVP — schema, CLI, 5 templates, tests
  • v0.2: export/import, migration tool, more templates
  • v1.0: AI integration (folder-nature ai-suggest), filesystem watcher, comprehensive docs

License

MIT. See LICENSE.

Development

git clone https://github.com/myfjin/folder-nature
cd folder-nature
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest

Test suite: 66 tests covering schema validation, filesystem operations, search, and CLI integration. Should run in <1 second.

Origin

folder-nature emerged from internal infrastructure work in early 2026 — a working hypothesis that filesystems become more useful when directories carry semantic identity. The concept proved itself on a 3-node operational mesh before being extracted as this standalone tool.

🐍🦅💎

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

folder_nature-0.1.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

folder_nature-0.1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file folder_nature-0.1.0.tar.gz.

File metadata

  • Download URL: folder_nature-0.1.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for folder_nature-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46026e84eb9a794d844c47a696ee9ce16843586f3bd15fd204d00bc67acd2400
MD5 6a573fc98e446b621878d2920be3f70f
BLAKE2b-256 06d01a1509ac49d88d053f275494482394dfb9dceaa55c7839729b80e5ade393

See more details on using hashes here.

File details

Details for the file folder_nature-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: folder_nature-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for folder_nature-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19bf5aa1ca65902bb7bd2042beb74409f507bd6904f7bafaedb1b5e3ca350e12
MD5 a27f7413deaf0688a0d252c7f2435658
BLAKE2b-256 75317bda965300bb0d18baab05f025d34aec2d14fb36d321b475a25cfe9b2847

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page