Iterate from intent to implementation with Codex through a persistent Markdown document.
Experimental: intent.nvim explores a document-first interface to coding agents. The instructions could largely live in a
SKILL.md; this plugin tests whether Neovim-native context, persistence, and writeback add enough value to justify the wrapper.A
SKILL.mdcan define the workflow. intent.nvim adds the editor loop: buffer and selection context, live progress, deterministic writeback, and one resumable session per document.
- Neovim 0.10+
- An authenticated
codexCLI available onPATH
With lazy.nvim:
{
"martindur/intent.nvim",
}With vim-plug:
Plug 'martindur/intent.nvim'No setup call is required.
Open any named Markdown file and describe what you want to build. The
.intent.md suffix is only a convenient convention; the plugin works with any
buffer whose filetype is markdown.
:edit payment.intent.md
:Intent propose a high-level solution
:Intent simplify the boundary between these components
:Intent implement this
:'<,'>Intent reconsider these lines
:Intent! start a fresh Codex session
:IntentCancel
:IntentSessionRunning :Intent without text opens Neovim's input prompt. The text entered
there is sent as feedback alongside the document, exactly like
:Intent reconsider this. While Codex is running, the document remains
editable and displays its current activity and elapsed time. Its complete
response replaces and writes the document unconditionally, including edits
made during the run.
Each document keeps its own persistent Codex session. Session IDs live in
Neovim's state directory rather than in the Markdown file. Codex receives
workspace-write access, but is instructed not to change repository files until
implementation is requested. Use :Intent! to discard the stored session for
the document, or :IntentCancel to stop its active request. :IntentSession
prints the codex resume <session-id> command for opening the same conversation
in the Codex CLI.
Codex classifies sessions created by codex exec as non-interactive. They can
also be found in its picker with:
codex resume --include-non-interactive --allThe intent document remains the durable source of truth. If a saved Codex session cannot be resumed, the plugin starts a new one from the document and current repository.
nvim --headless -u NONE -i NONE -l tests/smoke.lua