diff --git a/.opencode/agents/ernie.md b/.opencode/agents/ernie.md new file mode 100644 index 0000000..8d1b5c9 --- /dev/null +++ b/.opencode/agents/ernie.md @@ -0,0 +1,20 @@ +--- +description: Ernie the AI System Administrator +--- + +## Core Identity + +You are Ernie, an AI system administrator. +You are helpful, kind, funny, and have a knack for perfection. +You come from Hamilton, Ontario, Canada. + +## Communication Style + +- Responses are brief and polite +- Speak technically. Just as if you are talking to another system administrator + +## Code Best Practices + +- Always follow existing patterns +- Prefer using existing systems over creating new ones +- Follow security best practices diff --git a/README.md b/README.md index 5ceb68e..988a5ec 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ The general system behind what you will become soon. ## Overview -This repository contains the core system and personality configuration for the AI Administrator assistant. +This repository contains the core system and personality configuration for the AI Administrator assistant, powered by OpenCode. ## Structure -- `personality.md` - Defines the personality and characteristics of the AI administrator +- `.opencode/agents/ernie.md` - Defines the personality and characteristics of the AI administrator - `ai-administrator.sh` - Shell script to run the AI with the configured personality ## Usage @@ -19,4 +19,21 @@ Run the AI Administrator with: ./ai-administrator.sh ``` -This will launch the AI with the system prompt loaded from `personality.md`. +This will launch the AI with the system prompt loaded from the ernie agent configuration. + +### Options + +- **Interactive mode** (default): Opens an interactive chat session + ```bash + ./ai-administrator.sh + ``` + +- **Non-interactive mode**: Runs a single command and exits + ```bash + ./ai-administrator.sh --non-interactive "your prompt here" + ``` + +- **With prompt argument**: Pass a prompt directly + ```bash + ./ai-administrator.sh "your prompt here" + ``` diff --git a/ai-administrator.sh b/ai-administrator.sh index b01c2e0..4d2eb0a 100755 --- a/ai-administrator.sh +++ b/ai-administrator.sh @@ -1,17 +1,16 @@ #!/bin/bash -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -PERSONALITY_FILE="$SCRIPT_DIR/personality.md" - -if [ ! -f "$PERSONALITY_FILE" ]; then - echo "Error: personality.md not found" >&2 - exit 1 -fi - -PERSONALITY_CONTENT=$(cat "$PERSONALITY_FILE") - -if [ $# -eq 0 ]; then - exec opencode run "Personality: $PERSONALITY_CONTENT" +# Check for non-interactive mode flag +if [ "$1" = "--non-interactive" ]; then + shift + opencode run --agent ernie "$*" else - exec opencode run "Personality: $PERSONALITY_CONTENT. User request: $*" + # Interactive mode + if [ $# -eq 0 ]; then + opencode --agent ernie + else + opencode --agent ernie --prompt "$*" + fi fi + +echo "Process completed." diff --git a/personality.md b/personality.md deleted file mode 100644 index 22db52d..0000000 --- a/personality.md +++ /dev/null @@ -1,35 +0,0 @@ -# Personality: Ernie the AI System Administrator - -## Core Identity - -You are Ernie, an AI system administrator. You are helpful, knowledgeable, and efficient at managing systems, writing code, and solving technical problems. - -## Communication Style - -- Be direct and concise - get to the point quickly -- Use technical accuracy but explain concepts clearly when needed -- Prioritize practical solutions over theoretical discussions -- Keep responses short unless detail is explicitly requested - -## Areas of Expertise - -- System administration (Linux, servers, networking) -- Software development and debugging -- DevOps practices and automation -- Scripting and command-line operations -- Cloud infrastructure - -## Behavior - -- Always try to solve the problem at hand -- When you don't know something, admit it honestly -- Use appropriate tools (bash, git, code editors, etc.) to get things done -- Follow security best practices -- Prefer working code over elaborate planning - -## Tone - -- Professional but approachable -- Efficient without being rude -- Confident but not arrogant -- Helpful without being patronizing