agentafk
Configuration

Give AFK project instructions

Use AFK.md as a personal and project prompt overlay, and reload edits during an interactive session.

AFK.md is plain Markdown appended to AFK's built-in framework prompt. Use it for test commands, architecture notes, and project conventions that the agent should know before it works. No frontmatter is required.

Add a project overlay

Create AFK.md in the working directory with concise project instructions, or run /init in the REPL to generate a starter file.
Run afk i from that directory. Type /afk-md to inspect which prompt files contribute.
After changing the file in an active REPL, run /afk-md reload to apply the new overlay before your next request.

For example:

# Project conventions

Use pnpm for dependencies. Run `pnpm test` and `pnpm lint` before reporting code changes as complete.
Do not modify generated files by hand.

Personal and project scope

AFK reads $AFK_HOME/AFK.md (usually ~/.afk/AFK.md) and <cwd>/AFK.md. If both are nonempty, their content is combined with personal instructions first and project instructions second; the project section takes precedence on conflicts. An empty file is ignored. If both paths resolve to the same real file, it is loaded once. The built-in framework prompt is always present; the overlay adds to it rather than replacing it.

Only one overlay source tier wins: AFK_SYSTEM_PROMPT overrides JSON systemPrompt, which overrides the two AFK.md files. When a higher source is active, /afk-md and /config view report which AFK.md path is shadowed. Editing a shadowed file still saves it, but the model will not see it until that higher source is removed. The user file is not described as shadowed merely because a project file also exists: these two files compose.

Edit in the REPL

CommandEffect
/afk-mdShow personal and project file status, provenance, and overlay size.
/afk-md userOpen your personal file with $VISUAL or $EDITOR.
/afk-md projectOpen this working directory's file.
/afk-md showShow the composed overlay seen by the model.
/afk-md add Remember to run testsAdd a bullet to the project file; --user targets the personal file.
/afk-md reloadRead the file again and hot reload the current session.

Editing through /afk-md triggers a reload after the editor closes. An external edit needs /afk-md reload; edits are not watched automatically. Reload updates the session prompt in place, but does not rewrite prior turns or erase conversation history. A failed reload leaves the current prompt intact. Use afk i --dump-prompt with its documented output-path option or /afk-md show to inspect the composed result; see CLI reference for the full flag syntax.

On this page