Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLI
Assigneesstack72

Relationships

#1048 skill: add serve, grants, and access control guidance to the swamp skill

Opened by stack72 · 7/8/2026· Shipped 7/9/2026

Summary

The bundled swamp skill has no guidance on swamp serve, authentication, authorization, grants, or access control. Agents working on swamp repos don't know how to author grants, manage access, or configure serve authentication.

What to add

1. Update the routing table in SKILL.md

Add a new row:

User intent Guide
Serve — auth, grants, access control, tokens, OAuth references/serve/guide.md

2. Add to Core Concepts in SKILL.md

  • Grants — authorization rules controlling who can do what on a swamp serve instance. Authored via CLI commands or YAML files in the `grants/` directory.
  • Serve — exposes the repo over the network with TLS, authentication (token or OAuth via swamp-club), and grant-based authorization.

3. Create references/serve/guide.md

Cover the following:

Auth modes:

  • `--auth-mode none` — loopback only, no auth (deprecated)
  • `--auth-mode token` — manual token minting, no swamp-club dependency
  • `--auth-mode oauth` — users authenticate via swamp-club, collective-based admission

Grant model:

  • Subjects: `user:`, `group:`, `idp-group:`
  • Effects: `allow`, `deny` (deny wins)
  • Actions: `run`, `read`, `write`, `admin`
  • Resources: `workflow:@acme/`, `model:hello`, `data:`, `access:*`
  • CEL conditions: `--when 'tags.env == "staging"'`
  • Default deny — no matching grant = denied
  • Admin on `access:*` implies all actions (superuser)

Declarative grants (grants/ directory):

  • Files live in `grants/` at repo root alongside `models/`, `workflows/`, `vaults/`
  • YAML format: ```yaml grants:
    • subject: idp-group:platform-eng effect: allow actions: [run] resource: workflow:@acme/*
    • subject: idp-group:developers effect: deny actions: [read] resource: data:@acme/secrets-* ```
  • Applied via `swamp access reload --server wss://...`
  • Reload validates all files first — rejects entire reload if any file is invalid
  • Reconciler only touches `source: file:*` grants — CLI grants are independent
  • Both `.yaml` and `.yml` accepted, flat directory only

CLI grant management:

  • `swamp access grant create --subject --allow --on [--when ] [--server wss://...]`
  • `swamp access policy create` — alias for `grant create`
  • `swamp access grant list [--server wss://...]`
  • `swamp access grant revoke [--server wss://...]`
  • `swamp access reload [--server wss://...]` — reconcile files + rebuild snapshot

Groups:

  • `swamp access group create `
  • `swamp access group add-member `
  • `swamp access group remove-member `

Access checking:

  • `swamp access check --subject --action --on ` — admin explain mode
  • `swamp access can-i [--action --on ] --server wss://...` — user self-service

Token management:

  • `swamp access token mint --principal user:id` — local only
  • `swamp access token list`
  • `swamp access token revoke `
  • `swamp access token rotate `

OAuth login:

  • `swamp auth server-login --server wss://...` — device grant flow via swamp-club

When to use which:

  • Writing a few grants for a small team → CLI commands
  • Managing policy for a production deployment → grants/ directory files
  • Setting up a new serve instance → `--auth-mode oauth` for teams on swamp-club, `--auth-mode token` for air-gapped environments

Scope

Skill updates only — `.claude/skills/swamp/SKILL.md` and new `.claude/skills/swamp/references/serve/guide.md`. Must run `deno fmt` after editing. Aim for tessl skill review score >= 90%.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 4 MOREPR_MERGED+ 1 MORENOTIFICATION_SKIPPED

Shipped

7/9/2026, 8:01:07 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack727/9/2026, 6:43:49 PM

Sign in to post a ripple.