Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLI
AssigneesNone

Relationships

#641 Extension author gitignore guidance: add .swamp.yaml and CLAUDE.md to recommended excludes

Opened by josephholsten · 6/12/2026

Problem

The recommended .gitignore in the repo structure skill (references/repo/references/structure.md) covers .swamp/ secrets and .claude/, but not .swamp.yaml or CLAUDE.md. Extension authors following the skill docs will accidentally commit both files.

.swamp.yaml contains a machine-specific absolute path (written by swamp repo init) and behaves like a .git directory marker — it should be regenerated on each clone, not checked in. CLAUDE.md is agent instructions generated for the local developer environment, also not meaningful to share.

The swamp-extensions reference repo excludes both in practice, but this convention is nowhere in the published skill docs. Discovered while publishing a first extension (@josephholsten/freebsd/appjail) and comparing the resulting .gitignore against what swamp-extensions does.

Proposed Solution

Update the recommended .gitignore in references/repo/references/structure.md to:

# Swamp managed defaults
.swamp/
.swamp.yaml
.swamp-sources.yaml
CLAUDE.md
.claude/

And add a rationale row to the "Files to Never Commit" table:

Path Reason
.swamp.yaml Machine-specific absolute path; regenerated by swamp repo init
CLAUDE.md Agent instructions for local dev environment; not shareable

The same note would be useful in the extension publishing pre-push checklist in references/extension-publish/references/publishing.md.

Alternatives

Leave it undocumented and rely on authors discovering it by reading swamp-extensions. This is how the current situation arose.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

6/12/2026, 5:02:49 PM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

josephholsten commented 6/12/2026, 5:17:29 PM

Additional scope: the SWAMP_EXTENSION_REVIEW_DIR override and its effect on .gitignore guidance.

The adversarial review docs note that SWAMP_EXTENSION_REVIEW_DIR can be set to store review reports inside the repo (for CI, so reports survive across runners). When set, review files land at e.g. .swamp-review/swamp-extension-review/<hash>.json inside the working tree.

This creates a second gitignore decision that the docs don't address:

  • If SWAMP_EXTENSION_REVIEW_DIR is set intentionally for CI, the review directory should be committed — that's the whole point.
  • If it's set by accident or the author switches back to the temp-dir default, .swamp-review/ becomes untracked noise that should be gitignored.

Found this in a sibling extension repo (swamp-zfs) where .swamp-review/ exists on disk, is untracked, and the .gitignore has no entry for it — a half-state with no guidance on which way to go.

Suggested addition to the gitignore guidance: a note explaining the two cases and a recommended default (gitignore .swamp-review/ unless you're explicitly using SWAMP_EXTENSION_REVIEW_DIR for CI, in which case commit it).

Sign in to post a ripple.