Projects and Global Notes

Padz stores notes in two scopes: Project (a specific .padz/ directory) or
Global (user-wide).

THE TWO SCOPES
--------------

Project Scope (default when a .padz is found):
  Data stored in: <project_root>/.padz/
  Use case: Project-specific notes, TODOs, code snippets

Global Scope (-g flag, or fallback):
  Data stored in: OS data directory
    - macOS:   ~/Library/Application Support/com.padz.padz/
    - Linux:   ~/.local/share/padz/
    - Windows: C:\Users\<user>\AppData\Roaming\padz\padz\
  Use case: Cross-project notes, personal reminders, grocery lists


HOW PADZ FINDS YOUR STORE
-------------------------

Padz uses two separate discovery algorithms depending on what the command does.

Read commands (list, view, search, etc.):
  1. Start at your current directory.
  2. If the directory contains a .padz/, use it.
  3. Otherwise, move up one directory.
  4. Stop at $HOME or the filesystem root.
  5. If nothing is found, use the global store.

Write commands (create, import):
  Same as above, but with one extra step before falling back to global:
  if no .padz was found upward, padz walks up again looking for a .git
  entry — either a directory (normal repo) or a regular file (git
  worktrees and submodules leave a `.git` file pointing at the real
  gitdir). If one is found, padz auto-creates .padz/ at that git root
  and puts the new pad there. This keeps new pads scoped to their enclosing
  git project instead of silently dropping them into global.

Summary of the write fallback chain:
  .padz found upward  → use it
  else .git upward    → auto-init .padz at the git root, use it
  else                → global


EXPLICIT padz init
------------------

`padz init` is an explicit user intent and is never blocked. It creates
.padz/ in the current directory regardless of whether it is a git repo or
already sits inside another project's store. Use it any time you want a
store in a specific location; the auto-init behavior above is a convenience
only for write commands that would otherwise land in global.


NESTED REPOSITORIES
-------------------

The innermost .padz (closest to cwd) wins. Subprojects inherit the parent's
store unless they run `padz init` themselves:

  parent-repo/        (.padz)
    child-repo/       (.git, no .padz)
      your-code/

Running padz from child-repo/ uses parent-repo/.padz/. To give child-repo
its own notes: run `padz init` inside child-repo.


USING THE GLOBAL FLAG
---------------------

Add -g to any command to force global scope, even inside a project:

  padz -g list          # List global notes
  padz -g create        # Create global note
  padz -g view 1        # View global note #1

The -g flag must come BEFORE the subcommand.


SWITCHING BETWEEN SCOPES
------------------------

Project and global notes are completely separate. Use -g to access global
notes from any directory. Without -g, padz uses whichever scope discovery
resolves to.

Example workflow:
  cd ~/projects/myapp
  padz create "Fix auth bug"      # Saved to myapp/.padz/
  padz -g create "Buy groceries"  # Saved to global data dir
  padz list                       # Shows only myapp notes
  padz -g list                    # Shows only global notes


INITIALIZING PROJECT SCOPE
--------------------------

To create a project store in a specific directory:

  cd /path/to/your/repo
  padz init

This creates the .padz/ directory. You may want to add .padz/ to your
.gitignore if you don't want to share notes with collaborators.
