aidevops 2.74.1 → 2.76.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
@@ -206,6 +206,8 @@ aidevops upgrade-planning --force # Skip confirmation prompt
206
206
 
207
207
  This preserves your existing tasks while adding TOON-enhanced parsing, dependency tracking, and better structure.
208
208
 
209
+ **Automatic detection:** `aidevops update` now scans all registered projects for outdated planning templates (comparing TOON meta version numbers) and offers to upgrade them in-place with backups.
210
+
209
211
  ### Task Graph Visualization with Beads
210
212
 
211
213
  [Beads](https://github.com/steveyegge/beads) provides task dependency tracking and graph visualization:
@@ -451,6 +453,7 @@ aidevops includes curated skills imported from external repositories. Skills fro
451
453
  |-------|--------|-------------|
452
454
  | **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
455
  | **remotion** | [remotion-dev/skills](https://github.com/remotion-dev/skills) | Programmatic video creation with React, animations, rendering |
456
+ | **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
457
  | **animejs** | [animejs.com](https://animejs.com) | JavaScript animation library patterns and API (via Context7) |
455
458
 
456
459
  **CLI Commands:**
@@ -482,10 +485,12 @@ aidevops implements proven agent design patterns identified by [Lance Martin (La
482
485
  |---------|-------------|------------------------|
483
486
  | **Give Agents a Computer** | Filesystem + shell for persistent context | `~/.aidevops/.agent-workspace/`, 130+ helper scripts |
484
487
  | **Multi-Layer Action Space** | Few tools, push actions to computer | Per-agent MCP filtering (~12-20 tools each) |
485
- | **Progressive Disclosure** | Load context on-demand | Subagent tables, YAML frontmatter, read-on-demand |
488
+ | **Progressive Disclosure** | Load context on-demand | Subagent routing with content summaries, YAML frontmatter, read-on-demand |
486
489
  | **Offload Context** | Write results to filesystem | `.agent-workspace/work/[project]/` for persistence |
487
490
  | **Cache Context** | Prompt caching for cost | Stable instruction prefixes |
488
491
  | **Isolate Context** | Sub-agents with separate windows | Subagent files with specific tool permissions |
492
+ | **Multi-Agent Orchestration** | Coordinate parallel agents | TOON mailbox, agent registry, stateless coordinator |
493
+ | **Compaction Resilience** | Preserve context across compaction | OpenCode plugin injects dynamic state at compaction time |
489
494
  | **Ralph Loop** | Iterative execution until complete | `ralph-loop-helper.sh`, `full-loop-helper.sh` |
490
495
  | **Evolve Context** | Learn from sessions | `/remember`, `/recall` with SQLite FTS5 |
491
496
 
@@ -493,6 +498,45 @@ aidevops implements proven agent design patterns identified by [Lance Martin (La
493
498
 
494
499
  See `.agent/aidevops/architecture.md` for detailed implementation notes and references.
495
500
 
501
+ ### Multi-Agent Orchestration
502
+
503
+ 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.
504
+
505
+ **Architecture:**
506
+
507
+ ```text
508
+ Coordinator (pulse loop)
509
+ ├── Agent Registry (TOON format - who's active, what branch, idle/busy)
510
+ ├── Mailbox System (file-based, per-agent inbox/outbox)
511
+ │ ├── task_assignment → worker inbox
512
+ │ ├── status_report → coordinator outbox
513
+ │ └── broadcast → all agents
514
+ └── Model Routing (tier-based: haiku/sonnet/opus/flash/pro)
515
+ ```
516
+
517
+ **Key components:**
518
+
519
+ | Component | Script | Purpose |
520
+ |-----------|--------|---------|
521
+ | Mailbox | `mail-helper.sh` | TOON-based inter-agent messaging (send, check, broadcast, archive) |
522
+ | Coordinator | `coordinator-helper.sh` | Stateless pulse loop: collect reports, dispatch tasks, track idle workers |
523
+ | Registry | `mail-helper.sh register` | Agent registration with role, branch, worktree, heartbeat |
524
+ | Model routing | `generate-opencode-agents.sh` | Maps agent tiers to cost-effective models |
525
+
526
+ **How it works:**
527
+
528
+ 1. Each agent registers on startup (`mail-helper.sh register --role worker`)
529
+ 2. Coordinator runs periodic pulses (`coordinator-helper.sh pulse`)
530
+ 3. Pulse collects status reports, dispatches queued tasks to idle workers
531
+ 4. Agents send completion reports back via outbox
532
+ 5. File locking (`noclobber` + retry) prevents race conditions
533
+
534
+ **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.
535
+
536
+ **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.
537
+
538
+ **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.
539
+
496
540
  ## **Requirements**
497
541
 
498
542
  ```bash
@@ -562,6 +606,7 @@ The setup script offers to install these tools automatically.
562
606
  ### **Video Creation**
563
607
 
564
608
  - **[Remotion](https://remotion.dev/)**: Programmatic video creation with React - animations, compositions, media handling, captions
609
+ - **[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
610
 
566
611
  ### **WordPress Development**
567
612
 
@@ -602,6 +647,7 @@ The setup script offers to install these tools automatically.
602
647
 
603
648
  - **[Anime.js](https://animejs.com/)**: Lightweight JavaScript animation library for CSS, SVG, DOM attributes, and JS objects
604
649
  - **[Remotion](https://remotion.dev/)**: Programmatic video creation with React - create videos using code with 29 specialized rule files
650
+ - **[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
651
 
606
652
  ### **Performance & Monitoring**
607
653
 
@@ -987,7 +1033,7 @@ Call them in your AI assistant conversation with a simple @mention
987
1033
 
988
1034
  ### **Main Agents**
989
1035
 
990
- Ordered as they appear in OpenCode Tab selector and other AI assistants (14 total):
1036
+ Ordered as they appear in OpenCode Tab selector and other AI assistants (15 total):
991
1037
 
992
1038
  | Name | File | Purpose | MCPs Enabled |
993
1039
  |------|------|---------|--------------|
@@ -1004,6 +1050,7 @@ Ordered as they appear in OpenCode Tab selector and other AI assistants (14 tota
1004
1050
  | Research | `research.md` | Research and analysis tasks | context7, augment |
1005
1051
  | Sales | `sales.md` | Sales operations and CRM | augment |
1006
1052
  | SEO | `seo.md` | SEO optimization, Search Console, keyword research | gsc, ahrefs, dataforseo, serper, context7, augment |
1053
+ | Video | `video.md` | AI video generation, prompt engineering, programmatic video | augment |
1007
1054
  | WordPress | `wordpress.md` | WordPress ecosystem (dev, admin, MainWP, LocalWP) | localwp, context7, augment |
1008
1055
 
1009
1056
  ### **Example Subagents with MCP Integration**
@@ -1133,7 +1180,17 @@ Plans are tracked in `TODO.md` (all tasks) and `todo/PLANS.md` (complex executio
1133
1180
  | `--plans` | `/list-todo --plans` | Include full plan details |
1134
1181
  | `--compact` | `/list-todo --compact` | One-line per task |
1135
1182
 
1136
- **Time Tracking**: Tasks support time estimates and actuals with the format `~4h (ai:2h test:1h) started:2025-01-15T10:30Z`. Configure per-repo via `.aidevops.json`.
1183
+ **Time Tracking**: Tasks support time estimates as active session time (excluding AFK gaps) with the format `~4h started:2025-01-15T10:30Z`. The `session-time-helper.sh` analyses real session data to calibrate estimates vs actuals.
1184
+
1185
+ **Risk Levels**: Tasks support `risk:low/med/high` indicating human oversight needed:
1186
+
1187
+ | Risk | Oversight | Example |
1188
+ |------|-----------|---------|
1189
+ | `low` | Autonomous | Docs, formatting, simple refactors |
1190
+ | `med` | Supervised | Feature implementation, API changes |
1191
+ | `high` | Engaged | Security, data migrations, infrastructure |
1192
+
1193
+ Configure time tracking per-repo via `.aidevops.json`.
1137
1194
 
1138
1195
  **Development Workflow** (typical order):
1139
1196
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.74.1
1
+ 2.76.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.76.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.76.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.76.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