diff --git a/.agent/AGENTS.md b/.agent/AGENTS.md index 4388945d..fde70b73 100644 --- a/.agent/AGENTS.md +++ b/.agent/AGENTS.md @@ -381,6 +381,8 @@ aidevops supports multiple discovery methods: **Note**: Tool-specific files (`.cursorrules`, `.windsurfrules`, etc.) are not tracked in git. Create symlinks locally if needed. +**MCP Token Optimization**: Disable heavy MCPs globally, enable per-agent. See `tools/build-agent/build-agent.md` for patterns. + ## Development Workflows For versioning, releases, and git operations: diff --git a/.agent/scripts/generate-opencode-agents.sh b/.agent/scripts/generate-opencode-agents.sh index db9c4955..5acac11e 100755 --- a/.agent/scripts/generate-opencode-agents.sh +++ b/.agent/scripts/generate-opencode-agents.sh @@ -41,30 +41,17 @@ Add ~/.aidevops/agents/AGENTS.md to context for AI DevOps capabilities. ## aidevops Framework Status -**CRITICAL - DO THIS FIRST**: Before responding to ANY user message in a new conversation: -1. Run this command using the Bash tool: `bash ~/.aidevops/agents/scripts/aidevops-update-check.sh` -2. Greet with exactly this format (with line breaks): - "Hi! - - We're running https://aidevops.sh v{version}. - - What would you like to work on?" - -If the output contains `UPDATE_AVAILABLE|current|latest`, inform the user: "An aidevops update is available (current → latest). Run `aidevops update` to update, then restart OpenCode." - -## MANDATORY: Pre-Edit Git Check - -**BEFORE any Edit/Write tool call**, run: -```bash -~/.aidevops/agents/scripts/pre-edit-check.sh -``` - -If output shows "STOP - ON PROTECTED BRANCH": Do NOT proceed. Ask user to choose: -1. Create suggested branch (recommended) -2. Use different branch name -3. Stay on main (not recommended) - -After creating branch, call `session-rename_sync_branch` tool. +**On conversation start**: +1. If Bash tool available: Run `bash ~/.aidevops/agents/scripts/aidevops-update-check.sh` +2. If Bash unavailable: Use Read tool on `~/.aidevops/agents/VERSION` to get version +3. Greet with: "Hi!\n\nWe're running https://aidevops.sh v{version}.\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|2.41.1|2.41.2`), 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. EOF echo -e " ${GREEN}✓${NC} Updated AGENTS.md with version check" diff --git a/TODO.md b/TODO.md index 6d66d8d2..1b805f24 100644 --- a/TODO.md +++ b/TODO.md @@ -68,8 +68,32 @@ Tasks with no open blockers - ready to work on. Use `/ready` to refresh this lis - [ ] t018 Enhance Plan+ and Build+ with OpenCode's Latest Features #plan → [todo/PLANS.md#enhance-plan-and-build-with-opencodes-latest-features] ~3h (ai:1.5h test:1h read:30m) logged:2025-12-21 - [ ] t020 Git Issues Bi-directional Sync (GitHub, GitLab, Gitea) #plan #git #sync ~3d (ai:1.5d test:1d read:0.5d) logged:2025-12-21 - [ ] t021 Auto-mark tasks complete from commit messages in release #workflow #automation ~2h (ai:1h test:30m read:30m) logged:2025-12-22 - - diff --git a/setup.sh b/setup.sh index 86f9a966..3b926eee 100755 --- a/setup.sh +++ b/setup.sh @@ -959,6 +959,17 @@ deploy_aidevops_agents() { print_info "Deployed $agent_count agent files and $script_count scripts" + # Copy VERSION file from repo root to deployed agents + if [[ -f "$script_dir/VERSION" ]]; then + if cp "$script_dir/VERSION" "$target_dir/VERSION"; then + print_info "Copied VERSION file to deployed agents" + else + print_warning "Failed to copy VERSION file (Plan+ may not read version correctly)" + fi + else + print_warning "VERSION file not found in repo root" + fi + # Inject extracted OpenCode plan-reminder into Plan+ if available local plan_reminder="$HOME/.aidevops/cache/opencode-prompts/plan-reminder.txt" local plan_plus="$target_dir/plan-plus.md"