-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add runtime context hint to session greeting #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -190,10 +190,28 @@ main() { | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| echo "$output" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Output runtime context hint for the AI model | ||||||||||||||||||||||||
| local runtime_hint="" | ||||||||||||||||||||||||
| case "$app_name" in | ||||||||||||||||||||||||
| OpenCode) | ||||||||||||||||||||||||
| runtime_hint="You are running in OpenCode. Global config: ~/.config/opencode/opencode.json" | ||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||
| "Claude Code") | ||||||||||||||||||||||||
| runtime_hint="You are running in Claude Code. Global config: ~/.config/Claude/Claude.json" | ||||||||||||||||||||||||
| ;; | ||||||||||||||||||||||||
| esac | ||||||||||||||||||||||||
| if [[ -n "$runtime_hint" ]]; then | ||||||||||||||||||||||||
| echo "$runtime_hint" | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Cache output for agents without Bash (e.g., Plan+) | ||||||||||||||||||||||||
| local cache_dir="$HOME/.aidevops/cache" | ||||||||||||||||||||||||
| mkdir -p "$cache_dir" | ||||||||||||||||||||||||
| echo "$output" > "$cache_dir/session-greeting.txt" | ||||||||||||||||||||||||
| if [[ -n "$runtime_hint" ]]; then | ||||||||||||||||||||||||
| printf '%s\n%s\n' "$output" "$runtime_hint" > "$cache_dir/session-greeting.txt" | ||||||||||||||||||||||||
| else | ||||||||||||||||||||||||
| echo "$output" > "$cache_dir/session-greeting.txt" | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
|
Comment on lines
+210
to
+214
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic for caching the session greeting can be simplified to improve readability and maintainability. Instead of an
Suggested change
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Check ralph upstream when in aidevops repo | ||||||||||||||||||||||||
| check_ralph_upstream | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,15 @@ | ||||||
| Add ~/.aidevops/agents/AGENTS.md to context for AI DevOps capabilities. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The first line of this file appears to be a meta-instruction for developers rather than for the AI agent. As plain text, it could be misinterpreted by the agent. If this is a note for humans, it's best practice to enclose it in a Markdown comment to avoid confusion.
Suggested change
|
||||||
|
|
||||||
| ## aidevops Framework Status | ||||||
|
|
||||||
| **On conversation start**: | ||||||
| 1. If you have Bash tool: Run `bash ~/.aidevops/agents/scripts/aidevops-update-check.sh` | ||||||
| 2. If no Bash tool: Read `~/.aidevops/cache/session-greeting.txt` (cached by agents with Bash) | ||||||
| 3. Relay ALL lines from the output in your greeting. The first line is the version string, subsequent lines are runtime context. Format: "Hi!\n\nWe're running https://aidevops.sh v{version}. {runtime context}\n\nWhat would you like to work on?" | ||||||
| 4. Then respond to the user's actual message | ||||||
|
|
||||||
| If update check output starts with `UPDATE_AVAILABLE|` (e.g., `UPDATE_AVAILABLE|current|latest|AppName`), inform user: "Update available (current → latest). Run `aidevops update` to update." | ||||||
|
|
||||||
| ## Pre-Edit Git Check | ||||||
|
|
||||||
| Only for agents with Edit/Write/Bash tools. See ~/.aidevops/agents/AGENTS.md for workflow. | ||||||
Uh oh!
There was an error while loading. Please reload this page.