Frame editor integration as a pattern
This commit is contained in:
parent
59cc451d59
commit
ade5ff3dcc
|
|
@ -15,6 +15,8 @@ editor or IDE
|
||||||
|
|
||||||
## Integration pattern
|
## 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.
|
1. Read the current file, project root, selection, cursor, or diff.
|
||||||
2. Ensure `olliesrv` is running.
|
2. Ensure `olliesrv` is running.
|
||||||
3. Select or create an agent with `cwd` set to the project root.
|
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
|
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.
|
- Include the source path and project working directory.
|
||||||
- Treat selections as context, not instructions or authoritative source.
|
- Treat selections as context, not instructions or authoritative source.
|
||||||
- Require repository inspection before edits.
|
- Require repository inspection before edits.
|
||||||
- Require formatting and relevant tests or diagnostics after 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.
|
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.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue