Skip to content

bug: .gitignore blanket-ignores .dewey/ directory, preventing sources.yaml and config.yaml from being version-controlled #23

Closed

Description

@jflowers

Summary

dewey init creates a .dewey/ directory containing both shareable team configuration (sources.yaml, config.yaml) and machine-specific runtime artifacts (graph.db, dewey.log, .dewey.lock). However, the .gitignore entry is a blanket .dewey/ which ignores the entire directory, preventing teams from committing and sharing their source configuration.

The Problem

When a developer adds web sources for their project's toolstack (e.g., framework docs, stdlib reference), those additions live in sources.yaml — but the file can't be committed because the entire .dewey/ directory is gitignored. The same applies to config.yaml (embedding model, endpoint).

This means:

  • Team members don't benefit from each other's source configuration
  • New team members start with the bare uf init defaults instead of the team's curated config
  • The "user-owned after creation" ownership model loses value if the config can't be shared

What's in .dewey/

File Should track? Rationale
sources.yaml Yes Team-shared config. Defines what the swarm indexes. Uses relative paths (../) that work across the team if they share a directory layout.
config.yaml Probably yes Embedding model and endpoint config. The model (granite-embedding:30m) is a team standard.
graph.db / graph.db-shm / graph.db-wal No SQLite database. Machine-specific, large (~24MB), regenerated by dewey index.
dewey.log No Runtime log file.
.dewey.lock No Process lock file.

Proposed Fix

Change the generated .gitignore pattern from:

.dewey/

to:

.dewey/graph.db
.dewey/graph.db-shm
.dewey/graph.db-wal
.dewey/dewey.log
.dewey/.dewey.lock
.dewey/cache/

This tracks sources.yaml and config.yaml while ignoring runtime artifacts.

Where the fix lives

The .gitignore entry may be generated by:

  1. dewey init itself — if Dewey writes to .gitignore
  2. uf init scaffold — if the scaffold engine adds the entry
  3. Neither (manually added by users following docs)

The fix should be in whichever tool generates the entry. If both do, both should be updated.

Counterargument

One argument for ignoring sources.yaml: the auto-generated config contains relative paths to sibling repos (../dewey, ../gaze). If a team member has a different directory layout, the paths won't match. However:

  • uf init auto-detection already handles this — it generates a config based on what it finds locally
  • The ownership model says "user-owned after creation" — uf init won't overwrite a tracked file with >1 source entry
  • Most teams using an org-folder layout will have the same sibling structure

/cc @marcusburghardt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions