Skip to content

System Prompt

The system prompt is the agent’s instruction sheet. It tells the model what Neo is, what behavior to prefer, and what extra project context is available.

If the user message is the task, the system prompt is the job description.

A coding agent needs stable instructions, but it also needs local context. Some context is almost always the same, such as “prefer small verified changes.” Other context changes by project, such as AGENTS.md files or available skills.

If all of that is mashed into one giant string, it is harder to understand, harder to cache, and harder to customize.

Neo builds the prompt in ordered blocks:

  1. A stable base prompt plus the skill catalog.
  2. Dynamic project instructions from AGENTS.md files.

The flattened prompt is still available for providers that only accept a string. Providers that support structured system prompts can use llm.SystemBlock values instead.

Source Purpose
Base prompt Neo’s default behavior: focused coding agent, read files, make small verified changes.
Skill catalog Names and descriptions of available skills. Full skill bodies are only expanded when invoked with $name or /name args.
AGENTS.md Project or user instructions that should guide work in this repo.

Use AGENTS.md for durable project instructions. For example:

Read docs/developer/index.md before making changes.
Keep developer docs current when behavior changes.
Run go test ./... after Go changes.

Use skills for reusable workflows that should only apply when requested, such as review or commit behavior. Invoke a skill by mentioning $name in chat or by running /name args from the TUI.

Change the base prompt only when the default personality or operating rules of Neo itself should change.

Always-loaded prompt text costs tokens every turn. Keep stable instructions short. Put big or optional workflows in skills, tools, or searchable history instead of stuffing them into the system prompt.

  • cmd/neo/main.go: chat startup and prompt assembly.
  • internal/projectctx: AGENTS.md discovery and rendering.
  • internal/skills: skill catalog and expansion.
  • internal/llm/provider.go: SystemBlock.