CodeWork
Customize

Project Instructions

Standing project instructions in AGENTS.md or CLAUDE.md files.

CodeWork adds AGENTS.md and CLAUDE.md files to its system prompt. Use them for what every session should know: how to build and test, conventions, and things to avoid.

This is the built-in codework.prompt.instruction plugin. It’s on by default.

File names

In each directory, CodeWork uses the first readable file of:

  1. AGENTS.override.md
  2. CLAUDE.override.md
  3. AGENTS.md
  4. AGENTS.MD
  5. CLAUDE.md
  6. CLAUDE.MD

Only one file per directory is used. An .override.md file is handy for personal instructions you keep out of git. An empty file still counts as that directory’s file: it blocks the others and adds nothing.

Which directories

CodeWork looks in the session’s working directory and in each parent directory up to the root of the sandbox. Each directory adds at most one file.

  • Parents are included. Subfolders are not.
  • There’s no global file. ~/AGENTS.md loads only when you work under your home folder.
  • CodeWork reads the files inside the session’s sandbox. With a remote sandbox, it reads the sandbox’s files, not your machine’s.
  • In a git worktree nested inside the main checkout, the main root’s file is skipped if the worktree has one with the same name.

How they appear in the prompt

The files go into <project_context>, farthest directory first, so the closest file has the final word:

System prompt
<project_context>
Project-Specific Instructions & Guidelines:

<project_instructions path="/home/me/work/api/AGENTS.md">
...
</project_instructions>

<project_instructions path="/home/me/work/api/services/billing/AGENTS.md">
...
</project_instructions>
</project_context>

There’s no size limit, and every file stays in the model’s context for the whole session, so keep them short. CodeWork reads the files again before each model call. When you edit one, the model gets the change as an update to <project_context>.

Example

AGENTS.md
# API

- Use pnpm. Never npm or yarn.
- Run `pnpm check` and `pnpm test` before you call a task done.
- Database access goes through `src/db/`. Don't write raw SQL elsewhere.
- Ask before adding a new dependency.

Turn it off

Disable the plugin in your settings:

.codework/settings.jsonc
{
	"plugins": [{ "plugin": "codework.prompt.instruction", "enabled": false }],
}

To add your own sections to the system prompt, write a prompt plugin.