Skip to main content
← Back to list
01Issue
FeatureClosedSwamp Club
AssigneesNone

Include models/ and vaults/ symlink dirs in managed .gitignore section

Opened by swampadmin · 11/6/2024

Problem

When swamp manages a .gitignore section (via swamp repo init --include-gitignore or swamp repo upgrade --include-gitignore), the generated section does not include the top-level models/ and vaults/ directories.

These directories are auto-generated repo index symlinks — convenience views that point back into .swamp/definitions/ and .swamp/vault/. They are regenerated by swamp automatically (e.g., via swamp repo rebuild-index) and are not user-authored content.

Because they aren't ignored by default, they show up as untracked files and can accidentally get committed, adding noise to the repo and causing confusion about what is source-of-truth vs derived.

Proposed Solution

Add models/ and vaults/ to the managed gitignore section body in repo_service.tsgenerateGitignoreSectionBody():

# Repo index symlinks (regenerated by swamp)
models/
vaults/

This would make the full managed section:

# BEGIN swamp managed section - DO NOT EDIT

# Local telemetry (not needed for reconstruction)
.swamp/telemetry/

# Encryption keyfile (NEVER commit - allows decrypting secrets)
.swamp/secrets/keyfile

# Cached extension bundles (regenerated at runtime)
.swamp/bundles/

# Repo index symlinks (regenerated by swamp)
models/
vaults/

# Claude Code configuration (managed by swamp)
.claude/

# END swamp managed section

Scope

  • src/domain/repo/repo_service.ts — update generateGitignoreSectionBody() to add the two entries
  • src/domain/repo/repo_service_test.ts — update any snapshot/assertion tests for the gitignore section content

Alternatives Considered

  • Users can add these outside the managed section manually (current workaround), but this is easy to labt and defeats the purpose of managed gitignore.
  • Ignoring the entire .swamp/ directory would be too broad — definitions, vault configs, and extensions should be tracked.
02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.