aidevops 2.74.1 → 2.75.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -451,6 +451,7 @@ aidevops includes curated skills imported from external repositories. Skills fro
451
451
  |-------|--------|-------------|
452
452
  | **cloudflare-platform** | [dmmulroy/cloudflare-skill](https://github.com/dmmulroy/cloudflare-skill) | 60 Cloudflare products: Workers, Pages, D1, R2, KV, Durable Objects, AI, networking, security |
453
453
  | **remotion** | [remotion-dev/skills](https://github.com/remotion-dev/skills) | Programmatic video creation with React, animations, rendering |
454
+ | **video-prompt-design** | [snubroot/Veo-3-Meta-Framework](https://github.com/snubroot/Veo-3-Meta-Framework) | AI video prompt engineering - 7-component meta prompt framework for Veo 3 |
454
455
  | **animejs** | [animejs.com](https://animejs.com) | JavaScript animation library patterns and API (via Context7) |
455
456
 
456
457
  **CLI Commands:**
@@ -486,6 +487,8 @@ aidevops implements proven agent design patterns identified by [Lance Martin (La
486
487
  | **Offload Context** | Write results to filesystem | `.agent-workspace/work/[project]/` for persistence |
487
488
  | **Cache Context** | Prompt caching for cost | Stable instruction prefixes |
488
489
  | **Isolate Context** | Sub-agents with separate windows | Subagent files with specific tool permissions |
490
+ | **Multi-Agent Orchestration** | Coordinate parallel agents | TOON mailbox, agent registry, stateless coordinator |
491
+ | **Compaction Resilience** | Preserve context across compaction | OpenCode plugin injects dynamic state at compaction time |
489
492
  | **Ralph Loop** | Iterative execution until complete | `ralph-loop-helper.sh`, `full-loop-helper.sh` |
490
493
  | **Evolve Context** | Learn from sessions | `/remember`, `/recall` with SQLite FTS5 |
491
494
 
@@ -493,6 +496,45 @@ aidevops implements proven agent design patterns identified by [Lance Martin (La
493
496
 
494
497
  See `.agent/aidevops/architecture.md` for detailed implementation notes and references.
495
498
 
499
+ ### Multi-Agent Orchestration
500
+
501
+ Run multiple AI agents in parallel on separate branches, coordinated through a lightweight mailbox system. Each agent works independently in its own git worktree while a stateless coordinator manages task distribution and status reporting.
502
+
503
+ **Architecture:**
504
+
505
+ ```text
506
+ Coordinator (pulse loop)
507
+ ├── Agent Registry (TOON format - who's active, what branch, idle/busy)
508
+ ├── Mailbox System (file-based, per-agent inbox/outbox)
509
+ │ ├── task_assignment → worker inbox
510
+ │ ├── status_report → coordinator outbox
511
+ │ └── broadcast → all agents
512
+ └── Model Routing (tier-based: haiku/sonnet/opus/flash/pro)
513
+ ```
514
+
515
+ **Key components:**
516
+
517
+ | Component | Script | Purpose |
518
+ |-----------|--------|---------|
519
+ | Mailbox | `mail-helper.sh` | TOON-based inter-agent messaging (send, check, broadcast, archive) |
520
+ | Coordinator | `coordinator-helper.sh` | Stateless pulse loop: collect reports, dispatch tasks, track idle workers |
521
+ | Registry | `mail-helper.sh register` | Agent registration with role, branch, worktree, heartbeat |
522
+ | Model routing | `generate-opencode-agents.sh` | Maps agent tiers to cost-effective models |
523
+
524
+ **How it works:**
525
+
526
+ 1. Each agent registers on startup (`mail-helper.sh register --role worker`)
527
+ 2. Coordinator runs periodic pulses (`coordinator-helper.sh pulse`)
528
+ 3. Pulse collects status reports, dispatches queued tasks to idle workers
529
+ 4. Agents send completion reports back via outbox
530
+ 5. File locking (`noclobber` + retry) prevents race conditions
531
+
532
+ **Compaction plugin** (`.agent/plugins/opencode-aidevops/`): When OpenCode compacts context (at ~200K tokens), the plugin injects current session state - agent registry, pending mailbox messages, git context, and relevant memories - ensuring continuity across compaction boundaries.
533
+
534
+ **Custom system prompt** (`.agent/prompts/build.txt`): Based on upstream OpenCode with aidevops-specific overrides for tool preferences, professional objectivity, and per-model reinforcements for weaker models.
535
+
536
+ **Subagent index** (`.agent/subagent-index.toon`): Compressed TOON routing table listing all agents, subagents, workflows, and scripts with model tier assignments - enables fast agent discovery without loading full markdown files.
537
+
496
538
  ## **Requirements**
497
539
 
498
540
  ```bash
@@ -562,6 +604,7 @@ The setup script offers to install these tools automatically.
562
604
  ### **Video Creation**
563
605
 
564
606
  - **[Remotion](https://remotion.dev/)**: Programmatic video creation with React - animations, compositions, media handling, captions
607
+ - **[Video Prompt Design](https://github.com/snubroot/Veo-3-Meta-Framework)**: AI video prompt engineering using the 7-component meta prompt framework for Veo 3 and similar models
565
608
 
566
609
  ### **WordPress Development**
567
610
 
@@ -602,6 +645,7 @@ The setup script offers to install these tools automatically.
602
645
 
603
646
  - **[Anime.js](https://animejs.com/)**: Lightweight JavaScript animation library for CSS, SVG, DOM attributes, and JS objects
604
647
  - **[Remotion](https://remotion.dev/)**: Programmatic video creation with React - create videos using code with 29 specialized rule files
648
+ - **[Video Prompt Design](https://github.com/snubroot/Veo-3-Meta-Framework)**: Structured prompt engineering for AI video generation (Veo 3, 7-component framework, character consistency, audio design)
605
649
 
606
650
  ### **Performance & Monitoring**
607
651
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.74.1
1
+ 2.75.0
package/aidevops.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # AI DevOps Framework CLI
4
4
  # Usage: aidevops <command> [options]
5
5
  #
6
- # Version: 2.74.1
6
+ # Version: 2.75.0
7
7
 
8
8
  set -euo pipefail
9
9
 
@@ -153,6 +153,48 @@ check_repo_needs_upgrade() {
153
153
  return 1 # up to date
154
154
  }
155
155
 
156
+ # Check if a planning file needs upgrading (version mismatch or missing TOON markers)
157
+ # Usage: check_planning_file_version <file> <template>
158
+ # Returns 0 if upgrade needed, 1 if up to date
159
+ check_planning_file_version() {
160
+ local file="$1" template="$2"
161
+ if [[ -f "$file" ]]; then
162
+ if ! grep -q "TOON:meta" "$file" 2>/dev/null; then
163
+ return 0
164
+ fi
165
+ local current_ver template_ver
166
+ current_ver=$(grep -A1 "TOON:meta" "$file" 2>/dev/null | tail -1 | cut -d',' -f1)
167
+ template_ver=$(grep -A1 "TOON:meta" "$template" 2>/dev/null | tail -1 | cut -d',' -f1)
168
+ if [[ -n "$template_ver" ]] && [[ "$current_ver" != "$template_ver" ]]; then
169
+ return 0
170
+ fi
171
+ return 1
172
+ else
173
+ # No file = no upgrade needed (init would create it)
174
+ return 1
175
+ fi
176
+ }
177
+
178
+ # Check if a repo's planning templates need upgrading
179
+ # Returns 0 if any planning file needs upgrade
180
+ check_planning_needs_upgrade() {
181
+ local repo_path="$1"
182
+ local todo_file="$repo_path/TODO.md"
183
+ local plans_file="$repo_path/todo/PLANS.md"
184
+ local todo_template="$AGENTS_DIR/templates/todo-template.md"
185
+ local plans_template="$AGENTS_DIR/templates/plans-template.md"
186
+
187
+ [[ ! -f "$todo_template" ]] && return 1
188
+
189
+ if check_planning_file_version "$todo_file" "$todo_template"; then
190
+ return 0
191
+ fi
192
+ if [[ -f "$plans_template" ]] && check_planning_file_version "$plans_file" "$plans_template"; then
193
+ return 0
194
+ fi
195
+ return 1
196
+ }
197
+
156
198
  # Detect if current directory has aidevops but isn't registered
157
199
  detect_unregistered_repo() {
158
200
  local project_root
@@ -569,7 +611,7 @@ cmd_update() {
569
611
  features=$(jq -r '[.features | to_entries[] | select(.value == true) | .key] | join(",")' "$repo/.aidevops.json" 2>/dev/null || echo "")
570
612
  register_repo "$repo" "$current_ver" "$features"
571
613
 
572
- print_success "Updated $(basename "$repo")"
614
+ print_success "Updated $(basename "$repo")"
573
615
  else
574
616
  print_warning "jq not installed - manual update needed for $repo"
575
617
  fi
@@ -577,6 +619,53 @@ cmd_update() {
577
619
  done
578
620
  fi
579
621
  fi
622
+
623
+ # Check planning templates in registered repos
624
+ echo ""
625
+ print_header "Checking Planning Templates"
626
+
627
+ local repos_needing_planning=()
628
+ while IFS= read -r repo_path; do
629
+ [[ -z "$repo_path" ]] && continue
630
+ [[ ! -d "$repo_path" ]] && continue
631
+ # Only check repos with planning enabled
632
+ if [[ -f "$repo_path/.aidevops.json" ]]; then
633
+ local has_planning
634
+ has_planning=$(grep -o '"planning": *true' "$repo_path/.aidevops.json" 2>/dev/null || true)
635
+ if [[ -n "$has_planning" ]] && check_planning_needs_upgrade "$repo_path"; then
636
+ repos_needing_planning+=("$repo_path")
637
+ fi
638
+ fi
639
+ done < <(get_registered_repos)
640
+
641
+ if [[ ${#repos_needing_planning[@]} -eq 0 ]]; then
642
+ print_success "All planning templates are up to date"
643
+ else
644
+ echo ""
645
+ print_warning "${#repos_needing_planning[@]} project(s) have outdated planning templates:"
646
+ for repo in "${repos_needing_planning[@]}"; do
647
+ local repo_name
648
+ repo_name=$(basename "$repo")
649
+ local todo_ver
650
+ todo_ver=$(grep -A1 "TOON:meta" "$repo/TODO.md" 2>/dev/null | tail -1 | cut -d',' -f1)
651
+ echo " - $repo_name (v${todo_ver:-none})"
652
+ done
653
+ local template_ver
654
+ template_ver=$(grep -A1 "TOON:meta" "$AGENTS_DIR/templates/todo-template.md" 2>/dev/null | tail -1 | cut -d',' -f1)
655
+ echo ""
656
+ echo " Latest template: v${template_ver} (adds risk field, active session time estimates)"
657
+ echo ""
658
+ read -r -p "Upgrade planning templates in these projects? [y/N] " response
659
+ if [[ "$response" =~ ^[Yy]$ ]]; then
660
+ for repo in "${repos_needing_planning[@]}"; do
661
+ print_info "Upgrading $(basename "$repo")..."
662
+ # Run upgrade-planning in the repo context
663
+ (cd "$repo" && cmd_upgrade_planning --force) || print_warning "Failed to upgrade $(basename "$repo")"
664
+ done
665
+ else
666
+ print_info "Run 'aidevops upgrade-planning' in each project to upgrade manually"
667
+ fi
668
+ fi
580
669
  }
581
670
 
582
671
  # Uninstall command
@@ -1117,35 +1206,47 @@ cmd_upgrade_planning() {
1117
1206
  local plans_needs_upgrade=false
1118
1207
 
1119
1208
  # Check TODO.md
1120
- if [[ -f "$todo_file" ]]; then
1121
- # Check if it's using the minimal template (no TOON markers)
1122
- if ! grep -q "TOON:meta" "$todo_file" 2>/dev/null; then
1123
- todo_needs_upgrade=true
1124
- needs_upgrade=true
1125
- print_warning "TODO.md uses minimal template (missing TOON markers)"
1209
+ if check_planning_file_version "$todo_file" "$todo_template"; then
1210
+ if [[ -f "$todo_file" ]]; then
1211
+ if ! grep -q "TOON:meta" "$todo_file" 2>/dev/null; then
1212
+ print_warning "TODO.md uses minimal template (missing TOON markers)"
1213
+ else
1214
+ local current_ver template_ver
1215
+ current_ver=$(grep -A1 "TOON:meta" "$todo_file" 2>/dev/null | tail -1 | cut -d',' -f1)
1216
+ template_ver=$(grep -A1 "TOON:meta" "$todo_template" 2>/dev/null | tail -1 | cut -d',' -f1)
1217
+ print_warning "TODO.md format version $current_ver -> $template_ver (adds risk field, updated estimates)"
1218
+ fi
1126
1219
  else
1127
- print_success "TODO.md already has TOON markers"
1220
+ print_info "TODO.md not found - will create from template"
1128
1221
  fi
1129
- else
1130
- print_info "TODO.md not found - will create from template"
1131
1222
  todo_needs_upgrade=true
1132
1223
  needs_upgrade=true
1224
+ else
1225
+ local current_ver
1226
+ current_ver=$(grep -A1 "TOON:meta" "$todo_file" 2>/dev/null | tail -1 | cut -d',' -f1)
1227
+ print_success "TODO.md already up to date (v${current_ver})"
1133
1228
  fi
1134
1229
 
1135
1230
  # Check PLANS.md
1136
- if [[ -f "$plans_file" ]]; then
1137
- # Check if it's using the minimal template (no TOON markers)
1138
- if ! grep -q "TOON:meta" "$plans_file" 2>/dev/null; then
1139
- plans_needs_upgrade=true
1140
- needs_upgrade=true
1141
- print_warning "todo/PLANS.md uses minimal template (missing TOON markers)"
1231
+ if check_planning_file_version "$plans_file" "$plans_template"; then
1232
+ if [[ -f "$plans_file" ]]; then
1233
+ if ! grep -q "TOON:meta" "$plans_file" 2>/dev/null; then
1234
+ print_warning "todo/PLANS.md uses minimal template (missing TOON markers)"
1235
+ else
1236
+ local current_plans_ver template_plans_ver
1237
+ current_plans_ver=$(grep -A1 "TOON:meta" "$plans_file" 2>/dev/null | tail -1 | cut -d',' -f1)
1238
+ template_plans_ver=$(grep -A1 "TOON:meta" "$plans_template" 2>/dev/null | tail -1 | cut -d',' -f1)
1239
+ print_warning "todo/PLANS.md format version $current_plans_ver -> $template_plans_ver"
1240
+ fi
1142
1241
  else
1143
- print_success "todo/PLANS.md already has TOON markers"
1242
+ print_info "todo/PLANS.md not found - will create from template"
1144
1243
  fi
1145
- else
1146
- print_info "todo/PLANS.md not found - will create from template"
1147
1244
  plans_needs_upgrade=true
1148
1245
  needs_upgrade=true
1246
+ else
1247
+ local current_plans_ver
1248
+ current_plans_ver=$(grep -A1 "TOON:meta" "$plans_file" 2>/dev/null | tail -1 | cut -d',' -f1)
1249
+ print_success "todo/PLANS.md already up to date (v${current_plans_ver})"
1149
1250
  fi
1150
1251
 
1151
1252
  if [[ "$needs_upgrade" == "false" ]]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "2.74.1",
3
+ "version": "2.75.0",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/setup.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # AI Assistant Server Access Framework Setup Script
4
4
  # Helps developers set up the framework for their infrastructure
5
5
  #
6
- # Version: 2.74.1
6
+ # Version: 2.75.0
7
7
  #
8
8
  # Quick Install (one-liner):
9
9
  # bash <(curl -fsSL https://aidevops.dev/install)
@@ -1449,6 +1449,28 @@ extract_opencode_prompts() {
1449
1449
  return 0
1450
1450
  }
1451
1451
 
1452
+ # Check if upstream OpenCode prompts have drifted from our synced version
1453
+ check_opencode_prompt_drift() {
1454
+ local drift_script=".agent/scripts/opencode-prompt-drift-check.sh"
1455
+ if [[ -f "$drift_script" ]]; then
1456
+ local output exit_code=0
1457
+ output=$(bash "$drift_script" --quiet 2>/dev/null) || exit_code=$?
1458
+ if [[ "$exit_code" -eq 1 && "$output" == PROMPT_DRIFT* ]]; then
1459
+ local local_hash upstream_hash
1460
+ local_hash=$(echo "$output" | cut -d'|' -f2)
1461
+ upstream_hash=$(echo "$output" | cut -d'|' -f3)
1462
+ print_warning "OpenCode upstream prompt has changed (${local_hash} → ${upstream_hash})"
1463
+ print_info " Review: https://github.com/anomalyco/opencode/compare/${local_hash}...${upstream_hash}"
1464
+ print_info " Update .agent/prompts/build.txt if needed"
1465
+ elif [[ "$exit_code" -eq 0 ]]; then
1466
+ print_success "OpenCode prompt in sync with upstream"
1467
+ else
1468
+ print_warning "Could not check prompt drift (network issue or missing dependency)"
1469
+ fi
1470
+ fi
1471
+ return 0
1472
+ }
1473
+
1452
1474
  # Deploy aidevops agents to user location
1453
1475
  deploy_aidevops_agents() {
1454
1476
  print_info "Deploying aidevops agents to ~/.aidevops/agents/..."
@@ -2427,6 +2449,14 @@ setup_opencode_plugins() {
2427
2449
  return 0
2428
2450
  fi
2429
2451
 
2452
+ # Setup aidevops compaction plugin (local file plugin)
2453
+ local aidevops_plugin_path="$HOME/.aidevops/agents/plugins/opencode-aidevops/index.mjs"
2454
+ if [[ -f "$aidevops_plugin_path" ]]; then
2455
+ print_info "Setting up aidevops compaction plugin..."
2456
+ add_opencode_plugin "file://$HOME/.aidevops" "file://${aidevops_plugin_path}" "$opencode_config"
2457
+ print_success "aidevops compaction plugin registered (preserves context across compaction)"
2458
+ fi
2459
+
2430
2460
  # Setup Antigravity OAuth plugin (Google OAuth)
2431
2461
  print_info "Setting up Antigravity OAuth plugin..."
2432
2462
  add_opencode_plugin "opencode-antigravity-auth" "opencode-antigravity-auth@latest" "$opencode_config"
@@ -2856,6 +2886,7 @@ main() {
2856
2886
  confirm_step "Migrate loop state from .claude/ to .agent/loop-state/" && migrate_loop_state_directories
2857
2887
  confirm_step "Cleanup deprecated agent paths" && cleanup_deprecated_paths
2858
2888
  confirm_step "Extract OpenCode prompts" && extract_opencode_prompts
2889
+ confirm_step "Check OpenCode prompt drift" && check_opencode_prompt_drift
2859
2890
  confirm_step "Deploy aidevops agents to ~/.aidevops/agents/" && deploy_aidevops_agents
2860
2891
  confirm_step "Generate agent skills (SKILL.md files)" && generate_agent_skills
2861
2892
  confirm_step "Create symlinks for imported skills" && create_skill_symlinks