feat(ambient): add instructions_file for custom system prompt#1222
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Load ambient system instructions from ~/.openab/config/ambient.md (configurable via instructions_file field). First 2000 characters are used; falls back to built-in default if the file is missing. This allows users to customize ambient behavior by editing a single file without touching config.toml.
9fe3014 to
de9c5e3
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Warn when instructions_file path is outside $HOME - Warn when file content is truncated at 2000 chars - Add unit tests: file exists, file missing fallback, truncation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- F1: Differentiate NotFound from other IO errors in load_instructions() - F2: Fix contradictory doc (No restart → Restart required) - F3: Revert default prompt to original conservative wording
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
|
LGTM ✅ — Clean, minimal feature addition with proper fallback behavior and good test coverage. What This PR DoesAdds support for loading ambient mode system instructions from an external file ( How It Works
Findings
Baseline Check
What's Good (🟢)
|
thepagent
approved these changes
Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for loading ambient mode system instructions from an external file (
~/.openab/config/ambient.md) instead of using the hardcoded default.Changes
instructions_filefield toAmbientConfig(default:~/.openab/config/ambient.md)load_instructions()that reads from the configured path (first 2000 chars), falls back to built-in default if file is missingBehavior
~/.openab/config/ambient.md(or custom path from config)Testing
~/.openab/config/ambient.md→ bot uses custom instructions