Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Common Workflows

Explore a codebase quickly

  1. Start Swarmie in project root:
swarmie
  1. Ask for a map of modules and responsibilities.
  2. Use @ file completion to target files precisely.

Example prompt:

Map this repo: crates, runtime loop, and where tool permissions are enforced.

Inspect and modify code

  1. Ask for a concrete implementation plan.
  2. Let the agent read files and propose minimal edits.
  3. Review generated diffs with /diff and transcript with /pager.

Useful commands:

/status
/diff
/pager

Run shell steps inline

Use ! input for shell commands from the TUI input line.

!rg "SwarmConfig" crates/core/src -n
!ls -la crates/tui/src

Shell execution still goes through permission rules.

Work with file completion (@path)

Type @ to start inline workspace-aware file completion.

Examples:

open @crates/core/src/turn.rs
review @docs/docs/pages/reference/cli.mdx

Tips:

  • Tab cycles completion candidates.
  • Arrow keys and Left/Right navigate directory suggestions.
  • /file starts file completion explicitly.

Fix bugs and add tests

Recommended loop:

  1. Reproduce and describe the bug in one sentence.
  2. Ask agent to locate root cause and affected files.
  3. Request targeted fix with rationale.
  4. Request/author tests near the changed behavior.
  5. Re-run verification commands and inspect output.

Example prompt:

Find why /connect OAuth providers return 401 and patch the provider resolution path with tests.

Refactor safely

  1. Ask for invariants that must remain true.
  2. Request small, staged edits instead of one large rewrite.
  3. Use /compact when context gets too large.
  4. Use /undo or /fork from transcript checkpoints if a direction regresses.

Multi-agent execution

  1. Spawn specialized agents with /agent.
  2. Switch focus with Ctrl+N / Ctrl+P.
  3. Close inactive agents with /close.

Pattern that works well:

  • Agent A: implementation
  • Agent B: tests and edge cases
  • Agent C: docs and UX polish

Export and resume work

  • /export writes transcript output.
  • /resume opens session picker.
  • swarmie resume --last continues the most recent workspace session.