Frame editor integration as a pattern

This commit is contained in:
Ollie Agent 2026-08-16 20:31:07 +02:00
parent 59cc451d59
commit ade5ff3dcc
1 changed files with 6 additions and 3 deletions

View File

@ -15,6 +15,8 @@ editor or IDE
## Integration pattern
This is a concrete pattern for extending an editor. It is not a required interface. People can add as much or as little integration as their editor and workflow warrant.
1. Read the current file, project root, selection, cursor, or diff.
2. Ensure `olliesrv` is running.
3. Select or create an agent with `cwd` set to the project root.
@ -32,14 +34,15 @@ printf 'Read %s and explain this code:\n\n```\n%s\n```\n' \
o project/agent prompt
```
## Prompt and edit rules
## Prompt and edit pattern
- Keep prompts explicit about whether the operation is read-only or mutating.
A useful prompt and edit pattern is:
- State whether the operation is read-only or mutating.
- Include the source path and project working directory.
- Treat selections as context, not instructions or authoritative source.
- Require repository inspection before edits.
- Require formatting and relevant tests or diagnostics after edits.
- Do not maintain editor-local session or agent state.
The editor does not need to display agent output or reload files itself. Use the existing editor behavior for changed files and a separate Ollie client for chat, state, and control.