Relationships
#910 Add how-to guides for core operations and operational tasks
Opened by stack72 · 7/1/2026· Shipped 7/1/2026
Problem
The how-to section (content/manual/how-to/) has strong coverage for extensions, AI agents, vaults, giga-swamp, and swamp serve. But the three most common day-to-day operations — creating/running models, creating/running workflows, and querying data — have no how-to guides. A user who has read the explanation pages and reference docs still has nowhere to go for task-oriented "how do I do X?" guidance on these core operations.
Additional operational tasks (webhooks, extension trust, shell completions, audit, issues, activity overview, OpenTelemetry, scheduled workflows) also lack how-to guides despite having reference documentation.
Scope
This issue covers how-to documentation only (diataxis type: how-to). Every page must follow the how-to rules: goal-oriented, assumes the reader knows what they want to do, provides the steps to accomplish it, does not teach concepts (that's tutorial) or explain design decisions (that's explanation).
CRITICAL: Do Not Fabricate CLI Output
Previous documentation PRs (#783, #785) shipped errors because CLI command syntax, flag names, and default-trusted collectives were written from memory rather than verified against the actual CLI. Every how-to guide in this issue contains CLI commands and their output. All of it must be real.
Mandatory Verification Process
For every command shown in a how-to guide:
Create a sandbox repo first:
SWAMP_SANDBOX=$(mktemp -d) && cd "$SWAMP_SANDBOX" && swamp repo init
Run the exact command you intend to document and capture the real output.
Use the real output verbatim in the guide. Truncate long output with
...but never edit, paraphrase, or guess what the output looks like.Verify flag names and syntax by running
swamp help <command path>before writing any flag table or command example. Do NOT write flags from memory.For interactive commands (TUI, editor-based), use a non-interactive alternative (
--json,--title,--bodyflags) and document both paths.Clean up:
rm -rf "$SWAMP_SANDBOX"
What Counts as Fabrication (Do NOT Do These)
- Writing a command example without running it first
- Inventing flag names that sound right (e.g.,
--webhook-secretinstead of--webhook) - Guessing CLI output format or field names
- Showing a command syntax that differs from
swamp helpoutput (e.g., wrong argument order) - Claiming a feature exists (e.g.,
@sidefault trust) without verifying it - Copy-pasting output from a reference page instead of re-running the command
How to Handle Commands That Need Infrastructure
Some commands require infrastructure (S3, cloud credentials, a running server). For these:
swamp servecommands: Start a local server in the sandbox, run the client commands against it, capture real output- Vault commands with cloud backends: Use the
local_encryptionvault type for examples, note that cloud backends follow the same pattern - Webhook commands: Document the server-side flag syntax (verifiable via
swamp help serve) and show acurltest against localhost - OpenTelemetry: Show the env var configuration (verifiable via
swamp helpand the reference docs) and aswamp model method runwithOTEL_TRACES_EXPORTER=consoleto capture real span output
Navigation: Tile Budget
The how-to section currently has these top-level tiles:
- Extensions (6 sub-pages)
- AI Agents (7 sub-pages)
- Vaults (5 sub-pages)
- swamp serve (7 sub-pages)
- Giga-Swamp (7 sub-pages)
- Remote Execution
- Set Up TLS for swamp serve
- Set Up Background Autoupdating
- Authenticate with API Keys
- Troubleshoot Your Swamp Repo
- Gate a Workflow with Manual Approval
- Cancel a Stuck Run
- Reuse a Model with the Factory Pattern
That's 13 top-level tiles. This issue adds 11 new how-to pages. To avoid tile overload, group related guides under index pages where it makes sense:
Grouping Strategy
New index page: "Core Operations" (how-to/core-operations.md, order 1)
Groups the three foundational how-to guides under one tile:
how-to/core-operations/create-and-run-a-model.md(order 1)how-to/core-operations/create-and-run-a-workflow.md(order 2)how-to/core-operations/query-and-manage-data.md(order 3)
New index page: "Operational Tasks" (how-to/operational-tasks.md, order 9)
Groups smaller operational guides under one tile:
how-to/operational-tasks/set-up-shell-completions.md(order 1)how-to/operational-tasks/use-the-audit-timeline.md(order 2)how-to/operational-tasks/file-issues-from-the-cli.md(order 3)how-to/operational-tasks/inspect-repo-activity.md(order 4)
Standalone pages (no grouping needed):
how-to/set-up-webhooks.md(order 7) — sits near swamp serve guideshow-to/set-up-extension-trust.md(order 6) — sits near extension guideshow-to/set-up-opentelemetry.md(order 10) — standalonehow-to/run-workflows-on-a-schedule.md(order 11) — standalone
Net tile change: +6 tiles (13 → 19: 2 new index tiles + 4 standalone). The sub-pages nest under their index tiles in the nav, same as the existing Extensions/AI Agents/Vaults/etc. pattern.
Detailed Plan
Index Page 1: "Core Operations" (how-to/core-operations.md)
---
title: "Core Operations"
description: "<150-160 chars describing the group>"
type: how-to
order: 1
---Brief intro paragraph explaining these guides cover the most common day-to-day swamp operations. Link to each sub-page.
Guide 1.1: "Create and Run a Model" (how-to/core-operations/create-and-run-a-model.md)
Prerequisites: Swamp installed, a repo initialized (swamp repo init)
What to cover, in order:
- Search for available model types:
swamp model type search— show real output - Inspect a type before using it:
swamp model type describe command/shell --json— show real output (truncated) - Create a model definition:
swamp model create command/shell my-greeter— show what files it creates - Edit the definition to set global arguments — show the YAML content
- Validate the definition:
swamp model validate my-greeter— show real output - Run a method:
swamp model method run my-greeter execute— show real output - Inspect the output:
swamp model output my-greeter— show real output - View method run history:
swamp model method history my-greeter— show real output - Quick path: auto-create with
swamp model method run @command/shell execute my-quick-model— show how auto-definitions work
Do NOT cover: What models conceptually are (link to explanation/models-types-and-methods), the full YAML schema (link to reference/model-definitions), or extension model development (link to how-to/extensions/create-and-publish).
Guide 1.2: "Create and Run a Workflow" (how-to/core-operations/create-and-run-a-workflow.md)
Prerequisites: Swamp installed, a repo with at least one model (link to guide 1.1)
What to cover, in order:
- Create a workflow:
swamp workflow create deploy-pipeline— show what files it creates - Edit the workflow YAML — show a minimal example with two steps that reference the model from guide 1.1
- Validate the workflow:
swamp workflow validate deploy-pipeline— show real output - Run the workflow:
swamp workflow run deploy-pipeline— show real output (the interactive tree) - Run with
--jsonfor scripted use — show JSON output shape - Pass inputs:
swamp workflow run deploy-pipeline --input env=staging— show how inputs work - View run history:
swamp workflow history deploy-pipeline— show real output - View logs:
swamp workflow history logs deploy-pipeline— show real output - Search past runs:
swamp workflow history search --status succeeded— show real output
Do NOT cover: The DAG execution model (link to explanation/the-workflow-execution-model), manual approval gates (link to existing how-to/gate-a-workflow-with-manual-approval), or the full YAML schema (link to reference/workflows).
Guide 1.3: "Query and Manage Data" (how-to/core-operations/query-and-manage-data.md)
Prerequisites: Swamp installed, a repo with at least one model that has produced data (link to guide 1.1)
What to cover, in order:
- List data for a model:
swamp data list my-greeter— show real output - Get a specific data artifact:
swamp data get my-greeter stdout— show real output - View versions:
swamp data versions my-greeter stdout— show real output - Query across models with CEL:
swamp data query 'modelName == "my-greeter"'— show real output - Query with projections:
swamp data query 'true' --select 'modelName + ": " + dataName'— show real output - Launch the interactive TUI:
swamp data query(no predicate) — describe what the TUI shows (screenshot if possible, otherwise describe the interface) - Search by tag:
swamp data search --tag env=staging— show real output - Rename data:
swamp data rename my-greeter old-name new-name— explain forwarding - Delete data:
swamp data delete my-greeter stdout— show real output with--dry-runfirst - Run garbage collection:
swamp data gc --dry-run— show real output
Do NOT cover: How the data layer works conceptually (link to explanation/the-data-layer), data output specs in YAML (link to reference/data), or CEL expression syntax (link to reference/cel-expressions).
Guide 2: "Set Up Extension Trust" (how-to/set-up-extension-trust.md)
Prerequisites: Swamp installed, authenticated (swamp auth login)
What to cover, in order:
- Check current trust list:
swamp extension trust list— show real output (should showswampas default) - Add a trusted collective:
swamp extension trust add @myorg— show real output - Verify it's added:
swamp extension trust list— show updated output - Enable auto-trust for membership collectives:
swamp extension trust auto-trust true— show real output - Explain when to use auto-trust vs explicit trust (team repos vs CI repos)
- Remove a collective:
swamp extension trust rm @myorg— show real output - How trust affects
swamp extension install— show what happens when an untrusted extension is referenced
IMPORTANT: Verify what is actually default-trusted by running swamp extension trust list in a fresh repo. Do NOT claim @si or any other collective is default-trusted without verifying.
Guide 3: "Set Up Webhooks" (how-to/set-up-webhooks.md)
Prerequisites: Swamp installed, a repo with a workflow, familiarity with swamp serve
What to cover, in order:
- Create a workflow that the webhook will trigger
- Start swamp serve with a GitHub webhook:
swamp serve --webhook '/hooks/github:my-workflow:mysecret'— show real startup output - Test locally with curl:
curl -X POST http://localhost:9090/hooks/github -H 'X-Hub-Signature-256: ...' -d '{"ref":"refs/heads/main"}'— show how to compute the HMAC for testing - Use env var for the secret:
swamp serve --webhook '/hooks/github:my-workflow:@env=WEBHOOK_SECRET' - Use file-based secret:
swamp serve --webhook '/hooks/github:my-workflow:@file=/run/secrets/webhook' - Set up a Linear webhook: show the
linearscheme variant - Set up a Stripe webhook: show the
stripescheme variant - Set up a generic webhook: show the
genericscheme with custom header - Access webhook payload in workflow CEL: show
webhook.headers,webhook.body,webhook.params
Verify flag syntax by running swamp help serve and checking the --webhook flag spec before writing any examples.
Guide 4: "Run Workflows on a Schedule" (how-to/run-workflows-on-a-schedule.md)
Prerequisites: Swamp installed, a repo with a workflow, swamp serve running
What to cover, in order:
- Add a
triggerblock to a workflow YAML with a cron schedule — show the YAML - Validate the workflow:
swamp workflow validate— show it accepts the trigger - Start
swamp serve(triggers only execute when the server is running) - Verify the schedule is registered — show relevant server log output
- Disable scheduling:
swamp serve --no-schedule - Common cron patterns (every hour, daily at midnight, weekdays only)
Verify the trigger YAML schema by running swamp workflow schema get --json and checking the trigger fields.
Guide 5: "Set Up OpenTelemetry" (how-to/set-up-opentelemetry.md)
Prerequisites: Swamp installed
What to cover, in order:
- Enable console tracing for local debugging:
Show real span output.OTEL_TRACES_EXPORTER=console swamp model method run my-model execute - Send traces to a collector:
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 swamp model method run my-model execute - Configure service name:
OTEL_SERVICE_NAME=my-infra - Add custom headers for vendors (Honeycomb, Axiom):
OTEL_EXPORTER_OTLP_HEADERS="x-honeycomb-team=your-key" - Verify spans are being exported — check the collector/vendor UI
- Disable tracing:
--no-telemetryflag orSWAMP_NO_TELEMETRY=true
Verify all env var names against swamp help and the existing reference/opentelemetry page. Do NOT invent env var names.
Index Page 2: "Operational Tasks" (how-to/operational-tasks.md)
---
title: "Operational Tasks"
description: "<150-160 chars describing the group>"
type: how-to
order: 9
---Brief intro paragraph. Link to each sub-page.
Guide 6.1: "Set Up Shell Completions" (how-to/operational-tasks/set-up-shell-completions.md)
What to cover, in order:
- Generate bash completions:
swamp completions bash— show output and where to save it - Generate zsh completions:
swamp completions zsh— show output and where to save it - Generate fish completions:
swamp completions fish— show output and where to save it - Reload the shell to activate completions
Verify by running each swamp completions <shell> command and confirming the output format.
Guide 6.2: "Use the Audit Timeline" (how-to/operational-tasks/use-the-audit-timeline.md)
What to cover, in order:
- View the default timeline (last 24h):
swamp audit— show real output - Change the time window:
swamp audit --hours 4 - Include all commands (including noise):
swamp audit --all - Filter by session:
swamp audit --session <id> - JSON output for scripting:
swamp audit --json - Check the audit hook health:
swamp doctor audit— show real output
Guide 6.3: "File Issues from the CLI" (how-to/operational-tasks/file-issues-from-the-cli.md)
What to cover, in order:
- Search existing issues:
swamp issue search vault— show real output - View an issue:
swamp issue get <number>— show real output - File a bug report:
swamp issue bug --title "..." --body "..."— show real output - File a feature request:
swamp issue feature --title "..." --body "..."— show real output - File a security report:
swamp issue security --title "..." --body "..."— note visibility (author and admins only) - Comment on an issue:
swamp issue ripple <number> --body "..."— show real output - Close an issue with a comment:
swamp issue ripple <number> --body "Fixed" --close - Edit an issue:
swamp issue edit <number> --title "Updated title"
Requires authentication. Note that swamp auth login is needed first.
Guide 6.4: "Inspect Repo Activity" (how-to/operational-tasks/inspect-repo-activity.md)
What to cover, in order:
- Show recent activity:
swamp summarise— show real output - Change the time window:
swamp summarise --since 1d - Cap output on large repos:
swamp summarise --limit 10 - JSON output for scripting:
swamp summarise --json - Remote repo activity:
swamp summarise --server ws://... --token ...
Renumbering Existing How-to Pages
The new guides need to slot into the existing order. Current order values and proposed changes:
| Page | Current order | New order |
|---|---|---|
| Core Operations (NEW index) | — | 1 |
| Extensions | 1 | 2 |
| AI Agents | 2 | 3 |
| Vaults | 2 | 4 |
| swamp serve | 3 | 5 |
| Set Up Extension Trust (NEW) | — | 6 |
| Set Up Webhooks (NEW) | — | 7 |
| Giga-Swamp | 8 | 8 |
| Operational Tasks (NEW index) | — | 9 |
| Set Up OpenTelemetry (NEW) | — | 10 |
| Run Workflows on a Schedule (NEW) | — | 11 |
| Remote Execution | 8 | 12 |
| Set Up TLS for swamp serve | 9 | 13 |
| Set Up Background Autoupdating | 10 | 14 |
| Authenticate with API Keys | 11 | 15 |
| Troubleshoot Your Swamp Repo | 12 | 16 |
| Gate a Workflow with Manual Approval | 13 | 17 |
| Cancel a Stuck Run | 14 | 18 |
| Reuse a Model with the Factory Pattern | 14 | 19 |
Implementation Notes
Meta descriptions
Per CLAUDE.md SEO rules, frontmatter description fields must be 150-160 characters. Verify character count for every new and modified page. Previous PRs (#783, #785) both shipped with descriptions outside this range.
Terminology
Per CLAUDE.md:
- "Swamp" capitalized in prose,
swamplowercase in command invocations - "operative" not "operator" for users
- "collective" not "organization"
- "agent" lowercase in running prose
Diataxis how-to rules
- Goal-oriented: each guide answers "how do I do X?"
- Assumes knowledge: the reader knows what they want, they just need the steps
- No conceptual explanation: link to explanation pages for the "why"
- No teaching: link to tutorials for learning journeys
- Minimal context: a brief prerequisites section, then straight to the steps
- Working examples: every command shown must work when copied
Acceptance Criteria
- All 11 new how-to pages created with correct frontmatter (title, description 150-160 chars, type: how-to, order)
- 2 new index pages created (Core Operations, Operational Tasks)
- Every CLI command in every guide has been run in a sandbox repo and the output is real
- Every flag name verified against
swamp help <command path>— no fabricated flags - No claims about default values, trusted collectives, or behavior that haven't been verified against the actual CLI
- Existing how-to pages renumbered per the table above
- Cross-references to explanation and reference pages are valid
-
deno task checkpasses - Terminology rules followed (Swamp capitalization, operative, collective)
- No conceptual explanation or tutorial-style teaching in how-to pages
Shipped
Click a lifecycle step above to view its details.