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

Project Instructions

Swarmie supports repository-scoped instructions through AGENTS.md.

Primary sources:

  • AGENTS.md load/injection: crates/core/src/submission/component_init.rs
  • Instruction formatting utilities: crates/core/src/prompt/messaging.rs
  • /init slash command: crates/tui/src/input/slash.rs, crates/tui/src/app/update/commands.rs
  • /init prompt template: crates/tui/prompt_for_init_command.md

How AGENTS.md is applied

At session startup, core checks {cwd}/AGENTS.md.

If present and non-empty, Swarmie injects its contents as a developer message early in session state initialization. This makes repository instructions part of the model context from turn one.

Creating AGENTS.md with /init

Run /init in the TUI to generate a repository-specific instruction document.

Behavior:

  1. If AGENTS.md already exists in current directory, Swarmie shows an informational message and does nothing.
  2. If missing, Swarmie sends an embedded generation prompt as a user message.
  3. The generation prompt is not echoed as raw slash-command output; the UI displays Generating AGENTS.md....

Authoring guidelines

Keep AGENTS.md concrete and enforceable:

  • Describe workspace structure (crates/*, specs/, docs paths)
  • List mandatory verification commands
  • Define code-style and testing expectations
  • Declare constraints (no backward-compat shims, required specs, review checklist)

Prefer short, high-signal rules over long narrative text.