REPOSITORY CONFIGURATION
The .swamp.yaml file is the repository-level configuration for swamp. It lives
at the root of the repository and is created by swamp repo init. It is tracked
in version control.
swampVersion: 20260430.202457.0
initializedAt: "2026-04-30T20:45:49.030Z"
repoId: 94735c06-fc0a-4d77-b712-04fbd801b18d
tools:
- claude
gitignoreManaged: trueTop-Level Fields
swampVersion
Version of swamp that created or last upgraded this repository.
| Property | Value |
|---|---|
| Type | string |
| Required | Yes |
| Default | Set to the current CLI version on init |
| Format | CalVer YYYYMMDD.HHMMSS.PATCH (e.g., 20260407.173244.0) |
Updated to the new CLI version on swamp repo upgrade.
initializedAt
Timestamp when the repository was first initialized.
| Property | Value |
|---|---|
| Type | string (ISO 8601) |
| Required | Yes |
| Default | Set to current time on init |
| Format | YYYY-MM-DDTHH:MM:SS.sssZ |
Never changes after initial creation. Preserved across upgrades.
upgradedAt
Timestamp of the most recent upgrade.
| Property | Value |
|---|---|
| Type | string (ISO 8601) |
| Required | No |
| Default | Not set on init |
| Format | YYYY-MM-DDTHH:MM:SS.sssZ |
Only present after swamp repo upgrade has been run at least once.
repoId
Unique identifier for the repository.
| Property | Value |
|---|---|
| Type | string (UUID v4) |
| Required | No (auto-generated) |
| Default | Generated on init |
| Format | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
Used for telemetry identification and extension installation tracking. If
missing from an older .swamp.yaml, auto-generated on the next CLI invocation
and persisted.
tools
AI coding tools to configure skills and instructions for.
| Property | Value |
|---|---|
| Type | string[] |
| Required | No |
| Default | [claude] |
| Values | claude, cursor, opencode, codex, copilot, kiro, none |
Each entry must be one of the listed values. The first entry is the primary tool — operations that target a single tool (audit recording, extension skills resolution, doctor checks) use it. Order is preserved on upgrade; appending a tool keeps the existing primary stable.
Controls which tool-specific files are created and maintained:
| Tool | Instructions file | Skills directory | Settings |
|---|---|---|---|
claude |
CLAUDE.md |
.claude/skills/ |
.claude/settings.json |
cursor |
.cursor/rules/swamp.mdc |
.cursor/skills/ |
.cursor/settings.json |
opencode |
AGENTS.md |
.agents/skills/ |
.opencode/plugins/swamp-audit.ts |
codex |
AGENTS.md |
.agents/skills/ |
— |
copilot |
AGENTS.md |
.agents/skills/ |
— |
kiro |
.kiro/steering/swamp-rules.md |
.kiro/skills/ |
.vscode/settings.local.json, .kiro/hooks/, .kiro/agents/swamp.json |
none |
— | — | — |
When tools contains multiple entries, each tool's scaffolding is written
independently and lives alongside the others.
A tools value of [none] (or an empty list, written as tools: []) skips
skill copying, instructions file creation, and tool-specific .gitignore
entries.
Removing a tool from tools is non-destructive: the on-disk scaffolding
(.claude/, .kiro/, etc.) remains in place for the user to delete by hand.
tool (legacy)
Single-tool field from earlier swamp versions.
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Status | Migrated |
A marker that contains tool: <name> is auto-promoted to tools: [<name>] on
the next marker write (typically swamp repo upgrade). The legacy tool: line
is removed from the YAML once promotion completes. Existing repositories need no
manual migration.
gitignoreManaged
Whether swamp manages a section in the .gitignore file.
| Property | Value |
|---|---|
| Type | boolean |
| Required | No |
| Default | true |
When true, swamp writes and maintains a # BEGIN swamp managed section block
in .gitignore. The managed section includes .swamp/, .swamp-sources.yaml,
and tool-specific paths for every entry in tools (e.g., .claude/ when
tools contains claude).
Always set to true on swamp repo init. On swamp repo upgrade, the existing
value is preserved unless --include-gitignore is passed.
logLevel
Minimum log level for CLI output.
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Default | info |
| Values | trace, debug, info, warning, error, fatal |
| Override | Priority |
|---|---|
SWAMP_LOG_LEVEL |
Env > config > default |
telemetryDisabled
Disables telemetry collection.
| Property | Value |
|---|---|
| Type | boolean |
| Required | No |
| Default | false |
| Override | Priority |
|---|---|
SWAMP_NO_TELEMETRY |
Env > config |
When true, no telemetry data is sent.
telemetryEndpoint
HTTP endpoint for telemetry data.
| Property | Value |
|---|---|
| Type | string (URL) |
| Required | No |
| Default | https://api.swamp.club |
When the auth server is localhost, defaults to http://localhost:3000.
telemetryKeepFlushed
Retain telemetry entries after they are sent to the remote endpoint.
| Property | Value |
|---|---|
| Type | boolean |
| Required | No |
| Default | false |
When false (or not set), telemetry entry files are deleted after a successful
flush. When true, they are renamed to .flushed.json instead of deleted.
Directory Overrides
Six fields override the default locations for extension source directories. All paths are relative to the repository root.
Each field follows the same resolution priority: environment variable >
.swamp.yaml value > default.
| Field | Environment Variable | Default |
|---|---|---|
modelsDir |
SWAMP_MODELS_DIR |
extensions/models |
workflowsDir |
SWAMP_WORKFLOWS_DIR |
extensions/workflows |
vaultsDir |
SWAMP_VAULTS_DIR |
extensions/vaults |
driversDir |
SWAMP_DRIVERS_DIR |
extensions/drivers |
datastoresDir |
SWAMP_DATASTORES_DIR |
extensions/datastores |
reportsDir |
SWAMP_REPORTS_DIR |
extensions/reports |
These directories hold extension source files loaded by swamp at runtime. They
are separate from the top-level models/, workflows/, and vaults/
directories that hold user-authored definitions.
modelsDir: custom/models
workflowsDir: custom/workflowsTrust Configuration
Two fields control which collectives are trusted for extension auto-resolution.
trustedCollectives
Explicitly trusted collective names.
| Property | Value |
|---|---|
| Type | string[] |
| Required | No |
| Default | ["swamp", "si"] |
Each name must match [a-z0-9][a-z0-9_-]*.
Managed with swamp extension trust add <collective> and
swamp extension trust rm <collective>.
trustedCollectives:
- swamp
- si
- my-collectivetrustMemberCollectives
Whether to include the authenticated user's membership collectives in the trust list.
| Property | Value |
|---|---|
| Type | boolean |
| Required | No |
| Default | true |
When true (or not set), the user's membership collectives from their auth
credentials are merged with trustedCollectives. When false, only the
explicit list is used.
Managed with swamp extension trust auto-trust enable and
swamp extension trust auto-trust disable.
$ swamp extension trust list --json{
"explicit": [
"swamp",
"si"
],
"membership": [
"adam"
],
"resolved": [
"swamp",
"si",
"adam"
],
"trustMemberCollectives": true
}Execution Driver
Two fields configure the repository-level default execution driver. Both apply only when no higher-precedence layer (CLI flag, step, job, workflow, or definition) selects a driver.
defaultDriver
Repository-level default execution driver name.
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Default | (none — falls back to the built-in raw driver) |
| Examples | raw, docker |
Resolution priority for a method or workflow run, highest precedence first:
--driverCLI flag (e.g.,swamp model method run --driver docker)- Step-level
driverfield - Job-level
driverfield - Workflow-level
driverfield - Definition-level
driverfield defaultDriverfrom.swamp.yaml- Built-in
rawdriver
defaultDriverConfig
Driver-specific configuration paired with defaultDriver.
| Property | Value |
|---|---|
| Type | Record<string, unknown> |
| Required | No |
| Default | (none) |
| Applies | When defaultDriver is set |
The configuration object is used as-is. Driver configurations are not merged across precedence levels — when a higher-precedence layer specifies a driver, its configuration replaces this one entirely.
defaultDriver: docker
defaultDriverConfig:
image: alpine:latestDatastore Configuration
The datastore field configures where swamp stores runtime data. When not set,
swamp uses the local filesystem at .swamp/ within the repository.
datastore:
type: filesystem
path: /data/swamp-storedatastore.type
Datastore backend type.
| Property | Value |
|---|---|
| Type | string |
| Required | Yes (within datastore) |
| Values | filesystem, or an extension type (e.g., @swamp/s3-datastore) |
datastore.path
Absolute path for the filesystem datastore.
| Property | Value |
|---|---|
| Type | string (absolute path) |
| Required | No |
| Default | {repo}/.swamp/ |
| Applies | filesystem type only |
datastore.bucket
S3 bucket name.
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Applies | S3-compatible types |
datastore.prefix
Key prefix within the S3 bucket.
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Applies | S3-compatible types |
datastore.region
AWS region.
| Property | Value |
|---|---|
| Type | string |
| Required | No |
| Applies | S3-compatible types |
datastore.endpoint
Custom S3-compatible endpoint URL.
| Property | Value |
|---|---|
| Type | string (URL) |
| Required | No |
| Applies | S3-compatible types |
datastore.forcePathStyle
Force path-style S3 URLs instead of virtual-hosted-style.
| Property | Value |
|---|---|
| Type | boolean |
| Required | No |
| Default | false |
| Applies | S3-compatible types |
datastore.config
Arbitrary configuration for extension-provided datastores.
| Property | Value |
|---|---|
| Type | Record<string, unknown> |
| Required | No |
| Applies | Extension types |
datastore.directories
Which .swamp/ subdirectories use this datastore. When not set, all default
directories are included.
| Property | Value |
|---|---|
| Type | string[] |
| Required | No |
Default directories:
definitions-evaluated workflows-evaluated data
outputs workflow-runs secrets
bundles vault-bundles driver-bundles
report-bundles audit telemetry
logs filesdatastore.exclude
Gitignore-style patterns for files to exclude from datastore operations.
| Property | Value |
|---|---|
| Type | string[] |
| Required | No |
$ swamp datastore status --json{
"type": "filesystem",
"path": "/home/user/my-repo/.swamp",
"healthy": true,
"message": "Filesystem datastore at /home/user/my-repo/.swamp is healthy",
"latencyMs": 0.43,
"directories": [
"definitions-evaluated",
"workflows-evaluated",
"data",
"outputs",
"workflow-runs",
"secrets",
"bundles",
"vault-bundles",
"driver-bundles",
"report-bundles",
"audit",
"telemetry",
"logs",
"files"
]
}| Override | Priority |
|---|---|
SWAMP_DATASTORE |
Env > config |
Created Directory Structure
swamp repo init creates the following directories:
my-repo/
.swamp.yaml
.gitignore
models/ # User model definitions
workflows/ # User workflow definitions
vaults/ # User vault configurations
.swamp/
audit/
data/
definitions-evaluated/
outputs/
secrets/
telemetry/
vault-bundles/
workflow-runs/
workflows-evaluated/When tools is non-empty (and not [none]), tool-specific files are created
for each entry — for example, CLAUDE.md and .claude/ for the claude tool,
.kiro/steering/swamp-rules.md and .kiro/ for the kiro tool. With multiple
tools, every tool's scaffolding is written.
Initialization
$ swamp repo init [path] [options]| Option | Description |
|---|---|
-f, --force |
Reinitialize if already exists |
-t, --tool |
AI tool to configure for. Repeat to enroll multiple tools (e.g. --tool claude --tool kiro). Duplicates are collapsed. Defaults to claude when omitted. Values: claude, cursor, opencode, codex, copilot, kiro, none. |
--tool none (alone) skips tool scaffolding. Combining --tool none with any
other --tool value is rejected:
$ swamp repo init --tool none --tool claude --json{
"error": "Cannot combine --tool none with other --tool values. Use --tool none alone to clear the enrolled tool list."
}Creates .swamp.yaml with swampVersion, initializedAt, repoId, tools,
and gitignoreManaged set. Creates the directory structure, copies tool skills
for every entry in tools, and generates each tool's instructions file.
$ swamp repo init --json{
"path": "/home/user/my-repo",
"version": "20260430.202457.0",
"initializedAt": "2026-04-30T20:45:49.030Z",
"skillsCopied": [
"swamp-data",
"swamp-data-query",
"swamp-model",
"swamp-repo",
"swamp-report",
"swamp-workflow",
"swamp-extension-model",
"swamp-extension-publish",
"swamp-vault",
"swamp-extension-vault",
"swamp-extension-datastore",
"swamp-extension-driver",
"swamp-issue",
"swamp-troubleshooting",
"swamp-getting-started",
"swamp-extension-quality"
],
"instructionsFileCreated": true,
"settingsCreated": true,
"gitignoreAction": "created",
"tools": [
"claude",
"kiro"
],
"removedTools": [],
"tool": null
}The legacy tool field in the output mirrors tools[0] when there is exactly
one entry, is null when there are multiple, and is "none" when the list is
empty.
Upgrade
$ swamp repo upgrade [path] [options]| Option | Description |
|---|---|
-t, --tool |
Replace the enrolled tool list. Repeat to enroll multiple tools (e.g. --tool claude --tool kiro). Omit to preserve the existing list. --tool none (alone) clears the list. Values: same as init. |
--include-gitignore |
Manage a swamp section in .gitignore |
--tool on upgrade has replace semantics: the value passed is the full new
list. To add kiro to a [claude] repo, run
swamp repo upgrade --tool claude --tool kiro — passing only --tool kiro
would replace the list with [kiro]. Plain swamp repo upgrade (no --tool
flag) preserves the existing list and just bumps the swamp version.
Updates swampVersion and sets upgradedAt. All other fields are preserved
unless explicitly overridden by CLI flags.
| Field | Behavior on upgrade |
|---|---|
swampVersion |
Updated to new CLI version |
upgradedAt |
Set to current timestamp |
initializedAt |
Preserved |
repoId |
Preserved |
tools |
Replaced by the value of --tool when passed, otherwise preserved |
tool (legacy) |
Auto-promoted to tools and removed from the YAML on the first upgrade |
gitignoreManaged |
Overridden if --include-gitignore is passed, otherwise preserved |
| All other fields | Preserved |
$ swamp repo upgrade --json{
"path": "/home/user/my-repo",
"previousVersion": "20260430.202457.0",
"newVersion": "20260430.202457.0",
"upgradedAt": "2026-04-30T20:45:49.925Z",
"skillsUpdated": [
"swamp-data",
"swamp-data-query",
"swamp-model",
"swamp-repo",
"swamp-report",
"swamp-workflow",
"swamp-extension-model",
"swamp-extension-publish",
"swamp-vault",
"swamp-extension-vault",
"swamp-extension-datastore",
"swamp-extension-driver",
"swamp-issue",
"swamp-troubleshooting",
"swamp-getting-started",
"swamp-extension-quality"
],
"instructionsUpdated": false,
"settingsUpdated": false,
"gitignoreAction": "updated",
"previousTools": [
"claude",
"kiro"
],
"tools": [
"kiro"
],
"addedTools": [],
"removedTools": [
"claude"
],
"extensionsToReinstall": [],
"tool": "kiro",
"extensionInstall": {
"entries": [],
"installed": 0,
"migrated": 0,
"upToDate": 0,
"failed": 0
}
}previousTools and tools show the before/after enrolled lists. addedTools
and removedTools are the diff — removedTools lists tools whose scaffolding
remains on disk after the upgrade.
Complete Example
A .swamp.yaml with all optional fields configured:
swampVersion: 20260430.202457.0
initializedAt: "2026-04-30T20:45:49.030Z"
upgradedAt: "2026-04-30T20:45:49.312Z"
repoId: 94735c06-fc0a-4d77-b712-04fbd801b18d
tools:
- claude
- kiro
gitignoreManaged: true
logLevel: debug
telemetryDisabled: false
telemetryEndpoint: https://api.swamp.club
modelsDir: custom/models
workflowsDir: custom/workflows
vaultsDir: custom/vaults
driversDir: custom/drivers
datastoresDir: custom/datastores
reportsDir: custom/reports
trustedCollectives:
- swamp
- si
- my-collective
trustMemberCollectives: true
defaultDriver: docker
defaultDriverConfig:
image: alpine:latest
datastore:
type: filesystem
path: /data/swamp-store